@ikonai/sdk-react-ui 1.0.21 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { IkonUiCore as kt, UiStreamStore as Ct } from "@ikonai/sdk-ui";
2
2
  import { UiStreamStore as Co } from "@ikonai/sdk-ui";
3
- import It, { useSyncExternalStore as Ue, useMemo as K, memo as z, useRef as A, useCallback as x, Fragment as Ot, useEffect as M, useState as W, createContext as lt, use as xe } from "react";
4
- import { createLogger as ge, getOrCreateDeviceId as _t, deriveAuthUrl as Oe, parseUrlParams as Nt, clearSessionParamsFromUrl as Pt, isCloudEnvironment as Ke, extractUserIdFromToken as jt, deriveBackendType as Ye, IkonClient as Lt, subscribeToLogEvents as Mt, isDebugModeEnabled as Ut, LogLevel as We } from "@ikonai/sdk";
5
- var de = { exports: {} }, oe = {};
3
+ import It, { useSyncExternalStore as Ue, useMemo as V, memo as K, useRef as A, useCallback as F, Fragment as Ot, useEffect as D, useState as H, createContext as lt, use as xe } from "react";
4
+ import { createLogger as pe, getOrCreateDeviceId as _t, deriveAuthUrl as Oe, parseUrlParams as Nt, clearSessionParamsFromUrl as Pt, isCloudEnvironment as Ke, extractUserIdFromToken as jt, deriveBackendType as Ye, IkonClient as Mt, subscribeToLogEvents as Lt, isDebugModeEnabled as Ut, LogLevel as We } from "@ikonai/sdk";
5
+ var le = { exports: {} }, ee = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -14,7 +14,7 @@ var de = { exports: {} }, oe = {};
14
14
  */
15
15
  var ze;
16
16
  function xt() {
17
- if (ze) return oe;
17
+ if (ze) return ee;
18
18
  ze = 1;
19
19
  var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
20
20
  function r(n, o, s) {
@@ -32,9 +32,9 @@ function xt() {
32
32
  props: s
33
33
  };
34
34
  }
35
- return oe.Fragment = e, oe.jsx = r, oe.jsxs = r, oe;
35
+ return ee.Fragment = e, ee.jsx = r, ee.jsxs = r, ee;
36
36
  }
