@noego/forge 0.1.19 → 0.1.21

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,13 +1,13 @@
1
- import { p as Fe, a as k } from "./page.svelte-4uv4nQ2i.js";
2
- import { s as tr } from "./page.svelte-4uv4nQ2i.js";
1
+ import { p as He, a as D } from "./page.svelte-4uv4nQ2i.js";
2
+ import { s as mr } from "./page.svelte-4uv4nQ2i.js";
3
3
  import "svelte/internal/client";
4
- import { hydrate as Me } from "svelte";
5
- import $e from "../src/components/RecursiveRender.svelte";
6
- import { writable as me, get as C } from "svelte/store";
7
- function We(e) {
8
- const r = new Fe(e);
9
- return (t) => {
10
- const n = r.match(t);
4
+ import { hydrate as Ve } from "svelte";
5
+ import Ke from "../src/components/RecursiveRender.svelte";
6
+ import { writable as xe, get as N } from "svelte/store";
7
+ function Je(e) {
8
+ const t = new He(e);
9
+ return (r) => {
10
+ const n = t.match(r);
11
11
  if (!n) return null;
12
12
  const o = {};
13
13
  for (const [i, a] of Object.entries(n))
@@ -15,35 +15,35 @@ function We(e) {
15
15
  return o;
16
16
  };
17
17
  }
18
- function De(e) {
19
- return e.map((r) => {
20
- const t = r.path, n = We(t);
21
- return { pattern: t, parser: n };
18
+ function Xe(e) {
19
+ return e.map((t) => {
20
+ const r = t.path, n = Je(r);
21
+ return { pattern: r, parser: n };
22
22
  });
23
23
  }
24
- var re = function(e, r) {
25
- return re = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
26
- t.__proto__ = n;
27
- } || function(t, n) {
28
- for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
29
- }, re(e, r);
24
+ var se = function(e, t) {
25
+ return se = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
26
+ r.__proto__ = n;
27
+ } || function(r, n) {
28
+ for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (r[o] = n[o]);
29
+ }, se(e, t);
30
30
  };
31
- function L(e, r) {
32
- if (typeof r != "function" && r !== null)
33
- throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
34
- re(e, r);
35
- function t() {
31
+ function M(e, t) {
32
+ if (typeof t != "function" && t !== null)
33
+ throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
34
+ se(e, t);
35
+ function r() {
36
36
  this.constructor = e;
37
37
  }
38
- e.prototype = r === null ? Object.create(r) : (t.prototype = r.prototype, new t());
38
+ e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
39
39
  }
40
- function qe(e, r, t, n) {
40
+ function Ze(e, t, r, n) {
41
41
  function o(i) {
42
- return i instanceof t ? i : new t(function(a) {
42
+ return i instanceof r ? i : new r(function(a) {
43
43
  a(i);
44
44
  });
45
45
  }
46
- return new (t || (t = Promise))(function(i, a) {
46
+ return new (r || (r = Promise))(function(i, a) {
47
47
  function c(l) {
48
48
  try {
49
49
  u(n.next(l));
@@ -61,11 +61,11 @@ function qe(e, r, t, n) {
61
61
  function u(l) {
62
62
  l.done ? i(l.value) : o(l.value).then(c, s);
63
63
  }
64
- u((n = n.apply(e, r || [])).next());
64
+ u((n = n.apply(e, t || [])).next());
65
65
  });
66
66
  }
67
- function we(e, r) {
68
- var t = { label: 0, sent: function() {
67
+ function Ae(e, t) {
68
+ var r = { label: 0, sent: function() {
69
69
  if (i[0] & 1) throw i[1];
70
70
  return i[1];
71
71
  }, trys: [], ops: [] }, n, o, i, a = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
@@ -79,7 +79,7 @@ function we(e, r) {
79
79
  }
80
80
  function s(u) {
81
81
  if (n) throw new TypeError("Generator is already executing.");
82
- for (; a && (a = 0, u[0] && (t = 0)), t; ) try {
82
+ for (; a && (a = 0, u[0] && (r = 0)), r; ) try {
83
83
  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;
84
84
  switch (o = 0, i && (u = [u[0] & 2, i.value]), u[0]) {
85
85
  case 0:
@@ -87,34 +87,34 @@ function we(e, r) {
87
87
  i = u;
88
88
  break;
89
89
  case 4:
90
- return t.label++, { value: u[1], done: !1 };
90
+ return r.label++, { value: u[1], done: !1 };
91
91
  case 5:
92
- t.label++, o = u[1], u = [0];
92
+ r.label++, o = u[1], u = [0];
93
93
  continue;
94
94
  case 7:
95
- u = t.ops.pop(), t.trys.pop();
95
+ u = r.ops.pop(), r.trys.pop();
96
96
  continue;
97
97
  default:
98
- if (i = t.trys, !(i = i.length > 0 && i[i.length - 1]) && (u[0] === 6 || u[0] === 2)) {
99
- t = 0;
98
+ if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (u[0] === 6 || u[0] === 2)) {
99
+ r = 0;
100
100
  continue;
101
101
  }
102
102
  if (u[0] === 3 && (!i || u[1] > i[0] && u[1] < i[3])) {
103
- t.label = u[1];
103
+ r.label = u[1];
104
104
  break;
105
105
  }
106
- if (u[0] === 6 && t.label < i[1]) {
107
- t.label = i[1], i = u;
106
+ if (u[0] === 6 && r.label < i[1]) {
107
+ r.label = i[1], i = u;
108
108
  break;
109
109
  }
110
- if (i && t.label < i[2]) {
111
- t.label = i[2], t.ops.push(u);
110
+ if (i && r.label < i[2]) {
111
+ r.label = i[2], r.ops.push(u);
112
112
  break;
113
113
  }
114
- i[2] && t.ops.pop(), t.trys.pop();
114
+ i[2] && r.ops.pop(), r.trys.pop();
115
115
  continue;
116
116
  }
117
- u = r.call(e, t);
117
+ u = t.call(e, r);
118
118
  } catch (l) {
119
119
  u = [6, l], o = 0;
120
120
  } finally {
@@ -124,44 +124,44 @@ function we(e, r) {
124
124
  return { value: u[0] ? u[1] : void 0, done: !0 };
125
125
  }
126
126
  }
127
- function j(e) {
128
- var r = typeof Symbol == "function" && Symbol.iterator, t = r && e[r], n = 0;
129
- if (t) return t.call(e);
127
+ function F(e) {
128
+ var t = typeof Symbol == "function" && Symbol.iterator, r = t && e[t], n = 0;
129
+ if (r) return r.call(e);
130
130
  if (e && typeof e.length == "number") return {
131
131
  next: function() {
132
132
  return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e };
133
133
  }
134
134
  };
135
- throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
135
+ throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
136
136
  }
137
- function N(e, r) {
138
- var t = typeof Symbol == "function" && e[Symbol.iterator];
139
- if (!t) return e;
140
- var n = t.call(e), o, i = [], a;
137
+ function k(e, t) {
138
+ var r = typeof Symbol == "function" && e[Symbol.iterator];
139
+ if (!r) return e;
140
+ var n = r.call(e), o, i = [], a;
141
141
  try {
142
- for (; (r === void 0 || r-- > 0) && !(o = n.next()).done; ) i.push(o.value);
142
+ for (; (t === void 0 || t-- > 0) && !(o = n.next()).done; ) i.push(o.value);
143
143
  } catch (c) {
144
144
  a = { error: c };
145
145
  } finally {
146
146
  try {
147
- o && !o.done && (t = n.return) && t.call(n);
147
+ o && !o.done && (r = n.return) && r.call(n);
148
148
  } finally {
149
149
  if (a) throw a.error;
150
150
  }
151
151
  }
152
152
  return i;
153
153
  }
154
- function M(e, r, t) {
155
- if (t || arguments.length === 2) for (var n = 0, o = r.length, i; n < o; n++)
156
- (i || !(n in r)) && (i || (i = Array.prototype.slice.call(r, 0, n)), i[n] = r[n]);
157
- return e.concat(i || Array.prototype.slice.call(r));
154
+ function G(e, t, r) {
155
+ if (r || arguments.length === 2) for (var n = 0, o = t.length, i; n < o; n++)
156
+ (i || !(n in t)) && (i || (i = Array.prototype.slice.call(t, 0, n)), i[n] = t[n]);
157
+ return e.concat(i || Array.prototype.slice.call(t));
158
158
  }
159
- function R(e) {
160
- return this instanceof R ? (this.v = e, this) : new R(e);
159
+ function U(e) {
160
+ return this instanceof U ? (this.v = e, this) : new U(e);
161
161
  }
162
- function ze(e, r, t) {
162
+ function Qe(e, t, r) {
163
163
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
164
- var n = t.apply(e, r || []), o, i = [];
164
+ var n = r.apply(e, t || []), o, i = [];
165
165
  return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", a), o[Symbol.asyncIterator] = function() {
166
166
  return this;
167
167
  }, o;
@@ -172,8 +172,8 @@ function ze(e, r, t) {
172
172
  }
173
173
  function c(d, p) {
174
174
  n[d] && (o[d] = function(h) {
175
- return new Promise(function(g, b) {
176
- i.push([d, h, g, b]) > 1 || s(d, h);
175
+ return new Promise(function(S, g) {
176
+ i.push([d, h, S, g]) > 1 || s(d, h);
177
177
  });
178
178
  }, p && (o[d] = p(o[d])));
179
179
  }
@@ -185,7 +185,7 @@ function ze(e, r, t) {
185
185
  }
186
186
  }
187
187
  function u(d) {
188
- d.value instanceof R ? Promise.resolve(d.value.v).then(l, f) : v(i[0][2], d);
188
+ d.value instanceof U ? Promise.resolve(d.value.v).then(l, f) : v(i[0][2], d);
189
189
  }
190
190
  function l(d) {
191
191
  s("next", d);
@@ -197,14 +197,14 @@ function ze(e, r, t) {
197
197
  d(p), i.shift(), i.length && s(i[0][0], i[0][1]);
198
198
  }
199
199
  }
200
- function Ge(e) {
200
+ function et(e) {
201
201
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
202
- var r = e[Symbol.asyncIterator], t;
203
- return r ? r.call(e) : (e = typeof j == "function" ? j(e) : e[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
202
+ var t = e[Symbol.asyncIterator], r;
203
+ return t ? t.call(e) : (e = typeof F == "function" ? F(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() {
204
204
  return this;
205
- }, t);
205
+ }, r);
206
206
  function n(i) {
207
- t[i] = e[i] && function(a) {
207
+ r[i] = e[i] && function(a) {
208
208
  return new Promise(function(c, s) {
209
209
  a = e[i](a), o(c, s, a.done, a.value);
210
210
  });
@@ -219,50 +219,50 @@ function Ge(e) {
219
219
  function w(e) {
220
220
  return typeof e == "function";
221
221
  }
222
- function ae(e) {
223
- var r = function(n) {
222
+ function de(e) {
223
+ var t = function(n) {
224
224
  Error.call(n), n.stack = new Error().stack;
225
- }, t = e(r);
226
- return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
225
+ }, r = e(t);
226
+ return r.prototype = Object.create(Error.prototype), r.prototype.constructor = r, r;
227
227
  }
228
- var X = ae(function(e) {
229
- return function(t) {
230
- e(this), this.message = t ? t.length + ` errors occurred during unsubscription:
231
- ` + t.map(function(n, o) {
228
+ var ee = de(function(e) {
229
+ return function(r) {
230
+ e(this), this.message = r ? r.length + ` errors occurred during unsubscription:
231
+ ` + r.map(function(n, o) {
232
232
  return o + 1 + ") " + n.toString();
233
233
  }).join(`
234
- `) : "", this.name = "UnsubscriptionError", this.errors = t;
234
+ `) : "", this.name = "UnsubscriptionError", this.errors = r;
235
235
  };
236
236
  });
237
- function ne(e, r) {
237
+ function ue(e, t) {
238
238
  if (e) {
239
- var t = e.indexOf(r);
240
- 0 <= t && e.splice(t, 1);
239
+ var r = e.indexOf(t);
240
+ 0 <= r && e.splice(r, 1);
241
241
  }
242
242
  }
243
- var B = (function() {
244
- function e(r) {
245
- this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
243
+ var X = (function() {
244
+ function e(t) {
245
+ this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
246
246
  }
247
247
  return e.prototype.unsubscribe = function() {
248
- var r, t, n, o, i;
248
+ var t, r, n, o, i;
249
249
  if (!this.closed) {
250
250
  this.closed = !0;
251
251
  var a = this._parentage;
252
252
  if (a)
253
253
  if (this._parentage = null, Array.isArray(a))
254
254
  try {
255
- for (var c = j(a), s = c.next(); !s.done; s = c.next()) {
255
+ for (var c = F(a), s = c.next(); !s.done; s = c.next()) {
256
256
  var u = s.value;
257
257
  u.remove(this);
258
258
  }
259
259
  } catch (h) {
260
- r = { error: h };
260
+ t = { error: h };
261
261
  } finally {
262
262
  try {
263
- s && !s.done && (t = c.return) && t.call(c);
263
+ s && !s.done && (r = c.return) && r.call(c);
264
264
  } finally {
265
- if (r) throw r.error;
265
+ if (t) throw t.error;
266
266
  }
267
267
  }
268
268
  else
@@ -272,18 +272,18 @@ var B = (function() {
272
272
  try {
273
273
  l();
274
274
  } catch (h) {
275
- i = h instanceof X ? h.errors : [h];
275
+ i = h instanceof ee ? h.errors : [h];
276
276
  }
277
277
  var f = this._finalizers;
278
278
  if (f) {
279
279
  this._finalizers = null;
280
280
  try {
281
- for (var v = j(f), d = v.next(); !d.done; d = v.next()) {
281
+ for (var v = F(f), d = v.next(); !d.done; d = v.next()) {
282
282
  var p = d.value;
283
283
  try {
284
- de(p);
284
+ we(p);
285
285
  } catch (h) {
286
- i = i ?? [], h instanceof X ? i = M(M([], N(i)), N(h.errors)) : i.push(h);
286
+ i = i ?? [], h instanceof ee ? i = G(G([], k(i)), k(h.errors)) : i.push(h);
287
287
  }
288
288
  }
289
289
  } catch (h) {
@@ -297,191 +297,191 @@ var B = (function() {
297
297
  }
298
298
  }
299
299
  if (i)
300
- throw new X(i);
300
+ throw new ee(i);
301
301
  }
302
- }, e.prototype.add = function(r) {
303
- var t;
304
- if (r && r !== this)
302
+ }, e.prototype.add = function(t) {
303
+ var r;
304
+ if (t && t !== this)
305
305
  if (this.closed)
306
- de(r);
306
+ we(t);
307
307
  else {
308
- if (r instanceof e) {
309
- if (r.closed || r._hasParent(this))
308
+ if (t instanceof e) {
309
+ if (t.closed || t._hasParent(this))
310
310
  return;
311
- r._addParent(this);
311
+ t._addParent(this);
312
312
  }
313
- (this._finalizers = (t = this._finalizers) !== null && t !== void 0 ? t : []).push(r);
313
+ (this._finalizers = (r = this._finalizers) !== null && r !== void 0 ? r : []).push(t);
314
314
  }
315
- }, e.prototype._hasParent = function(r) {
316
- var t = this._parentage;
317
- return t === r || Array.isArray(t) && t.includes(r);
318
- }, e.prototype._addParent = function(r) {
319
- var t = this._parentage;
320
- this._parentage = Array.isArray(t) ? (t.push(r), t) : t ? [t, r] : r;
321
- }, e.prototype._removeParent = function(r) {
322
- var t = this._parentage;
323
- t === r ? this._parentage = null : Array.isArray(t) && ne(t, r);
324
- }, e.prototype.remove = function(r) {
325
- var t = this._finalizers;
326
- t && ne(t, r), r instanceof e && r._removeParent(this);
315
+ }, e.prototype._hasParent = function(t) {
316
+ var r = this._parentage;
317
+ return r === t || Array.isArray(r) && r.includes(t);
318
+ }, e.prototype._addParent = function(t) {
319
+ var r = this._parentage;
320
+ this._parentage = Array.isArray(r) ? (r.push(t), r) : r ? [r, t] : t;
321
+ }, e.prototype._removeParent = function(t) {
322
+ var r = this._parentage;
323
+ r === t ? this._parentage = null : Array.isArray(r) && ue(r, t);
324
+ }, e.prototype.remove = function(t) {
325
+ var r = this._finalizers;
326
+ r && ue(r, t), t instanceof e && t._removeParent(this);
327
327
  }, e.EMPTY = (function() {
328
- var r = new e();
329
- return r.closed = !0, r;
328
+ var t = new e();
329
+ return t.closed = !0, t;
330
330
  })(), e;
331
- })(), be = B.EMPTY;
332
- function ge(e) {
333
- return e instanceof B || e && "closed" in e && w(e.remove) && w(e.add) && w(e.unsubscribe);
331
+ })(), Pe = X.EMPTY;
332
+ function Ie(e) {
333
+ return e instanceof X || e && "closed" in e && w(e.remove) && w(e.add) && w(e.unsubscribe);
334
334
  }
335
- function de(e) {
335
+ function we(e) {
336
336
  w(e) ? e() : e.unsubscribe();
337
337
  }
338
- var He = {
338
+ var tt = {
339
339
  Promise: void 0
340
- }, Be = {
341
- setTimeout: function(e, r) {
342
- for (var t = [], n = 2; n < arguments.length; n++)
343
- t[n - 2] = arguments[n];
344
- return setTimeout.apply(void 0, M([e, r], N(t)));
340
+ }, rt = {
341
+ setTimeout: function(e, t) {
342
+ for (var r = [], n = 2; n < arguments.length; n++)
343
+ r[n - 2] = arguments[n];
344
+ return setTimeout.apply(void 0, G([e, t], k(r)));
345
345
  },
346
346
  clearTimeout: function(e) {
347
347
  return clearTimeout(e);
348
348
  },
349
349
  delegate: void 0
350
350
  };
351
- function Se(e) {
352
- Be.setTimeout(function() {
351
+ function Te(e) {
352
+ rt.setTimeout(function() {
353
353
  throw e;
354
354
  });
355
355
  }
356
- function he() {
356
+ function ge() {
357
357
  }
358
- function q(e) {
358
+ function H(e) {
359
359
  e();
360
360
  }
361
- var se = (function(e) {
362
- L(r, e);
363
- function r(t) {
361
+ var he = (function(e) {
362
+ M(t, e);
363
+ function t(r) {
364
364
  var n = e.call(this) || this;
365
- return n.isStopped = !1, t ? (n.destination = t, ge(t) && t.add(n)) : n.destination = Xe, n;
365
+ return n.isStopped = !1, r ? (n.destination = r, Ie(r) && r.add(n)) : n.destination = it, n;
366
366
  }
367
- return r.create = function(t, n, o) {
368
- return new U(t, n, o);
369
- }, r.prototype.next = function(t) {
370
- this.isStopped || this._next(t);
371
- }, r.prototype.error = function(t) {
372
- this.isStopped || (this.isStopped = !0, this._error(t));
373
- }, r.prototype.complete = function() {
367
+ return t.create = function(r, n, o) {
368
+ return new $(r, n, o);
369
+ }, t.prototype.next = function(r) {
370
+ this.isStopped || this._next(r);
371
+ }, t.prototype.error = function(r) {
372
+ this.isStopped || (this.isStopped = !0, this._error(r));
373
+ }, t.prototype.complete = function() {
374
374
  this.isStopped || (this.isStopped = !0, this._complete());
375
- }, r.prototype.unsubscribe = function() {
375
+ }, t.prototype.unsubscribe = function() {
376
376
  this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this), this.destination = null);
377
- }, r.prototype._next = function(t) {
378
- this.destination.next(t);
379
- }, r.prototype._error = function(t) {
377
+ }, t.prototype._next = function(r) {
378
+ this.destination.next(r);
379
+ }, t.prototype._error = function(r) {
380
380
  try {
381
- this.destination.error(t);
381
+ this.destination.error(r);
382
382
  } finally {
383
383
  this.unsubscribe();
384
384
  }
385
- }, r.prototype._complete = function() {
385
+ }, t.prototype._complete = function() {
386
386
  try {
387
387
  this.destination.complete();
388
388
  } finally {
389
389
  this.unsubscribe();
390
390
  }
391
- }, r;
392
- })(B), Ye = (function() {
393
- function e(r) {
394
- this.partialObserver = r;
391
+ }, t;
392
+ })(X), nt = (function() {
393
+ function e(t) {
394
+ this.partialObserver = t;
395
395
  }
396
- return e.prototype.next = function(r) {
397
- var t = this.partialObserver;
398
- if (t.next)
396
+ return e.prototype.next = function(t) {
397
+ var r = this.partialObserver;
398
+ if (r.next)
399
399
  try {
400
- t.next(r);
400
+ r.next(t);
401
401
  } catch (n) {
402
- D(n);
402
+ Y(n);
403
403
  }
404
- }, e.prototype.error = function(r) {
405
- var t = this.partialObserver;
406
- if (t.error)
404
+ }, e.prototype.error = function(t) {
405
+ var r = this.partialObserver;
406
+ if (r.error)
407
407
  try {
408
- t.error(r);
408
+ r.error(t);
409
409
  } catch (n) {
410
- D(n);
410
+ Y(n);
411
411
  }
412
412
  else
413
- D(r);
413
+ Y(t);
414
414
  }, e.prototype.complete = function() {
415
- var r = this.partialObserver;
416
- if (r.complete)
415
+ var t = this.partialObserver;
416
+ if (t.complete)
417
417
  try {
418
- r.complete();
419
- } catch (t) {
420
- D(t);
418
+ t.complete();
419
+ } catch (r) {
420
+ Y(r);
421
421
  }
422
422
  }, e;
423
- })(), U = (function(e) {
424
- L(r, e);
425
- function r(t, n, o) {
423
+ })(), $ = (function(e) {
424
+ M(t, e);
425
+ function t(r, n, o) {
426
426
  var i = e.call(this) || this, a;
427
- return w(t) || !t ? a = {
428
- next: t ?? void 0,
427
+ return w(r) || !r ? a = {
428
+ next: r ?? void 0,
429
429
  error: n ?? void 0,
430
430
  complete: o ?? void 0
431
- } : a = t, i.destination = new Ye(a), i;
431
+ } : a = r, i.destination = new nt(a), i;
432
432
  }
433
- return r;
434
- })(se);
435
- function D(e) {
436
- Se(e);
433
+ return t;
434
+ })(he);
435
+ function Y(e) {
436
+ Te(e);
437
437
  }
438
- function Ke(e) {
438
+ function ot(e) {
439
439
  throw e;
440
440
  }
441
- var Xe = {
441
+ var it = {
442
442
  closed: !0,
443
- next: he,
444
- error: Ke,
445
- complete: he
446
- }, ue = (function() {
443
+ next: ge,
444
+ error: ot,
445
+ complete: ge
446
+ }, pe = (function() {
447
447
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
448
448
  })();
449
- function ce(e) {
449
+ function ve(e) {
450
450
  return e;
451
451
  }
452
- function Je(e) {
453
- return e.length === 0 ? ce : e.length === 1 ? e[0] : function(t) {
452
+ function at(e) {
453
+ return e.length === 0 ? ve : e.length === 1 ? e[0] : function(r) {
454
454
  return e.reduce(function(n, o) {
455
455
  return o(n);
456
- }, t);
456
+ }, r);
457
457
  };
458
458
  }
459
- var _ = (function() {
460
- function e(r) {
461
- r && (this._subscribe = r);
459
+ var E = (function() {
460
+ function e(t) {
461
+ t && (this._subscribe = t);
462
462
  }
463
- return e.prototype.lift = function(r) {
464
- var t = new e();
465
- return t.source = this, t.operator = r, t;
466
- }, e.prototype.subscribe = function(r, t, n) {
467
- var o = this, i = Qe(r) ? r : new U(r, t, n);
468
- return q(function() {
463
+ return e.prototype.lift = function(t) {
464
+ var r = new e();
465
+ return r.source = this, r.operator = t, r;
466
+ }, e.prototype.subscribe = function(t, r, n) {
467
+ var o = this, i = ut(t) ? t : new $(t, r, n);
468
+ return H(function() {
469
469
  var a = o, c = a.operator, s = a.source;
470
470
  i.add(c ? c.call(i, s) : s ? o._subscribe(i) : o._trySubscribe(i));
471
471
  }), i;
472
- }, e.prototype._trySubscribe = function(r) {
472
+ }, e.prototype._trySubscribe = function(t) {
473
473
  try {
474
- return this._subscribe(r);
475
- } catch (t) {
476
- r.error(t);
474
+ return this._subscribe(t);
475
+ } catch (r) {
476
+ t.error(r);
477
477
  }
478
- }, e.prototype.forEach = function(r, t) {
478
+ }, e.prototype.forEach = function(t, r) {
479
479
  var n = this;
480
- return t = pe(t), new t(function(o, i) {
481
- var a = new U({
480
+ return r = Se(r), new r(function(o, i) {
481
+ var a = new $({
482
482
  next: function(c) {
483
483
  try {
484
- r(c);
484
+ t(c);
485
485
  } catch (s) {
486
486
  i(s), a.unsubscribe();
487
487
  }
@@ -491,20 +491,20 @@ var _ = (function() {
491
491
  });
492
492
  n.subscribe(a);
493
493
  });
494
- }, e.prototype._subscribe = function(r) {
495
- var t;
496
- return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(r);
497
- }, e.prototype[ue] = function() {
494
+ }, e.prototype._subscribe = function(t) {
495
+ var r;
496
+ return (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(t);
497
+ }, e.prototype[pe] = function() {
498
498
  return this;
499
499
  }, e.prototype.pipe = function() {
500
- for (var r = [], t = 0; t < arguments.length; t++)
501
- r[t] = arguments[t];
502
- return Je(r)(this);
503
- }, e.prototype.toPromise = function(r) {
504
- var t = this;
505
- return r = pe(r), new r(function(n, o) {
500
+ for (var t = [], r = 0; r < arguments.length; r++)
501
+ t[r] = arguments[r];
502
+ return at(t)(this);
503
+ }, e.prototype.toPromise = function(t) {
504
+ var r = this;
505
+ return t = Se(t), new t(function(n, o) {
506
506
  var i;
507
- t.subscribe(function(a) {
507
+ r.subscribe(function(a) {
508
508
  return i = a;
509
509
  }, function(a) {
510
510
  return o(a);
@@ -512,29 +512,29 @@ var _ = (function() {
512
512
  return n(i);
513
513
  });
514
514
  });
515
- }, e.create = function(r) {
516
- return new e(r);
515
+ }, e.create = function(t) {
516
+ return new e(t);
517
517
  }, e;
518
518
  })();
519
- function pe(e) {
520
- var r;
521
- return (r = e ?? He.Promise) !== null && r !== void 0 ? r : Promise;
519
+ function Se(e) {
520
+ var t;
521
+ return (t = e ?? tt.Promise) !== null && t !== void 0 ? t : Promise;
522
522
  }
523
- function Ze(e) {
523
+ function st(e) {
524
524
  return e && w(e.next) && w(e.error) && w(e.complete);
525
525
  }
526
- function Qe(e) {
527
- return e && e instanceof se || Ze(e) && ge(e);
526
+ function ut(e) {
527
+ return e && e instanceof he || st(e) && Ie(e);
528
528
  }
529
- function et(e) {
529
+ function ct(e) {
530
530
  return w(e == null ? void 0 : e.lift);
531
531
  }
532
532
  function P(e) {
533
- return function(r) {
534
- if (et(r))
535
- return r.lift(function(t) {
533
+ return function(t) {
534
+ if (ct(t))
535
+ return t.lift(function(r) {
536
536
  try {
537
- return e(t, this);
537
+ return e(r, this);
538
538
  } catch (n) {
539
539
  this.error(n);
540
540
  }
@@ -542,24 +542,24 @@ function P(e) {
542
542
  throw new TypeError("Unable to lift unknown Observable type");
543
543
  };
544
544
  }
545
- function A(e, r, t, n, o) {
546
- return new tt(e, r, t, n, o);
545
+ function A(e, t, r, n, o) {
546
+ return new lt(e, t, r, n, o);
547
547
  }
548
- var tt = (function(e) {
549
- L(r, e);
550
- function r(t, n, o, i, a, c) {
551
- var s = e.call(this, t) || this;
548
+ var lt = (function(e) {
549
+ M(t, e);
550
+ function t(r, n, o, i, a, c) {
551
+ var s = e.call(this, r) || this;
552
552
  return s.onFinalize = a, s.shouldUnsubscribe = c, s._next = n ? function(u) {
553
553
  try {
554
554
  n(u);
555
555
  } catch (l) {
556
- t.error(l);
556
+ r.error(l);
557
557
  }
558
558
  } : e.prototype._next, s._error = i ? function(u) {
559
559
  try {
560
560
  i(u);
561
561
  } catch (l) {
562
- t.error(l);
562
+ r.error(l);
563
563
  } finally {
564
564
  this.unsubscribe();
565
565
  }
@@ -567,45 +567,45 @@ var tt = (function(e) {
567
567
  try {
568
568
  o();
569
569
  } catch (u) {
570
- t.error(u);
570
+ r.error(u);
571
571
  } finally {
572
572
  this.unsubscribe();
573
573
  }
574
574
  } : e.prototype._complete, s;
575
575
  }
576
- return r.prototype.unsubscribe = function() {
577
- var t;
576
+ return t.prototype.unsubscribe = function() {
577
+ var r;
578
578
  if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
579
579
  var n = this.closed;
580
- e.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
580
+ e.prototype.unsubscribe.call(this), !n && ((r = this.onFinalize) === null || r === void 0 || r.call(this));
581
581
  }
582
- }, r;
583
- })(se), rt = ae(function(e) {
582
+ }, t;
583
+ })(he), ft = de(function(e) {
584
584
  return function() {
585
585
  e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
586
586
  };
587
- }), Y = (function(e) {
588
- L(r, e);
589
- function r() {
590
- var t = e.call(this) || this;
591
- return t.closed = !1, t.currentObservers = null, t.observers = [], t.isStopped = !1, t.hasError = !1, t.thrownError = null, t;
587
+ }), Z = (function(e) {
588
+ M(t, e);
589
+ function t() {
590
+ var r = e.call(this) || this;
591
+ return r.closed = !1, r.currentObservers = null, r.observers = [], r.isStopped = !1, r.hasError = !1, r.thrownError = null, r;
592
592
  }
593
- return r.prototype.lift = function(t) {
594
- var n = new ve(this, this);
595
- return n.operator = t, n;
596
- }, r.prototype._throwIfClosed = function() {
593
+ return t.prototype.lift = function(r) {
594
+ var n = new _e(this, this);
595
+ return n.operator = r, n;
596
+ }, t.prototype._throwIfClosed = function() {
597
597
  if (this.closed)
598
- throw new rt();
599
- }, r.prototype.next = function(t) {
598
+ throw new ft();
599
+ }, t.prototype.next = function(r) {
600
600
  var n = this;
601
- q(function() {
601
+ H(function() {
602
602
  var o, i;
603
603
  if (n._throwIfClosed(), !n.isStopped) {
604
604
  n.currentObservers || (n.currentObservers = Array.from(n.observers));
605
605
  try {
606
- for (var a = j(n.currentObservers), c = a.next(); !c.done; c = a.next()) {
606
+ for (var a = F(n.currentObservers), c = a.next(); !c.done; c = a.next()) {
607
607
  var s = c.value;
608
- s.next(t);
608
+ s.next(r);
609
609
  }
610
610
  } catch (u) {
611
611
  o = { error: u };
@@ -618,137 +618,137 @@ var tt = (function(e) {
618
618
  }
619
619
  }
620
620
  });
621
- }, r.prototype.error = function(t) {
621
+ }, t.prototype.error = function(r) {
622
622
  var n = this;
623
- q(function() {
623
+ H(function() {
624
624
  if (n._throwIfClosed(), !n.isStopped) {
625
- n.hasError = n.isStopped = !0, n.thrownError = t;
625
+ n.hasError = n.isStopped = !0, n.thrownError = r;
626
626
  for (var o = n.observers; o.length; )
627
- o.shift().error(t);
627
+ o.shift().error(r);
628
628
  }
629
629
  });
630
- }, r.prototype.complete = function() {
631
- var t = this;
632
- q(function() {
633
- if (t._throwIfClosed(), !t.isStopped) {
634
- t.isStopped = !0;
635
- for (var n = t.observers; n.length; )
630
+ }, t.prototype.complete = function() {
631
+ var r = this;
632
+ H(function() {
633
+ if (r._throwIfClosed(), !r.isStopped) {
634
+ r.isStopped = !0;
635
+ for (var n = r.observers; n.length; )
636
636
  n.shift().complete();
637
637
  }
638
638
  });
639
- }, r.prototype.unsubscribe = function() {
639
+ }, t.prototype.unsubscribe = function() {
640
640
  this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
641
- }, Object.defineProperty(r.prototype, "observed", {
641
+ }, Object.defineProperty(t.prototype, "observed", {
642
642
  get: function() {
643
- var t;
644
- return ((t = this.observers) === null || t === void 0 ? void 0 : t.length) > 0;
643
+ var r;
644
+ return ((r = this.observers) === null || r === void 0 ? void 0 : r.length) > 0;
645
645
  },
646
646
  enumerable: !1,
647
647
  configurable: !0
648
- }), r.prototype._trySubscribe = function(t) {
649
- return this._throwIfClosed(), e.prototype._trySubscribe.call(this, t);
650
- }, r.prototype._subscribe = function(t) {
651
- return this._throwIfClosed(), this._checkFinalizedStatuses(t), this._innerSubscribe(t);
652
- }, r.prototype._innerSubscribe = function(t) {
648
+ }), t.prototype._trySubscribe = function(r) {
649
+ return this._throwIfClosed(), e.prototype._trySubscribe.call(this, r);
650
+ }, t.prototype._subscribe = function(r) {
651
+ return this._throwIfClosed(), this._checkFinalizedStatuses(r), this._innerSubscribe(r);
652
+ }, t.prototype._innerSubscribe = function(r) {
653
653
  var n = this, o = this, i = o.hasError, a = o.isStopped, c = o.observers;
654
- return i || a ? be : (this.currentObservers = null, c.push(t), new B(function() {
655
- n.currentObservers = null, ne(c, t);
654
+ return i || a ? Pe : (this.currentObservers = null, c.push(r), new X(function() {
655
+ n.currentObservers = null, ue(c, r);
656
656
  }));
657
- }, r.prototype._checkFinalizedStatuses = function(t) {
657
+ }, t.prototype._checkFinalizedStatuses = function(r) {
658
658
  var n = this, o = n.hasError, i = n.thrownError, a = n.isStopped;
659
- o ? t.error(i) : a && t.complete();
660
- }, r.prototype.asObservable = function() {
661
- var t = new _();
662
- return t.source = this, t;
663
- }, r.create = function(t, n) {
664
- return new ve(t, n);
665
- }, r;
666
- })(_), ve = (function(e) {
667
- L(r, e);
668
- function r(t, n) {
659
+ o ? r.error(i) : a && r.complete();
660
+ }, t.prototype.asObservable = function() {
661
+ var r = new E();
662
+ return r.source = this, r;
663
+ }, t.create = function(r, n) {
664
+ return new _e(r, n);
665
+ }, t;
666
+ })(E), _e = (function(e) {
667
+ M(t, e);
668
+ function t(r, n) {
669
669
  var o = e.call(this) || this;
670
- return o.destination = t, o.source = n, o;
670
+ return o.destination = r, o.source = n, o;
671
671
  }
672
- return r.prototype.next = function(t) {
672
+ return t.prototype.next = function(r) {
673
673
  var n, o;
674
- (o = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || o === void 0 || o.call(n, t);
675
- }, r.prototype.error = function(t) {
674
+ (o = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || o === void 0 || o.call(n, r);
675
+ }, t.prototype.error = function(r) {
676
676
  var n, o;
677
- (o = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || o === void 0 || o.call(n, t);
678
- }, r.prototype.complete = function() {
679
- var t, n;
680
- (n = (t = this.destination) === null || t === void 0 ? void 0 : t.complete) === null || n === void 0 || n.call(t);
681
- }, r.prototype._subscribe = function(t) {
677
+ (o = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || o === void 0 || o.call(n, r);
678
+ }, t.prototype.complete = function() {
679
+ var r, n;
680
+ (n = (r = this.destination) === null || r === void 0 ? void 0 : r.complete) === null || n === void 0 || n.call(r);
681
+ }, t.prototype._subscribe = function(r) {
682
682
  var n, o;
683
- return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && o !== void 0 ? o : be;
684
- }, r;
685
- })(Y), _e = {
683
+ return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r)) !== null && o !== void 0 ? o : Pe;
684
+ }, t;
685
+ })(Z), Re = {
686
686
  now: function() {
687
- return (_e.delegate || Date).now();
687
+ return (Re.delegate || Date).now();
688
688
  },
689
689
  delegate: void 0
690
- }, nt = (function(e) {
691
- L(r, e);
692
- function r(t, n, o) {
693
- t === void 0 && (t = 1 / 0), n === void 0 && (n = 1 / 0), o === void 0 && (o = _e);
690
+ }, dt = (function(e) {
691
+ M(t, e);
692
+ function t(r, n, o) {
693
+ r === void 0 && (r = 1 / 0), n === void 0 && (n = 1 / 0), o === void 0 && (o = Re);
694
694
  var i = e.call(this) || this;
695
- return i._bufferSize = t, i._windowTime = n, i._timestampProvider = o, i._buffer = [], i._infiniteTimeWindow = !0, i._infiniteTimeWindow = n === 1 / 0, i._bufferSize = Math.max(1, t), i._windowTime = Math.max(1, n), i;
695
+ return i._bufferSize = r, i._windowTime = n, i._timestampProvider = o, i._buffer = [], i._infiniteTimeWindow = !0, i._infiniteTimeWindow = n === 1 / 0, i._bufferSize = Math.max(1, r), i._windowTime = Math.max(1, n), i;
696
696
  }
697
- return r.prototype.next = function(t) {
697
+ return t.prototype.next = function(r) {
698
698
  var n = this, o = n.isStopped, i = n._buffer, a = n._infiniteTimeWindow, c = n._timestampProvider, s = n._windowTime;
699
- o || (i.push(t), !a && i.push(c.now() + s)), this._trimBuffer(), e.prototype.next.call(this, t);
700
- }, r.prototype._subscribe = function(t) {
699
+ o || (i.push(r), !a && i.push(c.now() + s)), this._trimBuffer(), e.prototype.next.call(this, r);
700
+ }, t.prototype._subscribe = function(r) {
701
701
  this._throwIfClosed(), this._trimBuffer();
702
- for (var n = this._innerSubscribe(t), o = this, i = o._infiniteTimeWindow, a = o._buffer, c = a.slice(), s = 0; s < c.length && !t.closed; s += i ? 1 : 2)
703
- t.next(c[s]);
704
- return this._checkFinalizedStatuses(t), n;
705
- }, r.prototype._trimBuffer = function() {
706
- var t = this, n = t._bufferSize, o = t._timestampProvider, i = t._buffer, a = t._infiniteTimeWindow, c = (a ? 1 : 2) * n;
702
+ for (var n = this._innerSubscribe(r), o = this, i = o._infiniteTimeWindow, a = o._buffer, c = a.slice(), s = 0; s < c.length && !r.closed; s += i ? 1 : 2)
703
+ r.next(c[s]);
704
+ return this._checkFinalizedStatuses(r), n;
705
+ }, t.prototype._trimBuffer = function() {
706
+ var r = this, n = r._bufferSize, o = r._timestampProvider, i = r._buffer, a = r._infiniteTimeWindow, c = (a ? 1 : 2) * n;
707
707
  if (n < 1 / 0 && c < i.length && i.splice(0, i.length - c), !a) {
708
708
  for (var s = o.now(), u = 0, l = 1; l < i.length && i[l] <= s; l += 2)
709
709
  u = l;
710
710
  u && i.splice(0, u + 1);
711
711
  }
712
- }, r;
713
- })(Y), le = (function(e) {
712
+ }, t;
713
+ })(Z), me = (function(e) {
714
714
  return e && typeof e.length == "number" && typeof e != "function";
715
715
  });
716
- function Ee(e) {
716
+ function Ce(e) {
717
717
  return w(e == null ? void 0 : e.then);
718
718
  }
719
- function Oe(e) {
720
- return w(e[ue]);
719
+ function je(e) {
720
+ return w(e[pe]);
721
721
  }
722
- function Ae(e) {
722
+ function Le(e) {
723
723
  return Symbol.asyncIterator && w(e == null ? void 0 : e[Symbol.asyncIterator]);
724
724
  }
725
- function Pe(e) {
725
+ function Ne(e) {
726
726
  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.");
727
727
  }
728
- function ot() {
728
+ function ht() {
729
729
  return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
730
730
  }
731
- var Ie = ot();
732
- function Te(e) {
733
- return w(e == null ? void 0 : e[Ie]);
731
+ var Ue = ht();
732
+ function Fe(e) {
733
+ return w(e == null ? void 0 : e[Ue]);
734
734
  }
735
- function xe(e) {
736
- return ze(this, arguments, function() {
737
- var t, n, o, i;
738
- return we(this, function(a) {
735
+ function ke(e) {
736
+ return Qe(this, arguments, function() {
737
+ var r, n, o, i;
738
+ return Ae(this, function(a) {
739
739
  switch (a.label) {
740
740
  case 0:
741
- t = e.getReader(), a.label = 1;
741
+ r = e.getReader(), a.label = 1;
742
742
  case 1:
743
743
  a.trys.push([1, , 9, 10]), a.label = 2;
744
744
  case 2:
745
- return [4, R(t.read())];
745
+ return [4, U(r.read())];
746
746
  case 3:
747
- return n = a.sent(), o = n.value, i = n.done, i ? [4, R(void 0)] : [3, 5];
747
+ return n = a.sent(), o = n.value, i = n.done, i ? [4, U(void 0)] : [3, 5];
748
748
  case 4:
749
749
  return [2, a.sent()];
750
750
  case 5:
751
- return [4, R(o)];
751
+ return [4, U(o)];
752
752
  case 6:
753
753
  return [4, a.sent()];
754
754
  case 7:
@@ -756,103 +756,103 @@ function xe(e) {
756
756
  case 8:
757
757
  return [3, 10];
758
758
  case 9:
759
- return t.releaseLock(), [7];
759
+ return r.releaseLock(), [7];
760
760
  case 10:
761
761
  return [2];
762
762
  }
763
763
  });
764
764
  });
765
765
  }
766
- function Ce(e) {
766
+ function $e(e) {
767
767
  return w(e == null ? void 0 : e.getReader);
768
768
  }
769
769
  function I(e) {
770
- if (e instanceof _)
770
+ if (e instanceof E)
771
771
  return e;
772
772
  if (e != null) {
773
- if (Oe(e))
774
- return it(e);
775
- if (le(e))
776
- return at(e);
777
- if (Ee(e))
778
- return st(e);
779
- if (Ae(e))
780
- return Re(e);
781
- if (Te(e))
782
- return ut(e);
773
+ if (je(e))
774
+ return pt(e);
775
+ if (me(e))
776
+ return vt(e);
783
777
  if (Ce(e))
784
- return ct(e);
778
+ return mt(e);
779
+ if (Le(e))
780
+ return Me(e);
781
+ if (Fe(e))
782
+ return yt(e);
783
+ if ($e(e))
784
+ return bt(e);
785
785
  }
786
- throw Pe(e);
786
+ throw Ne(e);
787
787
  }
788
- function it(e) {
789
- return new _(function(r) {
790
- var t = e[ue]();
791
- if (w(t.subscribe))
792
- return t.subscribe(r);
788
+ function pt(e) {
789
+ return new E(function(t) {
790
+ var r = e[pe]();
791
+ if (w(r.subscribe))
792
+ return r.subscribe(t);
793
793
  throw new TypeError("Provided object does not correctly implement Symbol.observable");
794
794
  });
795
795
  }
796
- function at(e) {
797
- return new _(function(r) {
798
- for (var t = 0; t < e.length && !r.closed; t++)
799
- r.next(e[t]);
800
- r.complete();
796
+ function vt(e) {
797
+ return new E(function(t) {
798
+ for (var r = 0; r < e.length && !t.closed; r++)
799
+ t.next(e[r]);
800
+ t.complete();
801
801
  });
802
802
  }
803
- function st(e) {
804
- return new _(function(r) {
805
- e.then(function(t) {
806
- r.closed || (r.next(t), r.complete());
807
- }, function(t) {
808
- return r.error(t);
809
- }).then(null, Se);
803
+ function mt(e) {
804
+ return new E(function(t) {
805
+ e.then(function(r) {
806
+ t.closed || (t.next(r), t.complete());
807
+ }, function(r) {
808
+ return t.error(r);
809
+ }).then(null, Te);
810
810
  });
811
811
  }
812
- function ut(e) {
813
- return new _(function(r) {
814
- var t, n;
812
+ function yt(e) {
813
+ return new E(function(t) {
814
+ var r, n;
815
815
  try {
816
- for (var o = j(e), i = o.next(); !i.done; i = o.next()) {
816
+ for (var o = F(e), i = o.next(); !i.done; i = o.next()) {
817
817
  var a = i.value;
818
- if (r.next(a), r.closed)
818
+ if (t.next(a), t.closed)
819
819
  return;
820
820
  }
821
821
  } catch (c) {
822
- t = { error: c };
822
+ r = { error: c };
823
823
  } finally {
824
824
  try {
825
825
  i && !i.done && (n = o.return) && n.call(o);
826
826
  } finally {
827
- if (t) throw t.error;
827
+ if (r) throw r.error;
828
828
  }
829
829
  }
830
- r.complete();
830
+ t.complete();
831
831
  });
832
832
  }
833
- function Re(e) {
834
- return new _(function(r) {
835
- lt(e, r).catch(function(t) {
836
- return r.error(t);
833
+ function Me(e) {
834
+ return new E(function(t) {
835
+ wt(e, t).catch(function(r) {
836
+ return t.error(r);
837
837
  });
838
838
  });
839
839
  }
840
- function ct(e) {
841
- return Re(xe(e));
840
+ function bt(e) {
841
+ return Me(ke(e));
842
842
  }
843
- function lt(e, r) {
844
- var t, n, o, i;
845
- return qe(this, void 0, void 0, function() {
843
+ function wt(e, t) {
844
+ var r, n, o, i;
845
+ return Ze(this, void 0, void 0, function() {
846
846
  var a, c;
847
- return we(this, function(s) {
847
+ return Ae(this, function(s) {
848
848
  switch (s.label) {
849
849
  case 0:
850
- s.trys.push([0, 5, 6, 11]), t = Ge(e), s.label = 1;
850
+ s.trys.push([0, 5, 6, 11]), r = et(e), s.label = 1;
851
851
  case 1:
852
- return [4, t.next()];
852
+ return [4, r.next()];
853
853
  case 2:
854
854
  if (n = s.sent(), !!n.done) return [3, 4];
855
- if (a = n.value, r.next(a), r.closed)
855
+ if (a = n.value, t.next(a), t.closed)
856
856
  return [2];
857
857
  s.label = 3;
858
858
  case 3:
@@ -862,7 +862,7 @@ function lt(e, r) {
862
862
  case 5:
863
863
  return c = s.sent(), o = { error: c }, [3, 11];
864
864
  case 6:
865
- return s.trys.push([6, , 9, 10]), n && !n.done && (i = t.return) ? [4, i.call(t)] : [3, 8];
865
+ return s.trys.push([6, , 9, 10]), n && !n.done && (i = r.return) ? [4, i.call(r)] : [3, 8];
866
866
  case 7:
867
867
  s.sent(), s.label = 8;
868
868
  case 8:
@@ -873,206 +873,206 @@ function lt(e, r) {
873
873
  case 10:
874
874
  return [7];
875
875
  case 11:
876
- return r.complete(), [2];
876
+ return t.complete(), [2];
877
877
  }
878
878
  });
879
879
  });
880
880
  }
881
- function x(e, r, t, n, o) {
881
+ function j(e, t, r, n, o) {
882
882
  n === void 0 && (n = 0), o === void 0 && (o = !1);
883
- var i = r.schedule(function() {
884
- t(), o ? e.add(this.schedule(null, n)) : this.unsubscribe();
883
+ var i = t.schedule(function() {
884
+ r(), o ? e.add(this.schedule(null, n)) : this.unsubscribe();
885
885
  }, n);
886
886
  if (e.add(i), !o)
887
887
  return i;
888
888
  }
889
- function je(e, r) {
890
- return r === void 0 && (r = 0), P(function(t, n) {
891
- t.subscribe(A(n, function(o) {
892
- return x(n, e, function() {
889
+ function De(e, t) {
890
+ return t === void 0 && (t = 0), P(function(r, n) {
891
+ r.subscribe(A(n, function(o) {
892
+ return j(n, e, function() {
893
893
  return n.next(o);
894
- }, r);
894
+ }, t);
895
895
  }, function() {
896
- return x(n, e, function() {
896
+ return j(n, e, function() {
897
897
  return n.complete();
898
- }, r);
898
+ }, t);
899
899
  }, function(o) {
900
- return x(n, e, function() {
900
+ return j(n, e, function() {
901
901
  return n.error(o);
902
- }, r);
902
+ }, t);
903
903
  }));
904
904
  });
905
905
  }
906
- function Ne(e, r) {
907
- return r === void 0 && (r = 0), P(function(t, n) {
906
+ function We(e, t) {
907
+ return t === void 0 && (t = 0), P(function(r, n) {
908
908
  n.add(e.schedule(function() {
909
- return t.subscribe(n);
910
- }, r));
909
+ return r.subscribe(n);
910
+ }, t));
911
911
  });
912
912
  }
913
- function ft(e, r) {
914
- return I(e).pipe(Ne(r), je(r));
913
+ function gt(e, t) {
914
+ return I(e).pipe(We(t), De(t));
915
915
  }
916
- function dt(e, r) {
917
- return I(e).pipe(Ne(r), je(r));
916
+ function St(e, t) {
917
+ return I(e).pipe(We(t), De(t));
918
918
  }
919
- function ht(e, r) {
920
- return new _(function(t) {
919
+ function _t(e, t) {
920
+ return new E(function(r) {
921
921
  var n = 0;
922
- return r.schedule(function() {
923
- n === e.length ? t.complete() : (t.next(e[n++]), t.closed || this.schedule());
922
+ return t.schedule(function() {
923
+ n === e.length ? r.complete() : (r.next(e[n++]), r.closed || this.schedule());
924
924
  });
925
925
  });
926
926
  }
927
- function pt(e, r) {
928
- return new _(function(t) {
927
+ function Et(e, t) {
928
+ return new E(function(r) {
929
929
  var n;
930
- return x(t, r, function() {
931
- n = e[Ie](), x(t, r, function() {
930
+ return j(r, t, function() {
931
+ n = e[Ue](), j(r, t, function() {
932
932
  var o, i, a;
933
933
  try {
934
934
  o = n.next(), i = o.value, a = o.done;
935
935
  } catch (c) {
936
- t.error(c);
936
+ r.error(c);
937
937
  return;
938
938
  }
939
- a ? t.complete() : t.next(i);
939
+ a ? r.complete() : r.next(i);
940
940
  }, 0, !0);
941
941
  }), function() {
942
942
  return w(n == null ? void 0 : n.return) && n.return();
943
943
  };
944
944
  });
945
945
  }
946
- function Ue(e, r) {
946
+ function qe(e, t) {
947
947
  if (!e)
948
948
  throw new Error("Iterable cannot be null");
949
- return new _(function(t) {
950
- x(t, r, function() {
949
+ return new E(function(r) {
950
+ j(r, t, function() {
951
951
  var n = e[Symbol.asyncIterator]();
952
- x(t, r, function() {
952
+ j(r, t, function() {
953
953
  n.next().then(function(o) {
954
- o.done ? t.complete() : t.next(o.value);
954
+ o.done ? r.complete() : r.next(o.value);
955
955
  });
956
956
  }, 0, !0);
957
957
  });
958
958
  });
959
959
  }
960
- function vt(e, r) {
961
- return Ue(xe(e), r);
960
+ function Ot(e, t) {
961
+ return qe(ke(e), t);
962
962
  }
963
- function yt(e, r) {
963
+ function xt(e, t) {
964
964
  if (e != null) {
965
- if (Oe(e))
966
- return ft(e, r);
967
- if (le(e))
968
- return ht(e, r);
969
- if (Ee(e))
970
- return dt(e, r);
971
- if (Ae(e))
972
- return Ue(e, r);
973
- if (Te(e))
974
- return pt(e, r);
965
+ if (je(e))
966
+ return gt(e, t);
967
+ if (me(e))
968
+ return _t(e, t);
975
969
  if (Ce(e))
976
- return vt(e, r);
970
+ return St(e, t);
971
+ if (Le(e))
972
+ return qe(e, t);
973
+ if (Fe(e))
974
+ return Et(e, t);
975
+ if ($e(e))
976
+ return Ot(e, t);
977
977
  }
978
- throw Pe(e);
978
+ throw Ne(e);
979
979
  }
980
- function Le(e, r) {
981
- return r ? yt(e, r) : I(e);
980
+ function Ge(e, t) {
981
+ return t ? xt(e, t) : I(e);
982
982
  }
983
- var mt = ae(function(e) {
983
+ var At = de(function(e) {
984
984
  return function() {
985
985
  e(this), this.name = "EmptyError", this.message = "no elements in sequence";
986
986
  };
987
987
  });
988
- function wt(e, r) {
989
- return new Promise(function(t, n) {
990
- var o = new U({
988
+ function Pt(e, t) {
989
+ return new Promise(function(r, n) {
990
+ var o = new $({
991
991
  next: function(i) {
992
- t(i), o.unsubscribe();
992
+ r(i), o.unsubscribe();
993
993
  },
994
994
  error: n,
995
995
  complete: function() {
996
- n(new mt());
996
+ n(new At());
997
997
  }
998
998
  });
999
999
  e.subscribe(o);
1000
1000
  });
1001
1001
  }
1002
- function fe(e, r) {
1003
- return P(function(t, n) {
1002
+ function ye(e, t) {
1003
+ return P(function(r, n) {
1004
1004
  var o = 0;
1005
- t.subscribe(A(n, function(i) {
1006
- n.next(e.call(r, i, o++));
1005
+ r.subscribe(A(n, function(i) {
1006
+ n.next(e.call(t, i, o++));
1007
1007
  }));
1008
1008
  });
1009
1009
  }
1010
- var bt = Array.isArray;
1011
- function gt(e, r) {
1012
- return bt(r) ? e.apply(void 0, M([], N(r))) : e(r);
1010
+ var It = Array.isArray;
1011
+ function Tt(e, t) {
1012
+ return It(t) ? e.apply(void 0, G([], k(t))) : e(t);
1013
1013
  }
1014
- function St(e) {
1015
- return fe(function(r) {
1016
- return gt(e, r);
1014
+ function Rt(e) {
1015
+ return ye(function(t) {
1016
+ return Tt(e, t);
1017
1017
  });
1018
1018
  }
1019
- function _t(e, r, t, n, o, i, a, c) {
1019
+ function Ct(e, t, r, n, o, i, a, c) {
1020
1020
  var s = [], u = 0, l = 0, f = !1, v = function() {
1021
- f && !s.length && !u && r.complete();
1021
+ f && !s.length && !u && t.complete();
1022
1022
  }, d = function(h) {
1023
1023
  return u < n ? p(h) : s.push(h);
1024
1024
  }, p = function(h) {
1025
1025
  u++;
1026
- var g = !1;
1027
- I(t(h, l++)).subscribe(A(r, function(b) {
1028
- r.next(b);
1026
+ var S = !1;
1027
+ I(r(h, l++)).subscribe(A(t, function(g) {
1028
+ t.next(g);
1029
1029
  }, function() {
1030
- g = !0;
1030
+ S = !0;
1031
1031
  }, void 0, function() {
1032
- if (g)
1032
+ if (S)
1033
1033
  try {
1034
1034
  u--;
1035
- for (var b = function() {
1036
- var y = s.shift();
1037
- a || p(y);
1035
+ for (var g = function() {
1036
+ var m = s.shift();
1037
+ a || p(m);
1038
1038
  }; s.length && u < n; )
1039
- b();
1039
+ g();
1040
1040
  v();
1041
- } catch (y) {
1042
- r.error(y);
1041
+ } catch (m) {
1042
+ t.error(m);
1043
1043
  }
1044
1044
  }));
1045
1045
  };
1046
- return e.subscribe(A(r, d, function() {
1046
+ return e.subscribe(A(t, d, function() {
1047
1047
  f = !0, v();
1048
1048
  })), function() {
1049
1049
  };
1050
1050
  }
1051
- function ke(e, r, t) {
1052
- return t === void 0 && (t = 1 / 0), w(r) ? ke(function(n, o) {
1053
- return fe(function(i, a) {
1054
- return r(n, i, o, a);
1051
+ function Be(e, t, r) {
1052
+ return r === void 0 && (r = 1 / 0), w(t) ? Be(function(n, o) {
1053
+ return ye(function(i, a) {
1054
+ return t(n, i, o, a);
1055
1055
  })(I(e(n, o)));
1056
- }, t) : (typeof r == "number" && (t = r), P(function(n, o) {
1057
- return _t(n, o, e, t);
1056
+ }, r) : (typeof t == "number" && (r = t), P(function(n, o) {
1057
+ return Ct(n, o, e, r);
1058
1058
  }));
1059
1059
  }
1060
- var Et = ["addListener", "removeListener"], Ot = ["addEventListener", "removeEventListener"], At = ["on", "off"];
1061
- function oe(e, r, t, n) {
1062
- if (w(t) && (n = t, t = void 0), n)
1063
- return oe(e, r, t).pipe(St(n));
1064
- var o = N(Tt(e) ? Ot.map(function(c) {
1060
+ var jt = ["addListener", "removeListener"], Lt = ["addEventListener", "removeEventListener"], Nt = ["on", "off"];
1061
+ function ce(e, t, r, n) {
1062
+ if (w(r) && (n = r, r = void 0), n)
1063
+ return ce(e, t, r).pipe(Rt(n));
1064
+ var o = k(kt(e) ? Lt.map(function(c) {
1065
1065
  return function(s) {
1066
- return e[c](r, s, t);
1066
+ return e[c](t, s, r);
1067
1067
  };
1068
- }) : Pt(e) ? Et.map(ye(e, r)) : It(e) ? At.map(ye(e, r)) : [], 2), i = o[0], a = o[1];
1069
- if (!i && le(e))
1070
- return ke(function(c) {
1071
- return oe(c, r, t);
1068
+ }) : Ut(e) ? jt.map(Ee(e, t)) : Ft(e) ? Nt.map(Ee(e, t)) : [], 2), i = o[0], a = o[1];
1069
+ if (!i && me(e))
1070
+ return Be(function(c) {
1071
+ return ce(c, t, r);
1072
1072
  })(I(e));
1073
1073
  if (!i)
1074
1074
  throw new TypeError("Invalid event target");
1075
- return new _(function(c) {
1075
+ return new E(function(c) {
1076
1076
  var s = function() {
1077
1077
  for (var u = [], l = 0; l < arguments.length; l++)
1078
1078
  u[l] = arguments[l];
@@ -1083,101 +1083,101 @@ function oe(e, r, t, n) {
1083
1083
  };
1084
1084
  });
1085
1085
  }
1086
- function ye(e, r) {
1087
- return function(t) {
1086
+ function Ee(e, t) {
1087
+ return function(r) {
1088
1088
  return function(n) {
1089
- return e[t](r, n);
1089
+ return e[r](t, n);
1090
1090
  };
1091
1091
  };
1092
1092
  }
1093
- function Pt(e) {
1093
+ function Ut(e) {
1094
1094
  return w(e.addListener) && w(e.removeListener);
1095
1095
  }
1096
- function It(e) {
1096
+ function Ft(e) {
1097
1097
  return w(e.on) && w(e.off);
1098
1098
  }
1099
- function Tt(e) {
1099
+ function kt(e) {
1100
1100
  return w(e.addEventListener) && w(e.removeEventListener);
1101
1101
  }
1102
- function J(e, r) {
1103
- return P(function(t, n) {
1102
+ function te(e, t) {
1103
+ return P(function(r, n) {
1104
1104
  var o = 0;
1105
- t.subscribe(A(n, function(i) {
1106
- return e.call(r, i, o++) && n.next(i);
1105
+ r.subscribe(A(n, function(i) {
1106
+ return e.call(t, i, o++) && n.next(i);
1107
1107
  }));
1108
1108
  });
1109
1109
  }
1110
- function xt(e, r) {
1111
- return r === void 0 && (r = ce), e = e ?? Ct, P(function(t, n) {
1110
+ function $t(e, t) {
1111
+ return t === void 0 && (t = ve), e = e ?? Mt, P(function(r, n) {
1112
1112
  var o, i = !0;
1113
- t.subscribe(A(n, function(a) {
1114
- var c = r(a);
1113
+ r.subscribe(A(n, function(a) {
1114
+ var c = t(a);
1115
1115
  (i || !e(o, c)) && (i = !1, o = c, n.next(a));
1116
1116
  }));
1117
1117
  });
1118
1118
  }
1119
- function Ct(e, r) {
1120
- return e === r;
1119
+ function Mt(e, t) {
1120
+ return e === t;
1121
1121
  }
1122
- function Rt(e) {
1122
+ function Dt(e) {
1123
1123
  e === void 0 && (e = {});
1124
- var r = e.connector, t = r === void 0 ? function() {
1125
- return new Y();
1126
- } : r, n = e.resetOnError, o = n === void 0 ? !0 : n, i = e.resetOnComplete, a = i === void 0 ? !0 : i, c = e.resetOnRefCountZero, s = c === void 0 ? !0 : c;
1124
+ var t = e.connector, r = t === void 0 ? function() {
1125
+ return new Z();
1126
+ } : t, n = e.resetOnError, o = n === void 0 ? !0 : n, i = e.resetOnComplete, a = i === void 0 ? !0 : i, c = e.resetOnRefCountZero, s = c === void 0 ? !0 : c;
1127
1127
  return function(u) {
1128
- var l, f, v, d = 0, p = !1, h = !1, g = function() {
1128
+ var l, f, v, d = 0, p = !1, h = !1, S = function() {
1129
1129
  f == null || f.unsubscribe(), f = void 0;
1130
- }, b = function() {
1131
- g(), l = v = void 0, p = h = !1;
1132
- }, y = function() {
1133
- var m = l;
1134
- b(), m == null || m.unsubscribe();
1130
+ }, g = function() {
1131
+ S(), l = v = void 0, p = h = !1;
1132
+ }, m = function() {
1133
+ var b = l;
1134
+ g(), b == null || b.unsubscribe();
1135
1135
  };
1136
- return P(function(m, E) {
1137
- d++, !h && !p && g();
1138
- var $ = v = v ?? t();
1139
- E.add(function() {
1140
- d--, d === 0 && !h && !p && (f = Z(y, s));
1141
- }), $.subscribe(E), !l && d > 0 && (l = new U({
1142
- next: function(W) {
1143
- return $.next(W);
1136
+ return P(function(b, O) {
1137
+ d++, !h && !p && S();
1138
+ var B = v = v ?? r();
1139
+ O.add(function() {
1140
+ d--, d === 0 && !h && !p && (f = re(m, s));
1141
+ }), B.subscribe(O), !l && d > 0 && (l = new $({
1142
+ next: function(z) {
1143
+ return B.next(z);
1144
1144
  },
1145
- error: function(W) {
1146
- h = !0, g(), f = Z(b, o, W), $.error(W);
1145
+ error: function(z) {
1146
+ h = !0, S(), f = re(g, o, z), B.error(z);
1147
1147
  },
1148
1148
  complete: function() {
1149
- p = !0, g(), f = Z(b, a), $.complete();
1149
+ p = !0, S(), f = re(g, a), B.complete();
1150
1150
  }
1151
- }), I(m).subscribe(l));
1151
+ }), I(b).subscribe(l));
1152
1152
  })(u);
1153
1153
  };
1154
1154
  }
1155
- function Z(e, r) {
1156
- for (var t = [], n = 2; n < arguments.length; n++)
1157
- t[n - 2] = arguments[n];
1158
- if (r === !0) {
1155
+ function re(e, t) {
1156
+ for (var r = [], n = 2; n < arguments.length; n++)
1157
+ r[n - 2] = arguments[n];
1158
+ if (t === !0) {
1159
1159
  e();
1160
1160
  return;
1161
1161
  }
1162
- if (r !== !1) {
1163
- var o = new U({
1162
+ if (t !== !1) {
1163
+ var o = new $({
1164
1164
  next: function() {
1165
1165
  o.unsubscribe(), e();
1166
1166
  }
1167
1167
  });
1168
- return I(r.apply(void 0, M([], N(t)))).subscribe(o);
1168
+ return I(t.apply(void 0, G([], k(r)))).subscribe(o);
1169
1169
  }
1170
1170
  }
1171
- function Ve(e, r) {
1172
- return P(function(t, n) {
1171
+ function ze(e, t) {
1172
+ return P(function(r, n) {
1173
1173
  var o = null, i = 0, a = !1, c = function() {
1174
1174
  return a && !o && n.complete();
1175
1175
  };
1176
- t.subscribe(A(n, function(s) {
1176
+ r.subscribe(A(n, function(s) {
1177
1177
  o == null || o.unsubscribe();
1178
1178
  var u = 0, l = i++;
1179
1179
  I(e(s, l)).subscribe(o = A(n, function(f) {
1180
- return n.next(r ? r(s, f, l, u++) : f);
1180
+ return n.next(t ? t(s, f, l, u++) : f);
1181
1181
  }, function() {
1182
1182
  o = null, c();
1183
1183
  }));
@@ -1186,8 +1186,8 @@ function Ve(e, r) {
1186
1186
  }));
1187
1187
  });
1188
1188
  }
1189
- function jt(e, r, t) {
1190
- var n = w(e) || r || t ? { next: e, error: r, complete: t } : e;
1189
+ function Wt(e, t, r) {
1190
+ var n = w(e) || t || r ? { next: e, error: t, complete: r } : e;
1191
1191
  return n ? P(function(o, i) {
1192
1192
  var a;
1193
1193
  (a = n.subscribe) === null || a === void 0 || a.call(n);
@@ -1205,47 +1205,47 @@ function jt(e, r, t) {
1205
1205
  var s, u;
1206
1206
  c && ((s = n.unsubscribe) === null || s === void 0 || s.call(n)), (u = n.finalize) === null || u === void 0 || u.call(n);
1207
1207
  }));
1208
- }) : ce;
1208
+ }) : ve;
1209
1209
  }
1210
- const V = me({});
1211
- async function Nt() {
1212
- V.update((e) => (Object.assign(e, window.__MANIFEST__), e));
1210
+ const W = xe({});
1211
+ async function qt() {
1212
+ W.update((e) => (Object.assign(e, window.__MANIFEST__), e));
1213
1213
  }
1214
- const T = /* @__PURE__ */ new Map(), z = 5e3;
1215
- function Ut(e) {
1216
- const r = T.get(e);
1217
- return r ? (T.delete(e), Date.now() - r.createdAt > z ? (r.abortController.abort(), null) : r.response$) : null;
1214
+ const T = /* @__PURE__ */ new Map(), V = 5e3;
1215
+ function Gt(e) {
1216
+ const t = T.get(e);
1217
+ return t ? (T.delete(e), Date.now() - t.createdAt > V ? (t.abortController.abort(), null) : t.response$) : null;
1218
1218
  }
1219
- function Lt(e, r) {
1220
- oe(document, "mouseover").pipe(Rt()).pipe(
1219
+ function Bt(e, t) {
1220
+ ce(document, "mouseover").pipe(Dt()).pipe(
1221
1221
  // Extract <a> element from hover target
1222
- fe((o) => {
1222
+ ye((o) => {
1223
1223
  const i = o.target, a = (i == null ? void 0 : i.tagName) === "A" ? i : i == null ? void 0 : i.closest("A");
1224
1224
  if (!a) return null;
1225
1225
  const c = a.getAttribute("href");
1226
1226
  return !c || !c.startsWith("/") && !c.startsWith(".") ? null : c;
1227
1227
  }),
1228
1228
  // Drop non-link hovers
1229
- J((o) => o !== null),
1229
+ te((o) => o !== null),
1230
1230
  // Drop if same URL as current page
1231
- J((o) => o !== window.location.pathname),
1231
+ te((o) => o !== window.location.pathname),
1232
1232
  // Deduplicate consecutive hovers to same URL
1233
- xt(),
1233
+ $t(),
1234
1234
  // Check that route requires server data
1235
- J((o) => {
1235
+ te((o) => {
1236
1236
  const i = o.split("?")[0], a = "get", c = e.find(
1237
- (l) => l.method.toLowerCase() === a && r.find((f) => f.parser(i) && f.pattern === l.path)
1237
+ (l) => l.method.toLowerCase() === a && t.find((f) => f.parser(i) && f.pattern === l.path)
1238
1238
  );
1239
1239
  if (!c) return !1;
1240
- const s = r.find((l) => l.parser(i) && l.pattern === c.path);
1241
- return !!C(V)[s == null ? void 0 : s.pattern];
1240
+ const s = t.find((l) => l.parser(i) && l.pattern === c.path);
1241
+ return !!N(W)[s == null ? void 0 : s.pattern];
1242
1242
  }),
1243
1243
  // switchMap cancels prior prefetch when hovering a new link
1244
- Ve((o) => {
1244
+ ze((o) => {
1245
1245
  const i = T.get(o);
1246
- if (i && Date.now() - i.createdAt < z)
1246
+ if (i && Date.now() - i.createdAt < V)
1247
1247
  return [];
1248
- const a = new AbortController(), c = new nt(1), s = {
1248
+ const a = new AbortController(), c = new dt(1), s = {
1249
1249
  response$: c,
1250
1250
  createdAt: Date.now(),
1251
1251
  abortController: a
@@ -1259,13 +1259,13 @@ function Lt(e, r) {
1259
1259
  },
1260
1260
  signal: a.signal
1261
1261
  };
1262
- return u[K] = !0, Le(
1262
+ return u[Q] = !0, Ge(
1263
1263
  fetch(o, u).then(
1264
1264
  (l) => (c.next(l), c.complete(), o),
1265
1265
  (l) => (c.error(l), T.delete(o), null)
1266
1266
  )
1267
1267
  ).pipe(
1268
- jt({
1268
+ Wt({
1269
1269
  unsubscribe: () => {
1270
1270
  a.abort(), T.delete(o);
1271
1271
  }
@@ -1275,56 +1275,250 @@ function Lt(e, r) {
1275
1275
  ).subscribe(), setInterval(() => {
1276
1276
  const o = Date.now();
1277
1277
  for (const [i, a] of T)
1278
- o - a.createdAt > z && (a.abortController.abort(), T.delete(i));
1279
- }, z);
1278
+ o - a.createdAt > V && (a.abortController.abort(), T.delete(i));
1279
+ }, V);
1280
+ }
1281
+ var C = /* @__PURE__ */ ((e) => (e[e.TRACE = 0] = "TRACE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.FATAL = 5] = "FATAL", e))(C || {});
1282
+ const zt = {
1283
+ trace: 0,
1284
+ debug: 1,
1285
+ info: 2,
1286
+ warn: 3,
1287
+ error: 4,
1288
+ fatal: 5
1289
+ /* FATAL */
1290
+ };
1291
+ function Yt(e) {
1292
+ if (!e) return 2;
1293
+ const t = e.trim().toLowerCase(), r = zt[t];
1294
+ if (typeof r == "number") return r;
1295
+ const n = Number(t);
1296
+ return Number.isFinite(n) && n >= 0 && n <= 5 ? n : 2;
1297
+ }
1298
+ function Ye(e) {
1299
+ switch (e) {
1300
+ case 0:
1301
+ return "TRACE";
1302
+ case 1:
1303
+ return "DEBUG";
1304
+ case 2:
1305
+ return "INFO";
1306
+ case 3:
1307
+ return "WARN";
1308
+ case 4:
1309
+ return "ERROR";
1310
+ case 5:
1311
+ return "FATAL";
1312
+ default:
1313
+ return "INFO";
1314
+ }
1280
1315
  }
1281
- const kt = 1e4;
1282
- function Vt(e, r, t) {
1316
+ function Oe(e) {
1317
+ if (e === void 0) return "undefined";
1318
+ if (e === null) return null;
1319
+ if (e instanceof Error)
1320
+ return { name: e.name, message: e.message, stack: e.stack };
1321
+ switch (typeof e) {
1322
+ case "string":
1323
+ case "number":
1324
+ case "boolean":
1325
+ return e;
1326
+ case "bigint":
1327
+ return e.toString();
1328
+ case "symbol":
1329
+ return String(e);
1330
+ case "function":
1331
+ return `[Function${e.name ? `: ${e.name}` : ""}]`;
1332
+ default:
1333
+ return e;
1334
+ }
1335
+ }
1336
+ class Ht {
1337
+ constructor(t, r, n) {
1338
+ this.name = t, this.manager = r, this.contextData = n;
1339
+ }
1340
+ /**
1341
+ * Creates a new logger with the specified name.
1342
+ * Replaces the current logger's name (not hierarchical).
1343
+ */
1344
+ named(t) {
1345
+ return new le(t, this.manager, this.contextData);
1346
+ }
1347
+ /**
1348
+ * Creates a new logger with additional context.
1349
+ * Context is merged into every log entry's context field.
1350
+ * If this logger already has context, both contexts are merged.
1351
+ * Returns a new logger instance (immutable operation).
1352
+ */
1353
+ withContext(t) {
1354
+ const r = this.contextData ? { ...this.contextData, ...t } : t;
1355
+ return new le(this.name, this.manager, r);
1356
+ }
1357
+ trace(t, ...r) {
1358
+ this.log(C.TRACE, t, r);
1359
+ }
1360
+ debug(t, ...r) {
1361
+ this.log(C.DEBUG, t, r);
1362
+ }
1363
+ info(t, ...r) {
1364
+ this.log(C.INFO, t, r);
1365
+ }
1366
+ warn(t, ...r) {
1367
+ this.log(C.WARN, t, r);
1368
+ }
1369
+ error(t, ...r) {
1370
+ this.log(C.ERROR, t, r);
1371
+ }
1372
+ fatal(t, ...r) {
1373
+ this.log(C.FATAL, t, r);
1374
+ }
1375
+ log(t, r, n) {
1376
+ if (!this.manager.shouldLog(t, this.name)) return;
1377
+ const o = (/* @__PURE__ */ new Date()).toISOString();
1378
+ let i = n.length > 0 ? n.length === 1 ? Oe(n[0]) : n.map(Oe) : void 0, a;
1379
+ this.contextData && i !== void 0 ? a = { ...this.contextData, args: i } : this.contextData ? a = this.contextData : a = i, this.manager.log({
1380
+ timestamp: o,
1381
+ level: Ye(t),
1382
+ logger: this.name,
1383
+ message: r,
1384
+ context: a
1385
+ });
1386
+ }
1387
+ }
1388
+ class le extends Ht {
1389
+ constructor(t, r, n) {
1390
+ super(t, r, n);
1391
+ }
1392
+ }
1393
+ class Vt {
1394
+ log(t) {
1395
+ const r = t.context !== void 0 ? ` ${JSON.stringify(t.context)}` : "", n = `[${t.timestamp}] [${t.logger}] [${t.level}] ${t.message}${r}`;
1396
+ switch (t.level) {
1397
+ case "ERROR":
1398
+ case "FATAL":
1399
+ console.error(n);
1400
+ break;
1401
+ case "WARN":
1402
+ console.warn(n);
1403
+ break;
1404
+ default:
1405
+ console.log(n);
1406
+ break;
1407
+ }
1408
+ }
1409
+ }
1410
+ const ne = /* @__PURE__ */ Symbol.for("@noego/logger");
1411
+ class Kt {
1412
+ constructor() {
1413
+ var o, i, a;
1414
+ this.transports = [], this.loggerLevels = /* @__PURE__ */ new Map();
1415
+ const t = typeof process < "u" ? (o = process.env) == null ? void 0 : o.LOG_LEVEL : void 0, r = typeof process < "u" ? (i = process.env) == null ? void 0 : i.SERVICE_NAME : void 0, n = typeof process < "u" ? (a = process.env) == null ? void 0 : a.NODE_ENV : void 0;
1416
+ this.level = Yt(t), this.service = r ?? "noego", this.environment = n ?? "development";
1417
+ }
1418
+ getLevel() {
1419
+ return this.level;
1420
+ }
1421
+ setLevel(t) {
1422
+ this.level = t;
1423
+ }
1424
+ setLoggerLevel(t, r) {
1425
+ this.loggerLevels.set(t, r);
1426
+ }
1427
+ shouldLog(t, r) {
1428
+ if (r) {
1429
+ const n = this.loggerLevels.get(r);
1430
+ if (n !== void 0)
1431
+ return t >= n;
1432
+ }
1433
+ return t >= this.level;
1434
+ }
1435
+ addTransport(t) {
1436
+ this.transports.push(t);
1437
+ }
1438
+ setTransports(t) {
1439
+ this.transports = [...t];
1440
+ }
1441
+ clearTransports() {
1442
+ this.transports = [];
1443
+ }
1444
+ setServiceName(t) {
1445
+ this.service = t;
1446
+ }
1447
+ log(t) {
1448
+ const r = {
1449
+ ...t,
1450
+ environment: this.environment,
1451
+ service: this.service
1452
+ };
1453
+ for (const n of this.transports)
1454
+ n.log(r);
1455
+ }
1456
+ async closeAll() {
1457
+ for (const t of this.transports)
1458
+ t.close && await t.close();
1459
+ }
1460
+ formatMessage(t, r, n) {
1461
+ return `[${(/* @__PURE__ */ new Date()).toISOString()}] [${r}] [${Ye(t)}] ${n}`;
1462
+ }
1463
+ }
1464
+ function Jt() {
1465
+ const e = globalThis;
1466
+ if (!e[ne]) {
1467
+ const t = new Kt();
1468
+ t.addTransport(new Vt()), e[ne] = t;
1469
+ }
1470
+ return e[ne];
1471
+ }
1472
+ function be(e) {
1473
+ return new le(e, Jt());
1474
+ }
1475
+ const y = be("forge:nav"), Xt = 1e4;
1476
+ function Zt(e, t, r) {
1283
1477
  let n = null, o = !1;
1284
1478
  const i = new Promise((a, c) => {
1285
1479
  n = setTimeout(
1286
1480
  () => {
1287
- o = !0, console.error("[TIMEOUT] Timeout fired after", r, "ms"), t(), c(new Error(`Navigation timed out after ${r}ms`));
1481
+ o = !0, y.error("Timeout fired after", t, "ms"), r(), c(new Error(`Navigation timed out after ${t}ms`));
1288
1482
  },
1289
- r
1290
- ), console.log("[TIMEOUT] Timeout scheduled for", r, "ms, timeoutId:", n);
1483
+ t
1484
+ ), y.debug("Timeout scheduled for", t, "ms, timeoutId:", n);
1291
1485
  });
1292
1486
  return Promise.race([
1293
1487
  e.finally(() => {
1294
- n !== null && (o ? console.warn("[TIMEOUT] Promise settled AFTER timeout already fired") : (console.log("[TIMEOUT] Clearing timeout", n, "- promise settled successfully"), clearTimeout(n)));
1488
+ n !== null && (o ? y.warn("Promise settled AFTER timeout already fired") : (y.debug("Clearing timeout", n, "- promise settled successfully"), clearTimeout(n)));
1295
1489
  }),
1296
1490
  i
1297
1491
  ]);
1298
1492
  }
1299
- const ie = new Y();
1300
- let S = 0, F = null;
1301
- function Ft(e) {
1302
- e && e.redirectPath && (console.log("[NAV] Handling redirect to", e.redirectPath), setTimeout(
1493
+ const fe = new Z();
1494
+ let _ = 0, q = null;
1495
+ function Qt(e) {
1496
+ e && e.redirectPath && (y.debug("Handling redirect to", e.redirectPath), setTimeout(
1303
1497
  () => {
1304
1498
  window.dispatchEvent(new CustomEvent("forge-redirect", { detail: { path: e.redirectPath } }));
1305
1499
  },
1306
1500
  0
1307
1501
  ));
1308
1502
  }
1309
- ie.pipe(Ve((e) => Le(Vt(Dt(e), kt, () => {
1310
- console.error("[NAV] Navigation timed out"), S++, F && (F.abort(), F = null);
1311
- }).catch((r) => {
1312
- console.error("[NAV] Navigation failed:", r);
1503
+ fe.pipe(ze((e) => Ge(Zt(nr(e), Xt, () => {
1504
+ y.error("Navigation timed out"), _++, q && (q.abort(), q = null);
1505
+ }).catch((t) => {
1506
+ y.error("Navigation failed:", t);
1313
1507
  })))).subscribe({
1314
- next: Ft,
1508
+ next: Qt,
1315
1509
  error: (e) => {
1316
- console.error("[NAV] Stream error:", e);
1510
+ y.error("Stream error:", e);
1317
1511
  }
1318
1512
  });
1319
- function Mt(e) {
1320
- var r;
1321
- console.log("[NAV STREAM] Pushing navigation event to stream", {
1513
+ function er(e) {
1514
+ var t;
1515
+ y.debug("Pushing navigation event to stream", {
1322
1516
  url: e.url,
1323
- currentNavigationId: S,
1324
- subscriberCount: ((r = ie.observers) == null ? void 0 : r.length) || 0
1325
- }), ie.next(e);
1517
+ currentNavigationId: _,
1518
+ subscriberCount: ((t = fe.observers) == null ? void 0 : t.length) || 0
1519
+ }), fe.next(e);
1326
1520
  }
1327
- const O = me({
1521
+ const x = xe({
1328
1522
  active: {
1329
1523
  layouts: [],
1330
1524
  view: null,
@@ -1337,22 +1531,22 @@ const O = me({
1337
1531
  },
1338
1532
  phase: "idle",
1339
1533
  navigationId: 0,
1340
- page: k
1341
- }), $t = async () => {
1342
- const e = C(O).navigationId;
1534
+ page: D
1535
+ }), tr = async () => {
1536
+ const e = N(x).navigationId;
1343
1537
  try {
1344
- const r = window.location.pathname + window.location.search, t = {
1538
+ const t = window.location.pathname + window.location.search, r = {
1345
1539
  method: "GET",
1346
1540
  headers: {
1347
1541
  "Content-Type": "application/json",
1348
1542
  Accept: "application/json"
1349
1543
  }
1350
1544
  };
1351
- t[K] = !0;
1352
- const n = await fetch(r, t);
1545
+ r[Q] = !0;
1546
+ const n = await fetch(t, r);
1353
1547
  if (!n.ok) return !1;
1354
- const o = await n.json(), i = C(O).navigationId;
1355
- return e !== i ? (console.log("[NAV POLL] Discarding stale poll response", { pollNavigationId: e, currentNavigationId: i }), !1) : (O.update((a) => {
1548
+ const o = await n.json(), i = N(x).navigationId;
1549
+ return e !== i ? (y.debug("Discarding stale poll response", { pollNavigationId: e, currentNavigationId: i }), !1) : (x.update((a) => {
1356
1550
  var c;
1357
1551
  return a.active.data = { layout: ((c = a.active.data) == null ? void 0 : c.layout) || [], view: o.view }, a;
1358
1552
  }), !0);
@@ -1360,18 +1554,18 @@ const O = me({
1360
1554
  return !1;
1361
1555
  }
1362
1556
  };
1363
- k.update((e) => (e.poll = $t, e));
1364
- function H(...e) {
1365
- let r = e.map((t, n) => n === 0 ? t.replace(/\/+$/, "") : t.replace(/^\/+|\/+$/g, "")).join("/");
1366
- return r.startsWith("/") || (r = "/" + r), r.split("?")[0];
1557
+ D.update((e) => (e.poll = tr, e));
1558
+ function J(...e) {
1559
+ let t = e.map((r, n) => n === 0 ? r.replace(/\/+$/, "") : r.replace(/^\/+|\/+$/g, "")).join("/");
1560
+ return t.startsWith("/") || (t = "/" + t), t.split("?")[0];
1367
1561
  }
1368
- async function Wt(e, r, t, n, o, i) {
1562
+ async function rr(e, t, r, n, o, i) {
1369
1563
  try {
1370
- const a = typeof r == "string" && r.indexOf("assets") !== -1, c = (t.layout || []).map((d) => {
1371
- let p = H(r, d).toString();
1564
+ const a = typeof t == "string" && t.indexOf("assets") !== -1, c = (r.layout || []).map((d) => {
1565
+ let p = J(t, d).toString();
1372
1566
  return a && (p = p.endsWith(".svelte") ? p.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(p) ? p : p + ".js"), p;
1373
1567
  });
1374
- let s = H(r, t.view).toString();
1568
+ let s = J(t, r.view).toString();
1375
1569
  a && (s = s.endsWith(".svelte") ? s.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(s) ? s : s + ".js");
1376
1570
  const u = await Promise.all(c.map((d) => import(
1377
1571
  /* @vite-ignore */
@@ -1384,25 +1578,25 @@ async function Wt(e, r, t, n, o, i) {
1384
1578
  ).then((d) => d.default), f = window.__INITIAL_DATA__ || { layout: [], view: {} }, v = {
1385
1579
  layouts: u,
1386
1580
  view: l,
1387
- viewPath: t.view || null,
1581
+ viewPath: r.view || null,
1388
1582
  // Store original path for debugging
1389
- layoutPaths: t.layout || [],
1583
+ layoutPaths: r.layout || [],
1390
1584
  // Store original paths for debugging
1391
1585
  data: f,
1392
1586
  params: n,
1393
1587
  urlParams: o,
1394
1588
  query: i
1395
1589
  };
1396
- O.update((d) => (d.active = v, d.phase = "idle", d)), Me($e, { target: e, props: { root: O } });
1590
+ x.update((d) => (d.active = v, d.phase = "idle", d)), Ve(Ke, { target: e, props: { root: x } });
1397
1591
  } catch (a) {
1398
- console.error("Client-side route loading failed:", a);
1592
+ y.error("Client-side route loading failed:", a);
1399
1593
  }
1400
1594
  }
1401
- function Q(e, r, t, n, o, i, a = !1, c = !0) {
1402
- Mt({
1595
+ function oe(e, t, r, n, o, i, a = !1, c = !0) {
1596
+ er({
1403
1597
  url: e,
1404
- base_path: r,
1405
- route: t,
1598
+ base_path: t,
1599
+ route: r,
1406
1600
  params: n,
1407
1601
  urlParams: o,
1408
1602
  query: i,
@@ -1410,39 +1604,39 @@ function Q(e, r, t, n, o, i, a = !1, c = !0) {
1410
1604
  updateUrl: c
1411
1605
  });
1412
1606
  }
1413
- async function Dt(e) {
1607
+ async function nr(e) {
1414
1608
  const {
1415
- url: r,
1416
- base_path: t,
1609
+ url: t,
1610
+ base_path: r,
1417
1611
  route: n,
1418
1612
  params: o,
1419
1613
  urlParams: i,
1420
1614
  query: a,
1421
1615
  server_loading: c,
1422
1616
  updateUrl: s
1423
- } = e, u = ++S, l = new AbortController();
1424
- F = l, console.log("[NAV] Starting navigation", {
1617
+ } = e, u = ++_, l = new AbortController();
1618
+ q = l, y.debug("Starting navigation", {
1425
1619
  navigationId: u,
1426
- url: r,
1620
+ url: t,
1427
1621
  updateUrl: s,
1428
1622
  server_loading: c,
1429
- currentNavigationId: S,
1430
- hasAbortController: !!F
1431
- }), O.update((f) => (f.phase = "loading", f.navigationId = u, f));
1623
+ currentNavigationId: _,
1624
+ hasAbortController: !!q
1625
+ }), x.update((f) => (f.phase = "loading", f.navigationId = u, f));
1432
1626
  try {
1433
1627
  let f = { layout: [], view: {} };
1434
1628
  if (c) {
1435
- console.log("[NAV] Fetching server data", { navigationId: u, url: r });
1436
- let y = null;
1437
- const m = Ut(r);
1438
- if (m)
1629
+ y.debug("Fetching server data", { navigationId: u, url: t });
1630
+ let m = null;
1631
+ const b = Gt(t);
1632
+ if (b)
1439
1633
  try {
1440
- console.log("[NAV] Using prefetched response for", r), y = await wt(m);
1634
+ y.debug("Using prefetched response for", t), m = await Pt(b);
1441
1635
  } catch {
1442
- console.log("[NAV] Prefetch failed, falling back to fetch", r), y = null;
1636
+ y.debug("Prefetch failed, falling back to fetch", t), m = null;
1443
1637
  }
1444
- if (!y) {
1445
- const E = {
1638
+ if (!m) {
1639
+ const O = {
1446
1640
  method: n.method,
1447
1641
  headers: {
1448
1642
  "Content-Type": "application/json",
@@ -1450,53 +1644,53 @@ async function Dt(e) {
1450
1644
  },
1451
1645
  signal: l.signal
1452
1646
  };
1453
- E[K] = !0, y = await fetch(r, E);
1647
+ O[Q] = !0, m = await fetch(t, O);
1454
1648
  }
1455
- if (console.log("[NAV] Fetch response received", {
1649
+ if (y.debug("Fetch response received", {
1456
1650
  navigationId: u,
1457
- url: r,
1458
- ok: y.ok,
1459
- status: y.status,
1460
- redirected: y.redirected,
1461
- currentNavigationId: S
1462
- }), y.redirected || y.headers.get("X-Forge-Redirect") === "true")
1463
- return console.log("[NAV] Redirect detected"), O.update((E) => (E.phase = "idle", E)), {
1464
- redirectPath: y.headers.get("X-Forge-Redirect-Path") || void 0
1651
+ url: t,
1652
+ ok: m.ok,
1653
+ status: m.status,
1654
+ redirected: m.redirected,
1655
+ currentNavigationId: _
1656
+ }), m.redirected || m.headers.get("X-Forge-Redirect") === "true")
1657
+ return y.debug("Redirect detected"), x.update((O) => (O.phase = "idle", O)), {
1658
+ redirectPath: m.headers.get("X-Forge-Redirect-Path") || void 0
1465
1659
  };
1466
- if (!y.ok)
1467
- throw new Error(`Network response was not ok: ${y.status}`);
1468
- f = await y.json(), console.log("[NAV] Server data received:", f);
1660
+ if (!m.ok)
1661
+ throw new Error(`Network response was not ok: ${m.status}`);
1662
+ f = await m.json(), y.debug("Server data received:", f);
1469
1663
  }
1470
- if (u !== S) {
1471
- console.log("[NAV] Stale navigation after fetch, aborting", { navigationId: u, currentNavigationId: S });
1664
+ if (u !== _) {
1665
+ y.debug("Stale navigation after fetch, aborting", { navigationId: u, currentNavigationId: _ });
1472
1666
  return;
1473
1667
  }
1474
- console.log("[NAV] Loading components", { navigationId: u, view: n.view, layouts: n.layout });
1475
- const v = typeof t == "string" && t.indexOf("assets") !== -1, d = (n.layout || []).map((y) => {
1476
- let m = H(t, y).toString();
1477
- return v && (m = m.endsWith(".svelte") ? m.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(m) ? m : m + ".js"), m;
1668
+ y.debug("Loading components", { navigationId: u, view: n.view, layouts: n.layout });
1669
+ const v = typeof r == "string" && r.indexOf("assets") !== -1, d = (n.layout || []).map((m) => {
1670
+ let b = J(r, m).toString();
1671
+ return v && (b = b.endsWith(".svelte") ? b.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(b) ? b : b + ".js"), b;
1478
1672
  });
1479
- let p = H(t, n.view).toString();
1673
+ let p = J(r, n.view).toString();
1480
1674
  v && (p = p.endsWith(".svelte") ? p.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(p) ? p : p + ".js"), p.startsWith("/") || (p = "/" + p);
1481
- const h = await Promise.all(d.map((y) => import(
1675
+ const h = await Promise.all(d.map((m) => import(
1482
1676
  /* @vite-ignore */
1483
- y
1484
- ).then((m) => m.default))), g = await import(
1677
+ m
1678
+ ).then((b) => b.default))), S = await import(
1485
1679
  /* @vite-ignore */
1486
1680
  p
1487
- ).then((y) => y.default);
1488
- if (console.log("[NAV] Components loaded", {
1681
+ ).then((m) => m.default);
1682
+ if (y.debug("Components loaded", {
1489
1683
  navigationId: u,
1490
- currentNavigationId: S,
1684
+ currentNavigationId: _,
1491
1685
  layoutsCount: h.length,
1492
- viewLoaded: !!g
1493
- }), u !== S) {
1494
- console.log("[NAV] Stale navigation after component load, aborting", { navigationId: u, currentNavigationId: S });
1686
+ viewLoaded: !!S
1687
+ }), u !== _) {
1688
+ y.debug("Stale navigation after component load, aborting", { navigationId: u, currentNavigationId: _ });
1495
1689
  return;
1496
1690
  }
1497
- const b = {
1691
+ const g = {
1498
1692
  layouts: h,
1499
- view: g,
1693
+ view: S,
1500
1694
  viewPath: n.view || null,
1501
1695
  // Store original path for debugging
1502
1696
  layoutPaths: n.layout || [],
@@ -1506,35 +1700,36 @@ async function Dt(e) {
1506
1700
  urlParams: i,
1507
1701
  query: a
1508
1702
  };
1509
- console.log("[NAV] Committing new state", {
1703
+ y.debug("Committing new state", {
1510
1704
  navigationId: u,
1511
- currentNavigationId: S,
1512
- layoutsCount: b.layouts.length,
1513
- viewSet: !!b.view,
1514
- dataKeys: Object.keys(b.data || {})
1515
- }), O.update((y) => (y.active = b, y.phase = "idle", console.log("[NAV] ROOT.active updated", {
1705
+ currentNavigationId: _,
1706
+ layoutsCount: g.layouts.length,
1707
+ viewSet: !!g.view,
1708
+ dataKeys: Object.keys(g.data || {})
1709
+ }), x.update((m) => (m.active = g, m.phase = "idle", y.debug("ROOT.active updated", {
1516
1710
  navigationId: u,
1517
- layoutsCount: y.active.layouts.length,
1518
- viewSet: !!y.active.view,
1519
- dataKeys: Object.keys(y.active.data || {}),
1520
- paramsKeys: Object.keys(y.active.params || {})
1521
- }), y)), typeof window < "u" && window.scroll(0, 0), s && (console.log("[NAV] Updating browser URL", { url: r }), window.history.pushState({}, "", r)), console.log("[NAV] Navigation complete", { navigationId: u, url: r });
1711
+ layoutsCount: m.active.layouts.length,
1712
+ viewSet: !!m.active.view,
1713
+ dataKeys: Object.keys(m.active.data || {}),
1714
+ paramsKeys: Object.keys(m.active.params || {})
1715
+ }), m)), typeof window < "u" && window.scroll(0, 0), s && (y.debug("Updating browser URL", { url: t }), window.history.pushState({}, "", t)), y.debug("Navigation complete", { navigationId: u, url: t });
1522
1716
  } catch (f) {
1523
- if (console.error("[NAV] Navigation failed", {
1717
+ if (y.error("Navigation failed", {
1524
1718
  navigationId: u,
1525
- currentNavigationId: S,
1526
- url: r,
1719
+ currentNavigationId: _,
1720
+ url: t,
1527
1721
  error: f instanceof Error ? f.message : String(f)
1528
- }), O.update((v) => (v.phase = "idle", v)), f.name === "AbortError") {
1529
- console.log("[NAV] Navigation aborted");
1722
+ }), x.update((v) => (v.phase = "idle", v)), f.name === "AbortError") {
1723
+ y.debug("Navigation aborted");
1530
1724
  return;
1531
1725
  }
1532
1726
  throw f;
1533
1727
  }
1534
1728
  }
1535
- function qt(e, r, t) {
1729
+ const R = be("forge:events");
1730
+ function or(e, t, r) {
1536
1731
  if (!document) {
1537
- console.error("Document not found");
1732
+ R.error("Document not found");
1538
1733
  return;
1539
1734
  }
1540
1735
  document.addEventListener("click", (n) => {
@@ -1547,52 +1742,52 @@ function qt(e, r, t) {
1547
1742
  return;
1548
1743
  }
1549
1744
  if (s && s.startsWith("/") || s.startsWith(".")) {
1550
- const u = s.split("?")[0], l = i.getAttribute("method") || "get", f = r.find((v) => v.method.toLowerCase() === l && t.find((d) => d.parser(u) && d.pattern === v.path));
1745
+ const u = s.split("?")[0], l = i.getAttribute("method") || "get", f = t.find((v) => v.method.toLowerCase() === l && r.find((d) => d.parser(u) && d.pattern === v.path));
1551
1746
  if (f) {
1552
1747
  n.preventDefault();
1553
- const v = t.find((m) => m.parser(u) && m.pattern === f.path), d = (v == null ? void 0 : v.parser(u)) || {}, p = new URLSearchParams(s.split("?")[1] || ""), h = Object.fromEntries(p.entries()) || {}, g = { ...d, ...h }, y = C(V)[v == null ? void 0 : v.pattern];
1554
- k.update((m) => (m.url = s, m.pathname = u, m.params = d, m.query = h, m)), console.log("[EVENTS] Click navigation to", s), Q(s, e, f, g, d, h, y, !0);
1748
+ const v = r.find((b) => b.parser(u) && b.pattern === f.path), d = (v == null ? void 0 : v.parser(u)) || {}, p = new URLSearchParams(s.split("?")[1] || ""), h = Object.fromEntries(p.entries()) || {}, S = { ...d, ...h }, m = N(W)[v == null ? void 0 : v.pattern];
1749
+ D.update((b) => (b.url = s, b.pathname = u, b.params = d, b.query = h, b)), R.debug("Click navigation to", s), oe(s, e, f, S, d, h, m, !0);
1555
1750
  } else
1556
- console.log("No matching route found for URL:", s, "- using fallback navigation");
1751
+ R.warn("No matching route found", s, "- using fallback navigation");
1557
1752
  }
1558
1753
  }
1559
1754
  }), window.addEventListener("popstate", (n) => {
1560
- const o = window.location.pathname, i = window.location.pathname + window.location.search, a = "get", c = r.find((s) => s.method.toLowerCase() === a && t.find((u) => u.parser(o) && u.pattern === s.path));
1755
+ const o = window.location.pathname, i = window.location.pathname + window.location.search, a = "get", c = t.find((s) => s.method.toLowerCase() === a && r.find((u) => u.parser(o) && u.pattern === s.path));
1561
1756
  if (c) {
1562
- const s = t.find((h) => h.parser(o) && h.pattern === c.path), u = (s == null ? void 0 : s.parser(o)) || {}, l = new URLSearchParams(window.location.search), f = Object.fromEntries(l.entries()) || {};
1563
- k.update((h) => (h.url = i, h.pathname = window.location.pathname, h.params = u, h.query = f, h));
1564
- const v = { ...u, ...f }, p = C(V)[s == null ? void 0 : s.pattern];
1565
- console.log("[EVENTS] Popstate navigation to", i), Q(i, e, c, v, u, f, p, !1);
1757
+ const s = r.find((h) => h.parser(o) && h.pattern === c.path), u = (s == null ? void 0 : s.parser(o)) || {}, l = new URLSearchParams(window.location.search), f = Object.fromEntries(l.entries()) || {};
1758
+ D.update((h) => (h.url = i, h.pathname = window.location.pathname, h.params = u, h.query = f, h));
1759
+ const v = { ...u, ...f }, p = N(W)[s == null ? void 0 : s.pattern];
1760
+ R.debug("Popstate navigation to", i), oe(i, e, c, v, u, f, p, !1);
1566
1761
  } else
1567
- console.log("No matching route found for popstate navigation to:", o, "- using fallback navigation"), window.location.href = o;
1762
+ R.warn("No matching route found", o, "- using fallback navigation"), window.location.href = o;
1568
1763
  }), window.addEventListener("forge-redirect", ((n) => {
1569
1764
  const o = n.detail.path, i = o.split("?")[0];
1570
- console.log("[EVENTS] Handling forge-redirect to:", o);
1571
- const a = "get", c = r.find((s) => s.method.toLowerCase() === a && t.find((u) => u.parser(i) && u.pattern === s.path));
1765
+ R.debug("Handling forge-redirect to:", o);
1766
+ const a = "get", c = t.find((s) => s.method.toLowerCase() === a && r.find((u) => u.parser(i) && u.pattern === s.path));
1572
1767
  if (c) {
1573
- const s = t.find((h) => h.parser(i) && h.pattern === c.path), u = (s == null ? void 0 : s.parser(i)) || {}, l = new URLSearchParams(o.split("?")[1] || ""), f = Object.fromEntries(l.entries()) || {}, v = { ...u, ...f }, p = C(V)[s == null ? void 0 : s.pattern];
1574
- k.update((h) => (h.url = o, h.pathname = i, h.params = u, h.query = f, h)), Q(o, e, c, v, u, f, p, !0);
1768
+ const s = r.find((h) => h.parser(i) && h.pattern === c.path), u = (s == null ? void 0 : s.parser(i)) || {}, l = new URLSearchParams(o.split("?")[1] || ""), f = Object.fromEntries(l.entries()) || {}, v = { ...u, ...f }, p = N(W)[s == null ? void 0 : s.pattern];
1769
+ D.update((h) => (h.url = o, h.pathname = i, h.params = u, h.query = f, h)), oe(o, e, c, v, u, f, p, !0);
1575
1770
  } else
1576
- console.log("No matching route found for redirect to:", i, "- using fallback navigation"), window.location.href = i;
1577
- })), Lt(r, t);
1771
+ R.warn("No matching route found", i, "- using fallback navigation"), window.location.href = i;
1772
+ })), Bt(t, r);
1578
1773
  }
1579
- const K = Symbol("forge-load-function");
1580
- let G = [], ee = null;
1581
- function zt(e) {
1774
+ const L = be("forge:client"), Q = Symbol("forge-load-function");
1775
+ let K = [], ie = null;
1776
+ function ir(e) {
1582
1777
  try {
1583
- const r = new URL(e, window.location.origin);
1584
- return r.origin === window.location.origin && !r.pathname.startsWith("/api/");
1778
+ const t = new URL(e, window.location.origin);
1779
+ return t.origin === window.location.origin && !t.pathname.startsWith("/api/");
1585
1780
  } catch {
1586
1781
  return !e.startsWith("/api/");
1587
1782
  }
1588
1783
  }
1589
- function Gt() {
1590
- typeof window < "u" && !ee && (ee = window.fetch, window.fetch = async function(e, r = {}) {
1591
- let t = { ...r };
1592
- for (const i of G)
1784
+ function ar() {
1785
+ typeof window < "u" && !ie && (ie = window.fetch, window.fetch = async function(e, t = {}) {
1786
+ let r = { ...t };
1787
+ for (const i of K)
1593
1788
  try {
1594
1789
  if (i.length === 2) {
1595
- const a = new Headers(t.headers), c = Object.fromEntries(a.entries());
1790
+ const a = new Headers(r.headers), c = Object.fromEntries(a.entries());
1596
1791
  await new Promise((s, u) => {
1597
1792
  try {
1598
1793
  i(c, (l) => {
@@ -1602,7 +1797,7 @@ function Gt() {
1602
1797
  const f = new Headers();
1603
1798
  Object.entries(c).forEach(([v, d]) => {
1604
1799
  d !== void 0 && f.set(v, d);
1605
- }), t.headers = f, s();
1800
+ }), r.headers = f, s();
1606
1801
  }
1607
1802
  });
1608
1803
  } catch (l) {
@@ -1610,20 +1805,20 @@ function Gt() {
1610
1805
  }
1611
1806
  });
1612
1807
  } else {
1613
- const a = await i(t, e);
1614
- a && typeof a == "object" && (t = a);
1808
+ const a = await i(r, e);
1809
+ a && typeof a == "object" && (r = a);
1615
1810
  }
1616
1811
  } catch (a) {
1617
- throw console.error("🔴 Middleware error:", a), a;
1812
+ throw L.error("Middleware error", a), a;
1618
1813
  }
1619
- const n = t == null ? void 0 : t[K];
1620
- console.log("[FETCH OVERRIDE] Request", {
1814
+ const n = r == null ? void 0 : r[Q];
1815
+ L.debug("Fetch override request", {
1621
1816
  url: e,
1622
1817
  hasForgeSymbol: n,
1623
- headers: t == null ? void 0 : t.headers
1818
+ headers: r == null ? void 0 : r.headers
1624
1819
  });
1625
- const o = await ee(e, t);
1626
- if (console.log("[FETCH OVERRIDE] Response", {
1820
+ const o = await ie(e, r);
1821
+ if (L.debug("Fetch override response", {
1627
1822
  url: e,
1628
1823
  responseUrl: o.url,
1629
1824
  redirected: o.redirected,
@@ -1632,13 +1827,13 @@ function Gt() {
1632
1827
  hasForgeSymbol: n
1633
1828
  }), n && o.redirected) {
1634
1829
  const i = typeof e == "string" ? e : e.url, a = o.url;
1635
- if (console.log("[FORGE REDIRECT] Detected redirect", {
1830
+ if (L.debug("Redirect detected", {
1636
1831
  requested: i,
1637
1832
  final: a,
1638
1833
  redirected: o.redirected
1639
- }), zt(a)) {
1834
+ }), ir(a)) {
1640
1835
  const c = new URL(a), s = c.pathname + c.search;
1641
- return console.log("[FORGE REDIRECT] Detected redirect to:", s, "- will navigate after current request completes"), new Response(JSON.stringify({ layout: [], view: {} }), {
1836
+ return L.debug("Redirect detected to:", s, "- will navigate after current request completes"), new Response(JSON.stringify({ layout: [], view: {} }), {
1642
1837
  status: 200,
1643
1838
  headers: {
1644
1839
  "Content-Type": "application/json",
@@ -1651,54 +1846,54 @@ function Gt() {
1651
1846
  return o;
1652
1847
  });
1653
1848
  }
1654
- Gt();
1655
- const Jt = {
1849
+ ar();
1850
+ const dr = {
1656
1851
  /**
1657
1852
  * Add middleware to the fetch pipeline
1658
1853
  */
1659
1854
  configUpdate(e) {
1660
1855
  if (typeof e != "function")
1661
1856
  throw new Error("Middleware must be a function");
1662
- G.push(e);
1857
+ K.push(e);
1663
1858
  },
1664
1859
  /**
1665
1860
  * Reset all middleware
1666
1861
  */
1667
1862
  reset() {
1668
- G.length = 0;
1863
+ K.length = 0;
1669
1864
  },
1670
1865
  /**
1671
1866
  * Get current middleware count (for debugging)
1672
1867
  */
1673
1868
  getMiddlewareCount() {
1674
- return G.length;
1869
+ return K.length;
1675
1870
  }
1676
1871
  };
1677
- let te;
1678
- async function Zt(e, r) {
1679
- let t = window.__COMPONENT_DIR__ || r.component_dir;
1680
- if (!t && typeof t != "string")
1872
+ let ae;
1873
+ async function hr(e, t) {
1874
+ let r = window.__COMPONENT_DIR__ || t.component_dir;
1875
+ if (!r && typeof r != "string")
1681
1876
  throw new Error("No component directory provided");
1682
1877
  let n = window.__ROUTING__;
1683
- if (te = De(n), window && window.location) {
1684
- const o = (window.location.pathname || "/").split("?")[0], i = te.find((c) => c.parser(o));
1878
+ if (ae = Xe(n), window && window.location) {
1879
+ const o = (window.location.pathname || "/").split("?")[0], i = ae.find((c) => c.parser(o));
1685
1880
  let a = i ? n.find((c) => c.path === i.pattern) : null;
1686
1881
  if (i && a) {
1687
1882
  const c = i.parser(o) || {}, s = new URLSearchParams(window.location.search), u = Object.fromEntries(s.entries()) || {}, l = { ...c, ...u };
1688
- Nt(), Wt(e, t, a, l, c, u), qt(t, n, te);
1883
+ qt(), rr(e, r, a, l, c, u), or(r, n, ae);
1689
1884
  } else
1690
- console.warn("No matching route found for:", o);
1885
+ L.warn("No matching route", o);
1691
1886
  }
1692
1887
  }
1693
1888
  export {
1694
- V as MANIFEST_STORE,
1695
- qt as bootstrap_events,
1696
- Zt as createApp,
1697
- Jt as fetch,
1698
- Wt as loadRoute,
1699
- k as page,
1700
- tr as shadowUrl,
1701
- Nt as updateManifestStore,
1702
- Q as updateRoute
1889
+ W as MANIFEST_STORE,
1890
+ or as bootstrap_events,
1891
+ hr as createApp,
1892
+ dr as fetch,
1893
+ rr as loadRoute,
1894
+ D as page,
1895
+ mr as shadowUrl,
1896
+ qt as updateManifestStore,
1897
+ oe as updateRoute
1703
1898
  };
1704
1899
  //# sourceMappingURL=client.mjs.map