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