playlight-sdk 0.3.0 → 0.3.1

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.
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
- var _e3, _t2, _n2, _r, _s, _i, _o, _Batch_instances, a_fn, c_fn, l_fn, u_fn, _n3, _d2, _f, _p, _h, _g, __, _v, _m, _b2, _y, _w, _$, _x, _k, _S, _C, _Boundary_instances, E_fn, I_fn, M_fn, T_fn, O_fn, P_fn, _L, _j, _A, _D, _u, _W, _B, _N, _ResizeObserverSingleton_instances, q_fn, _a, _z, _R, _b, _G, _F, _c, _H, _Y, _V, _d, _U, _PlayLightAPI_instances, K_fn, _e2;
12
+ var _e3, _t2, _n2, _r, _s, _i, _o, _Batch_instances, a_fn, c_fn, l_fn, u_fn, _n3, _d2, _f, _p, _h, _g, __, _v, _m, _b2, _y, _w, _$, _x, _k, _S, _C, _Boundary_instances, E_fn, I_fn, O_fn, T_fn, M_fn, P_fn, _L, _j, _A, _D, _u, _W, _B, _N, _ResizeObserverSingleton_instances, q_fn, _a, _z, _R, _b, _G, _F, _c, _H, _Y, _U, _d, _V, _PlayLightAPI_instances, K_fn, _e2;
13
13
  const e = {
14
14
  exitIntent: {
15
15
  enabled: true,
@@ -68,7 +68,7 @@ function to_array(e2, t2) {
68
68
  for (const s2 of e2) if (n2.push(s2), n2.length === t2) break;
69
69
  return n2;
70
70
  }
71
- const p = 16, h = 32, g = 64, _ = 128, v = 1024, m = 2048, b = 4096, y = 8192, w = 16384, $ = 32768, x = 65536, k = 1 << 17, S = 1 << 19, C = 256, M = 512, O = 32768, E = 1 << 21, I = 1 << 23, T = Symbol("$state"), P = Symbol("legacy props"), L = Symbol(""), j = new class StaleReactionError extends Error {
71
+ const p = 16, h = 32, g = 64, _ = 128, v = 1024, m = 2048, b = 4096, y = 8192, w = 16384, $ = 32768, x = 65536, k = 1 << 17, S = 1 << 19, C = 256, O = 512, M = 32768, E = 1 << 21, I = 1 << 23, T = Symbol("$state"), P = Symbol("legacy props"), L = Symbol(""), j = new class StaleReactionError extends Error {
72
72
  constructor() {
73
73
  super(...arguments);
74
74
  __publicField(this, "name", "StaleReactionError");
@@ -354,7 +354,7 @@ function apply_adjustments(e2) {
354
354
  }));
355
355
  }
356
356
  const F = /* @__PURE__ */ new Set();
357
- let H = null, Y = null, V = null, U = /* @__PURE__ */ new Set(), K = [], Z = null, J = false, Q = false;
357
+ let H = null, Y = null, U = null, V = /* @__PURE__ */ new Set(), K = [], Z = null, J = false, Q = false;
358
358
  const _Batch = class _Batch {
359
359
  constructor() {
360
360
  __privateAdd(this, _Batch_instances);
@@ -427,7 +427,7 @@ const _Batch = class _Batch {
427
427
  // If sources are written to, then work needs to happen in a separate batch, else prior sources would be mixed with
428
428
  // newly updated sources, which could lead to infinite loops when effects run over and over again.
429
429
  (Y = this, H = null, flush_queued_effects(t2.render_effects), flush_queued_effects(t2.effects), Y = null)
430
- ), V = null;
430
+ ), U = null;
431
431
  }
432
432
  /**
433
433
  * Associate a change to a given source with the current
@@ -436,13 +436,13 @@ const _Batch = class _Batch {
436
436
  * @param {any} value
437
437
  */
438
438
  capture(e2, t2) {
439
- __privateGet(this, _e3).has(e2) || __privateGet(this, _e3).set(e2, t2), this.current.set(e2, e2.v), V == null ? void 0 : V.set(e2, e2.v);
439
+ __privateGet(this, _e3).has(e2) || __privateGet(this, _e3).set(e2, t2), this.current.set(e2, e2.v), U == null ? void 0 : U.set(e2, e2.v);
440
440
  }
441
441
  activate() {
442
442
  H = this;
443
443
  }
444
444
  deactivate() {
445
- H = null, V = null;
445
+ H = null, U = null;
446
446
  }
447
447
  flush() {
448
448
  if (K.length > 0) {
@@ -450,7 +450,7 @@ const _Batch = class _Batch {
450
450
  return;
451
451
  } else __privateMethod(this, _Batch_instances, l_fn).call(this);
452
452
  this.deactivate();
453
- for (const e2 of U) if (U.delete(e2), e2(), null !== H)
453
+ for (const e2 of V) if (V.delete(e2), e2(), null !== H)
454
454
  break;
455
455
  }
456
456
  /**
@@ -554,7 +554,7 @@ u_fn = function() {
554
554
  var _a2, _b3;
555
555
  if (F.size > 1) {
556
556
  __privateGet(this, _e3).clear();
557
- var e2 = V, t2 = true, n2 = {
557
+ var e2 = U, t2 = true, n2 = {
558
558
  parent: null,
559
559
  effect: null,
560
560
  effects: [],
@@ -587,7 +587,7 @@ u_fn = function() {
587
587
  }
588
588
  }
589
589
  }
590
- H = null, V = e2;
590
+ H = null, U = e2;
591
591
  }
592
592
  this.committed = true, F.delete(this), (_b3 = __privateGet(this, _s)) == null ? void 0 : _b3.resolve();
593
593
  };
@@ -771,13 +771,13 @@ class Boundary {
771
771
  __privateSet(this, _d2, e2), __privateSet(this, _p, t2), __privateSet(this, _h, n2), this.parent = /** @type {Effect} */
772
772
  ae.b, __privateSet(this, _n3, !!__privateGet(this, _p).pending), __privateSet(this, _g, block(() => {
773
773
  ae.b = this;
774
- var e3 = __privateMethod(this, _Boundary_instances, M_fn).call(this);
774
+ var e3 = __privateMethod(this, _Boundary_instances, O_fn).call(this);
775
775
  try {
776
776
  __privateSet(this, __, branch(() => n2(e3)));
777
777
  } catch (e4) {
778
778
  this.error(e4);
779
779
  }
780
- return __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, O_fn).call(this) : __privateSet(this, _n3, false), () => {
780
+ return __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, M_fn).call(this) : __privateSet(this, _n3, false), () => {
781
781
  var _a2;
782
782
  (_a2 = __privateGet(this, _y)) == null ? void 0 : _a2.remove();
783
783
  };
@@ -800,7 +800,7 @@ class Boundary {
800
800
  * @param {1 | -1} d
801
801
  */
802
802
  update_pending_count(e2) {
803
- __privateMethod(this, _Boundary_instances, P_fn).call(this, e2), __privateSet(this, _w, __privateGet(this, _w) + e2), U.add(__privateGet(this, _S));
803
+ __privateMethod(this, _Boundary_instances, P_fn).call(this, e2), __privateSet(this, _w, __privateGet(this, _w) + e2), V.add(__privateGet(this, _S));
804
804
  }
805
805
  get_effect_pending() {
806
806
  return __privateGet(this, _C).call(this), get$1(
@@ -834,7 +834,7 @@ class Boundary {
834
834
  __privateSet(this, _m, null);
835
835
  }), // we intentionally do not try to find the nearest pending boundary. If this boundary has one, we'll render it on reset
836
836
  // but it would be really weird to show the parent's boundary on a child reset.
837
- __privateSet(this, _n3, this.has_pending_snippet()), __privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (__privateSet(this, _x, false), branch(() => __privateGet(this, _h).call(this, __privateGet(this, _d2)))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, O_fn).call(this) : __privateSet(this, _n3, false));
837
+ __privateSet(this, _n3, this.has_pending_snippet()), __privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (__privateSet(this, _x, false), branch(() => __privateGet(this, _h).call(this, __privateGet(this, _d2)))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, M_fn).call(this) : __privateSet(this, _n3, false));
838
838
  };
839
839
  var o2 = ie;
840
840
  try {
@@ -893,8 +893,8 @@ E_fn = function() {
893
893
  I_fn = function() {
894
894
  const e2 = __privateGet(this, _p).pending;
895
895
  e2 && (__privateSet(this, _v, branch(() => e2(__privateGet(this, _d2)))), Batch.enqueue(() => {
896
- var e3 = __privateMethod(this, _Boundary_instances, M_fn).call(this);
897
- __privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (Batch.ensure(), branch(() => __privateGet(this, _h).call(this, e3))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, O_fn).call(this) : (pause_effect(
896
+ var e3 = __privateMethod(this, _Boundary_instances, O_fn).call(this);
897
+ __privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (Batch.ensure(), branch(() => __privateGet(this, _h).call(this, e3))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, M_fn).call(this) : (pause_effect(
898
898
  /** @type {Effect} */
899
899
  __privateGet(this, _v),
900
900
  () => {
@@ -903,7 +903,7 @@ I_fn = function() {
903
903
  ), __privateSet(this, _n3, false));
904
904
  }));
905
905
  };
906
- M_fn = function() {
906
+ O_fn = function() {
907
907
  var e2 = __privateGet(this, _d2);
908
908
  return __privateGet(this, _n3) && (__privateSet(this, _y, create_text()), __privateGet(this, _d2).before(__privateGet(this, _y)), e2 = __privateGet(this, _y)), e2;
909
909
  };
@@ -921,7 +921,7 @@ T_fn = function(e2) {
921
921
  set_active_effect(t2), set_active_reaction(n2), set_component_context(s2);
922
922
  }
923
923
  };
924
- O_fn = function() {
924
+ M_fn = function() {
925
925
  const e2 = (
926
926
  /** @type {(anchor: Node) => void} */
927
927
  __privateGet(this, _p).pending
@@ -1125,7 +1125,7 @@ function update_derived(e2) {
1125
1125
  var t2 = execute_derived(e2);
1126
1126
  (e2.equals(t2) || // TODO can we avoid setting `derived.v` when `batch_values !== null`,
1127
1127
  // without causing the value to be stale later?
1128
- (e2.v = t2, e2.wv = increment_write_version()), se) || (null !== V ? V.set(e2, e2.v) : set_signal_status(e2, !ge && 0 === (e2.f & C) || null === e2.deps ? v : b));
1128
+ (e2.v = t2, e2.wv = increment_write_version()), se) || (null !== U ? U.set(e2, e2.v) : set_signal_status(e2, !ge && 0 === (e2.f & C) || null === e2.deps ? v : b));
1129
1129
  }
1130
1130
  const te = /* @__PURE__ */ new Map();
1131
1131
  function source(e2, t2) {
@@ -1192,7 +1192,7 @@ function mark_reactions(e2, t2) {
1192
1192
  var a2 = n2[o2], l2 = a2.f;
1193
1193
  if (s2 || a2 !== ae) {
1194
1194
  var c2 = 0 === (l2 & m);
1195
- c2 && set_signal_status(a2, t2), 2 & l2 ? 0 === (l2 & O) && (a2.f |= O, mark_reactions(
1195
+ c2 && set_signal_status(a2, t2), 2 & l2 ? 0 === (l2 & M) && (a2.f |= M, mark_reactions(
1196
1196
  /** @type {Derived} */
1197
1197
  a2,
1198
1198
  b
@@ -1286,7 +1286,7 @@ function is_dirty(e2) {
1286
1286
  if (0 !== (t2 & b)) {
1287
1287
  var n2 = e2.deps, s2 = 0 !== (t2 & C);
1288
1288
  if (2 & t2 && (e2.f &= -32769), null !== n2) {
1289
- var i2, o2, a2 = 0 !== (t2 & M), l2 = s2 && null !== ae && !ge, c2 = n2.length;
1289
+ var i2, o2, a2 = 0 !== (t2 & O), l2 = s2 && null !== ae && !ge, c2 = n2.length;
1290
1290
  if ((a2 || l2) && (null === ae || 0 === (ae.f & w))) {
1291
1291
  var u2 = (
1292
1292
  /** @type {Derived} */
@@ -1296,7 +1296,7 @@ function is_dirty(e2) {
1296
1296
  // previously disconnected, however we don't if it was unowned as we
1297
1297
  // de-duplicate dependencies in that case
1298
1298
  !a2 && ((_a2 = o2 == null ? void 0 : o2.reactions) == null ? void 0 : _a2.includes(u2)) || (o2.reactions ?? (o2.reactions = [])).push(u2);
1299
- a2 && (u2.f ^= M), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
1299
+ a2 && (u2.f ^= O), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
1300
1300
  // and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned
1301
1301
  // flag
1302
1302
  l2 && null !== d2 && 0 === (d2.f & C) && (u2.f ^= C);
@@ -1375,7 +1375,7 @@ function remove_reaction(e2, t2) {
1375
1375
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1376
1376
  (null === ce || !ce.includes(t2)) && (set_signal_status(t2, b), // If we are working with a derived that is owned by an effect, then mark it as being
1377
1377
  // disconnected.
1378
- 768 & t2.f || (t2.f ^= M), // Disconnect any reactions owned by this reaction
1378
+ 768 & t2.f || (t2.f ^= O), // Disconnect any reactions owned by this reaction
1379
1379
  destroy_derived_effects(
1380
1380
  /** @type {Derived} **/
1381
1381
  t2
@@ -1473,10 +1473,10 @@ function get$1(e2) {
1473
1473
  }
1474
1474
  } else if (t2) {
1475
1475
  if (n2 = /** @type {Derived} */
1476
- e2, V == null ? void 0 : V.has(n2)) return V.get(n2);
1476
+ e2, U == null ? void 0 : U.has(n2)) return U.get(n2);
1477
1477
  is_dirty(n2) && update_derived(n2);
1478
1478
  }
1479
- if (V == null ? void 0 : V.has(e2)) return V.get(e2);
1479
+ if (U == null ? void 0 : U.has(e2)) return U.get(e2);
1480
1480
  if (0 !== (e2.f & I)) throw e2.v;
1481
1481
  return e2.v;
1482
1482
  }
@@ -2175,12 +2175,12 @@ function each(e2, t2, s2, o2, a2, l2 = null) {
2175
2175
  if (m2 && update_item(g3, p3, _3, l3), 0 !== (g3.e.f & y) && (resume_effect(g3.e), v2 && ((_b3 = g3.a) == null ? void 0 : _b3.unfix(), (f3 ?? (f3 = /* @__PURE__ */ new Set())).delete(g3))), g3 !== x2) {
2176
2176
  if (void 0 !== d3 && d3.has(g3)) {
2177
2177
  if (S2.length < C2.length) {
2178
- var M2, O2 = C2[0];
2179
- k2 = O2.prev;
2178
+ var O2, M2 = C2[0];
2179
+ k2 = M2.prev;
2180
2180
  var E2 = S2[0], I2 = S2[S2.length - 1];
2181
- for (M2 = 0; M2 < S2.length; M2 += 1) move(S2[M2], O2, o3);
2182
- for (M2 = 0; M2 < C2.length; M2 += 1) d3.delete(C2[M2]);
2183
- link(n2, E2.prev, I2.next), link(n2, k2, E2), link(n2, I2, O2), x2 = O2, k2 = I2, _3 -= 1, S2 = [], C2 = [];
2181
+ for (O2 = 0; O2 < S2.length; O2 += 1) move(S2[O2], M2, o3);
2182
+ for (O2 = 0; O2 < C2.length; O2 += 1) d3.delete(C2[O2]);
2183
+ link(n2, E2.prev, I2.next), link(n2, k2, E2), link(n2, I2, M2), x2 = M2, k2 = I2, _3 -= 1, S2 = [], C2 = [];
2184
2184
  } else
2185
2185
  d3.delete(g3), move(g3, x2, o3), link(n2, g3.prev, g3.next), link(n2, g3, null === k2 ? n2.first : k2.next), link(n2, k2, g3), k2 = g3;
2186
2186
  continue;
@@ -2362,7 +2362,7 @@ function clsx(e2) {
2362
2362
  return s2;
2363
2363
  })(e2) : e2 ?? "";
2364
2364
  }
2365
- const Me = [..." \n\r\f \v\uFEFF"];
2365
+ const Oe = [..." \n\r\f \v\uFEFF"];
2366
2366
  function append_styles(e2, t2 = false) {
2367
2367
  var n2 = t2 ? " !important;" : ";", s2 = "";
2368
2368
  for (var i2 in e2) {
@@ -2383,7 +2383,7 @@ function set_class(e2, t2, n2, s2, i2, o2) {
2383
2383
  for (var i3 in n3) if (n3[i3]) s3 = s3 ? s3 + " " + i3 : i3;
2384
2384
  else if (s3.length) for (var o3 = i3.length, a3 = 0; (a3 = s3.indexOf(i3, a3)) >= 0; ) {
2385
2385
  var l3 = a3 + o3;
2386
- 0 !== a3 && !Me.includes(s3[a3 - 1]) || l3 !== s3.length && !Me.includes(s3[l3]) ? a3 = l3 : s3 = (0 === a3 ? "" : s3.substring(0, a3)) + s3.substring(l3 + 1);
2386
+ 0 !== a3 && !Oe.includes(s3[a3 - 1]) || l3 !== s3.length && !Oe.includes(s3[l3]) ? a3 = l3 : s3 = (0 === a3 ? "" : s3.substring(0, a3)) + s3.substring(l3 + 1);
2387
2387
  }
2388
2388
  }
2389
2389
  return "" === s3 ? null : s3;
@@ -2453,7 +2453,7 @@ function select_option(e2, t2, s2 = false) {
2453
2453
  function get_option_value(e2) {
2454
2454
  return "__value" in e2 ? e2.__value : e2.value;
2455
2455
  }
2456
- const Oe = Symbol("class"), Ee = Symbol("style"), Ie = Symbol("is custom element"), Te = Symbol("is html");
2456
+ const Me = Symbol("class"), Ee = Symbol("style"), Ie = Symbol("is custom element"), Te = Symbol("is html");
2457
2457
  function set_selected(e2, t2) {
2458
2458
  t2 ? (
2459
2459
  // The selected option could've changed via user selection, and
@@ -2476,7 +2476,7 @@ function attribute_effect(e2, t2, n2 = [], s2 = [], i2, o2 = false, a2 = false)
2476
2476
  var d3 = t2(...n3.map(get$1)), f2 = (function set_attributes(e3, t3, n4, s4, i3 = false, o3 = false) {
2477
2477
  var a3 = get_attributes(e3), l3 = a3[Ie], c3 = !a3[Te], u3 = t3 || {}, d4 = "OPTION" === e3.tagName;
2478
2478
  for (var f3 in t3) f3 in n4 || (n4[f3] = null);
2479
- n4.class ? n4.class = clsx(n4.class) : (s4 || n4[Oe]) && (n4.class = null), n4[Ee] && (n4.style ?? (n4.style = null));
2479
+ n4.class ? n4.class = clsx(n4.class) : (s4 || n4[Me]) && (n4.class = null), n4[Ee] && (n4.style ?? (n4.style = null));
2480
2480
  var p3 = get_setters(e3);
2481
2481
  for (const b2 in n4) {
2482
2482
  let y2 = n4[b2];
@@ -2537,8 +2537,8 @@ function attribute_effect(e2, t2, n2 = [], s2 = [], i2, o2 = false, a2 = false)
2537
2537
  k2.removeAttribute(v2), k2.defaultValue = C2, // @ts-ignore
2538
2538
  k2.value = k2.__value = S2 ? C2 : null;
2539
2539
  } else {
2540
- let M2 = k2.defaultChecked;
2541
- k2.removeAttribute(v2), k2.defaultChecked = M2, k2.checked = !!S2 && M2;
2540
+ let O2 = k2.defaultChecked;
2541
+ k2.removeAttribute(v2), k2.defaultChecked = O2, k2.checked = !!S2 && O2;
2542
2542
  }
2543
2543
  } else e3.removeAttribute(b2);
2544
2544
  }
@@ -2546,7 +2546,7 @@ function attribute_effect(e2, t2, n2 = [], s2 = [], i2, o2 = false, a2 = false)
2546
2546
  e3.value = e3.__value = y2;
2547
2547
  }
2548
2548
  } else set_style(e3, y2, t3 == null ? void 0 : t3[Ee], n4[Ee]), u3[b2] = y2, u3[Ee] = n4[Ee];
2549
- else set_class(e3, "http://www.w3.org/1999/xhtml" === e3.namespaceURI, y2, s4, t3 == null ? void 0 : t3[Oe], n4[Oe]), u3[b2] = y2, u3[Oe] = n4[Oe];
2549
+ else set_class(e3, "http://www.w3.org/1999/xhtml" === e3.namespaceURI, y2, s4, t3 == null ? void 0 : t3[Me], n4[Me]), u3[b2] = y2, u3[Me] = n4[Me];
2550
2550
  }
2551
2551
  return u3;
2552
2552
  })(e2, s3, d3, i2, o2, a2);
@@ -3319,12 +3319,12 @@ const Ye = new (_c = class {
3319
3319
  })(__privateGet(this, _F), e2);
3320
3320
  }
3321
3321
  }, _G = new WeakMap(), _F = new WeakMap(), _c)("<Toaster/>");
3322
- let Ve = 0;
3323
- const Ue = new (_d = class {
3322
+ let Ue = 0;
3323
+ const Ve = new (_d = class {
3324
3324
  constructor() {
3325
3325
  __privateAdd(this, _H, /* @__PURE__ */ state(proxy([])));
3326
3326
  __privateAdd(this, _Y, /* @__PURE__ */ state(proxy([])));
3327
- __privateAdd(this, _V, (e2) => {
3327
+ __privateAdd(this, _U, (e2) => {
3328
3328
  const t2 = this.toasts.findIndex((t3) => t3.id === e2);
3329
3329
  return -1 === t2 ? null : t2;
3330
3330
  });
@@ -3344,7 +3344,7 @@ const Ue = new (_d = class {
3344
3344
  });
3345
3345
  __publicField(this, "create", (e2) => {
3346
3346
  var _a2;
3347
- const { message: t2, ...n2 } = e2, s2 = "number" == typeof (e2 == null ? void 0 : e2.id) || e2.id && ((_a2 = e2.id) == null ? void 0 : _a2.length) > 0 ? e2.id : Ve++, i2 = void 0 === e2.dismissable || e2.dismissable, o2 = void 0 === e2.type ? "default" : e2.type;
3347
+ const { message: t2, ...n2 } = e2, s2 = "number" == typeof (e2 == null ? void 0 : e2.id) || e2.id && ((_a2 = e2.id) == null ? void 0 : _a2.length) > 0 ? e2.id : Ue++, i2 = void 0 === e2.dismissable || e2.dismissable, o2 = void 0 === e2.type ? "default" : e2.type;
3348
3348
  return untrack(() => {
3349
3349
  const a2 = this.toasts.find((e3) => e3.id === s2);
3350
3350
  a2 ? this.updateToast({
@@ -3377,7 +3377,7 @@ const Ue = new (_d = class {
3377
3377
  __publicField(this, "remove", (e2) => {
3378
3378
  if (void 0 === e2)
3379
3379
  return void (this.toasts = []);
3380
- const t2 = __privateGet(this, _V).call(this, e2);
3380
+ const t2 = __privateGet(this, _U).call(this, e2);
3381
3381
  return null !== t2 ? (this.toasts.splice(t2, 1), e2) : void 0;
3382
3382
  });
3383
3383
  __publicField(this, "message", (e2, t2) => this.create({
@@ -3460,7 +3460,7 @@ const Ue = new (_d = class {
3460
3460
  }), n2;
3461
3461
  });
3462
3462
  __publicField(this, "custom", (e2, t2) => {
3463
- const n2 = (t2 == null ? void 0 : t2.id) || Ve++;
3463
+ const n2 = (t2 == null ? void 0 : t2.id) || Ue++;
3464
3464
  return this.create({
3465
3465
  component: e2,
3466
3466
  id: n2,
@@ -3471,7 +3471,7 @@ const Ue = new (_d = class {
3471
3471
  this.heights = this.heights.filter((t2) => t2.toastId !== e2);
3472
3472
  });
3473
3473
  __publicField(this, "setHeight", (e2) => {
3474
- const t2 = __privateGet(this, _V).call(this, e2.toastId);
3474
+ const t2 = __privateGet(this, _U).call(this, e2.toastId);
3475
3475
  null !== t2 ? this.heights[t2] = e2 : this.heights.push(e2);
3476
3476
  });
3477
3477
  __publicField(this, "reset", () => {
@@ -3490,35 +3490,35 @@ const Ue = new (_d = class {
3490
3490
  set heights(e2) {
3491
3491
  set(__privateGet(this, _Y), e2, true);
3492
3492
  }
3493
- }, _H = new WeakMap(), _Y = new WeakMap(), _V = new WeakMap(), _d)();
3493
+ }, _H = new WeakMap(), _Y = new WeakMap(), _U = new WeakMap(), _d)();
3494
3494
  class SonnerState {
3495
3495
  constructor() {
3496
3496
  /**
3497
3497
  * A derived state of the toasts that are not dismissed.
3498
3498
  */
3499
- __privateAdd(this, _U, user_derived(() => Ue.toasts.filter((e2) => !e2.dismiss)));
3499
+ __privateAdd(this, _V, user_derived(() => Ve.toasts.filter((e2) => !e2.dismiss)));
3500
3500
  }
3501
3501
  get toasts() {
3502
- return get$1(__privateGet(this, _U));
3502
+ return get$1(__privateGet(this, _V));
3503
3503
  }
3504
3504
  }
3505
- _U = new WeakMap();
3505
+ _V = new WeakMap();
3506
3506
  const Ke = function toastFunction(e2, t2) {
3507
- return Ue.create({
3507
+ return Ve.create({
3508
3508
  message: e2,
3509
3509
  ...t2
3510
3510
  });
3511
3511
  }, Xe = Object.assign(Ke, {
3512
- success: Ue.success,
3513
- info: Ue.info,
3514
- warning: Ue.warning,
3515
- error: Ue.error,
3516
- custom: Ue.custom,
3517
- message: Ue.message,
3518
- promise: Ue.promise,
3519
- dismiss: Ue.dismiss,
3520
- loading: Ue.loading,
3521
- getActiveToasts: () => Ue.toasts.filter((e2) => !e2.dismiss)
3512
+ success: Ve.success,
3513
+ info: Ve.info,
3514
+ warning: Ve.warning,
3515
+ error: Ve.error,
3516
+ custom: Ve.custom,
3517
+ message: Ve.message,
3518
+ promise: Ve.promise,
3519
+ dismiss: Ve.dismiss,
3520
+ loading: Ve.loading,
3521
+ getActiveToasts: () => Ve.toasts.filter((e2) => !e2.dismiss)
3522
3522
  });
3523
3523
  function isAction(e2) {
3524
3524
  return void 0 !== e2.label;
@@ -3619,9 +3619,9 @@ function Toast(e2, t2) {
3619
3619
  ...Ze
3620
3620
  };
3621
3621
  let c2 = /* @__PURE__ */ state(false), u2 = /* @__PURE__ */ state(false), d2 = /* @__PURE__ */ state(false), f2 = /* @__PURE__ */ state(false), p2 = /* @__PURE__ */ state(false), h2 = /* @__PURE__ */ state(0), g2 = /* @__PURE__ */ state(0), _2 = t2.toast.duration || t2.duration || 4e3, v2 = /* @__PURE__ */ state(void 0), m2 = /* @__PURE__ */ state(null), b2 = /* @__PURE__ */ state(null);
3622
- const y2 = user_derived(() => 0 === t2.index), w2 = user_derived(() => t2.index + 1 <= t2.visibleToasts), $2 = user_derived(() => t2.toast.type), x2 = user_derived(() => false !== t2.toast.dismissable), k2 = user_derived(() => t2.toast.class || ""), S2 = user_derived(() => t2.toast.descriptionClass || ""), C2 = user_derived(() => Ue.heights.findIndex((e3) => e3.toastId === t2.toast.id) || 0), M2 = user_derived(() => t2.toast.closeButton ?? t2.closeButton), O2 = user_derived(() => t2.toast.duration ?? t2.duration ?? 4e3);
3622
+ const y2 = user_derived(() => 0 === t2.index), w2 = user_derived(() => t2.index + 1 <= t2.visibleToasts), $2 = user_derived(() => t2.toast.type), x2 = user_derived(() => false !== t2.toast.dismissable), k2 = user_derived(() => t2.toast.class || ""), S2 = user_derived(() => t2.toast.descriptionClass || ""), C2 = user_derived(() => Ve.heights.findIndex((e3) => e3.toastId === t2.toast.id) || 0), O2 = user_derived(() => t2.toast.closeButton ?? t2.closeButton), M2 = user_derived(() => t2.toast.duration ?? t2.duration ?? 4e3);
3623
3623
  let E2 = null;
3624
- const I2 = user_derived(() => t2.position.split("-")), T2 = user_derived(() => Ue.heights.reduce((e3, t3, n3) => n3 >= get$1(C2) ? e3 : e3 + t3.height, 0)), P2 = (function useDocumentHidden() {
3624
+ const I2 = user_derived(() => t2.position.split("-")), T2 = user_derived(() => Ve.heights.reduce((e3, t3, n3) => n3 >= get$1(C2) ? e3 : e3 + t3.height, 0)), P2 = (function useDocumentHidden() {
3625
3625
  let e3 = /* @__PURE__ */ state(proxy("undefined" != typeof document && document.hidden));
3626
3626
  return user_effect(() => on(document, "visibilitychange", () => {
3627
3627
  set(e3, document.hidden, true);
@@ -3638,8 +3638,8 @@ function Toast(e2, t2) {
3638
3638
  const q2 = user_derived(() => Math.round(14 * get$1(C2) + get$1(T2)));
3639
3639
  function deleteToast() {
3640
3640
  set(u2, true), // save the offset for the exit swipe animation
3641
- set(h2, get$1(q2), true), Ue.removeHeight(t2.toast.id), setTimeout(() => {
3642
- Ue.remove(t2.toast.id);
3641
+ set(h2, get$1(q2), true), Ve.removeHeight(t2.toast.id), setTimeout(() => {
3642
+ Ve.remove(t2.toast.id);
3643
3643
  }, 200);
3644
3644
  }
3645
3645
  let z2;
@@ -3656,7 +3656,7 @@ function Toast(e2, t2) {
3656
3656
  // to avoid triggering this effect when those are modified. e.g. toasts
3657
3657
  // added and removed.
3658
3658
  untrack(() => {
3659
- Ue.setHeight({
3659
+ Ve.setHeight({
3660
3660
  toastId: t2.toast.id,
3661
3661
  height: a3
3662
3662
  });
@@ -3674,7 +3674,7 @@ function Toast(e2, t2) {
3674
3674
  t2.toast.updated && // if the toast has been updated after the initial render,
3675
3675
  // we want to reset the timer and set the remaining time to the
3676
3676
  // new duration
3677
- (clearTimeout(z2), _2 = get$1(O2), startTimer());
3677
+ (clearTimeout(z2), _2 = get$1(M2), startTimer());
3678
3678
  }), user_effect(() => (get$1(R2) || (t2.expanded || t2.interacting || P2.current ? (function pauseTimer() {
3679
3679
  if (get$1(N2) < get$1(B2)) {
3680
3680
  const e3 = (/* @__PURE__ */ new Date()).getTime() - get$1(B2);
@@ -3685,11 +3685,11 @@ function Toast(e2, t2) {
3685
3685
  var _a2;
3686
3686
  set(c2, true);
3687
3687
  const e3 = (_a2 = get$1(v2)) == null ? void 0 : _a2.getBoundingClientRect().height;
3688
- return set(g2, e3, true), Ue.setHeight({
3688
+ return set(g2, e3, true), Ve.setHeight({
3689
3689
  toastId: t2.toast.id,
3690
3690
  height: e3
3691
3691
  }), () => {
3692
- Ue.removeHeight(t2.toast.id);
3692
+ Ve.removeHeight(t2.toast.id);
3693
3693
  };
3694
3694
  }), user_effect(() => {
3695
3695
  t2.toast.delete && untrack(() => {
@@ -3751,9 +3751,9 @@ function Toast(e2, t2) {
3751
3751
  }]), append(e3, n3);
3752
3752
  };
3753
3753
  if_block(Y2, (e3) => {
3754
- get$1(M2) && !t2.toast.component && "loading" !== get$1($2) && null !== t2.closeIcon && e3(consequent_1);
3754
+ get$1(O2) && !t2.toast.component && "loading" !== get$1($2) && null !== t2.closeIcon && e3(consequent_1);
3755
3755
  });
3756
- var V2 = sibling(Y2, 2), consequent_2 = (e3) => {
3756
+ var U2 = sibling(Y2, 2), consequent_2 = (e3) => {
3757
3757
  const n3 = user_derived(() => t2.toast.component);
3758
3758
  var s3 = comment();
3759
3759
  component(first_child(s3), () => get$1(n3), (e4, n4) => {
@@ -3933,7 +3933,7 @@ function Toast(e2, t2) {
3933
3933
  return clsx(cn((_a2 = get$1(A2)) == null ? void 0 : _a2.title, (_c2 = (_b3 = t2.toast) == null ? void 0 : _b3.classes) == null ? void 0 : _c2.title));
3934
3934
  }]), append(e3, o3);
3935
3935
  };
3936
- if_block(V2, (e3) => {
3936
+ if_block(U2, (e3) => {
3937
3937
  t2.toast.component ? e3(consequent_2) : e3(alternate_10, false);
3938
3938
  }), bind_this(F2, (e3) => set(v2, e3), () => get$1(v2)), template_effect((e3, n3, s3, i3) => {
3939
3939
  set_class(F2, 1, e3), set_attribute(F2, "data-rich-colors", t2.toast.richColors ?? a2()), set_attribute(F2, "data-styled", !(t2.toast.component || t2.toast.unstyled || o2())), set_attribute(F2, "data-mounted", get$1(c2)), set_attribute(F2, "data-promise", n3), set_attribute(F2, "data-swiped", get$1(p2)), set_attribute(F2, "data-removed", get$1(u2)), set_attribute(F2, "data-visible", get$1(w2)), set_attribute(F2, "data-y-position", get$1(I2)[0]), set_attribute(F2, "data-x-position", get$1(I2)[1]), set_attribute(F2, "data-index", t2.index), set_attribute(F2, "data-front", get$1(y2)), set_attribute(F2, "data-swiping", get$1(d2)), set_attribute(F2, "data-dismissable", get$1(x2)), set_attribute(F2, "data-type", get$1($2)), set_attribute(F2, "data-invert", get$1(L2)), set_attribute(F2, "data-swipe-out", get$1(f2)), set_attribute(F2, "data-swipe-direction", get$1(b2)), set_attribute(F2, "data-expanded", s3), H2 = set_style(F2, `${t2.style} ${t2.toast.style}`, H2, i3);
@@ -3943,7 +3943,7 @@ function Toast(e2, t2) {
3943
3943
  }, () => Boolean(t2.toast.promise), () => Boolean(t2.expanded || t2.expandByDefault && get$1(c2)), () => ({
3944
3944
  "--index": t2.index,
3945
3945
  "--toasts-before": t2.index,
3946
- "--z-index": Ue.toasts.length - t2.index,
3946
+ "--z-index": Ve.toasts.length - t2.index,
3947
3947
  "--offset": `${get$1(u2) ? get$1(h2) : get$1(q2)}px`,
3948
3948
  "--initial-height": t2.expandByDefault ? "auto" : `${get$1(g2)}px`
3949
3949
  })]), event("dragend", F2, () => {
@@ -3975,7 +3975,7 @@ function Toaster(e2, t2) {
3975
3975
  const e3 = document.documentElement.getAttribute("dir");
3976
3976
  return "auto" !== e3 && e3 ? (untrack(() => g2(e3)), e3) : (untrack(() => g2(window.getComputedStyle(document.documentElement).direction ?? "ltr")), g2());
3977
3977
  }
3978
- const y2 = user_derived(() => Array.from(new Set([s2(), ...Ue.toasts.filter((e3) => e3.position).map((e3) => e3.position)].filter(Boolean))));
3978
+ const y2 = user_derived(() => Array.from(new Set([s2(), ...Ve.toasts.filter((e3) => e3.position).map((e3) => e3.position)].filter(Boolean))));
3979
3979
  let w2 = /* @__PURE__ */ state(false), $2 = /* @__PURE__ */ state(false), x2 = /* @__PURE__ */ state(proxy(
3980
3980
  // visible toasts amount
3981
3981
  // Viewport padding
@@ -3987,25 +3987,25 @@ function Toaster(e2, t2) {
3987
3987
  return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? pt : ht;
3988
3988
  })(u2())
3989
3989
  )), k2 = /* @__PURE__ */ state(void 0), S2 = /* @__PURE__ */ state(null), C2 = /* @__PURE__ */ state(false);
3990
- const M2 = user_derived(() => i2().join("+").replace(/Key/g, "").replace(/Digit/g, ""));
3990
+ const O2 = user_derived(() => i2().join("+").replace(/Key/g, "").replace(/Digit/g, ""));
3991
3991
  user_effect(() => {
3992
- Ue.toasts.length <= 1 && set(w2, false);
3992
+ Ve.toasts.length <= 1 && set(w2, false);
3993
3993
  }), // Check for dismissed toasts and remove them. We need to do this to have dismiss animation.
3994
3994
  user_effect(() => {
3995
- const e3 = Ue.toasts.filter((e4) => e4.dismiss && !e4.delete);
3995
+ const e3 = Ve.toasts.filter((e4) => e4.dismiss && !e4.delete);
3996
3996
  if (e3.length > 0) {
3997
- const t3 = Ue.toasts.map((t4) => e3.find((e4) => e4.id === t4.id) ? {
3997
+ const t3 = Ve.toasts.map((t4) => e3.find((e4) => e4.id === t4.id) ? {
3998
3998
  ...t4,
3999
3999
  delete: true
4000
4000
  } : t4);
4001
- Ue.toasts = t3;
4001
+ Ve.toasts = t3;
4002
4002
  }
4003
4003
  }), user_effect(() => () => {
4004
4004
  get$1(k2) && get$1(S2) && (get$1(S2).focus({
4005
4005
  preventScroll: true
4006
4006
  }), set(S2, null), set(C2, false));
4007
4007
  }), onMount(() => {
4008
- Ue.reset();
4008
+ Ve.reset();
4009
4009
  return on(document, "keydown", (e3) => {
4010
4010
  var _a2, _b3;
4011
4011
  i2().every((t3) => e3[t3] || e3.code === t3) && (set(w2, true), (_a2 = get$1(k2)) == null ? void 0 : _a2.focus()), "Escape" !== e3.code || document.activeElement !== get$1(k2) && !((_b3 = get$1(k2)) == null ? void 0 : _b3.contains(document.activeElement)) || set(w2, false);
@@ -4052,9 +4052,9 @@ function Toaster(e2, t2) {
4052
4052
  (_a2 = t2.onpointerup) == null ? void 0 : _a2.call(t2, e3), set($2, false);
4053
4053
  };
4054
4054
  Ye.set(new SonnerState());
4055
- var O2 = _t();
4056
- set_attribute(O2, "tabindex", -1);
4057
- var E2 = child(O2), consequent_10 = (e3) => {
4055
+ var M2 = _t();
4056
+ set_attribute(M2, "tabindex", -1);
4057
+ var E2 = child(M2), consequent_10 = (e3) => {
4058
4058
  var s3 = comment();
4059
4059
  each(first_child(s3), 18, () => get$1(y2), (e4) => e4, (e4, s4, i3, u3) => {
4060
4060
  const g3 = user_derived(() => {
@@ -4101,7 +4101,7 @@ function Toaster(e2, t2) {
4101
4101
  }), [getDocumentDirection, () => {
4102
4102
  var _a2;
4103
4103
  return {
4104
- "--front-toast-height": `${(_a2 = Ue.heights[0]) == null ? void 0 : _a2.height}px`,
4104
+ "--front-toast-height": `${(_a2 = Ve.heights[0]) == null ? void 0 : _a2.height}px`,
4105
4105
  "--width": "356px",
4106
4106
  "--gap": `${_2()}px`,
4107
4107
  "--offset-top": get$1(v3)["--offset-top"],
@@ -4113,7 +4113,7 @@ function Toaster(e2, t2) {
4113
4113
  "--mobile-offset-bottom": get$1(v3)["--mobile-offset-bottom"],
4114
4114
  "--mobile-offset-left": get$1(v3)["--mobile-offset-left"]
4115
4115
  };
4116
- }], void 0, "svelte-nbs0zk"), each(y3, 23, () => Ue.toasts.filter((e5) => !e5.position && 0 === get$1(i3) || e5.position === s4), (e5) => e5.id, (e5, i4, l3, c3) => {
4116
+ }], void 0, "svelte-nbs0zk"), each(y3, 23, () => Ve.toasts.filter((e5) => !e5.position && 0 === get$1(i3) || e5.position === s4), (e5) => e5.id, (e5, i4, l3, c3) => {
4117
4117
  {
4118
4118
  const successIcon = (e6) => {
4119
4119
  var n3 = comment(), s5 = first_child(n3), consequent = (e7) => {
@@ -4302,8 +4302,8 @@ function Toaster(e2, t2) {
4302
4302
  }), append(e3, s3);
4303
4303
  };
4304
4304
  if_block(E2, (e3) => {
4305
- Ue.toasts.length > 0 && e3(consequent_10);
4306
- }), template_effect(() => set_attribute(O2, "aria-label", `${v2() ?? ""} ${get$1(M2) ?? ""}`)), append(e2, O2), pop();
4305
+ Ve.toasts.length > 0 && e3(consequent_10);
4306
+ }), template_effect(() => set_attribute(M2, "aria-label", `${v2() ?? ""} ${get$1(O2) ?? ""}`)), append(e2, M2), pop();
4307
4307
  }
4308
4308
  const vt = new (_e2 = class {
4309
4309
  constructor() {
@@ -4640,7 +4640,7 @@ function GameCard(e2, t2) {
4640
4640
  } catch (e4) {
4641
4641
  console.error("Error playing sound:", e4);
4642
4642
  }
4643
- })(store_get(Hn, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), set(l2, true), clearTimeout(i2), i2 = setTimeout(() => set(c2, true), 300), get$1(p2) && t2.game.cover_video_url && get$1(p2).play().catch((e3) => console.error("Video error:", e3));
4643
+ })(store_get(Yn, "$projectUrl", n2) + "/assets/sounds/hover-selection.ogg", 0.25), set(l2, true), clearTimeout(i2), i2 = setTimeout(() => set(c2, true), 300), get$1(p2) && t2.game.cover_video_url && get$1(p2).play().catch((e3) => console.error("Video error:", e3));
4644
4644
  }
4645
4645
  function handleUnhover() {
4646
4646
  get$1(p2) && get$1(h2) && get$1(p2).pause(), set(l2, false), clearTimeout(i2), set(c2, false);
@@ -4807,7 +4807,7 @@ function flip(e2, { from: t2, to: n2 }, s2 = {}) {
4807
4807
  delegate(["click"]);
4808
4808
  var on_click$2 = (e2, t2, n2) => {
4809
4809
  set(t2, ""), set(n2, !get$1(n2));
4810
- }, Mt = /* @__PURE__ */ from_html('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), Ot = /* @__PURE__ */ from_html('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, s2, i2) => {
4810
+ }, Ot = /* @__PURE__ */ from_html('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), Mt = /* @__PURE__ */ from_html('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, s2, i2) => {
4811
4811
  var _a2;
4812
4812
  t2(n2), set(s2, false), (_a2 = i2.onCategoryChange) == null ? void 0 : _a2.call(i2);
4813
4813
  }, Et = /* @__PURE__ */ from_html("<button> </button>"), It = /* @__PURE__ */ from_html('<div class="space-y-1 p-1"></div>'), Tt = /* @__PURE__ */ from_html('<div class="bg-background/85 fixed left-1/2 z-50 mt-22 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>'), Pt = /* @__PURE__ */ from_html('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl sm: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="max-w-[40vw] truncate text-2xl font-bold text-black sm:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
@@ -4931,10 +4931,10 @@ function Navigation(e2, t2) {
4931
4931
  class: "text-muted-foreground"
4932
4932
  });
4933
4933
  var p3 = sibling(f3, 2), h3 = child(sibling(a3, 2)), consequent = (e4) => {
4934
- append(e4, Mt());
4934
+ append(e4, Ot());
4935
4935
  }, alternate_1 = (e4) => {
4936
4936
  var n4 = comment(), s3 = first_child(n4), consequent_1 = (e5) => {
4937
- append(e5, Ot());
4937
+ append(e5, Mt());
4938
4938
  }, alternate = (e5) => {
4939
4939
  var n5 = It();
4940
4940
  each(n5, 28, () => get$1(u2), (e6) => e6, (e6, n6) => {
@@ -5064,19 +5064,19 @@ function Navigation(e2, t2) {
5064
5064
  async function toggleLike(e2, t2, n2, s2) {
5065
5065
  var _a2;
5066
5066
  if (!((_a2 = t2.currentGame) == null ? void 0 : _a2.id)) return;
5067
- store_set(zn, !n2()), store_set(Rn, s2() + (n2() ? 1 : -1)), // Save to localStorage
5067
+ store_set(Rn, !n2()), store_set(Gn, s2() + (n2() ? 1 : -1)), // Save to localStorage
5068
5068
  n2() ? localStorage.setItem(`playlight_${t2.currentGame.id}_liked`, "true") : localStorage.removeItem(`playlight_${t2.currentGame.id}_liked`);
5069
- await vt.toggleLike(t2.currentGame.id, n2()) || store_set(Rn, s2() + (n2() ? -1 : 1));
5069
+ await vt.toggleLike(t2.currentGame.id, n2()) || store_set(Gn, s2() + (n2() ? -1 : 1));
5070
5070
  }
5071
5071
  delegate(["click"]);
5072
5072
  var Lt = /* @__PURE__ */ from_html('<img alt="logo"/>'), jt = /* @__PURE__ */ from_html('<div class="bg-muted size-5"></div>'), At = /* @__PURE__ */ from_html('<div class="flex flex-wrap gap-1 text-start"><div class="w-full"><p class="text-muted-foreground text-sm text-nowrap select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><!> <p> </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>');
5073
5073
  function CurrentGameDisplay(e2, t2) {
5074
5074
  push(t2, true);
5075
- const $currentGameIsLiked = () => store_get(zn, "$currentGameIsLiked", n2), $currentGameLikeCount = () => store_get(Rn, "$currentGameLikeCount", n2), [n2, s2] = setup_stores();
5075
+ const $currentGameIsLiked = () => store_get(Rn, "$currentGameIsLiked", n2), $currentGameLikeCount = () => store_get(Gn, "$currentGameLikeCount", n2), [n2, s2] = setup_stores();
5076
5076
  let i2 = /* @__PURE__ */ state(false);
5077
5077
  user_effect(() => {
5078
5078
  var _a2, _b3;
5079
- null != ((_a2 = t2.currentGame) == null ? void 0 : _a2.id) && (store_set(zn, null !== localStorage.getItem(`playlight_${t2.currentGame.id}_liked`)), store_set(Rn, ((_b3 = t2.currentGame) == null ? void 0 : _b3.likes) || 0));
5079
+ null != ((_a2 = t2.currentGame) == null ? void 0 : _a2.id) && (store_set(Rn, null !== localStorage.getItem(`playlight_${t2.currentGame.id}_liked`)), store_set(Gn, ((_b3 = t2.currentGame) == null ? void 0 : _b3.likes) || 0));
5080
5080
  });
5081
5081
  var o2 = At(), a2 = sibling(child(o2), 2), l2 = child(a2), consequent = (e3) => {
5082
5082
  var n3 = Lt();
@@ -5226,12 +5226,12 @@ function DiscoveryDrawer(e2, t2) {
5226
5226
  }
5227
5227
  delegate(["mousedown", "mousemove", "mouseup", "touchstart", "touchmove", "touchend"]);
5228
5228
  function closeDiscoveryOnEmptyClick(e2, t2) {
5229
- e2.target === e2.currentTarget && "touch" !== e2.pointerType && store_set(qn, false);
5229
+ e2.target === e2.currentTarget && "touch" !== e2.pointerType && store_set(zn, false);
5230
5230
  }
5231
- var Nt = /* @__PURE__ */ from_html('<div class="-mx-10 mt-5 flex h-92 w-10 flex-col"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between"><div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></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 opacity-60 min-[1920px]:h-1/4"></div></div></div></div>'), on_click$1 = (e2, t2) => store_set(qn, false), qt = /* @__PURE__ */ from_html('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), zt = /* @__PURE__ */ from_html('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'), Rt = /* @__PURE__ */ from_html("<!> <!>", 1), Gt = /* @__PURE__ */ from_html('<div class="flex h-30 items-center"><!></div>'), Ft = /* @__PURE__ */ from_html('<div class="pointer-events-none mx-auto flex h-fit flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="pointer-events-none flex min-h-10 w-full justify-center"><!></div></div>'), Ht = /* @__PURE__ */ from_html('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 select-none max-sm:w-40"/> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-1so2hji"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');
5231
+ var Nt = /* @__PURE__ */ from_html('<div class="-mx-10 mt-5 flex h-92 w-10 flex-col"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between"><div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></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 opacity-60 min-[1920px]:h-1/4"></div></div></div></div>'), on_click$1 = (e2, t2) => store_set(zn, false), qt = /* @__PURE__ */ from_html('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), zt = /* @__PURE__ */ from_html('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'), Rt = /* @__PURE__ */ from_html("<!> <!>", 1), Gt = /* @__PURE__ */ from_html('<div class="flex h-30 items-center"><!></div>'), Ft = /* @__PURE__ */ from_html('<div class="pointer-events-none mx-auto flex h-fit flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="pointer-events-none flex min-h-10 w-full justify-center"><!></div></div>'), Ht = /* @__PURE__ */ from_html('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 select-none max-sm:w-40"/> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-1so2hji"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');
5232
5232
  function Discovery(e2, t2) {
5233
5233
  push(t2, true);
5234
- const $discoveryOpen = () => store_get(qn, "$discoveryOpen", n2), [n2, s2] = setup_stores();
5234
+ const $discoveryOpen = () => store_get(zn, "$discoveryOpen", n2), [n2, s2] = setup_stores();
5235
5235
  let i2, o2 = /* @__PURE__ */ state(true), a2 = /* @__PURE__ */ state(false), l2 = /* @__PURE__ */ state(void 0), c2 = /* @__PURE__ */ state(proxy([])), u2 = /* @__PURE__ */ state(void 0), d2 = /* @__PURE__ */ state(proxy([])), f2 = /* @__PURE__ */ state(1), p2 = /* @__PURE__ */ state(true), h2 = /* @__PURE__ */ state(false), g2 = /* @__PURE__ */ state(void 0), _2 = /* @__PURE__ */ state(void 0);
5236
5236
  async function loadNewFeed() {
5237
5237
  var _a2, _b3;
@@ -5266,7 +5266,7 @@ function Discovery(e2, t2) {
5266
5266
  });
5267
5267
  var v2 = Ht();
5268
5268
  event("keydown", N, (e3) => {
5269
- "Escape" == e3.key && store_set(qn, false);
5269
+ "Escape" == e3.key && store_set(zn, false);
5270
5270
  }), v2.__pointerup = [closeDiscoveryOnEmptyClick, $discoveryOpen];
5271
5271
  var m2 = child(v2), b2 = child(m2), y2 = child(sibling(b2, 2));
5272
5272
  y2.__click = [on_click$1, $discoveryOpen], (function X(e3, t3) {
@@ -5334,7 +5334,7 @@ function Discovery(e2, t2) {
5334
5334
  });
5335
5335
  };
5336
5336
  if_block($2, (e3) => {
5337
- store_get(Gn, "$sidebarEnabled", n2) && !store_get(Fn, "$sidebarCollapsed", n2) || e3(consequent);
5337
+ store_get(Fn, "$sidebarEnabled", n2) && !store_get(Hn, "$sidebarCollapsed", n2) || e3(consequent);
5338
5338
  });
5339
5339
  var x2 = sibling($2, 2);
5340
5340
  x2.__pointerup = [closeDiscoveryOnEmptyClick, $discoveryOpen];
@@ -5429,7 +5429,7 @@ function Discovery(e2, t2) {
5429
5429
  }));
5430
5430
  })(sibling(child(S2)), {
5431
5431
  size: 14
5432
- }), template_effect(() => set_attribute(b2, "src", store_get(Hn, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, v2, () => blur, () => ({
5432
+ }), template_effect(() => set_attribute(b2, "src", store_get(Yn, "$projectUrl", n2) + "/assets/images/logo-white-small.png")), transition(3, v2, () => blur, () => ({
5433
5433
  duration: 250
5434
5434
  })), append(e2, v2), pop(), s2();
5435
5435
  }
@@ -5458,12 +5458,12 @@ async function fetchQuickSuggestions(e2 = 10, t2 = false) {
5458
5458
  delegate(["click"]);
5459
5459
  var on_pointerover = (e2, t2) => {
5460
5460
  "touch" !== e2.pointerType && t2();
5461
- }, Vt = /* @__PURE__ */ from_html('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'), Ut = /* @__PURE__ */ from_html('<div class="relative"><img alt="" class="group-hover:outline-background relative h-7 w-7 bg-stone-200 outline outline-4 outline-white transition-colors select-none"/></div>'), Kt = /* @__PURE__ */ from_html('<div class="ml-3 flex items-center -space-x-2"></div>'), Xt = /* @__PURE__ */ from_html("More games <!>", 1), Zt = /* @__PURE__ */ from_html('<div role="menu" tabindex="0" class="bg-background/85 fixed top-4 right-4 left-4 mx-auto flex w-fit max-w-[calc(100%-2rem)] flex-wrap items-center gap-4 overflow-hidden border-1 p-4 shadow-lg backdrop-blur-xl"><p class="truncate text-lg font-semibold text-nowrap text-white"> </p> <!></div>'), Jt = /* @__PURE__ */ from_html("<!> <!>", 1);
5461
+ }, Ut = /* @__PURE__ */ from_html('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'), Vt = /* @__PURE__ */ from_html('<div class="relative"><img alt="" class="group-hover:outline-background relative h-7 w-7 bg-stone-200 outline outline-4 outline-white transition-colors select-none"/></div>'), Kt = /* @__PURE__ */ from_html('<div class="ml-3 flex items-center -space-x-2"></div>'), Xt = /* @__PURE__ */ from_html("More games <!>", 1), Zt = /* @__PURE__ */ from_html('<div role="menu" tabindex="0" class="bg-background/85 fixed top-4 right-4 left-4 mx-auto flex w-fit max-w-[calc(100%-2rem)] flex-wrap items-center gap-4 overflow-hidden border-1 p-4 shadow-lg backdrop-blur-xl"><p class="truncate text-lg font-semibold text-nowrap text-white"> </p> <!></div>'), Jt = /* @__PURE__ */ from_html("<!> <!>", 1);
5462
5462
  delegate(["pointerover"]);
5463
5463
  var Qt = /* @__PURE__ */ from_html("<!> <!> <!>", 1);
5464
5464
  function App(e2, t2) {
5465
5465
  push(t2, false);
5466
- const $discoveryOpen = () => store_get(qn, "$discoveryOpen", n2), $config = () => store_get(Bn, "$config", n2), [n2, s2] = setup_stores();
5466
+ const $discoveryOpen = () => store_get(zn, "$discoveryOpen", n2), $config = () => store_get(Nn, "$config", n2), [n2, s2] = setup_stores();
5467
5467
  init();
5468
5468
  var i2 = Qt(), o2 = first_child(i2), consequent = (e3) => {
5469
5469
  Discovery(e3, {});
@@ -5496,7 +5496,7 @@ function App(e2, t2) {
5496
5496
  !s3() || ((_a2 = get$1(o3)) == null ? void 0 : _a2.contains(e5.target)) || ((_b3 = get$1(a3)) == null ? void 0 : _b3.contains(e5.target)) || (!get$1(u2) && get$1(c2) && set(u2, setTimeout(() => set(c2, false), 1500), true), n3 = Date.now());
5497
5497
  });
5498
5498
  var p2 = first_child(f2), consequent2 = (e5) => {
5499
- var t5 = Vt();
5499
+ var t5 = Ut();
5500
5500
  t5.__pointerover = [on_pointerover, handleBarTrigger], bind_this(t5, (e6) => set(o3, e6), () => get$1(o3)), append(e5, t5);
5501
5501
  };
5502
5502
  if_block(p2, (e5) => {
@@ -5514,7 +5514,7 @@ function App(e2, t2) {
5514
5514
  var n5 = Xt(), s5 = sibling(first_child(n5)), consequent_12 = (e7) => {
5515
5515
  var t6 = Kt();
5516
5516
  each(t6, 21, () => get$1(l3), index, (e8, t7, n6) => {
5517
- var s6 = Ut();
5517
+ var s6 = Vt();
5518
5518
  let i5;
5519
5519
  var o4 = child(s6);
5520
5520
  template_effect((e9) => {
@@ -5554,7 +5554,7 @@ function App(e2, t2) {
5554
5554
  return get$1(t3);
5555
5555
  },
5556
5556
  onIntent: () => {
5557
- $discoveryOpen() || store_set(qn, true);
5557
+ $discoveryOpen() || store_set(zn, true);
5558
5558
  }
5559
5559
  });
5560
5560
  }
@@ -5562,13 +5562,13 @@ function App(e2, t2) {
5562
5562
  Toaster(e3, {});
5563
5563
  };
5564
5564
  if_block(l2, (e3) => {
5565
- ($discoveryOpen() || store_get(Gn, "$sidebarEnabled", n2)) && e3(consequent_1);
5565
+ ($discoveryOpen() || store_get(Fn, "$sidebarEnabled", n2)) && e3(consequent_1);
5566
5566
  }), append(e2, i2), pop(), s2();
5567
5567
  }
5568
5568
  var en = /* @__PURE__ */ from_html('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><!></div>'), tn = /* @__PURE__ */ from_html('<div class="scroll-container grid grid-cols-2 gap-6 svelte-129hoe0"><div class="flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column flex flex-col gap-6 svelte-129hoe0"></div></div> <div class="mt-15 flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column-offset flex flex-col gap-6 svelte-129hoe0"></div></div></div>'), nn = /* @__PURE__ */ from_html('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><p class="text-muted-foreground svelte-129hoe0">Error – See console</p></div>'), rn = /* @__PURE__ */ from_html("View all games <!>", 1), sn = /* @__PURE__ */ from_html("Random game <!>", 1), on_mousedown = (e2, t2) => t2(e2.clientY), on_touchstart = (e2, t2) => t2(e2.touches[0].clientY), an = /* @__PURE__ */ from_html('<img alt="icon" class="pointer-events-none aspect-square w-8 svelte-129hoe0"/>'), ln = /* @__PURE__ */ from_html('<div role="button" tabindex="0"><!> <!></div>'), un = /* @__PURE__ */ from_html('<div><img alt="logo" class="pointer-events-none mx-auto mt-4 -mb-1 w-50 select-none svelte-129hoe0"/> <div class="grow-1 overflow-hidden mask-y-from-90% mask-y-to-100% p-6 py-12 transition-opacity not-hover:opacity-75 svelte-129hoe0"><!></div> <div class="flex w-full flex-col items-center gap-4 px-4 svelte-129hoe0"><!> <!></div> <div class="w-full svelte-129hoe0"><div class="mt-auto border-y p-6 py-4 svelte-129hoe0"><!></div> <div class="flex justify-end p-0 svelte-129hoe0"><!></div></div></div> <!>', 1);
5569
5569
  function Sidebar(e2, t2) {
5570
5570
  push(t2, true);
5571
- const $sidebarCollapsed = () => store_get(Fn, "$sidebarCollapsed", n2), $projectUrl = () => store_get(Hn, "$projectUrl", n2), $discoveryOpen = () => store_get(qn, "$discoveryOpen", n2), [n2, s2] = setup_stores();
5571
+ const $sidebarCollapsed = () => store_get(Hn, "$sidebarCollapsed", n2), $projectUrl = () => store_get(Yn, "$projectUrl", n2), $discoveryOpen = () => store_get(zn, "$discoveryOpen", n2), [n2, s2] = setup_stores();
5572
5572
  let i2 = /* @__PURE__ */ state(false), o2 = /* @__PURE__ */ state(void 0), a2 = /* @__PURE__ */ state(0), l2 = /* @__PURE__ */ state(null), c2 = /* @__PURE__ */ state(proxy([])), u2 = user_derived(() => {
5573
5573
  var _a2;
5574
5574
  return ((_a2 = get$1(c2)) == null ? void 0 : _a2.filter((e3, t3) => t3 % 2 == 0)) || [];
@@ -5591,7 +5591,7 @@ function Sidebar(e2, t2) {
5591
5591
  user_pre_effect(() => {
5592
5592
  var _a2;
5593
5593
  const e3 = document.documentElement.clientWidth <= 768;
5594
- store_set(Fn, e3 || Boolean((_a2 = getSidebarState()) == null ? void 0 : _a2.collapsed));
5594
+ store_set(Hn, e3 || Boolean((_a2 = getSidebarState()) == null ? void 0 : _a2.collapsed));
5595
5595
  }), onMount(async () => {
5596
5596
  var _a2;
5597
5597
  return set(p2, ((_a2 = getSidebarState()) == null ? void 0 : _a2.buttonY) ?? get$1(p2), true), // Fetch data
@@ -5627,7 +5627,7 @@ function Sidebar(e2, t2) {
5627
5627
  event("mousemove", N, function handleMouseMove(e3) {
5628
5628
  get$1(h2) && handleDragMove(e3.clientY);
5629
5629
  }), event("mouseup", N, () => set(h2, false)), event("touchend", N, () => set(h2, false)), event("resize", N, () => {
5630
- document.documentElement.clientWidth <= 768 && store_set(Fn, true);
5630
+ document.documentElement.clientWidth <= 768 && store_set(Hn, true);
5631
5631
  });
5632
5632
  var b2 = first_child(m2), y2 = child(b2), w2 = sibling(y2, 2), $2 = child(w2), consequent = (e3) => {
5633
5633
  var t3 = en();
@@ -5678,7 +5678,7 @@ function Sidebar(e2, t2) {
5678
5678
  var x2 = sibling(w2, 2), k2 = child(x2);
5679
5679
  Button(k2, {
5680
5680
  class: "w-full",
5681
- onclick: () => store_set(qn, true),
5681
+ onclick: () => store_set(zn, true),
5682
5682
  get disabled() {
5683
5683
  return $discoveryOpen();
5684
5684
  },
@@ -5829,7 +5829,7 @@ function Sidebar(e2, t2) {
5829
5829
  variant: "secondary",
5830
5830
  class: "text-muted-foreground border-l outline-none!",
5831
5831
  onclick: () => {
5832
- store_set(Fn, true), saveSidebarState();
5832
+ store_set(Hn, true), saveSidebarState();
5833
5833
  },
5834
5834
  children: (e3, t3) => {
5835
5835
  !(function Chevrons_right(e4, t4) {
@@ -5948,11 +5948,11 @@ function Sidebar(e2, t2) {
5948
5948
  }), Button(sibling(s3, 2), {
5949
5949
  variant: "ghost",
5950
5950
  onclick: () => {
5951
- document.documentElement.clientWidth > 768 ? (store_set(Fn, false), saveSidebarState()) : store_set(qn, true);
5951
+ document.documentElement.clientWidth > 768 ? (store_set(Hn, false), saveSidebarState()) : store_set(zn, true);
5952
5952
  },
5953
5953
  children: (e4, t4) => {
5954
5954
  var n4 = an();
5955
- template_effect(() => set_attribute(n4, "src", $projectUrl() + "/static/images/icon-white-small.png")), append(e4, n4);
5955
+ template_effect(() => set_attribute(n4, "src", $projectUrl() + "/assets/images/icon-white-small.png")), append(e4, n4);
5956
5956
  },
5957
5957
  $$slots: {
5958
5958
  default: true
@@ -5966,7 +5966,7 @@ function Sidebar(e2, t2) {
5966
5966
  if_block(C2, (e3) => {
5967
5967
  $sidebarCollapsed() && !$discoveryOpen() && e3(consequent_2);
5968
5968
  }), template_effect(() => {
5969
- set_class(b2, 1, `relative z-1 ml-auto flex h-dvh overflow-y-auto ${$sidebarCollapsed() ? "w-0" : "w-75 border-l"} bg-background flex-col items-center gap-8 text-white transition-[width] duration-150 ease-out`, "svelte-129hoe0"), set_attribute(y2, "src", $projectUrl() + "/static/images/logo-white-small.png");
5969
+ set_class(b2, 1, `relative z-1 ml-auto flex h-dvh overflow-y-auto ${$sidebarCollapsed() ? "w-0" : "w-75 border-l"} bg-background flex-col items-center gap-8 text-white transition-[width] duration-150 ease-out`, "svelte-129hoe0"), set_attribute(y2, "src", $projectUrl() + "/assets/images/logo-white-small.png");
5970
5970
  }), append(e2, m2), pop(), s2();
5971
5971
  }
5972
5972
  delegate(["mousedown", "touchstart"]);
@@ -6054,7 +6054,7 @@ function applyCSSOverrides(e2, t2, n2, s2) {
6054
6054
  (e2 = // Handle double-sided range: (value < width < value)
6055
6055
  (e2 = e2.replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3, i3, o3) => `(calc(${t3} + ${s2}px) ${n3} width ${i3} calc(${o3} + ${s2}px))`)).replace(/\(width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3) => `(width ${t3} calc(${n3} + ${s2}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\)/gi, (e3, t3, n3) => `(calc(${t3} + ${s2}px) ${n3} width)`)).replace(/\(\s*orientation:\s*portrait\s*\)/gi, `(max-width: ${o2}px)`)).replace(/\(\s*orientation:\s*landscape\s*\)/gi, `(min-width: ${o2 + 1}px)`)).replace(/\bbody\s*\{([^}]*)\}/gi, (e3, t3) => `.playlight-sdk-inner-wrapper {${t3.replace(/\s*!important\s*/gi, "")}}`);
6056
6056
  }
6057
- let vn, mn = null, bn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, Mn = null, On = /* @__PURE__ */ new Map();
6057
+ let vn, mn = null, bn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, On = null, Mn = /* @__PURE__ */ new Map();
6058
6058
  let En = null, In = null, Tn = null, Pn = false, Ln = false, jn = [], An = null, Dn = null, Wn = null;
6059
6059
  function mountPlaylight() {
6060
6060
  try {
@@ -6087,10 +6087,10 @@ function setupSidebarLayout() {
6087
6087
  return !["SCRIPT", "STYLE"].includes(e3.tagName) && !((_a3 = e3.id) == null ? void 0 : _a3.includes("playlight"));
6088
6088
  }).forEach((e3) => t3.appendChild(e3)), e2.appendChild(t3), Ln = true, t3;
6089
6089
  };
6090
- if (false !== ((_b3 = (_a2 = get(Bn)) == null ? void 0 : _a2.sidebar) == null ? void 0 : _b3.hasFrameworkRoot) && s2.length > 0) {
6090
+ if (false !== ((_b3 = (_a2 = get(Nn)) == null ? void 0 : _a2.sidebar) == null ? void 0 : _b3.hasFrameworkRoot) && s2.length > 0) {
6091
6091
  if (1 === s2.length)
6092
6092
  In = s2[0], Ln = false;
6093
- else if (true === ((_d3 = (_c2 = get(Bn)) == null ? void 0 : _c2.sidebar) == null ? void 0 : _d3.hasFrameworkRoot)) {
6093
+ else if (true === ((_d3 = (_c2 = get(Nn)) == null ? void 0 : _c2.sidebar) == null ? void 0 : _d3.hasFrameworkRoot)) {
6094
6094
  const e3 = s2.map((e4) => e4.querySelectorAll("*").length), t3 = Math.max(...e3);
6095
6095
  In = s2[e3.indexOf(t3)], Ln = false;
6096
6096
  }
@@ -6121,19 +6121,19 @@ function setupSidebarLayout() {
6121
6121
  configurable: true
6122
6122
  }), // Scroll methods
6123
6123
  kn = window.scrollTo, Sn = window.scroll, Cn = window.scrollBy, window.scrollTo = (...e4) => t3.scrollTo(...e4), window.scroll = (...e4) => t3.scrollTo(...e4), window.scrollBy = (...e4) => t3.scrollBy(...e4), // Redirect scroll events from innerWrapper to window
6124
- Mn = () => {
6124
+ On = () => {
6125
6125
  window.dispatchEvent(new Event("scroll"));
6126
- }, t3.addEventListener("scroll", Mn), // Window.matchMedia & window.matchMedia.addEventListener/removeEventListener
6126
+ }, t3.addEventListener("scroll", On), // Window.matchMedia & window.matchMedia.addEventListener/removeEventListener
6127
6127
  bn = window.matchMedia, window.matchMedia = function(t4) {
6128
6128
  const getAdjustedMQL = () => {
6129
6129
  const n4 = bn || window.matchMedia, s4 = e3.clientWidth, i3 = document.documentElement.clientWidth - s4, o2 = applyCSSOverrides(t4, s4, window.innerHeight, i3);
6130
6130
  return n4.call(window, o2);
6131
6131
  }, n3 = getAdjustedMQL();
6132
- On.has(t4) || On.set(t4, {
6132
+ Mn.has(t4) || Mn.set(t4, {
6133
6133
  listeners: /* @__PURE__ */ new Set(),
6134
6134
  lastMatches: n3.matches
6135
6135
  });
6136
- const s3 = On.get(t4);
6136
+ const s3 = Mn.get(t4);
6137
6137
  return new Proxy(n3, {
6138
6138
  get(e4, n4) {
6139
6139
  if ("media" === n4) return t4;
@@ -6151,10 +6151,10 @@ function setupSidebarLayout() {
6151
6151
  }, // Trigger on resize (we dispatch resize events for sidebar resize in a different file)
6152
6152
  // Only maintain one listenter that persists when the sidebar gets unmounted to preserve functionality!
6153
6153
  vn || (vn = window.addEventListener("resize", () => {
6154
- for (const [e4, { listeners: t4, lastMatches: n3 }] of On.entries()) {
6154
+ for (const [e4, { listeners: t4, lastMatches: n3 }] of Mn.entries()) {
6155
6155
  const s3 = window.matchMedia(e4);
6156
6156
  if (s3.matches !== n3) {
6157
- On.get(e4).lastMatches = s3.matches;
6157
+ Mn.get(e4).lastMatches = s3.matches;
6158
6158
  const n4 = new MediaQueryListEvent("change", {
6159
6159
  matches: s3.matches,
6160
6160
  media: s3.media
@@ -6206,7 +6206,7 @@ function removeSidebarLayout() {
6206
6206
  }), // Restore polyfills and clean up (has to happen after the unmount)
6207
6207
  (function restoreWindowPolyfills(e3) {
6208
6208
  try {
6209
- Object.defineProperty(window, "innerWidth", mn), Object.defineProperty(window, "scrollY", yn), Object.defineProperty(window, "pageYOffset", wn), Object.defineProperty(window, "scrollX", $n), Object.defineProperty(window, "pageXOffset", xn), window.scrollTo = kn, window.scroll = Sn, window.scrollBy = Cn, e3.removeEventListener("scroll", Mn), window.matchMedia = bn, mn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, Mn = null, bn = null;
6209
+ Object.defineProperty(window, "innerWidth", mn), Object.defineProperty(window, "scrollY", yn), Object.defineProperty(window, "pageYOffset", wn), Object.defineProperty(window, "scrollX", $n), Object.defineProperty(window, "pageXOffset", xn), window.scrollTo = kn, window.scroll = Sn, window.scrollBy = Cn, e3.removeEventListener("scroll", On), window.matchMedia = bn, mn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, On = null, bn = null;
6210
6210
  } catch (e4) {
6211
6211
  console.warn("Could not restore window polyfills:", e4);
6212
6212
  }
@@ -6221,29 +6221,35 @@ function removeSidebarLayout() {
6221
6221
  console.error("Error during sidebar removal:", e2);
6222
6222
  }
6223
6223
  }
6224
- const Bn = writable(null), Nn = writable(false), qn = writable(false), zn = writable(false), Rn = writable(0), Gn = writable(false), Fn = writable(false), Hn = writable("https://sdk.playlight.dev");
6225
- let Yn;
6226
- qn.subscribe((e2) => {
6224
+ const Bn = "sdk.playlight.dev";
6225
+ const Nn = writable(null), qn = writable(false), zn = writable(false), Rn = writable(false), Gn = writable(0), Fn = writable(false), Hn = writable(false), Yn = writable((function getAssetBaseUrl() {
6226
+ const e2 = import.meta.url;
6227
+ if (e2.includes(Bn) || e2.startsWith("file://")) return "https://" + Bn;
6228
+ const t2 = new URL(e2);
6229
+ return t2.origin + t2.pathname.substring(0, t2.pathname.lastIndexOf("/"));
6230
+ })());
6231
+ let Un;
6232
+ zn.subscribe((e2) => {
6227
6233
  try {
6228
- e2 ? (vt.trackOpen(), triggerEvent("discoveryOpen"), Yn = document.body.style.overflow, document.body.style.setProperty("overflow", "hidden", "important")) : (triggerEvent("discoveryClose"), document.body.style.overflow = Yn);
6234
+ e2 ? (vt.trackOpen(), triggerEvent("discoveryOpen"), Un = document.body.style.overflow, document.body.style.setProperty("overflow", "hidden", "important")) : (triggerEvent("discoveryClose"), document.body.style.overflow = Un);
6229
6235
  } catch (e3) {
6230
6236
  console.error("Error in discoveryOpen store subscription:", e3);
6231
6237
  }
6232
- }), Bn.subscribe((e2) => {
6233
- var _a2;
6234
- ((_a2 = e2 == null ? void 0 : e2.sidebar) == null ? void 0 : _a2.forceVisible) || get(Nn) ? Gn.set(true) : Gn.set(false);
6235
6238
  }), Nn.subscribe((e2) => {
6236
- e2 && Gn.set(true);
6237
- }), Gn.subscribe((e2) => {
6239
+ var _a2;
6240
+ ((_a2 = e2 == null ? void 0 : e2.sidebar) == null ? void 0 : _a2.forceVisible) || get(qn) ? Fn.set(true) : Fn.set(false);
6241
+ }), qn.subscribe((e2) => {
6242
+ e2 && Fn.set(true);
6243
+ }), Fn.subscribe((e2) => {
6238
6244
  e2 ? (setupSidebarLayout(), triggerEvent("sidebarEnable")) : (removeSidebarLayout(), triggerEvent("sidebarDisable"));
6239
6245
  });
6240
- var Vn = /* @__PURE__ */ from_html('<div class="flex h-62 w-full items-center justify-center"><!></div>'), Un = /* @__PURE__ */ from_html('<div class="snap-center px-2"><!></div>'), Kn = /* @__PURE__ */ from_html('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>', 1), on_click = (e2, t2, n2) => get$1(t2).scrollBy({
6246
+ var Vn = /* @__PURE__ */ from_html('<div class="flex h-62 w-full items-center justify-center"><!></div>'), Kn = /* @__PURE__ */ from_html('<div class="snap-center px-2"><!></div>'), Xn = /* @__PURE__ */ from_html('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>', 1), on_click = (e2, t2, n2) => get$1(t2).scrollBy({
6241
6247
  left: 2 * -get$1(n2),
6242
6248
  behavior: "smooth"
6243
- }), Xn = /* @__PURE__ */ from_html('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), on_click_1 = (e2, t2, n2) => get$1(t2).scrollBy({
6249
+ }), Zn = /* @__PURE__ */ from_html('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), on_click_1 = (e2, t2, n2) => get$1(t2).scrollBy({
6244
6250
  left: 2 * get$1(n2),
6245
6251
  behavior: "smooth"
6246
- }), Zn = /* @__PURE__ */ from_html('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), Jn = /* @__PURE__ */ from_html("<!> <!>", 1), Qn = /* @__PURE__ */ from_html('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');
6252
+ }), Jn = /* @__PURE__ */ from_html('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), Qn = /* @__PURE__ */ from_html("<!> <!>", 1), er = /* @__PURE__ */ from_html('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');
6247
6253
  function WidgetCarousel(e2, t2) {
6248
6254
  push(t2, true);
6249
6255
  const [n2, s2] = setup_stores();
@@ -6277,7 +6283,7 @@ function WidgetCarousel(e2, t2) {
6277
6283
  }
6278
6284
  });
6279
6285
  });
6280
- var f2 = Qn(), p2 = child(f2), h2 = child(p2), consequent = (e3) => {
6286
+ var f2 = er(), p2 = child(f2), h2 = child(p2), consequent = (e3) => {
6281
6287
  var t3 = Vn();
6282
6288
  Loader_circle(child(t3), {
6283
6289
  class: "animate-spin opacity-75",
@@ -6285,9 +6291,9 @@ function WidgetCarousel(e2, t2) {
6285
6291
  strokeWidth: 2.5
6286
6292
  }), append(e3, t3);
6287
6293
  }, alternate = (e3) => {
6288
- var t3 = Kn(), n3 = first_child(t3);
6294
+ var t3 = Xn(), n3 = first_child(t3);
6289
6295
  each(n3, 17, () => get$1(o2), index, (e4, t4) => {
6290
- var n4 = Un();
6296
+ var n4 = Kn();
6291
6297
  GameCard(child(n4), {
6292
6298
  get game() {
6293
6299
  return get$1(t4);
@@ -6303,7 +6309,7 @@ function WidgetCarousel(e2, t2) {
6303
6309
  });
6304
6310
  var s3 = sibling(n3, 2);
6305
6311
  Button(sibling(child(s3), 2), {
6306
- onclick: () => store_set(qn, true),
6312
+ onclick: () => store_set(zn, true),
6307
6313
  children: (e4, t4) => {
6308
6314
  append(e4, text("See all"));
6309
6315
  },
@@ -6316,8 +6322,8 @@ function WidgetCarousel(e2, t2) {
6316
6322
  get$1(i2) ? e3(consequent) : e3(alternate, false);
6317
6323
  }), bind_this(p2, (e3) => set(a2, e3), () => get$1(a2));
6318
6324
  var g2 = sibling(p2, 2), consequent_3 = (e3) => {
6319
- var t3 = Jn(), n3 = first_child(t3), consequent_1 = (e4) => {
6320
- var t4 = Xn();
6325
+ var t3 = Qn(), n3 = first_child(t3), consequent_1 = (e4) => {
6326
+ var t4 = Zn();
6321
6327
  t4.__click = [on_click, a2, l2], (function Chevron_left(e5, t5) {
6322
6328
  const n4 = legacy_rest_props(t5, ["children", "$$slots", "$$events", "$$legacy"]), s4 = [["path", {
6323
6329
  d: "m15 18-6-6 6-6"
@@ -6365,7 +6371,7 @@ function WidgetCarousel(e2, t2) {
6365
6371
  get$1(c2) && e4(consequent_1);
6366
6372
  });
6367
6373
  var s3 = sibling(n3, 2), consequent_2 = (e4) => {
6368
- var t4 = Zn();
6374
+ var t4 = Jn();
6369
6375
  t4.__click = [on_click_1, a2, l2], (function Chevron_right(e5, t5) {
6370
6376
  const n4 = legacy_rest_props(t5, ["children", "$$slots", "$$events", "$$legacy"]), s4 = [["path", {
6371
6377
  d: "m9 18 6-6-6-6"
@@ -6434,7 +6440,7 @@ function initWidgets() {
6434
6440
  }
6435
6441
  }
6436
6442
  delegate(["click"]);
6437
- const er = new /**
6443
+ const tr = new /**
6438
6444
  * The PlaylightSDK class
6439
6445
  */
6440
6446
  class PlaylightSDK {
@@ -6461,7 +6467,7 @@ class PlaylightSDK {
6461
6467
  })();
6462
6468
  const t2 = "true" === sessionStorage.getItem("fromPlaylight"), n2 = "playlight" === new URLSearchParams(window.location.search).get("utm_source");
6463
6469
  n2 && sessionStorage.setItem("fromPlaylight", "true"), // Save in session storage to persist on MPAs
6464
- Nn.set(t2 || n2), // Set initialized
6470
+ qn.set(t2 || n2), // Set initialized
6465
6471
  window.playlightInitialized = true;
6466
6472
  }
6467
6473
  /**
@@ -6469,7 +6475,7 @@ class PlaylightSDK {
6469
6475
  * @param {boolean} [value=true] - Whether to show the discovery
6470
6476
  */
6471
6477
  setDiscovery(e2 = true) {
6472
- qn.set(e2);
6478
+ zn.set(e2);
6473
6479
  }
6474
6480
  /**
6475
6481
  * Register an event callback
@@ -6485,11 +6491,11 @@ class PlaylightSDK {
6485
6491
  * @param {object} [configParam] - Playlight configuration object
6486
6492
  */
6487
6493
  setConfig(e2 = {}) {
6488
- Bn.set(createConfig(e2));
6494
+ Nn.set(createConfig(e2));
6489
6495
  }
6490
6496
  }();
6491
- "undefined" != typeof window && (window.playlightSDK = er);
6497
+ "undefined" != typeof window && (window.playlightSDK = tr);
6492
6498
  export {
6493
- er as default
6499
+ tr as default
6494
6500
  };
6495
6501
  //# sourceMappingURL=playlight-sdk.es.js.map