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