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