37
- var se = {};
37
+ var te = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -50,20 +50,20 @@ function Dt() {
50
50
  function t(l) {
51
51
  if (l == null) return null;
52
52
  if (typeof l == "function")
53
- return l.$$typeof === U ? null : l.displayName || l.name || null;
53
+ return l.$$typeof === _ ? null : l.displayName || l.name || null;
54
54
  if (typeof l == "string") return l;
55
55
  switch (l) {
56
56
  case S:
57
57
  return "Fragment";
58
- case p:
58
+ case g:
59
59
  return "Profiler";
60
60
  case m:
61
61
  return "StrictMode";
62
- case D:
62
+ case P:
63
63
  return "Suspense";
64
- case G:
64
+ case q:
65
65
  return "SuspenseList";
66
- case P:
66
+ case E:
67
67
  return "Activity";
68
68
  }
69
69
  if (typeof l == "object")
@@ -76,12 +76,12 @@ function Dt() {
76
76
  return (l.displayName || "Context") + ".Provider";
77
77
  case w:
78
78
  return (l._context.displayName || "Context") + ".Consumer";
79
- case _:
79
+ case O:
80
80
  var b = l.render;
81
81
  return l = l.displayName, l || (l = b.displayName || b.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
82
- case Z:
82
+ case J:
83
83
  return b = l.displayName || null, b !== null ? b : t(l.type) || "Memo";
84
- case C:
84
+ case k:
85
85
  b = l._payload, l = l._init;
86
86
  try {
87
87
  return t(l(b));
@@ -102,17 +102,17 @@ function Dt() {
102
102
  }
103
103
  if (b) {
104
104
  b = console;
105
- var k = b.error, N = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
106
- return k.call(
105
+ var C = b.error, U = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
106
+ return C.call(
107
107
  b,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- N
109
+ U
110
110
  ), e(l);
111
111
  }
112
112
  }
113
113
  function n(l) {
114
114
  if (l === S) return "<>";
115
- if (typeof l == "object" && l !== null && l.$$typeof === C)
115
+ if (typeof l == "object" && l !== null && l.$$typeof === k)
116
116
  return "<...>";
117
117
  try {
118
118
  var b = t(l);
@@ -122,45 +122,45 @@ function Dt() {
122
122
  }
123
123
  }
124
124
  function o() {
125
- var l = O.A;
125
+ var l = N.A;
126
126
  return l === null ? null : l.getOwner();
127
127
  }
128
128
  function s() {
129
129
  return Error("react-stack-top-frame");
130
130
  }
131
131
  function i(l) {
132
- if (F.call(l, "key")) {
132
+ if (M.call(l, "key")) {
133
133
  var b = Object.getOwnPropertyDescriptor(l, "key").get;
134
134
  if (b && b.isReactWarning) return !1;
135
135
  }
136
136
  return l.key !== void 0;
137
137
  }
138
138
  function a(l, b) {
139
- function k() {
140
- B || (B = !0, console.error(
139
+ function C() {
140
+ ae || (ae = !0, console.error(
141
141
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
142
142
  b
143
143
  ));
144
144
  }
145
- k.isReactWarning = !0, Object.defineProperty(l, "key", {
146
- get: k,
145
+ C.isReactWarning = !0, Object.defineProperty(l, "key", {
146
+ get: C,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
150
  function c() {
151
151
  var l = t(this.type);
152
- return H[l] || (H[l] = !0, console.error(
152
+ return ce[l] || (ce[l] = !0, console.error(
153
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
154
154
  )), l = this.props.ref, l !== void 0 ? l : null;
155
155
  }
156
- function f(l, b, k, N, E, I, V, be) {
157
- return k = I.ref, l = {
158
- $$typeof: g,
156
+ function f(l, b, C, U, G, Y, Se, be) {
157
+ return C = Y.ref, l = {
158
+ $$typeof: p,
159
159
  type: l,
160
160
  key: b,
161
- props: I,
162
- _owner: E
163
- }, (k !== void 0 ? k : null) !== null ? Object.defineProperty(l, "ref", {
161
+ props: Y,
162
+ _owner: G
163
+ }, (C !== void 0 ? C : null) !== null ? Object.defineProperty(l, "ref", {
164
164
  enumerable: !1,
165
165
  get: c
166
166
  }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
@@ -177,7 +177,7 @@ function Dt() {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: V
180
+ value: Se
181
181
  }), Object.defineProperty(l, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
@@ -185,101 +185,101 @@ function Dt() {
185
185
  value: be
186
186
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
187
187
  }
188
- function d(l, b, k, N, E, I, V, be) {
189
- var L = b.children;
190
- if (L !== void 0)
191
- if (N)
192
- if (Y(L)) {
193
- for (N = 0; N < L.length; N++)
194
- h(L[N]);
195
- Object.freeze && Object.freeze(L);
188
+ function u(l, b, C, U, G, Y, Se, be) {
189
+ var x = b.children;
190
+ if (x !== void 0)
191
+ if (U)
192
+ if ($(x)) {
193
+ for (U = 0; U < x.length; U++)
194
+ h(x[U]);
195
+ Object.freeze && Object.freeze(x);
196
196
  } else
197
197
  console.error(
198
198
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
199
  );
200
- else h(L);
201
- if (F.call(b, "key")) {
202
- L = t(l);
203
- var re = Object.keys(b).filter(function(Tt) {
200
+ else h(x);
201
+ if (M.call(b, "key")) {
202
+ x = t(l);
203
+ var Z = Object.keys(b).filter(function(Tt) {
204
204
  return Tt !== "key";
205
205
  });
206
- N = 0 < re.length ? "{key: someKey, " + re.join(": ..., ") + ": ...}" : "{key: someKey}", te[L + N] || (re = 0 < re.length ? "{" + re.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ U = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", L[x + U] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error(
207
207
  `A props object containing a "key" prop is being spread into JSX:
208
208
  let props = %s;
209
209
  <%s {...props} />
210
210
  React keys must be passed directly to JSX without using spread:
211
211
  let props = %s;
212
212
  <%s key={someKey} {...props} />`,
213
- N,
214
- L,
215
- re,
216
- L
217
- ), te[L + N] = !0);
213
+ U,
214
+ x,
215
+ Z,
216
+ x
217
+ ), L[x + U] = !0);
218
218
  }
219
- if (L = null, k !== void 0 && (r(k), L = "" + k), i(b) && (r(b.key), L = "" + b.key), "key" in b) {
220
- k = {};
219
+ if (x = null, C !== void 0 && (r(C), x = "" + C), i(b) && (r(b.key), x = "" + b.key), "key" in b) {
220
+ C = {};
221
221
  for (var we in b)
222
- we !== "key" && (k[we] = b[we]);
223
- } else k = b;
224
- return L && a(
225
- k,
222
+ we !== "key" && (C[we] = b[we]);
223
+ } else C = b;
224
+ return x && a(
225
+ C,
226
226
  typeof l == "function" ? l.displayName || l.name || "Unknown" : l
227
227
  ), f(
228
228
  l,
229
- L,
230
- I,
231
- E,
229
+ x,
230
+ Y,
231
+ G,
232
232
  o(),
233
- k,
234
- V,
233
+ C,
234
+ Se,
235
235
  be
236
236
  );
237
237
  }
238
238
  function h(l) {
239
- typeof l == "object" && l !== null && l.$$typeof === g && l._store && (l._store.validated = 1);
239
+ typeof l == "object" && l !== null && l.$$typeof === p && l._store && (l._store.validated = 1);
240
240
  }
241
- var u = It, g = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), T = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), P = Symbol.for("react.activity"), U = Symbol.for("react.client.reference"), O = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, Y = Array.isArray, Q = console.createTask ? console.createTask : function() {
241
+ var d = It, p = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), T = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), J = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), E = Symbol.for("react.activity"), _ = Symbol.for("react.client.reference"), N = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, $ = Array.isArray, X = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- u = {
244
+ d = {
245
245
  "react-stack-bottom-frame": function(l) {
246
246
  return l();
247
247
  }
248
248
  };
249
- var B, H = {}, X = u["react-stack-bottom-frame"].bind(
250
- u,
249
+ var ae, ce = {}, ue = d["react-stack-bottom-frame"].bind(
250
+ d,
251
251
  s
252
- )(), ee = Q(n(s)), te = {};
253
- se.Fragment = S, se.jsx = function(l, b, k, N, E) {
254
- var I = 1e4 > O.recentlyCreatedOwnerStacks++;
255
- return d(
252
+ )(), I = X(n(s)), L = {};
253
+ te.Fragment = S, te.jsx = function(l, b, C, U, G) {
254
+ var Y = 1e4 > N.recentlyCreatedOwnerStacks++;
255
+ return u(
256
256
  l,
257
257
  b,
258
- k,
258
+ C,
259
259
  !1,
260
- N,
261
- E,
262
- I ? Error("react-stack-top-frame") : X,
263
- I ? Q(n(l)) : ee
260
+ U,
261
+ G,
262
+ Y ? Error("react-stack-top-frame") : ue,
263
+ Y ? X(n(l)) : I
264
264
  );
265
- }, se.jsxs = function(l, b, k, N, E) {
266
- var I = 1e4 > O.recentlyCreatedOwnerStacks++;
267
- return d(
265
+ }, te.jsxs = function(l, b, C, U, G) {
266
+ var Y = 1e4 > N.recentlyCreatedOwnerStacks++;
267
+ return u(
268
268
  l,
269
269
  b,
270
- k,
270
+ C,
271
271
  !0,
272
- N,
273
- E,
274
- I ? Error("react-stack-top-frame") : X,
275
- I ? Q(n(l)) : ee
272
+ U,
273
+ G,
274
+ Y ? Error("react-stack-top-frame") : ue,
275
+ Y ? X(n(l)) : I
276
276
  );
277
277
  };
278
- }()), se;
278
+ }()), te;
279
279
  }
280
280
  var Ge;
281
281
  function Ft() {
282
- return Ge || (Ge = 1, process.env.NODE_ENV === "production" ? de.exports = xt() : de.exports = Dt()), de.exports;
282
+ return Ge || (Ge = 1, process.env.NODE_ENV === "production" ? le.exports = xt() : le.exports = Dt()), le.exports;
283
283
  }
284
284
  var R = Ft();
285
285
  function Bt(t, e) {
@@ -294,7 +294,7 @@ function Bt(t, e) {
294
294
  return `${o ?? ""}:${s?.id ?? ""}`;
295
295
  }
296
296
  );
297
- return K(() => {
297
+ return V(() => {
298
298
  const [n, o] = r.split(":");
299
299
  return {
300
300
  rootViewId: n || void 0,
@@ -302,15 +302,15 @@ function Bt(t, e) {
302
302
  };
303
303
  }, [r]);
304
304
  }
305
- function J(t, e) {
305
+ function z(t, e) {
306
306
  const r = Ue(
307
307
  (n) => t.subscribeNode(e, n),
308
308
  () => t.getNodeVersion(e),
309
309
  () => t.getNodeVersion(e)
310
310
  );
311
- return K(() => t.getNode(e), [t, e, r]);
311
+ return V(() => t.getNode(e), [t, e, r]);
312
312
  }
313
- const $t = ge("UIRenderer");
313
+ const $t = pe("UIRenderer");
314
314
  function Vt(t) {
315
315
  if (t === void 0)
316
316
  return "{}";
@@ -341,8 +341,8 @@ function zt(t) {
341
341
  e += "," + t[r].id;
342
342
  return e;
343
343
  }
344
- const _e = z(function t({ nodeId: e, context: r }) {
345
- const n = J(r.store, e), o = n ? Yt(n) : [], s = zt(o), i = K(
344
+ const _e = K(function t({ nodeId: e, context: r }) {
345
+ const n = z(r.store, e), o = n ? Yt(n) : [], s = zt(o), i = V(
346
346
  () => o.length === 0 ? null : o.map((h) => /* @__PURE__ */ R.jsx(t, { nodeId: h.id, context: r }, h.id)),
347
347
  // eslint-disable-next-line react-hooks/exhaustive-deps
348
348
  [s, r]
@@ -354,8 +354,8 @@ const _e = z(function t({ nodeId: e, context: r }) {
354
354
  const a = r.library.resolve(n);
355
355
  if (!a)
356
356
  return $t.warn(`No renderer for node type ${n.type}`), null;
357
- const c = Kt(n), f = c.length > 0 ? c.join(" ") : void 0, d = a;
358
- return /* @__PURE__ */ R.jsx(d, { nodeId: e, context: r, className: f });
357
+ const c = Kt(n), f = c.length > 0 ? c.join(" ") : void 0, u = a;
358
+ return /* @__PURE__ */ R.jsx(u, { nodeId: e, context: r, className: f });
359
359
  }, Wt);
360
360
  function qt(t, e) {
361
361
  return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ R.jsx(_e, { nodeId: r.id, context: e }, r.id));
@@ -363,19 +363,19 @@ function qt(t, e) {
363
363
  function Gt(t, e) {
364
364
  return t.store === e.store && t.library === e.library && t.viewId === e.viewId && t.emptyFallback === e.emptyFallback;
365
365
  }
366
- const Ht = z(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
- const { rootViewId: c, rootNodeId: f } = Bt(e, n), d = A(s);
368
- d.current = s;
366
+ const Ht = K(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
+ const { rootViewId: c, rootNodeId: f } = Bt(e, n), u = A(s);
368
+ u.current = s;
369
369
  const h = A(i);
370
370
  h.current = i;
371
- const u = A(a);
372
- u.current = a;
373
- const g = x((S, m) => {
371
+ const d = A(a);
372
+ d.current = a;
373
+ const p = F((S, m) => {
374
374
  if (!S)
375
375
  return;
376
- const p = Vt(m);
377
- d.current?.(S, p);
378
- }, []), y = K(() => {
376
+ const g = Vt(m);
377
+ u.current?.(S, g);
378
+ }, []), y = V(() => {
379
379
  const S = {
380
380
  store: e,
381
381
  library: r,
@@ -384,20 +384,20 @@ const Ht = z(function({ store: e, library: r, viewId: n, emptyFallback: o = null
384
384
  getPayload: (m) => e.getSnapshot().payloads.get(m),
385
385
  renderChildren: (m) => qt(m, S),
386
386
  renderView: (m) => {
387
- const p = e.getSnapshot().views.get(m);
388
- return p ? /* @__PURE__ */ R.jsx(_e, { nodeId: p.id, context: S }) : null;
387
+ const g = e.getSnapshot().views.get(m);
388
+ return g ? /* @__PURE__ */ R.jsx(_e, { nodeId: g.id, context: S }) : null;
389
389
  },
390
- dispatchAction: g,
390
+ dispatchAction: p,
391
391
  // Access client/video via refs to avoid context recreation
392
392
  get client() {
393
393
  return h.current;
394
394
  },
395
395
  get video() {
396
- return u.current;
396
+ return d.current;
397
397
  }
398
398
  };
399
399
  return S;
400
- }, [e, r, g]);
400
+ }, [e, r, p]);
401
401
  return !c || !f ? o : /* @__PURE__ */ R.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ R.jsx(_e, { nodeId: f, context: y }) });
402
402
  }, Gt);
403
403
  class Jt {
@@ -432,24 +432,24 @@ const Ne = "ikon-ui";
432
432
  function Xt(t, e) {
433
433
  return t === e;
434
434
  }
435
- const uo = z(function({ stores: e, registry: r, category: n = Ne, onAction: o, client: s }) {
436
- const i = K(() => Array.from(e.keys()).sort().join(","), [e]), a = A(o);
435
+ const uo = K(function({ stores: e, registry: r, category: n = Ne, onAction: o, client: s }) {
436
+ const i = V(() => Array.from(e.keys()).sort().join(","), [e]), a = A(o);
437
437
  a.current = o;
438
438
  const c = A(s);
439
439
  c.current = s;
440
- const f = K(
440
+ const f = V(
441
441
  () => {
442
- const d = [];
443
- for (const [h, u] of e) {
444
- const g = u.store.getSnapshot();
445
- Xt(u.category, n) && (!g.rootViewId || !g.views.has(g.rootViewId) || d.push({ key: h, store: u.store }));
442
+ const u = [];
443
+ for (const [h, d] of e) {
444
+ const p = d.store.getSnapshot();
445
+ Xt(d.category, n) && (!p.rootViewId || !p.views.has(p.rootViewId) || u.push({ key: h, store: d.store }));
446
446
  }
447
- return d;
447
+ return u;
448
448
  },
449
449
  // eslint-disable-next-line react-hooks/exhaustive-deps
450
450
  [e, n, i]
451
451
  );
452
- return f.length === 0 ? null : /* @__PURE__ */ R.jsx(R.Fragment, { children: f.map(({ key: d, store: h }) => /* @__PURE__ */ R.jsx(Ht, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, d)) });
452
+ return f.length === 0 ? null : /* @__PURE__ */ R.jsx(R.Fragment, { children: f.map(({ key: u, store: h }) => /* @__PURE__ */ R.jsx(Ht, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, u)) });
453
453
  });
454
454
  class Zt {
455
455
  core;
@@ -532,7 +532,7 @@ function Qt(t) {
532
532
  return e.length > 0 ? e : void 0;
533
533
  }
534
534
  }
535
- function le(t) {
535
+ function ie(t) {
536
536
  if (typeof t == "string") {
537
537
  const e = t.trim();
538
538
  return e.length > 0 ? e : void 0;
@@ -564,45 +564,45 @@ function Fe(t) {
564
564
  return He.set(t, r), r;
565
565
  }
566
566
  function tr() {
567
- const t = z(function({ nodeId: r, context: n }) {
568
- const o = J(n.store, r), s = A(null), i = le(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0, f = le(o?.props?.key), d = o?.props?.preciseGeneratedAt;
569
- return M(() => {
567
+ const t = K(function({ nodeId: r, context: n }) {
568
+ const o = z(n.store, r), s = A(null), i = ie(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0, f = ie(o?.props?.key), u = o?.props?.preciseGeneratedAt;
569
+ return D(() => {
570
570
  if (typeof document > "u")
571
571
  return;
572
- const u = s.current;
573
- if (!u || i && u.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== i)
572
+ const d = s.current;
573
+ if (!d || i && d.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== i)
574
574
  return;
575
- const g = c !== !0;
576
- if (g) {
577
- const p = ((w) => {
575
+ const p = c !== !0;
576
+ if (p) {
577
+ const g = ((w) => {
578
578
  let T = w.parentElement;
579
579
  for (; T; ) {
580
- const D = window.getComputedStyle(T).overflowY;
581
- if (D === "auto" || D === "scroll" || T.hasAttribute("data-radix-scroll-area-viewport"))
580
+ const P = window.getComputedStyle(T).overflowY;
581
+ if (P === "auto" || P === "scroll" || T.hasAttribute("data-radix-scroll-area-viewport"))
582
582
  return T;
583
583
  T = T.parentElement;
584
584
  }
585
585
  return null;
586
- })(u);
587
- p ? requestAnimationFrame(() => {
588
- const w = p.getBoundingClientRect(), T = u.getBoundingClientRect(), _ = p.scrollTop + (T.bottom - w.bottom) + 16;
589
- "scrollBehavior" in document.documentElement.style ? p.scrollTo({ top: _, behavior: "smooth" }) : p.scrollTop = _;
590
- }) : typeof u.scrollIntoView == "function" && requestAnimationFrame(() => {
586
+ })(d);
587
+ g ? requestAnimationFrame(() => {
588
+ const w = g.getBoundingClientRect(), T = d.getBoundingClientRect(), O = g.scrollTop + (T.bottom - w.bottom) + 16;
589
+ "scrollBehavior" in document.documentElement.style ? g.scrollTo({ top: O, behavior: "smooth" }) : g.scrollTop = O;
590
+ }) : typeof d.scrollIntoView == "function" && requestAnimationFrame(() => {
591
591
  try {
592
- u.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest" });
592
+ d.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest" });
593
593
  } catch {
594
- u.scrollIntoView(!1);
594
+ d.scrollIntoView(!1);
595
595
  }
596
596
  });
597
597
  }
598
598
  const y = document.activeElement;
599
- if (!(y instanceof HTMLInputElement || y instanceof HTMLTextAreaElement || y?.getAttribute("contenteditable") === "true") && typeof u.focus == "function")
599
+ if (!(y instanceof HTMLInputElement || y instanceof HTMLTextAreaElement || y?.getAttribute("contenteditable") === "true") && typeof d.focus == "function")
600
600
  try {
601
- u.focus({ preventScroll: !g });
601
+ d.focus({ preventScroll: !p });
602
602
  } catch {
603
- u.focus();
603
+ d.focus();
604
604
  }
605
- }, [c, i, f, d]), o ? /* @__PURE__ */ R.jsx(
605
+ }, [c, i, f, u]), o ? /* @__PURE__ */ R.jsx(
606
606
  "span",
607
607
  {
608
608
  ref: s,
@@ -620,15 +620,15 @@ function tr() {
620
620
  };
621
621
  }
622
622
  function rr() {
623
- const t = z(function({ nodeId: r, context: n, className: o }) {
624
- const s = J(n.store, r), i = Qt(s?.props?.onInvokeId), a = x(() => {
623
+ const t = K(function({ nodeId: r, context: n, className: o }) {
624
+ const s = z(n.store, r), i = Qt(s?.props?.onInvokeId), a = F(() => {
625
625
  i && n.dispatchAction(i);
626
626
  }, [i, n]);
627
627
  if (!s)
628
628
  return null;
629
629
  const c = Fe(s.props);
630
630
  delete c.onInvokeId;
631
- const f = De(le(s.props?.className), o), d = s.children?.length ? n.renderChildren(s.children) : void 0;
631
+ const f = De(ie(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
632
632
  return /* @__PURE__ */ R.jsx(
633
633
  "div",
634
634
  {
@@ -637,7 +637,7 @@ function rr() {
637
637
  className: f,
638
638
  onClick: i ? a : void 0,
639
639
  style: i ? { cursor: "pointer" } : void 0,
640
- children: d
640
+ children: u
641
641
  }
642
642
  );
643
643
  });
@@ -647,11 +647,11 @@ function rr() {
647
647
  };
648
648
  }
649
649
  function nr() {
650
- const t = z(function({ nodeId: r, context: n, className: o }) {
651
- const s = J(n.store, r);
650
+ const t = K(function({ nodeId: r, context: n, className: o }) {
651
+ const s = z(n.store, r);
652
652
  if (!s)
653
653
  return null;
654
- const i = Fe(s.props), a = De("relative", le(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
654
+ const i = Fe(s.props), a = De("relative", ie(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
655
655
  return /* @__PURE__ */ R.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
656
656
  });
657
657
  return ({ type: e }) => {
@@ -660,11 +660,11 @@ function nr() {
660
660
  };
661
661
  }
662
662
  function or() {
663
- const t = z(function({ nodeId: r, context: n, className: o }) {
664
- const s = J(n.store, r);
663
+ const t = K(function({ nodeId: r, context: n, className: o }) {
664
+ const s = z(n.store, r);
665
665
  if (!s)
666
666
  return null;
667
- const i = Fe(s.props), a = De("absolute", le(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
667
+ const i = Fe(s.props), a = De("absolute", ie(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
668
668
  return /* @__PURE__ */ R.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
669
669
  });
670
670
  return ({ type: e }) => {
@@ -706,7 +706,7 @@ function Je(t) {
706
706
  const e = t.trim();
707
707
  return e.length > 0 ? e : void 0;
708
708
  }
709
- function fe(t) {
709
+ function de(t) {
710
710
  if (typeof t == "boolean")
711
711
  return t;
712
712
  if (typeof t == "string") {
@@ -717,24 +717,24 @@ function fe(t) {
717
717
  }
718
718
  const dr = "std.audio-url-player";
719
719
  function fr() {
720
- const t = z(function({
720
+ const t = K(function({
721
721
  nodeId: r,
722
722
  context: n,
723
723
  className: o
724
724
  }) {
725
- const s = J(n.store, r);
725
+ const s = z(n.store, r);
726
726
  if (!s)
727
727
  return null;
728
- const i = lr(ur(s.props?.className), o), a = Je(s.props?.src), c = Je(s.props?.preload), f = fe(s.props?.controls), d = fe(s.props?.autoplay), h = fe(s.props?.loop), u = fe(s.props?.muted);
728
+ const i = lr(ur(s.props?.className), o), a = Je(s.props?.src), c = Je(s.props?.preload), f = de(s.props?.controls), u = de(s.props?.autoplay), h = de(s.props?.loop), d = de(s.props?.muted);
729
729
  return /* @__PURE__ */ R.jsx(
730
730
  "audio",
731
731
  {
732
732
  src: a,
733
733
  ...c !== void 0 ? { preload: c } : {},
734
734
  ...f !== void 0 ? { controls: f } : {},
735
- ...d !== void 0 ? { autoPlay: d } : {},
735
+ ...u !== void 0 ? { autoPlay: u } : {},
736
736
  ...h !== void 0 ? { loop: h } : {},
737
- ...u !== void 0 ? { muted: u } : {},
737
+ ...d !== void 0 ? { muted: d } : {},
738
738
  "data-ikon-node-id": s.id,
739
739
  className: i
740
740
  }
@@ -761,7 +761,7 @@ function ft(...t) {
761
761
  r && r.trim() && e.push(r.trim());
762
762
  return e.length > 0 ? e.join(" ") : void 0;
763
763
  }
764
- function he(t) {
764
+ function fe(t) {
765
765
  if (typeof t == "number" && Number.isFinite(t))
766
766
  return Math.floor(t);
767
767
  if (typeof t == "string" && t.trim().length > 0) {
@@ -778,21 +778,21 @@ function Pe(t) {
778
778
  }
779
779
  const hr = "std.video-canvas", mr = "std.video-url-player";
780
780
  function pr() {
781
- const t = z(function({ nodeId: r, context: n, className: o }) {
782
- const s = J(n.store, r), i = A(null), a = A(null), c = n.video, f = n.client, d = f?.isWebRtcEnabled ? f.webRtcVideoStream : null, h = f?.isWebRtcEnabled ? f.webRtcScreenStream : null, u = s ? Pe(s.props?.streamId) : void 0, g = s ? he(s.props?.width) : void 0, y = s ? he(s.props?.height) : void 0, S = s ? ft(dt(s.props?.className), o) : o, m = u?.includes("screen") ? h : d;
783
- return M(() => {
784
- const p = i.current;
785
- if (!(!c || !p || !u || m))
786
- return c.attachCanvas(u, p), () => {
781
+ const t = K(function({ nodeId: r, context: n, className: o }) {
782
+ const s = z(n.store, r), i = A(null), a = A(null), c = n.video, f = n.client, u = s ? Pe(s.props?.streamId) : void 0, h = s ? fe(s.props?.width) : void 0, d = s ? fe(s.props?.height) : void 0, p = s ? ft(dt(s.props?.className), o) : o, y = f?.isWebRtcEnabled && u ? f.getWebRtcVideoStreamByStreamId(u) : null;
783
+ return D(() => {
784
+ const S = i.current;
785
+ if (!(!c || !S || !u || y))
786
+ return c.attachCanvas(u, S), () => {
787
787
  c.detachCanvas(u);
788
788
  };
789
- }, [c, u, m]), M(() => {
790
- const p = a.current;
791
- if (!(!p || !m))
792
- return p.srcObject = m, () => {
793
- p.srcObject = null;
789
+ }, [c, u, y]), D(() => {
790
+ const S = a.current;
791
+ if (!(!S || !y))
792
+ return S.srcObject = y, () => {
793
+ S.srcObject = null;
794
794
  };
795
- }, [m]), s ? m ? /* @__PURE__ */ R.jsx(
795
+ }, [y]), s ? y ? /* @__PURE__ */ R.jsx(
796
796
  "video",
797
797
  {
798
798
  ref: a,
@@ -801,9 +801,9 @@ function pr() {
801
801
  muted: !0,
802
802
  "data-ikon-node-id": s.id,
803
803
  "data-ikon-video-stream-id": u,
804
- className: S,
805
- ...g ? { width: g } : {},
806
- ...y ? { height: y } : {}
804
+ className: p,
805
+ ...h ? { width: h } : {},
806
+ ...d ? { height: d } : {}
807
807
  },
808
808
  u
809
809
  ) : /* @__PURE__ */ R.jsx(
@@ -812,9 +812,9 @@ function pr() {
812
812
  ref: i,
813
813
  "data-ikon-node-id": s.id,
814
814
  "data-ikon-video-stream-id": u,
815
- className: S,
816
- ...g ? { width: g } : {},
817
- ...y ? { height: y } : {}
815
+ className: p,
816
+ ...h ? { width: h } : {},
817
+ ...d ? { height: d } : {}
818
818
  },
819
819
  u
820
820
  ) : null;
@@ -827,7 +827,7 @@ function pr() {
827
827
  function gr() {
828
828
  return [pr(), yr(), fr()];
829
829
  }
830
- function ie(t) {
830
+ function re(t) {
831
831
  if (typeof t == "boolean")
832
832
  return t;
833
833
  if (typeof t == "string") {
@@ -837,25 +837,25 @@ function ie(t) {
837
837
  }
838
838
  }
839
839
  function yr() {
840
- const t = z(function({
840
+ const t = K(function({
841
841
  nodeId: r,
842
842
  context: n,
843
843
  className: o
844
844
  }) {
845
- const s = J(n.store, r);
845
+ const s = z(n.store, r);
846
846
  if (!s)
847
847
  return null;
848
- const i = ft(dt(s.props?.className), o), a = Pe(s.props?.src), c = Pe(s.props?.poster), f = ie(s.props?.controls), d = ie(s.props?.autoplay), h = ie(s.props?.loop), u = ie(s.props?.muted), g = ie(s.props?.playsInline), y = he(s.props?.width), S = he(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
848
+ const i = ft(dt(s.props?.className), o), a = Pe(s.props?.src), c = Pe(s.props?.poster), f = re(s.props?.controls), u = re(s.props?.autoplay), h = re(s.props?.loop), d = re(s.props?.muted), p = re(s.props?.playsInline), y = fe(s.props?.width), S = fe(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
849
849
  return /* @__PURE__ */ R.jsx(
850
850
  "video",
851
851
  {
852
852
  src: a,
853
853
  poster: c,
854
854
  ...f !== void 0 ? { controls: f } : {},
855
- ...d !== void 0 ? { autoPlay: d } : {},
855
+ ...u !== void 0 ? { autoPlay: u } : {},
856
856
  ...h !== void 0 ? { loop: h } : {},
857
- ...u !== void 0 ? { muted: u } : {},
858
- ...g !== void 0 ? { playsInline: g } : {},
857
+ ...d !== void 0 ? { muted: d } : {},
858
+ ...p !== void 0 ? { playsInline: p } : {},
859
859
  ...y ? { width: y } : {},
860
860
  ...S ? { height: S } : {},
861
861
  "data-ikon-node-id": s.id,
@@ -1017,16 +1017,16 @@ class Ar {
1017
1017
  c && e.uniform3f(c, n, o, 1);
1018
1018
  const f = this.uniformLocations.get("iTime");
1019
1019
  f && e.uniform1f(f, i);
1020
- const d = this.uniformLocations.get("iTimeDelta");
1021
- d && e.uniform1f(d, a);
1020
+ const u = this.uniformLocations.get("iTimeDelta");
1021
+ u && e.uniform1f(u, a);
1022
1022
  const h = this.uniformLocations.get("iFrame");
1023
1023
  h && e.uniform1i(h, this.frameCount);
1024
- const u = this.uniformLocations.get("iMouse");
1025
- u && e.uniform4f(u, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
1026
- const g = this.uniformLocations.get("iDate");
1027
- if (g) {
1024
+ const d = this.uniformLocations.get("iMouse");
1025
+ d && e.uniform4f(d, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
1026
+ const p = this.uniformLocations.get("iDate");
1027
+ if (p) {
1028
1028
  const y = /* @__PURE__ */ new Date();
1029
- e.uniform4f(g, y.getFullYear(), y.getMonth(), y.getDate(), y.getHours() * 3600 + y.getMinutes() * 60 + y.getSeconds() + y.getMilliseconds() / 1e3);
1029
+ e.uniform4f(p, y.getFullYear(), y.getMonth(), y.getDate(), y.getHours() * 3600 + y.getMinutes() * 60 + y.getSeconds() + y.getMilliseconds() / 1e3);
1030
1030
  }
1031
1031
  for (const [y, S] of Object.entries(this.customUniforms)) {
1032
1032
  const m = this.uniformLocations.get(y);
@@ -1036,18 +1036,18 @@ class Ar {
1036
1036
  e.uniform1f(m, S.value);
1037
1037
  break;
1038
1038
  case "vec2": {
1039
- const p = S.value;
1040
- e.uniform2f(m, p[0], p[1]);
1039
+ const g = S.value;
1040
+ e.uniform2f(m, g[0], g[1]);
1041
1041
  break;
1042
1042
  }
1043
1043
  case "vec3": {
1044
- const p = S.value;
1045
- e.uniform3f(m, p[0], p[1], p[2]);
1044
+ const g = S.value;
1045
+ e.uniform3f(m, g[0], g[1], g[2]);
1046
1046
  break;
1047
1047
  }
1048
1048
  case "vec4": {
1049
- const p = S.value;
1050
- e.uniform4f(m, p[0], p[1], p[2], p[3]);
1049
+ const g = S.value;
1050
+ e.uniform4f(m, g[0], g[1], g[2], g[3]);
1051
1051
  break;
1052
1052
  }
1053
1053
  case "int":
@@ -1143,83 +1143,83 @@ function _r(t, e) {
1143
1143
  }
1144
1144
  const Nr = "std.shadertoy-canvas";
1145
1145
  function Pr() {
1146
- const t = z(function({ nodeId: r, context: n, className: o }) {
1147
- const s = J(n.store, r), i = A(null), a = A(null), c = A(null), f = A(0), d = A(""), h = A({}), u = A({
1146
+ const t = K(function({ nodeId: r, context: n, className: o }) {
1147
+ const s = z(n.store, r), i = A(null), a = A(null), c = A(null), f = A(0), u = A(""), h = A({}), d = A({
1148
1148
  x: 0,
1149
1149
  y: 0,
1150
1150
  clickX: 0,
1151
1151
  clickY: 0,
1152
1152
  isDown: !1
1153
- }), g = s ? Cr(s.props?.shaderSource) : "", y = s ? ve(s.props?.fps) ?? 60 : 60, S = s?.props?.uniforms, m = K(() => Or(S), [S]), p = s ? Ir(s.props?.enableMouse) ?? !0 : !0, w = s ? ve(s.props?.width) : void 0, T = s ? ve(s.props?.height) : void 0, _ = s ? kr(Tr(s.props?.className), o) : o;
1154
- M(() => {
1155
- const C = i.current;
1156
- if (C) {
1153
+ }), p = s ? Cr(s.props?.shaderSource) : "", y = s ? ve(s.props?.fps) ?? 60 : 60, S = s?.props?.uniforms, m = V(() => Or(S), [S]), g = s ? Ir(s.props?.enableMouse) ?? !0 : !0, w = s ? ve(s.props?.width) : void 0, T = s ? ve(s.props?.height) : void 0, O = s ? kr(Tr(s.props?.className), o) : o;
1154
+ D(() => {
1155
+ const k = i.current;
1156
+ if (k) {
1157
1157
  try {
1158
- const P = new Ar(C);
1159
- a.current = P;
1160
- } catch (P) {
1161
- console.error("[ShadertoyRenderer] Failed to create WebGL2 context:", P);
1158
+ const E = new Ar(k);
1159
+ a.current = E;
1160
+ } catch (E) {
1161
+ console.error("[ShadertoyRenderer] Failed to create WebGL2 context:", E);
1162
1162
  }
1163
1163
  return () => {
1164
1164
  a.current && (a.current.destroy(), a.current = null);
1165
1165
  };
1166
1166
  }
1167
- }, []), M(() => {
1168
- const C = a.current;
1169
- if (!(!C || !g) && d.current !== g)
1170
- if (C.compile(g, m))
1171
- d.current = g, h.current = m;
1167
+ }, []), D(() => {
1168
+ const k = a.current;
1169
+ if (!(!k || !p) && u.current !== p)
1170
+ if (k.compile(p, m))
1171
+ u.current = p, h.current = m;
1172
1172
  else {
1173
- const U = C.getError();
1174
- console.error("[ShadertoyRenderer] Shader compilation failed:", U);
1173
+ const _ = k.getError();
1174
+ console.error("[ShadertoyRenderer] Shader compilation failed:", _);
1175
1175
  }
1176
- }, [g, m]), M(() => {
1177
- const C = a.current;
1178
- !C || !d.current || _r(h.current, m) || (C.setCustomUniforms(m), h.current = m);
1179
- }, [m]), M(() => {
1180
- const C = a.current;
1181
- if (!C || !d.current) return;
1182
- const P = 1e3 / y, U = (O) => {
1183
- const F = O - f.current;
1184
- F >= P && (f.current = O - F % P, C.draw()), c.current = requestAnimationFrame(U);
1176
+ }, [p, m]), D(() => {
1177
+ const k = a.current;
1178
+ !k || !u.current || _r(h.current, m) || (k.setCustomUniforms(m), h.current = m);
1179
+ }, [m]), D(() => {
1180
+ const k = a.current;
1181
+ if (!k || !u.current) return;
1182
+ const E = 1e3 / y, _ = (N) => {
1183
+ const M = N - f.current;
1184
+ M >= E && (f.current = N - M % E, k.draw()), c.current = requestAnimationFrame(_);
1185
1185
  };
1186
- return c.current = requestAnimationFrame(U), () => {
1186
+ return c.current = requestAnimationFrame(_), () => {
1187
1187
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
1188
1188
  };
1189
1189
  }, [y]);
1190
- const D = x(
1191
- (C) => {
1192
- if (!p) return;
1193
- const P = i.current, U = a.current;
1194
- if (!P || !U) return;
1195
- const O = P.getBoundingClientRect(), F = C.clientX - O.left, Y = O.height - (C.clientY - O.top);
1196
- u.current.x = F, u.current.y = Y, U.setMouse(F, Y, u.current.clickX, u.current.clickY);
1190
+ const P = F(
1191
+ (k) => {
1192
+ if (!g) return;
1193
+ const E = i.current, _ = a.current;
1194
+ if (!E || !_) return;
1195
+ const N = E.getBoundingClientRect(), M = k.clientX - N.left, $ = N.height - (k.clientY - N.top);
1196
+ d.current.x = M, d.current.y = $, _.setMouse(M, $, d.current.clickX, d.current.clickY);
1197
1197
  },
1198
- [p]
1199
- ), G = x(
1200
- (C) => {
1201
- if (!p) return;
1202
- const P = i.current, U = a.current;
1203
- if (!P || !U) return;
1204
- const O = P.getBoundingClientRect(), F = C.clientX - O.left, Y = O.height - (C.clientY - O.top);
1205
- u.current.isDown = !0, u.current.clickX = F, u.current.clickY = Y, U.setMouse(F, Y, F, Y);
1198
+ [g]
1199
+ ), q = F(
1200
+ (k) => {
1201
+ if (!g) return;
1202
+ const E = i.current, _ = a.current;
1203
+ if (!E || !_) return;
1204
+ const N = E.getBoundingClientRect(), M = k.clientX - N.left, $ = N.height - (k.clientY - N.top);
1205
+ d.current.isDown = !0, d.current.clickX = M, d.current.clickY = $, _.setMouse(M, $, M, $);
1206
1206
  },
1207
- [p]
1208
- ), Z = x(() => {
1209
- p && (u.current.isDown = !1, u.current.clickX = -Math.abs(u.current.clickX));
1210
- }, [p]);
1207
+ [g]
1208
+ ), J = F(() => {
1209
+ g && (d.current.isDown = !1, d.current.clickX = -Math.abs(d.current.clickX));
1210
+ }, [g]);
1211
1211
  return s ? /* @__PURE__ */ R.jsx(
1212
1212
  "canvas",
1213
1213
  {
1214
1214
  ref: i,
1215
1215
  "data-ikon-node-id": s.id,
1216
- className: _,
1216
+ className: O,
1217
1217
  ...w ? { width: w } : {},
1218
1218
  ...T ? { height: T } : {},
1219
- onMouseMove: D,
1220
- onMouseDown: G,
1221
- onMouseUp: Z,
1222
- onMouseLeave: Z
1219
+ onMouseMove: P,
1220
+ onMouseDown: q,
1221
+ onMouseUp: J,
1222
+ onMouseLeave: J
1223
1223
  }
1224
1224
  ) : null;
1225
1225
  });
@@ -1228,11 +1228,11 @@ function Pr() {
1228
1228
  return t;
1229
1229
  };
1230
1230
  }
1231
- const jr = "shadertoy", Lr = async () => Pr();
1232
- function Mr(t) {
1233
- t.registerModule(jr, Lr);
1231
+ const jr = "shadertoy", Mr = async () => Pr();
1232
+ function Lr(t) {
1233
+ t.registerModule(jr, Mr);
1234
1234
  }
1235
- const Xe = ge("UIRegistry");
1235
+ const Xe = pe("UIRegistry");
1236
1236
  class Ur {
1237
1237
  baseResolvers = [];
1238
1238
  moduleLoaders = /* @__PURE__ */ new Map();
@@ -1285,7 +1285,7 @@ class Ur {
1285
1285
  }
1286
1286
  function xr() {
1287
1287
  const t = new Ur();
1288
- return cr(t), wr(t), Mr(t), t.loadRegisteredModules(), t;
1288
+ return cr(t), wr(t), Lr(t), t.loadRegisteredModules(), t;
1289
1289
  }
1290
1290
  function Dr(t) {
1291
1291
  return Array.isArray(t) ? t : [t];
@@ -1301,7 +1301,7 @@ function Br(t, e) {
1301
1301
  return !1;
1302
1302
  return !0;
1303
1303
  }
1304
- const Re = ge("MotionController"), Ze = {
1304
+ const Re = pe("MotionController"), Ze = {
1305
1305
  ease: [0.25, 0.1, 0.25, 1],
1306
1306
  "ease-in": [0.42, 0, 1, 1],
1307
1307
  "ease-out": [0, 0, 0.58, 1],
@@ -1331,7 +1331,7 @@ const Re = ge("MotionController"), Ze = {
1331
1331
  "ease-out-back": [0.175, 0.885, 0.32, 1.275],
1332
1332
  "ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
1333
1333
  };
1334
- function $(t) {
1334
+ function B(t) {
1335
1335
  return t <= 0 ? 0 : t >= 1 ? 1 : t;
1336
1336
  }
1337
1337
  function Qe(t) {
@@ -1345,72 +1345,72 @@ function et(t) {
1345
1345
  return typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
1346
1346
  }
1347
1347
  function tt(t, e, r, n) {
1348
- const d = new Float32Array(11);
1349
- function h(m, p, w) {
1350
- return ((3 * p - 3 * w + 1) * m + (3 * w - 6 * p)) * m * m + 3 * p * m;
1348
+ const u = new Float32Array(11);
1349
+ function h(m, g, w) {
1350
+ return ((3 * g - 3 * w + 1) * m + (3 * w - 6 * g)) * m * m + 3 * g * m;
1351
1351
  }
1352
- function u(m, p, w) {
1353
- return 3 * (3 * p - 3 * w + 1) * m * m + 2 * (3 * w - 6 * p) * m + 3 * p;
1352
+ function d(m, g, w) {
1353
+ return 3 * (3 * g - 3 * w + 1) * m * m + 2 * (3 * w - 6 * g) * m + 3 * g;
1354
1354
  }
1355
- function g(m, p) {
1355
+ function p(m, g) {
1356
1356
  for (let w = 0; w < 4; w += 1) {
1357
- const T = u(p, t, r);
1357
+ const T = d(g, t, r);
1358
1358
  if (T === 0)
1359
- return p;
1360
- const _ = h(p, t, r) - m;
1361
- p -= _ / T;
1359
+ return g;
1360
+ const O = h(g, t, r) - m;
1361
+ g -= O / T;
1362
1362
  }
1363
- return p;
1363
+ return g;
1364
1364
  }
1365
- function y(m, p, w) {
1366
- let T = 0, _ = 0, D = 0;
1365
+ function y(m, g, w) {
1366
+ let T = 0, O = 0, P = 0;
1367
1367
  do
1368
- _ = p + (w - p) / 2, T = h(_, t, r) - m, T > 0 ? w = _ : p = _;
1369
- while (Math.abs(T) > 1e-7 && ++D < 10);
1370
- return _;
1368
+ O = g + (w - g) / 2, T = h(O, t, r) - m, T > 0 ? w = O : g = O;
1369
+ while (Math.abs(T) > 1e-7 && ++P < 10);
1370
+ return O;
1371
1371
  }
1372
1372
  function S(m) {
1373
- let p = 0, w = 1;
1373
+ let g = 0, w = 1;
1374
1374
  const T = 10;
1375
- for (; w !== T && d[w] <= m; w += 1)
1376
- p += 0.1;
1375
+ for (; w !== T && u[w] <= m; w += 1)
1376
+ g += 0.1;
1377
1377
  w -= 1;
1378
- const _ = (m - d[w]) / (d[w + 1] - d[w]), D = p + _ * 0.1, G = u(D, t, r);
1379
- return G >= 1e-3 ? g(m, D) : G === 0 ? D : y(m, p, p + 0.1);
1378
+ const O = (m - u[w]) / (u[w + 1] - u[w]), P = g + O * 0.1, q = d(P, t, r);
1379
+ return q >= 1e-3 ? p(m, P) : q === 0 ? P : y(m, g, g + 0.1);
1380
1380
  }
1381
1381
  for (let m = 0; m < 11; m += 1)
1382
- d[m] = h(m * 0.1, t, r);
1382
+ u[m] = h(m * 0.1, t, r);
1383
1383
  return (m) => m <= 0 ? 0 : m >= 1 ? 1 : h(S(m), e, n);
1384
1384
  }
1385
1385
  function $r(t) {
1386
1386
  const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
1387
1387
  if (!e)
1388
- return (o) => $(o);
1388
+ return (o) => B(o);
1389
1389
  const r = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
1390
- return n === "start" || n === "jump-start" ? (o) => $(Math.ceil(o * r) / r) : n === "none" || n === "jump-none" ? (o) => $(Math.round(o * r) / r) : n === "both" || n === "jump-both" ? (o) => $((Math.floor(o * r) + 0.5) / r) : (o) => $(Math.floor(o * r) / r);
1390
+ return n === "start" || n === "jump-start" ? (o) => B(Math.ceil(o * r) / r) : n === "none" || n === "jump-none" ? (o) => B(Math.round(o * r) / r) : n === "both" || n === "jump-both" ? (o) => B((Math.floor(o * r) + 0.5) / r) : (o) => B(Math.floor(o * r) / r);
1391
1391
  }
1392
1392
  function Vr(t) {
1393
1393
  if (!t)
1394
- return (r) => $(r);
1394
+ return (r) => B(r);
1395
1395
  const e = t.trim().toLowerCase();
1396
1396
  if (!e || e === "linear")
1397
- return (r) => $(r);
1397
+ return (r) => B(r);
1398
1398
  if (Ze[e]) {
1399
1399
  const [r, n, o, s] = Ze[e], i = tt(r, n, o, s);
1400
- return (a) => $(i($(a)));
1400
+ return (a) => B(i(B(a)));
1401
1401
  }
1402
1402
  if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
1403
1403
  const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
1404
1404
  if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
1405
1405
  const [o, s, i, a] = n, c = tt(o, s, i, a);
1406
- return (f) => $(c($(f)));
1406
+ return (f) => B(c(B(f)));
1407
1407
  }
1408
1408
  }
1409
1409
  if (e.startsWith("steps(") && e.endsWith(")")) {
1410
1410
  const r = $r(e);
1411
- return (n) => r($(n));
1411
+ return (n) => r(B(n));
1412
1412
  }
1413
- return (r) => $(r);
1413
+ return (r) => B(r);
1414
1414
  }
1415
1415
  function Kr(t) {
1416
1416
  if (!t)
@@ -1467,7 +1467,7 @@ class Yr {
1467
1467
  const r = e.source?.trim();
1468
1468
  if (!r)
1469
1469
  return;
1470
- const n = Qe(e.min) ?? 0, o = Qe(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = Vr(e.ease), f = Kr(e.map), d = e.targetId?.trim() || void 0;
1470
+ const n = Qe(e.min) ?? 0, o = Qe(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = Vr(e.ease), f = Kr(e.map), u = e.targetId?.trim() || void 0;
1471
1471
  return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
1472
1472
  source: r.toLowerCase(),
1473
1473
  min: n,
@@ -1476,7 +1476,7 @@ class Yr {
1476
1476
  reverse: a,
1477
1477
  ease: c,
1478
1478
  map: f,
1479
- targetId: d
1479
+ targetId: u
1480
1480
  };
1481
1481
  }
1482
1482
  ensureObserver() {
@@ -1577,8 +1577,8 @@ class Yr {
1577
1577
  r.reverse && (i = 1 - i);
1578
1578
  const a = r.ease(i), c = Number.isFinite(a) ? a : 0, f = c * 100;
1579
1579
  if (e.style.setProperty("--tw-motion-bind-source-value", `${n}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${c}`), e.style.setProperty("--tw-motion-bind-progress", `${f}`), r.map) {
1580
- const d = this.applyMap(f, r.map);
1581
- d !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${d}`);
1580
+ const u = this.applyMap(f, r.map);
1581
+ u !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${u}`);
1582
1582
  } else
1583
1583
  e.style.removeProperty("--tw-motion-bind-value");
1584
1584
  }
@@ -1593,7 +1593,7 @@ class Yr {
1593
1593
  case "unclamped":
1594
1594
  return e;
1595
1595
  default:
1596
- return $(e);
1596
+ return B(e);
1597
1597
  }
1598
1598
  }
1599
1599
  applyMap(e, r) {
@@ -1682,7 +1682,7 @@ class Yr {
1682
1682
  }
1683
1683
  const Ee = new Yr();
1684
1684
  function Wr(t) {
1685
- const e = A(/* @__PURE__ */ new Map()), r = x(({ styleId: s, css: i, common: a }) => {
1685
+ const e = A(/* @__PURE__ */ new Map()), r = F(({ styleId: s, css: i, common: a }) => {
1686
1686
  if (!(!s || typeof document > "u")) {
1687
1687
  if (i) {
1688
1688
  let c = e.current.get(s);
@@ -1690,13 +1690,13 @@ function Wr(t) {
1690
1690
  }
1691
1691
  Ee.registerStyle(s, a);
1692
1692
  }
1693
- }, []), n = x((s) => {
1693
+ }, []), n = F((s) => {
1694
1694
  if (!(typeof document > "u"))
1695
1695
  for (const i of s) {
1696
1696
  const a = e.current.get(i);
1697
1697
  a && (a.remove(), e.current.delete(i)), Ee.unregisterStyle(i);
1698
1698
  }
1699
- }, []), o = x(() => {
1699
+ }, []), o = F(() => {
1700
1700
  if (typeof document < "u") {
1701
1701
  for (const s of e.current.values())
1702
1702
  s.remove();
@@ -1704,7 +1704,7 @@ function Wr(t) {
1704
1704
  }
1705
1705
  Ee.reset();
1706
1706
  }, []);
1707
- return M(() => {
1707
+ return D(() => {
1708
1708
  if (!t) return;
1709
1709
  for (const a of t.getUiStyles())
1710
1710
  r(a);
@@ -1712,7 +1712,7 @@ function Wr(t) {
1712
1712
  return () => {
1713
1713
  s?.(), i?.(), o();
1714
1714
  };
1715
- }, [t, o, r, n]), M(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1715
+ }, [t, o, r, n]), D(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1716
1716
  }
1717
1717
  function zr(t) {
1718
1718
  const e = [];
@@ -1723,8 +1723,8 @@ function zr(t) {
1723
1723
  return e.sort(), e.join(",");
1724
1724
  }
1725
1725
  function qr(t) {
1726
- const [e, r] = W(), n = A("");
1727
- return M(() => {
1726
+ const [e, r] = H(), n = A("");
1727
+ return D(() => {
1728
1728
  if (!t) {
1729
1729
  r(void 0), n.current = "";
1730
1730
  return;
@@ -1736,22 +1736,22 @@ function qr(t) {
1736
1736
  return o(), t.subscribe(o);
1737
1737
  }, [t]), e;
1738
1738
  }
1739
- var Gr = typeof global == "object" && global && global.Object === Object && global, Hr = typeof self == "object" && self && self.Object === Object && self, Jr = Gr || Hr || Function("return this")(), me = Jr.Symbol, ht = Object.prototype, Xr = ht.hasOwnProperty, Zr = ht.toString, ae = me ? me.toStringTag : void 0;
1739
+ var Gr = typeof global == "object" && global && global.Object === Object && global, Hr = typeof self == "object" && self && self.Object === Object && self, Jr = Gr || Hr || Function("return this")(), he = Jr.Symbol, ht = Object.prototype, Xr = ht.hasOwnProperty, Zr = ht.toString, ne = he ? he.toStringTag : void 0;
1740
1740
  function Qr(t) {
1741
- var e = Xr.call(t, ae), r = t[ae];
1741
+ var e = Xr.call(t, ne), r = t[ne];
1742
1742
  try {
1743
- t[ae] = void 0;
1743
+ t[ne] = void 0;
1744
1744
  var n = !0;
1745
1745
  } catch {
1746
1746
  }
1747
1747
  var o = Zr.call(t);
1748
- return n && (e ? t[ae] = r : delete t[ae]), o;
1748
+ return n && (e ? t[ne] = r : delete t[ne]), o;
1749
1749
  }
1750
1750
  var en = Object.prototype, tn = en.toString;
1751
1751
  function rn(t) {
1752
1752
  return tn.call(t);
1753
1753
  }
1754
- var nn = "[object Null]", on = "[object Undefined]", rt = me ? me.toStringTag : void 0;
1754
+ var nn = "[object Null]", on = "[object Undefined]", rt = he ? he.toStringTag : void 0;
1755
1755
  function sn(t) {
1756
1756
  return t == null ? t === void 0 ? on : nn : rt && rt in Object(t) ? Qr(t) : rn(t);
1757
1757
  }
@@ -1822,17 +1822,17 @@ function ho(t) {
1822
1822
  }
1823
1823
  if (!je(c))
1824
1824
  continue;
1825
- const f = c, d = Object.keys(f).find((S) => S.toLowerCase() === "name");
1826
- if (!d)
1825
+ const f = c, u = Object.keys(f).find((S) => S.toLowerCase() === "name");
1826
+ if (!u)
1827
1827
  continue;
1828
- const h = f[d];
1828
+ const h = f[u];
1829
1829
  if (typeof h != "string")
1830
1830
  continue;
1831
- const u = h.trim();
1832
- if (!u)
1831
+ const d = h.trim();
1832
+ if (!d)
1833
1833
  continue;
1834
- const g = Object.keys(f).find((S) => S.toLowerCase() === "javascript"), y = g ? f[g] : void 0;
1835
- typeof y == "string" && s.set(u, y), i.has(u) || (o.push(u), i.add(u));
1834
+ const p = Object.keys(f).find((S) => S.toLowerCase() === "javascript"), y = p ? f[p] : void 0;
1835
+ typeof y == "string" && s.set(d, y), i.has(d) || (o.push(d), i.add(d));
1836
1836
  }
1837
1837
  if (!o.length && s.size === 0)
1838
1838
  return { modules: [] };
@@ -1898,11 +1898,11 @@ const v = {
1898
1898
  "[data-emoji]"
1899
1899
  ]
1900
1900
  }
1901
- ], Le = v.Letter | v.Word | v.Line | v.Paragraph | v.Emoji, mn = v.Letter | v.Word | v.Line | v.Paragraph, ot = /* @__PURE__ */ new Map(), pn = 16384;
1901
+ ], Me = v.Letter | v.Word | v.Line | v.Paragraph | v.Emoji, mn = v.Letter | v.Word | v.Line | v.Paragraph, ot = /* @__PURE__ */ new Map(), pn = 16384;
1902
1902
  function mo(t, e) {
1903
1903
  if (!t || t.length > pn)
1904
1904
  return t;
1905
- const r = Pn(e), n = ne(r, v.Emoji), o = r & mn;
1905
+ const r = Pn(e), n = Q(r, v.Emoji), o = r & mn;
1906
1906
  if (o === v.None && !n)
1907
1907
  return t;
1908
1908
  const s = t.replace(/\r\n/g, `
@@ -1914,8 +1914,8 @@ function mo(t, e) {
1914
1914
  if (i.length === 0)
1915
1915
  return n ? ct(s) : t;
1916
1916
  const a = Nn(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
1917
- for (const d of a) {
1918
- const h = gn(d, r, c);
1917
+ for (const u of a) {
1918
+ const h = gn(u, r, c);
1919
1919
  f.push(...h);
1920
1920
  }
1921
1921
  return f;
@@ -1926,14 +1926,14 @@ function gn(t, e, r) {
1926
1926
  const s = yn(o, e, r);
1927
1927
  n.push(...s);
1928
1928
  }
1929
- if (ne(e, v.Paragraph)) {
1929
+ if (Q(e, v.Paragraph)) {
1930
1930
  const o = r.paragraph++;
1931
1931
  return [
1932
1932
  /* @__PURE__ */ R.jsx(
1933
1933
  "span",
1934
1934
  {
1935
1935
  "data-motion-paragraph": !0,
1936
- style: ye(o),
1936
+ style: ge(o),
1937
1937
  children: n
1938
1938
  },
1939
1939
  `motion-paragraph-${o}`
@@ -1944,10 +1944,10 @@ function gn(t, e, r) {
1944
1944
  }
1945
1945
  function yn(t, e, r) {
1946
1946
  const n = Sn(t.text, e, r), o = [];
1947
- if (ne(e, v.Line)) {
1947
+ if (Q(e, v.Line)) {
1948
1948
  const s = r.line++;
1949
1949
  o.push(
1950
- /* @__PURE__ */ R.jsx("span", { "data-motion-line": !0, style: ye(s), children: n }, `motion-line-${s}`)
1950
+ /* @__PURE__ */ R.jsx("span", { "data-motion-line": !0, style: ge(s), children: n }, `motion-line-${s}`)
1951
1951
  );
1952
1952
  } else
1953
1953
  o.push(...n);
@@ -1958,7 +1958,7 @@ function yn(t, e, r) {
1958
1958
  function Sn(t, e, r) {
1959
1959
  if (!t)
1960
1960
  return [];
1961
- const n = ne(e, v.Word), o = [], s = /(\s+)/g;
1961
+ const n = Q(e, v.Word), o = [], s = /(\s+)/g;
1962
1962
  let i = 0, a;
1963
1963
  for (; (a = s.exec(t)) !== null; ) {
1964
1964
  if (a.index > i) {
@@ -1978,47 +1978,47 @@ function st(t, e, r, n) {
1978
1978
  return n ? /* @__PURE__ */ R.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ R.jsx("span", { style: a, children: s }, i);
1979
1979
  }
1980
1980
  function bn(t, e) {
1981
- return e ? { ...ye(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1981
+ return e ? { ...ge(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1982
1982
  }
1983
1983
  function wn(t, e, r) {
1984
1984
  if (!t)
1985
1985
  return [];
1986
- const n = ne(e, v.Letter), o = ne(e, v.Emoji);
1986
+ const n = Q(e, v.Letter), o = Q(e, v.Emoji);
1987
1987
  if (!n) {
1988
1988
  if (!o)
1989
1989
  return [t];
1990
- const a = Me(t);
1990
+ const a = Le(t);
1991
1991
  if (a.length === 0)
1992
1992
  return [t];
1993
1993
  const { nodes: c } = pt(a, r);
1994
1994
  return c;
1995
1995
  }
1996
- const s = [], i = Me(t);
1996
+ const s = [], i = Le(t);
1997
1997
  for (const a of i) {
1998
- const c = r.letter++, f = `motion-letter-${c}`, d = ye(c);
1998
+ const c = r.letter++, f = `motion-letter-${c}`, u = ge(c);
1999
1999
  if (a === `
2000
2000
  `) {
2001
2001
  s.push(
2002
- /* @__PURE__ */ R.jsx("span", { "data-motion-letter": !0, style: d, children: /* @__PURE__ */ R.jsx("br", {}) }, f)
2002
+ /* @__PURE__ */ R.jsx("span", { "data-motion-letter": !0, style: u, children: /* @__PURE__ */ R.jsx("br", {}) }, f)
2003
2003
  );
2004
2004
  continue;
2005
2005
  }
2006
- const u = o && mt(a) ? { "data-motion-emoji": !0 } : void 0, g = a === " " ? " " : a;
2006
+ const d = o && mt(a) ? { "data-motion-emoji": !0 } : void 0, p = a === " " ? " " : a;
2007
2007
  s.push(
2008
- /* @__PURE__ */ R.jsx("span", { "data-motion-letter": !0, style: d, ...u, children: g }, f)
2008
+ /* @__PURE__ */ R.jsx("span", { "data-motion-letter": !0, style: u, ...d, children: p }, f)
2009
2009
  );
2010
2010
  }
2011
2011
  return s;
2012
2012
  }
2013
- function Me(t) {
2013
+ function Le(t) {
2014
2014
  if (!t)
2015
2015
  return [];
2016
2016
  const e = vn();
2017
2017
  return e ? Array.from(e.segment(t), (r) => r.segment) : Rn(t);
2018
2018
  }
2019
- let ce;
2019
+ let oe;
2020
2020
  function vn() {
2021
- return ce !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? ce = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : ce = null), ce;
2021
+ return oe !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? oe = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : oe = null), oe;
2022
2022
  }
2023
2023
  function Rn(t) {
2024
2024
  const e = [], r = Array.from(t);
@@ -2107,10 +2107,10 @@ function Nn(t) {
2107
2107
  r.push(n), n.breaks >= 2 && (e.push(r), r = []);
2108
2108
  return r.length > 0 && e.push(r), e;
2109
2109
  }
2110
- function ne(t, e) {
2110
+ function Q(t, e) {
2111
2111
  return (t & e) === e;
2112
2112
  }
2113
- function ye(t) {
2113
+ function ge(t) {
2114
2114
  return {
2115
2115
  "--tw-motion-seq-index": t.toString(),
2116
2116
  backgroundColor: "inherit",
@@ -2130,7 +2130,7 @@ function ye(t) {
2130
2130
  function ct(t) {
2131
2131
  if (!t)
2132
2132
  return t;
2133
- const e = Me(t);
2133
+ const e = Le(t);
2134
2134
  if (e.length === 0)
2135
2135
  return t;
2136
2136
  const { nodes: r, sawEmoji: n } = pt(e);
@@ -2170,7 +2170,7 @@ function Pn(t) {
2170
2170
  if (n.length === 0)
2171
2171
  return v.None;
2172
2172
  const s = n.map((c) => `.${jn(c)}`).map(
2173
- (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${Ln(c)}(?![a-zA-Z0-9_-])`)
2173
+ (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${Mn(c)}(?![a-zA-Z0-9_-])`)
2174
2174
  );
2175
2175
  let i = v.None, a = !1;
2176
2176
  for (const c of Array.from(document.styleSheets)) {
@@ -2180,10 +2180,10 @@ function Pn(t) {
2180
2180
  } catch {
2181
2181
  continue;
2182
2182
  }
2183
- const d = gt(f, s);
2184
- if (d.mask && (i |= d.mask, i === Le))
2183
+ const u = gt(f, s);
2184
+ if (u.mask && (i |= u.mask, i === Me))
2185
2185
  break;
2186
- a ||= d.sawStyleRule;
2186
+ a ||= u.sawStyleRule;
2187
2187
  }
2188
2188
  return (i !== v.None || a) && ot.set(e, i), i;
2189
2189
  }
@@ -2199,12 +2199,12 @@ function gt(t, e) {
2199
2199
  if (!a || !e.some((f) => f.test(a))) continue;
2200
2200
  n = !0;
2201
2201
  for (const f of hn)
2202
- f.hints.some((d) => a.includes(d)) && (r |= f.flag);
2203
- if (r === Le)
2202
+ f.hints.some((u) => a.includes(u)) && (r |= f.flag);
2203
+ if (r === Me)
2204
2204
  return { mask: r, sawStyleRule: !0 };
2205
2205
  } else if ("cssRules" in s) {
2206
2206
  const i = gt(s.cssRules, e);
2207
- if (i.mask && (r |= i.mask, r === Le))
2207
+ if (i.mask && (r |= i.mask, r === Me))
2208
2208
  return { mask: r, sawStyleRule: !0 };
2209
2209
  n ||= i.sawStyleRule;
2210
2210
  }
@@ -2215,11 +2215,11 @@ function gt(t, e) {
2215
2215
  function jn(t) {
2216
2216
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
2217
2217
  }
2218
- function Ln(t) {
2218
+ function Mn(t) {
2219
2219
  return t.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
2220
2220
  }
2221
- const Be = "ikon_auth_session", Mn = 7 * 24 * 60 * 60 * 1e3;
2222
- function Se(t) {
2221
+ const Be = "ikon_auth_session", Ln = 7 * 24 * 60 * 60 * 1e3;
2222
+ function ye(t) {
2223
2223
  try {
2224
2224
  localStorage.setItem(Be, JSON.stringify(t));
2225
2225
  } catch {
@@ -2231,7 +2231,7 @@ function yt() {
2231
2231
  const t = localStorage.getItem(Be);
2232
2232
  if (!t) return null;
2233
2233
  const e = JSON.parse(t);
2234
- return Date.now() - e.authenticatedAt > Mn ? (St(), null) : e;
2234
+ return Date.now() - e.authenticatedAt > Ln ? (St(), null) : e;
2235
2235
  } catch {
2236
2236
  return console.warn("Failed to load auth session from localStorage"), null;
2237
2237
  }
@@ -2243,7 +2243,7 @@ function St() {
2243
2243
  console.warn("Failed to clear auth session from localStorage");
2244
2244
  }
2245
2245
  }
2246
- function ue(t) {
2246
+ function se(t) {
2247
2247
  return {
2248
2248
  id: "",
2249
2249
  provider: t.provider,
@@ -2266,7 +2266,7 @@ async function bt(t, e) {
2266
2266
  provider: "anonymous",
2267
2267
  authenticatedAt: Date.now()
2268
2268
  };
2269
- return Se(s), s;
2269
+ return ye(s), s;
2270
2270
  }
2271
2271
  async function po(t) {
2272
2272
  const { email: e, spaceId: r, authUrl: n, returnUrl: o = window.location.origin + window.location.pathname } = t, s = await fetch(`${n}/email/send`, {
@@ -2324,7 +2324,7 @@ async function Bn(t, e, r) {
2324
2324
  provider: "passkey",
2325
2325
  authenticatedAt: Date.now()
2326
2326
  };
2327
- return Se(s), s;
2327
+ return ye(s), s;
2328
2328
  }
2329
2329
  async function $n(t, e) {
2330
2330
  const r = await fetch(`${t}/passkey/authentication/options`, {
@@ -2353,16 +2353,16 @@ async function Vn(t, e) {
2353
2353
  provider: "passkey",
2354
2354
  authenticatedAt: Date.now()
2355
2355
  };
2356
- return Se(o), o;
2356
+ return ye(o), o;
2357
2357
  }
2358
- function q(t) {
2358
+ function W(t) {
2359
2359
  const e = new Uint8Array(t);
2360
2360
  let r = "";
2361
2361
  for (const o of e)
2362
2362
  r += String.fromCharCode(o);
2363
2363
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2364
2364
  }
2365
- function pe(t) {
2365
+ function me(t) {
2366
2366
  const e = t.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - e.length % 4) % 4, n = e.padEnd(e.length + r, "="), o = atob(n), s = new ArrayBuffer(o.length), i = new Uint8Array(s);
2367
2367
  for (let a = 0; a < o.length; a++)
2368
2368
  i[a] = o.charCodeAt(a);
@@ -2378,7 +2378,7 @@ function wt(t) {
2378
2378
  const { id: e } = t;
2379
2379
  return {
2380
2380
  ...t,
2381
- id: pe(e),
2381
+ id: me(e),
2382
2382
  /**
2383
2383
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
2384
2384
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -2525,10 +2525,10 @@ async function qn(t) {
2525
2525
  throw new Error("WebAuthn is not supported in this browser");
2526
2526
  const n = {
2527
2527
  ...e,
2528
- challenge: pe(e.challenge),
2528
+ challenge: me(e.challenge),
2529
2529
  user: {
2530
2530
  ...e.user,
2531
- id: pe(e.user.id)
2531
+ id: me(e.user.id)
2532
2532
  },
2533
2533
  excludeCredentials: e.excludeCredentials?.map(wt)
2534
2534
  }, o = {};
@@ -2542,8 +2542,8 @@ async function qn(t) {
2542
2542
  if (!s)
2543
2543
  throw new Error("Registration was not completed");
2544
2544
  const { id: i, rawId: a, response: c, type: f } = s;
2545
- let d;
2546
- typeof c.getTransports == "function" && (d = c.getTransports());
2545
+ let u;
2546
+ typeof c.getTransports == "function" && (u = c.getTransports());
2547
2547
  let h;
2548
2548
  if (typeof c.getPublicKeyAlgorithm == "function")
2549
2549
  try {
@@ -2551,31 +2551,31 @@ async function qn(t) {
2551
2551
  } catch (y) {
2552
2552
  ke("getPublicKeyAlgorithm()", y);
2553
2553
  }
2554
- let u;
2554
+ let d;
2555
2555
  if (typeof c.getPublicKey == "function")
2556
2556
  try {
2557
2557
  const y = c.getPublicKey();
2558
- y !== null && (u = q(y));
2558
+ y !== null && (d = W(y));
2559
2559
  } catch (y) {
2560
2560
  ke("getPublicKey()", y);
2561
2561
  }
2562
- let g;
2562
+ let p;
2563
2563
  if (typeof c.getAuthenticatorData == "function")
2564
2564
  try {
2565
- g = q(c.getAuthenticatorData());
2565
+ p = W(c.getAuthenticatorData());
2566
2566
  } catch (y) {
2567
2567
  ke("getAuthenticatorData()", y);
2568
2568
  }
2569
2569
  return {
2570
2570
  id: i,
2571
- rawId: q(a),
2571
+ rawId: W(a),
2572
2572
  response: {
2573
- attestationObject: q(c.attestationObject),
2574
- clientDataJSON: q(c.clientDataJSON),
2575
- transports: d,
2573
+ attestationObject: W(c.attestationObject),
2574
+ clientDataJSON: W(c.clientDataJSON),
2575
+ transports: u,
2576
2576
  publicKeyAlgorithm: h,
2577
- publicKey: u,
2578
- authenticatorData: g
2577
+ publicKey: d,
2578
+ authenticatorData: p
2579
2579
  },
2580
2580
  type: f,
2581
2581
  clientExtensionResults: s.getClientExtensionResults(),
@@ -2645,7 +2645,7 @@ async function Jn(t) {
2645
2645
  e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(wt));
2646
2646
  const s = {
2647
2647
  ...e,
2648
- challenge: pe(e.challenge),
2648
+ challenge: me(e.challenge),
2649
2649
  allowCredentials: o
2650
2650
  }, i = {};
2651
2651
  if (r) {
@@ -2659,21 +2659,21 @@ async function Jn(t) {
2659
2659
  let a;
2660
2660
  try {
2661
2661
  a = await navigator.credentials.get(i);
2662
- } catch (g) {
2663
- throw Hn({ error: g, options: i });
2662
+ } catch (p) {
2663
+ throw Hn({ error: p, options: i });
2664
2664
  }
2665
2665
  if (!a)
2666
2666
  throw new Error("Authentication was not completed");
2667
- const { id: c, rawId: f, response: d, type: h } = a;
2668
- let u;
2669
- return d.userHandle && (u = q(d.userHandle)), {
2667
+ const { id: c, rawId: f, response: u, type: h } = a;
2668
+ let d;
2669
+ return u.userHandle && (d = W(u.userHandle)), {
2670
2670
  id: c,
2671
- rawId: q(f),
2671
+ rawId: W(f),
2672
2672
  response: {
2673
- authenticatorData: q(d.authenticatorData),
2674
- clientDataJSON: q(d.clientDataJSON),
2675
- signature: q(d.signature),
2676
- userHandle: u
2673
+ authenticatorData: W(u.authenticatorData),
2674
+ clientDataJSON: W(u.clientDataJSON),
2675
+ signature: W(u.signature),
2676
+ userHandle: d
2677
2677
  },
2678
2678
  type: h,
2679
2679
  clientExtensionResults: a.getClientExtensionResults(),
@@ -2682,45 +2682,45 @@ async function Jn(t) {
2682
2682
  }
2683
2683
  const Ve = lt(null);
2684
2684
  function go({ children: t, config: e }) {
2685
- const [r, n] = W({
2685
+ const [r, n] = H({
2686
2686
  isAuthenticated: !1,
2687
2687
  isLoading: !0,
2688
2688
  user: null,
2689
2689
  error: null
2690
2690
  });
2691
- M(() => {
2691
+ D(() => {
2692
2692
  (() => {
2693
- const d = xn();
2694
- if (d) {
2693
+ const u = xn();
2694
+ if (u) {
2695
2695
  ut(), n({
2696
2696
  isAuthenticated: !1,
2697
2697
  isLoading: !1,
2698
2698
  user: null,
2699
- error: d
2699
+ error: u
2700
2700
  });
2701
2701
  return;
2702
2702
  }
2703
2703
  const h = Un();
2704
2704
  if (h) {
2705
- const g = {
2705
+ const p = {
2706
2706
  token: h.token,
2707
2707
  provider: h.provider,
2708
2708
  authenticatedAt: Date.now()
2709
2709
  };
2710
- Se(g), ut(), n({
2710
+ ye(p), ut(), n({
2711
2711
  isAuthenticated: !0,
2712
2712
  isLoading: !1,
2713
- user: ue(g),
2713
+ user: se(p),
2714
2714
  error: null
2715
2715
  });
2716
2716
  return;
2717
2717
  }
2718
- const u = yt();
2719
- if (u) {
2718
+ const d = yt();
2719
+ if (d) {
2720
2720
  n({
2721
2721
  isAuthenticated: !0,
2722
2722
  isLoading: !1,
2723
- user: ue(u),
2723
+ user: se(d),
2724
2724
  error: null
2725
2725
  });
2726
2726
  return;
@@ -2733,87 +2733,87 @@ function go({ children: t, config: e }) {
2733
2733
  });
2734
2734
  })();
2735
2735
  }, []);
2736
- const o = x(
2736
+ const o = F(
2737
2737
  async (f) => {
2738
2738
  if (!e.spaceId) {
2739
- n((u) => ({
2740
- ...u,
2739
+ n((d) => ({
2740
+ ...d,
2741
2741
  error: "Space ID is not configured"
2742
2742
  }));
2743
2743
  return;
2744
2744
  }
2745
- const d = e.authUrl ?? Oe();
2745
+ const u = e.authUrl ?? Oe();
2746
2746
  if (f === "guest") {
2747
- n((u) => ({ ...u, isLoading: !0 }));
2747
+ n((d) => ({ ...d, isLoading: !0 }));
2748
2748
  try {
2749
- const u = await bt(e.spaceId, d);
2749
+ const d = await bt(e.spaceId, u);
2750
2750
  n({
2751
2751
  isAuthenticated: !0,
2752
2752
  isLoading: !1,
2753
- user: ue(u),
2753
+ user: se(d),
2754
2754
  error: null
2755
2755
  });
2756
- } catch (u) {
2757
- n((g) => ({
2758
- ...g,
2756
+ } catch (d) {
2757
+ n((p) => ({
2758
+ ...p,
2759
2759
  isLoading: !1,
2760
- error: u instanceof Error ? u.message : "Guest login failed"
2760
+ error: d instanceof Error ? d.message : "Guest login failed"
2761
2761
  }));
2762
2762
  }
2763
2763
  return;
2764
2764
  }
2765
2765
  if (f === "passkey") {
2766
- n((u) => ({ ...u, isLoading: !0, error: null }));
2766
+ n((d) => ({ ...d, isLoading: !0, error: null }));
2767
2767
  try {
2768
- const u = await $n(d), g = await Jn({ optionsJSON: u }), y = await Vn(d, g);
2768
+ const d = await $n(u), p = await Jn({ optionsJSON: d }), y = await Vn(u, p);
2769
2769
  n({
2770
2770
  isAuthenticated: !0,
2771
2771
  isLoading: !1,
2772
- user: ue(y),
2772
+ user: se(y),
2773
2773
  error: null
2774
2774
  });
2775
- } catch (u) {
2776
- n((g) => ({
2777
- ...g,
2775
+ } catch (d) {
2776
+ n((p) => ({
2777
+ ...p,
2778
2778
  isLoading: !1,
2779
- error: u instanceof Error ? u.message : "Passkey login failed"
2779
+ error: d instanceof Error ? d.message : "Passkey login failed"
2780
2780
  }));
2781
2781
  }
2782
2782
  return;
2783
2783
  }
2784
- const h = Dn(f, e.spaceId, d);
2784
+ const h = Dn(f, e.spaceId, u);
2785
2785
  window.location.href = h;
2786
2786
  },
2787
2787
  [e.authUrl, e.spaceId]
2788
- ), s = x(() => {
2788
+ ), s = F(() => {
2789
2789
  St(), n({
2790
2790
  isAuthenticated: !1,
2791
2791
  isLoading: !1,
2792
2792
  user: null,
2793
2793
  error: null
2794
2794
  });
2795
- }, []), i = x(
2795
+ }, []), i = F(
2796
2796
  async (f) => {
2797
- const d = e.authUrl ?? Oe();
2797
+ const u = e.authUrl ?? Oe();
2798
2798
  n((h) => ({ ...h, isLoading: !0, error: null }));
2799
2799
  try {
2800
- const h = await Fn(d), u = await qn({ optionsJSON: h }), g = await Bn(d, u, f);
2800
+ const h = await Fn(u), d = await qn({ optionsJSON: h }), p = await Bn(u, d, f);
2801
2801
  n({
2802
2802
  isAuthenticated: !0,
2803
2803
  isLoading: !1,
2804
- user: ue(g),
2804
+ user: se(p),
2805
2805
  error: null
2806
2806
  });
2807
2807
  } catch (h) {
2808
- n((u) => ({
2809
- ...u,
2808
+ n((d) => ({
2809
+ ...d,
2810
2810
  isLoading: !1,
2811
2811
  error: h instanceof Error ? h.message : "Passkey registration failed"
2812
2812
  }));
2813
2813
  }
2814
2814
  },
2815
2815
  [e.authUrl]
2816
- ), a = x(() => r.user?.token ?? null, [r.user]), c = K(
2816
+ ), a = F(() => r.user?.token ?? null, [r.user]), c = V(
2817
2817
  () => ({
2818
2818
  state: r,
2819
2819
  login: o,
@@ -2836,7 +2836,7 @@ function yo() {
2836
2836
  }
2837
2837
  function So(t) {
2838
2838
  const { config: e, guestUrlParam: r } = t, { state: n, login: o } = Xn(), s = A(!1);
2839
- return M(() => {
2839
+ return D(() => {
2840
2840
  if (!r || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
2841
2841
  return;
2842
2842
  const i = new URLSearchParams(window.location.search), a = i.get(r);
@@ -2863,9 +2863,9 @@ function bo({
2863
2863
  renderIdle: a,
2864
2864
  renderConnecting: c,
2865
2865
  renderConnectingSlow: f,
2866
- renderConnected: d,
2866
+ renderConnected: u,
2867
2867
  renderOffline: h,
2868
- renderError: u
2868
+ renderError: d
2869
2869
  }) {
2870
2870
  switch (t) {
2871
2871
  case "idle":
@@ -2876,7 +2876,7 @@ function bo({
2876
2876
  return f();
2877
2877
  case "connected":
2878
2878
  case "reconnecting":
2879
- return !r || !n || !o ? null : d({
2879
+ return !r || !n || !o ? null : u({
2880
2880
  stores: n,
2881
2881
  registry: o,
2882
2882
  client: s,
@@ -2886,12 +2886,12 @@ function bo({
2886
2886
  case "offline":
2887
2887
  return h();
2888
2888
  case "offlineError":
2889
- return u(e ?? s?.lastError?.message ?? null);
2889
+ return d(e ?? s?.lastError?.message ?? null);
2890
2890
  default:
2891
2891
  return null;
2892
2892
  }
2893
2893
  }
2894
- const Ie = ge("useIkonApp");
2894
+ const Ie = pe("useIkonApp");
2895
2895
  function Zn() {
2896
2896
  if (typeof window < "u" && window.__IKON_AUTH_CONFIG__)
2897
2897
  return window.__IKON_AUTH_CONFIG__;
@@ -2901,123 +2901,122 @@ function Qn() {
2901
2901
  return window.__IKON_LOCAL_IKON_SERVER_CONFIG__;
2902
2902
  }
2903
2903
  function wo(t) {
2904
- const { authConfig: e, modules: r, timeouts: n, backgroundAudio: o, webRtc: s } = t, i = e === void 0 ? Zn() ?? null : e, a = Qn(), c = A(null), f = A(null), d = A(null), h = A(!1), u = A(o), g = A(n), y = A(s);
2905
- u.current = o, g.current = n, y.current = s;
2906
- const [S, m] = W("idle"), [p, w] = W(null), [T, _] = W(null), [D, G] = W(null), [Z, C] = W(null), [P, U] = W(null), [O, F] = W(null), [Y, Q] = W(!1), B = K(() => {
2904
+ const { authConfig: e, modules: r, timeouts: n, backgroundAudio: o, webRtc: s } = t, i = e === void 0 ? Zn() ?? null : e, a = Qn(), c = A(null), f = A(null), u = A(null), h = A(!1), d = A(o), p = A(n), y = A(s);
2905
+ d.current = o, p.current = n, y.current = s;
2906
+ const [S, m] = H("idle"), [g, w] = H(null), [T, O] = H(null), [P, q] = H(null), [J, k] = H(!1), E = V(() => {
2907
2907
  try {
2908
- const E = Nt();
2909
- return (E.sessionId || E.channelKey) && Pt(), E;
2908
+ const I = Nt();
2909
+ return (I.sessionId || I.channelKey) && Pt(), I;
2910
2910
  } catch {
2911
2911
  return { parameters: {} };
2912
2912
  }
2913
- }, []), H = K(() => i?.enabled ? yt() : null, [i?.enabled]), X = a?.enabled ?? !1, ee = a?.host ?? "localhost", te = a?.port ?? 8443;
2914
- M(() => {
2915
- !X && Ke() && i && !i.enabled && i.spaceId && !O && !Y && (Q(!0), bt(i.spaceId, i.authUrl ?? Oe()).then((I) => {
2916
- F(I.token);
2917
- }).catch((I) => {
2918
- Ie.error("Anonymous auth failed:", I), w(I instanceof Error ? I.message : "Anonymous auth failed");
2913
+ }, []), _ = V(() => i?.enabled ? yt() : null, [i?.enabled]), N = a?.enabled ?? !1, M = a?.host ?? "localhost", $ = a?.port ?? 8443;
2914
+ D(() => {
2915
+ !N && Ke() && i && !i.enabled && i.spaceId && !P && !J && (k(!0), bt(i.spaceId, i.authUrl ?? Oe()).then((L) => {
2916
+ q(L.token);
2917
+ }).catch((L) => {
2918
+ Ie.error("Anonymous auth failed:", L), w(L instanceof Error ? L.message : "Anonymous auth failed");
2919
2919
  }).finally(() => {
2920
- Q(!1);
2920
+ k(!1);
2921
2921
  }));
2922
- }, [X, i, O, Y]);
2923
- const l = K(() => {
2924
- if (X) {
2925
- const E = H?.token ? jt(H.token) ?? void 0 : void 0;
2922
+ }, [N, i, P, J]);
2923
+ const X = V(() => {
2924
+ if (N) {
2925
+ const I = _?.token ? jt(_.token) ?? void 0 : void 0;
2926
2926
  return {
2927
2927
  local: {
2928
- host: ee,
2929
- httpsPort: te,
2930
- userId: E,
2931
- token: H?.token ?? void 0,
2928
+ host: M,
2929
+ httpsPort: $,
2930
+ userId: I,
2931
+ token: _?.token ?? void 0,
2932
2932
  spaceId: i?.spaceId,
2933
- parameters: B.parameters
2933
+ parameters: E.parameters
2934
2934
  }
2935
2935
  };
2936
2936
  }
2937
- return H?.token && i?.spaceId ? {
2937
+ return _?.token && i?.spaceId ? {
2938
2938
  sessionToken: {
2939
- token: H.token,
2939
+ token: _.token,
2940
2940
  spaceId: i.spaceId,
2941
2941
  backendType: Ye(),
2942
- sessionId: B.sessionId,
2943
- channelKey: B.channelKey,
2944
- parameters: B.parameters
2942
+ sessionId: E.sessionId,
2943
+ channelKey: E.channelKey,
2944
+ parameters: E.parameters
2945
2945
  }
2946
- } : O && i?.spaceId ? {
2946
+ } : P && i?.spaceId ? {
2947
2947
  sessionToken: {
2948
- token: O,
2948
+ token: P,
2949
2949
  spaceId: i.spaceId,
2950
2950
  backendType: Ye(),
2951
- sessionId: B.sessionId,
2952
- channelKey: B.channelKey,
2953
- parameters: B.parameters
2951
+ sessionId: E.sessionId,
2952
+ channelKey: E.channelKey,
2953
+ parameters: E.parameters
2954
2954
  }
2955
2955
  } : Ke() ? null : {
2956
2956
  local: {
2957
- host: ee,
2958
- httpsPort: te,
2957
+ host: M,
2958
+ httpsPort: $,
2959
2959
  spaceId: i?.spaceId,
2960
- parameters: B.parameters
2960
+ parameters: E.parameters
2961
2961
  }
2962
2962
  };
2963
- }, [X, ee, te, H?.token, i?.spaceId, O, B.sessionId, B.channelKey, B.parameters]);
2963
+ }, [N, M, $, _?.token, i?.spaceId, P, E.sessionId, E.channelKey, E.parameters]);
2964
2964
  Wr(T);
2965
- const b = qr(T);
2966
- M(() => {
2965
+ const ae = qr(T);
2966
+ D(() => {
2967
2967
  if (!h.current) {
2968
- if (h.current = !0, d.current = xr(), r)
2969
- for (const E of r)
2970
- E(d.current);
2971
- d.current.loadRegisteredModules().catch((E) => {
2972
- Ie.error("Failed to load UI modules", E);
2968
+ if (h.current = !0, u.current = xr(), r)
2969
+ for (const I of r)
2970
+ I(u.current);
2971
+ u.current.loadRegisteredModules().catch((I) => {
2972
+ Ie.error("Failed to load UI modules", I);
2973
2973
  });
2974
2974
  }
2975
- }, []), M(() => {
2976
- if (!l) return;
2977
- const E = new Lt({
2978
- ...l,
2979
- timeouts: g.current,
2980
- audio: u.current ? { background: { allowOnDesktop: !0, allowOnMobile: !0 } } : void 0,
2975
+ }, []), D(() => {
2976
+ if (!X) return;
2977
+ const I = new Mt({
2978
+ ...X,
2979
+ timeouts: p.current,
2980
+ audio: d.current ? { background: { allowOnDesktop: !0, allowOnMobile: !0 } } : void 0,
2981
2981
  mediaSession: { title: document.title || void 0, artist: document.title || void 0 },
2982
2982
  webRtc: y.current ? { enabled: !0 } : void 0,
2983
- onConnectionStateChange: (V) => {
2984
- m(V), y.current && V === "connected" && (G(E.webRtcAudioStream), C(E.webRtcVideoStream), U(E.webRtcScreenStream));
2983
+ onConnectionStateChange: (l) => {
2984
+ m(l);
2985
2985
  },
2986
- onError: (V) => {
2987
- w(V.message);
2986
+ onError: (l) => {
2987
+ w(l.message);
2988
2988
  }
2989
2989
  });
2990
- c.current = E;
2991
- const I = new Zt({ client: E });
2992
- return f.current = I, _(I), E.connect().catch((V) => {
2993
- Ie.error("Connection failed:", V);
2990
+ c.current = I;
2991
+ const L = new Zt({ client: I });
2992
+ return f.current = L, O(L), I.connect().catch((l) => {
2993
+ Ie.error("Connection failed:", l);
2994
2994
  }), () => {
2995
- E.disconnect(), c.current = null, I.dispose(), f.current = null, G(null), C(null), U(null);
2995
+ I.disconnect(), c.current = null, L.dispose(), f.current = null;
2996
2996
  };
2997
- }, [l]);
2998
- const k = x((E, I) => {
2999
- const V = typeof I == "string" ? I : JSON.stringify(I ?? {});
3000
- c.current?.sendActionCall(E, V);
3001
- }, []), N = S === "connected" || S === "reconnecting";
2997
+ }, [X]);
2998
+ const ce = F((I, L) => {
2999
+ const l = typeof L == "string" ? L : JSON.stringify(L ?? {});
3000
+ c.current?.sendActionCall(I, l);
3001
+ }, []), ue = S === "connected" || S === "reconnecting";
3002
3002
  return {
3003
3003
  connectionState: S,
3004
- error: p,
3005
- stores: b,
3004
+ error: g,
3005
+ stores: ae,
3006
3006
  client: c.current,
3007
- registry: d.current,
3007
+ registry: u.current,
3008
3008
  clientRef: c,
3009
3009
  uiRef: f,
3010
- registryRef: d,
3011
- onAction: k,
3012
- isReady: N,
3013
- webRtcAudioStream: D,
3014
- webRtcVideoStream: Z,
3015
- webRtcScreenStream: P
3010
+ registryRef: u,
3011
+ onAction: ce,
3012
+ isReady: ue,
3013
+ webRtcVideoStreams: c.current?.webRtcVideoStreams ?? /* @__PURE__ */ new Map(),
3014
+ webRtcTrackMap: c.current?.webRtcTrackMap ?? /* @__PURE__ */ new Map()
3016
3015
  };
3017
3016
  }
3018
3017
  function vo(t) {
3019
3018
  const e = A(!1);
3020
- return x(() => {
3019
+ return F(() => {
3021
3020
  if (e.current) return;
3022
3021
  e.current = !0;
3023
3022
  const r = document.createElement("link");
@@ -3026,26 +3025,26 @@ function vo(t) {
3026
3025
  }
3027
3026
  let eo = 0;
3028
3027
  function Ro(t = 5, e = 5e3) {
3029
- const [r, n] = W([]), o = A(/* @__PURE__ */ new Map()), s = x((i) => {
3028
+ const [r, n] = H([]), o = A(/* @__PURE__ */ new Map()), s = F((i) => {
3030
3029
  const a = o.current.get(i);
3031
3030
  a && (clearTimeout(a), o.current.delete(i)), n((c) => c.filter((f) => f.id !== i));
3032
3031
  }, []);
3033
- return M(() => {
3034
- const i = o.current, a = Mt(
3032
+ return D(() => {
3033
+ const i = o.current, a = Lt(
3035
3034
  (c) => {
3036
3035
  if (!Ut())
3037
3036
  return;
3038
- const f = `toast-${++eo}`, d = c.level === We.ERROR ? "error" : "warn", h = {
3037
+ const f = `toast-${++eo}`, u = c.level === We.ERROR ? "error" : "warn", h = {
3039
3038
  id: f,
3040
- level: d,
3039
+ level: u,
3041
3040
  message: c.message,
3042
3041
  component: c.component
3043
3042
  };
3044
- n((g) => [...g, h].slice(-t));
3045
- const u = setTimeout(() => {
3043
+ n((p) => [...p, h].slice(-t));
3044
+ const d = setTimeout(() => {
3046
3045
  s(f);
3047
3046
  }, e);
3048
- i.set(f, u);
3047
+ i.set(f, d);
3049
3048
  },
3050
3049
  { minLevel: We.WARN }
3051
3050
  );
@@ -3077,11 +3076,11 @@ function Eo({
3077
3076
  defaultLanguage: r,
3078
3077
  detectLanguage: n = !1
3079
3078
  }) {
3080
- const o = Object.keys(e), s = no(o, n, r), i = e[s] ?? e.en, a = K(
3079
+ const o = Object.keys(e), s = no(o, n, r), i = e[s] ?? e.en, a = V(
3081
3080
  () => ({
3082
3081
  t: (c, f) => {
3083
- const d = i[c];
3084
- return to(d, f);
3082
+ const u = i[c];
3083
+ return to(u, f);
3085
3084
  },
3086
3085
  locale: s,
3087
3086
  translations: i
@@ -3127,7 +3126,7 @@ export {
3127
3126
  yt as loadAuthSession,
3128
3127
  ar as loadBaseModule,
3129
3128
  br as loadMediaModule,
3130
- Lr as loadShadertoyModule,
3129
+ Mr as loadShadertoyModule,
3131
3130
  dn as normalizeIkonUiModuleList,
3132
3131
  ho as parseIkonUiInitPayload,
3133
3132
  Un as parseOAuthCallback,
@@ -3136,12 +3135,12 @@ export {
3136
3135
  fo as readIkonUiModulesFromSources,
3137
3136
  cr as registerBaseModule,
3138
3137
  wr as registerMediaModule,
3139
- Mr as registerShadertoyModule,
3138
+ Lr as registerShadertoyModule,
3140
3139
  qt as renderChildren,
3141
3140
  mo as renderMotionLetters,
3142
- Se as saveAuthSession,
3141
+ ye as saveAuthSession,
3143
3142
  po as sendMagicLink,
3144
- ue as sessionToUser,
3143
+ se as sessionToUser,
3145
3144
  Xn as useAuth,
3146
3145
  So as useAuthGuard,
3147
3146
  yo as useAuthOptional,
@@ -3151,6 +3150,6 @@ export {
3151
3150
  qr as useIkonUiStores,
3152
3151
  vo as useLazyFont,
3153
3152
  Ro as useToasts,
3154
- J as useUiNode,
3153
+ z as useUiNode,
3155
3154
  co as useUiStore
3156
3155
  };