playlight-sdk 0.1.3 → 0.1.4

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.
@@ -6,7 +6,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
6
6
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
7
7
  var _a, _PlayLightAPI_instances, e_fn, _b, _PlaylightSDK_instances, t_fn, _c;
8
8
  const e = false;
9
- var t = Array.isArray, n = Array.prototype.indexOf, i = Array.from, o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyDescriptors, l = Object.prototype, c = Array.prototype, u = Object.getPrototypeOf;
9
+ var t = Array.isArray, n = Array.prototype.indexOf, o = Array.from, i = Object.defineProperty, s = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyDescriptors, l = Object.prototype, c = Array.prototype, u = Object.getPrototypeOf;
10
10
  function is_function(e2) {
11
11
  return "function" == typeof e2;
12
12
  }
@@ -18,7 +18,7 @@ function run(e2) {
18
18
  function run_all(e2) {
19
19
  for (var t2 = 0; t2 < e2.length; t2++) e2[t2]();
20
20
  }
21
- const d = 32, f = 64, p = 128, _ = 256, v = 512, g = 1024, h = 2048, m = 4096, b = 8192, y = 16384, $ = 65536, w = 1 << 20, x = Symbol("$state"), k = Symbol("legacy props"), C = Symbol("");
21
+ const d = 32, f = 64, p = 128, _ = 256, g = 512, v = 1024, h = 2048, m = 4096, b = 8192, y = 16384, $ = 65536, w = 1 << 20, x = Symbol("$state"), k = Symbol("legacy props"), C = Symbol("");
22
22
  function equals(e2) {
23
23
  return e2 === this.v;
24
24
  }
@@ -33,20 +33,20 @@ const M = Symbol();
33
33
  function lifecycle_outside_component(e2) {
34
34
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
35
35
  }
36
- let T = null;
36
+ let I = null;
37
37
  function set_component_context(e2) {
38
- T = e2;
38
+ I = e2;
39
39
  }
40
40
  function push(e2, t2 = false, n2) {
41
- T = {
42
- p: T,
41
+ I = {
42
+ p: I,
43
43
  c: null,
44
44
  e: null,
45
45
  m: false,
46
46
  s: e2,
47
47
  x: null,
48
48
  l: null
49
- }, S && !t2 && (T.l = {
49
+ }, S && !t2 && (I.l = {
50
50
  s: null,
51
51
  u: null,
52
52
  r1: [],
@@ -54,27 +54,27 @@ function push(e2, t2 = false, n2) {
54
54
  });
55
55
  }
56
56
  function pop(e2) {
57
- const t2 = T;
57
+ const t2 = I;
58
58
  if (null !== t2) {
59
59
  const e3 = t2.e;
60
60
  if (null !== e3) {
61
- var n2 = H, i2 = F;
61
+ var n2 = H, o2 = G;
62
62
  t2.e = null;
63
63
  try {
64
- for (var o2 = 0; o2 < e3.length; o2++) {
65
- var s2 = e3[o2];
64
+ for (var i2 = 0; i2 < e3.length; i2++) {
65
+ var s2 = e3[i2];
66
66
  set_active_effect(s2.effect), set_active_reaction(s2.reaction), effect(s2.fn);
67
67
  }
68
68
  } finally {
69
- set_active_effect(n2), set_active_reaction(i2);
69
+ set_active_effect(n2), set_active_reaction(o2);
70
70
  }
71
71
  }
72
- T = t2.p, t2.m = true;
72
+ I = t2.p, t2.m = true;
73
73
  }
74
74
  return {};
75
75
  }
76
76
  function is_runes() {
77
- return !S || null !== T && null === T.l;
77
+ return !S || null !== I && null === I.l;
78
78
  }
79
79
  function source(e2, t2) {
80
80
  return {
@@ -96,14 +96,14 @@ function mutable_source(e2, t2 = false) {
96
96
  const n2 = source(e2);
97
97
  return t2 || (n2.equals = safe_equals), // bind the signal to the component context, in case we need to
98
98
  // track updates to trigger beforeUpdate/afterUpdate callbacks
99
- S && null !== T && null !== T.l && ((_a2 = T.l).s ?? (_a2.s = [])).push(n2), n2;
99
+ S && null !== I && null !== I.l && ((_a2 = I.l).s ?? (_a2.s = [])).push(n2), n2;
100
100
  }
101
101
  function mutable_state(e2, t2 = false) {
102
102
  return /* @__PURE__ */ push_derived_source(/* @__PURE__ */ mutable_source(e2, t2));
103
103
  }
104
104
  // @__NO_SIDE_EFFECTS__
105
105
  function push_derived_source(e2) {
106
- return null !== F && !G && 2 & F.f && (null === R ? (
106
+ return null !== G && !F && 2 & G.f && (null === R ? (
107
107
  /**
108
108
  * @param {Source[] | null} sources
109
109
  */
@@ -113,7 +113,7 @@ function push_derived_source(e2) {
113
113
  ) : R.push(e2)), e2;
114
114
  }
115
115
  function set(e2, t2) {
116
- return null !== F && !G && is_runes() && 18 & F.f && // If the source was created locally within the current derived, then
116
+ return null !== G && !F && is_runes() && 18 & G.f && // If the source was created locally within the current derived, then
117
117
  // we allow the mutation.
118
118
  (null === R || !R.includes(e2)) && /**
119
119
  * Updating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`
@@ -128,7 +128,7 @@ function internal_set(e2, t2) {
128
128
  // whilst it's actively running. So in the case of ensuring it registers the reaction
129
129
  // properly for itself, we need to ensure the current effect actually gets
130
130
  // scheduled. i.e: `$effect(() => x++)`
131
- is_runes() && null !== H && H.f & g && !(96 & H.f) && (null === U ? (
131
+ is_runes() && null !== H && H.f & v && !(96 & H.f) && (null === U ? (
132
132
  /** @param {null | Source[]} value */
133
133
  function set_untracked_writes(e3) {
134
134
  U = e3;
@@ -136,15 +136,15 @@ function internal_set(e2, t2) {
136
136
  ) : U.push(e2))), t2;
137
137
  }
138
138
  function update(e2, t2 = 1) {
139
- var n2 = get$1(e2), i2 = 1 === t2 ? n2++ : n2--;
140
- return set(e2, n2), i2;
139
+ var n2 = get$1(e2), o2 = 1 === t2 ? n2++ : n2--;
140
+ return set(e2, n2), o2;
141
141
  }
142
142
  function mark_reactions(e2, t2) {
143
143
  var n2 = e2.reactions;
144
- if (null !== n2) for (var i2 = is_runes(), o2 = n2.length, s2 = 0; s2 < o2; s2++) {
144
+ if (null !== n2) for (var o2 = is_runes(), i2 = n2.length, s2 = 0; s2 < i2; s2++) {
145
145
  var a2 = n2[s2], l2 = a2.f;
146
146
  l2 & h || // In legacy mode, skip the current effect to prevent infinite loops
147
- (i2 || a2 !== H) && (set_signal_status(a2, t2), // If the signal a) was previously clean or b) is an unowned derived, then mark it
147
+ (o2 || a2 !== H) && (set_signal_status(a2, t2), // If the signal a) was previously clean or b) is an unowned derived, then mark it
148
148
  1280 & l2 && (2 & l2 ? mark_reactions(
149
149
  /** @type {Derived} */
150
150
  a2,
@@ -155,10 +155,10 @@ function mark_reactions(e2, t2) {
155
155
  )));
156
156
  }
157
157
  }
158
- function proxy(e2, n2 = null, i2) {
158
+ function proxy(e2, n2 = null, o2) {
159
159
  if ("object" != typeof e2 || null === e2 || x in e2) return e2;
160
- const o2 = u(e2);
161
- if (o2 !== l && o2 !== c) return e2;
160
+ const i2 = u(e2);
161
+ if (i2 !== l && i2 !== c) return e2;
162
162
  var a2, d2 = /* @__PURE__ */ new Map(), f2 = t(e2), p2 = source(0);
163
163
  return f2 && // We need to create the length source eagerly to ensure that
164
164
  // mutations to the array are properly synced with our proxy
@@ -181,45 +181,45 @@ function proxy(e2, n2 = null, i2) {
181
181
  function state_descriptors_fixed() {
182
182
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
183
183
  }();
184
- var i3 = d2.get(t2);
185
- return void 0 === i3 ? (i3 = source(n3.value), d2.set(t2, i3)) : set(i3, proxy(n3.value, a2)), true;
184
+ var o3 = d2.get(t2);
185
+ return void 0 === o3 ? (o3 = source(n3.value), d2.set(t2, o3)) : set(o3, proxy(n3.value, a2)), true;
186
186
  },
187
187
  deleteProperty(e3, t2) {
188
188
  var n3 = d2.get(t2);
189
189
  if (void 0 === n3) t2 in e3 && d2.set(t2, source(M));
190
190
  else {
191
191
  if (f2 && "string" == typeof t2) {
192
- var i3 = (
192
+ var o3 = (
193
193
  /** @type {Source<number>} */
194
194
  d2.get("length")
195
- ), o3 = Number(t2);
196
- Number.isInteger(o3) && o3 < i3.v && set(i3, o3);
195
+ ), i3 = Number(t2);
196
+ Number.isInteger(i3) && i3 < o3.v && set(o3, i3);
197
197
  }
198
198
  set(n3, M), update_version(p2);
199
199
  }
200
200
  return true;
201
201
  },
202
- get(t2, n3, i3) {
202
+ get(t2, n3, o3) {
203
203
  var _a2;
204
204
  if (n3 === x) return e2;
205
- var o3 = d2.get(n3), l2 = n3 in t2;
205
+ var i3 = d2.get(n3), l2 = n3 in t2;
206
206
  if (
207
207
  // create a source, but only if it's an own property and not a prototype property
208
- void 0 !== o3 || l2 && !((_a2 = s(t2, n3)) == null ? void 0 : _a2.writable) || (o3 = source(proxy(l2 ? t2[n3] : M, a2)), d2.set(n3, o3)), void 0 !== o3
208
+ void 0 !== i3 || l2 && !((_a2 = s(t2, n3)) == null ? void 0 : _a2.writable) || (i3 = source(proxy(l2 ? t2[n3] : M, a2)), d2.set(n3, i3)), void 0 !== i3
209
209
  ) {
210
- var c2 = get$1(o3);
210
+ var c2 = get$1(i3);
211
211
  return c2 === M ? void 0 : c2;
212
212
  }
213
- return Reflect.get(t2, n3, i3);
213
+ return Reflect.get(t2, n3, o3);
214
214
  },
215
215
  getOwnPropertyDescriptor(e3, t2) {
216
216
  var n3 = Reflect.getOwnPropertyDescriptor(e3, t2);
217
217
  if (n3 && "value" in n3) {
218
- var i3 = d2.get(t2);
219
- i3 && (n3.value = get$1(i3));
218
+ var o3 = d2.get(t2);
219
+ o3 && (n3.value = get$1(o3));
220
220
  } else if (void 0 === n3) {
221
- var o3 = d2.get(t2), s2 = o3 == null ? void 0 : o3.v;
222
- if (void 0 !== o3 && s2 !== M) return {
221
+ var i3 = d2.get(t2), s2 = i3 == null ? void 0 : i3.v;
222
+ if (void 0 !== i3 && s2 !== M) return {
223
223
  enumerable: true,
224
224
  configurable: true,
225
225
  value: s2,
@@ -231,30 +231,30 @@ function proxy(e2, n2 = null, i2) {
231
231
  has(e3, t2) {
232
232
  var _a2;
233
233
  if (t2 === x) return true;
234
- var n3 = d2.get(t2), i3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
235
- if ((void 0 !== n3 || null !== H && (!i3 || ((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = source(i3 ? proxy(e3[t2], a2) : M), d2.set(t2, n3)), get$1(n3) === M)) return false;
236
- return i3;
234
+ var n3 = d2.get(t2), o3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
235
+ if ((void 0 !== n3 || null !== H && (!o3 || ((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = source(o3 ? proxy(e3[t2], a2) : M), d2.set(t2, n3)), get$1(n3) === M)) return false;
236
+ return o3;
237
237
  },
238
- set(e3, t2, n3, i3) {
238
+ set(e3, t2, n3, o3) {
239
239
  var _a2;
240
- var o3 = d2.get(t2), l2 = t2 in e3;
240
+ var i3 = d2.get(t2), l2 = t2 in e3;
241
241
  if (f2 && "length" === t2) for (var c2 = n3; c2 < /** @type {Source<number>} */
242
- o3.v; c2 += 1) {
242
+ i3.v; c2 += 1) {
243
243
  var u2 = d2.get(c2 + "");
244
244
  void 0 !== u2 ? set(u2, M) : c2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
245
245
  // else a later read of the property would result in a source being created with
246
246
  // the value of the original item at that index.
247
247
  (u2 = source(M), d2.set(c2 + "", u2));
248
248
  }
249
- void 0 === o3 ? l2 && !((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable) || (set(o3 = source(void 0), proxy(n3, a2)), d2.set(t2, o3)) : (l2 = o3.v !== M, set(o3, proxy(n3, a2)));
249
+ void 0 === i3 ? l2 && !((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable) || (set(i3 = source(void 0), proxy(n3, a2)), d2.set(t2, i3)) : (l2 = i3.v !== M, set(i3, proxy(n3, a2)));
250
250
  var _2 = Reflect.getOwnPropertyDescriptor(e3, t2);
251
- if ((_2 == null ? void 0 : _2.set) && _2.set.call(i3, n3), !l2) {
251
+ if ((_2 == null ? void 0 : _2.set) && _2.set.call(o3, n3), !l2) {
252
252
  if (f2 && "string" == typeof t2) {
253
- var v2 = (
253
+ var g2 = (
254
254
  /** @type {Source<number>} */
255
255
  d2.get("length")
256
- ), g2 = Number(t2);
257
- Number.isInteger(g2) && g2 >= v2.v && set(v2, g2 + 1);
256
+ ), v2 = Number(t2);
257
+ Number.isInteger(v2) && v2 >= g2.v && set(g2, v2 + 1);
258
258
  }
259
259
  update_version(p2);
260
260
  }
@@ -266,7 +266,7 @@ function proxy(e2, n2 = null, i2) {
266
266
  var t3 = d2.get(e4);
267
267
  return void 0 === t3 || t3.v !== M;
268
268
  });
269
- for (var [n3, i3] of d2) i3.v === M || n3 in e3 || t2.push(n3);
269
+ for (var [n3, o3] of d2) o3.v === M || n3 in e3 || t2.push(n3);
270
270
  return t2;
271
271
  },
272
272
  setPrototypeOf() {
@@ -280,17 +280,17 @@ function proxy(e2, n2 = null, i2) {
280
280
  function update_version(e2, t2 = 1) {
281
281
  set(e2, e2.v + t2);
282
282
  }
283
- var I, q, P, O, j;
283
+ var T, q, P, D, O;
284
284
  function create_text(e2 = "") {
285
285
  return document.createTextNode(e2);
286
286
  }
287
287
  // @__NO_SIDE_EFFECTS__
288
288
  function get_first_child(e2) {
289
- return O.call(e2);
289
+ return D.call(e2);
290
290
  }
291
291
  // @__NO_SIDE_EFFECTS__
292
292
  function get_next_sibling(e2) {
293
- return j.call(e2);
293
+ return O.call(e2);
294
294
  }
295
295
  function child(e2, t2) {
296
296
  return /* @__PURE__ */ get_first_child(e2);
@@ -306,16 +306,16 @@ function first_child(e2, t2) {
306
306
  return n2 instanceof Comment && "" === n2.data ? /* @__PURE__ */ get_next_sibling(n2) : n2;
307
307
  }
308
308
  function sibling(e2, t2 = 1, n2 = false) {
309
- let i2 = e2;
310
- for (; t2--; ) i2 = /** @type {TemplateNode} */
311
- /* @__PURE__ */ get_next_sibling(i2);
312
- return i2;
309
+ let o2 = e2;
310
+ for (; t2--; ) o2 = /** @type {TemplateNode} */
311
+ /* @__PURE__ */ get_next_sibling(o2);
312
+ return o2;
313
313
  }
314
314
  // @__NO_SIDE_EFFECTS__
315
315
  function derived(e2) {
316
- var t2 = 2050, n2 = null !== F && 2 & F.f ? (
316
+ var t2 = 2050, n2 = null !== G && 2 & G.f ? (
317
317
  /** @type {Derived} */
318
- F
318
+ G
319
319
  ) : null;
320
320
  null === H || null !== n2 && n2.f & _ ? t2 |= _ : (
321
321
  // Since deriveds are evaluated lazily, any effects created inside them are
@@ -323,7 +323,7 @@ function derived(e2) {
323
323
  H.f |= w
324
324
  );
325
325
  return {
326
- ctx: T,
326
+ ctx: I,
327
327
  deps: null,
328
328
  effects: null,
329
329
  equals,
@@ -379,17 +379,17 @@ function update_derived(e2) {
379
379
  return t3;
380
380
  }(e2)
381
381
  );
382
- set_signal_status(e2, (Y || e2.f & _) && null !== e2.deps ? m : g), e2.equals(t2) || (e2.v = t2, e2.wv = increment_write_version());
382
+ set_signal_status(e2, (J || e2.f & _) && null !== e2.deps ? m : v), e2.equals(t2) || (e2.v = t2, e2.wv = increment_write_version());
383
383
  }
384
384
  function validate_effect(e2) {
385
- null === H && null === F && /**
385
+ null === H && null === G && /**
386
386
  * `%rune%` can only be used inside an effect (e.g. during component initialisation)
387
387
  * @param {string} rune
388
388
  * @returns {never}
389
389
  */
390
390
  function effect_orphan(e3) {
391
391
  throw new Error("https://svelte.dev/e/effect_orphan");
392
- }(), null !== F && F.f & _ && null === H && /**
392
+ }(), null !== G && G.f & _ && null === H && /**
393
393
  * Effect cannot be created inside a `$derived` value that was not itself created inside an effect
394
394
  * @returns {never}
395
395
  */
@@ -399,9 +399,9 @@ function validate_effect(e2) {
399
399
  throw new Error("https://svelte.dev/e/effect_in_teardown");
400
400
  }();
401
401
  }
402
- function create_effect(e2, t2, n2, i2 = true) {
403
- var o2 = H, s2 = {
404
- ctx: T,
402
+ function create_effect(e2, t2, n2, o2 = true) {
403
+ var i2 = H, s2 = {
404
+ ctx: I,
405
405
  deps: null,
406
406
  nodes_start: null,
407
407
  nodes_end: null,
@@ -410,7 +410,7 @@ function create_effect(e2, t2, n2, i2 = true) {
410
410
  fn: t2,
411
411
  last: null,
412
412
  next: null,
413
- parent: o2,
413
+ parent: i2,
414
414
  prev: null,
415
415
  teardown: null,
416
416
  transitions: null,
@@ -422,13 +422,13 @@ function create_effect(e2, t2, n2, i2 = true) {
422
422
  throw destroy_effect(s2), e3;
423
423
  }
424
424
  else null !== t2 && schedule_effect(s2);
425
- if (!(n2 && null === s2.deps && null === s2.first && null === s2.nodes_start && null === s2.teardown && !(1048704 & s2.f)) && i2 && (null !== o2 && function push_effect(e3, t3) {
425
+ if (!(n2 && null === s2.deps && null === s2.first && null === s2.nodes_start && null === s2.teardown && !(1048704 & s2.f)) && o2 && (null !== i2 && function push_effect(e3, t3) {
426
426
  var n3 = t3.last;
427
427
  null === n3 ? t3.last = t3.first = e3 : (n3.next = e3, e3.prev = n3, t3.last = e3);
428
- }(s2, o2), null !== F && 2 & F.f)) {
428
+ }(s2, i2), null !== G && 2 & G.f)) {
429
429
  var a2 = (
430
430
  /** @type {Derived} */
431
- F
431
+ G
432
432
  );
433
433
  (a2.effects ?? (a2.effects = [])).push(s2);
434
434
  }
@@ -436,18 +436,18 @@ function create_effect(e2, t2, n2, i2 = true) {
436
436
  }
437
437
  function teardown(e2) {
438
438
  const t2 = create_effect(8, null, false);
439
- return set_signal_status(t2, g), t2.teardown = e2, t2;
439
+ return set_signal_status(t2, v), t2.teardown = e2, t2;
440
440
  }
441
441
  function user_effect(e2) {
442
- if (validate_effect(), !(null !== H && !!(H.f & d) && null !== T && !T.m)) return effect(e2);
442
+ if (validate_effect(), !(null !== H && !!(H.f & d) && null !== I && !I.m)) return effect(e2);
443
443
  var t2 = (
444
444
  /** @type {ComponentContext} */
445
- T
445
+ I
446
446
  );
447
447
  (t2.e ?? (t2.e = [])).push({
448
448
  fn: e2,
449
449
  effect: H,
450
- reaction: F
450
+ reaction: G
451
451
  });
452
452
  }
453
453
  function effect(e2) {
@@ -456,27 +456,27 @@ function effect(e2) {
456
456
  function legacy_pre_effect(e2, t2) {
457
457
  var n2 = (
458
458
  /** @type {ComponentContextLegacy} */
459
- T
460
- ), i2 = {
459
+ I
460
+ ), o2 = {
461
461
  effect: null,
462
462
  ran: false
463
463
  };
464
- n2.l.r1.push(i2), i2.effect = render_effect(() => {
464
+ n2.l.r1.push(o2), o2.effect = render_effect(() => {
465
465
  e2(), // If this legacy pre effect has already run before the end of the reset, then
466
466
  // bail out to emulate the same behavior.
467
- i2.ran || (i2.ran = true, set(n2.l.r2, true), untrack(t2));
467
+ o2.ran || (o2.ran = true, set(n2.l.r2, true), untrack(t2));
468
468
  });
469
469
  }
470
470
  function legacy_pre_effect_reset() {
471
471
  var e2 = (
472
472
  /** @type {ComponentContextLegacy} */
473
- T
473
+ I
474
474
  );
475
475
  render_effect(() => {
476
476
  if (get$1(e2.l.r2)) {
477
477
  for (var t2 of e2.l.r1) {
478
478
  var n2 = t2.effect;
479
- n2.f & g && set_signal_status(n2, m), check_dirtiness(n2) && update_effect(n2), t2.ran = false;
479
+ n2.f & v && set_signal_status(n2, m), check_dirtiness(n2) && update_effect(n2), t2.ran = false;
480
480
  }
481
481
  e2.l.r2.v = false;
482
482
  }
@@ -486,8 +486,8 @@ function render_effect(e2) {
486
486
  return create_effect(8, e2, true);
487
487
  }
488
488
  function template_effect(e2, t2 = [], n2 = derived) {
489
- const i2 = t2.map(n2);
490
- return block(() => e2(...i2.map(get$1)));
489
+ const o2 = t2.map(n2);
490
+ return block(() => e2(...o2.map(get$1)));
491
491
  }
492
492
  function block(e2, t2 = 0) {
493
493
  return create_effect(24 | t2, e2, true);
@@ -498,7 +498,7 @@ function branch(e2, t2 = true) {
498
498
  function execute_effect_teardown(e2) {
499
499
  var t2 = e2.teardown;
500
500
  if (null !== t2) {
501
- const e3 = z, n2 = F;
501
+ const e3 = z, n2 = G;
502
502
  set_is_destroying_effect(true), set_active_reaction(null);
503
503
  try {
504
504
  t2.call(null);
@@ -510,22 +510,22 @@ function execute_effect_teardown(e2) {
510
510
  function destroy_effect_children(e2, t2 = false) {
511
511
  var n2 = e2.first;
512
512
  for (e2.first = e2.last = null; null !== n2; ) {
513
- var i2 = n2.next;
513
+ var o2 = n2.next;
514
514
  n2.f & f ? (
515
515
  // this is now an independent root
516
516
  n2.parent = null
517
- ) : destroy_effect(n2, t2), n2 = i2;
517
+ ) : destroy_effect(n2, t2), n2 = o2;
518
518
  }
519
519
  }
520
520
  function destroy_effect(e2, t2 = true) {
521
521
  var n2 = false;
522
522
  if ((t2 || 524288 & e2.f) && null !== e2.nodes_start) {
523
- for (var i2 = e2.nodes_start, o2 = e2.nodes_end; null !== i2; ) {
524
- var s2 = i2 === o2 ? null : (
523
+ for (var o2 = e2.nodes_start, i2 = e2.nodes_end; null !== o2; ) {
524
+ var s2 = o2 === i2 ? null : (
525
525
  /** @type {TemplateNode} */
526
- /* @__PURE__ */ get_next_sibling(i2)
526
+ /* @__PURE__ */ get_next_sibling(o2)
527
527
  );
528
- i2.remove(), i2 = s2;
528
+ o2.remove(), o2 = s2;
529
529
  }
530
530
  n2 = true;
531
531
  }
@@ -539,8 +539,8 @@ function destroy_effect(e2, t2 = true) {
539
539
  e2.next = e2.prev = e2.teardown = e2.ctx = e2.deps = e2.fn = e2.nodes_start = e2.nodes_end = null;
540
540
  }
541
541
  function unlink_effect(e2) {
542
- var t2 = e2.parent, n2 = e2.prev, i2 = e2.next;
543
- null !== n2 && (n2.next = i2), null !== i2 && (i2.prev = n2), null !== t2 && (t2.first === e2 && (t2.first = i2), t2.last === e2 && (t2.last = n2));
542
+ var t2 = e2.parent, n2 = e2.prev, o2 = e2.next;
543
+ null !== n2 && (n2.next = o2), null !== o2 && (o2.prev = n2), null !== t2 && (t2.first === e2 && (t2.first = o2), t2.last === e2 && (t2.last = n2));
544
544
  }
545
545
  function pause_effect(e2, t2) {
546
546
  var n2 = [];
@@ -552,15 +552,15 @@ function run_out_transitions(e2, t2) {
552
552
  var n2 = e2.length;
553
553
  if (n2 > 0) {
554
554
  var check = () => --n2 || t2();
555
- for (var i2 of e2) i2.out(check);
555
+ for (var o2 of e2) o2.out(check);
556
556
  } else t2();
557
557
  }
558
558
  function pause_children(e2, t2, n2) {
559
559
  if (!(e2.f & b)) {
560
- if (e2.f ^= b, null !== e2.transitions) for (const i3 of e2.transitions) (i3.is_global || n2) && t2.push(i3);
561
- for (var i2 = e2.first; null !== i2; ) {
562
- var o2 = i2.next;
563
- pause_children(i2, t2, !!(!!(i2.f & $) || !!(i2.f & d)) && n2), i2 = o2;
560
+ if (e2.f ^= b, null !== e2.transitions) for (const o3 of e2.transitions) (o3.is_global || n2) && t2.push(o3);
561
+ for (var o2 = e2.first; null !== o2; ) {
562
+ var i2 = o2.next;
563
+ pause_children(o2, t2, !!(!!(o2.f & $) || !!(o2.f & d)) && n2), o2 = i2;
564
564
  }
565
565
  }
566
566
  }
@@ -571,37 +571,37 @@ function resume_children(e2, t2) {
571
571
  if (e2.f & b) {
572
572
  e2.f ^= b, // Ensure the effect is marked as clean again so that any dirty child
573
573
  // effects can schedule themselves for execution
574
- e2.f & g || (e2.f ^= g), // If a dependency of this effect changed while it was paused,
574
+ e2.f & v || (e2.f ^= v), // If a dependency of this effect changed while it was paused,
575
575
  // schedule the effect to update
576
576
  check_dirtiness(e2) && (set_signal_status(e2, h), schedule_effect(e2));
577
577
  for (var n2 = e2.first; null !== n2; ) {
578
- var i2 = n2.next;
579
- resume_children(n2, !!(!!(n2.f & $) || !!(n2.f & d)) && t2), n2 = i2;
578
+ var o2 = n2.next;
579
+ resume_children(n2, !!(!!(n2.f & $) || !!(n2.f & d)) && t2), n2 = o2;
580
580
  }
581
581
  if (null !== e2.transitions) for (const n3 of e2.transitions) (n3.is_global || t2) && n3.in();
582
582
  }
583
583
  }
584
- let E = [], N = [];
584
+ let j = [], E = [];
585
585
  function run_micro_tasks() {
586
- var e2 = E;
587
- E = [], run_all(e2);
586
+ var e2 = j;
587
+ j = [], run_all(e2);
588
588
  }
589
589
  function queue_micro_task(e2) {
590
- 0 === E.length && queueMicrotask(run_micro_tasks), E.push(e2);
590
+ 0 === j.length && queueMicrotask(run_micro_tasks), j.push(e2);
591
591
  }
592
592
  function flush_tasks() {
593
- E.length > 0 && run_micro_tasks(), N.length > 0 && function run_idle_tasks() {
594
- var e2 = N;
595
- N = [], run_all(e2);
593
+ j.length > 0 && run_micro_tasks(), E.length > 0 && function run_idle_tasks() {
594
+ var e2 = E;
595
+ E = [], run_all(e2);
596
596
  }();
597
597
  }
598
- let B = false, D = false, A = null, W = false, z = false;
598
+ let N = false, B = false, A = null, W = false, z = false;
599
599
  function set_is_destroying_effect(e2) {
600
600
  z = e2;
601
601
  }
602
- let L = [], F = null, G = false;
602
+ let L = [], G = null, F = false;
603
603
  function set_active_reaction(e2) {
604
- F = e2;
604
+ G = e2;
605
605
  }
606
606
  let H = null;
607
607
  function set_active_effect(e2) {
@@ -609,50 +609,50 @@ function set_active_effect(e2) {
609
609
  }
610
610
  let R = null;
611
611
  let V = null, K = 0, U = null;
612
- let Z = 1, J = 0, Y = false;
612
+ let Y = 1, Z = 0, J = false;
613
613
  function increment_write_version() {
614
- return ++Z;
614
+ return ++Y;
615
615
  }
616
616
  function check_dirtiness(e2) {
617
617
  var _a2;
618
618
  var t2 = e2.f;
619
619
  if (t2 & h) return true;
620
620
  if (t2 & m) {
621
- var n2 = e2.deps, i2 = !!(t2 & _);
621
+ var n2 = e2.deps, o2 = !!(t2 & _);
622
622
  if (null !== n2) {
623
- var o2, s2, a2 = !!(t2 & v), l2 = i2 && null !== H && !Y, c2 = n2.length;
623
+ var i2, s2, a2 = !!(t2 & g), l2 = o2 && null !== H && !J, c2 = n2.length;
624
624
  if (a2 || l2) {
625
625
  var u2 = (
626
626
  /** @type {Derived} */
627
627
  e2
628
628
  ), d2 = u2.parent;
629
- for (o2 = 0; o2 < c2; o2++) s2 = n2[o2], // We always re-add all reactions (even duplicates) if the derived was
629
+ for (i2 = 0; i2 < c2; i2++) s2 = n2[i2], // We always re-add all reactions (even duplicates) if the derived was
630
630
  // previously disconnected, however we don't if it was unowned as we
631
631
  // de-duplicate dependencies in that case
632
632
  !a2 && ((_a2 = s2 == null ? void 0 : s2.reactions) == null ? void 0 : _a2.includes(u2)) || (s2.reactions ?? (s2.reactions = [])).push(u2);
633
- a2 && (u2.f ^= v), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
633
+ a2 && (u2.f ^= g), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
634
634
  // and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned
635
635
  // flag
636
636
  !l2 || null === d2 || d2.f & _ || (u2.f ^= _);
637
637
  }
638
- for (o2 = 0; o2 < c2; o2++) if (check_dirtiness(s2 = n2[o2]) && update_derived(
638
+ for (i2 = 0; i2 < c2; i2++) if (check_dirtiness(s2 = n2[i2]) && update_derived(
639
639
  /** @type {Derived} */
640
640
  s2
641
641
  ), s2.wv > e2.wv) return true;
642
642
  }
643
- i2 && (null === H || Y) || set_signal_status(e2, g);
643
+ o2 && (null === H || J) || set_signal_status(e2, v);
644
644
  }
645
645
  return false;
646
646
  }
647
- function handle_error(e2, t2, n2, i2) {
648
- if (B) {
649
- if (null === n2 && (B = false), /**
647
+ function handle_error(e2, t2, n2, o2) {
648
+ if (N) {
649
+ if (null === n2 && (N = false), /**
650
650
  * @param {Effect} effect
651
651
  */
652
652
  function should_rethrow_error(e3) {
653
653
  return !(e3.f & y || null !== e3.parent && e3.parent.f & p);
654
654
  }(t2)) throw e2;
655
- } else null !== n2 && (B = true), function propagate_error(e3, t3) {
655
+ } else null !== n2 && (N = true), function propagate_error(e3, t3) {
656
656
  for (var n3 = t3; null !== n3; ) {
657
657
  if (n3.f & p) try {
658
658
  return void n3.fn(e3);
@@ -661,19 +661,19 @@ function handle_error(e2, t2, n2, i2) {
661
661
  }
662
662
  n3 = n3.parent;
663
663
  }
664
- throw B = false, e3;
664
+ throw N = false, e3;
665
665
  }(e2, t2);
666
666
  }
667
667
  function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
668
- var i2 = e2.reactions;
669
- if (null !== i2) for (var o2 = 0; o2 < i2.length; o2++) {
670
- var s2 = i2[o2];
668
+ var o2 = e2.reactions;
669
+ if (null !== o2) for (var i2 = 0; i2 < o2.length; i2++) {
670
+ var s2 = o2[i2];
671
671
  2 & s2.f ? schedule_possible_effect_self_invalidation(
672
672
  /** @type {Derived} */
673
673
  s2,
674
674
  t2,
675
675
  false
676
- ) : t2 === s2 && (n2 ? set_signal_status(s2, h) : s2.f & g && set_signal_status(s2, m), schedule_effect(
676
+ ) : t2 === s2 && (n2 ? set_signal_status(s2, h) : s2.f & v && set_signal_status(s2, m), schedule_effect(
677
677
  /** @type {Effect} */
678
678
  s2
679
679
  ));
@@ -681,9 +681,9 @@ function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
681
681
  }
682
682
  function update_reaction(e2) {
683
683
  var _a2;
684
- var t2 = V, n2 = K, i2 = U, o2 = F, s2 = Y, a2 = R, l2 = T, c2 = G, u2 = e2.f;
684
+ var t2 = V, n2 = K, o2 = U, i2 = G, s2 = J, a2 = R, l2 = I, c2 = F, u2 = e2.f;
685
685
  V = /** @type {null | Value[]} */
686
- null, K = 0, U = null, Y = !!(u2 & _) && (G || !W || null === F), F = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), G = false, J++;
686
+ null, K = 0, U = null, J = !!(u2 & _) && (F || !W || null === G), G = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), F = false, Z++;
687
687
  try {
688
688
  var d2 = (
689
689
  /** @type {Function} */
@@ -694,37 +694,37 @@ function update_reaction(e2) {
694
694
  var p2;
695
695
  if (remove_reactions(e2, K), null !== f2 && K > 0) for (f2.length = K + V.length, p2 = 0; p2 < V.length; p2++) f2[K + p2] = V[p2];
696
696
  else e2.deps = f2 = V;
697
- if (!Y) for (p2 = K; p2 < f2.length; p2++) ((_a2 = f2[p2]).reactions ?? (_a2.reactions = [])).push(e2);
697
+ if (!J) for (p2 = K; p2 < f2.length; p2++) ((_a2 = f2[p2]).reactions ?? (_a2.reactions = [])).push(e2);
698
698
  } else null !== f2 && K < f2.length && (remove_reactions(e2, K), f2.length = K);
699
- if (is_runes() && null !== U && !G && null !== f2 && !(6146 & e2.f)) for (p2 = 0; p2 < /** @type {Source[]} */
699
+ if (is_runes() && null !== U && !F && null !== f2 && !(6146 & e2.f)) for (p2 = 0; p2 < /** @type {Source[]} */
700
700
  U.length; p2++) schedule_possible_effect_self_invalidation(
701
701
  U[p2],
702
702
  /** @type {Effect} */
703
703
  e2
704
704
  );
705
- return null !== o2 && J++, d2;
705
+ return null !== i2 && Z++, d2;
706
706
  } finally {
707
- V = t2, K = n2, U = i2, F = o2, Y = s2, R = a2, set_component_context(l2), G = c2;
707
+ V = t2, K = n2, U = o2, G = i2, J = s2, R = a2, set_component_context(l2), F = c2;
708
708
  }
709
709
  }
710
710
  function remove_reaction(e2, t2) {
711
- let i2 = t2.reactions;
712
- if (null !== i2) {
713
- var o2 = n.call(i2, e2);
714
- if (-1 !== o2) {
715
- var s2 = i2.length - 1;
716
- 0 === s2 ? i2 = t2.reactions = null : (
711
+ let o2 = t2.reactions;
712
+ if (null !== o2) {
713
+ var i2 = n.call(o2, e2);
714
+ if (-1 !== i2) {
715
+ var s2 = o2.length - 1;
716
+ 0 === s2 ? o2 = t2.reactions = null : (
717
717
  // Swap with last element and then remove.
718
- (i2[o2] = i2[s2], i2.pop())
718
+ (o2[i2] = o2[s2], o2.pop())
719
719
  );
720
720
  }
721
721
  }
722
- null === i2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
722
+ null === o2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
723
723
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
724
724
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
725
725
  (null === V || !V.includes(t2)) && (set_signal_status(t2, m), // If we are working with a derived that is owned by an effect, then mark it as being
726
726
  // disconnected.
727
- 768 & t2.f || (t2.f ^= v), // Disconnect any reactions owned by this reaction
727
+ 768 & t2.f || (t2.f ^= g), // Disconnect any reactions owned by this reaction
728
728
  destroy_derived_effects(
729
729
  /** @type {Derived} **/
730
730
  t2
@@ -736,13 +736,13 @@ function remove_reaction(e2, t2) {
736
736
  }
737
737
  function remove_reactions(e2, t2) {
738
738
  var n2 = e2.deps;
739
- if (null !== n2) for (var i2 = t2; i2 < n2.length; i2++) remove_reaction(e2, n2[i2]);
739
+ if (null !== n2) for (var o2 = t2; o2 < n2.length; o2++) remove_reaction(e2, n2[o2]);
740
740
  }
741
741
  function update_effect(t2) {
742
742
  var n2 = t2.f;
743
743
  if (!(n2 & y)) {
744
- set_signal_status(t2, g);
745
- var i2 = H, o2 = T, s2 = W;
744
+ set_signal_status(t2, v);
745
+ var o2 = H, i2 = I, s2 = W;
746
746
  H = t2, W = true;
747
747
  try {
748
748
  16 & n2 ? function destroy_block_effect_children(e2) {
@@ -752,13 +752,13 @@ function update_effect(t2) {
752
752
  }
753
753
  }(t2) : destroy_effect_children(t2), execute_effect_teardown(t2);
754
754
  var a2 = update_reaction(t2);
755
- t2.teardown = "function" == typeof a2 ? a2 : null, t2.wv = Z;
755
+ t2.teardown = "function" == typeof a2 ? a2 : null, t2.wv = Y;
756
756
  t2.deps;
757
757
  e;
758
758
  } catch (e2) {
759
- handle_error(e2, t2, i2, o2 || t2.ctx);
759
+ handle_error(e2, t2, o2, i2 || t2.ctx);
760
760
  } finally {
761
- W = s2, H = i2;
761
+ W = s2, H = o2;
762
762
  }
763
763
  }
764
764
  }
@@ -778,63 +778,63 @@ function flush_queued_root_effects() {
778
778
  var t2 = 0;
779
779
  for (W = true; L.length > 0; ) {
780
780
  t2++ > 1e3 && infinite_loop_guard();
781
- var n2 = L, i2 = n2.length;
781
+ var n2 = L, o2 = n2.length;
782
782
  L = [];
783
- for (var o2 = 0; o2 < i2; o2++) {
784
- flush_queued_effects(process_effects(n2[o2]));
783
+ for (var i2 = 0; i2 < o2; i2++) {
784
+ flush_queued_effects(process_effects(n2[i2]));
785
785
  }
786
786
  }
787
787
  } finally {
788
- D = false, W = e2, A = null;
788
+ B = false, W = e2, A = null;
789
789
  }
790
790
  }
791
791
  function flush_queued_effects(e2) {
792
792
  var t2 = e2.length;
793
793
  if (0 !== t2) for (var n2 = 0; n2 < t2; n2++) {
794
- var i2 = e2[n2];
795
- if (!(24576 & i2.f)) try {
796
- check_dirtiness(i2) && (update_effect(i2), // Effects with no dependencies or teardown do not get added to the effect tree.
794
+ var o2 = e2[n2];
795
+ if (!(24576 & o2.f)) try {
796
+ check_dirtiness(o2) && (update_effect(o2), // Effects with no dependencies or teardown do not get added to the effect tree.
797
797
  // Deferred effects (e.g. `$effect(...)`) _are_ added to the tree because we
798
798
  // don't know if we need to keep them until they are executed. Doing the check
799
799
  // here (rather than in `update_effect`) allows us to skip the work for
800
800
  // immediate effects.
801
- null === i2.deps && null === i2.first && null === i2.nodes_start && (null === i2.teardown ? (
801
+ null === o2.deps && null === o2.first && null === o2.nodes_start && (null === o2.teardown ? (
802
802
  // remove this effect from the graph
803
- unlink_effect(i2)
803
+ unlink_effect(o2)
804
804
  ) : (
805
805
  // keep the effect in the graph, but free up some memory
806
- i2.fn = null
806
+ o2.fn = null
807
807
  )));
808
808
  } catch (e3) {
809
- handle_error(e3, i2, null, i2.ctx);
809
+ handle_error(e3, o2, null, o2.ctx);
810
810
  }
811
811
  }
812
812
  }
813
813
  function schedule_effect(e2) {
814
- D || (D = true, queueMicrotask(flush_queued_root_effects));
814
+ B || (B = true, queueMicrotask(flush_queued_root_effects));
815
815
  for (var t2 = A = e2; null !== t2.parent; ) {
816
816
  var n2 = (t2 = t2.parent).f;
817
817
  if (96 & n2) {
818
- if (!(n2 & g)) return;
819
- t2.f ^= g;
818
+ if (!(n2 & v)) return;
819
+ t2.f ^= v;
820
820
  }
821
821
  }
822
822
  L.push(t2);
823
823
  }
824
824
  function process_effects(e2) {
825
825
  for (var t2 = [], n2 = e2; null !== n2; ) {
826
- var i2 = n2.f, o2 = !!(96 & i2);
827
- if (!(o2 && !!(i2 & g) || i2 & b)) {
828
- if (4 & i2) t2.push(n2);
829
- else if (o2) n2.f ^= g;
826
+ var o2 = n2.f, i2 = !!(96 & o2);
827
+ if (!(i2 && !!(o2 & v) || o2 & b)) {
828
+ if (4 & o2) t2.push(n2);
829
+ else if (i2) n2.f ^= v;
830
830
  else {
831
- var s2 = F;
831
+ var s2 = G;
832
832
  try {
833
- F = n2, check_dirtiness(n2) && update_effect(n2);
833
+ G = n2, check_dirtiness(n2) && update_effect(n2);
834
834
  } catch (e3) {
835
835
  handle_error(e3, n2, null, n2.ctx);
836
836
  } finally {
837
- F = s2;
837
+ G = s2;
838
838
  }
839
839
  }
840
840
  var a2 = n2.first;
@@ -852,20 +852,20 @@ async function tick() {
852
852
  await Promise.resolve(), // By calling flushSync we guarantee that any pending state changes are applied after one tick.
853
853
  // TODO look into whether we can make flushing subsequent updates synchronously in the future.
854
854
  function flushSync(e2) {
855
- for (flush_tasks(); L.length > 0; ) D = true, flush_queued_root_effects(), flush_tasks();
855
+ for (flush_tasks(); L.length > 0; ) B = true, flush_queued_root_effects(), flush_tasks();
856
856
  }();
857
857
  }
858
858
  function get$1(e2) {
859
859
  var t2 = !!(2 & e2.f);
860
- if (null === F || G) {
860
+ if (null === G || F) {
861
861
  if (t2 && /** @type {Derived} */
862
862
  null === e2.deps && /** @type {Derived} */
863
863
  null === e2.effects) {
864
864
  var n2 = (
865
865
  /** @type {Derived} */
866
866
  e2
867
- ), i2 = n2.parent;
868
- null === i2 || i2.f & _ || // If the derived is owned by another derived then mark it as unowned
867
+ ), o2 = n2.parent;
868
+ null === o2 || o2.f & _ || // If the derived is owned by another derived then mark it as unowned
869
869
  // as the derived value might have been referenced in a different context
870
870
  // since and thus its parent might not be its true owner anymore
871
871
  (n2.f ^= _);
@@ -874,11 +874,11 @@ function get$1(e2) {
874
874
  null !== R && R.includes(e2) && function state_unsafe_local_read() {
875
875
  throw new Error("https://svelte.dev/e/state_unsafe_local_read");
876
876
  }();
877
- var o2 = F.deps;
878
- e2.rv < J && (e2.rv = J, // If the signal is accessing the same dependencies in the same
877
+ var i2 = G.deps;
878
+ e2.rv < Z && (e2.rv = Z, // If the signal is accessing the same dependencies in the same
879
879
  // order as it did last time, increment `skipped_deps`
880
880
  // rather than updating `new_deps`, which creates GC cost
881
- null === V && null !== o2 && o2[K] === e2 ? K++ : null === V ? V = [e2] : Y && V.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
881
+ null === V && null !== i2 && i2[K] === e2 ? K++ : null === V ? V = [e2] : J && V.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
882
882
  // an unowned derived because skip_reaction is true, then we need to ensure that
883
883
  // we don't have duplicates
884
884
  V.push(e2));
@@ -887,11 +887,11 @@ function get$1(e2) {
887
887
  e2) && update_derived(n2), e2.v;
888
888
  }
889
889
  function untrack(e2) {
890
- var t2 = G;
890
+ var t2 = F;
891
891
  try {
892
- return G = true, e2();
892
+ return F = true, e2();
893
893
  } finally {
894
- G = t2;
894
+ F = t2;
895
895
  }
896
896
  }
897
897
  const Q = -7169;
@@ -920,9 +920,9 @@ function deep_read(e2, t2 = /* @__PURE__ */ new Set()) {
920
920
  if (n2 !== Object.prototype && n2 !== Array.prototype && n2 !== Map.prototype && n2 !== Set.prototype && n2 !== Date.prototype) {
921
921
  const t3 = a(n2);
922
922
  for (let n3 in t3) {
923
- const i2 = t3[n3].get;
924
- if (i2) try {
925
- i2.call(e2);
923
+ const o2 = t3[n3].get;
924
+ if (o2) try {
925
+ o2.call(e2);
926
926
  } catch (e3) {
927
927
  }
928
928
  }
@@ -968,7 +968,7 @@ function autofocus(e2, t2) {
968
968
  }
969
969
  let re = false;
970
970
  function without_reactive_context(e2) {
971
- var t2 = F, n2 = H;
971
+ var t2 = G, n2 = H;
972
972
  set_active_reaction(null), set_active_effect(null);
973
973
  try {
974
974
  return e2();
@@ -976,12 +976,12 @@ function without_reactive_context(e2) {
976
976
  set_active_reaction(t2), set_active_effect(n2);
977
977
  }
978
978
  }
979
- function listen_to_event_and_reset_event(e2, t2, n2, i2 = n2) {
979
+ function listen_to_event_and_reset_event(e2, t2, n2, o2 = n2) {
980
980
  e2.addEventListener(t2, () => without_reactive_context(n2));
981
- const o2 = e2.__on_r;
982
- e2.__on_r = o2 ? () => {
983
- o2(), i2(true);
984
- } : () => i2(true), function add_form_reset_listener() {
981
+ const i2 = e2.__on_r;
982
+ e2.__on_r = i2 ? () => {
983
+ i2(), o2(true);
984
+ } : () => o2(true), function add_form_reset_listener() {
985
985
  re || (re = true, document.addEventListener(
986
986
  "reset",
987
987
  (e3) => {
@@ -1002,32 +1002,32 @@ function listen_to_event_and_reset_event(e2, t2, n2, i2 = n2) {
1002
1002
  ));
1003
1003
  }();
1004
1004
  }
1005
- const ie = /* @__PURE__ */ new Set(), oe = /* @__PURE__ */ new Set();
1006
- function create_event(e2, t2, n2, i2 = {}) {
1005
+ const oe = /* @__PURE__ */ new Set(), ie = /* @__PURE__ */ new Set();
1006
+ function create_event(e2, t2, n2, o2 = {}) {
1007
1007
  function target_handler(e3) {
1008
- if (i2.capture || // Only call in the bubble phase, else delegated events would be called before the capturing events
1008
+ if (o2.capture || // Only call in the bubble phase, else delegated events would be called before the capturing events
1009
1009
  handle_event_propagation.call(t2, e3), !e3.cancelBubble) return without_reactive_context(() => n2 == null ? void 0 : n2.call(this, e3));
1010
1010
  }
1011
1011
  return e2.startsWith("pointer") || e2.startsWith("touch") || "wheel" === e2 ? queue_micro_task(() => {
1012
- t2.addEventListener(e2, target_handler, i2);
1013
- }) : t2.addEventListener(e2, target_handler, i2), target_handler;
1012
+ t2.addEventListener(e2, target_handler, o2);
1013
+ }) : t2.addEventListener(e2, target_handler, o2), target_handler;
1014
1014
  }
1015
- function event(e2, t2, n2, i2, o2) {
1015
+ function event(e2, t2, n2, o2, i2) {
1016
1016
  var s2 = {
1017
- capture: i2,
1018
- passive: o2
1017
+ capture: o2,
1018
+ passive: i2
1019
1019
  }, a2 = create_event(e2, t2, n2, s2);
1020
1020
  t2 !== document.body && t2 !== window && t2 !== document || teardown(() => {
1021
1021
  t2.removeEventListener(e2, a2, s2);
1022
1022
  });
1023
1023
  }
1024
1024
  function delegate(e2) {
1025
- for (var t2 = 0; t2 < e2.length; t2++) ie.add(e2[t2]);
1026
- for (var n2 of oe) n2(e2);
1025
+ for (var t2 = 0; t2 < e2.length; t2++) oe.add(e2[t2]);
1026
+ for (var n2 of ie) n2(e2);
1027
1027
  }
1028
1028
  function handle_event_propagation(e2) {
1029
1029
  var _a2;
1030
- var n2 = this, i2 = (
1030
+ var n2 = this, o2 = (
1031
1031
  /** @type {Node} */
1032
1032
  n2.ownerDocument
1033
1033
  ), s2 = e2.type, a2 = ((_a2 = e2.composedPath) == null ? void 0 : _a2.call(e2)) || [], l2 = (
@@ -1046,14 +1046,14 @@ function handle_event_propagation(e2) {
1046
1046
  }
1047
1047
  if ((l2 = /** @type {Element} */
1048
1048
  a2[c2] || e2.target) !== n2) {
1049
- o(e2, "currentTarget", {
1049
+ i(e2, "currentTarget", {
1050
1050
  configurable: true,
1051
- get: () => l2 || i2
1051
+ get: () => l2 || o2
1052
1052
  });
1053
- var p2 = F, _2 = H;
1053
+ var p2 = G, _2 = H;
1054
1054
  set_active_reaction(null), set_active_effect(null);
1055
1055
  try {
1056
- for (var v2, g2 = []; null !== l2; ) {
1056
+ for (var g2, v2 = []; null !== l2; ) {
1057
1057
  var h2 = l2.assignedSlot || l2.parentNode || /** @type {any} */
1058
1058
  l2.host || null;
1059
1059
  try {
@@ -1066,17 +1066,17 @@ function handle_event_propagation(e2) {
1066
1066
  b2.apply(l2, [e2, ...y2]);
1067
1067
  } else m2.call(l2, e2);
1068
1068
  } catch (e3) {
1069
- v2 ? g2.push(e3) : v2 = e3;
1069
+ g2 ? v2.push(e3) : g2 = e3;
1070
1070
  }
1071
1071
  if (e2.cancelBubble || h2 === n2 || null === h2) break;
1072
1072
  l2 = h2;
1073
1073
  }
1074
- if (v2) {
1075
- for (let e3 of g2)
1074
+ if (g2) {
1075
+ for (let e3 of v2)
1076
1076
  queueMicrotask(() => {
1077
1077
  throw e3;
1078
1078
  });
1079
- throw v2;
1079
+ throw g2;
1080
1080
  }
1081
1081
  } finally {
1082
1082
  e2.__root = n2, // @ts-ignore remove proxy on currentTarget
@@ -1097,15 +1097,15 @@ function assign_nodes(e2, t2) {
1097
1097
  }
1098
1098
  // @__NO_SIDE_EFFECTS__
1099
1099
  function template(e2, t2) {
1100
- var n2, i2 = !!(1 & t2), o2 = !!(2 & t2), s2 = !e2.startsWith("<!>");
1100
+ var n2, o2 = !!(1 & t2), i2 = !!(2 & t2), s2 = !e2.startsWith("<!>");
1101
1101
  return () => {
1102
- void 0 === n2 && (n2 = create_fragment_from_html(s2 ? e2 : "<!>" + e2), i2 || (n2 = /** @type {Node} */
1102
+ void 0 === n2 && (n2 = create_fragment_from_html(s2 ? e2 : "<!>" + e2), o2 || (n2 = /** @type {Node} */
1103
1103
  /* @__PURE__ */ get_first_child(n2)));
1104
1104
  var t3 = (
1105
1105
  /** @type {TemplateNode} */
1106
- o2 || P ? document.importNode(n2, true) : n2.cloneNode(true)
1106
+ i2 || P ? document.importNode(n2, true) : n2.cloneNode(true)
1107
1107
  );
1108
- i2 ? assign_nodes(
1108
+ o2 ? assign_nodes(
1109
1109
  /** @type {TemplateNode} */
1110
1110
  /* @__PURE__ */ get_first_child(t3),
1111
1111
  /** @type {TemplateNode} */
@@ -1116,22 +1116,22 @@ function template(e2, t2) {
1116
1116
  }
1117
1117
  // @__NO_SIDE_EFFECTS__
1118
1118
  function ns_template(e2, t2, n2 = "svg") {
1119
- var i2, o2 = `<${n2}>${!e2.startsWith("<!>") ? e2 : "<!>" + e2}</${n2}>`;
1119
+ var o2, i2 = `<${n2}>${!e2.startsWith("<!>") ? e2 : "<!>" + e2}</${n2}>`;
1120
1120
  return () => {
1121
- if (!i2) {
1121
+ if (!o2) {
1122
1122
  var e3 = (
1123
1123
  /** @type {Element} */
1124
1124
  /* @__PURE__ */ get_first_child(
1125
1125
  /** @type {DocumentFragment} */
1126
- create_fragment_from_html(o2)
1126
+ create_fragment_from_html(i2)
1127
1127
  )
1128
1128
  );
1129
- i2 = /** @type {Element} */
1129
+ o2 = /** @type {Element} */
1130
1130
  /* @__PURE__ */ get_first_child(e3);
1131
1131
  }
1132
1132
  var t3 = (
1133
1133
  /** @type {TemplateNode} */
1134
- i2.cloneNode(true)
1134
+ o2.cloneNode(true)
1135
1135
  );
1136
1136
  return assign_nodes(t3, t3), t3;
1137
1137
  };
@@ -1160,17 +1160,17 @@ function set_text(e2, t2) {
1160
1160
  (e2.__t = n2, e2.nodeValue = n2 + "");
1161
1161
  }
1162
1162
  function mount(e2, t2) {
1163
- return function _mount(e3, { target: t3, anchor: n2, props: o2 = {}, events: a2, context: l2, intro: c2 = true }) {
1163
+ return function _mount(e3, { target: t3, anchor: n2, props: i2 = {}, events: a2, context: l2, intro: c2 = true }) {
1164
1164
  !/**
1165
1165
  * Initialize these lazily to avoid issues when using the runtime in a server context
1166
1166
  * where these globals are not available while avoiding a separate server entry point
1167
1167
  */
1168
1168
  function init_operations() {
1169
- if (void 0 === I) {
1170
- I = window, q = document, P = /Firefox/.test(navigator.userAgent);
1169
+ if (void 0 === T) {
1170
+ T = window, q = document, P = /Firefox/.test(navigator.userAgent);
1171
1171
  var e4 = Element.prototype, t4 = Node.prototype;
1172
- O = s(t4, "firstChild").get, // @ts-ignore
1173
- j = s(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
1172
+ D = s(t4, "firstChild").get, // @ts-ignore
1173
+ O = s(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
1174
1174
  // @ts-expect-error
1175
1175
  e4.__click = void 0, // @ts-expect-error
1176
1176
  e4.__className = void 0, // @ts-expect-error
@@ -1182,25 +1182,25 @@ function mount(e2, t2) {
1182
1182
  }();
1183
1183
  var u2 = /* @__PURE__ */ new Set(), event_handle = (e4) => {
1184
1184
  for (var n3 = 0; n3 < e4.length; n3++) {
1185
- var i2 = e4[n3];
1186
- if (!u2.has(i2)) {
1187
- u2.add(i2);
1188
- var o3 = is_passive_event(i2);
1189
- t3.addEventListener(i2, handle_event_propagation, {
1190
- passive: o3
1185
+ var o2 = e4[n3];
1186
+ if (!u2.has(o2)) {
1187
+ u2.add(o2);
1188
+ var i3 = is_passive_event(o2);
1189
+ t3.addEventListener(o2, handle_event_propagation, {
1190
+ passive: i3
1191
1191
  });
1192
- var s2 = ae.get(i2);
1192
+ var s2 = ae.get(o2);
1193
1193
  void 0 === s2 ? (
1194
1194
  // The document listener ensures we catch events that originate from elements that were
1195
1195
  // manually moved outside of the container (e.g. via manual portals).
1196
- (document.addEventListener(i2, handle_event_propagation, {
1197
- passive: o3
1198
- }), ae.set(i2, 1))
1199
- ) : ae.set(i2, s2 + 1);
1196
+ (document.addEventListener(o2, handle_event_propagation, {
1197
+ passive: i3
1198
+ }), ae.set(o2, 1))
1199
+ ) : ae.set(o2, s2 + 1);
1200
1200
  }
1201
1201
  }
1202
1202
  };
1203
- event_handle(i(ie)), oe.add(event_handle);
1203
+ event_handle(o(oe)), ie.add(event_handle);
1204
1204
  var d2 = void 0, p2 = (
1205
1205
  /**
1206
1206
  * An effect root whose children can transition out
@@ -1215,25 +1215,25 @@ function mount(e2, t2) {
1215
1215
  }) : (destroy_effect(t4), n3(void 0));
1216
1216
  });
1217
1217
  }(() => {
1218
- var i2 = n2 ?? t3.appendChild(create_text());
1218
+ var o2 = n2 ?? t3.appendChild(create_text());
1219
1219
  return branch(() => {
1220
1220
  l2 && (push({}), /** @type {ComponentContext} */
1221
- T.c = l2);
1221
+ I.c = l2);
1222
1222
  a2 && // We can't spread the object or else we'd lose the state proxy stuff, if it is one
1223
1223
  /** @type {any} */
1224
- (o2.$$events = a2), se = c2, // @ts-expect-error the public typings are not what the actual function looks like
1225
- d2 = e3(i2, o2) || {}, se = true, l2 && pop();
1224
+ (i2.$$events = a2), se = c2, // @ts-expect-error the public typings are not what the actual function looks like
1225
+ d2 = e3(o2, i2) || {}, se = true, l2 && pop();
1226
1226
  }), () => {
1227
1227
  var _a2;
1228
1228
  for (var e4 of u2) {
1229
1229
  t3.removeEventListener(e4, handle_event_propagation);
1230
- var o3 = (
1230
+ var i3 = (
1231
1231
  /** @type {number} */
1232
1232
  ae.get(e4)
1233
1233
  );
1234
- 0 == --o3 ? (document.removeEventListener(e4, handle_event_propagation), ae.delete(e4)) : ae.set(e4, o3);
1234
+ 0 == --i3 ? (document.removeEventListener(e4, handle_event_propagation), ae.delete(e4)) : ae.set(e4, i3);
1235
1235
  }
1236
- oe.delete(event_handle), i2 !== n2 && ((_a2 = i2.parentNode) == null ? void 0 : _a2.removeChild(i2));
1236
+ ie.delete(event_handle), o2 !== n2 && ((_a2 = o2.parentNode) == null ? void 0 : _a2.removeChild(o2));
1237
1237
  };
1238
1238
  })
1239
1239
  );
@@ -1242,14 +1242,14 @@ function mount(e2, t2) {
1242
1242
  }
1243
1243
  const ae = /* @__PURE__ */ new Map();
1244
1244
  let le = /* @__PURE__ */ new WeakMap();
1245
- function if_block(e2, t2, [n2, i2] = [0, 0]) {
1246
- var o2 = e2, s2 = null, a2 = null, l2 = M, c2 = false;
1245
+ function if_block(e2, t2, [n2, o2] = [0, 0]) {
1246
+ var i2 = e2, s2 = null, a2 = null, l2 = M, c2 = false;
1247
1247
  const set_branch = (e3, t3 = true) => {
1248
1248
  c2 = true, update_branch(t3, e3);
1249
1249
  }, update_branch = (e3, t3) => {
1250
- l2 !== (l2 = e3) && (l2 ? (s2 ? resume_effect(s2) : t3 && (s2 = branch(() => t3(o2))), a2 && pause_effect(a2, () => {
1250
+ l2 !== (l2 = e3) && (l2 ? (s2 ? resume_effect(s2) : t3 && (s2 = branch(() => t3(i2))), a2 && pause_effect(a2, () => {
1251
1251
  a2 = null;
1252
- })) : (a2 ? resume_effect(a2) : t3 && (a2 = branch(() => t3(o2, [n2 + 1, i2]))), s2 && pause_effect(s2, () => {
1252
+ })) : (a2 ? resume_effect(a2) : t3 && (a2 = branch(() => t3(i2, [n2 + 1, o2]))), s2 && pause_effect(s2, () => {
1253
1253
  s2 = null;
1254
1254
  })));
1255
1255
  };
@@ -1264,7 +1264,7 @@ function set_current_each_item(e2) {
1264
1264
  function index(e2, t2) {
1265
1265
  return t2;
1266
1266
  }
1267
- function each(e2, n2, o2, s2, a2, l2 = null) {
1267
+ function each(e2, n2, i2, s2, a2, l2 = null) {
1268
1268
  var c2 = e2, u2 = {
1269
1269
  flags: n2,
1270
1270
  items: /* @__PURE__ */ new Map(),
@@ -1273,8 +1273,8 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1273
1273
  !(4 & n2) || (c2 = /** @type {Element} */
1274
1274
  e2.appendChild(create_text()));
1275
1275
  var d2 = null, f2 = false, p2 = /* @__PURE__ */ derived_safe_equal(() => {
1276
- var e3 = o2();
1277
- return t(e3) ? e3 : null == e3 ? [] : i(e3);
1276
+ var e3 = i2();
1277
+ return t(e3) ? e3 : null == e3 ? [] : o(e3);
1278
1278
  });
1279
1279
  block(() => {
1280
1280
  var e3 = get$1(p2), t2 = e3.length;
@@ -1290,20 +1290,20 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1290
1290
  * @param {() => V[]} get_collection
1291
1291
  * @returns {void}
1292
1292
  */
1293
- function reconcile(e4, t3, n3, o3, s3, a3, l3) {
1293
+ function reconcile(e4, t3, n3, i3, s3, a3, l3) {
1294
1294
  var _a2, _b2, _c2, _d;
1295
- var c3, u3, d3, f3, p3, _2, v2 = !!(8 & s3), g2 = !!(3 & s3), h2 = e4.length, m2 = t3.items, y2 = t3.first, $2 = y2, w2 = null, x2 = [], k2 = [];
1296
- if (v2) for (_2 = 0; _2 < h2; _2 += 1) f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = m2.get(f3)) && ((_a2 = p3.a) == null ? void 0 : _a2.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
1295
+ var c3, u3, d3, f3, p3, _2, g2 = !!(8 & s3), v2 = !!(3 & s3), h2 = e4.length, m2 = t3.items, y2 = t3.first, $2 = y2, w2 = null, x2 = [], k2 = [];
1296
+ if (g2) for (_2 = 0; _2 < h2; _2 += 1) f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = m2.get(f3)) && ((_a2 = p3.a) == null ? void 0 : _a2.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
1297
1297
  for (_2 = 0; _2 < h2; _2 += 1) if (f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = m2.get(f3))) {
1298
- if (g2 && update_item(p3, d3, _2, s3), p3.e.f & b && (resume_effect(p3.e), v2 && ((_b2 = p3.a) == null ? void 0 : _b2.unfix(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).delete(p3))), p3 !== $2) {
1298
+ if (v2 && update_item(p3, d3, _2, s3), p3.e.f & b && (resume_effect(p3.e), g2 && ((_b2 = p3.a) == null ? void 0 : _b2.unfix(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).delete(p3))), p3 !== $2) {
1299
1299
  if (void 0 !== c3 && c3.has(p3)) {
1300
1300
  if (x2.length < k2.length) {
1301
1301
  var C2, S2 = k2[0];
1302
1302
  w2 = S2.prev;
1303
- var M2 = x2[0], T2 = x2[x2.length - 1];
1303
+ var M2 = x2[0], I2 = x2[x2.length - 1];
1304
1304
  for (C2 = 0; C2 < x2.length; C2 += 1) move(x2[C2], S2, n3);
1305
1305
  for (C2 = 0; C2 < k2.length; C2 += 1) c3.delete(k2[C2]);
1306
- link(t3, M2.prev, T2.next), link(t3, w2, M2), link(t3, T2, S2), $2 = S2, w2 = T2, _2 -= 1, x2 = [], k2 = [];
1306
+ link(t3, M2.prev, I2.next), link(t3, w2, M2), link(t3, I2, S2), $2 = S2, w2 = I2, _2 -= 1, x2 = [], k2 = [];
1307
1307
  } else
1308
1308
  c3.delete(p3), move(p3, $2, n3), link(t3, p3.prev, p3.next), link(t3, p3, null === w2 ? t3.first : w2.next), link(t3, w2, p3), w2 = p3;
1309
1309
  continue;
@@ -1318,21 +1318,21 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1318
1318
  w2 = create_item($2 ? (
1319
1319
  /** @type {TemplateNode} */
1320
1320
  $2.e.nodes_start
1321
- ) : n3, t3, w2, null === w2 ? t3.first : w2.next, d3, f3, _2, o3, s3, l3), m2.set(f3, w2), x2 = [], k2 = [], $2 = w2.next;
1321
+ ) : n3, t3, w2, null === w2 ? t3.first : w2.next, d3, f3, _2, i3, s3, l3), m2.set(f3, w2), x2 = [], k2 = [], $2 = w2.next;
1322
1322
  }
1323
1323
  if (null !== $2 || void 0 !== c3) {
1324
- for (var I2 = void 0 === c3 ? [] : i(c3); null !== $2; )
1325
- $2.e.f & b || I2.push($2), $2 = $2.next;
1326
- var q2 = I2.length;
1324
+ for (var T2 = void 0 === c3 ? [] : o(c3); null !== $2; )
1325
+ $2.e.f & b || T2.push($2), $2 = $2.next;
1326
+ var q2 = T2.length;
1327
1327
  if (q2 > 0) {
1328
1328
  var P2 = 4 & s3 && 0 === h2 ? n3 : null;
1329
- if (v2) {
1330
- for (_2 = 0; _2 < q2; _2 += 1) (_c2 = I2[_2].a) == null ? void 0 : _c2.measure();
1331
- for (_2 = 0; _2 < q2; _2 += 1) (_d = I2[_2].a) == null ? void 0 : _d.fix();
1329
+ if (g2) {
1330
+ for (_2 = 0; _2 < q2; _2 += 1) (_c2 = T2[_2].a) == null ? void 0 : _c2.measure();
1331
+ for (_2 = 0; _2 < q2; _2 += 1) (_d = T2[_2].a) == null ? void 0 : _d.fix();
1332
1332
  }
1333
- !function pause_effects(e5, t4, n4, i2) {
1334
- for (var o4 = [], s4 = t4.length, a4 = 0; a4 < s4; a4++) pause_children(t4[a4].e, o4, true);
1335
- var l4 = s4 > 0 && 0 === o4.length && null !== n4;
1333
+ !function pause_effects(e5, t4, n4, o2) {
1334
+ for (var i4 = [], s4 = t4.length, a4 = 0; a4 < s4; a4++) pause_children(t4[a4].e, i4, true);
1335
+ var l4 = s4 > 0 && 0 === i4.length && null !== n4;
1336
1336
  if (l4) {
1337
1337
  var c4 = (
1338
1338
  /** @type {Element} */
@@ -1344,24 +1344,24 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1344
1344
  }(c4), c4.append(
1345
1345
  /** @type {Element} */
1346
1346
  n4
1347
- ), i2.clear(), link(e5, t4[0].prev, t4[s4 - 1].next);
1347
+ ), o2.clear(), link(e5, t4[0].prev, t4[s4 - 1].next);
1348
1348
  }
1349
- run_out_transitions(o4, () => {
1349
+ run_out_transitions(i4, () => {
1350
1350
  for (var n5 = 0; n5 < s4; n5++) {
1351
- var o5 = t4[n5];
1352
- l4 || (i2.delete(o5.k), link(e5, o5.prev, o5.next)), destroy_effect(o5.e, !l4);
1351
+ var i5 = t4[n5];
1352
+ l4 || (o2.delete(i5.k), link(e5, i5.prev, i5.next)), destroy_effect(i5.e, !l4);
1353
1353
  }
1354
1354
  });
1355
- }(t3, I2, P2, m2);
1355
+ }(t3, T2, P2, m2);
1356
1356
  }
1357
1357
  }
1358
- v2 && queue_micro_task(() => {
1358
+ g2 && queue_micro_task(() => {
1359
1359
  var _a3;
1360
1360
  if (void 0 !== u3) for (p3 of u3) (_a3 = p3.a) == null ? void 0 : _a3.apply();
1361
1361
  });
1362
1362
  H.first = t3.first && t3.first.e, /** @type {Effect} */
1363
1363
  H.last = w2 && w2.e;
1364
- }(e3, u2, c2, a2, n2, s2, o2), null !== l2 && (0 === t2 ? d2 ? resume_effect(d2) : d2 = branch(() => l2(c2)) : null !== d2 && pause_effect(d2, () => {
1364
+ }(e3, u2, c2, a2, n2, s2, i2), null !== l2 && (0 === t2 ? d2 ? resume_effect(d2) : d2 = branch(() => l2(c2)) : null !== d2 && pause_effect(d2, () => {
1365
1365
  d2 = null;
1366
1366
  })), // When we mount the each block for the first time, the collection won't be
1367
1367
  // connected to this effect as the effect hasn't finished running yet and its deps
@@ -1372,15 +1372,15 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1372
1372
  get$1(p2));
1373
1373
  });
1374
1374
  }
1375
- function update_item(e2, t2, n2, i2) {
1376
- 1 & i2 && internal_set(e2.v, t2), 2 & i2 ? internal_set(
1375
+ function update_item(e2, t2, n2, o2) {
1376
+ 1 & o2 && internal_set(e2.v, t2), 2 & o2 ? internal_set(
1377
1377
  /** @type {Value<number>} */
1378
1378
  e2.i,
1379
1379
  n2
1380
1380
  ) : e2.i = n2;
1381
1381
  }
1382
- function create_item(e2, t2, n2, i2, o2, s2, a2, l2, c2, u2) {
1383
- var d2 = ce, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(o2) : source(o2) : o2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1382
+ function create_item(e2, t2, n2, o2, i2, s2, a2, l2, c2, u2) {
1383
+ var d2 = ce, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(i2) : source(i2) : i2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1384
1384
  i: p2,
1385
1385
  v: f2,
1386
1386
  k: s2,
@@ -1388,110 +1388,110 @@ function create_item(e2, t2, n2, i2, o2, s2, a2, l2, c2, u2) {
1388
1388
  // @ts-expect-error
1389
1389
  e: null,
1390
1390
  prev: n2,
1391
- next: i2
1391
+ next: o2
1392
1392
  };
1393
1393
  ce = _2;
1394
1394
  try {
1395
- return _2.e = branch(() => l2(e2, f2, p2, u2), false), _2.e.prev = n2 && n2.e, _2.e.next = i2 && i2.e, null === n2 ? t2.first = _2 : (n2.next = _2, n2.e.next = _2.e), null !== i2 && (i2.prev = _2, i2.e.prev = _2.e), _2;
1395
+ return _2.e = branch(() => l2(e2, f2, p2, u2), false), _2.e.prev = n2 && n2.e, _2.e.next = o2 && o2.e, null === n2 ? t2.first = _2 : (n2.next = _2, n2.e.next = _2.e), null !== o2 && (o2.prev = _2, o2.e.prev = _2.e), _2;
1396
1396
  } finally {
1397
1397
  ce = d2;
1398
1398
  }
1399
1399
  }
1400
1400
  function move(e2, t2, n2) {
1401
- for (var i2 = e2.next ? (
1401
+ for (var o2 = e2.next ? (
1402
1402
  /** @type {TemplateNode} */
1403
1403
  e2.next.e.nodes_start
1404
- ) : n2, o2 = t2 ? (
1404
+ ) : n2, i2 = t2 ? (
1405
1405
  /** @type {TemplateNode} */
1406
1406
  t2.e.nodes_start
1407
1407
  ) : n2, s2 = (
1408
1408
  /** @type {TemplateNode} */
1409
1409
  e2.e.nodes_start
1410
- ); s2 !== i2; ) {
1410
+ ); s2 !== o2; ) {
1411
1411
  var a2 = (
1412
1412
  /** @type {TemplateNode} */
1413
1413
  /* @__PURE__ */ get_next_sibling(s2)
1414
1414
  );
1415
- o2.before(s2), s2 = a2;
1415
+ i2.before(s2), s2 = a2;
1416
1416
  }
1417
1417
  }
1418
1418
  function link(e2, t2, n2) {
1419
1419
  null === t2 ? e2.first = n2 : (t2.next = n2, t2.e.next = n2 && n2.e), null !== n2 && (n2.prev = t2, n2.e.prev = t2 && t2.e);
1420
1420
  }
1421
- function slot(e2, t2, n2, i2, o2) {
1421
+ function slot(e2, t2, n2, o2, i2) {
1422
1422
  var _a2;
1423
1423
  var s2 = (_a2 = t2.$$slots) == null ? void 0 : _a2[n2], a2 = false;
1424
- true === s2 && (s2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === s2 ? null !== o2 && o2(e2) : s2(e2, a2 ? () => i2 : i2);
1424
+ true === s2 && (s2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === s2 ? null !== i2 && i2(e2) : s2(e2, a2 ? () => o2 : o2);
1425
1425
  }
1426
1426
  function component(e2, t2, n2) {
1427
- var i2, o2, s2 = e2;
1427
+ var o2, i2, s2 = e2;
1428
1428
  block(() => {
1429
- i2 !== (i2 = t2()) && (o2 && (pause_effect(o2), o2 = null), i2 && (o2 = branch(() => n2(s2, i2))));
1429
+ o2 !== (o2 = t2()) && (i2 && (pause_effect(i2), i2 = null), o2 && (i2 = branch(() => n2(s2, o2))));
1430
1430
  }, $);
1431
1431
  }
1432
1432
  function r(e2) {
1433
- var t2, n2, i2 = "";
1434
- if ("string" == typeof e2 || "number" == typeof e2) i2 += e2;
1433
+ var t2, n2, o2 = "";
1434
+ if ("string" == typeof e2 || "number" == typeof e2) o2 += e2;
1435
1435
  else if ("object" == typeof e2) if (Array.isArray(e2)) {
1436
- var o2 = e2.length;
1437
- for (t2 = 0; t2 < o2; t2++) e2[t2] && (n2 = r(e2[t2])) && (i2 && (i2 += " "), i2 += n2);
1438
- } else for (n2 in e2) e2[n2] && (i2 && (i2 += " "), i2 += n2);
1439
- return i2;
1436
+ var i2 = e2.length;
1437
+ for (t2 = 0; t2 < i2; t2++) e2[t2] && (n2 = r(e2[t2])) && (o2 && (o2 += " "), o2 += n2);
1438
+ } else for (n2 in e2) e2[n2] && (o2 && (o2 += " "), o2 += n2);
1439
+ return o2;
1440
1440
  }
1441
1441
  function clsx(e2) {
1442
1442
  return "object" == typeof e2 ? function clsx$1() {
1443
- for (var e3, t2, n2 = 0, i2 = "", o2 = arguments.length; n2 < o2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (i2 && (i2 += " "), i2 += t2);
1444
- return i2;
1443
+ for (var e3, t2, n2 = 0, o2 = "", i2 = arguments.length; n2 < i2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (o2 && (o2 += " "), o2 += t2);
1444
+ return o2;
1445
1445
  }(e2) : e2 ?? "";
1446
1446
  }
1447
1447
  const ue = [..." \n\r\f \v\uFEFF"];
1448
1448
  function append_styles(e2, t2 = false) {
1449
- var n2 = t2 ? " !important;" : ";", i2 = "";
1450
- for (var o2 in e2) {
1451
- var s2 = e2[o2];
1452
- null != s2 && "" !== s2 && (i2 += " " + o2 + ": " + s2 + n2);
1449
+ var n2 = t2 ? " !important;" : ";", o2 = "";
1450
+ for (var i2 in e2) {
1451
+ var s2 = e2[i2];
1452
+ null != s2 && "" !== s2 && (o2 += " " + i2 + ": " + s2 + n2);
1453
1453
  }
1454
- return i2;
1454
+ return o2;
1455
1455
  }
1456
1456
  function to_css_name(e2) {
1457
1457
  return "-" !== e2[0] || "-" !== e2[1] ? e2.toLowerCase() : e2;
1458
1458
  }
1459
- function set_class(e2, t2, n2, i2, o2, s2) {
1459
+ function set_class(e2, t2, n2, o2, i2, s2) {
1460
1460
  if (e2.__className !== n2) {
1461
1461
  var a2 = function to_class(e3, t3, n3) {
1462
- var i3 = null == e3 ? "" : "" + e3;
1463
- if (t3 && (i3 = i3 ? i3 + " " + t3 : t3), n3) {
1464
- for (var o3 in n3) if (n3[o3]) i3 = i3 ? i3 + " " + o3 : o3;
1465
- else if (i3.length) for (var s3 = o3.length, a3 = 0; (a3 = i3.indexOf(o3, a3)) >= 0; ) {
1462
+ var o3 = null == e3 ? "" : "" + e3;
1463
+ if (t3 && (o3 = o3 ? o3 + " " + t3 : t3), n3) {
1464
+ for (var i3 in n3) if (n3[i3]) o3 = o3 ? o3 + " " + i3 : i3;
1465
+ else if (o3.length) for (var s3 = i3.length, a3 = 0; (a3 = o3.indexOf(i3, a3)) >= 0; ) {
1466
1466
  var l3 = a3 + s3;
1467
- 0 !== a3 && !ue.includes(i3[a3 - 1]) || l3 !== i3.length && !ue.includes(i3[l3]) ? a3 = l3 : i3 = (0 === a3 ? "" : i3.substring(0, a3)) + i3.substring(l3 + 1);
1467
+ 0 !== a3 && !ue.includes(o3[a3 - 1]) || l3 !== o3.length && !ue.includes(o3[l3]) ? a3 = l3 : o3 = (0 === a3 ? "" : o3.substring(0, a3)) + o3.substring(l3 + 1);
1468
1468
  }
1469
1469
  }
1470
- return "" === i3 ? null : i3;
1471
- }(n2, i2, s2);
1470
+ return "" === o3 ? null : o3;
1471
+ }(n2, o2, s2);
1472
1472
  null == a2 ? e2.removeAttribute("class") : t2 ? e2.className = a2 : e2.setAttribute("class", a2), // @ts-expect-error need to add __className to patched prototype
1473
1473
  e2.__className = n2;
1474
- } else if (s2 && o2 !== s2) for (var l2 in s2) {
1474
+ } else if (s2 && i2 !== s2) for (var l2 in s2) {
1475
1475
  var c2 = !!s2[l2];
1476
- null != o2 && c2 === !!o2[l2] || e2.classList.toggle(l2, c2);
1476
+ null != i2 && c2 === !!i2[l2] || e2.classList.toggle(l2, c2);
1477
1477
  }
1478
1478
  return s2;
1479
1479
  }
1480
- function update_styles(e2, t2 = {}, n2, i2) {
1481
- for (var o2 in n2) {
1482
- var s2 = n2[o2];
1483
- t2[o2] !== s2 && (null == n2[o2] ? e2.style.removeProperty(o2) : e2.style.setProperty(o2, s2, i2));
1480
+ function update_styles(e2, t2 = {}, n2, o2) {
1481
+ for (var i2 in n2) {
1482
+ var s2 = n2[i2];
1483
+ t2[i2] !== s2 && (null == n2[i2] ? e2.style.removeProperty(i2) : e2.style.setProperty(i2, s2, o2));
1484
1484
  }
1485
1485
  }
1486
- function set_style(e2, t2, n2, i2) {
1486
+ function set_style(e2, t2, n2, o2) {
1487
1487
  if (e2.__style !== t2) {
1488
- var o2 = function to_style(e3, t3) {
1488
+ var i2 = function to_style(e3, t3) {
1489
1489
  if (t3) {
1490
- var n3, i3, o3 = "";
1491
- if (Array.isArray(t3) ? (n3 = t3[0], i3 = t3[1]) : n3 = t3, e3) {
1490
+ var n3, o3, i3 = "";
1491
+ if (Array.isArray(t3) ? (n3 = t3[0], o3 = t3[1]) : n3 = t3, e3) {
1492
1492
  e3 = String(e3).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1493
1493
  var s2 = false, a2 = 0, l2 = false, c2 = [];
1494
- n3 && c2.push(...Object.keys(n3).map(to_css_name)), i3 && c2.push(...Object.keys(i3).map(to_css_name));
1494
+ n3 && c2.push(...Object.keys(n3).map(to_css_name)), o3 && c2.push(...Object.keys(o3).map(to_css_name));
1495
1495
  var u2 = 0, d2 = -1;
1496
1496
  const t4 = e3.length;
1497
1497
  for (var f2 = 0; f2 < t4; f2++) {
@@ -1501,21 +1501,21 @@ function set_style(e2, t2, n2, i2) {
1501
1501
  else if (";" === p2 || f2 === t4 - 1) {
1502
1502
  if (-1 !== d2) {
1503
1503
  var _2 = to_css_name(e3.substring(u2, d2).trim());
1504
- c2.includes(_2) || (";" !== p2 && f2++, o3 += " " + e3.substring(u2, f2).trim() + ";");
1504
+ c2.includes(_2) || (";" !== p2 && f2++, i3 += " " + e3.substring(u2, f2).trim() + ";");
1505
1505
  }
1506
1506
  u2 = f2 + 1, d2 = -1;
1507
1507
  }
1508
1508
  }
1509
1509
  }
1510
1510
  }
1511
- return n3 && (o3 += append_styles(n3)), i3 && (o3 += append_styles(i3, true)), "" === (o3 = o3.trim()) ? null : o3;
1511
+ return n3 && (i3 += append_styles(n3)), o3 && (i3 += append_styles(o3, true)), "" === (i3 = i3.trim()) ? null : i3;
1512
1512
  }
1513
1513
  return null == e3 ? null : String(e3);
1514
- }(t2, i2);
1515
- null == o2 ? e2.removeAttribute("style") : e2.style.cssText = o2, // @ts-expect-error
1514
+ }(t2, o2);
1515
+ null == i2 ? e2.removeAttribute("style") : e2.style.cssText = i2, // @ts-expect-error
1516
1516
  e2.__style = t2;
1517
- } else i2 && (Array.isArray(i2) ? (update_styles(e2, n2 == null ? void 0 : n2[0], i2[0]), update_styles(e2, n2 == null ? void 0 : n2[1], i2[1], "important")) : update_styles(e2, n2, i2));
1518
- return i2;
1517
+ } else o2 && (Array.isArray(o2) ? (update_styles(e2, n2 == null ? void 0 : n2[0], o2[0]), update_styles(e2, n2 == null ? void 0 : n2[1], o2[1], "important")) : update_styles(e2, n2, o2));
1518
+ return o2;
1519
1519
  }
1520
1520
  const de = Symbol("class"), fe = Symbol("style"), pe = Symbol("is custom element"), _e = Symbol("is html");
1521
1521
  function set_selected(e2, t2) {
@@ -1525,18 +1525,18 @@ function set_selected(e2, t2) {
1525
1525
  e2.hasAttribute("selected") || e2.setAttribute("selected", "")
1526
1526
  ) : e2.removeAttribute("selected");
1527
1527
  }
1528
- function set_attribute(e2, t2, n2, i2) {
1529
- var o2 = get_attributes(e2);
1530
- o2[t2] !== (o2[t2] = n2) && ("loading" === t2 && // @ts-expect-error
1528
+ function set_attribute(e2, t2, n2, o2) {
1529
+ var i2 = get_attributes(e2);
1530
+ i2[t2] !== (i2[t2] = n2) && ("loading" === t2 && // @ts-expect-error
1531
1531
  (e2[C] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
1532
1532
  // @ts-ignore
1533
1533
  e2[t2] = n2
1534
1534
  ) : e2.setAttribute(t2, n2));
1535
1535
  }
1536
- function set_attributes(e2, t2, n2, i2, o2 = false) {
1536
+ function set_attributes(e2, t2, n2, o2, i2 = false) {
1537
1537
  var s2 = get_attributes(e2), a2 = s2[pe], l2 = !s2[_e], c2 = t2 || {}, u2 = "OPTION" === e2.tagName;
1538
1538
  for (var d2 in t2) d2 in n2 || (n2[d2] = null);
1539
- n2.class ? n2.class = clsx(n2.class) : (i2 || n2[de]) && (n2.class = null), n2[fe] && (n2.style ?? (n2.style = null));
1539
+ n2.class ? n2.class = clsx(n2.class) : (o2 || n2[de]) && (n2.class = null), n2[fe] && (n2.style ?? (n2.style = null));
1540
1540
  var f2 = get_setters(e2);
1541
1541
  for (const m2 in n2) {
1542
1542
  let b2 = n2[m2];
@@ -1550,12 +1550,12 @@ function set_attributes(e2, t2, n2, i2, o2 = false) {
1550
1550
  if ("$$" !== _2) if ("on" === _2) {
1551
1551
  const y2 = {}, $2 = "$$" + m2;
1552
1552
  let w2 = m2.slice(2);
1553
- var v2 = is_delegated(w2);
1554
- if (is_capture_event(w2) && (w2 = w2.slice(0, -7), y2.capture = true), !v2 && p2) {
1553
+ var g2 = is_delegated(w2);
1554
+ if (is_capture_event(w2) && (w2 = w2.slice(0, -7), y2.capture = true), !g2 && p2) {
1555
1555
  if (null != b2) continue;
1556
1556
  e2.removeEventListener(w2, c2[$2], y2), c2[$2] = null;
1557
1557
  }
1558
- if (null != b2) if (v2)
1558
+ if (null != b2) if (g2)
1559
1559
  e2[`__${w2}`] = b2, delegate([w2]);
1560
1560
  else {
1561
1561
  let handle = function(e3) {
@@ -1563,7 +1563,7 @@ function set_attributes(e2, t2, n2, i2, o2 = false) {
1563
1563
  };
1564
1564
  c2[$2] = create_event(w2, e2, handle, y2);
1565
1565
  }
1566
- else v2 && // @ts-ignore
1566
+ else g2 && // @ts-ignore
1567
1567
  (e2[`__${w2}`] = void 0);
1568
1568
  } else if ("style" === m2)
1569
1569
  set_attribute(e2, m2, b2);
@@ -1578,26 +1578,26 @@ function set_attributes(e2, t2, n2, i2, o2 = false) {
1578
1578
  b2
1579
1579
  );
1580
1580
  else {
1581
- var g2 = m2;
1582
- l2 || (g2 = normalize_attribute(g2));
1583
- var h2 = "defaultValue" === g2 || "defaultChecked" === g2;
1584
- if (null != b2 || a2 || h2) h2 || f2.includes(g2) && (a2 || "string" != typeof b2) ? (
1581
+ var v2 = m2;
1582
+ l2 || (v2 = normalize_attribute(v2));
1583
+ var h2 = "defaultValue" === v2 || "defaultChecked" === v2;
1584
+ if (null != b2 || a2 || h2) h2 || f2.includes(v2) && (a2 || "string" != typeof b2) ? (
1585
1585
  // @ts-ignore
1586
- e2[g2] = b2
1587
- ) : "function" != typeof b2 && set_attribute(e2, g2, b2);
1588
- else if (s2[m2] = null, "value" === g2 || "checked" === g2) {
1586
+ e2[v2] = b2
1587
+ ) : "function" != typeof b2 && set_attribute(e2, v2, b2);
1588
+ else if (s2[m2] = null, "value" === v2 || "checked" === v2) {
1589
1589
  let x2 = (
1590
1590
  /** @type {HTMLInputElement} */
1591
1591
  e2
1592
1592
  );
1593
1593
  const k2 = void 0 === t2;
1594
- if ("value" === g2) {
1594
+ if ("value" === v2) {
1595
1595
  let C2 = x2.defaultValue;
1596
- x2.removeAttribute(g2), x2.defaultValue = C2, // @ts-ignore
1596
+ x2.removeAttribute(v2), x2.defaultValue = C2, // @ts-ignore
1597
1597
  x2.value = x2.__value = k2 ? C2 : null;
1598
1598
  } else {
1599
1599
  let S2 = x2.defaultChecked;
1600
- x2.removeAttribute(g2), x2.defaultChecked = S2, x2.checked = !!k2 && S2;
1600
+ x2.removeAttribute(v2), x2.defaultChecked = S2, x2.checked = !!k2 && S2;
1601
1601
  }
1602
1602
  } else e2.removeAttribute(m2);
1603
1603
  }
@@ -1605,7 +1605,7 @@ function set_attributes(e2, t2, n2, i2, o2 = false) {
1605
1605
  e2.value = e2.__value = b2;
1606
1606
  }
1607
1607
  } else set_style(e2, b2, t2 == null ? void 0 : t2[fe], n2[fe]), c2[m2] = b2, c2[fe] = n2[fe];
1608
- else set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, i2, t2 == null ? void 0 : t2[de], n2[de]), c2[m2] = b2, c2[de] = n2[de];
1608
+ else set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, o2, t2 == null ? void 0 : t2[de], n2[de]), c2[m2] = b2, c2[de] = n2[de];
1609
1609
  }
1610
1610
  return c2;
1611
1611
  }
@@ -1615,18 +1615,18 @@ function get_attributes(e2) {
1615
1615
  [_e]: "http://www.w3.org/1999/xhtml" === e2.namespaceURI
1616
1616
  });
1617
1617
  }
1618
- var ve = /* @__PURE__ */ new Map();
1618
+ var ge = /* @__PURE__ */ new Map();
1619
1619
  function get_setters(e2) {
1620
- var t2, n2 = ve.get(e2.nodeName);
1620
+ var t2, n2 = ge.get(e2.nodeName);
1621
1621
  if (n2) return n2;
1622
- ve.set(e2.nodeName, n2 = []);
1623
- for (var i2 = e2, o2 = Element.prototype; o2 !== i2; ) {
1624
- for (var s2 in t2 = a(i2)) t2[s2].set && n2.push(s2);
1625
- i2 = u(i2);
1622
+ ge.set(e2.nodeName, n2 = []);
1623
+ for (var o2 = e2, i2 = Element.prototype; i2 !== o2; ) {
1624
+ for (var s2 in t2 = a(o2)) t2[s2].set && n2.push(s2);
1625
+ o2 = u(o2);
1626
1626
  }
1627
1627
  return n2;
1628
1628
  }
1629
- const ge = {
1629
+ const ve = {
1630
1630
  // don't access requestAnimationFrame eagerly outside method
1631
1631
  // this allows basic testing of user code without JSDOM
1632
1632
  // bunder will eval and remove ternary when the user's app is built
@@ -1638,10 +1638,10 @@ const ge = {
1638
1638
  tasks: /* @__PURE__ */ new Set()
1639
1639
  };
1640
1640
  function run_tasks() {
1641
- const e2 = ge.now();
1642
- ge.tasks.forEach((t2) => {
1643
- t2.c(e2) || (ge.tasks.delete(t2), t2.f());
1644
- }), 0 !== ge.tasks.size && ge.tick(run_tasks);
1641
+ const e2 = ve.now();
1642
+ ve.tasks.forEach((t2) => {
1643
+ t2.c(e2) || (ve.tasks.delete(t2), t2.f());
1644
+ }), 0 !== ve.tasks.size && ve.tick(run_tasks);
1645
1645
  }
1646
1646
  function dispatch_event(e2, t2) {
1647
1647
  without_reactive_context(() => {
@@ -1661,20 +1661,20 @@ function css_property_to_camelcase(e2) {
1661
1661
  function css_to_keyframe(e2) {
1662
1662
  const t2 = {}, n2 = e2.split(";");
1663
1663
  for (const e3 of n2) {
1664
- const [n3, i2] = e3.split(":");
1665
- if (!n3 || void 0 === i2) break;
1666
- t2[css_property_to_camelcase(n3.trim())] = i2.trim();
1664
+ const [n3, o2] = e3.split(":");
1665
+ if (!n3 || void 0 === o2) break;
1666
+ t2[css_property_to_camelcase(n3.trim())] = o2.trim();
1667
1667
  }
1668
1668
  return t2;
1669
1669
  }
1670
1670
  const linear = (e2) => e2;
1671
- function transition(e2, t2, n2, i2) {
1672
- var o2, s2, a2, l2 = !!(4 & e2), c2 = t2.inert, u2 = t2.style.overflow;
1671
+ function transition(e2, t2, n2, o2) {
1672
+ var i2, s2, a2, l2 = !!(4 & e2), c2 = t2.inert, u2 = t2.style.overflow;
1673
1673
  function get_options() {
1674
- var e3 = F, s3 = H;
1674
+ var e3 = G, s3 = H;
1675
1675
  set_active_reaction(null), set_active_effect(null);
1676
1676
  try {
1677
- return o2 ?? (o2 = n2()(t2, (i2 == null ? void 0 : i2()) ?? /** @type {P} */
1677
+ return i2 ?? (i2 = n2()(t2, (o2 == null ? void 0 : o2()) ?? /** @type {P} */
1678
1678
  {}, {
1679
1679
  direction: "both"
1680
1680
  }));
@@ -1687,7 +1687,7 @@ function transition(e2, t2, n2, i2) {
1687
1687
  in() {
1688
1688
  t2.inert = c2, dispatch_event(t2, "introstart"), s2 = animate(t2, get_options(), a2, 1, () => {
1689
1689
  dispatch_event(t2, "introend"), // Ensure we cancel the animation to prevent leaking
1690
- s2 == null ? void 0 : s2.abort(), s2 = o2 = void 0, t2.style.overflow = u2;
1690
+ s2 == null ? void 0 : s2.abort(), s2 = i2 = void 0, t2.style.overflow = u2;
1691
1691
  });
1692
1692
  },
1693
1693
  out(e3) {
@@ -1716,8 +1716,8 @@ function transition(e2, t2, n2, i2) {
1716
1716
  });
1717
1717
  }
1718
1718
  }
1719
- function animate(e2, t2, n2, i2, o2) {
1720
- var s2 = 1 === i2;
1719
+ function animate(e2, t2, n2, o2, i2) {
1720
+ var s2 = 1 === o2;
1721
1721
  if (is_function(t2)) {
1722
1722
  var a2, l2 = false;
1723
1723
  return queue_micro_task(() => {
@@ -1725,7 +1725,7 @@ function animate(e2, t2, n2, i2, o2) {
1725
1725
  var c3 = t2({
1726
1726
  direction: s2 ? "in" : "out"
1727
1727
  });
1728
- a2 = animate(e2, c3, n2, i2, o2);
1728
+ a2 = animate(e2, c3, n2, o2, i2);
1729
1729
  }
1730
1730
  }), {
1731
1731
  abort: () => {
@@ -1736,11 +1736,11 @@ function animate(e2, t2, n2, i2, o2) {
1736
1736
  t: () => a2.t()
1737
1737
  };
1738
1738
  }
1739
- if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return o2(), {
1739
+ if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return i2(), {
1740
1740
  abort: noop,
1741
1741
  deactivate: noop,
1742
1742
  reset: noop,
1743
- t: () => i2
1743
+ t: () => o2
1744
1744
  };
1745
1745
  const { delay: c2 = 0, css: u2, tick: d2, easing: f2 = linear } = t2;
1746
1746
  var p2 = [];
@@ -1748,21 +1748,21 @@ function animate(e2, t2, n2, i2, o2) {
1748
1748
  var _2 = css_to_keyframe(u2(0, 1));
1749
1749
  p2.push(_2, _2);
1750
1750
  }
1751
- var get_t = () => 1 - i2, v2 = e2.animate(p2, {
1751
+ var get_t = () => 1 - o2, g2 = e2.animate(p2, {
1752
1752
  duration: c2
1753
1753
  });
1754
- return v2.onfinish = () => {
1755
- var s3 = (n2 == null ? void 0 : n2.t()) ?? 1 - i2;
1754
+ return g2.onfinish = () => {
1755
+ var s3 = (n2 == null ? void 0 : n2.t()) ?? 1 - o2;
1756
1756
  n2 == null ? void 0 : n2.abort();
1757
- var a3 = i2 - s3, l3 = (
1757
+ var a3 = o2 - s3, l3 = (
1758
1758
  /** @type {number} */
1759
1759
  t2.duration * Math.abs(a3)
1760
1760
  ), c3 = [];
1761
1761
  if (l3 > 0) {
1762
1762
  var p3 = false;
1763
1763
  if (u2)
1764
- for (var _3 = Math.ceil(l3 / (1e3 / 60)), g2 = 0; g2 <= _3; g2 += 1) {
1765
- var h2 = s3 + a3 * f2(g2 / _3), m2 = css_to_keyframe(u2(h2, 1 - h2));
1764
+ for (var _3 = Math.ceil(l3 / (1e3 / 60)), v2 = 0; v2 <= _3; v2 += 1) {
1765
+ var h2 = s3 + a3 * f2(v2 / _3), m2 = css_to_keyframe(u2(h2, 1 - h2));
1766
1766
  c3.push(m2), p3 || (p3 = "hidden" === m2.overflow);
1767
1767
  }
1768
1768
  p3 && /** @type {HTMLElement} */
@@ -1770,47 +1770,47 @@ function animate(e2, t2, n2, i2, o2) {
1770
1770
  var e3 = (
1771
1771
  /** @type {number} */
1772
1772
  /** @type {globalThis.Animation} */
1773
- v2.currentTime
1773
+ g2.currentTime
1774
1774
  );
1775
1775
  return s3 + a3 * f2(e3 / l3);
1776
1776
  }, d2 && function loop(e3) {
1777
1777
  let t3;
1778
- return 0 === ge.tasks.size && ge.tick(run_tasks), {
1778
+ return 0 === ve.tasks.size && ve.tick(run_tasks), {
1779
1779
  promise: new Promise((n3) => {
1780
- ge.tasks.add(t3 = {
1780
+ ve.tasks.add(t3 = {
1781
1781
  c: e3,
1782
1782
  f: n3
1783
1783
  });
1784
1784
  }),
1785
1785
  abort() {
1786
- ge.tasks.delete(t3);
1786
+ ve.tasks.delete(t3);
1787
1787
  }
1788
1788
  };
1789
1789
  }(() => {
1790
- if ("running" !== v2.playState) return false;
1790
+ if ("running" !== g2.playState) return false;
1791
1791
  var e3 = get_t();
1792
1792
  return d2(e3, 1 - e3), true;
1793
1793
  });
1794
1794
  }
1795
- (v2 = e2.animate(c3, {
1795
+ (g2 = e2.animate(c3, {
1796
1796
  duration: l3,
1797
1797
  fill: "forwards"
1798
1798
  })).onfinish = () => {
1799
- get_t = () => i2, d2 == null ? void 0 : d2(i2, 1 - i2), o2();
1799
+ get_t = () => o2, d2 == null ? void 0 : d2(o2, 1 - o2), i2();
1800
1800
  };
1801
1801
  }, {
1802
1802
  abort: () => {
1803
- v2 && (v2.cancel(), // This prevents memory leaks in Chromium
1804
- v2.effect = null, // This prevents onfinish to be launched after cancel(),
1803
+ g2 && (g2.cancel(), // This prevents memory leaks in Chromium
1804
+ g2.effect = null, // This prevents onfinish to be launched after cancel(),
1805
1805
  // which can happen in some rare cases
1806
1806
  // see https://github.com/sveltejs/svelte/issues/13681
1807
- v2.onfinish = noop);
1807
+ g2.onfinish = noop);
1808
1808
  },
1809
1809
  deactivate: () => {
1810
- o2 = noop;
1810
+ i2 = noop;
1811
1811
  },
1812
1812
  reset: () => {
1813
- 0 === i2 && (d2 == null ? void 0 : d2(1, 0));
1813
+ 0 === o2 && (d2 == null ? void 0 : d2(1, 0));
1814
1814
  },
1815
1815
  t: () => get_t()
1816
1816
  };
@@ -1825,19 +1825,19 @@ function to_number(e2) {
1825
1825
  function is_bound_this(e2, t2) {
1826
1826
  return e2 === t2 || (e2 == null ? void 0 : e2[x]) === t2;
1827
1827
  }
1828
- function bind_this(e2 = {}, t2, n2, i2) {
1828
+ function bind_this(e2 = {}, t2, n2, o2) {
1829
1829
  return effect(() => {
1830
- var i3, o2;
1830
+ var o3, i2;
1831
1831
  return render_effect(() => {
1832
- i3 = o2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
1833
- o2 = [], untrack(() => {
1834
- e2 !== n2(...o2) && (t2(e2, ...o2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
1832
+ o3 = i2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
1833
+ i2 = [], untrack(() => {
1834
+ e2 !== n2(...i2) && (t2(e2, ...i2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
1835
1835
  // the previous position if it isn't already taken over by a different effect.
1836
- i3 && is_bound_this(n2(...i3), e2) && t2(null, ...i3));
1836
+ o3 && is_bound_this(n2(...o3), e2) && t2(null, ...o3));
1837
1837
  });
1838
1838
  }), () => {
1839
1839
  queue_micro_task(() => {
1840
- o2 && is_bound_this(n2(...o2), e2) && t2(null, ...o2);
1840
+ i2 && is_bound_this(n2(...i2), e2) && t2(null, ...i2);
1841
1841
  });
1842
1842
  };
1843
1843
  }), e2;
@@ -1845,7 +1845,7 @@ function bind_this(e2 = {}, t2, n2, i2) {
1845
1845
  function init(e2 = false) {
1846
1846
  const t2 = (
1847
1847
  /** @type {ComponentContextLegacy} */
1848
- T
1848
+ I
1849
1849
  ), n2 = t2.l.u;
1850
1850
  if (!n2) return;
1851
1851
  let props = () => deep_read_state(t2.s);
@@ -1854,13 +1854,13 @@ function init(e2 = false) {
1854
1854
  /** @type {Record<string, any>} */
1855
1855
  {}
1856
1856
  );
1857
- const i2 = /* @__PURE__ */ derived(() => {
1858
- let i3 = false;
1859
- const o2 = t2.s;
1860
- for (const e4 in o2) o2[e4] !== n3[e4] && (n3[e4] = o2[e4], i3 = true);
1861
- return i3 && e3++, e3;
1857
+ const o2 = /* @__PURE__ */ derived(() => {
1858
+ let o3 = false;
1859
+ const i2 = t2.s;
1860
+ for (const e4 in i2) i2[e4] !== n3[e4] && (n3[e4] = i2[e4], o3 = true);
1861
+ return o3 && e3++, e3;
1862
1862
  });
1863
- props = () => get$1(i2);
1863
+ props = () => get$1(o2);
1864
1864
  }
1865
1865
  n2.b.length && function user_pre_effect(e3) {
1866
1866
  return validate_effect(), render_effect(e3);
@@ -1884,21 +1884,21 @@ function observe_all(e2, t2) {
1884
1884
  function subscribe_to_store(e2, t2, n2) {
1885
1885
  if (null == e2)
1886
1886
  return t2(void 0), noop;
1887
- const i2 = untrack(() => e2.subscribe(
1887
+ const o2 = untrack(() => e2.subscribe(
1888
1888
  t2,
1889
1889
  // @ts-expect-error
1890
1890
  n2
1891
1891
  ));
1892
- return i2.unsubscribe ? () => i2.unsubscribe() : i2;
1892
+ return o2.unsubscribe ? () => o2.unsubscribe() : o2;
1893
1893
  }
1894
1894
  const he = [];
1895
1895
  function writable(e2, t2 = noop) {
1896
1896
  let n2 = null;
1897
- const i2 = /* @__PURE__ */ new Set();
1897
+ const o2 = /* @__PURE__ */ new Set();
1898
1898
  function set2(t3) {
1899
1899
  if (safe_not_equal(e2, t3) && (e2 = t3, n2)) {
1900
1900
  const t4 = !he.length;
1901
- for (const t5 of i2) t5[1](), he.push(t5, e2);
1901
+ for (const t5 of o2) t5[1](), he.push(t5, e2);
1902
1902
  if (t4) {
1903
1903
  for (let e3 = 0; e3 < he.length; e3 += 2) he[e3][0](he[e3 + 1]);
1904
1904
  he.length = 0;
@@ -1914,13 +1914,13 @@ function writable(e2, t2 = noop) {
1914
1914
  return {
1915
1915
  set: set2,
1916
1916
  update: update2,
1917
- subscribe: function subscribe(o2, s2 = noop) {
1918
- const a2 = [o2, s2];
1919
- return i2.add(a2), 1 === i2.size && (n2 = t2(set2, update2) || noop), o2(
1917
+ subscribe: function subscribe(i2, s2 = noop) {
1918
+ const a2 = [i2, s2];
1919
+ return o2.add(a2), 1 === o2.size && (n2 = t2(set2, update2) || noop), i2(
1920
1920
  /** @type {T} */
1921
1921
  e2
1922
1922
  ), () => {
1923
- i2.delete(a2), 0 === i2.size && n2 && (n2(), n2 = null);
1923
+ o2.delete(a2), 0 === o2.size && n2 && (n2(), n2 = null);
1924
1924
  };
1925
1925
  }
1926
1926
  };
@@ -1931,24 +1931,24 @@ function get(e2) {
1931
1931
  }
1932
1932
  let me = false, be = Symbol();
1933
1933
  function store_get(e2, t2, n2) {
1934
- const i2 = n2[t2] ?? (n2[t2] = {
1934
+ const o2 = n2[t2] ?? (n2[t2] = {
1935
1935
  store: null,
1936
1936
  source: /* @__PURE__ */ mutable_source(void 0),
1937
1937
  unsubscribe: noop
1938
1938
  });
1939
- if (i2.store !== e2 && !(be in n2)) if (i2.unsubscribe(), i2.store = e2 ?? null, null == e2) i2.source.v = void 0, // see synchronous callback comment below
1940
- i2.unsubscribe = noop;
1939
+ if (o2.store !== e2 && !(be in n2)) if (o2.unsubscribe(), o2.store = e2 ?? null, null == e2) o2.source.v = void 0, // see synchronous callback comment below
1940
+ o2.unsubscribe = noop;
1941
1941
  else {
1942
- var o2 = true;
1943
- i2.unsubscribe = subscribe_to_store(e2, (e3) => {
1944
- o2 ? (
1942
+ var i2 = true;
1943
+ o2.unsubscribe = subscribe_to_store(e2, (e3) => {
1944
+ i2 ? (
1945
1945
  // If the first updates to the store value (possibly multiple of them) are synchronously
1946
1946
  // inside a derived, we will hit the `state_unsafe_mutation` error if we `set` the value
1947
- i2.source.v = e3
1948
- ) : set(i2.source, e3);
1949
- }), o2 = false;
1947
+ o2.source.v = e3
1948
+ ) : set(o2.source, e3);
1949
+ }), i2 = false;
1950
1950
  }
1951
- return e2 && be in n2 ? get(e2) : get$1(i2.source);
1951
+ return e2 && be in n2 ? get(e2) : get$1(o2.source);
1952
1952
  }
1953
1953
  function store_set(e2, t2) {
1954
1954
  return e2.set(t2), t2;
@@ -1960,7 +1960,7 @@ function setup_stores() {
1960
1960
  for (var t2 in e2) {
1961
1961
  e2[t2].unsubscribe();
1962
1962
  }
1963
- o(e2, be, {
1963
+ i(e2, be, {
1964
1964
  enumerable: false,
1965
1965
  value: true
1966
1966
  });
@@ -2009,16 +2009,16 @@ const $e = {
2009
2009
  get(e2, t2) {
2010
2010
  let n2 = e2.props.length;
2011
2011
  for (; n2--; ) {
2012
- let i2 = e2.props[n2];
2013
- if (is_function(i2) && (i2 = i2()), "object" == typeof i2 && null !== i2 && t2 in i2) return i2[t2];
2012
+ let o2 = e2.props[n2];
2013
+ if (is_function(o2) && (o2 = o2()), "object" == typeof o2 && null !== o2 && t2 in o2) return o2[t2];
2014
2014
  }
2015
2015
  },
2016
2016
  set(e2, t2, n2) {
2017
- let i2 = e2.props.length;
2018
- for (; i2--; ) {
2019
- let o2 = e2.props[i2];
2020
- is_function(o2) && (o2 = o2());
2021
- const a2 = s(o2, t2);
2017
+ let o2 = e2.props.length;
2018
+ for (; o2--; ) {
2019
+ let i2 = e2.props[o2];
2020
+ is_function(i2) && (i2 = i2());
2021
+ const a2 = s(i2, t2);
2022
2022
  if (a2 && a2.set) return a2.set(n2), true;
2023
2023
  }
2024
2024
  return false;
@@ -2026,9 +2026,9 @@ const $e = {
2026
2026
  getOwnPropertyDescriptor(e2, t2) {
2027
2027
  let n2 = e2.props.length;
2028
2028
  for (; n2--; ) {
2029
- let i2 = e2.props[n2];
2030
- if (is_function(i2) && (i2 = i2()), "object" == typeof i2 && null !== i2 && t2 in i2) {
2031
- const e3 = s(i2, t2);
2029
+ let o2 = e2.props[n2];
2030
+ if (is_function(o2) && (o2 = o2()), "object" == typeof o2 && null !== o2 && t2 in o2) {
2031
+ const e3 = s(o2, t2);
2032
2032
  return e3 && !e3.configurable && // Prevent a "Non-configurability Report Error": The target is an array, it does
2033
2033
  // not actually contain this property. If it is now described as non-configurable,
2034
2034
  // the proxy throws a validation error. Setting it to true avoids that.
@@ -2055,10 +2055,10 @@ function spread_props(...e2) {
2055
2055
  props: e2
2056
2056
  }, $e);
2057
2057
  }
2058
- function prop(e2, t2, n2, i2) {
2058
+ function prop(e2, t2, n2, o2) {
2059
2059
  var _a2;
2060
- var o2, a2 = !!(1 & n2), l2 = !S || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
2061
- c2 ? [o2, d2] = function capture_store_binding(e3) {
2060
+ var i2, a2 = !!(1 & n2), l2 = !S || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
2061
+ c2 ? [i2, d2] = function capture_store_binding(e3) {
2062
2062
  var t3 = me;
2063
2063
  try {
2064
2064
  return me = false, [e3(), me];
@@ -2068,26 +2068,26 @@ function prop(e2, t2, n2, i2) {
2068
2068
  }(() => (
2069
2069
  /** @type {V} */
2070
2070
  e2[t2]
2071
- )) : o2 = /** @type {V} */
2071
+ )) : i2 = /** @type {V} */
2072
2072
  e2[t2];
2073
- var f2, p2 = x in e2 || k in e2, _2 = c2 && (((_a2 = s(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, v2 = (
2073
+ var f2, p2 = x in e2 || k in e2, _2 = c2 && (((_a2 = s(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, g2 = (
2074
2074
  /** @type {V} */
2075
- i2
2076
- ), g2 = true, h2 = false, get_fallback = () => (h2 = true, g2 && (g2 = false, v2 = u2 ? untrack(
2075
+ o2
2076
+ ), v2 = true, h2 = false, get_fallback = () => (h2 = true, v2 && (v2 = false, g2 = u2 ? untrack(
2077
2077
  /** @type {() => V} */
2078
- i2
2078
+ o2
2079
2079
  ) : (
2080
2080
  /** @type {V} */
2081
- i2
2082
- )), v2);
2083
- if (void 0 === o2 && void 0 !== i2 && (_2 && l2 && function props_invalid_value(e3) {
2081
+ o2
2082
+ )), g2);
2083
+ if (void 0 === i2 && void 0 !== o2 && (_2 && l2 && function props_invalid_value(e3) {
2084
2084
  throw new Error("https://svelte.dev/e/props_invalid_value");
2085
- }(), o2 = get_fallback(), _2 && _2(o2)), l2) f2 = () => {
2085
+ }(), i2 = get_fallback(), _2 && _2(i2)), l2) f2 = () => {
2086
2086
  var n3 = (
2087
2087
  /** @type {V} */
2088
2088
  e2[t2]
2089
2089
  );
2090
- return void 0 === n3 ? get_fallback() : (g2 = true, h2 = false, n3);
2090
+ return void 0 === n3 ? get_fallback() : (v2 = true, h2 = false, n3);
2091
2091
  };
2092
2092
  else {
2093
2093
  var m2 = (a2 ? derived : derived_safe_equal)(() => (
@@ -2096,8 +2096,8 @@ function prop(e2, t2, n2, i2) {
2096
2096
  ));
2097
2097
  m2.f |= 131072, f2 = () => {
2098
2098
  var e3 = get$1(m2);
2099
- return void 0 !== e3 && (v2 = /** @type {V} */
2100
- void 0), void 0 === e3 ? v2 : e3;
2099
+ return void 0 !== e3 && (g2 = /** @type {V} */
2100
+ void 0), void 0 === e3 ? g2 : e3;
2101
2101
  };
2102
2102
  }
2103
2103
  if (!(4 & n2)) return f2;
@@ -2114,7 +2114,7 @@ function prop(e2, t2, n2, i2) {
2114
2114
  ) : f2();
2115
2115
  };
2116
2116
  }
2117
- var y2 = false, $2 = /* @__PURE__ */ mutable_source(o2), w2 = /* @__PURE__ */ derived(() => {
2117
+ var y2 = false, $2 = /* @__PURE__ */ mutable_source(i2), w2 = /* @__PURE__ */ derived(() => {
2118
2118
  var e3 = f2(), t3 = get$1($2);
2119
2119
  return y2 ? (y2 = false, t3) : $2.v = e3;
2120
2120
  });
@@ -2123,13 +2123,13 @@ function prop(e2, t2, n2, i2) {
2123
2123
  const n3 = t3 ? get$1(w2) : l2 && c2 ? proxy(e3) : e3;
2124
2124
  return w2.equals(n3) || (y2 = true, set($2, n3), // To ensure the fallback value is consistent when used with proxies, we
2125
2125
  // update the local fallback_value, but only if the fallback is actively used
2126
- h2 && void 0 !== v2 && (v2 = n3), untrack(() => get$1(w2))), e3;
2126
+ h2 && void 0 !== g2 && (g2 = n3), untrack(() => get$1(w2))), e3;
2127
2127
  }
2128
2128
  return get$1(w2);
2129
2129
  };
2130
2130
  }
2131
2131
  function onMount(e2) {
2132
- null === T && lifecycle_outside_component(), S && null !== T.l ? (
2132
+ null === I && lifecycle_outside_component(), S && null !== I.l ? (
2133
2133
  /**
2134
2134
  * Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate
2135
2135
  * @param {ComponentContext} context
@@ -2144,7 +2144,7 @@ function onMount(e2) {
2144
2144
  b: [],
2145
2145
  m: []
2146
2146
  });
2147
- }(T).m.push(e2)
2147
+ }(I).m.push(e2)
2148
2148
  ) : user_effect(() => {
2149
2149
  const t2 = untrack(e2);
2150
2150
  if ("function" == typeof t2) return t2;
@@ -2187,16 +2187,16 @@ const we = {
2187
2187
  };
2188
2188
  var xe = /* @__PURE__ */ ns_template("<svg><!><!></svg>");
2189
2189
  function Icon$1(e2, t2) {
2190
- const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), i2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
2190
+ const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
2191
2191
  push(t2, false);
2192
- let o2 = prop(t2, "name", 8, void 0), s2 = prop(t2, "color", 8, "currentColor"), a2 = prop(t2, "size", 8, 24), l2 = prop(t2, "strokeWidth", 8, 2), c2 = prop(t2, "absoluteStrokeWidth", 8, false), u2 = prop(t2, "iconNode", 24, () => []);
2192
+ let i2 = prop(t2, "name", 8, void 0), s2 = prop(t2, "color", 8, "currentColor"), a2 = prop(t2, "size", 8, 24), l2 = prop(t2, "strokeWidth", 8, 2), c2 = prop(t2, "absoluteStrokeWidth", 8, false), u2 = prop(t2, "iconNode", 24, () => []);
2193
2193
  init();
2194
2194
  var d2 = xe();
2195
2195
  let f2;
2196
2196
  var p2 = child(d2);
2197
2197
  each(p2, 1, u2, index, (e3, t3) => {
2198
2198
  var n3 = comment();
2199
- !function element(e4, t4, n4, i3, o3, s3) {
2199
+ !function element(e4, t4, n4, o3, i3, s3) {
2200
2200
  var a3, l3, c3, u3 = null, d3 = (
2201
2201
  /** @type {TemplateNode} */
2202
2202
  e4
@@ -2217,32 +2217,32 @@ function Icon$1(e2, t2) {
2217
2217
  // tag is changing — destroy immediately, render contents without intro transitions
2218
2218
  (destroy_effect(c3), set_should_intro(false))
2219
2219
  )), e5 && e5 !== l3 && (c3 = branch(() => {
2220
- if (assign_nodes(u3 = document.createElementNS("http://www.w3.org/2000/svg", e5), u3), i3) {
2220
+ if (assign_nodes(u3 = document.createElementNS("http://www.w3.org/2000/svg", e5), u3), o3) {
2221
2221
  var t5 = (
2222
2222
  /** @type {TemplateNode} */
2223
2223
  u3.appendChild(create_text())
2224
2224
  );
2225
- i3(u3, t5);
2225
+ o3(u3, t5);
2226
2226
  }
2227
2227
  H.nodes_end = u3, d3.before(u3);
2228
2228
  })), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(n5);
2229
2229
  }
2230
2230
  }, $);
2231
2231
  }(first_child(n3), () => get$1(t3)[0], 0, (e4, n4) => {
2232
- let i3;
2233
- template_effect(() => i3 = set_attributes(e4, i3, {
2232
+ let o3;
2233
+ template_effect(() => o3 = set_attributes(e4, o3, {
2234
2234
  ...get$1(t3)[1]
2235
2235
  }));
2236
2236
  }), append(e3, n3);
2237
2237
  }), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => f2 = set_attributes(d2, f2, {
2238
2238
  ...we,
2239
- ...i2,
2239
+ ...o2,
2240
2240
  width: a2(),
2241
2241
  height: a2(),
2242
2242
  stroke: s2(),
2243
2243
  "stroke-width": e3,
2244
2244
  class: t3
2245
- }), [() => c2() ? 24 * Number(l2()) / Number(a2()) : l2(), () => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", o2() ? `lucide-${o2()}` : "", n2.class)], derived_safe_equal), append(e2, d2), pop();
2245
+ }), [() => c2() ? 24 * Number(l2()) / Number(a2()) : l2(), () => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", i2() ? `lucide-${i2()}` : "", n2.class)], derived_safe_equal), append(e2, d2), pop();
2246
2246
  }
2247
2247
  function Loader_circle(e2, t2) {
2248
2248
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
@@ -2253,8 +2253,8 @@ function Loader_circle(e2, t2) {
2253
2253
  d: "M21 12a9 9 0 1 1-6.219-8.56"
2254
2254
  }]],
2255
2255
  children: (e3, n3) => {
2256
- var i2 = comment();
2257
- slot(first_child(i2), t2, "default", {}, null), append(e3, i2);
2256
+ var o2 = comment();
2257
+ slot(first_child(o2), t2, "default", {}, null), append(e3, o2);
2258
2258
  },
2259
2259
  $$slots: {
2260
2260
  default: true
@@ -2264,14 +2264,14 @@ function Loader_circle(e2, t2) {
2264
2264
  var on_click$2 = (e2, t2) => {
2265
2265
  var _a2;
2266
2266
  (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2);
2267
- }, ke = /* @__PURE__ */ template('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-black transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');
2267
+ }, ke = /* @__PURE__ */ template('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-background transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');
2268
2268
  function FloatingButton(e2, t2) {
2269
2269
  push(t2, true);
2270
- let n2 = prop(t2, "position", 3, "bottom-right"), i2 = prop(t2, "visible", 3, true);
2271
- var o2 = comment(), s2 = first_child(o2), consequent = (e3) => {
2272
- var i3 = ke();
2273
- i3.__click = [on_click$2, t2];
2274
- var o3 = child(i3);
2270
+ let n2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "visible", 3, true);
2271
+ var i2 = comment(), s2 = first_child(i2), consequent = (e3) => {
2272
+ var o3 = ke();
2273
+ o3.__click = [on_click$2, t2];
2274
+ var i3 = child(o3);
2275
2275
  !function Gamepad(e4, t3) {
2276
2276
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
2277
2277
  Icon$1(e4, spread_props({
@@ -2305,22 +2305,22 @@ function FloatingButton(e2, t2) {
2305
2305
  rx: "2"
2306
2306
  }]],
2307
2307
  children: (e5, n4) => {
2308
- var i4 = comment();
2309
- slot(first_child(i4), t3, "default", {}, null), append(e5, i4);
2308
+ var o4 = comment();
2309
+ slot(first_child(o4), t3, "default", {}, null), append(e5, o4);
2310
2310
  },
2311
2311
  $$slots: {
2312
2312
  default: true
2313
2313
  }
2314
2314
  }));
2315
- }(child(o3), {
2315
+ }(child(i3), {
2316
2316
  size: 26,
2317
2317
  strokeWidth: 1.75,
2318
2318
  class: "z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"
2319
- }), template_effect(() => set_class(i3, 1, `fixed ${("bottom-left" == n2() ? "bottom-4 left-4" : "bottom-right" == n2() ? "right-4 bottom-4" : "") ?? ""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-black uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), append(e3, i3);
2319
+ }), template_effect(() => set_class(o3, 1, `fixed ${("bottom-left" == n2() ? "bottom-4 left-4" : "bottom-right" == n2() ? "right-4 bottom-4" : "") ?? ""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-background uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), append(e3, o3);
2320
2320
  };
2321
2321
  if_block(s2, (e3) => {
2322
- i2() && e3(consequent);
2323
- }), append(e2, o2), pop();
2322
+ o2() && e3(consequent);
2323
+ }), append(e2, i2), pop();
2324
2324
  }
2325
2325
  function cubic_out(e2) {
2326
2326
  const t2 = e2 - 1;
@@ -2337,44 +2337,44 @@ function split_css_unit(e2) {
2337
2337
  "px"
2338
2338
  ];
2339
2339
  }
2340
- function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_in_out, amount: o2 = 5, opacity: s2 = 0 } = {}) {
2341
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [d2, f2] = split_css_unit(o2);
2340
+ function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_in_out, amount: i2 = 5, opacity: s2 = 0 } = {}) {
2341
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [d2, f2] = split_css_unit(i2);
2342
2342
  return {
2343
2343
  delay: t2,
2344
2344
  duration: n2,
2345
- easing: i2,
2345
+ easing: o2,
2346
2346
  css: (e3, t3) => `opacity: ${l2 - u2 * t3}; filter: ${c2} blur(${t3 * d2}${f2});`
2347
2347
  };
2348
2348
  }
2349
- function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_out, x: o2 = 0, y: s2 = 0, opacity: a2 = 0 } = {}) {
2350
- const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(o2), [_2, v2] = split_css_unit(s2);
2349
+ function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, x: i2 = 0, y: s2 = 0, opacity: a2 = 0 } = {}) {
2350
+ const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(i2), [_2, g2] = split_css_unit(s2);
2351
2351
  return {
2352
2352
  delay: t2,
2353
2353
  duration: n2,
2354
- easing: i2,
2354
+ easing: o2,
2355
2355
  css: (e3, t3) => `
2356
- transform: ${u2} translate(${(1 - e3) * f2}${p2}, ${(1 - e3) * _2}${v2});
2356
+ transform: ${u2} translate(${(1 - e3) * f2}${p2}, ${(1 - e3) * _2}${g2});
2357
2357
  opacity: ${c2 - d2 * t3}`
2358
2358
  };
2359
2359
  }
2360
- function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_out, axis: o2 = "y" } = {}) {
2361
- const s2 = getComputedStyle(e2), a2 = +s2.opacity, l2 = "y" === o2 ? "height" : "width", c2 = parseFloat(s2[l2]), u2 = "y" === o2 ? ["top", "bottom"] : ["left", "right"], d2 = u2.map((e3) => (
2360
+ function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, axis: i2 = "y" } = {}) {
2361
+ const s2 = getComputedStyle(e2), a2 = +s2.opacity, l2 = "y" === i2 ? "height" : "width", c2 = parseFloat(s2[l2]), u2 = "y" === i2 ? ["top", "bottom"] : ["left", "right"], d2 = u2.map((e3) => (
2362
2362
  /** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */
2363
2363
  `${e3[0].toUpperCase()}${e3.slice(1)}`
2364
- )), f2 = parseFloat(s2[`padding${d2[0]}`]), p2 = parseFloat(s2[`padding${d2[1]}`]), _2 = parseFloat(s2[`margin${d2[0]}`]), v2 = parseFloat(s2[`margin${d2[1]}`]), g2 = parseFloat(s2[`border${d2[0]}Width`]), h2 = parseFloat(s2[`border${d2[1]}Width`]);
2364
+ )), f2 = parseFloat(s2[`padding${d2[0]}`]), p2 = parseFloat(s2[`padding${d2[1]}`]), _2 = parseFloat(s2[`margin${d2[0]}`]), g2 = parseFloat(s2[`margin${d2[1]}`]), v2 = parseFloat(s2[`border${d2[0]}Width`]), h2 = parseFloat(s2[`border${d2[1]}Width`]);
2365
2365
  return {
2366
2366
  delay: t2,
2367
2367
  duration: n2,
2368
- easing: i2,
2369
- css: (e3) => `overflow: hidden;opacity: ${Math.min(20 * e3, 1) * a2};${l2}: ${e3 * c2}px;padding-${u2[0]}: ${e3 * f2}px;padding-${u2[1]}: ${e3 * p2}px;margin-${u2[0]}: ${e3 * _2}px;margin-${u2[1]}: ${e3 * v2}px;border-${u2[0]}-width: ${e3 * g2}px;border-${u2[1]}-width: ${e3 * h2}px;min-${l2}: 0`
2368
+ easing: o2,
2369
+ css: (e3) => `overflow: hidden;opacity: ${Math.min(20 * e3, 1) * a2};${l2}: ${e3 * c2}px;padding-${u2[0]}: ${e3 * f2}px;padding-${u2[1]}: ${e3 * p2}px;margin-${u2[0]}: ${e3 * _2}px;margin-${u2[1]}: ${e3 * g2}px;border-${u2[0]}-width: ${e3 * v2}px;border-${u2[1]}-width: ${e3 * h2}px;min-${l2}: 0`
2370
2370
  };
2371
2371
  }
2372
- function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_out, start: o2 = 0, opacity: s2 = 0 } = {}) {
2373
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - o2, d2 = l2 * (1 - s2);
2372
+ function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, start: i2 = 0, opacity: s2 = 0 } = {}) {
2373
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - i2, d2 = l2 * (1 - s2);
2374
2374
  return {
2375
2375
  delay: t2,
2376
2376
  duration: n2,
2377
- easing: i2,
2377
+ easing: o2,
2378
2378
  css: (e3, t3) => `
2379
2379
  transform: ${c2} scale(${1 - u2 * t3});
2380
2380
  opacity: ${l2 - d2 * t3}
@@ -2382,10 +2382,10 @@ function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_out,
2382
2382
  };
2383
2383
  }
2384
2384
  delegate(["click"]);
2385
- var Ce = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'), Se = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'), Me = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'), Te = /* @__PURE__ */ ns_template('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');
2385
+ var Ce = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'), Se = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'), Me = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'), Ie = /* @__PURE__ */ ns_template('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');
2386
2386
  function Icon(e2, t2) {
2387
2387
  let n2 = prop(t2, "type", 8, "success");
2388
- var i2 = comment(), o2 = first_child(i2), consequent = (e3) => {
2388
+ var o2 = comment(), i2 = first_child(o2), consequent = (e3) => {
2389
2389
  append(e3, Ce());
2390
2390
  }, alternate = (e3, t3) => {
2391
2391
  var consequent_1 = (e4) => {
@@ -2395,7 +2395,7 @@ function Icon(e2, t2) {
2395
2395
  append(e5, Me());
2396
2396
  }, alternate_2 = (e5, t5) => {
2397
2397
  var consequent_3 = (e6) => {
2398
- append(e6, Te());
2398
+ append(e6, Ie());
2399
2399
  }, alternate_3 = (e6) => {
2400
2400
  };
2401
2401
  if_block(e5, (e6) => {
@@ -2410,20 +2410,20 @@ function Icon(e2, t2) {
2410
2410
  "error" === n2() ? e4(consequent_1) : e4(alternate_1, false);
2411
2411
  }, t3);
2412
2412
  };
2413
- if_block(o2, (e3) => {
2413
+ if_block(i2, (e3) => {
2414
2414
  "success" === n2() ? e3(consequent) : e3(alternate, false);
2415
- }), append(e2, i2);
2415
+ }), append(e2, o2);
2416
2416
  }
2417
- var Ie = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), qe = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2417
+ var Te = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), qe = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2418
2418
  function Loader(e2, t2) {
2419
2419
  push(t2, false);
2420
2420
  let n2 = prop(t2, "visible", 8);
2421
- const i2 = Array(12).fill(0);
2421
+ const o2 = Array(12).fill(0);
2422
2422
  init();
2423
- var o2 = qe();
2424
- each(child(o2), 5, () => i2, index, (e3, t3) => {
2425
- append(e3, Ie());
2426
- }), template_effect(() => set_attribute(o2, "data-visible", n2())), append(e2, o2), pop();
2423
+ var i2 = qe();
2424
+ each(child(i2), 5, () => o2, index, (e3, t3) => {
2425
+ append(e3, Te());
2426
+ }), template_effect(() => set_attribute(i2, "data-visible", n2())), append(e2, i2), pop();
2427
2427
  }
2428
2428
  function cn(...e2) {
2429
2429
  return e2.filter(Boolean).join(" ");
@@ -2441,19 +2441,19 @@ function clientWritable(e2) {
2441
2441
  }
2442
2442
  };
2443
2443
  }
2444
- let Oe = 0;
2445
- const je = function createToastState() {
2444
+ let De = 0;
2445
+ const Oe = function createToastState() {
2446
2446
  const e2 = clientWritable([]), t2 = clientWritable([]);
2447
2447
  function addToast(t3) {
2448
2448
  e2.update((e3) => [t3, ...e3]);
2449
2449
  }
2450
2450
  function create(t3) {
2451
2451
  var _a2;
2452
- const { message: n2, ...i2 } = t3, o2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : Oe++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === o2);
2453
- return l2 ? e2.update((e3) => e3.map((e4) => e4.id === o2 ? {
2452
+ const { message: n2, ...o2 } = t3, i2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : De++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === i2);
2453
+ return l2 ? e2.update((e3) => e3.map((e4) => e4.id === i2 ? {
2454
2454
  ...e4,
2455
2455
  ...t3,
2456
- id: o2,
2456
+ id: i2,
2457
2457
  title: n2,
2458
2458
  dismissable: s2,
2459
2459
  type: a2,
@@ -2462,12 +2462,12 @@ const je = function createToastState() {
2462
2462
  ...e4,
2463
2463
  updated: false
2464
2464
  })) : addToast({
2465
- ...i2,
2466
- id: o2,
2465
+ ...o2,
2466
+ id: i2,
2467
2467
  title: n2,
2468
2468
  dismissable: s2,
2469
2469
  type: a2
2470
- }), o2;
2470
+ }), i2;
2471
2471
  }
2472
2472
  function dismiss(t3) {
2473
2473
  if (void 0 !== t3) return e2.update((e3) => e3.map((e4) => e4.id === t3 ? {
@@ -2540,53 +2540,53 @@ const je = function createToastState() {
2540
2540
  type: "loading",
2541
2541
  message: t3.loading
2542
2542
  }));
2543
- const i2 = e3 instanceof Promise ? e3 : e3();
2544
- let o2 = void 0 !== n2;
2545
- return i2.then((e4) => {
2543
+ const o2 = e3 instanceof Promise ? e3 : e3();
2544
+ let i2 = void 0 !== n2;
2545
+ return o2.then((e4) => {
2546
2546
  if (e4 && "boolean" == typeof e4.ok && !e4.ok) {
2547
- o2 = false;
2548
- const i3 = "function" == typeof t3.error ? (
2547
+ i2 = false;
2548
+ const o3 = "function" == typeof t3.error ? (
2549
2549
  // @ts-expect-error: Incorrect response type
2550
2550
  t3.error(`HTTP error! status: ${e4.status}`)
2551
2551
  ) : t3.error;
2552
2552
  create({
2553
2553
  id: n2,
2554
2554
  type: "error",
2555
- message: i3
2555
+ message: o3
2556
2556
  });
2557
2557
  } else if (void 0 !== t3.success) {
2558
- o2 = false;
2559
- const i3 = (
2558
+ i2 = false;
2559
+ const o3 = (
2560
2560
  // @ts-expect-error: TODO: Better function checking
2561
2561
  "function" == typeof t3.success ? t3.success(e4) : t3.success
2562
2562
  );
2563
2563
  create({
2564
2564
  id: n2,
2565
2565
  type: "success",
2566
- message: i3
2566
+ message: o3
2567
2567
  });
2568
2568
  }
2569
2569
  }).catch((e4) => {
2570
2570
  if (void 0 !== t3.error) {
2571
- o2 = false;
2572
- const i3 = (
2571
+ i2 = false;
2572
+ const o3 = (
2573
2573
  // @ts-expect-error: TODO: Better function checking
2574
2574
  "function" == typeof t3.error ? t3.error(e4) : t3.error
2575
2575
  );
2576
2576
  create({
2577
2577
  id: n2,
2578
2578
  type: "error",
2579
- message: i3
2579
+ message: o3
2580
2580
  });
2581
2581
  }
2582
2582
  }).finally(() => {
2583
2583
  var _a2;
2584
- o2 && // Toast is still in load state (and will be indefinitely — dismiss it)
2584
+ i2 && // Toast is still in load state (and will be indefinitely — dismiss it)
2585
2585
  (dismiss(n2), n2 = void 0), (_a2 = t3.finally) == null ? void 0 : _a2.call(t3);
2586
2586
  }), n2;
2587
2587
  },
2588
2588
  custom: function custom(e3, t3) {
2589
- const n2 = (t3 == null ? void 0 : t3.id) || Oe++;
2589
+ const n2 = (t3 == null ? void 0 : t3.id) || De++;
2590
2590
  return create({
2591
2591
  component: e3,
2592
2592
  id: n2,
@@ -2607,27 +2607,27 @@ const je = function createToastState() {
2607
2607
  heights: t2
2608
2608
  };
2609
2609
  }();
2610
- const Ee = function toastFunction(e2, t2) {
2611
- return je.create({
2610
+ const je = function toastFunction(e2, t2) {
2611
+ return Oe.create({
2612
2612
  message: e2,
2613
2613
  ...t2
2614
2614
  });
2615
- }, Ne = Object.assign(Ee, {
2616
- success: je.success,
2617
- info: je.info,
2618
- warning: je.warning,
2619
- error: je.error,
2620
- custom: je.custom,
2621
- message: je.message,
2622
- promise: je.promise,
2623
- dismiss: je.dismiss,
2624
- loading: je.loading
2615
+ }, Ee = Object.assign(je, {
2616
+ success: Oe.success,
2617
+ info: Oe.info,
2618
+ warning: Oe.warning,
2619
+ error: Oe.error,
2620
+ custom: Oe.custom,
2621
+ message: Oe.message,
2622
+ promise: Oe.promise,
2623
+ dismiss: Oe.dismiss,
2624
+ loading: Oe.loading
2625
2625
  });
2626
- var Be = /* @__PURE__ */ template('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'), De = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), Ae = /* @__PURE__ */ template('<div data-title=""><!></div>'), We = /* @__PURE__ */ template('<div data-description=""><!></div>'), ze = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), Le = /* @__PURE__ */ template('<button data-button=""> </button>'), Fe = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Ge = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
2626
+ var Ne = /* @__PURE__ */ template('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'), Be = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), Ae = /* @__PURE__ */ template('<div data-title=""><!></div>'), We = /* @__PURE__ */ template('<div data-description=""><!></div>'), ze = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), Le = /* @__PURE__ */ template('<button data-button=""> </button>'), Ge = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Fe = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
2627
2627
  function Toast(e2, t2) {
2628
2628
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
2629
2629
  push(t2, false);
2630
- const [i2, o2] = setup_stores(), $heights = () => store_get(y2, "$heights", i2), $effect = () => store_get(get$1(Q2), "$effect", i2), s2 = mutable_state(void 0, true), a2 = mutable_state(void 0, true), l2 = mutable_state(void 0, true), c2 = mutable_state(void 0, true), u2 = mutable_state(void 0, true), d2 = mutable_state(void 0, true), f2 = mutable_state(void 0, true), p2 = mutable_state(void 0, true), _2 = mutable_state(void 0, true), v2 = mutable_state(void 0, true), g2 = mutable_state(void 0, true), h2 = mutable_state(void 0, true), m2 = {
2630
+ const [o2, i2] = setup_stores(), $heights = () => store_get(y2, "$heights", o2), $effect = () => store_get(get$1(Q2), "$effect", o2), s2 = mutable_state(void 0, true), a2 = mutable_state(void 0, true), l2 = mutable_state(void 0, true), c2 = mutable_state(void 0, true), u2 = mutable_state(void 0, true), d2 = mutable_state(void 0, true), f2 = mutable_state(void 0, true), p2 = mutable_state(void 0, true), _2 = mutable_state(void 0, true), g2 = mutable_state(void 0, true), v2 = mutable_state(void 0, true), h2 = mutable_state(void 0, true), m2 = {
2631
2631
  toast: "",
2632
2632
  title: "",
2633
2633
  description: "",
@@ -2642,21 +2642,21 @@ function Toast(e2, t2) {
2642
2642
  default: "",
2643
2643
  info: "",
2644
2644
  loading: ""
2645
- }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = je;
2646
- let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), S2 = prop(t2, "expanded", 9), M2 = prop(t2, "invert", 13), T2 = prop(t2, "position", 9), I2 = prop(t2, "visibleToasts", 9), q2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), O2 = prop(t2, "interacting", 9), j2 = prop(t2, "cancelButtonStyle", 9, ""), E2 = prop(t2, "actionButtonStyle", 9, ""), N2 = prop(t2, "duration", 9, 4e3), B2 = prop(t2, "descriptionClass", 9, ""), D2 = prop(t2, "classes", 29, () => ({})), A2 = prop(t2, "unstyled", 9, false), W2 = mutable_state(false, true), z2 = mutable_state(false, true), L2 = mutable_state(false, true), F2 = mutable_state(false, true), G2 = mutable_state(0, true), H2 = mutable_state(0, true), R2 = mutable_state(void 0, true), V2 = mutable_state(0, true), K2 = 0, U2 = 0, Z2 = null;
2645
+ }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = Oe;
2646
+ let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), S2 = prop(t2, "expanded", 9), M2 = prop(t2, "invert", 13), I2 = prop(t2, "position", 9), T2 = prop(t2, "visibleToasts", 9), q2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), D2 = prop(t2, "interacting", 9), O2 = prop(t2, "cancelButtonStyle", 9, ""), j2 = prop(t2, "actionButtonStyle", 9, ""), E2 = prop(t2, "duration", 9, 4e3), N2 = prop(t2, "descriptionClass", 9, ""), B2 = prop(t2, "classes", 29, () => ({})), A2 = prop(t2, "unstyled", 9, false), W2 = mutable_state(false, true), z2 = mutable_state(false, true), L2 = mutable_state(false, true), G2 = mutable_state(false, true), F2 = mutable_state(0, true), H2 = mutable_state(0, true), R2 = mutable_state(void 0, true), V2 = mutable_state(0, true), K2 = 0, U2 = 0, Y2 = null;
2647
2647
  function deleteToast() {
2648
2648
  set(z2, true), // Save the offset for the exit swipe animation
2649
- set(G2, get$1(V2)), $2(k2().id), setTimeout(() => {
2649
+ set(F2, get$1(V2)), $2(k2().id), setTimeout(() => {
2650
2650
  x2(k2().id);
2651
2651
  }, 200);
2652
2652
  }
2653
- let J2 = mutable_state(void 0, true), Y2 = mutable_state(k2().duration || N2() || 4e3, true);
2653
+ let Z2 = mutable_state(void 0, true), J2 = mutable_state(k2().duration || E2() || 4e3, true);
2654
2654
  function startTimer() {
2655
2655
  K2 = (/* @__PURE__ */ new Date()).getTime(), // Let the toast know it has started
2656
- set(J2, setTimeout(() => {
2656
+ set(Z2, setTimeout(() => {
2657
2657
  var _a2, _b2;
2658
2658
  (_b2 = (_a2 = k2()).onAutoClose) == null ? void 0 : _b2.call(_a2, k2()), deleteToast();
2659
- }, get$1(Y2)));
2659
+ }, get$1(J2)));
2660
2660
  }
2661
2661
  let Q2 = mutable_state(void 0, true);
2662
2662
  onMount(() => {
@@ -2666,15 +2666,15 @@ function Toast(e2, t2) {
2666
2666
  toastId: k2().id,
2667
2667
  height: e3
2668
2668
  }), () => $2(k2().id);
2669
- }), legacy_pre_effect(() => deep_read_state(D2()), () => {
2670
- D2({
2669
+ }), legacy_pre_effect(() => deep_read_state(B2()), () => {
2670
+ B2({
2671
2671
  ...m2,
2672
- ...D2()
2672
+ ...B2()
2673
2673
  });
2674
2674
  }), legacy_pre_effect(() => deep_read_state(C2()), () => {
2675
2675
  set(s2, 0 === C2());
2676
- }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(I2())), () => {
2677
- set(a2, C2() + 1 <= I2());
2676
+ }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(T2())), () => {
2677
+ set(a2, C2() + 1 <= T2());
2678
2678
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2679
2679
  set(l2, k2().title);
2680
2680
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
@@ -2687,47 +2687,47 @@ function Toast(e2, t2) {
2687
2687
  set(f2, k2().descriptionClass || "");
2688
2688
  }), legacy_pre_effect(() => ($heights(), deep_read_state(k2())), () => {
2689
2689
  set(p2, $heights().findIndex((e3) => e3.toastId === k2().id) || 0);
2690
- }), legacy_pre_effect(() => deep_read_state(T2()), () => {
2691
- set(_2, T2().split("-"));
2690
+ }), legacy_pre_effect(() => deep_read_state(I2()), () => {
2691
+ set(_2, I2().split("-"));
2692
2692
  }), legacy_pre_effect(() => ($heights(), get$1(p2)), () => {
2693
- set(v2, $heights().reduce((e3, t3, n3) => (
2693
+ set(g2, $heights().reduce((e3, t3, n3) => (
2694
2694
  // Calculate offset up untill current toast
2695
2695
  n3 >= get$1(p2) ? e3 : e3 + t3.height
2696
2696
  ), 0));
2697
2697
  }), legacy_pre_effect(() => (deep_read_state(M2()), deep_read_state(k2())), () => {
2698
2698
  M2(k2().invert || M2());
2699
2699
  }), legacy_pre_effect(() => get$1(u2), () => {
2700
- set(g2, "loading" === get$1(u2));
2701
- }), legacy_pre_effect(() => (get$1(p2), get$1(v2)), () => {
2702
- set(V2, Math.round(14 * get$1(p2) + get$1(v2)));
2700
+ set(v2, "loading" === get$1(u2));
2701
+ }), legacy_pre_effect(() => (get$1(p2), get$1(g2)), () => {
2702
+ set(V2, Math.round(14 * get$1(p2) + get$1(g2)));
2703
2703
  }), legacy_pre_effect(() => (get$1(l2), get$1(c2)), () => {
2704
2704
  get$1(l2), get$1(c2), // Listen to height changes
2705
2705
  async function updateHeights() {
2706
2706
  if (!get$1(W2)) return;
2707
2707
  let e3;
2708
2708
  await tick(), e3 = S2() || q2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2709
- const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, i3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2710
- let o3;
2709
+ const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, o3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2710
+ let i3;
2711
2711
  get$1(R2).style.removeProperty("height"), // Use scaledRectHeight as it's more precise
2712
- o3 = Math.abs(i3 - t3) < 1 ? i3 : t3, set(H2, o3), w2({
2712
+ i3 = Math.abs(o3 - t3) < 1 ? o3 : t3, set(H2, i3), w2({
2713
2713
  toastId: k2().id,
2714
- height: o3
2714
+ height: i3
2715
2715
  });
2716
2716
  }();
2717
- }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(J2), deep_read_state(N2())), () => {
2717
+ }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(Z2), deep_read_state(E2())), () => {
2718
2718
  k2().updated && // if the toast has been updated after the initial render,
2719
2719
  // we want to reset the timer and set the remaining time to the
2720
2720
  // new duration
2721
- (clearTimeout(get$1(J2)), set(Y2, k2().duration || N2() || 4e3), startTimer());
2721
+ (clearTimeout(get$1(Z2)), set(J2, k2().duration || E2() || 4e3), startTimer());
2722
2722
  }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(u2)), () => {
2723
2723
  set(h2, k2().promise && "loading" === get$1(u2) || k2().duration === Number.POSITIVE_INFINITY);
2724
- }), legacy_pre_effect(() => (get$1(h2), deep_read_state(S2()), deep_read_state(O2()), get$1(J2)), () => {
2724
+ }), legacy_pre_effect(() => (get$1(h2), deep_read_state(S2()), deep_read_state(D2()), get$1(Z2)), () => {
2725
2725
  var e3;
2726
2726
  !function store_unsub(e4, t3, n3) {
2727
- let i3 = n3[t3];
2728
- return i3 && i3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2729
- (i3.unsubscribe(), i3.unsubscribe = noop), e4;
2730
- }(set(Q2, (e3 = () => (get$1(h2) || (S2() || O2() ? (
2727
+ let o3 = n3[t3];
2728
+ return o3 && o3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2729
+ (o3.unsubscribe(), o3.unsubscribe = noop), e4;
2730
+ }(set(Q2, (e3 = () => (get$1(h2) || (S2() || D2() ? (
2731
2731
  // If toast's duration changes, it will be out of sync with the
2732
2732
  // remainingAtTimeout, so we know we need to restart the timer
2733
2733
  // with the new duration
@@ -2735,31 +2735,31 @@ function Toast(e2, t2) {
2735
2735
  function pauseTimer() {
2736
2736
  if (U2 < K2) {
2737
2737
  const e4 = (/* @__PURE__ */ new Date()).getTime() - K2;
2738
- set(Y2, get$1(Y2) - e4);
2738
+ set(J2, get$1(J2) - e4);
2739
2739
  }
2740
2740
  U2 = (/* @__PURE__ */ new Date()).getTime();
2741
2741
  }()
2742
- ) : startTimer()), () => clearTimeout(get$1(J2))), {
2742
+ ) : startTimer()), () => clearTimeout(get$1(Z2))), {
2743
2743
  subscribe: e3
2744
- })), "$effect", i2);
2744
+ })), "$effect", o2);
2745
2745
  }), legacy_pre_effect(() => $effect(), () => {
2746
2746
  $effect();
2747
2747
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2748
2748
  k2().delete && deleteToast();
2749
2749
  }), legacy_pre_effect_reset(), init(true);
2750
- var ee2 = Ge();
2750
+ var ee2 = Fe();
2751
2751
  let te2;
2752
2752
  set_attribute(ee2, "tabindex", 0);
2753
2753
  var ne2 = child(ee2), consequent = (e3) => {
2754
- var t3 = Be();
2754
+ var t3 = Ne();
2755
2755
  template_effect((e4) => {
2756
- set_attribute(t3, "data-disabled", get$1(g2)), set_class(t3, 1, e4);
2756
+ set_attribute(t3, "data-disabled", get$1(v2)), set_class(t3, 1, e4);
2757
2757
  }, [() => {
2758
2758
  var _a2, _b2, _c2;
2759
- return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.closeButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.closeButton));
2759
+ return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.closeButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.closeButton));
2760
2760
  }], derived_safe_equal), event("click", t3, function(...e4) {
2761
2761
  var _a2;
2762
- (_a2 = get$1(g2) ? void 0 : () => {
2762
+ (_a2 = get$1(v2) ? void 0 : () => {
2763
2763
  var _a3, _b2;
2764
2764
  deleteToast(), (_b2 = (_a3 = k2()).onDismiss) == null ? void 0 : _b2.call(_a3, k2());
2765
2765
  }) == null ? void 0 : _a2.apply(this, e4);
@@ -2778,15 +2778,15 @@ function Toast(e2, t2) {
2778
2778
  }));
2779
2779
  }), append(e3, t3);
2780
2780
  }, alternate = (e3) => {
2781
- var n3 = Fe(), i3 = first_child(n3), consequent_8 = (e4) => {
2782
- var n4 = De(), i4 = child(n4), consequent_2 = (e5) => {
2781
+ var n3 = Ge(), o3 = first_child(n3), consequent_8 = (e4) => {
2782
+ var n4 = Be(), o4 = child(n4), consequent_2 = (e5) => {
2783
2783
  var n5 = comment();
2784
2784
  slot(first_child(n5), t2, "loading-icon", {}, null), append(e5, n5);
2785
2785
  };
2786
- if_block(i4, (e5) => {
2786
+ if_block(o4, (e5) => {
2787
2787
  !k2().promise && "loading" !== get$1(u2) || k2().icon || e5(consequent_2);
2788
2788
  });
2789
- var o4 = sibling(i4, 2), consequent_3 = (e5) => {
2789
+ var i4 = sibling(o4, 2), consequent_3 = (e5) => {
2790
2790
  var t3 = comment();
2791
2791
  component(first_child(t3), () => k2().icon, (e6, t4) => {
2792
2792
  t4(e6, {});
@@ -2824,14 +2824,14 @@ function Toast(e2, t2) {
2824
2824
  "success" === get$1(u2) ? e6(consequent_4) : e6(alternate_2, false);
2825
2825
  }, n5);
2826
2826
  };
2827
- if_block(o4, (e5) => {
2827
+ if_block(i4, (e5) => {
2828
2828
  k2().icon ? e5(consequent_3) : e5(alternate_1, false);
2829
2829
  }), append(e4, n4);
2830
2830
  };
2831
- if_block(i3, (e4) => {
2831
+ if_block(o3, (e4) => {
2832
2832
  ("default" !== get$1(u2) || k2().icon || k2().promise) && e4(consequent_8);
2833
2833
  });
2834
- var o3 = sibling(i3, 2), s3 = child(o3), consequent_10 = (e4) => {
2834
+ var i3 = sibling(o3, 2), s3 = child(i3), consequent_10 = (e4) => {
2835
2835
  var t3 = Ae(), n4 = child(t3), consequent_9 = (e5) => {
2836
2836
  var t4 = comment();
2837
2837
  component(first_child(t4), () => k2().title, (e6, t5) => {
@@ -2845,7 +2845,7 @@ function Toast(e2, t2) {
2845
2845
  "string" != typeof k2().title ? e5(consequent_9) : e5(alternate_5, false);
2846
2846
  }), template_effect((e5) => set_class(t3, 1, e5), [() => {
2847
2847
  var _a2, _b2, _c2;
2848
- return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.title, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.title));
2848
+ return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.title, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.title));
2849
2849
  }], derived_safe_equal), append(e4, t3);
2850
2850
  };
2851
2851
  if_block(s3, (e4) => {
@@ -2865,19 +2865,19 @@ function Toast(e2, t2) {
2865
2865
  "string" != typeof k2().description ? e5(consequent_11) : e5(alternate_6, false);
2866
2866
  }), template_effect((e5) => set_class(t3, 1, e5), [() => {
2867
2867
  var _a2, _b2;
2868
- return clsx(cn(B2(), get$1(f2), (_a2 = D2()) == null ? void 0 : _a2.description, (_b2 = k2().classes) == null ? void 0 : _b2.description));
2868
+ return clsx(cn(N2(), get$1(f2), (_a2 = B2()) == null ? void 0 : _a2.description, (_b2 = k2().classes) == null ? void 0 : _b2.description));
2869
2869
  }], derived_safe_equal), append(e4, t3);
2870
2870
  };
2871
2871
  if_block(a3, (e4) => {
2872
2872
  k2().description && e4(consequent_12);
2873
2873
  });
2874
- var l3 = sibling(o3, 2), consequent_13 = (e4) => {
2874
+ var l3 = sibling(i3, 2), consequent_13 = (e4) => {
2875
2875
  var t3 = ze(), n4 = child(t3);
2876
2876
  template_effect((e5) => {
2877
- set_style(t3, j2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
2877
+ set_style(t3, O2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
2878
2878
  }, [() => {
2879
2879
  var _a2, _b2, _c2;
2880
- return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.cancelButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.cancelButton));
2880
+ return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.cancelButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.cancelButton));
2881
2881
  }], derived_safe_equal), event("click", t3, () => {
2882
2882
  var _a2;
2883
2883
  deleteToast(), ((_a2 = k2().cancel) == null ? void 0 : _a2.onClick) && k2().cancel.onClick();
@@ -2889,10 +2889,10 @@ function Toast(e2, t2) {
2889
2889
  var c3 = sibling(l3, 2), consequent_14 = (e4) => {
2890
2890
  var t3 = Le(), n4 = child(t3);
2891
2891
  template_effect((e5) => {
2892
- set_style(t3, E2()), set_class(t3, 1, e5), set_text(n4, k2().action.label);
2892
+ set_style(t3, j2()), set_class(t3, 1, e5), set_text(n4, k2().action.label);
2893
2893
  }, [() => {
2894
2894
  var _a2, _b2, _c2;
2895
- return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.actionButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.actionButton));
2895
+ return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.actionButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.actionButton));
2896
2896
  }], derived_safe_equal), event("click", t3, (e5) => {
2897
2897
  var _a2;
2898
2898
  (_a2 = k2().action) == null ? void 0 : _a2.onClick(e5), e5.defaultPrevented || deleteToast();
@@ -2904,71 +2904,71 @@ function Toast(e2, t2) {
2904
2904
  };
2905
2905
  if_block(re2, (e3) => {
2906
2906
  k2().component ? e3(consequent_1) : e3(alternate, false);
2907
- }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, o3) => {
2907
+ }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, i3) => {
2908
2908
  var _a2;
2909
- set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, e3), set_attribute(ee2, "data-styled", !(k2().component || ((_a2 = k2()) == null ? void 0 : _a2.unstyled) || A2())), set_attribute(ee2, "data-mounted", get$1(W2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(z2)), set_attribute(ee2, "data-visible", get$1(a2)), set_attribute(ee2, "data-y-position", get$1(_2)[0]), set_attribute(ee2, "data-x-position", get$1(_2)[1]), set_attribute(ee2, "data-index", C2()), set_attribute(ee2, "data-front", get$1(s2)), set_attribute(ee2, "data-swiping", get$1(L2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", M2()), set_attribute(ee2, "data-swipe-out", get$1(F2)), set_attribute(ee2, "data-expanded", o3), te2 = set_style(ee2, `${n2.style} ${k2().style}`, te2, {
2909
+ set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, e3), set_attribute(ee2, "data-styled", !(k2().component || ((_a2 = k2()) == null ? void 0 : _a2.unstyled) || A2())), set_attribute(ee2, "data-mounted", get$1(W2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(z2)), set_attribute(ee2, "data-visible", get$1(a2)), set_attribute(ee2, "data-y-position", get$1(_2)[0]), set_attribute(ee2, "data-x-position", get$1(_2)[1]), set_attribute(ee2, "data-index", C2()), set_attribute(ee2, "data-front", get$1(s2)), set_attribute(ee2, "data-swiping", get$1(L2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", M2()), set_attribute(ee2, "data-swipe-out", get$1(G2)), set_attribute(ee2, "data-expanded", i3), te2 = set_style(ee2, `${n2.style} ${k2().style}`, te2, {
2910
2910
  "--index": C2(),
2911
2911
  "--toasts-before": C2(),
2912
- "--z-index": store_get(b2, "$toasts", i2).length - C2(),
2913
- "--offset": `${get$1(z2) ? get$1(G2) : get$1(V2)}px`,
2912
+ "--z-index": store_get(b2, "$toasts", o2).length - C2(),
2913
+ "--offset": `${get$1(z2) ? get$1(F2) : get$1(V2)}px`,
2914
2914
  "--initial-height": `${get$1(H2)}px`
2915
2915
  });
2916
2916
  }, [() => {
2917
2917
  var _a2, _b2, _c2, _d, _e2, _f;
2918
- return clsx(cn(n2.class, get$1(d2), (_a2 = D2()) == null ? void 0 : _a2.toast, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.toast, (_d = D2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e2 = k2()) == null ? void 0 : _e2.classes) == null ? void 0 : _f[get$1(u2)]));
2918
+ return clsx(cn(n2.class, get$1(d2), (_a2 = B2()) == null ? void 0 : _a2.toast, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.toast, (_d = B2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e2 = k2()) == null ? void 0 : _e2.classes) == null ? void 0 : _f[get$1(u2)]));
2919
2919
  }, () => Boolean(k2().promise), () => Boolean(S2() || q2() && get$1(W2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2920
- if (get$1(g2)) return;
2921
- set(G2, get$1(V2));
2920
+ if (get$1(v2)) return;
2921
+ set(F2, get$1(V2));
2922
2922
  const t3 = e3.target;
2923
- t3.setPointerCapture(e3.pointerId), "BUTTON" !== t3.tagName && (set(L2, true), Z2 = {
2923
+ t3.setPointerCapture(e3.pointerId), "BUTTON" !== t3.tagName && (set(L2, true), Y2 = {
2924
2924
  x: e3.clientX,
2925
2925
  y: e3.clientY
2926
2926
  });
2927
2927
  }), event("pointerup", ee2, function onPointerUp() {
2928
2928
  var _a2, _b2, _c2;
2929
- if (get$1(F2)) return;
2930
- Z2 = null;
2929
+ if (get$1(G2)) return;
2930
+ Y2 = null;
2931
2931
  const e3 = Number(((_a2 = get$1(R2)) == null ? void 0 : _a2.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0);
2932
- if (Math.abs(e3) >= 20) return set(G2, get$1(V2)), (_c2 = (_b2 = k2()).onDismiss) == null ? void 0 : _c2.call(_b2, k2()), deleteToast(), void set(F2, true);
2932
+ if (Math.abs(e3) >= 20) return set(F2, get$1(V2)), (_c2 = (_b2 = k2()).onDismiss) == null ? void 0 : _c2.call(_b2, k2()), deleteToast(), void set(G2, true);
2933
2933
  get$1(R2).style.setProperty("--swipe-amount", "0px"), set(L2, false);
2934
2934
  }), event("pointermove", ee2, function onPointerMove(e3) {
2935
- if (!Z2) return;
2936
- const t3 = e3.clientY - Z2.y, n3 = e3.clientX - Z2.x, i3 = ("top" === get$1(_2)[0] ? Math.min : Math.max)(0, t3), o3 = "touch" === e3.pointerType ? 10 : 2;
2937
- Math.abs(i3) > o3 ? get$1(R2).style.setProperty("--swipe-amount", `${t3}px`) : Math.abs(n3) > o3 && // User is swiping in wrong direction so we disable swipe gesture
2935
+ if (!Y2) return;
2936
+ const t3 = e3.clientY - Y2.y, n3 = e3.clientX - Y2.x, o3 = ("top" === get$1(_2)[0] ? Math.min : Math.max)(0, t3), i3 = "touch" === e3.pointerType ? 10 : 2;
2937
+ Math.abs(o3) > i3 ? get$1(R2).style.setProperty("--swipe-amount", `${t3}px`) : Math.abs(n3) > i3 && // User is swiping in wrong direction so we disable swipe gesture
2938
2938
  // for the current pointer down interaction
2939
- (Z2 = null);
2940
- }), append(e2, ee2), pop(), o2();
2939
+ (Y2 = null);
2940
+ }), append(e2, ee2), pop(), i2();
2941
2941
  }
2942
2942
  var He = /* @__PURE__ */ template("<ol></ol>"), Re = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
2943
2943
  function Toaster(e2, t2) {
2944
- const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), i2 = legacy_rest_props(n2, ["invert", "theme", "position", "hotkey", "containerAriaLabel", "richColors", "expand", "duration", "visibleToasts", "closeButton", "toastOptions", "offset", "dir"]);
2944
+ const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["invert", "theme", "position", "hotkey", "containerAriaLabel", "richColors", "expand", "duration", "visibleToasts", "closeButton", "toastOptions", "offset", "dir"]);
2945
2945
  push(t2, false);
2946
- const [o2, s2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", o2), a2 = mutable_state(), l2 = mutable_state(), c2 = "dark", u2 = "light";
2946
+ const [i2, s2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", i2), a2 = mutable_state(), l2 = mutable_state(), c2 = "dark", u2 = "light";
2947
2947
  function getDocumentDirection() {
2948
2948
  if ("undefined" == typeof window) return "ltr";
2949
2949
  if ("undefined" == typeof document) return "ltr";
2950
2950
  const e3 = document.documentElement.getAttribute("dir");
2951
2951
  return "auto" !== e3 && e3 ? e3 : window.getComputedStyle(document.documentElement).direction;
2952
2952
  }
2953
- let d2 = prop(t2, "invert", 8, false), f2 = prop(t2, "theme", 8, "light"), p2 = prop(t2, "position", 8, "bottom-right"), _2 = prop(t2, "hotkey", 24, () => ["altKey", "KeyT"]), v2 = prop(t2, "containerAriaLabel", 8, "Notifications"), g2 = prop(t2, "richColors", 8, false), h2 = prop(t2, "expand", 8, false), m2 = prop(t2, "duration", 8, 4e3), b2 = prop(t2, "visibleToasts", 8, 3), y2 = prop(t2, "closeButton", 8, false), $2 = prop(t2, "toastOptions", 24, () => ({})), w2 = prop(t2, "offset", 8, null), x2 = prop(t2, "dir", 24, getDocumentDirection);
2954
- const { toasts: k2, heights: C2, reset: S2 } = je;
2955
- let M2 = mutable_state(false), I2 = mutable_state(false), q2 = mutable_state(function getInitialTheme(e3) {
2953
+ let d2 = prop(t2, "invert", 8, false), f2 = prop(t2, "theme", 8, "light"), p2 = prop(t2, "position", 8, "bottom-right"), _2 = prop(t2, "hotkey", 24, () => ["altKey", "KeyT"]), g2 = prop(t2, "containerAriaLabel", 8, "Notifications"), v2 = prop(t2, "richColors", 8, false), h2 = prop(t2, "expand", 8, false), m2 = prop(t2, "duration", 8, 4e3), b2 = prop(t2, "visibleToasts", 8, 3), y2 = prop(t2, "closeButton", 8, false), $2 = prop(t2, "toastOptions", 24, () => ({})), w2 = prop(t2, "offset", 8, null), x2 = prop(t2, "dir", 24, getDocumentDirection);
2954
+ const { toasts: k2, heights: C2, reset: S2 } = Oe;
2955
+ let M2 = mutable_state(false), T2 = mutable_state(false), q2 = mutable_state(function getInitialTheme(e3) {
2956
2956
  return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? c2 : u2;
2957
- }(f2())), P2 = mutable_state(), O2 = null, j2 = false;
2957
+ }(f2())), P2 = mutable_state(), D2 = null, O2 = false;
2958
2958
  function handleBlur(e3) {
2959
- j2 && !e3.currentTarget.contains(e3.relatedTarget) && (j2 = false, O2 && (O2.focus({
2959
+ O2 && !e3.currentTarget.contains(e3.relatedTarget) && (O2 = false, D2 && (D2.focus({
2960
2960
  preventScroll: true
2961
- }), O2 = null));
2961
+ }), D2 = null));
2962
2962
  }
2963
2963
  function handleFocus(e3) {
2964
- j2 || (j2 = true, O2 = e3.relatedTarget);
2964
+ O2 || (O2 = true, D2 = e3.relatedTarget);
2965
2965
  }
2966
2966
  !function onDestroy(e3) {
2967
- null === T && lifecycle_outside_component(), onMount(() => () => untrack(e3));
2967
+ null === I && lifecycle_outside_component(), onMount(() => () => untrack(e3));
2968
2968
  }(() => {
2969
- get$1(P2) && O2 && (O2.focus({
2969
+ get$1(P2) && D2 && (D2.focus({
2970
2970
  preventScroll: true
2971
- }), O2 = null, j2 = false);
2971
+ }), D2 = null, O2 = false);
2972
2972
  }), onMount(() => {
2973
2973
  S2();
2974
2974
  const handleKeydown = (e3) => {
@@ -3015,12 +3015,12 @@ function Toaster(e2, t2) {
3015
3015
  );
3016
3016
  }
3017
3017
  }), legacy_pre_effect_reset(), init();
3018
- var E2 = comment(), N2 = first_child(E2), consequent = (e3) => {
3018
+ var j2 = comment(), E2 = first_child(j2), consequent = (e3) => {
3019
3019
  var s3 = Re();
3020
3020
  set_attribute(s3, "tabindex", -1), each(s3, 5, () => get$1(a2), index, (e4, s4, a3, l3) => {
3021
3021
  var c3 = He();
3022
3022
  let u3;
3023
- each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(s4)), (e5) => e5.id, (e5, n3, i3, o3) => {
3023
+ each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(s4)), (e5) => e5.id, (e5, n3, o3, i3) => {
3024
3024
  const a4 = /* @__PURE__ */ derived_safe_equal(() => {
3025
3025
  var _a2;
3026
3026
  return ((_a2 = $2()) == null ? void 0 : _a2.actionButtonStyle) || "";
@@ -3039,7 +3039,7 @@ function Toaster(e2, t2) {
3039
3039
  }), _3 = /* @__PURE__ */ derived_safe_equal(() => $2().unstyled || false);
3040
3040
  Toast(e5, {
3041
3041
  get index() {
3042
- return get$1(i3);
3042
+ return get$1(o3);
3043
3043
  },
3044
3044
  get toast() {
3045
3045
  return get$1(n3);
@@ -3054,7 +3054,7 @@ function Toaster(e2, t2) {
3054
3054
  return y2();
3055
3055
  },
3056
3056
  get interacting() {
3057
- return get$1(I2);
3057
+ return get$1(T2);
3058
3058
  },
3059
3059
  get position() {
3060
3060
  return get$1(s4);
@@ -3087,48 +3087,48 @@ function Toaster(e2, t2) {
3087
3087
  return get$1(_3);
3088
3088
  },
3089
3089
  $$slots: {
3090
- "loading-icon": (e6, i4) => {
3091
- var o4 = comment();
3092
- slot(first_child(o4), t2, "loading-icon", {}, (e7) => {
3090
+ "loading-icon": (e6, o4) => {
3091
+ var i4 = comment();
3092
+ slot(first_child(i4), t2, "loading-icon", {}, (e7) => {
3093
3093
  const t3 = /* @__PURE__ */ derived_safe_equal(() => "loading" === get$1(n3).type);
3094
3094
  Loader(e7, {
3095
3095
  get visible() {
3096
3096
  return get$1(t3);
3097
3097
  }
3098
3098
  });
3099
- }), append(e6, o4);
3099
+ }), append(e6, i4);
3100
3100
  },
3101
3101
  "success-icon": (e6, n4) => {
3102
- var i4 = comment();
3103
- slot(first_child(i4), t2, "success-icon", {}, (e7) => {
3102
+ var o4 = comment();
3103
+ slot(first_child(o4), t2, "success-icon", {}, (e7) => {
3104
3104
  Icon(e7, {
3105
3105
  type: "success"
3106
3106
  });
3107
- }), append(e6, i4);
3107
+ }), append(e6, o4);
3108
3108
  },
3109
3109
  "error-icon": (e6, n4) => {
3110
- var i4 = comment();
3111
- slot(first_child(i4), t2, "error-icon", {}, (e7) => {
3110
+ var o4 = comment();
3111
+ slot(first_child(o4), t2, "error-icon", {}, (e7) => {
3112
3112
  Icon(e7, {
3113
3113
  type: "error"
3114
3114
  });
3115
- }), append(e6, i4);
3115
+ }), append(e6, o4);
3116
3116
  },
3117
3117
  "warning-icon": (e6, n4) => {
3118
- var i4 = comment();
3119
- slot(first_child(i4), t2, "warning-icon", {}, (e7) => {
3118
+ var o4 = comment();
3119
+ slot(first_child(o4), t2, "warning-icon", {}, (e7) => {
3120
3120
  Icon(e7, {
3121
3121
  type: "warning"
3122
3122
  });
3123
- }), append(e6, i4);
3123
+ }), append(e6, o4);
3124
3124
  },
3125
3125
  "info-icon": (e6, n4) => {
3126
- var i4 = comment();
3127
- slot(first_child(i4), t2, "info-icon", {}, (e7) => {
3126
+ var o4 = comment();
3127
+ slot(first_child(o4), t2, "info-icon", {}, (e7) => {
3128
3128
  Icon(e7, {
3129
3129
  type: "info"
3130
3130
  });
3131
- }), append(e6, i4);
3131
+ }), append(e6, o4);
3132
3132
  }
3133
3133
  }
3134
3134
  });
@@ -3139,27 +3139,27 @@ function Toaster(e2, t2) {
3139
3139
  class: n2.class,
3140
3140
  "data-sonner-toaster": true,
3141
3141
  "data-theme": get$1(q2),
3142
- "data-rich-colors": g2(),
3142
+ "data-rich-colors": v2(),
3143
3143
  dir: e5,
3144
3144
  "data-y-position": t3,
3145
3145
  "data-x-position": s5,
3146
3146
  style: n2.style,
3147
- ...i2,
3147
+ ...o2,
3148
3148
  [fe]: {
3149
- "--front-toast-height": `${(_a2 = store_get(C2, "$heights", o2)[0]) == null ? void 0 : _a2.height}px`,
3149
+ "--front-toast-height": `${(_a2 = store_get(C2, "$heights", i2)[0]) == null ? void 0 : _a2.height}px`,
3150
3150
  "--offset": "number" == typeof w2() ? `${w2()}px` : w2() || "32px",
3151
3151
  "--width": "356px",
3152
3152
  "--gap": "14px"
3153
3153
  }
3154
3154
  }, "svelte-1fo5d1m"), c3.dir = c3.dir;
3155
3155
  }, [() => "auto" === x2() ? getDocumentDirection() : x2(), () => get$1(s4).split("-")[0], () => get$1(s4).split("-")[1]], derived_safe_equal), event("blur", c3, handleBlur), event("focus", c3, handleFocus), event("mouseenter", c3, () => set(M2, true)), event("mousemove", c3, () => set(M2, true)), event("mouseleave", c3, () => {
3156
- get$1(I2) || set(M2, false);
3157
- }), event("pointerdown", c3, () => set(I2, true)), event("pointerup", c3, () => set(I2, false)), append(e4, c3);
3158
- }), template_effect(() => set_attribute(s3, "aria-label", `${v2()} ${get$1(l2)}`)), append(e3, s3);
3156
+ get$1(T2) || set(M2, false);
3157
+ }), event("pointerdown", c3, () => set(T2, true)), event("pointerup", c3, () => set(T2, false)), append(e4, c3);
3158
+ }), template_effect(() => set_attribute(s3, "aria-label", `${g2()} ${get$1(l2)}`)), append(e3, s3);
3159
3159
  };
3160
- if_block(N2, (e3) => {
3160
+ if_block(E2, (e3) => {
3161
3161
  $toasts().length > 0 && e3(consequent);
3162
- }), append(e2, E2), pop(), s2();
3162
+ }), append(e2, j2), pop(), s2();
3163
3163
  }
3164
3164
  const Ve = writable(false), Ke = writable("https://sdk.playlight.dev");
3165
3165
  function handleClick(e2, t2, n2) {
@@ -3170,36 +3170,36 @@ function playGame(e2, t2) {
3170
3170
  var _a2;
3171
3171
  e2.stopPropagation(), e2.preventDefault(), (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2, t2.game.id), window.open("https://" + t2.game.domain, "_blank", "noopener");
3172
3172
  }
3173
- var Ue = /* @__PURE__ */ template('<div><p class="text-primary font-bold uppercase">New</p></div>'), Ze = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Je = /* @__PURE__ */ template("<button>Play</button>"), Xe = /* @__PURE__ */ template('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <div class="fade-mask bg-background/75 pointer-events-none absolute right-0 bottom-0 left-0 h-8 svelte-rulnq9"></div></div>'), Ye = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <!> <img alt="game logo" loading="eager"></div>');
3173
+ var Ue = /* @__PURE__ */ template('<div><p class="text-primary font-bold uppercase">New</p></div>'), Ye = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Ze = /* @__PURE__ */ template("<button>Play</button>"), Je = /* @__PURE__ */ template('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <div class="fade-mask bg-background/75 pointer-events-none absolute right-0 bottom-0 left-0 h-8 svelte-rulnq9"></div></div>'), Xe = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <!> <img alt="game logo" loading="eager"></div>');
3174
3174
  function GameCard(e2, t2) {
3175
3175
  push(t2, true);
3176
- const [n2, i2] = setup_stores();
3177
- let o2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false), d2 = state(void 0);
3176
+ const [n2, o2] = setup_stores();
3177
+ let i2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false), d2 = state(void 0);
3178
3178
  function handleMouseEnter() {
3179
- get$1(o2) || get$1(u2) || function playSound(e3, t3 = 1) {
3179
+ get$1(i2) || get$1(u2) || function playSound(e3, t3 = 1) {
3180
3180
  try {
3181
3181
  const n3 = new Audio(e3);
3182
3182
  n3.volume = t3, n3.play();
3183
3183
  } catch (e4) {
3184
3184
  console.error("Error playing sound:", e4);
3185
3185
  }
3186
- }(store_get(Ke, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), set(o2, true), get$1(s2) && t2.game.cover_video_url && get$1(s2).play().catch((e3) => console.error("Video play error:", e3));
3186
+ }(store_get(Ke, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), set(i2, true), get$1(s2) && t2.game.cover_video_url && get$1(s2).play().catch((e3) => console.error("Video play error:", e3));
3187
3187
  }
3188
3188
  function handleMouseLeave() {
3189
- get$1(u2) || (set(o2, false), get$1(s2) && get$1(a2) && get$1(s2).pause());
3189
+ get$1(u2) || (set(i2, false), get$1(s2) && get$1(a2) && get$1(s2).pause());
3190
3190
  }
3191
3191
  user_effect(() => {
3192
3192
  set(u2, "ontouchstart" in window);
3193
3193
  });
3194
- var f2 = Ye();
3195
- event("touchstart", I, () => set(u2, true), void 0, true), event("touchstart", q, function handleDocumentTouch(e3) {
3196
- get$1(d2) && !get$1(d2).contains(e3.target) && set(o2, false);
3194
+ var f2 = Xe();
3195
+ event("touchstart", T, () => set(u2, true), void 0, true), event("touchstart", q, function handleDocumentTouch(e3) {
3196
+ get$1(d2) && !get$1(d2).contains(e3.target) && set(i2, false);
3197
3197
  }, void 0, true), f2.__touchstart = handleMouseEnter, f2.__click = [handleClick, u2, t2];
3198
3198
  var p2 = child(f2), consequent = (e3) => {
3199
3199
  var t3 = Ue();
3200
3200
  let n3;
3201
- template_effect((e4) => n3 = set_class(t3, 1, "bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity", null, n3, e4), [() => ({
3202
- "opacity-0": get$1(o2)
3201
+ template_effect((e4) => n3 = set_class(t3, 1, "bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity select-none", null, n3, e4), [() => ({
3202
+ "opacity-0": get$1(i2)
3203
3203
  })]), append(e3, t3);
3204
3204
  };
3205
3205
  if_block(p2, (e3) => {
@@ -3210,12 +3210,12 @@ function GameCard(e2, t2) {
3210
3210
  })((_a2 = t2.game) == null ? void 0 : _a2.created_at) && e3(consequent);
3211
3211
  });
3212
3212
  var _2 = sibling(p2, 2), consequent_1 = (e3) => {
3213
- var n3 = Ze();
3214
- let i3;
3213
+ var n3 = Ye();
3214
+ let o3;
3215
3215
  n3.muted = true, bind_this(n3, (e4) => set(s2, e4), () => get$1(s2)), template_effect((e4) => {
3216
- set_attribute(n3, "src", t2.game.cover_video_url), i3 = set_class(n3, 1, "absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0", null, i3, e4);
3216
+ set_attribute(n3, "src", t2.game.cover_video_url), o3 = set_class(n3, 1, "absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0", null, o3, e4);
3217
3217
  }, [() => ({
3218
- "opacity-100": get$1(o2) && get$1(a2) && t2.game.cover_video_url
3218
+ "opacity-100": get$1(i2) && get$1(a2) && t2.game.cover_video_url
3219
3219
  })]), event("loadeddata", n3, () => {
3220
3220
  set(a2, true);
3221
3221
  }), append(e3, n3);
@@ -3223,40 +3223,40 @@ function GameCard(e2, t2) {
3223
3223
  if_block(_2, (e3) => {
3224
3224
  t2.game.cover_video_url && e3(consequent_1);
3225
3225
  });
3226
- var v2 = sibling(_2, 2);
3227
- let g2;
3228
- var h2 = sibling(v2, 2), consequent_2 = (e3) => {
3229
- var n3 = Je();
3230
- let i3;
3231
- n3.__click = [playGame, t2], template_effect((e4) => i3 = set_class(n3, 1, "bg-foreground text-background hover:bg-foreground/90 absolute right-4 bottom-4 z-15 flex items-center justify-center rounded-sm px-3 py-1 font-bold uppercase transition-all", null, i3, e4), [() => ({
3232
- "opacity-0": get$1(o2)
3226
+ var g2 = sibling(_2, 2);
3227
+ let v2;
3228
+ var h2 = sibling(g2, 2), consequent_2 = (e3) => {
3229
+ var n3 = Ze();
3230
+ let o3;
3231
+ n3.__click = [playGame, t2], template_effect((e4) => o3 = set_class(n3, 1, "bg-foreground text-background hover:bg-foreground/90 absolute right-4 bottom-4 z-15 flex items-center justify-center rounded-sm px-3 py-1 font-bold uppercase transition-all", null, o3, e4), [() => ({
3232
+ "opacity-0": get$1(i2)
3233
3233
  })]), append(e3, n3);
3234
3234
  };
3235
3235
  if_block(h2, (e3) => {
3236
3236
  get$1(u2) && e3(consequent_2);
3237
3237
  });
3238
3238
  var m2 = sibling(h2, 2), consequent_3 = (e3) => {
3239
- var n3 = Xe(), i3 = child(n3), o3 = child(i3), s3 = child(o3), a3 = child(sibling(o3, 2));
3239
+ var n3 = Je(), o3 = child(n3), i3 = child(o3), s3 = child(i3), a3 = child(sibling(i3, 2));
3240
3240
  template_effect(() => {
3241
3241
  set_text(s3, t2.game.name), set_text(a3, t2.game.description || "No description.");
3242
3242
  }), transition(3, n3, () => slide), append(e3, n3);
3243
3243
  };
3244
3244
  if_block(m2, (e3) => {
3245
- get$1(o2) && e3(consequent_3);
3245
+ get$1(i2) && e3(consequent_3);
3246
3246
  });
3247
3247
  var b2 = sibling(m2, 2);
3248
3248
  let y2;
3249
3249
  bind_this(f2, (e3) => set(d2, e3), () => get$1(d2)), template_effect((e3, n3) => {
3250
- set_class(f2, 1, `bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] min-h-92 cursor-pointer flex-col shadow-xl transition hover:outline-2 lg:h-3/7 ${(get$1(l2) ? "" : "animate-pulse") ?? ""}`, "svelte-rulnq9"), set_attribute(v2, "src", t2.game.cover_image_url), g2 = set_class(v2, 1, "prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9", null, g2, e3), set_attribute(b2, "src", t2.game.logo_url), y2 = set_class(b2, 1, "absolute right-0 -bottom-[18%] left-0 z-12 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 prevent-image-select svelte-rulnq9", null, y2, n3);
3250
+ set_class(f2, 1, `bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] min-h-92 cursor-pointer flex-col shadow-xl transition hover:outline-2 lg:h-3/7 ${(get$1(l2) ? "" : "animate-pulse") ?? ""}`, "svelte-rulnq9"), set_attribute(g2, "src", t2.game.cover_image_url), v2 = set_class(g2, 1, "prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9", null, v2, e3), set_attribute(b2, "src", t2.game.logo_url), y2 = set_class(b2, 1, "absolute right-0 -bottom-[18%] left-0 z-12 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 prevent-image-select svelte-rulnq9", null, y2, n3);
3251
3251
  }, [() => ({
3252
- "opacity-100": get$1(l2) && (!get$1(o2) || !get$1(a2) || !t2.game.cover_video_url)
3252
+ "opacity-100": get$1(l2) && (!get$1(i2) || !get$1(a2) || !t2.game.cover_video_url)
3253
3253
  }), () => ({
3254
3254
  "opacity-100": get$1(c2)
3255
- })]), event("mouseenter", f2, handleMouseEnter), event("focus", f2, handleMouseEnter), event("mouseleave", f2, handleMouseLeave), event("blur", f2, handleMouseLeave), event("load", v2, () => {
3255
+ })]), event("mouseenter", f2, handleMouseEnter), event("focus", f2, handleMouseEnter), event("mouseleave", f2, handleMouseLeave), event("blur", f2, handleMouseLeave), event("load", g2, () => {
3256
3256
  set(l2, true);
3257
3257
  }), event("load", b2, () => {
3258
3258
  set(c2, true);
3259
- }), append(e2, f2), pop(), i2();
3259
+ }), append(e2, f2), pop(), o2();
3260
3260
  }
3261
3261
  delegate(["touchstart", "click"]);
3262
3262
  const Qe = new (_b = class {
@@ -3266,26 +3266,26 @@ const Qe = new (_b = class {
3266
3266
  }
3267
3267
  async request(e2, t2 = {}) {
3268
3268
  try {
3269
- const n2 = `${this.baseUrl}${e2}`, i2 = await fetch(n2, {
3269
+ const n2 = `${this.baseUrl}${e2}`, o2 = await fetch(n2, {
3270
3270
  ...t2,
3271
3271
  headers: {
3272
3272
  "Content-Type": "application/json",
3273
3273
  ...t2.headers
3274
3274
  }
3275
3275
  });
3276
- if (!i2.ok) {
3276
+ if (!o2.ok) {
3277
3277
  let e3;
3278
3278
  try {
3279
- e3 = await i2.json();
3279
+ e3 = await o2.json();
3280
3280
  } catch {
3281
3281
  } finally {
3282
- if (429 !== i2.status && 404 !== i2.status) throw new Error(`API request failed: ${(e3 == null ? void 0 : e3.error) || (e3 == null ? void 0 : e3.message) || i2.status}`);
3283
- return 429 === i2.status ? console.warn("Playlight request didn't go through due to rate limiting.") : console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.");
3282
+ if (429 !== o2.status && 404 !== o2.status) throw new Error(`API request failed: ${(e3 == null ? void 0 : e3.error) || (e3 == null ? void 0 : e3.message) || o2.status}`);
3283
+ return 429 === o2.status ? console.warn("Playlight request didn't go through due to rate limiting.") : console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.");
3284
3284
  }
3285
3285
  }
3286
- return await i2.json();
3286
+ return await o2.json();
3287
3287
  } catch (e3) {
3288
- Ne.error("Error: " + e3), console.error("Playlight API error:", e3);
3288
+ Ee.error("Error: " + e3), console.error("Playlight API error:", e3);
3289
3289
  }
3290
3290
  }
3291
3291
  // Get all categories
@@ -3303,9 +3303,9 @@ const Qe = new (_b = class {
3303
3303
  async getCurrentGameInfo() {
3304
3304
  if (this.currentGame) return this.currentGame;
3305
3305
  let e2 = "/game-by-domain/" + __privateMethod(this, _PlayLightAPI_instances, e_fn).call(this);
3306
- return this.currentGame = await this.request(e2), {
3306
+ return this.currentGame = await this.request(e2), this.currentGame ? {
3307
3307
  ...this.currentGame
3308
- };
3308
+ } : void 0;
3309
3309
  }
3310
3310
  // Track discovery overlay open
3311
3311
  async trackOpen() {
@@ -3328,6 +3328,13 @@ const Qe = new (_b = class {
3328
3328
  })
3329
3329
  });
3330
3330
  }
3331
+ // Like or unlike a game (pass gameId and true to like, false to unlike)
3332
+ async toggleLike(e2, t2 = true) {
3333
+ const n2 = t2 ? "like" : "unlike", o2 = await this.request(`/rating/${e2}/${n2}`, {
3334
+ method: "POST"
3335
+ });
3336
+ return (o2 == null ? void 0 : o2.success) || false;
3337
+ }
3331
3338
  }, _PlayLightAPI_instances = new WeakSet(), e_fn = function() {
3332
3339
  const e2 = window.location.hostname;
3333
3340
  return e2.startsWith("www.") ? e2.substring(4) : e2;
@@ -3339,8 +3346,8 @@ function cubicOut(e2) {
3339
3346
  function elasticOut(e2) {
3340
3347
  return Math.sin(-13 * (e2 + 1) * Math.PI / 2) * Math.pow(2, -10 * e2) + 1;
3341
3348
  }
3342
- function flip(e2, { from: t2, to: n2 }, i2 = {}) {
3343
- var { delay: o2 = 0, duration: s2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = i2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, d2] = l2.transformOrigin.split(" ").map(parseFloat);
3349
+ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3350
+ var { delay: i2 = 0, duration: s2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = o2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, d2] = l2.transformOrigin.split(" ").map(parseFloat);
3344
3351
  u2 /= e2.clientWidth, d2 /= e2.clientHeight;
3345
3352
  var f2 = (
3346
3353
  /**
@@ -3354,9 +3361,9 @@ function flip(e2, { from: t2, to: n2 }, i2 = {}) {
3354
3361
  t3.parentElement;
3355
3362
  return n3;
3356
3363
  }(e2)
3357
- ), p2 = e2.clientWidth / n2.width / f2, _2 = e2.clientHeight / n2.height / f2, v2 = t2.left + t2.width * u2, g2 = t2.top + t2.height * d2, h2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * d2, b2 = (v2 - h2) * p2, y2 = (g2 - m2) * _2, $2 = t2.width / n2.width, w2 = t2.height / n2.height;
3364
+ ), p2 = e2.clientWidth / n2.width / f2, _2 = e2.clientHeight / n2.height / f2, g2 = t2.left + t2.width * u2, v2 = t2.top + t2.height * d2, h2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * d2, b2 = (g2 - h2) * p2, y2 = (v2 - m2) * _2, $2 = t2.width / n2.width, w2 = t2.height / n2.height;
3358
3365
  return {
3359
- delay: o2,
3366
+ delay: i2,
3360
3367
  duration: "function" == typeof s2 ? s2(Math.sqrt(b2 * b2 + y2 * y2)) : s2,
3361
3368
  easing: a2,
3362
3369
  css: (e3, t3) => `transform: ${c2} translate(${t3 * b2}px, ${t3 * y2}px) scale(${e3 + t3 * $2}, ${e3 + t3 * w2});`
@@ -3364,12 +3371,12 @@ function flip(e2, { from: t2, to: n2 }, i2 = {}) {
3364
3371
  }
3365
3372
  var on_click$1 = (e2, t2, n2) => {
3366
3373
  set(t2, ""), set(n2, !get$1(n2));
3367
- }, et = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), tt = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, i2) => {
3368
- t2(n2), set(i2, false);
3369
- }, nt = /* @__PURE__ */ template("<button> </button>"), rt = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), it = /* @__PURE__ */ template('<div class="bg-background/85 fixed left-1/2 z-50 mt-24 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'), ot = /* @__PURE__ */ template('<div class="flex w-full flex-col py-2"><h1 class="mb-0! py-2 text-center text-2xl font-bold text-white drop-shadow-xl lg:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="truncate max-w-[40vw] text-2xl font-bold text-black lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
3374
+ }, et = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), tt = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, o2) => {
3375
+ t2(n2), set(o2, false);
3376
+ }, nt = /* @__PURE__ */ template("<button> </button>"), rt = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), ot = /* @__PURE__ */ template('<div class="bg-background/85 fixed left-1/2 z-50 mt-24 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur-xl"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'), it = /* @__PURE__ */ template('<div class="flex w-full flex-col py-2"><h1 class="mb-0! py-2 text-center text-2xl font-bold text-white drop-shadow-xl lg:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-background transition hover:rotate-5"><span class="truncate max-w-[40vw] text-2xl font-bold text-background lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
3370
3377
  function Navigation(e2, t2) {
3371
3378
  push(t2, true);
3372
- let n2, i2 = prop(t2, "categories", 19, () => []), o2 = prop(t2, "selectedCategory", 15), s2 = state(false), a2 = /* @__PURE__ */ derived(() => o2() || (i2().length > 0 ? i2()[0] : "...")), l2 = state(""), c2 = state(void 0), u2 = /* @__PURE__ */ derived(() => get$1(l2) ? i2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : i2());
3379
+ let n2, o2 = prop(t2, "categories", 19, () => []), i2 = prop(t2, "selectedCategory", 15), s2 = state(false), a2 = /* @__PURE__ */ derived(() => i2() || (o2().length > 0 ? o2()[0] : "...")), l2 = state(""), c2 = state(void 0), u2 = /* @__PURE__ */ derived(() => get$1(l2) ? o2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : o2());
3373
3380
  const d2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
3374
3381
  let f2, p2 = state(proxy(d2[0]));
3375
3382
  onMount(function updateRandomPhrase() {
@@ -3377,11 +3384,11 @@ function Navigation(e2, t2) {
3377
3384
  for (e3 = Math.floor(Math.random() * (d2 == null ? void 0 : d2.length)); e3 == f2; ) e3 = Math.floor(Math.random() * (d2 == null ? void 0 : d2.length));
3378
3385
  set(p2, proxy(d2[e3])), f2 = e3;
3379
3386
  });
3380
- var _2 = ot();
3387
+ var _2 = it();
3381
3388
  event("click", q, function handleClickOutside(e3) {
3382
3389
  get$1(c2) && !get$1(c2).contains(e3.target) && n2 && !n2.contains(e3.target) && set(s2, false);
3383
3390
  });
3384
- var v2 = child(_2), g2 = child(v2), h2 = child(g2), m2 = sibling(g2, 2);
3391
+ var g2 = child(_2), v2 = child(g2), h2 = child(v2), m2 = sibling(v2, 2);
3385
3392
  m2.__click = [on_click$1, l2, s2];
3386
3393
  var b2 = child(m2), y2 = child(b2), $2 = sibling(b2, 2);
3387
3394
  const w2 = /* @__PURE__ */ derived(() => get$1(s2) ? "rotate-180 transform" : "");
@@ -3394,8 +3401,8 @@ function Navigation(e2, t2) {
3394
3401
  d: "m6 9 6 6 6-6"
3395
3402
  }]],
3396
3403
  children: (e4, n4) => {
3397
- var i3 = comment();
3398
- slot(first_child(i3), t3, "default", {}, null), append(e4, i3);
3404
+ var o3 = comment();
3405
+ slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3399
3406
  },
3400
3407
  $$slots: {
3401
3408
  default: true
@@ -3405,11 +3412,11 @@ function Navigation(e2, t2) {
3405
3412
  size: 25,
3406
3413
  strokeWidth: 3,
3407
3414
  get class() {
3408
- return `mt-1 ml-1 text-black ${get$1(w2) ?? ""} transition-transform duration-200`;
3415
+ return `mt-1 ml-1 text-background ${get$1(w2) ?? ""} transition-transform duration-200`;
3409
3416
  }
3410
3417
  }), bind_this(m2, (e3) => n2 = e3, () => n2);
3411
- var x2 = sibling(v2, 2), consequent_2 = (e3) => {
3412
- var t3 = it(), n3 = child(t3), a3 = child(n3), d3 = child(a3);
3418
+ var x2 = sibling(g2, 2), consequent_2 = (e3) => {
3419
+ var t3 = ot(), n3 = child(t3), a3 = child(n3), d3 = child(a3);
3413
3420
  !function Search(e4, t4) {
3414
3421
  const n4 = legacy_rest_props(t4, ["children", "$$slots", "$$events", "$$legacy"]);
3415
3422
  Icon$1(e4, spread_props({
@@ -3423,8 +3430,8 @@ function Navigation(e2, t2) {
3423
3430
  d: "m21 21-4.3-4.3"
3424
3431
  }]],
3425
3432
  children: (e5, n5) => {
3426
- var i3 = comment();
3427
- slot(first_child(i3), t4, "default", {}, null), append(e5, i3);
3433
+ var o3 = comment();
3434
+ slot(first_child(o3), t4, "default", {}, null), append(e5, o3);
3428
3435
  },
3429
3436
  $$slots: {
3430
3437
  default: true
@@ -3444,25 +3451,25 @@ function Navigation(e2, t2) {
3444
3451
  var t5 = rt();
3445
3452
  each(t5, 28, () => get$1(u2), (e6) => e6, (e6, t6) => {
3446
3453
  var n4 = nt();
3447
- n4.__click = [on_click_1$1, o2, t6, s2];
3448
- var i3 = child(n4);
3454
+ n4.__click = [on_click_1$1, i2, t6, s2];
3455
+ var o3 = child(n4);
3449
3456
  template_effect(() => {
3450
- set_class(n4, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(o2() != t6 ? "hover:bg-muted-foreground/20" : "") ?? ""} ${(o2() == t6 ? "bg-white text-black" : "text-white") ?? ""}`), set_text(i3, t6);
3457
+ set_class(n4, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(i2() != t6 ? "hover:bg-muted-foreground/20" : "") ?? ""} ${(i2() == t6 ? "bg-white text-background" : "text-white") ?? ""}`), set_text(o3, t6);
3451
3458
  }), function animation(e7, t7, n5) {
3452
- var i4, o3, s3, a4 = (
3459
+ var o4, i3, s3, a4 = (
3453
3460
  /** @type {EachItem} */
3454
3461
  ce
3455
3462
  ), l3 = null;
3456
3463
  a4.a ?? (a4.a = {
3457
3464
  element: e7,
3458
3465
  measure() {
3459
- i4 = this.element.getBoundingClientRect();
3466
+ o4 = this.element.getBoundingClientRect();
3460
3467
  },
3461
3468
  apply() {
3462
- if (s3 == null ? void 0 : s3.abort(), o3 = this.element.getBoundingClientRect(), i4.left !== o3.left || i4.right !== o3.right || i4.top !== o3.top || i4.bottom !== o3.bottom) {
3469
+ if (s3 == null ? void 0 : s3.abort(), i3 = this.element.getBoundingClientRect(), o4.left !== i3.left || o4.right !== i3.right || o4.top !== i3.top || o4.bottom !== i3.bottom) {
3463
3470
  const e8 = t7()(this.element, {
3464
- from: i4,
3465
- to: o3
3471
+ from: o4,
3472
+ to: i3
3466
3473
  }, n5 == null ? void 0 : n5());
3467
3474
  s3 = animate(this.element, e8, void 0, 1, () => {
3468
3475
  s3 == null ? void 0 : s3.abort(), s3 = void 0;
@@ -3471,7 +3478,7 @@ function Navigation(e2, t2) {
3471
3478
  },
3472
3479
  fix() {
3473
3480
  if (!e7.getAnimations().length) {
3474
- var { position: t8, width: n6, height: o4 } = getComputedStyle(e7);
3481
+ var { position: t8, width: n6, height: i4 } = getComputedStyle(e7);
3475
3482
  if ("absolute" !== t8 && "fixed" !== t8) {
3476
3483
  var s4 = (
3477
3484
  /** @type {HTMLElement | SVGElement} */
@@ -3482,10 +3489,10 @@ function Navigation(e2, t2) {
3482
3489
  width: s4.width,
3483
3490
  height: s4.height,
3484
3491
  transform: s4.transform
3485
- }, s4.position = "absolute", s4.width = n6, s4.height = o4;
3492
+ }, s4.position = "absolute", s4.width = n6, s4.height = i4;
3486
3493
  var a5 = e7.getBoundingClientRect();
3487
- if (i4.left !== a5.left || i4.top !== a5.top) {
3488
- var c3 = `translate(${i4.left - a5.left}px, ${i4.top - a5.top}px)`;
3494
+ if (o4.left !== a5.left || o4.top !== a5.top) {
3495
+ var c3 = `translate(${o4.left - a5.left}px, ${o4.top - a5.top}px)`;
3489
3496
  s4.transform = s4.transform ? `${s4.transform} ${c3}` : c3;
3490
3497
  }
3491
3498
  }
@@ -3515,12 +3522,12 @@ function Navigation(e2, t2) {
3515
3522
  }, t4);
3516
3523
  };
3517
3524
  if_block(p3, (e4) => {
3518
- 0 === i2().length ? e4(consequent) : e4(alternate, false);
3525
+ 0 === o2().length ? e4(consequent) : e4(alternate, false);
3519
3526
  }), bind_this(t3, (e4) => set(c2, e4), () => get$1(c2)), function bind_value(e4, t4, n4 = t4) {
3520
- var i3 = is_runes();
3521
- listen_to_event_and_reset_event(e4, "input", (o3) => {
3522
- var s3 = o3 ? e4.defaultValue : e4.value;
3523
- if (s3 = is_numberlike_input(e4) ? to_number(s3) : s3, n4(s3), i3 && s3 !== (s3 = t4())) {
3527
+ var o3 = is_runes();
3528
+ listen_to_event_and_reset_event(e4, "input", (i3) => {
3529
+ var s3 = i3 ? e4.defaultValue : e4.value;
3530
+ if (s3 = is_numberlike_input(e4) ? to_number(s3) : s3, n4(s3), o3 && s3 !== (s3 = t4())) {
3524
3531
  var a4 = e4.selectionStart, l3 = e4.selectionEnd;
3525
3532
  e4.value = s3 ?? "", // Restore selection
3526
3533
  null !== l3 && (e4.selectionStart = a4, e4.selectionEnd = Math.min(l3, e4.value.length));
@@ -3551,62 +3558,167 @@ function Navigation(e2, t2) {
3551
3558
  })), append(e2, _2), pop();
3552
3559
  }
3553
3560
  delegate(["click"]);
3554
- var st = /* @__PURE__ */ template('<div class="-mx-10 mt-5 flex h-1/2 max-h-[75vh] min-h-92 w-10 flex-col lg:h-3/7"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between py-6"><div class="bg-muted-foreground min-[1920px]:h-1/4 h-1/5 w-px"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px min-[1920px]:h-1/4"></div></div></div></div>');
3561
+ var st = /* @__PURE__ */ template('<div class="-mx-10 mt-5 flex h-1/2 max-h-[75vh] min-h-92 w-10 flex-col lg:h-3/7"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between py-6"><div class="bg-muted-foreground min-[1920px]:h-1/4 h-1/5 w-px"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap select-none">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px min-[1920px]:h-1/4"></div></div></div></div>');
3562
+ function restore(e2, t2, n2, o2, i2, s2) {
3563
+ set(t2, false), set(n2, true), set(o2, 250), set(i2, 0), s2(250, 0, 250, (e3, t3, n3) => {
3564
+ set(o2, e3 * (1 - n3)), set(i2, proxy(n3));
3565
+ });
3566
+ }
3567
+ async function toggleLike(e2, t2, n2, o2) {
3568
+ var _a2;
3569
+ if (!((_a2 = t2.currentGame) == null ? void 0 : _a2.id)) return;
3570
+ const i2 = !get$1(n2);
3571
+ set(n2, !get$1(n2)), set(o2, get$1(o2) + (i2 ? 1 : -1)), // Save to localStorage
3572
+ i2 ? localStorage.setItem(`playlight_${t2.currentGame.id}_liked`, "true") : localStorage.removeItem(`playlight_${t2.currentGame.id}_liked`);
3573
+ await Qe.toggleLike(t2.currentGame.id, i2) || set(o2, get$1(o2) + (i2 ? -1 : 1));
3574
+ }
3575
+ var at = /* @__PURE__ */ template('<div class="bg-background/85 fixed bottom-4 left-4 z-2 flex touch-none flex-wrap items-center gap-1 border-1 p-4 text-start shadow-lg backdrop-blur-lg max-sm:right-4 sm:w-72" role="button" tabindex="0" aria-label="Currently playing game"><div class="w-full"><p class="text-muted-foreground text-sm select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><img alt="current game logo"> <p class="text-foreground max-w-2/3 truncate text-lg font-bold"> </p> <div class="mt-0.5 ml-auto flex items-center gap-2"><p class="text-muted-foreground text-sm"> </p> <button class="text-muted-foreground cursor-pointer transition hover:text-white"><!></button></div></div></div>'), lt = /* @__PURE__ */ template('<button class="bg-background/85 hover:bg-background/95 fixed bottom-0 z-3 rounded-t-md border px-4 py-1.5 shadow-md backdrop-blur-sm transition max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72" aria-label="Show currently playing game"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button>'), ct = /* @__PURE__ */ template("<!> <!>", 1);
3576
+ function CurrentGameDisplay(e2, t2) {
3577
+ var _a2;
3578
+ push(t2, true);
3579
+ let n2 = state(false), o2 = state(true), i2 = state(false), s2 = state(0), a2 = state(1), l2 = state(false), c2 = state(false), u2 = state(proxy(((_a2 = t2.currentGame) == null ? void 0 : _a2.likes) || 0)), d2 = 0;
3580
+ function startDrag(e3) {
3581
+ set(l2, true), d2 = e3.type.includes("touch") ? e3.touches[0].clientY : e3.clientY;
3582
+ }
3583
+ function drag(e3) {
3584
+ if (!get$1(l2)) return;
3585
+ const t3 = e3.type.includes("touch") ? e3.touches[0].clientY : e3.clientY, n3 = Math.max(0, t3 - d2);
3586
+ set(s2, proxy(n3)), set(a2, proxy(Math.max(0, 1 - n3 / 150))), n3 > 40 && function hide() {
3587
+ set(l2, false), animate2(get$1(s2), 250, 250, (e4, t4, n4) => {
3588
+ set(s2, e4 + (t4 - e4) * n4), set(a2, proxy(Math.max(0, 1 - 1.5 * n4))), 1 === n4 && (set(o2, false), set(i2, true));
3589
+ });
3590
+ }();
3591
+ }
3592
+ function endDrag() {
3593
+ get$1(l2) && (set(l2, false), get$1(s2) < 40 && function animateBack() {
3594
+ animate2(get$1(s2), 0, 250, (e3, t3, n3) => {
3595
+ set(s2, e3 * (1 - n3)), set(a2, 1);
3596
+ });
3597
+ }());
3598
+ }
3599
+ function animate2(e3, t3, n3, o3) {
3600
+ const i3 = Date.now();
3601
+ !function frame() {
3602
+ const s3 = Math.min((Date.now() - i3) / n3, 1);
3603
+ o3(e3, t3, s3), s3 < 1 && requestAnimationFrame(frame);
3604
+ }();
3605
+ }
3606
+ user_effect(() => {
3607
+ var _a3, _b2;
3608
+ ((_a3 = t2.currentGame) == null ? void 0 : _a3.id) && (set(c2, null !== localStorage.getItem(`playlight_${t2.currentGame.id}_liked`)), set(u2, proxy(((_b2 = t2.currentGame) == null ? void 0 : _b2.likes) || 0)));
3609
+ });
3610
+ var f2 = ct(), p2 = first_child(f2), consequent = (e3) => {
3611
+ var o3 = at();
3612
+ o3.__mousedown = startDrag, o3.__mousemove = drag, o3.__mouseup = endDrag, o3.__touchstart = startDrag, o3.__touchmove = drag, o3.__touchend = endDrag;
3613
+ var i3 = sibling(child(o3), 2), l3 = child(i3);
3614
+ let d3;
3615
+ var f3 = sibling(l3, 2), p3 = child(f3), _3 = child(sibling(f3, 2)), g2 = child(_3), v2 = sibling(_3, 2);
3616
+ v2.__click = [toggleLike, t2, c2, u2];
3617
+ var h2 = child(v2);
3618
+ const m2 = /* @__PURE__ */ derived(() => get$1(c2) ? "currentColor" : "none");
3619
+ !function Thumbs_up(e4, t3) {
3620
+ const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3621
+ Icon$1(e4, spread_props({
3622
+ name: "thumbs-up"
3623
+ }, () => n3, {
3624
+ iconNode: [["path", {
3625
+ d: "M7 10v12"
3626
+ }], ["path", {
3627
+ d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"
3628
+ }]],
3629
+ children: (e5, n4) => {
3630
+ var o4 = comment();
3631
+ slot(first_child(o4), t3, "default", {}, null), append(e5, o4);
3632
+ },
3633
+ $$slots: {
3634
+ default: true
3635
+ }
3636
+ }));
3637
+ }(h2, {
3638
+ size: 18,
3639
+ strokeWidth: 2.5,
3640
+ get fill() {
3641
+ return get$1(m2);
3642
+ },
3643
+ style: "margin-top: -5px;"
3644
+ }), template_effect((e4) => {
3645
+ var _a3, _b2;
3646
+ set_style(o3, `transform: translateY(${get$1(s2) ?? ""}px); opacity: ${get$1(a2) ?? ""}; cursor: grab;`), set_attribute(l3, "src", (_a3 = t2.currentGame) == null ? void 0 : _a3.logo_url), d3 = set_class(l3, 1, "bg-muted h-5 w-5 select-none", null, d3, e4), set_text(p3, ((_b2 = t2.currentGame) == null ? void 0 : _b2.name) || "Default name"), set_text(g2, get$1(u2)), set_style(v2, `color: ${(get$1(c2) ? "white !important" : "") ?? ""};`), set_attribute(v2, "aria-label", get$1(c2) ? "Unlike game" : "Like game");
3647
+ }, [() => ({
3648
+ "animate-pulse": !get$1(n2)
3649
+ })]), event("mouseleave", o3, endDrag), event("load", l3, () => {
3650
+ set(n2, true);
3651
+ }), append(e3, o3);
3652
+ };
3653
+ if_block(p2, (e3) => {
3654
+ t2.currentGame && get$1(o2) && e3(consequent);
3655
+ });
3656
+ var _2 = sibling(p2, 2), consequent_1 = (e3) => {
3657
+ var t3 = lt();
3658
+ t3.__mousedown = [restore, i2, o2, s2, a2, animate2], t3.__touchstart = [restore, i2, o2, s2, a2, animate2], transition(3, t3, () => fly, () => ({
3659
+ delay: 150,
3660
+ y: 30
3661
+ })), append(e3, t3);
3662
+ };
3663
+ if_block(_2, (e3) => {
3664
+ t2.currentGame && get$1(i2) && e3(consequent_1);
3665
+ }), append(e2, f2), pop();
3666
+ }
3667
+ delegate(["mousedown", "mousemove", "mouseup", "touchstart", "touchmove", "touchend", "click"]);
3555
3668
  var on_click = (e2, t2) => {
3556
3669
  localStorage.getItem("playlight_exit_intent_disabled_by_user") ? localStorage.removeItem("playlight_exit_intent_disabled_by_user") : localStorage.setItem("playlight_exit_intent_disabled_by_user", true), set(t2, !get$1(t2));
3557
- }, at = /* @__PURE__ */ template('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 text-primary p-1 px-2 text-sm"> </p></button>'), on_click_1 = (e2, t2) => store_set(Ve, false), lt = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), ct = /* @__PURE__ */ template('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'), ut = /* @__PURE__ */ template("<!> <!>", 1), dt = /* @__PURE__ */ template('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'), ft = /* @__PURE__ */ template('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md"><div class="ml-2 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank"><img alt="logo" class="w-50"></a> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden md:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50" aria-label="Close"><!></button></div></div> <div class="mx-auto p-2 px-5"><!></div> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></div> <div class="fixed right-0 bottom-0 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank" class="text-muted-foreground flex items-center gap-1 text-sm transition hover:text-white">Game Developer? Join Playlight <!></a></div></div>');
3670
+ }, ut = /* @__PURE__ */ template('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 text-primary p-1 px-2 text-sm"> </p></button>'), on_click_1 = (e2, t2) => store_set(Ve, false), dt = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), ft = /* @__PURE__ */ template('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'), pt = /* @__PURE__ */ template("<!> <!>", 1), _t = /* @__PURE__ */ template('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'), gt = /* @__PURE__ */ template('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md"><div class="ml-2 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank"><img alt="logo" class="w-50"></a> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden md:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50" aria-label="Close"><!></button></div></div> <div class="mx-auto p-2 px-5"><!></div> <!> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></div> <div class="fixed right-4 bottom-4 flex items-center justify-between"><a href="https://playlight.dev" target="_blank" class="text-muted-foreground flex items-center gap-1 text-sm transition hover:text-white">Join Playlight <!></a></div></div>');
3558
3671
  function DiscoveryOverlay(e2, t2) {
3559
3672
  push(t2, true);
3560
- const [n2, i2] = setup_stores();
3561
- let o2, s2 = prop(t2, "showIntentToggle", 3, true), a2 = state(void 0), l2 = state(true), c2 = state(false), u2 = state(void 0), d2 = state(proxy([])), f2 = state(proxy([])), p2 = state(true), _2 = state(1), v2 = state(true), g2 = state(void 0), h2 = state(false);
3673
+ const [n2, o2] = setup_stores();
3674
+ let i2, s2 = prop(t2, "showIntentToggle", 3, true), a2 = state(true), l2 = state(void 0), c2 = state(true), u2 = state(false), d2 = state(void 0), f2 = state(proxy([])), p2 = state(proxy([])), _2 = state(1), g2 = state(true), v2 = state(void 0), h2 = state(false);
3562
3675
  async function fetchGames() {
3563
- if (!(get$1(l2) && get$1(_2) > 1 || get$1(c2))) try {
3564
- 1 === get$1(_2) ? set(l2, true) : set(c2, true);
3565
- const e3 = get$1(h2) ? null : get$1(a2), t3 = await Qe.getSuggestions(e3, get$1(_2)), n3 = (t3 == null ? void 0 : t3.games) || [], i3 = n3.filter((e4) => !get$1(d2).some((t4) => t4.id === e4.id));
3566
- set(d2, proxy([...get$1(d2), ...i3])), n3.length < 10 ? !get$1(h2) && get$1(a2) ? (
3676
+ if (!(get$1(c2) && get$1(_2) > 1 || get$1(u2))) try {
3677
+ 1 === get$1(_2) ? set(c2, true) : set(u2, true);
3678
+ const e3 = get$1(h2) ? null : get$1(l2), t3 = await Qe.getSuggestions(e3, get$1(_2)), n3 = (t3 == null ? void 0 : t3.games) || [], o3 = n3.filter((e4) => !get$1(f2).some((t4) => t4.id === e4.id));
3679
+ set(f2, proxy([...get$1(f2), ...o3])), n3.length < 10 ? !get$1(h2) && get$1(l2) ? (
3567
3680
  // Try with all games
3568
3681
  (set(h2, true), set(_2, 1), setTimeout(() => fetchGames(), 100))
3569
- ) : set(v2, false) : set(_2, get$1(_2) + 1);
3682
+ ) : set(g2, false) : set(_2, get$1(_2) + 1);
3570
3683
  } catch (e3) {
3571
- console.error(e3), Ne.error("Failed to load games: " + e3);
3684
+ console.error(e3), Ee.error("Failed to load games: " + e3);
3572
3685
  } finally {
3573
- set(l2, false), set(c2, false), // For Chrome: manually check if element is still in view and should trigger another load
3574
- get$1(v2) && get$1(g2) && setTimeout(() => {
3575
- const e3 = get$1(g2).getBoundingClientRect();
3686
+ set(c2, false), set(u2, false), // For Chrome: manually check if element is still in view and should trigger another load
3687
+ get$1(g2) && get$1(v2) && setTimeout(() => {
3688
+ const e3 = get$1(v2).getBoundingClientRect();
3576
3689
  !(e3.top >= -200 && // Include rootMargin
3577
3690
  e3.left >= 0 && e3.bottom <= window.innerHeight + 200 && // Include rootMargin
3578
- e3.right <= window.innerWidth) || get$1(l2) || get$1(c2) || fetchGames();
3691
+ e3.right <= window.innerWidth) || get$1(c2) || get$1(u2) || fetchGames();
3579
3692
  }, 150);
3580
3693
  }
3581
3694
  }
3582
- onMount(() => (set(p2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
3583
- o2 = new IntersectionObserver((e3) => {
3584
- e3[0].isIntersecting && get$1(v2) && !get$1(l2) && !get$1(c2) && fetchGames();
3695
+ onMount(() => (set(a2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
3696
+ i2 = new IntersectionObserver((e3) => {
3697
+ e3[0].isIntersecting && get$1(g2) && !get$1(c2) && !get$1(u2) && fetchGames();
3585
3698
  }, {
3586
3699
  rootMargin: "200px"
3587
- }), () => o2 == null ? void 0 : o2.disconnect())), onMount(async () => {
3588
- const e3 = await Qe.getCurrentGameInfo();
3589
- set(u2, proxy(e3 == null ? void 0 : e3.category)), await async function fetchCategories() {
3590
- var _a2, _b2, _c2, _d;
3591
- set(f2, proxy(await Qe.getCategories())), !get$1(a2) && ((_a2 = get$1(f2)) == null ? void 0 : _a2.length) > 0 && set(a2, proxy(get$1(u2) && ((_b2 = get$1(f2)) == null ? void 0 : _b2.includes(get$1(u2))) ? get$1(u2) : (_d = get$1(f2)) == null ? void 0 : _d[((_c2 = get$1(f2)) == null ? void 0 : _c2.length) - 1]));
3700
+ }), () => i2 == null ? void 0 : i2.disconnect())), onMount(async () => {
3701
+ set(d2, proxy(await Qe.getCurrentGameInfo())), await async function fetchCategories() {
3702
+ var _a2, _b2, _c2, _d, _e2, _f, _g;
3703
+ set(p2, proxy(await Qe.getCategories())), !get$1(l2) && ((_a2 = get$1(p2)) == null ? void 0 : _a2.length) > 0 && set(l2, proxy(((_b2 = get$1(d2)) == null ? void 0 : _b2.category) && ((_d = get$1(p2)) == null ? void 0 : _d.includes((_c2 = get$1(d2)) == null ? void 0 : _c2.category)) ? (_e2 = get$1(d2)) == null ? void 0 : _e2.category : (_g = get$1(p2)) == null ? void 0 : _g[((_f = get$1(p2)) == null ? void 0 : _f.length) - 1]));
3592
3704
  }();
3593
3705
  }), user_effect(() => {
3594
- get$1(a2) && (set(d2, proxy([])), set(_2, 1), set(v2, true), set(h2, false), set(l2, true), // Delay fetch to prevent rapid requests
3706
+ get$1(l2) && (set(f2, proxy([])), set(_2, 1), set(g2, true), set(h2, false), set(c2, true), // Delay fetch to prevent rapid requests
3595
3707
  setTimeout(async () => {
3596
- await fetchGames(), get$1(d2).length < 10 && await fetchGames();
3708
+ await fetchGames(), get$1(f2).length < 10 && await fetchGames();
3597
3709
  }, 100));
3598
3710
  }), user_effect(() => {
3599
- get$1(g2) && o2 && o2.observe(get$1(g2));
3711
+ get$1(v2) && i2 && i2.observe(get$1(v2));
3600
3712
  });
3601
- var m2 = ft();
3713
+ var m2 = gt();
3602
3714
  event("keydown", q, (e3) => {
3603
3715
  "Escape" == e3.key && store_set(Ve, false);
3604
3716
  });
3605
3717
  var b2 = child(m2), y2 = child(b2), $2 = child(y2), w2 = child(sibling(y2, 2)), consequent = (e3) => {
3606
- var t3 = at();
3607
- t3.__click = [on_click, p2];
3608
- var n3 = child(t3), i3 = child(n3);
3609
- template_effect(() => set_text(i3, get$1(p2) ? "Ignore exit intent" : "Trigger on exit intent")), append(e3, t3);
3718
+ var t3 = ut();
3719
+ t3.__click = [on_click, a2];
3720
+ var n3 = child(t3), o3 = child(n3);
3721
+ template_effect(() => set_text(o3, get$1(a2) ? "Ignore exit intent" : "Trigger on exit intent")), append(e3, t3);
3610
3722
  };
3611
3723
  if_block(w2, (e3) => {
3612
3724
  s2() && e3(consequent);
@@ -3623,8 +3735,8 @@ function DiscoveryOverlay(e2, t2) {
3623
3735
  d: "m6 6 12 12"
3624
3736
  }]],
3625
3737
  children: (e4, n4) => {
3626
- var i3 = comment();
3627
- slot(first_child(i3), t3, "default", {}, null), append(e4, i3);
3738
+ var o3 = comment();
3739
+ slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3628
3740
  },
3629
3741
  $$slots: {
3630
3742
  default: true
@@ -3637,17 +3749,23 @@ function DiscoveryOverlay(e2, t2) {
3637
3749
  var k2 = sibling(b2, 2);
3638
3750
  Navigation(child(k2), {
3639
3751
  get categories() {
3640
- return get$1(f2);
3752
+ return get$1(p2);
3641
3753
  },
3642
3754
  get selectedCategory() {
3643
- return get$1(a2);
3755
+ return get$1(l2);
3644
3756
  },
3645
3757
  set selectedCategory(e3) {
3646
- set(a2, proxy(e3));
3758
+ set(l2, proxy(e3));
3647
3759
  }
3648
3760
  });
3649
- var C2 = sibling(k2, 2), S2 = child(C2), consequent_1 = (e3) => {
3650
- var t3 = lt();
3761
+ var C2 = sibling(k2, 2);
3762
+ CurrentGameDisplay(C2, {
3763
+ get currentGame() {
3764
+ return get$1(d2);
3765
+ }
3766
+ });
3767
+ var S2 = sibling(C2, 2), M2 = child(S2), consequent_1 = (e3) => {
3768
+ var t3 = dt();
3651
3769
  Loader_circle(child(t3), {
3652
3770
  class: "animate-spin opacity-75",
3653
3771
  size: 50,
@@ -3655,45 +3773,45 @@ function DiscoveryOverlay(e2, t2) {
3655
3773
  }), append(e3, t3);
3656
3774
  }, alternate = (e3, t3) => {
3657
3775
  var consequent_2 = (e4) => {
3658
- append(e4, ct());
3776
+ append(e4, ft());
3659
3777
  }, alternate_1 = (e4) => {
3660
- var t4 = dt(), n3 = child(t4);
3661
- each(n3, 17, () => get$1(d2), index, (e5, t5, n4) => {
3662
- var i4 = ut();
3663
- const o4 = /* @__PURE__ */ derived(() => get$1(d2).findIndex((e6) => e6.category !== get$1(a2)));
3664
- var s3 = first_child(i4), consequent_3 = (e6) => {
3778
+ var t4 = _t(), n3 = child(t4);
3779
+ each(n3, 17, () => get$1(f2), index, (e5, t5, n4) => {
3780
+ var o4 = pt();
3781
+ const i4 = /* @__PURE__ */ derived(() => get$1(f2).findIndex((e6) => e6.category !== get$1(l2)));
3782
+ var s3 = first_child(o4), consequent_3 = (e6) => {
3665
3783
  !function GameCategorySeperator(e7) {
3666
3784
  append(e7, st());
3667
3785
  }(e6);
3668
3786
  };
3669
3787
  if_block(s3, (e6) => {
3670
- n4 == get$1(o4) && e6(consequent_3);
3788
+ n4 == get$1(i4) && e6(consequent_3);
3671
3789
  }), GameCard(sibling(s3, 2), {
3672
3790
  get game() {
3673
3791
  return get$1(t5);
3674
3792
  },
3675
3793
  onClick: () => Qe.trackClick(get$1(t5).id)
3676
- }), append(e5, i4);
3794
+ }), append(e5, o4);
3677
3795
  });
3678
- var i3 = sibling(n3, 2), o3 = child(i3), consequent_4 = (e5) => {
3796
+ var o3 = sibling(n3, 2), i3 = child(o3), consequent_4 = (e5) => {
3679
3797
  Loader_circle(e5, {
3680
3798
  class: "animate-spin opacity-75",
3681
3799
  size: 30,
3682
3800
  strokeWidth: 2.5
3683
3801
  });
3684
3802
  };
3685
- if_block(o3, (e5) => {
3686
- get$1(c2) && e5(consequent_4);
3687
- }), bind_this(i3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
3803
+ if_block(i3, (e5) => {
3804
+ get$1(u2) && e5(consequent_4);
3805
+ }), bind_this(o3, (e5) => set(v2, e5), () => get$1(v2)), append(e4, t4);
3688
3806
  };
3689
3807
  if_block(e3, (e4) => {
3690
- 0 !== get$1(d2).length || get$1(l2) ? e4(alternate_1, false) : e4(consequent_2);
3808
+ 0 !== get$1(f2).length || get$1(c2) ? e4(alternate_1, false) : e4(consequent_2);
3691
3809
  }, t3);
3692
3810
  };
3693
- if_block(S2, (e3) => {
3694
- get$1(l2) && 0 === get$1(d2).length ? e3(consequent_1) : e3(alternate, false);
3811
+ if_block(M2, (e3) => {
3812
+ get$1(c2) && 0 === get$1(f2).length ? e3(consequent_1) : e3(alternate, false);
3695
3813
  });
3696
- var M2 = child(sibling(C2, 2));
3814
+ var I2 = child(sibling(S2, 2));
3697
3815
  !function External_link(e3, t3) {
3698
3816
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3699
3817
  Icon$1(e3, spread_props({
@@ -3707,35 +3825,35 @@ function DiscoveryOverlay(e2, t2) {
3707
3825
  d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
3708
3826
  }]],
3709
3827
  children: (e4, n4) => {
3710
- var i3 = comment();
3711
- slot(first_child(i3), t3, "default", {}, null), append(e4, i3);
3828
+ var o3 = comment();
3829
+ slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3712
3830
  },
3713
3831
  $$slots: {
3714
3832
  default: true
3715
3833
  }
3716
3834
  }));
3717
- }(sibling(child(M2)), {
3835
+ }(sibling(child(I2)), {
3718
3836
  size: 14
3719
3837
  }), template_effect(() => set_attribute($2, "src", store_get(Ke, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, m2, () => blur, () => ({
3720
3838
  duration: 250
3721
- })), append(e2, m2), pop(), i2();
3839
+ })), append(e2, m2), pop(), o2();
3722
3840
  }
3723
3841
  delegate(["click"]);
3724
- var pt = /* @__PURE__ */ template('<div class="fixed top-0 right-0 left-0 h-2"></div> <div class="fixed top-2 right-0 left-0 h-2"></div>', 1);
3842
+ var vt = /* @__PURE__ */ template('<div class="fixed top-0 right-0 left-0 h-2"></div> <div class="fixed top-2 right-0 left-0 h-2"></div>', 1);
3725
3843
  delegate(["mouseover"]);
3726
- var _t = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3844
+ var ht = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3727
3845
  function App(e2, t2) {
3728
3846
  var _a2, _b2, _c2, _d;
3729
3847
  push(t2, true);
3730
- const [n2, i2] = setup_stores(), $discoveryOpen = () => store_get(Ve, "$discoveryOpen", n2);
3731
- let o2 = proxy((_b2 = (_a2 = t2.config) == null ? void 0 : _a2.button) == null ? void 0 : _b2.position), s2 = proxy((_d = (_c2 = t2.config) == null ? void 0 : _c2.button) == null ? void 0 : _d.visible);
3848
+ const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ve, "$discoveryOpen", n2);
3849
+ let i2 = proxy((_b2 = (_a2 = t2.config) == null ? void 0 : _a2.button) == null ? void 0 : _b2.position), s2 = proxy((_d = (_c2 = t2.config) == null ? void 0 : _c2.button) == null ? void 0 : _d.visible);
3732
3850
  function openDiscovery() {
3733
3851
  store_set(Ve, true), Qe.trackOpen();
3734
3852
  }
3735
- var a2 = _t(), l2 = first_child(a2);
3853
+ var a2 = ht(), l2 = first_child(a2);
3736
3854
  FloatingButton(l2, {
3737
3855
  get position() {
3738
- return o2;
3856
+ return i2;
3739
3857
  },
3740
3858
  get visible() {
3741
3859
  return s2;
@@ -3763,15 +3881,15 @@ function App(e2, t2) {
3763
3881
  });
3764
3882
  !function ExitIntentDetector(e3, t3) {
3765
3883
  push(t3, true);
3766
- let n3 = prop(t3, "enabled", 3, true), i3 = null, o3 = 0;
3767
- var s3 = pt(), a3 = first_child(s3);
3884
+ let n3 = prop(t3, "enabled", 3, true), o3 = null, i3 = 0;
3885
+ var s3 = vt(), a3 = first_child(s3);
3768
3886
  a3.__mouseover = // Time threshold in milliseconds between bar triggers
3769
3887
  function handleTopBarTrigger() {
3770
3888
  var _a3;
3771
3889
  const e4 = Date.now();
3772
- "bottom" === i3 && e4 - o3 < 500 && n3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && ((_a3 = t3.onIntent) == null ? void 0 : _a3.call(t3)), i3 = "top", o3 = e4;
3890
+ "bottom" === o3 && e4 - i3 < 500 && n3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && ((_a3 = t3.onIntent) == null ? void 0 : _a3.call(t3)), o3 = "top", i3 = e4;
3773
3891
  }, sibling(a3, 2).__mouseover = function handleBottomBarTrigger() {
3774
- i3 = "bottom", o3 = Date.now();
3892
+ o3 = "bottom", i3 = Date.now();
3775
3893
  }, append(e3, s3), pop();
3776
3894
  }(u2, {
3777
3895
  get enabled() {
@@ -3780,9 +3898,9 @@ function App(e2, t2) {
3780
3898
  onIntent: () => {
3781
3899
  $discoveryOpen() || openDiscovery();
3782
3900
  }
3783
- }), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(), i2();
3901
+ }), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(), o2();
3784
3902
  }
3785
- const vt = {
3903
+ const mt = {
3786
3904
  button: {
3787
3905
  position: "bottom-right",
3788
3906
  visible: true
@@ -3791,28 +3909,28 @@ const vt = {
3791
3909
  enabled: true
3792
3910
  }
3793
3911
  };
3794
- let gt = {
3795
- ...vt
3912
+ let bt = {
3913
+ ...mt
3796
3914
  };
3797
3915
  function initializeConfig(e2 = {}) {
3798
- return gt = deepMerge(vt, e2), gt;
3916
+ return bt = deepMerge(mt, e2), bt;
3799
3917
  }
3800
3918
  function deepMerge(e2, t2) {
3801
3919
  const n2 = {
3802
3920
  ...e2
3803
3921
  };
3804
- return isObject(e2) && isObject(t2) && Object.keys(t2).forEach((i2) => {
3805
- isObject(t2[i2]) ? i2 in e2 ? n2[i2] = deepMerge(e2[i2], t2[i2]) : Object.assign(n2, {
3806
- [i2]: t2[i2]
3922
+ return isObject(e2) && isObject(t2) && Object.keys(t2).forEach((o2) => {
3923
+ isObject(t2[o2]) ? o2 in e2 ? n2[o2] = deepMerge(e2[o2], t2[o2]) : Object.assign(n2, {
3924
+ [o2]: t2[o2]
3807
3925
  }) : Object.assign(n2, {
3808
- [i2]: t2[i2]
3926
+ [o2]: t2[o2]
3809
3927
  });
3810
3928
  }), n2;
3811
3929
  }
3812
3930
  function isObject(e2) {
3813
3931
  return e2 && "object" == typeof e2 && !Array.isArray(e2);
3814
3932
  }
3815
- const ht = new (_c = class {
3933
+ const yt = new (_c = class {
3816
3934
  constructor() {
3817
3935
  __privateAdd(this, _PlaylightSDK_instances);
3818
3936
  this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = Qe;
@@ -3853,8 +3971,8 @@ t_fn = function() {
3853
3971
  console.error("Playlight error occured during mount:", e2);
3854
3972
  }
3855
3973
  }, _c)();
3856
- "undefined" != typeof window && (window.playlightSDK = ht);
3974
+ "undefined" != typeof window && (window.playlightSDK = yt);
3857
3975
  export {
3858
- ht as default
3976
+ yt as default
3859
3977
  };
3860
3978
  //# sourceMappingURL=playlight-sdk.es.js.map