@ikonai/sdk-react-ui 0.0.11 → 0.0.12

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
- import { IkonUICore as Ne, UiStreamStore as we } from "@ikonai/sdk-ui";
2
- import { UiStreamStore as Lt } from "@ikonai/sdk-ui";
3
- import Oe, { useSyncExternalStore as Ae, Fragment as _e, useMemo as Me, memo as B, useEffect as G, useCallback as ae } from "react";
4
- import { createLogger as K } from "@ikonai/sdk";
5
- var z = { exports: {} }, j = {};
1
+ import { IkonUICore as Xe, UiStreamStore as He } from "@ikonai/sdk-ui";
2
+ import { UiStreamStore as zr } from "@ikonai/sdk-ui";
3
+ import Je, { useSyncExternalStore as Ke, Fragment as Ze, useMemo as Qe, memo as _, useRef as Le, useEffect as Y, useCallback as Se } from "react";
4
+ import { createLogger as ue } from "@ikonai/sdk";
5
+ var q = { exports: {} }, x = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -12,29 +12,29 @@ var z = { exports: {} }, j = {};
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- var ce;
16
- function je() {
17
- if (ce) return j;
18
- ce = 1;
19
- var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
20
- function t(r, s, i) {
21
- var a = null;
22
- if (i !== void 0 && (a = "" + i), s.key !== void 0 && (a = "" + s.key), "key" in s) {
23
- i = {};
24
- for (var c in s)
25
- c !== "key" && (i[c] = s[c]);
26
- } else i = s;
27
- return s = i.ref, {
28
- $$typeof: n,
29
- type: r,
30
- key: a,
31
- ref: s !== void 0 ? s : null,
32
- props: i
15
+ var be;
16
+ function et() {
17
+ if (be) return x;
18
+ be = 1;
19
+ var r = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
20
+ function t(n, o, s) {
21
+ var i = null;
22
+ if (s !== void 0 && (i = "" + s), o.key !== void 0 && (i = "" + o.key), "key" in o) {
23
+ s = {};
24
+ for (var c in o)
25
+ c !== "key" && (s[c] = o[c]);
26
+ } else s = o;
27
+ return o = s.ref, {
28
+ $$typeof: r,
29
+ type: n,
30
+ key: i,
31
+ ref: o !== void 0 ? o : null,
32
+ props: s
33
33
  };
34
34
  }
35
- return j.Fragment = e, j.jsx = t, j.jsxs = t, j;
35
+ return x.Fragment = e, x.jsx = t, x.jsxs = t, x;
36
36
  }
37
- var I = {};
37
+ var U = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -44,338 +44,340 @@ var I = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var le;
48
- function Ie() {
49
- return le || (le = 1, process.env.NODE_ENV !== "production" && function() {
50
- function n(o) {
51
- if (o == null) return null;
52
- if (typeof o == "function")
53
- return o.$$typeof === Te ? null : o.displayName || o.name || null;
54
- if (typeof o == "string") return o;
55
- switch (o) {
56
- case b:
47
+ var ve;
48
+ function tt() {
49
+ return ve || (ve = 1, process.env.NODE_ENV !== "production" && function() {
50
+ function r(a) {
51
+ if (a == null) return null;
52
+ if (typeof a == "function")
53
+ return a.$$typeof === qe ? null : a.displayName || a.name || null;
54
+ if (typeof a == "string") return a;
55
+ switch (a) {
56
+ case E:
57
57
  return "Fragment";
58
- case p:
58
+ case y:
59
59
  return "Profiler";
60
- case f:
60
+ case h:
61
61
  return "StrictMode";
62
- case A:
62
+ case M:
63
63
  return "Suspense";
64
- case L:
64
+ case W:
65
65
  return "SuspenseList";
66
- case Re:
66
+ case We:
67
67
  return "Activity";
68
68
  }
69
- if (typeof o == "object")
70
- switch (typeof o.tag == "number" && console.error(
69
+ if (typeof a == "object")
70
+ switch (typeof a.tag == "number" && console.error(
71
71
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
72
- ), o.$$typeof) {
73
- case _:
72
+ ), a.$$typeof) {
73
+ case A:
74
74
  return "Portal";
75
75
  case C:
76
- return (o.displayName || "Context") + ".Provider";
77
- case y:
78
- return (o._context.displayName || "Context") + ".Consumer";
76
+ return (a.displayName || "Context") + ".Provider";
77
+ case v:
78
+ return (a._context.displayName || "Context") + ".Consumer";
79
79
  case T:
80
- var u = o.render;
81
- return o = o.displayName, o || (o = u.displayName || u.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
82
- case Ee:
83
- return u = o.displayName || null, u !== null ? u : n(o.type) || "Memo";
84
- case ee:
85
- u = o._payload, o = o._init;
80
+ var f = a.render;
81
+ return a = a.displayName, a || (a = f.displayName || f.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
82
+ case De:
83
+ return f = a.displayName || null, f !== null ? f : r(a.type) || "Memo";
84
+ case de:
85
+ f = a._payload, a = a._init;
86
86
  try {
87
- return n(o(u));
87
+ return r(a(f));
88
88
  } catch {
89
89
  }
90
90
  }
91
91
  return null;
92
92
  }
93
- function e(o) {
94
- return "" + o;
93
+ function e(a) {
94
+ return "" + a;
95
95
  }
96
- function t(o) {
96
+ function t(a) {
97
97
  try {
98
- e(o);
99
- var u = !1;
98
+ e(a);
99
+ var f = !1;
100
100
  } catch {
101
- u = !0;
101
+ f = !0;
102
102
  }
103
- if (u) {
104
- u = console;
105
- var h = u.error, S = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
106
- return h.call(
107
- u,
103
+ if (f) {
104
+ f = console;
105
+ var b = f.error, w = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
106
+ return b.call(
107
+ f,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- S
110
- ), e(o);
109
+ w
110
+ ), e(a);
111
111
  }
112
112
  }
113
- function r(o) {
114
- if (o === b) return "<>";
115
- if (typeof o == "object" && o !== null && o.$$typeof === ee)
113
+ function n(a) {
114
+ if (a === E) return "<>";
115
+ if (typeof a == "object" && a !== null && a.$$typeof === de)
116
116
  return "<...>";
117
117
  try {
118
- var u = n(o);
119
- return u ? "<" + u + ">" : "<...>";
118
+ var f = r(a);
119
+ return f ? "<" + f + ">" : "<...>";
120
120
  } catch {
121
121
  return "<...>";
122
122
  }
123
123
  }
124
- function s() {
125
- var o = $.A;
126
- return o === null ? null : o.getOwner();
124
+ function o() {
125
+ var a = J.A;
126
+ return a === null ? null : a.getOwner();
127
127
  }
128
- function i() {
128
+ function s() {
129
129
  return Error("react-stack-top-frame");
130
130
  }
131
- function a(o) {
132
- if (te.call(o, "key")) {
133
- var u = Object.getOwnPropertyDescriptor(o, "key").get;
134
- if (u && u.isReactWarning) return !1;
131
+ function i(a) {
132
+ if (fe.call(a, "key")) {
133
+ var f = Object.getOwnPropertyDescriptor(a, "key").get;
134
+ if (f && f.isReactWarning) return !1;
135
135
  }
136
- return o.key !== void 0;
136
+ return a.key !== void 0;
137
137
  }
138
- function c(o, u) {
139
- function h() {
140
- re || (re = !0, console.error(
138
+ function c(a, f) {
139
+ function b() {
140
+ me || (me = !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
- u
142
+ f
143
143
  ));
144
144
  }
145
- h.isReactWarning = !0, Object.defineProperty(o, "key", {
146
- get: h,
145
+ b.isReactWarning = !0, Object.defineProperty(a, "key", {
146
+ get: b,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
150
  function l() {
151
- var o = n(this.type);
152
- return ne[o] || (ne[o] = !0, console.error(
151
+ var a = r(this.type);
152
+ return pe[a] || (pe[a] = !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
- )), o = this.props.ref, o !== void 0 ? o : null;
154
+ )), a = this.props.ref, a !== void 0 ? a : null;
155
155
  }
156
- function d(o, u, h, S, w, k, q, Y) {
157
- return h = k.ref, o = {
158
- $$typeof: O,
159
- type: o,
160
- key: u,
161
- props: k,
162
- _owner: w
163
- }, (h !== void 0 ? h : null) !== null ? Object.defineProperty(o, "ref", {
156
+ function u(a, f, b, w, O, j, Z, Q) {
157
+ return b = j.ref, a = {
158
+ $$typeof: k,
159
+ type: a,
160
+ key: f,
161
+ props: j,
162
+ _owner: O
163
+ }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(a, "ref", {
164
164
  enumerable: !1,
165
165
  get: l
166
- }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
166
+ }) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
169
169
  writable: !0,
170
170
  value: 0
171
- }), Object.defineProperty(o, "_debugInfo", {
171
+ }), Object.defineProperty(a, "_debugInfo", {
172
172
  configurable: !1,
173
173
  enumerable: !1,
174
174
  writable: !0,
175
175
  value: null
176
- }), Object.defineProperty(o, "_debugStack", {
176
+ }), Object.defineProperty(a, "_debugStack", {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: q
181
- }), Object.defineProperty(o, "_debugTask", {
180
+ value: Z
181
+ }), Object.defineProperty(a, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
- value: Y
186
- }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
185
+ value: Q
186
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
187
187
  }
188
- function m(o, u, h, S, w, k, q, Y) {
189
- var g = u.children;
190
- if (g !== void 0)
191
- if (S)
192
- if (Ce(g)) {
193
- for (S = 0; S < g.length; S++)
194
- E(g[S]);
195
- Object.freeze && Object.freeze(g);
188
+ function d(a, f, b, w, O, j, Z, Q) {
189
+ var R = f.children;
190
+ if (R !== void 0)
191
+ if (w)
192
+ if (Ye(R)) {
193
+ for (w = 0; w < R.length; w++)
194
+ m(R[w]);
195
+ Object.freeze && Object.freeze(R);
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 E(g);
201
- if (te.call(u, "key")) {
202
- g = n(o);
203
- var M = Object.keys(u).filter(function(ke) {
204
- return ke !== "key";
200
+ else m(R);
201
+ if (fe.call(f, "key")) {
202
+ R = r(a);
203
+ var I = Object.keys(f).filter(function(Ge) {
204
+ return Ge !== "key";
205
205
  });
206
- S = 0 < M.length ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}", ie[g + S] || (M = 0 < M.length ? "{" + M.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ w = 0 < I.length ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}", ye[R + w] || (I = 0 < I.length ? "{" + I.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
- S,
214
- g,
215
- M,
216
- g
217
- ), ie[g + S] = !0);
213
+ w,
214
+ R,
215
+ I,
216
+ R
217
+ ), ye[R + w] = !0);
218
218
  }
219
- if (g = null, h !== void 0 && (t(h), g = "" + h), a(u) && (t(u.key), g = "" + u.key), "key" in u) {
220
- h = {};
221
- for (var W in u)
222
- W !== "key" && (h[W] = u[W]);
223
- } else h = u;
224
- return g && c(
225
- h,
226
- typeof o == "function" ? o.displayName || o.name || "Unknown" : o
227
- ), d(
228
- o,
229
- g,
230
- k,
231
- w,
232
- s(),
233
- h,
234
- q,
235
- Y
219
+ if (R = null, b !== void 0 && (t(b), R = "" + b), i(f) && (t(f.key), R = "" + f.key), "key" in f) {
220
+ b = {};
221
+ for (var ee in f)
222
+ ee !== "key" && (b[ee] = f[ee]);
223
+ } else b = f;
224
+ return R && c(
225
+ b,
226
+ typeof a == "function" ? a.displayName || a.name || "Unknown" : a
227
+ ), u(
228
+ a,
229
+ R,
230
+ j,
231
+ O,
232
+ o(),
233
+ b,
234
+ Z,
235
+ Q
236
236
  );
237
237
  }
238
- function E(o) {
239
- typeof o == "object" && o !== null && o.$$typeof === O && o._store && (o._store.validated = 1);
238
+ function m(a) {
239
+ typeof a == "object" && a !== null && a.$$typeof === k && a._store && (a._store.validated = 1);
240
240
  }
241
- var R = Oe, O = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), C = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), Ee = Symbol.for("react.memo"), ee = Symbol.for("react.lazy"), Re = Symbol.for("react.activity"), Te = Symbol.for("react.client.reference"), $ = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, te = Object.prototype.hasOwnProperty, Ce = Array.isArray, D = console.createTask ? console.createTask : function() {
241
+ var g = Je, k = Symbol.for("react.transitional.element"), A = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), C = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), De = Symbol.for("react.memo"), de = Symbol.for("react.lazy"), We = Symbol.for("react.activity"), qe = Symbol.for("react.client.reference"), J = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, fe = Object.prototype.hasOwnProperty, Ye = Array.isArray, K = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- R = {
245
- "react-stack-bottom-frame": function(o) {
246
- return o();
244
+ g = {
245
+ "react-stack-bottom-frame": function(a) {
246
+ return a();
247
247
  }
248
248
  };
249
- var re, ne = {}, se = R["react-stack-bottom-frame"].bind(
250
- R,
251
- i
252
- )(), oe = D(r(i)), ie = {};
253
- I.Fragment = b, I.jsx = function(o, u, h, S, w) {
254
- var k = 1e4 > $.recentlyCreatedOwnerStacks++;
255
- return m(
256
- o,
257
- u,
258
- h,
249
+ var me, pe = {}, he = g["react-stack-bottom-frame"].bind(
250
+ g,
251
+ s
252
+ )(), ge = K(n(s)), ye = {};
253
+ U.Fragment = E, U.jsx = function(a, f, b, w, O) {
254
+ var j = 1e4 > J.recentlyCreatedOwnerStacks++;
255
+ return d(
256
+ a,
257
+ f,
258
+ b,
259
259
  !1,
260
- S,
261
260
  w,
262
- k ? Error("react-stack-top-frame") : se,
263
- k ? D(r(o)) : oe
261
+ O,
262
+ j ? Error("react-stack-top-frame") : he,
263
+ j ? K(n(a)) : ge
264
264
  );
265
- }, I.jsxs = function(o, u, h, S, w) {
266
- var k = 1e4 > $.recentlyCreatedOwnerStacks++;
267
- return m(
268
- o,
269
- u,
270
- h,
265
+ }, U.jsxs = function(a, f, b, w, O) {
266
+ var j = 1e4 > J.recentlyCreatedOwnerStacks++;
267
+ return d(
268
+ a,
269
+ f,
270
+ b,
271
271
  !0,
272
- S,
273
272
  w,
274
- k ? Error("react-stack-top-frame") : se,
275
- k ? D(r(o)) : oe
273
+ O,
274
+ j ? Error("react-stack-top-frame") : he,
275
+ j ? K(n(a)) : ge
276
276
  );
277
277
  };
278
- }()), I;
279
- }
280
- var ue;
281
- function Pe() {
282
- return ue || (ue = 1, process.env.NODE_ENV === "production" ? z.exports = je() : z.exports = Ie()), z.exports;
283
- }
284
- var N = Pe();
285
- function Ue(n) {
286
- return Ae(
287
- (e) => n.subscribe(e),
288
- () => n.getSnapshot(),
289
- () => n.getSnapshot()
278
+ }()), U;
279
+ }
280
+ var Ee;
281
+ function rt() {
282
+ return Ee || (Ee = 1, process.env.NODE_ENV === "production" ? q.exports = et() : q.exports = tt()), q.exports;
283
+ }
284
+ var S = rt();
285
+ function nt(r) {
286
+ return Ke(
287
+ (e) => r.subscribe(e),
288
+ () => r.getSnapshot(),
289
+ () => r.getSnapshot()
290
290
  );
291
291
  }
292
- const xe = K("UIRenderer");
293
- function Le(n) {
294
- if (n === void 0)
292
+ const ot = ue("UIRenderer");
293
+ function st(r) {
294
+ if (r === void 0)
295
295
  return "{}";
296
- if (typeof n == "string")
297
- return n;
296
+ if (typeof r == "string")
297
+ return r;
298
298
  try {
299
- return JSON.stringify(n);
299
+ return JSON.stringify(r);
300
300
  } catch {
301
301
  return "{}";
302
302
  }
303
303
  }
304
- function be(n) {
305
- const e = Fe(n), t = ze(n);
306
- return e === n.children && t === n.styleIds ? n : {
307
- ...n,
308
- ...e !== n.children ? { children: e } : {},
309
- ...t !== n.styleIds ? { styleIds: t } : {}
304
+ function xe(r) {
305
+ const e = at(r), t = it(r);
306
+ return e === r.children && t === r.styleIds ? r : {
307
+ ...r,
308
+ ...e !== r.children ? { children: e } : {},
309
+ ...t !== r.styleIds ? { styleIds: t } : {}
310
310
  };
311
311
  }
312
- function ze(n) {
313
- const e = n.styleIds;
312
+ function it(r) {
313
+ const e = r.styleIds;
314
314
  return Array.isArray(e) ? e : [];
315
315
  }
316
- function Fe(n) {
317
- const e = n.children;
316
+ function at(r) {
317
+ const e = r.children;
318
318
  return Array.isArray(e) ? e : [];
319
319
  }
320
- function Be({ node: n, renderer: e, library: t, context: r, className: s }) {
321
- const i = be(n), a = i.children.map((l) => U(l, t, r)), c = e;
322
- return /* @__PURE__ */ N.jsx(
320
+ function ct({ node: r, renderer: e, library: t, context: n, className: o }) {
321
+ const s = xe(r), i = s.children.map((l) => $(l, t, n)), c = e;
322
+ return /* @__PURE__ */ S.jsx(
323
323
  c,
324
324
  {
325
- node: i,
326
- context: r,
327
- children: a,
328
- className: s,
329
- styleIds: i.styleIds
325
+ node: s,
326
+ context: n,
327
+ children: i,
328
+ className: o,
329
+ styleIds: s.styleIds
330
330
  }
331
331
  );
332
332
  }
333
- function U(n, e, t) {
334
- const r = be(n), s = r.children;
335
- if (r.type === "root")
336
- return /* @__PURE__ */ N.jsx(_e, { children: s.map((l) => U(l, e, t)) }, r.id);
337
- const i = e.resolve(r);
338
- if (!i)
339
- return xe.warn(`No renderer for node type ${r.type}`), null;
340
- const a = r.styleIds, c = a.length > 0 ? a.join(" ") : void 0;
341
- return /* @__PURE__ */ N.jsx(
342
- Be,
333
+ function $(r, e, t) {
334
+ const n = xe(r), o = n.children;
335
+ if (n.type === "root")
336
+ return /* @__PURE__ */ S.jsx(Ze, { children: o.map((l) => $(l, e, t)) }, n.id);
337
+ const s = e.resolve(n);
338
+ if (!s)
339
+ return ot.warn(`No renderer for node type ${n.type}`), null;
340
+ const i = n.styleIds, c = i.length > 0 ? i.join(" ") : void 0;
341
+ return /* @__PURE__ */ S.jsx(
342
+ ct,
343
343
  {
344
- node: r,
345
- renderer: i,
344
+ node: n,
345
+ renderer: s,
346
346
  library: e,
347
347
  context: t,
348
348
  className: c
349
349
  },
350
- r.id
350
+ n.id
351
351
  );
352
352
  }
353
- function $e({ store: n, library: e, containerId: t, emptyFallback: r = null, onAction: s }) {
354
- const i = Ue(n), a = t ?? i.rootContainerId;
355
- if (!a) return r;
356
- const c = i.containers.get(a);
357
- if (!c) return r;
358
- const l = {
359
- getPayload: (d) => i.payloads.get(d),
360
- renderChildren: (d) => Array.isArray(d) ? d.map((m) => U(m, e, l)) : [],
361
- renderContainer: (d) => {
362
- const m = i.containers.get(d);
363
- return m ? U(m, e, l) : null;
353
+ function lt({ store: r, library: e, viewId: t, emptyFallback: n = null, onAction: o, client: s, video: i }) {
354
+ const c = nt(r), l = t ?? c.rootViewId;
355
+ if (!l) return n;
356
+ const u = c.views.get(l);
357
+ if (!u) return n;
358
+ const d = {
359
+ getPayload: (m) => c.payloads.get(m),
360
+ renderChildren: (m) => Array.isArray(m) ? m.map((g) => $(g, e, d)) : [],
361
+ renderView: (m) => {
362
+ const g = c.views.get(m);
363
+ return g ? $(g, e, d) : null;
364
364
  },
365
- dispatchAction: (d, m) => {
366
- if (!d)
365
+ dispatchAction: (m, g) => {
366
+ if (!m)
367
367
  return;
368
- const E = Le(m);
369
- s?.(d, E);
370
- }
368
+ const k = st(g);
369
+ o?.(m, k);
370
+ },
371
+ client: s,
372
+ video: i
371
373
  };
372
- return U(c, e, l);
374
+ return /* @__PURE__ */ S.jsx("div", { "data-ikon-view-id": l, style: { display: "contents" }, children: $(u, e, d) });
373
375
  }
374
- class De {
376
+ class ut {
375
377
  constructor(e, t) {
376
378
  if (this.fallback = t, e)
377
- for (const [r, s] of e)
378
- this.renderers.set(r, s);
379
+ for (const [n, o] of e)
380
+ this.renderers.set(n, o);
379
381
  }
380
382
  renderers = /* @__PURE__ */ new Map();
381
383
  register(e, t) {
@@ -388,40 +390,39 @@ class De {
388
390
  return this.renderers.get(e.type) ?? this.fallback;
389
391
  }
390
392
  }
391
- function wt(n, e) {
392
- const t = Object.entries(n);
393
- return new De(t, e);
393
+ function Cr(r, e) {
394
+ const t = Object.entries(r);
395
+ return new ut(t, e);
394
396
  }
395
- const H = "ikon-ui";
396
- function qe(n, e) {
397
- return n === e;
397
+ const se = "ikon-ui";
398
+ function dt(r, e) {
399
+ return r === e;
398
400
  }
399
- function Ot({ stores: n, library: e, category: t = H, version: r, onAction: s }) {
400
- const i = Me(() => {
401
- const a = [];
402
- for (const [c, l] of n) {
403
- if (!qe(l.category, t))
401
+ function jr({ stores: r, library: e, category: t = se, version: n, onAction: o, client: s, video: i }) {
402
+ const c = Qe(() => {
403
+ const l = [];
404
+ for (const [u, d] of r) {
405
+ if (!dt(d.category, t))
404
406
  continue;
405
- const d = l.store.getSnapshot();
406
- !d.rootContainerId || !d.containers.has(d.rootContainerId) || a.push({ key: c, store: l.store });
407
+ const m = d.store.getSnapshot();
408
+ !m.rootViewId || !m.views.has(m.rootViewId) || l.push({ key: u, store: d.store });
407
409
  }
408
- return a;
409
- }, [n, t, r]);
410
- return i.length === 0 ? null : /* @__PURE__ */ N.jsx(N.Fragment, { children: i.map(({ key: a, store: c }) => /* @__PURE__ */ N.jsx($e, { store: c, library: e, onAction: s }, a)) });
410
+ return l;
411
+ }, [r, t, n]);
412
+ return c.length === 0 ? null : /* @__PURE__ */ S.jsx(S.Fragment, { children: c.map(({ key: l, store: u }) => /* @__PURE__ */ S.jsx(lt, { store: u, library: e, onAction: o, client: s, video: i }, l)) });
411
413
  }
412
- class At {
414
+ class Ar {
413
415
  core;
414
416
  ownsCore;
415
417
  stores = /* @__PURE__ */ new Map();
416
418
  listeners = /* @__PURE__ */ new Set();
417
- unsubscribeUpdates;
418
419
  unsubscribeClears;
419
420
  unsubscribeStoreChanges;
420
421
  constructor(e) {
421
- this.core = e?.core ?? new Ne({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeUpdates = this.core.subscribeToUiUpdates(this.handleUiUpdate), this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
422
+ this.core = e?.core ?? new Xe({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
422
423
  }
423
424
  dispose() {
424
- this.unsubscribeUpdates(), this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
425
+ this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
425
426
  }
426
427
  getStores() {
427
428
  return this.stores;
@@ -437,137 +438,133 @@ class At {
437
438
  subscribeToStyles(e) {
438
439
  return this.core.subscribeToUiStyles(e);
439
440
  }
440
- handleUiUpdate = (e, t) => {
441
- const s = this.ensureStoreEntry(e).store.apply(t), i = this.updateCategory(e);
442
- (s || i) && this.notify(e);
443
- };
444
441
  handleUiStreamCleared = (e) => {
445
442
  this.stores.delete(e) && this.notify(e);
446
443
  };
447
444
  syncStreamSnapshot = (e) => {
448
445
  const t = this.core.uiStore.getSnapshot(e);
449
- if (!t || !t.rootContainerId) {
446
+ if (!t || !t.rootViewId) {
450
447
  this.handleUiStreamCleared(e);
451
448
  return;
452
449
  }
453
- const r = t.containers.get(t.rootContainerId);
454
- if (!r) {
450
+ if (!t.views.get(t.rootViewId)) {
455
451
  this.handleUiStreamCleared(e);
456
452
  return;
457
453
  }
458
- const s = this.ensureStoreEntry(e), i = {
459
- snapshot: {
460
- type: "full",
461
- version: t.version ?? 0,
462
- metadata: { containerId: t.rootContainerId },
463
- root: r
464
- },
465
- payloads: t.payloads
466
- }, a = s.store.apply(i), c = this.updateCategory(e, t.category);
467
- (a || c) && this.notify(e);
454
+ const s = this.ensureStoreEntry(e).store.replaceSnapshot(t), i = this.updateCategory(e, t.category);
455
+ (s || i) && this.notify(e);
468
456
  };
469
457
  syncAllStreams() {
470
458
  const e = this.core.uiStore.getSnapshots(), t = /* @__PURE__ */ new Set();
471
- for (const r of e)
472
- this.syncStreamSnapshot(r.streamId), t.add(r.streamId);
473
- for (const r of this.stores.keys())
474
- t.has(r) || (this.stores.delete(r), this.notify(r));
459
+ for (const n of e)
460
+ this.syncStreamSnapshot(n.streamId), t.add(n.streamId);
461
+ for (const n of this.stores.keys())
462
+ t.has(n) || (this.stores.delete(n), this.notify(n));
475
463
  }
476
464
  ensureStoreEntry(e) {
477
465
  const t = this.stores.get(e);
478
466
  if (t)
479
467
  return t;
480
- const r = {
481
- category: H,
482
- store: new we()
468
+ const n = {
469
+ category: se,
470
+ store: new He()
483
471
  };
484
- return this.stores.set(e, r), r;
472
+ return this.stores.set(e, n), n;
485
473
  }
486
474
  updateCategory(e, t) {
487
- const r = this.stores.get(e);
488
- if (!r)
475
+ const n = this.stores.get(e);
476
+ if (!n)
489
477
  return !1;
490
- const s = t ?? this.core.uiStore.getSnapshot(e)?.category ?? H;
491
- return r.category === s ? !1 : (this.stores.set(e, { ...r, category: s }), !0);
478
+ const o = t ?? this.core.uiStore.getSnapshot(e)?.category ?? se;
479
+ return n.category === o ? !1 : (this.stores.set(e, { ...n, category: o }), !0);
492
480
  }
493
481
  notify(e) {
494
482
  for (const t of this.listeners)
495
483
  t(e);
496
484
  }
497
485
  }
498
- function x(n) {
499
- if (typeof n == "string") {
500
- const e = n.trim();
486
+ function L(r) {
487
+ if (typeof r == "string") {
488
+ const e = r.trim();
501
489
  return e.length > 0 ? e : void 0;
502
490
  }
503
- if (Array.isArray(n)) {
504
- const e = n.filter((t) => typeof t == "string").map((t) => t.trim()).filter(Boolean);
491
+ if (Array.isArray(r)) {
492
+ const e = r.filter((t) => typeof t == "string").map((t) => t.trim()).filter(Boolean);
505
493
  return e.length > 0 ? e.join(" ") : void 0;
506
494
  }
507
495
  }
508
- function Z(...n) {
496
+ function V(...r) {
509
497
  const e = [];
510
- for (const t of n)
498
+ for (const t of r)
511
499
  t && t.trim() && e.push(t.trim());
512
500
  return e.length > 0 ? e.join(" ") : void 0;
513
501
  }
514
- function Q(n) {
515
- if (!n)
502
+ function D(r) {
503
+ if (!r)
516
504
  return {};
517
505
  const e = {};
518
- for (const [t, r] of Object.entries(n))
519
- r != null && (typeof r == "string" || typeof r == "number" || typeof r == "boolean") && (e[t] = r);
506
+ for (const [t, n] of Object.entries(r))
507
+ n != null && (typeof n == "string" || typeof n == "number" || typeof n == "boolean") && (e[t] = n);
520
508
  return e;
521
509
  }
522
- function Ye() {
523
- const n = B(function({ node: t }) {
524
- const r = x(t.props?.targetElementId ?? t.props?.TargetElementId), s = x(t.props?.targetContainerId ?? t.props?.TargetContainerId), i = t.props?.focusOnly ?? t.props?.FocusOnly, a = typeof i == "boolean" ? i : void 0;
525
- return G(() => {
510
+ function ft() {
511
+ const r = _(function({ node: t }) {
512
+ const n = L(t.props?.targetViewId), o = t.props?.focusOnly, s = typeof o == "boolean" ? o : void 0, i = Le(null);
513
+ return Y(() => {
526
514
  if (typeof document > "u")
527
515
  return;
528
- const c = (r ? document.querySelector(`[data-ikon-element-id="${r}"]`) : null) ?? (r ? document.getElementById(r) : null);
529
- if (!c)
516
+ const l = i.current;
517
+ if (!l || n && l.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== n)
530
518
  return;
531
- const l = (s ? document.querySelector(`[data-ikon-container-id="${s}"]`) : null) ?? c.closest("[data-ikon-container-id]") ?? c.closest('[data-ikon-container-type="scroll-view"]') ?? c;
532
- if (l && l !== c && typeof l.scrollIntoView == "function")
519
+ const u = s !== !0;
520
+ if (u && typeof l.scrollIntoView == "function")
533
521
  try {
534
- l.scrollIntoView({ behavior: "smooth", block: "nearest" });
522
+ l.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
535
523
  } catch {
536
524
  l.scrollIntoView();
537
525
  }
538
- if (typeof c.focus == "function")
526
+ if (typeof l.focus == "function")
539
527
  try {
540
- c.focus({ preventScroll: a !== !1 });
528
+ l.focus({ preventScroll: !u });
541
529
  } catch {
542
- c.focus();
530
+ l.focus();
543
531
  }
544
- }, [a, s, r]), null;
532
+ }, [s, n]), /* @__PURE__ */ S.jsx(
533
+ "span",
534
+ {
535
+ ref: i,
536
+ "aria-hidden": "true",
537
+ "data-ikon-node-id": t.id,
538
+ "data-ikon-focus-hint": "true",
539
+ tabIndex: -1,
540
+ style: { display: "block", width: 0, height: 0, overflow: "hidden" }
541
+ }
542
+ );
545
543
  });
546
544
  return ({ type: e }) => {
547
545
  if (e === "common.focus-hint")
548
- return n;
546
+ return r;
549
547
  };
550
548
  }
551
- function We() {
552
- const n = B(function({ node: t, context: r, className: s }) {
553
- const i = Q(t.props), a = Z(x(t.props?.className), s), c = t.children?.length ? r.renderChildren(t.children) : void 0;
554
- return /* @__PURE__ */ N.jsx("div", { ...i, "data-ikon-element-id": t.id, className: a, children: c });
549
+ function mt() {
550
+ const r = _(function({ node: t, context: n, className: o }) {
551
+ const s = D(t.props), i = V(L(t.props?.className), o), c = t.children?.length ? n.renderChildren(t.children) : void 0;
552
+ return /* @__PURE__ */ S.jsx("div", { ...s, "data-ikon-node-id": t.id, className: i, children: c });
555
553
  });
556
554
  return ({ type: e }) => {
557
555
  if (e === "common.div")
558
- return n;
556
+ return r;
559
557
  };
560
558
  }
561
- function Ve() {
562
- const n = B(function({ node: t, context: r, className: s }) {
563
- const i = Q(t.props), a = Z(x(t.props?.className), s), c = t.children?.length ? r.renderChildren(t.children) : void 0;
564
- return /* @__PURE__ */ N.jsx(
559
+ function pt() {
560
+ const r = _(function({ node: t, context: n, className: o }) {
561
+ const s = D(t.props), i = V(L(t.props?.className), o), c = t.children?.length ? n.renderChildren(t.children) : void 0;
562
+ return /* @__PURE__ */ S.jsx(
565
563
  "form",
566
564
  {
567
- ...i,
568
- "data-ikon-element-id": t.id,
569
- "data-ikon-container-id": t.id,
570
- className: a,
565
+ ...s,
566
+ "data-ikon-node-id": t.id,
567
+ className: i,
571
568
  onSubmit: (l) => l.preventDefault(),
572
569
  children: c
573
570
  }
@@ -575,38 +572,169 @@ function Ve() {
575
572
  });
576
573
  return ({ type: e }) => {
577
574
  if (e === "common.form")
578
- return n;
575
+ return r;
579
576
  };
580
577
  }
581
- function Je() {
582
- const n = B(function({ node: t, context: r, className: s }) {
583
- const i = Q(t.props), a = Z(x(t.props?.className), s), c = t.children?.length ? r.renderChildren(t.children) : void 0;
584
- return /* @__PURE__ */ N.jsx(
578
+ function ht() {
579
+ const r = _(function({ node: t, context: n, className: o }) {
580
+ const s = D(t.props), i = V(L(t.props?.className), o), c = t.children?.length ? n.renderChildren(t.children) : void 0;
581
+ return /* @__PURE__ */ S.jsx(
585
582
  "div",
586
583
  {
587
- ...i,
588
- "data-ikon-element-id": t.id,
589
- "data-ikon-container-id": t.id,
590
- "data-ikon-container-type": "scroll-view",
591
- className: a,
584
+ ...s,
585
+ "data-ikon-node-id": t.id,
586
+ "data-ikon-view-type": "scroll-view",
587
+ "data-ikon-scroll-container": "true",
588
+ className: i,
592
589
  children: c
593
590
  }
594
591
  );
595
592
  });
596
593
  return ({ type: e }) => {
597
594
  if (e === "common.scroll-view")
598
- return n;
595
+ return r;
596
+ };
597
+ }
598
+ function gt() {
599
+ const r = _(function({ node: t, context: n, className: o }) {
600
+ const s = D(t.props), i = V("relative", L(t.props?.className), o), c = t.children?.length ? n.renderChildren(t.children) : void 0;
601
+ return /* @__PURE__ */ S.jsx("div", { ...s, "data-ikon-node-id": t.id, className: i, children: c });
602
+ });
603
+ return ({ type: e }) => {
604
+ if (e === "common.stack")
605
+ return r;
606
+ };
607
+ }
608
+ function yt() {
609
+ const r = _(function({ node: t, context: n, className: o }) {
610
+ const s = D(t.props), i = V("absolute", L(t.props?.className), o), c = t.children?.length ? n.renderChildren(t.children) : void 0;
611
+ return /* @__PURE__ */ S.jsx("div", { ...s, "data-ikon-node-id": t.id, className: i, children: c });
612
+ });
613
+ return ({ type: e }) => {
614
+ if (e === "common.layer")
615
+ return r;
599
616
  };
600
617
  }
601
- function Ge() {
602
- return [We(), Ve(), Je(), Ye()];
618
+ function St() {
619
+ return [
620
+ mt(),
621
+ pt(),
622
+ ht(),
623
+ gt(),
624
+ yt(),
625
+ ft()
626
+ ];
603
627
  }
604
- const He = "base", Xe = async () => Ge();
605
- function Ke(n) {
606
- n.registerModule(He, Xe);
628
+ const bt = "base", vt = async () => St();
629
+ function Et(r) {
630
+ r.registerModule(bt, vt);
607
631
  }
608
- const de = K("UIRegistry");
609
- class Ze {
632
+ function Ue(r) {
633
+ if (typeof r == "string") {
634
+ const e = r.trim();
635
+ return e.length > 0 ? e : void 0;
636
+ }
637
+ if (Array.isArray(r)) {
638
+ const e = r.filter((t) => typeof t == "string").map((t) => t.trim()).filter(Boolean);
639
+ return e.length > 0 ? e.join(" ") : void 0;
640
+ }
641
+ }
642
+ function ze(...r) {
643
+ const e = [];
644
+ for (const t of r)
645
+ t && t.trim() && e.push(t.trim());
646
+ return e.length > 0 ? e.join(" ") : void 0;
647
+ }
648
+ function G(r) {
649
+ if (typeof r == "number" && Number.isFinite(r))
650
+ return Math.floor(r);
651
+ if (typeof r == "string" && r.trim().length > 0) {
652
+ const e = Number(r);
653
+ if (Number.isFinite(e))
654
+ return Math.floor(e);
655
+ }
656
+ }
657
+ function ie(r) {
658
+ if (typeof r != "string")
659
+ return;
660
+ const e = r.trim();
661
+ return e.length > 0 ? e : void 0;
662
+ }
663
+ const wt = "media.video-canvas", Rt = "media.video-url-player";
664
+ function kt() {
665
+ const r = _(function({ node: t, context: n, className: o }) {
666
+ const s = ie(t.props?.streamId), i = G(t.props?.width), c = G(t.props?.height), l = ze(Ue(t.props?.className), o), u = Le(null), d = n.video;
667
+ return Y(() => {
668
+ const m = u.current;
669
+ if (!(!d || !m || !s))
670
+ return d.attachCanvas(s, m), () => {
671
+ d.detachCanvas(s);
672
+ };
673
+ }, [d, s]), /* @__PURE__ */ S.jsx(
674
+ "canvas",
675
+ {
676
+ ref: u,
677
+ "data-ikon-node-id": t.id,
678
+ "data-ikon-video-stream-id": s,
679
+ className: l,
680
+ ...i ? { width: i } : {},
681
+ ...c ? { height: c } : {}
682
+ }
683
+ );
684
+ });
685
+ return ({ type: e }) => {
686
+ if (e === wt)
687
+ return r;
688
+ };
689
+ }
690
+ function Nt() {
691
+ return [kt(), Tt()];
692
+ }
693
+ function z(r) {
694
+ if (typeof r == "boolean")
695
+ return r;
696
+ if (typeof r == "string") {
697
+ const e = r.trim().toLowerCase();
698
+ if (e === "true") return !0;
699
+ if (e === "false") return !1;
700
+ }
701
+ }
702
+ function Tt() {
703
+ const r = _(function({
704
+ node: t,
705
+ context: n,
706
+ className: o
707
+ }) {
708
+ const s = ze(Ue(t.props?.className), o), i = ie(t.props?.src), c = ie(t.props?.poster), l = z(t.props?.controls), u = z(t.props?.autoplay), d = z(t.props?.loop), m = z(t.props?.muted), g = z(t.props?.playsInline), k = G(t.props?.width), A = G(t.props?.height), E = t.children?.length ? n.renderChildren(t.children) : void 0;
709
+ return /* @__PURE__ */ S.jsx(
710
+ "video",
711
+ {
712
+ src: i,
713
+ poster: c,
714
+ ...l !== void 0 ? { controls: l } : {},
715
+ ...u !== void 0 ? { autoPlay: u } : {},
716
+ ...d !== void 0 ? { loop: d } : {},
717
+ ...m !== void 0 ? { muted: m } : {},
718
+ ...g !== void 0 ? { playsInline: g } : {},
719
+ ...k ? { width: k } : {},
720
+ ...A ? { height: A } : {},
721
+ "data-ikon-node-id": t.id,
722
+ className: s,
723
+ children: E
724
+ }
725
+ );
726
+ });
727
+ return ({ type: e }) => {
728
+ if (e === Rt)
729
+ return r;
730
+ };
731
+ }
732
+ const Ct = "media", jt = async () => Nt();
733
+ function At(r) {
734
+ r.registerModule(Ct, jt);
735
+ }
736
+ const we = ue("UIRegistry");
737
+ class Ot {
610
738
  baseResolvers = [];
611
739
  moduleLoaders = /* @__PURE__ */ new Map();
612
740
  moduleResolvers = /* @__PURE__ */ new Map();
@@ -616,65 +744,65 @@ class Ze {
616
744
  this.baseResolvers.push(...t.filter(Boolean));
617
745
  }
618
746
  registerModule(e, t) {
619
- const r = this.moduleLoaders.get(e);
620
- if (!r) {
747
+ const n = this.moduleLoaders.get(e);
748
+ if (!n) {
621
749
  this.moduleLoaders.set(e, t);
622
750
  return;
623
751
  }
624
- r !== t && (this.moduleLoaders.set(e, t), this.moduleResolvers.delete(e));
752
+ n !== t && (this.moduleLoaders.set(e, t), this.moduleResolvers.delete(e));
625
753
  }
626
754
  async loadRegisteredModules() {
627
755
  let e = !1;
628
- for (const [r, s] of this.moduleLoaders.entries())
629
- if (!this.moduleResolvers.has(r))
756
+ for (const [n, o] of this.moduleLoaders.entries())
757
+ if (!this.moduleResolvers.has(n))
630
758
  try {
631
- const i = await s(), a = et(i);
632
- this.moduleResolvers.set(r, a), e = !0;
633
- } catch (i) {
634
- de.error(`[IkonUiRegistry] Failed to load module '${r}'.`, i);
759
+ const s = await o(), i = Mt(s);
760
+ this.moduleResolvers.set(n, i), e = !0;
761
+ } catch (s) {
762
+ we.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
635
763
  }
636
764
  const t = [];
637
- for (const r of this.moduleLoaders.keys())
638
- this.moduleResolvers.has(r) && t.push(r);
639
- return tt(t, this.activeModuleOrder) || (this.activeModuleOrder = t, e = !0), e;
765
+ for (const n of this.moduleLoaders.keys())
766
+ this.moduleResolvers.has(n) && t.push(n);
767
+ return It(t, this.activeModuleOrder) || (this.activeModuleOrder = t, e = !0), e;
640
768
  }
641
769
  resolve(e) {
642
770
  for (const t of this.baseResolvers) {
643
- const r = t(e);
644
- if (r) return r;
771
+ const n = t(e);
772
+ if (n) return n;
645
773
  }
646
774
  for (const t of this.activeModuleOrder) {
647
- const r = this.moduleResolvers.get(t);
648
- if (!r) {
649
- de.warn(`Missing resolvers for module ${t}`);
775
+ const n = this.moduleResolvers.get(t);
776
+ if (!n) {
777
+ we.warn(`Missing resolvers for module ${t}`);
650
778
  continue;
651
779
  }
652
- for (const s of r) {
653
- const i = s(e);
654
- if (i) return i;
780
+ for (const o of n) {
781
+ const s = o(e);
782
+ if (s) return s;
655
783
  }
656
784
  }
657
785
  }
658
786
  }
659
- function _t() {
660
- const n = new Ze();
661
- return Ke(n), n.loadRegisteredModules(), n;
787
+ function Or() {
788
+ const r = new Ot();
789
+ return Et(r), At(r), r.loadRegisteredModules(), r;
662
790
  }
663
- function Qe(n) {
664
- return Array.isArray(n) ? n : [n];
791
+ function _t(r) {
792
+ return Array.isArray(r) ? r : [r];
665
793
  }
666
- function et(n) {
667
- return n ? Qe(n).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
794
+ function Mt(r) {
795
+ return r ? _t(r).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
668
796
  }
669
- function tt(n, e) {
670
- if (n.length !== e.length)
797
+ function It(r, e) {
798
+ if (r.length !== e.length)
671
799
  return !1;
672
- for (let t = 0; t < n.length; t += 1)
673
- if (n[t] !== e[t])
800
+ for (let t = 0; t < r.length; t += 1)
801
+ if (r[t] !== e[t])
674
802
  return !1;
675
803
  return !0;
676
804
  }
677
- const V = K("MotionController"), fe = {
805
+ const te = ue("MotionController"), Re = {
678
806
  ease: [0.25, 0.1, 0.25, 1],
679
807
  "ease-in": [0.42, 0, 1, 1],
680
808
  "ease-out": [0, 0, 0.58, 1],
@@ -704,98 +832,98 @@ const V = K("MotionController"), fe = {
704
832
  "ease-out-back": [0.175, 0.885, 0.32, 1.275],
705
833
  "ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
706
834
  };
707
- function v(n) {
708
- return n <= 0 ? 0 : n >= 1 ? 1 : n;
835
+ function N(r) {
836
+ return r <= 0 ? 0 : r >= 1 ? 1 : r;
709
837
  }
710
- function pe(n) {
711
- if (n == null) return;
712
- const e = `${n}`.trim();
838
+ function ke(r) {
839
+ if (r == null) return;
840
+ const e = `${r}`.trim();
713
841
  if (!e) return;
714
842
  const t = Number.parseFloat(e);
715
843
  return Number.isFinite(t) ? t : void 0;
716
844
  }
717
- function me(n) {
718
- return typeof CSS < "u" && CSS.escape ? CSS.escape(n) : n.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
845
+ function Ne(r) {
846
+ return typeof CSS < "u" && CSS.escape ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
719
847
  }
720
- function he(n, e, t, r) {
721
- const m = new Float32Array(11);
722
- function E(f, p, y) {
723
- return ((3 * p - 3 * y + 1) * f + (3 * y - 6 * p)) * f * f + 3 * p * f;
848
+ function Te(r, e, t, n) {
849
+ const d = new Float32Array(11);
850
+ function m(h, y, v) {
851
+ return ((3 * y - 3 * v + 1) * h + (3 * v - 6 * y)) * h * h + 3 * y * h;
724
852
  }
725
- function R(f, p, y) {
726
- return 3 * (3 * p - 3 * y + 1) * f * f + 2 * (3 * y - 6 * p) * f + 3 * p;
853
+ function g(h, y, v) {
854
+ return 3 * (3 * y - 3 * v + 1) * h * h + 2 * (3 * v - 6 * y) * h + 3 * y;
727
855
  }
728
- function O(f, p) {
729
- for (let y = 0; y < 4; y += 1) {
730
- const C = R(p, n, t);
856
+ function k(h, y) {
857
+ for (let v = 0; v < 4; v += 1) {
858
+ const C = g(y, r, t);
731
859
  if (C === 0)
732
- return p;
733
- const T = E(p, n, t) - f;
734
- p -= T / C;
860
+ return y;
861
+ const T = m(y, r, t) - h;
862
+ y -= T / C;
735
863
  }
736
- return p;
864
+ return y;
737
865
  }
738
- function _(f, p, y) {
739
- let C = 0, T = 0, A = 0;
866
+ function A(h, y, v) {
867
+ let C = 0, T = 0, M = 0;
740
868
  do
741
- T = p + (y - p) / 2, C = E(T, n, t) - f, C > 0 ? y = T : p = T;
742
- while (Math.abs(C) > 1e-7 && ++A < 10);
869
+ T = y + (v - y) / 2, C = m(T, r, t) - h, C > 0 ? v = T : y = T;
870
+ while (Math.abs(C) > 1e-7 && ++M < 10);
743
871
  return T;
744
872
  }
745
- function b(f) {
746
- let p = 0, y = 1;
873
+ function E(h) {
874
+ let y = 0, v = 1;
747
875
  const C = 10;
748
- for (; y !== C && m[y] <= f; y += 1)
749
- p += 0.1;
750
- y -= 1;
751
- const T = (f - m[y]) / (m[y + 1] - m[y]), A = p + T * 0.1, L = R(A, n, t);
752
- return L >= 1e-3 ? O(f, A) : L === 0 ? A : _(f, p, p + 0.1);
753
- }
754
- for (let f = 0; f < 11; f += 1)
755
- m[f] = E(f * 0.1, n, t);
756
- return (f) => f <= 0 ? 0 : f >= 1 ? 1 : E(b(f), e, r);
757
- }
758
- function rt(n) {
759
- const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(n);
876
+ for (; v !== C && d[v] <= h; v += 1)
877
+ y += 0.1;
878
+ v -= 1;
879
+ const T = (h - d[v]) / (d[v + 1] - d[v]), M = y + T * 0.1, W = g(M, r, t);
880
+ return W >= 1e-3 ? k(h, M) : W === 0 ? M : A(h, y, y + 0.1);
881
+ }
882
+ for (let h = 0; h < 11; h += 1)
883
+ d[h] = m(h * 0.1, r, t);
884
+ return (h) => h <= 0 ? 0 : h >= 1 ? 1 : m(E(h), e, n);
885
+ }
886
+ function Pt(r) {
887
+ const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(r);
760
888
  if (!e)
761
- return (s) => v(s);
762
- const t = Math.max(1, parseInt(e[1], 10)), r = (e[2] ?? "end").toLowerCase();
763
- return r === "start" || r === "jump-start" ? (s) => v(Math.ceil(s * t) / t) : r === "none" || r === "jump-none" ? (s) => v(Math.round(s * t) / t) : r === "both" || r === "jump-both" ? (s) => v((Math.floor(s * t) + 0.5) / t) : (s) => v(Math.floor(s * t) / t);
764
- }
765
- function nt(n) {
766
- if (!n)
767
- return (t) => v(t);
768
- const e = n.trim().toLowerCase();
889
+ return (o) => N(o);
890
+ const t = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
891
+ return n === "start" || n === "jump-start" ? (o) => N(Math.ceil(o * t) / t) : n === "none" || n === "jump-none" ? (o) => N(Math.round(o * t) / t) : n === "both" || n === "jump-both" ? (o) => N((Math.floor(o * t) + 0.5) / t) : (o) => N(Math.floor(o * t) / t);
892
+ }
893
+ function Lt(r) {
894
+ if (!r)
895
+ return (t) => N(t);
896
+ const e = r.trim().toLowerCase();
769
897
  if (!e || e === "linear")
770
- return (t) => v(t);
771
- if (fe[e]) {
772
- const [t, r, s, i] = fe[e], a = he(t, r, s, i);
773
- return (c) => v(a(v(c)));
898
+ return (t) => N(t);
899
+ if (Re[e]) {
900
+ const [t, n, o, s] = Re[e], i = Te(t, n, o, s);
901
+ return (c) => N(i(N(c)));
774
902
  }
775
903
  if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
776
- const r = e.slice(13, -1).split(",").map((s) => Number.parseFloat(s.trim()));
777
- if (r.length === 4 && r.every((s) => Number.isFinite(s))) {
778
- const [s, i, a, c] = r, l = he(s, i, a, c);
779
- return (d) => v(l(v(d)));
904
+ const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
905
+ if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
906
+ const [o, s, i, c] = n, l = Te(o, s, i, c);
907
+ return (u) => N(l(N(u)));
780
908
  }
781
909
  }
782
910
  if (e.startsWith("steps(") && e.endsWith(")")) {
783
- const t = rt(e);
784
- return (r) => t(v(r));
911
+ const t = Pt(e);
912
+ return (n) => t(N(n));
785
913
  }
786
- return (t) => v(t);
914
+ return (t) => N(t);
787
915
  }
788
- function st(n) {
789
- if (!n)
916
+ function xt(r) {
917
+ if (!r)
790
918
  return;
791
- const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(n);
919
+ const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(r);
792
920
  if (!e)
793
921
  return;
794
- const [t, r, s, i] = e.slice(1).map((a) => Number.parseFloat(a));
795
- if (![t, r, s, i].some((a) => !Number.isFinite(a)))
796
- return { inStart: t, inEnd: r, outStart: s, outEnd: i };
922
+ const [t, n, o, s] = e.slice(1).map((i) => Number.parseFloat(i));
923
+ if (![t, n, o, s].some((i) => !Number.isFinite(i)))
924
+ return { inStart: t, inEnd: n, outStart: o, outEnd: s };
797
925
  }
798
- class ot {
926
+ class Ut {
799
927
  bindingsByStyle = /* @__PURE__ */ new Map();
800
928
  observer;
801
929
  observeScheduled = !1;
@@ -807,29 +935,29 @@ class ot {
807
935
  registerStyle(e, t) {
808
936
  if (!e)
809
937
  return;
810
- const r = this.parseMetadata(t);
811
- if (!r) {
938
+ const n = this.parseMetadata(t);
939
+ if (!n) {
812
940
  this.bindingsByStyle.delete(e), this.cleanupStyle(e);
813
941
  return;
814
942
  }
815
- this.bindingsByStyle.set(e, r), this.cleanupStyle(e), this.ensureObserver(), this.scheduleScan(e);
943
+ this.bindingsByStyle.set(e, n), this.cleanupStyle(e), this.ensureObserver(), this.scheduleScan(e);
816
944
  }
817
945
  reset() {
818
946
  for (const e of Array.from(this.globalCleanups))
819
947
  try {
820
948
  e();
821
949
  } catch (t) {
822
- V.warn("Failed to cleanup binding listener", t);
950
+ te.warn("Failed to cleanup binding listener", t);
823
951
  }
824
952
  this.globalCleanups.clear(), this.elementStates.clear(), this.styleToElements.clear(), this.bindingsByStyle.clear(), this.pendingScanStyles.clear(), this.scanScheduled = !1, this.observer && (this.observer.disconnect(), this.observer = void 0);
825
953
  }
826
954
  parseMetadata(e) {
827
955
  if (e)
828
956
  try {
829
- const r = (JSON.parse(e).motionBindings ?? []).map((s) => this.parseBinding(s)).filter((s) => s !== void 0);
830
- return r.length === 0 ? void 0 : { bindings: r };
957
+ const n = (JSON.parse(e).motionBindings ?? []).map((o) => this.parseBinding(o)).filter((o) => o !== void 0);
958
+ return n.length === 0 ? void 0 : { bindings: n };
831
959
  } catch (t) {
832
- V.warn("Failed to parse motion metadata", t);
960
+ te.warn("Failed to parse motion metadata", t);
833
961
  return;
834
962
  }
835
963
  }
@@ -837,16 +965,16 @@ class ot {
837
965
  const t = e.source?.trim();
838
966
  if (!t)
839
967
  return;
840
- const r = pe(e.min) ?? 0, s = pe(e.max), i = s === void 0 ? r + 100 : s, a = (e.clamp ?? "clamp").trim().toLowerCase(), c = !!e.reverse, l = nt(e.ease), d = st(e.map), m = e.targetId?.trim() || void 0;
841
- return Number.isNaN(r) || Number.isNaN(i) ? void 0 : {
968
+ const n = ke(e.min) ?? 0, o = ke(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), c = !!e.reverse, l = Lt(e.ease), u = xt(e.map), d = e.targetId?.trim() || void 0;
969
+ return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
842
970
  source: t.toLowerCase(),
843
- min: r,
844
- max: i,
845
- clamp: a === "freeze-start" || a === "freeze-end" || a === "unclamped" ? a : "clamp",
971
+ min: n,
972
+ max: s,
973
+ clamp: i === "freeze-start" || i === "freeze-end" || i === "unclamped" ? i : "clamp",
846
974
  reverse: c,
847
975
  ease: l,
848
- map: d,
849
- targetId: m
976
+ map: u,
977
+ targetId: d
850
978
  };
851
979
  }
852
980
  ensureObserver() {
@@ -876,79 +1004,79 @@ class ot {
876
1004
  this.scanScheduled = !1;
877
1005
  return;
878
1006
  }
879
- const s = Array.from(this.pendingScanStyles);
1007
+ const o = Array.from(this.pendingScanStyles);
880
1008
  this.pendingScanStyles.clear(), this.scanScheduled = !1;
881
- for (const i of s)
882
- this.scanExistingNodes(i);
883
- }, r = () => {
1009
+ for (const s of o)
1010
+ this.scanExistingNodes(s);
1011
+ }, n = () => {
884
1012
  this.scanScheduled = !0, typeof queueMicrotask == "function" ? queueMicrotask(t) : setTimeout(t, 0);
885
1013
  };
886
1014
  document.readyState === "loading" ? document.addEventListener(
887
1015
  "DOMContentLoaded",
888
1016
  () => {
889
- r();
1017
+ n();
890
1018
  },
891
1019
  { once: !0 }
892
- ) : r();
1020
+ ) : n();
893
1021
  }
894
1022
  scanExistingNodes(e) {
895
1023
  const t = this.bindingsByStyle.get(e);
896
1024
  if (!t || typeof document > "u")
897
1025
  return;
898
- const r = `.${me(e)}`;
899
- document.querySelectorAll(r).forEach((i) => this.applyStyleToElement(i, e, t));
1026
+ const n = `.${Ne(e)}`;
1027
+ document.querySelectorAll(n).forEach((s) => this.applyStyleToElement(s, e, t));
900
1028
  }
901
- applyStyleToElement(e, t, r) {
902
- this.ensureStyleState(e, t) && this.attachBindings(e, t, r);
1029
+ applyStyleToElement(e, t, n) {
1030
+ this.ensureStyleState(e, t) && this.attachBindings(e, t, n);
903
1031
  }
904
1032
  ensureStyleState(e, t) {
905
- let r = this.elementStates.get(e);
906
- if (r || (r = /* @__PURE__ */ new Map(), this.elementStates.set(e, r)), r.has(t))
1033
+ let n = this.elementStates.get(e);
1034
+ if (n || (n = /* @__PURE__ */ new Map(), this.elementStates.set(e, n)), n.has(t))
907
1035
  return !1;
908
- r.set(t, /* @__PURE__ */ new Set());
909
- let s = this.styleToElements.get(t);
910
- return s || (s = /* @__PURE__ */ new Set(), this.styleToElements.set(t, s)), s.add(e), !0;
1036
+ n.set(t, /* @__PURE__ */ new Set());
1037
+ let o = this.styleToElements.get(t);
1038
+ return o || (o = /* @__PURE__ */ new Set(), this.styleToElements.set(t, o)), o.add(e), !0;
911
1039
  }
912
- attachBindings(e, t, r) {
913
- for (const s of r.bindings)
914
- this.attachBinding(e, t, s);
1040
+ attachBindings(e, t, n) {
1041
+ for (const o of n.bindings)
1042
+ this.attachBinding(e, t, o);
915
1043
  }
916
- attachBinding(e, t, r) {
917
- switch (r.source) {
1044
+ attachBinding(e, t, n) {
1045
+ switch (n.source) {
918
1046
  case "scrolly":
919
- this.attachScrollBinding(e, t, r);
1047
+ this.attachScrollBinding(e, t, n);
920
1048
  break;
921
1049
  }
922
1050
  }
923
- attachScrollBinding(e, t, r) {
924
- const s = this.resolveScrollContainer(e, r);
925
- if (!s)
1051
+ attachScrollBinding(e, t, n) {
1052
+ const o = this.resolveScrollContainer(e, n);
1053
+ if (!o)
926
1054
  return;
927
- const i = () => {
928
- this.applyBindingValues(e, r, s.scrollTop);
1055
+ const s = () => {
1056
+ this.applyBindingValues(e, n, o.scrollTop);
929
1057
  };
930
- i();
931
- const a = new AbortController();
932
- s.addEventListener("scroll", i, { passive: !0, signal: a.signal }), this.registerCleanup(e, t, () => a.abort());
933
- const c = () => i();
1058
+ s();
1059
+ const i = new AbortController();
1060
+ o.addEventListener("scroll", s, { passive: !0, signal: i.signal }), this.registerCleanup(e, t, () => i.abort());
1061
+ const c = () => s();
934
1062
  window.addEventListener("resize", c), this.registerCleanup(e, t, () => window.removeEventListener("resize", c));
935
1063
  }
936
1064
  resolveScrollContainer(e, t) {
937
1065
  if (t.targetId) {
938
- const r = `[data-ikon-motion-source="${me(t.targetId)}"]`, s = typeof document < "u" ? document.querySelector(r) : null;
939
- if (s)
940
- return s;
1066
+ const n = `[data-ikon-motion-source="${Ne(t.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1067
+ if (o)
1068
+ return o;
941
1069
  }
942
- return e.closest('[data-ikon-container-type="scroll-view"]');
943
- }
944
- applyBindingValues(e, t, r) {
945
- const s = t.max - t.min, i = s === 0 ? r > t.min ? 1 : 0 : (r - t.min) / s;
946
- let a = this.applyClamp(i, t.clamp);
947
- t.reverse && (a = 1 - a);
948
- const c = t.ease(a), l = Number.isFinite(c) ? c : 0, d = l * 100;
949
- if (e.style.setProperty("--tw-motion-bind-source-value", `${r}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${l}`), e.style.setProperty("--tw-motion-bind-progress", `${d}`), t.map) {
950
- const m = this.applyMap(d, t.map);
951
- m !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${m}`);
1070
+ return e.closest('[data-ikon-view-type="scroll-view"]');
1071
+ }
1072
+ applyBindingValues(e, t, n) {
1073
+ const o = t.max - t.min, s = o === 0 ? n > t.min ? 1 : 0 : (n - t.min) / o;
1074
+ let i = this.applyClamp(s, t.clamp);
1075
+ t.reverse && (i = 1 - i);
1076
+ const c = t.ease(i), l = Number.isFinite(c) ? c : 0, u = l * 100;
1077
+ if (e.style.setProperty("--tw-motion-bind-source-value", `${n}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${l}`), e.style.setProperty("--tw-motion-bind-progress", `${u}`), t.map) {
1078
+ const d = this.applyMap(u, t.map);
1079
+ d !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${d}`);
952
1080
  } else
953
1081
  e.style.removeProperty("--tw-motion-bind-value");
954
1082
  }
@@ -963,62 +1091,62 @@ class ot {
963
1091
  case "unclamped":
964
1092
  return e;
965
1093
  default:
966
- return v(e);
1094
+ return N(e);
967
1095
  }
968
1096
  }
969
1097
  applyMap(e, t) {
970
- const r = t.inEnd - t.inStart;
971
- if (r === 0)
1098
+ const n = t.inEnd - t.inStart;
1099
+ if (n === 0)
972
1100
  return t.outEnd;
973
- const s = (e - t.inStart) / r;
974
- return t.outStart + s * (t.outEnd - t.outStart);
1101
+ const o = (e - t.inStart) / n;
1102
+ return t.outStart + o * (t.outEnd - t.outStart);
975
1103
  }
976
- registerCleanup(e, t, r) {
977
- const i = this.elementStates.get(e)?.get(t);
978
- i && (i.add(r), this.globalCleanups.add(r));
1104
+ registerCleanup(e, t, n) {
1105
+ const s = this.elementStates.get(e)?.get(t);
1106
+ s && (s.add(n), this.globalCleanups.add(n));
979
1107
  }
980
1108
  cleanupStyle(e) {
981
1109
  const t = this.styleToElements.get(e);
982
1110
  if (!t)
983
1111
  return;
984
- const r = Array.from(t);
985
- for (const s of r)
986
- this.cleanupElementStyle(s, e);
1112
+ const n = Array.from(t);
1113
+ for (const o of n)
1114
+ this.cleanupElementStyle(o, e);
987
1115
  this.styleToElements.delete(e);
988
1116
  }
989
1117
  cleanupElement(e) {
990
1118
  const t = this.elementStates.get(e);
991
1119
  if (!t)
992
1120
  return;
993
- const r = Array.from(t.keys());
994
- for (const s of r)
995
- this.cleanupElementStyle(e, s);
1121
+ const n = Array.from(t.keys());
1122
+ for (const o of n)
1123
+ this.cleanupElementStyle(e, o);
996
1124
  }
997
1125
  cleanupElementStyle(e, t) {
998
- const r = this.elementStates.get(e);
999
- if (!r)
1126
+ const n = this.elementStates.get(e);
1127
+ if (!n)
1000
1128
  return;
1001
- const s = r.get(t);
1002
- if (!s)
1129
+ const o = n.get(t);
1130
+ if (!o)
1003
1131
  return;
1004
- for (const a of s) {
1132
+ for (const i of o) {
1005
1133
  try {
1006
- a();
1134
+ i();
1007
1135
  } catch (c) {
1008
- V.warn("Failed to cleanup listener", c);
1136
+ te.warn("Failed to cleanup listener", c);
1009
1137
  }
1010
- this.globalCleanups.delete(a);
1138
+ this.globalCleanups.delete(i);
1011
1139
  }
1012
- s.clear(), r.delete(t);
1013
- const i = this.styleToElements.get(t);
1014
- i && (i.delete(e), i.size === 0 && this.styleToElements.delete(t)), r.size === 0 && (this.elementStates.delete(e), this.clearBindingProperties(e));
1140
+ o.clear(), n.delete(t);
1141
+ const s = this.styleToElements.get(t);
1142
+ s && (s.delete(e), s.size === 0 && this.styleToElements.delete(t)), n.size === 0 && (this.elementStates.delete(e), this.clearBindingProperties(e));
1015
1143
  }
1016
1144
  clearBindingProperties(e) {
1017
1145
  e.style.removeProperty("--tw-motion-bind-source-value"), e.style.removeProperty("--tw-motion-bind-progress"), e.style.removeProperty("--tw-motion-bind-progress-ratio"), e.style.removeProperty("--tw-motion-bind-value");
1018
1146
  }
1019
1147
  handleMutations(e) {
1020
1148
  for (const t of e)
1021
- t.type === "childList" ? (t.addedNodes.forEach((r) => this.scanNode(r)), t.removedNodes.forEach((r) => this.cleanupNode(r))) : t.type === "attributes" && t.target instanceof HTMLElement && this.handleClassMutation(t.target);
1149
+ t.type === "childList" ? (t.addedNodes.forEach((n) => this.scanNode(n)), t.removedNodes.forEach((n) => this.cleanupNode(n))) : t.type === "attributes" && t.target instanceof HTMLElement && this.handleClassMutation(t.target);
1022
1150
  }
1023
1151
  handleClassMutation(e) {
1024
1152
  const t = this.elementStates.get(e);
@@ -1026,174 +1154,557 @@ class ot {
1026
1154
  this.processElement(e);
1027
1155
  return;
1028
1156
  }
1029
- const r = new Set(Array.from(e.classList)), s = Array.from(t.keys());
1030
- for (const i of s)
1031
- r.has(i) || this.cleanupElementStyle(e, i);
1157
+ const n = new Set(Array.from(e.classList)), o = Array.from(t.keys());
1158
+ for (const s of o)
1159
+ n.has(s) || this.cleanupElementStyle(e, s);
1032
1160
  this.processElement(e);
1033
1161
  }
1034
1162
  scanNode(e) {
1035
1163
  if (!(e instanceof HTMLElement))
1036
1164
  return;
1037
- this.processElement(e), e.querySelectorAll("[class]").forEach((r) => this.processElement(r));
1165
+ this.processElement(e), e.querySelectorAll("[class]").forEach((n) => this.processElement(n));
1038
1166
  }
1039
1167
  cleanupNode(e) {
1040
1168
  if (!(e instanceof HTMLElement))
1041
1169
  return;
1042
- this.cleanupElement(e), e.querySelectorAll("[class]").forEach((r) => this.cleanupElement(r));
1170
+ this.cleanupElement(e), e.querySelectorAll("[class]").forEach((n) => this.cleanupElement(n));
1043
1171
  }
1044
1172
  processElement(e) {
1045
1173
  if (!(!e.classList || e.classList.length === 0))
1046
1174
  for (const t of Array.from(e.classList)) {
1047
- const r = this.bindingsByStyle.get(t);
1048
- r && this.ensureStyleState(e, t) && this.attachBindings(e, t, r);
1175
+ const n = this.bindingsByStyle.get(t);
1176
+ n && this.ensureStyleState(e, t) && this.attachBindings(e, t, n);
1049
1177
  }
1050
1178
  }
1051
1179
  }
1052
- const ye = new ot(), J = "ikon-ds";
1053
- function Mt(n) {
1054
- const e = ae(({ styleId: r, css: s, common: i }) => {
1055
- if (!r || typeof document > "u") return;
1056
- let a = document.getElementById(J);
1057
- a || (a = document.createElement("style"), a.id = J, document.head.appendChild(a)), s && (a.innerHTML += s), ye.registerStyle(r, i);
1058
- }, []), t = ae(() => {
1059
- typeof document < "u" && document.getElementById(J)?.remove(), ye.reset();
1180
+ const Ce = new Ut(), re = "ikon-ds";
1181
+ function _r(r) {
1182
+ const e = Se(({ styleId: n, css: o, common: s }) => {
1183
+ if (!n || typeof document > "u") return;
1184
+ let i = document.getElementById(re);
1185
+ i || (i = document.createElement("style"), i.id = re, document.head.appendChild(i)), o && (i.innerHTML += o), Ce.registerStyle(n, s);
1186
+ }, []), t = Se(() => {
1187
+ typeof document < "u" && document.getElementById(re)?.remove(), Ce.reset();
1060
1188
  }, []);
1061
- return G(() => {
1062
- if (!n) return;
1063
- for (const s of n.getUiStyles())
1064
- e(s);
1065
- const r = n.subscribeToStyles(e);
1189
+ return Y(() => {
1190
+ if (!r) return;
1191
+ for (const o of r.getUiStyles())
1192
+ e(o);
1193
+ const n = r.subscribeToStyles(e);
1066
1194
  return () => {
1067
- r?.(), t();
1195
+ n?.(), t();
1068
1196
  };
1069
- }, [n, t, e]), G(() => () => t(), [t]), { setStyle: e, reset: t };
1197
+ }, [r, t, e]), Y(() => () => t(), [t]), { setStyle: e, reset: t };
1070
1198
  }
1071
- var it = typeof global == "object" && global && global.Object === Object && global, at = typeof self == "object" && self && self.Object === Object && self, ct = it || at || Function("return this")(), F = ct.Symbol, ve = Object.prototype, lt = ve.hasOwnProperty, ut = ve.toString, P = F ? F.toStringTag : void 0;
1072
- function dt(n) {
1073
- var e = lt.call(n, P), t = n[P];
1199
+ var zt = typeof global == "object" && global && global.Object === Object && global, Bt = typeof self == "object" && self && self.Object === Object && self, Ft = zt || Bt || Function("return this")(), X = Ft.Symbol, Be = Object.prototype, $t = Be.hasOwnProperty, Vt = Be.toString, B = X ? X.toStringTag : void 0;
1200
+ function Dt(r) {
1201
+ var e = $t.call(r, B), t = r[B];
1074
1202
  try {
1075
- n[P] = void 0;
1076
- var r = !0;
1203
+ r[B] = void 0;
1204
+ var n = !0;
1077
1205
  } catch {
1078
1206
  }
1079
- var s = ut.call(n);
1080
- return r && (e ? n[P] = t : delete n[P]), s;
1207
+ var o = Vt.call(r);
1208
+ return n && (e ? r[B] = t : delete r[B]), o;
1081
1209
  }
1082
- var ft = Object.prototype, pt = ft.toString;
1083
- function mt(n) {
1084
- return pt.call(n);
1210
+ var Wt = Object.prototype, qt = Wt.toString;
1211
+ function Yt(r) {
1212
+ return qt.call(r);
1085
1213
  }
1086
- var ht = "[object Null]", yt = "[object Undefined]", Se = F ? F.toStringTag : void 0;
1087
- function St(n) {
1088
- return n == null ? n === void 0 ? yt : ht : Se && Se in Object(n) ? dt(n) : mt(n);
1214
+ var Gt = "[object Null]", Xt = "[object Undefined]", je = X ? X.toStringTag : void 0;
1215
+ function Ht(r) {
1216
+ return r == null ? r === void 0 ? Xt : Gt : je && je in Object(r) ? Dt(r) : Yt(r);
1089
1217
  }
1090
- function gt(n) {
1091
- return n != null && typeof n == "object";
1218
+ function Jt(r) {
1219
+ return r != null && typeof r == "object";
1092
1220
  }
1093
- var bt = Array.isArray, vt = "[object String]";
1094
- function Et(n) {
1095
- return typeof n == "string" || !bt(n) && gt(n) && St(n) == vt;
1221
+ var Kt = Array.isArray, Zt = "[object String]";
1222
+ function Qt(r) {
1223
+ return typeof r == "string" || !Kt(r) && Jt(r) && Ht(r) == Zt;
1096
1224
  }
1097
- const ge = "ikonUiModules";
1098
- function X(n) {
1099
- return typeof n == "object" && n !== null && !Array.isArray(n);
1225
+ const Ae = "ikonUiModules";
1226
+ function ae(r) {
1227
+ return typeof r == "object" && r !== null && !Array.isArray(r);
1100
1228
  }
1101
- function Rt(n) {
1102
- if (!Array.isArray(n))
1229
+ function er(r) {
1230
+ if (!Array.isArray(r))
1103
1231
  return;
1104
1232
  const e = /* @__PURE__ */ new Set();
1105
- for (const t of n) {
1106
- if (!Et(t)) continue;
1107
- const r = t.trim();
1108
- r && (e.has(r) || e.add(r));
1233
+ for (const t of r) {
1234
+ if (!Qt(t)) continue;
1235
+ const n = t.trim();
1236
+ n && (e.has(n) || e.add(n));
1109
1237
  }
1110
1238
  return Array.from(e);
1111
1239
  }
1112
- function jt(n, e) {
1113
- if (n === e)
1240
+ function Mr(r, e) {
1241
+ if (r === e)
1114
1242
  return !0;
1115
- if (!n || !e)
1116
- return !n && !e;
1117
- if (n.length !== e.length)
1243
+ if (!r || !e)
1244
+ return !r && !e;
1245
+ if (r.length !== e.length)
1118
1246
  return !1;
1119
- for (let t = 0; t < n.length; t += 1)
1120
- if (n[t] !== e[t])
1247
+ for (let t = 0; t < r.length; t += 1)
1248
+ if (r[t] !== e[t])
1121
1249
  return !1;
1122
1250
  return !0;
1123
1251
  }
1124
- function Tt(n) {
1125
- if (!(!X(n) || !Object.prototype.hasOwnProperty.call(n, ge)))
1126
- return Rt(n[ge]);
1252
+ function tr(r) {
1253
+ if (!(!ae(r) || !Object.prototype.hasOwnProperty.call(r, Ae)))
1254
+ return er(r[Ae]);
1127
1255
  }
1128
- function It(...n) {
1129
- for (const e of n) {
1130
- const t = Tt(e);
1256
+ function Ir(...r) {
1257
+ for (const e of r) {
1258
+ const t = tr(e);
1131
1259
  if (t !== void 0)
1132
1260
  return t;
1133
1261
  }
1134
1262
  }
1135
- function Pt(n) {
1136
- if (!X(n))
1263
+ function Pr(r) {
1264
+ if (!ae(r))
1137
1265
  return;
1138
- const e = n, t = Object.keys(e).find((l) => l.toLowerCase() === "modules");
1266
+ const e = r, t = Object.keys(e).find((l) => l.toLowerCase() === "modules");
1139
1267
  if (!t)
1140
1268
  return;
1141
- const r = e[t];
1142
- if (r === null)
1269
+ const n = e[t];
1270
+ if (n === null)
1143
1271
  return { resetToDefault: !0 };
1144
- if (!Array.isArray(r))
1272
+ if (!Array.isArray(n))
1145
1273
  return;
1146
- const s = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
1147
- for (const l of r) {
1274
+ const o = [], s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
1275
+ for (const l of n) {
1148
1276
  if (typeof l == "string") {
1149
- const b = l.trim();
1150
- if (!b || a.has(b))
1277
+ const E = l.trim();
1278
+ if (!E || i.has(E))
1151
1279
  continue;
1152
- s.push(b), a.add(b);
1280
+ o.push(E), i.add(E);
1153
1281
  continue;
1154
1282
  }
1155
- if (!X(l))
1283
+ if (!ae(l))
1156
1284
  continue;
1157
- const d = l, m = Object.keys(d).find((b) => b.toLowerCase() === "name");
1158
- if (!m)
1285
+ const u = l, d = Object.keys(u).find((E) => E.toLowerCase() === "name");
1286
+ if (!d)
1159
1287
  continue;
1160
- const E = d[m];
1161
- if (typeof E != "string")
1288
+ const m = u[d];
1289
+ if (typeof m != "string")
1162
1290
  continue;
1163
- const R = E.trim();
1164
- if (!R)
1291
+ const g = m.trim();
1292
+ if (!g)
1165
1293
  continue;
1166
- const O = Object.keys(d).find((b) => b.toLowerCase() === "javascript"), _ = O ? d[O] : void 0;
1167
- typeof _ == "string" && i.set(R, _), a.has(R) || (s.push(R), a.add(R));
1294
+ const k = Object.keys(u).find((E) => E.toLowerCase() === "javascript"), A = k ? u[k] : void 0;
1295
+ typeof A == "string" && s.set(g, A), i.has(g) || (o.push(g), i.add(g));
1168
1296
  }
1169
- if (!s.length && i.size === 0)
1297
+ if (!o.length && s.size === 0)
1170
1298
  return { modules: [] };
1171
- const c = Array.from(i.entries()).map(([l, d]) => ({
1299
+ const c = Array.from(s.entries()).map(([l, u]) => ({
1172
1300
  name: l,
1173
- javascript: d
1301
+ javascript: u
1174
1302
  }));
1175
- return c.length > 0 ? { modules: s, inlineModules: c } : { modules: s };
1303
+ return c.length > 0 ? { modules: o, inlineModules: c } : { modules: o };
1304
+ }
1305
+ const p = {
1306
+ None: 0,
1307
+ Letter: 1,
1308
+ Word: 2,
1309
+ Line: 4,
1310
+ Paragraph: 8,
1311
+ Emoji: 16
1312
+ }, rr = [
1313
+ {
1314
+ flag: p.Letter,
1315
+ hints: [
1316
+ "[data-motion-letter]",
1317
+ "[data-letter]",
1318
+ ".tw-motion-letter",
1319
+ ":is(span,[data-motion-letter],[data-letter],.tw-motion-letter)"
1320
+ ]
1321
+ },
1322
+ {
1323
+ flag: p.Word,
1324
+ hints: [
1325
+ "[data-motion-word]",
1326
+ "[data-word]",
1327
+ ".tw-motion-word",
1328
+ ":is(span,[data-motion-word],[data-word],.tw-motion-word)"
1329
+ ]
1330
+ },
1331
+ {
1332
+ flag: p.Line,
1333
+ hints: [
1334
+ "[data-motion-line]",
1335
+ "[data-line]",
1336
+ ".tw-motion-line",
1337
+ ":is(span,[data-motion-line],[data-line],.tw-motion-line)"
1338
+ ]
1339
+ },
1340
+ {
1341
+ flag: p.Paragraph,
1342
+ hints: [
1343
+ "[data-motion-paragraph]",
1344
+ "[data-paragraph]",
1345
+ ".tw-motion-paragraph",
1346
+ ":is(span,[data-motion-paragraph],[data-paragraph],.tw-motion-paragraph)",
1347
+ ":is(p,[data-motion-paragraph],[data-paragraph],.tw-motion-paragraph)",
1348
+ ":is(div,[data-motion-paragraph],[data-paragraph],.tw-motion-paragraph)"
1349
+ ]
1350
+ },
1351
+ {
1352
+ flag: p.Emoji,
1353
+ hints: [
1354
+ ":is([data-motion-emoji],[data-emoji],.tw-motion-emoji,.tw-emoji)",
1355
+ "[data-motion-emoji]",
1356
+ ".tw-motion-emoji",
1357
+ ".tw-emoji",
1358
+ "[data-emoji]"
1359
+ ]
1360
+ }
1361
+ ], ce = p.Letter | p.Word | p.Line | p.Paragraph | p.Emoji, nr = p.Letter | p.Word | p.Line | p.Paragraph, Oe = /* @__PURE__ */ new Map(), or = 16384;
1362
+ function Lr(r, e) {
1363
+ if (!r || r.length > or)
1364
+ return r;
1365
+ const t = Er(e), n = P(t, p.Emoji), o = t & nr;
1366
+ if (o === p.None && !n)
1367
+ return r;
1368
+ const s = r.replace(/\r\n/g, `
1369
+ `).replace(/\r/g, `
1370
+ `);
1371
+ if (o === p.None)
1372
+ return Pe(s);
1373
+ const i = br(s);
1374
+ if (i.length === 0)
1375
+ return n ? Pe(s) : r;
1376
+ const c = vr(i), l = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, u = [];
1377
+ for (const d of c) {
1378
+ const m = sr(d, t, l);
1379
+ u.push(...m);
1380
+ }
1381
+ return u;
1382
+ }
1383
+ function sr(r, e, t) {
1384
+ const n = [];
1385
+ for (const o of r) {
1386
+ const s = ir(o, e, t);
1387
+ n.push(...s);
1388
+ }
1389
+ if (P(e, p.Paragraph)) {
1390
+ const o = t.paragraph++;
1391
+ return [
1392
+ /* @__PURE__ */ S.jsx(
1393
+ "span",
1394
+ {
1395
+ "data-motion-paragraph": !0,
1396
+ style: H(o),
1397
+ children: n
1398
+ },
1399
+ `motion-paragraph-${o}`
1400
+ )
1401
+ ];
1402
+ }
1403
+ return n;
1404
+ }
1405
+ function ir(r, e, t) {
1406
+ const n = ar(r.text, e, t), o = [];
1407
+ if (P(e, p.Line)) {
1408
+ const s = t.line++;
1409
+ o.push(
1410
+ /* @__PURE__ */ S.jsx("span", { "data-motion-line": !0, style: H(s), children: n }, `motion-line-${s}`)
1411
+ );
1412
+ } else
1413
+ o.push(...n);
1414
+ for (let s = 0; s < r.breaks; s++)
1415
+ o.push(/* @__PURE__ */ S.jsx("br", {}, `motion-break-${t.br++}`));
1416
+ return o;
1417
+ }
1418
+ function ar(r, e, t) {
1419
+ if (!r)
1420
+ return [];
1421
+ const n = P(e, p.Word), o = [], s = /(\s+)/g;
1422
+ let i = 0, c;
1423
+ for (; (c = s.exec(r)) !== null; ) {
1424
+ if (c.index > i) {
1425
+ const l = r.slice(i, c.index);
1426
+ o.push(_e(l, t, e, n));
1427
+ }
1428
+ o.push(c[0]), i = c.index + c[0].length;
1429
+ }
1430
+ if (i < r.length) {
1431
+ const l = r.slice(i);
1432
+ o.push(_e(l, t, e, n));
1433
+ }
1434
+ return o;
1435
+ }
1436
+ function _e(r, e, t, n) {
1437
+ const o = e.word++, s = lr(r, t, e), i = `motion-word-${o}`, c = cr(o, n);
1438
+ return n ? /* @__PURE__ */ S.jsx("span", { "data-motion-word": !0, style: c, children: s }, i) : /* @__PURE__ */ S.jsx("span", { style: c, children: s }, i);
1439
+ }
1440
+ function cr(r, e) {
1441
+ return e ? { ...H(r), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1442
+ }
1443
+ function lr(r, e, t) {
1444
+ if (!r)
1445
+ return [];
1446
+ const n = P(e, p.Letter), o = P(e, p.Emoji);
1447
+ if (!n) {
1448
+ if (!o)
1449
+ return [r];
1450
+ const c = le(r);
1451
+ if (c.length === 0)
1452
+ return [r];
1453
+ const { nodes: l } = $e(c, t);
1454
+ return l;
1455
+ }
1456
+ const s = [], i = le(r);
1457
+ for (const c of i) {
1458
+ const l = t.letter++, u = `motion-letter-${l}`, d = H(l);
1459
+ if (c === `
1460
+ `) {
1461
+ s.push(
1462
+ /* @__PURE__ */ S.jsx("span", { "data-motion-letter": !0, style: d, children: /* @__PURE__ */ S.jsx("br", {}) }, u)
1463
+ );
1464
+ continue;
1465
+ }
1466
+ const g = o && Fe(c) ? { "data-motion-emoji": !0 } : void 0, k = c === " " ? " " : c;
1467
+ s.push(
1468
+ /* @__PURE__ */ S.jsx("span", { "data-motion-letter": !0, style: d, ...g, children: k }, u)
1469
+ );
1470
+ }
1471
+ return s;
1472
+ }
1473
+ function le(r) {
1474
+ if (!r)
1475
+ return [];
1476
+ const e = ur();
1477
+ return e ? Array.from(e.segment(r), (t) => t.segment) : dr(r);
1478
+ }
1479
+ let F;
1480
+ function ur() {
1481
+ return F !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? F = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : F = null), F;
1482
+ }
1483
+ function dr(r) {
1484
+ const e = [], t = Array.from(r);
1485
+ let n = "";
1486
+ for (let o = 0; o < t.length; o++) {
1487
+ const s = t[o], i = t[o + 1];
1488
+ n += s, !(i && fr(s, i)) && (e.push(n), n = "");
1489
+ }
1490
+ return n && e.push(n), e;
1491
+ }
1492
+ function fr(r, e) {
1493
+ return e ? !!(Me(r) || Me(e) || hr(e) || mr(e) || pr(e) || Ie(r) && Ie(e)) : !1;
1494
+ }
1495
+ function Me(r) {
1496
+ return r.codePointAt(0) === 8205;
1497
+ }
1498
+ function mr(r) {
1499
+ const e = r.codePointAt(0);
1500
+ return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
1501
+ }
1502
+ function pr(r) {
1503
+ const e = r.codePointAt(0);
1504
+ return e === void 0 ? !1 : e >= 127995 && e <= 127999;
1505
+ }
1506
+ function Ie(r) {
1507
+ const e = r.codePointAt(0);
1508
+ return e === void 0 ? !1 : e >= 127462 && e <= 127487;
1509
+ }
1510
+ let ne;
1511
+ function hr(r) {
1512
+ return r ? (ne || (ne = gr()), ne(r)) : !1;
1513
+ }
1514
+ function gr() {
1515
+ try {
1516
+ const r = new RegExp("\\p{Mark}", "u");
1517
+ return (e) => r.test(e);
1518
+ } catch {
1519
+ return (r) => {
1520
+ const e = r.codePointAt(0);
1521
+ return e === void 0 ? !1 : e >= 768 && e <= 879 || e >= 6832 && e <= 6911 || e >= 7616 && e <= 7679 || e >= 8400 && e <= 8447 || e >= 12441 && e <= 12442 || e >= 65056 && e <= 65071;
1522
+ };
1523
+ }
1524
+ }
1525
+ let oe;
1526
+ function Fe(r) {
1527
+ return r ? (oe || (oe = yr()), oe(r)) : !1;
1528
+ }
1529
+ function yr() {
1530
+ try {
1531
+ const r = new RegExp("\\p{Extended_Pictographic}", "u");
1532
+ return (e) => r.test(e);
1533
+ } catch {
1534
+ return Sr;
1535
+ }
1536
+ }
1537
+ function Sr(r) {
1538
+ if (!r)
1539
+ return !1;
1540
+ for (const e of Array.from(r)) {
1541
+ const t = e.codePointAt(0);
1542
+ if (t !== void 0 && (t >= 126976 && t <= 127231 || t >= 127232 && t <= 127487 || t >= 127488 && t <= 127743 || t >= 127744 && t <= 128511 || t >= 128512 && t <= 128591 || t >= 128640 && t <= 128767 || t >= 128768 && t <= 128895 || t >= 128896 && t <= 129023 || t >= 129024 && t <= 129279 || t >= 129280 && t <= 129535 || t >= 129536 && t <= 129791 || t >= 9728 && t <= 9983 || t >= 9984 && t <= 10175 || t === 8205 || t === 65039 || t === 8419))
1543
+ return !0;
1544
+ }
1545
+ return !1;
1546
+ }
1547
+ function br(r) {
1548
+ const e = [];
1549
+ let t = "", n = 0;
1550
+ for (let o = 0; o < r.length; o++) {
1551
+ const s = r[o];
1552
+ if (s === `
1553
+ `) {
1554
+ n += 1;
1555
+ continue;
1556
+ }
1557
+ n > 0 && (e.push({ text: t, breaks: n }), t = "", n = 0), t += s;
1558
+ }
1559
+ return (n > 0 || t.length > 0) && e.push({ text: t, breaks: n }), e;
1560
+ }
1561
+ function vr(r) {
1562
+ if (r.length === 0)
1563
+ return [];
1564
+ const e = [];
1565
+ let t = [];
1566
+ for (const n of r)
1567
+ t.push(n), n.breaks >= 2 && (e.push(t), t = []);
1568
+ return t.length > 0 && e.push(t), e;
1569
+ }
1570
+ function P(r, e) {
1571
+ return (r & e) === e;
1572
+ }
1573
+ function H(r) {
1574
+ return {
1575
+ "--tw-motion-seq-index": r.toString(),
1576
+ backgroundColor: "inherit",
1577
+ backgroundImage: "inherit",
1578
+ backgroundClip: "inherit",
1579
+ WebkitBackgroundClip: "inherit",
1580
+ backgroundAttachment: "inherit",
1581
+ backgroundPosition: "inherit",
1582
+ backgroundRepeat: "inherit",
1583
+ backgroundSize: "inherit",
1584
+ backgroundOrigin: "inherit",
1585
+ backgroundBlendMode: "inherit",
1586
+ color: "inherit",
1587
+ WebkitTextFillColor: "inherit"
1588
+ };
1589
+ }
1590
+ function Pe(r) {
1591
+ if (!r)
1592
+ return r;
1593
+ const e = le(r);
1594
+ if (e.length === 0)
1595
+ return r;
1596
+ const { nodes: t, sawEmoji: n } = $e(e);
1597
+ return n ? t.length === 1 ? t[0] ?? r : t : r;
1598
+ }
1599
+ function $e(r, e) {
1600
+ const t = [];
1601
+ let n = "", o = !1, s = e?.emoji ?? 0;
1602
+ const i = () => {
1603
+ n && (t.push(n), n = "");
1604
+ };
1605
+ for (const c of r) {
1606
+ if (Fe(c)) {
1607
+ o = !0, i();
1608
+ const u = `motion-emoji-${e ? e.emoji++ : s++}`;
1609
+ t.push(
1610
+ /* @__PURE__ */ S.jsx("span", { "data-motion-emoji": !0, children: c }, u)
1611
+ );
1612
+ continue;
1613
+ }
1614
+ n += c;
1615
+ }
1616
+ return i(), o ? { nodes: t, sawEmoji: !0 } : { nodes: [r.join("")], sawEmoji: !1 };
1617
+ }
1618
+ function Er(r) {
1619
+ if (!r)
1620
+ return p.None;
1621
+ const e = r.trim();
1622
+ if (!e)
1623
+ return p.None;
1624
+ const t = Oe.get(e);
1625
+ if (typeof t == "number")
1626
+ return t;
1627
+ if (typeof document > "u")
1628
+ return p.None;
1629
+ const n = e.split(/\s+/).filter(Boolean);
1630
+ if (n.length === 0)
1631
+ return p.None;
1632
+ const s = n.map((l) => `.${wr(l)}`).map(
1633
+ (l) => new RegExp(`(^|[^a-zA-Z0-9_-])${Rr(l)}(?![a-zA-Z0-9_-])`)
1634
+ );
1635
+ let i = p.None, c = !1;
1636
+ for (const l of Array.from(document.styleSheets)) {
1637
+ let u;
1638
+ try {
1639
+ u = l.cssRules;
1640
+ } catch {
1641
+ continue;
1642
+ }
1643
+ const d = Ve(u, s);
1644
+ if (d.mask && (i |= d.mask, i === ce))
1645
+ break;
1646
+ c ||= d.sawStyleRule;
1647
+ }
1648
+ return (i !== p.None || c) && Oe.set(e, i), i;
1649
+ }
1650
+ function Ve(r, e) {
1651
+ if (!r)
1652
+ return { mask: p.None, sawStyleRule: !1 };
1653
+ let t = p.None, n = !1;
1654
+ for (let o = 0; o < r.length; o++) {
1655
+ const s = r[o];
1656
+ if (s) {
1657
+ if (s.type === CSSRule.STYLE_RULE) {
1658
+ const c = s.selectorText ?? "";
1659
+ if (!c || !e.some((u) => u.test(c))) continue;
1660
+ n = !0;
1661
+ for (const u of rr)
1662
+ u.hints.some((d) => c.includes(d)) && (t |= u.flag);
1663
+ if (t === ce)
1664
+ return { mask: t, sawStyleRule: !0 };
1665
+ } else if ("cssRules" in s) {
1666
+ const i = Ve(s.cssRules, e);
1667
+ if (i.mask && (t |= i.mask, t === ce))
1668
+ return { mask: t, sawStyleRule: !0 };
1669
+ n ||= i.sawStyleRule;
1670
+ }
1671
+ }
1672
+ }
1673
+ return { mask: t, sawStyleRule: n };
1674
+ }
1675
+ function wr(r) {
1676
+ return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
1677
+ }
1678
+ function Rr(r) {
1679
+ return r.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
1176
1680
  }
1177
1681
  export {
1178
- He as IKON_UI_BASE_MODULE,
1179
- H as IKON_UI_STREAM_CATEGORY,
1180
- At as IkonUi,
1181
- Ze as IkonUiRegistry,
1182
- Ot as IkonUiSurface,
1183
- De as UiComponentRegistry,
1184
- $e as UiRenderer,
1185
- Lt as UiStreamStore,
1186
- jt as areIkonUiModuleListsEqual,
1187
- Ge as createBaseResolvers,
1188
- wt as createComponentLibrary,
1189
- _t as createIkonUiRegistry,
1190
- qe as isIkonUiCategoryMatch,
1191
- Xe as loadBaseModule,
1192
- Rt as normalizeIkonUiModuleList,
1193
- Pt as parseIkonUiInitPayload,
1194
- Tt as readIkonUiModules,
1195
- It as readIkonUiModulesFromSources,
1196
- Ke as registerBaseModule,
1197
- Mt as useIkonStyles,
1198
- Ue as useUiStore
1682
+ bt as IKON_UI_BASE_MODULE,
1683
+ Ct as IKON_UI_MEDIA_MODULE,
1684
+ se as IKON_UI_STREAM_CATEGORY,
1685
+ wt as IKON_UI_VIDEO_CANVAS_TYPE,
1686
+ Rt as IKON_UI_VIDEO_URL_PLAYER_TYPE,
1687
+ Ar as IkonUi,
1688
+ Ot as IkonUiRegistry,
1689
+ jr as IkonUiSurface,
1690
+ ut as UiComponentRegistry,
1691
+ lt as UiRenderer,
1692
+ zr as UiStreamStore,
1693
+ Mr as areIkonUiModuleListsEqual,
1694
+ St as createBaseResolvers,
1695
+ Cr as createComponentLibrary,
1696
+ Or as createIkonUiRegistry,
1697
+ Nt as createMediaResolvers,
1698
+ dt as isIkonUiCategoryMatch,
1699
+ vt as loadBaseModule,
1700
+ jt as loadMediaModule,
1701
+ er as normalizeIkonUiModuleList,
1702
+ Pr as parseIkonUiInitPayload,
1703
+ tr as readIkonUiModules,
1704
+ Ir as readIkonUiModulesFromSources,
1705
+ Et as registerBaseModule,
1706
+ At as registerMediaModule,
1707
+ Lr as renderMotionLetters,
1708
+ _r as useIkonStyles,
1709
+ nt as useUiStore
1199
1710
  };