@ikonai/sdk-react-ui 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/base-div.d.ts +1 -0
- package/base/base-module.d.ts +3 -2
- package/ikon-ui-registry.d.ts +3 -3
- package/ikon-ui.d.ts +0 -2
- package/index.d.ts +3 -1
- package/index.js +1211 -607
- 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 {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
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 x = { 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
|
|
25
|
-
|
|
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
|
-
case
|
|
76
|
-
return (
|
|
77
|
-
case
|
|
78
|
-
return (
|
|
79
|
-
case
|
|
80
|
-
var
|
|
81
|
-
return
|
|
82
|
-
case
|
|
83
|
-
return
|
|
84
|
-
case
|
|
85
|
-
|
|
75
|
+
case C:
|
|
76
|
+
return (a.displayName || "Context") + ".Provider";
|
|
77
|
+
case v:
|
|
78
|
+
return (a._context.displayName || "Context") + ".Consumer";
|
|
79
|
+
case T:
|
|
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
|
|
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
|
-
function
|
|
151
|
-
var
|
|
152
|
-
return
|
|
150
|
+
function l() {
|
|
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
|
-
get:
|
|
166
|
-
}) : Object.defineProperty(
|
|
165
|
+
get: l
|
|
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
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
260
|
+
w,
|
|
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
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
272
|
+
w,
|
|
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__ */
|
|
323
|
-
|
|
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
|
+
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
|
-
className:
|
|
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,41 +390,39 @@ class Be {
|
|
|
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
|
-
|
|
413
|
-
class Rt {
|
|
414
|
+
class Ar {
|
|
414
415
|
core;
|
|
415
416
|
ownsCore;
|
|
416
417
|
stores = /* @__PURE__ */ new Map();
|
|
417
418
|
listeners = /* @__PURE__ */ new Set();
|
|
418
|
-
unsubscribeUpdates;
|
|
419
419
|
unsubscribeClears;
|
|
420
420
|
unsubscribeStoreChanges;
|
|
421
421
|
constructor(e) {
|
|
422
|
-
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();
|
|
423
423
|
}
|
|
424
424
|
dispose() {
|
|
425
|
-
this.
|
|
425
|
+
this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
|
|
426
426
|
}
|
|
427
427
|
getStores() {
|
|
428
428
|
return this.stores;
|
|
@@ -438,84 +438,303 @@ class Rt {
|
|
|
438
438
|
subscribeToStyles(e) {
|
|
439
439
|
return this.core.subscribeToUiStyles(e);
|
|
440
440
|
}
|
|
441
|
-
handleUiUpdate = (e, t) => {
|
|
442
|
-
const s = this.ensureStoreEntry(e).store.apply(t), i = this.updateCategory(e);
|
|
443
|
-
(s || i) && this.notify(e);
|
|
444
|
-
};
|
|
445
441
|
handleUiStreamCleared = (e) => {
|
|
446
442
|
this.stores.delete(e) && this.notify(e);
|
|
447
443
|
};
|
|
448
444
|
syncStreamSnapshot = (e) => {
|
|
449
445
|
const t = this.core.uiStore.getSnapshot(e);
|
|
450
|
-
if (!t || !t.
|
|
446
|
+
if (!t || !t.rootViewId) {
|
|
451
447
|
this.handleUiStreamCleared(e);
|
|
452
448
|
return;
|
|
453
449
|
}
|
|
454
|
-
|
|
455
|
-
if (!r) {
|
|
450
|
+
if (!t.views.get(t.rootViewId)) {
|
|
456
451
|
this.handleUiStreamCleared(e);
|
|
457
452
|
return;
|
|
458
453
|
}
|
|
459
|
-
const s = this.ensureStoreEntry(e), i =
|
|
460
|
-
|
|
461
|
-
type: "full",
|
|
462
|
-
version: t.version ?? 0,
|
|
463
|
-
metadata: { containerId: t.rootContainerId },
|
|
464
|
-
root: r
|
|
465
|
-
},
|
|
466
|
-
payloads: t.payloads
|
|
467
|
-
}, a = s.store.apply(i), l = this.updateCategory(e, t.category);
|
|
468
|
-
(a || l) && this.notify(e);
|
|
454
|
+
const s = this.ensureStoreEntry(e).store.replaceSnapshot(t), i = this.updateCategory(e, t.category);
|
|
455
|
+
(s || i) && this.notify(e);
|
|
469
456
|
};
|
|
470
457
|
syncAllStreams() {
|
|
471
458
|
const e = this.core.uiStore.getSnapshots(), t = /* @__PURE__ */ new Set();
|
|
472
|
-
for (const
|
|
473
|
-
this.syncStreamSnapshot(
|
|
474
|
-
for (const
|
|
475
|
-
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));
|
|
476
463
|
}
|
|
477
464
|
ensureStoreEntry(e) {
|
|
478
465
|
const t = this.stores.get(e);
|
|
479
466
|
if (t)
|
|
480
467
|
return t;
|
|
481
|
-
const
|
|
482
|
-
category:
|
|
483
|
-
store: new
|
|
468
|
+
const n = {
|
|
469
|
+
category: se,
|
|
470
|
+
store: new He()
|
|
484
471
|
};
|
|
485
|
-
return this.stores.set(e,
|
|
472
|
+
return this.stores.set(e, n), n;
|
|
486
473
|
}
|
|
487
474
|
updateCategory(e, t) {
|
|
488
|
-
const
|
|
489
|
-
if (!
|
|
475
|
+
const n = this.stores.get(e);
|
|
476
|
+
if (!n)
|
|
490
477
|
return !1;
|
|
491
|
-
const
|
|
492
|
-
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);
|
|
493
480
|
}
|
|
494
481
|
notify(e) {
|
|
495
482
|
for (const t of this.listeners)
|
|
496
483
|
t(e);
|
|
497
484
|
}
|
|
498
485
|
}
|
|
499
|
-
function
|
|
500
|
-
|
|
501
|
-
const
|
|
502
|
-
return
|
|
486
|
+
function L(r) {
|
|
487
|
+
if (typeof r == "string") {
|
|
488
|
+
const e = r.trim();
|
|
489
|
+
return e.length > 0 ? e : void 0;
|
|
490
|
+
}
|
|
491
|
+
if (Array.isArray(r)) {
|
|
492
|
+
const e = r.filter((t) => typeof t == "string").map((t) => t.trim()).filter(Boolean);
|
|
493
|
+
return e.length > 0 ? e.join(" ") : void 0;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
function V(...r) {
|
|
497
|
+
const e = [];
|
|
498
|
+
for (const t of r)
|
|
499
|
+
t && t.trim() && e.push(t.trim());
|
|
500
|
+
return e.length > 0 ? e.join(" ") : void 0;
|
|
501
|
+
}
|
|
502
|
+
function D(r) {
|
|
503
|
+
if (!r)
|
|
504
|
+
return {};
|
|
505
|
+
const e = {};
|
|
506
|
+
for (const [t, n] of Object.entries(r))
|
|
507
|
+
n != null && (typeof n == "string" || typeof n == "number" || typeof n == "boolean") && (e[t] = n);
|
|
508
|
+
return e;
|
|
509
|
+
}
|
|
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(() => {
|
|
514
|
+
if (typeof document > "u")
|
|
515
|
+
return;
|
|
516
|
+
const l = i.current;
|
|
517
|
+
if (!l || n && l.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== n)
|
|
518
|
+
return;
|
|
519
|
+
const u = s !== !0;
|
|
520
|
+
if (u && typeof l.scrollIntoView == "function")
|
|
521
|
+
try {
|
|
522
|
+
l.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
523
|
+
} catch {
|
|
524
|
+
l.scrollIntoView();
|
|
525
|
+
}
|
|
526
|
+
if (typeof l.focus == "function")
|
|
527
|
+
try {
|
|
528
|
+
l.focus({ preventScroll: !u });
|
|
529
|
+
} catch {
|
|
530
|
+
l.focus();
|
|
531
|
+
}
|
|
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
|
+
);
|
|
543
|
+
});
|
|
544
|
+
return ({ type: e }) => {
|
|
545
|
+
if (e === "common.focus-hint")
|
|
546
|
+
return r;
|
|
547
|
+
};
|
|
548
|
+
}
|
|
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 });
|
|
503
553
|
});
|
|
504
554
|
return ({ type: e }) => {
|
|
505
555
|
if (e === "common.div")
|
|
506
|
-
return
|
|
556
|
+
return r;
|
|
507
557
|
};
|
|
508
558
|
}
|
|
509
|
-
|
|
510
|
-
function
|
|
511
|
-
|
|
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(
|
|
563
|
+
"form",
|
|
564
|
+
{
|
|
565
|
+
...s,
|
|
566
|
+
"data-ikon-node-id": t.id,
|
|
567
|
+
className: i,
|
|
568
|
+
onSubmit: (l) => l.preventDefault(),
|
|
569
|
+
children: c
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
});
|
|
573
|
+
return ({ type: e }) => {
|
|
574
|
+
if (e === "common.form")
|
|
575
|
+
return r;
|
|
576
|
+
};
|
|
512
577
|
}
|
|
513
|
-
|
|
514
|
-
function
|
|
515
|
-
|
|
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(
|
|
582
|
+
"div",
|
|
583
|
+
{
|
|
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,
|
|
589
|
+
children: c
|
|
590
|
+
}
|
|
591
|
+
);
|
|
592
|
+
});
|
|
593
|
+
return ({ type: e }) => {
|
|
594
|
+
if (e === "common.scroll-view")
|
|
595
|
+
return r;
|
|
596
|
+
};
|
|
516
597
|
}
|
|
517
|
-
|
|
518
|
-
|
|
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;
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
function St() {
|
|
619
|
+
return [
|
|
620
|
+
mt(),
|
|
621
|
+
pt(),
|
|
622
|
+
ht(),
|
|
623
|
+
gt(),
|
|
624
|
+
yt(),
|
|
625
|
+
ft()
|
|
626
|
+
];
|
|
627
|
+
}
|
|
628
|
+
const bt = "base", vt = async () => St();
|
|
629
|
+
function Et(r) {
|
|
630
|
+
r.registerModule(bt, vt);
|
|
631
|
+
}
|
|
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 {
|
|
519
738
|
baseResolvers = [];
|
|
520
739
|
moduleLoaders = /* @__PURE__ */ new Map();
|
|
521
740
|
moduleResolvers = /* @__PURE__ */ new Map();
|
|
@@ -525,65 +744,65 @@ class Ve {
|
|
|
525
744
|
this.baseResolvers.push(...t.filter(Boolean));
|
|
526
745
|
}
|
|
527
746
|
registerModule(e, t) {
|
|
528
|
-
const
|
|
529
|
-
if (!
|
|
747
|
+
const n = this.moduleLoaders.get(e);
|
|
748
|
+
if (!n) {
|
|
530
749
|
this.moduleLoaders.set(e, t);
|
|
531
750
|
return;
|
|
532
751
|
}
|
|
533
|
-
|
|
752
|
+
n !== t && (this.moduleLoaders.set(e, t), this.moduleResolvers.delete(e));
|
|
534
753
|
}
|
|
535
754
|
async loadRegisteredModules() {
|
|
536
755
|
let e = !1;
|
|
537
|
-
for (const [
|
|
538
|
-
if (!this.moduleResolvers.has(
|
|
756
|
+
for (const [n, o] of this.moduleLoaders.entries())
|
|
757
|
+
if (!this.moduleResolvers.has(n))
|
|
539
758
|
try {
|
|
540
|
-
const
|
|
541
|
-
this.moduleResolvers.set(
|
|
542
|
-
} catch (
|
|
543
|
-
|
|
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);
|
|
544
763
|
}
|
|
545
764
|
const t = [];
|
|
546
|
-
for (const
|
|
547
|
-
this.moduleResolvers.has(
|
|
548
|
-
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;
|
|
549
768
|
}
|
|
550
769
|
resolve(e) {
|
|
551
770
|
for (const t of this.baseResolvers) {
|
|
552
|
-
const
|
|
553
|
-
if (
|
|
771
|
+
const n = t(e);
|
|
772
|
+
if (n) return n;
|
|
554
773
|
}
|
|
555
774
|
for (const t of this.activeModuleOrder) {
|
|
556
|
-
const
|
|
557
|
-
if (!
|
|
558
|
-
|
|
775
|
+
const n = this.moduleResolvers.get(t);
|
|
776
|
+
if (!n) {
|
|
777
|
+
we.warn(`Missing resolvers for module ${t}`);
|
|
559
778
|
continue;
|
|
560
779
|
}
|
|
561
|
-
for (const
|
|
562
|
-
const
|
|
563
|
-
if (
|
|
780
|
+
for (const o of n) {
|
|
781
|
+
const s = o(e);
|
|
782
|
+
if (s) return s;
|
|
564
783
|
}
|
|
565
784
|
}
|
|
566
785
|
}
|
|
567
786
|
}
|
|
568
|
-
function
|
|
569
|
-
const
|
|
570
|
-
return
|
|
787
|
+
function Or() {
|
|
788
|
+
const r = new Ot();
|
|
789
|
+
return Et(r), At(r), r.loadRegisteredModules(), r;
|
|
571
790
|
}
|
|
572
|
-
function
|
|
573
|
-
return Array.isArray(
|
|
791
|
+
function _t(r) {
|
|
792
|
+
return Array.isArray(r) ? r : [r];
|
|
574
793
|
}
|
|
575
|
-
function
|
|
576
|
-
return
|
|
794
|
+
function Mt(r) {
|
|
795
|
+
return r ? _t(r).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
|
|
577
796
|
}
|
|
578
|
-
function
|
|
579
|
-
if (
|
|
797
|
+
function It(r, e) {
|
|
798
|
+
if (r.length !== e.length)
|
|
580
799
|
return !1;
|
|
581
|
-
for (let t = 0; t <
|
|
582
|
-
if (
|
|
800
|
+
for (let t = 0; t < r.length; t += 1)
|
|
801
|
+
if (r[t] !== e[t])
|
|
583
802
|
return !1;
|
|
584
803
|
return !0;
|
|
585
804
|
}
|
|
586
|
-
const
|
|
805
|
+
const te = ue("MotionController"), Re = {
|
|
587
806
|
ease: [0.25, 0.1, 0.25, 1],
|
|
588
807
|
"ease-in": [0.42, 0, 1, 1],
|
|
589
808
|
"ease-out": [0, 0, 0.58, 1],
|
|
@@ -613,99 +832,98 @@ const W = B("MotionController"), ce = {
|
|
|
613
832
|
"ease-out-back": [0.175, 0.885, 0.32, 1.275],
|
|
614
833
|
"ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
|
|
615
834
|
};
|
|
616
|
-
function
|
|
617
|
-
return
|
|
835
|
+
function N(r) {
|
|
836
|
+
return r <= 0 ? 0 : r >= 1 ? 1 : r;
|
|
618
837
|
}
|
|
619
|
-
function
|
|
620
|
-
if (
|
|
621
|
-
const e = `${
|
|
838
|
+
function ke(r) {
|
|
839
|
+
if (r == null) return;
|
|
840
|
+
const e = `${r}`.trim();
|
|
622
841
|
if (!e) return;
|
|
623
842
|
const t = Number.parseFloat(e);
|
|
624
843
|
return Number.isFinite(t) ? t : void 0;
|
|
625
844
|
}
|
|
626
|
-
function
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
h -= R / w;
|
|
845
|
+
function Ne(r) {
|
|
846
|
+
return typeof CSS < "u" && CSS.escape ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
847
|
+
}
|
|
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;
|
|
852
|
+
}
|
|
853
|
+
function g(h, y, v) {
|
|
854
|
+
return 3 * (3 * y - 3 * v + 1) * h * h + 2 * (3 * v - 6 * y) * h + 3 * y;
|
|
855
|
+
}
|
|
856
|
+
function k(h, y) {
|
|
857
|
+
for (let v = 0; v < 4; v += 1) {
|
|
858
|
+
const C = g(y, r, t);
|
|
859
|
+
if (C === 0)
|
|
860
|
+
return y;
|
|
861
|
+
const T = m(y, r, t) - h;
|
|
862
|
+
y -= T / C;
|
|
645
863
|
}
|
|
646
|
-
return
|
|
864
|
+
return y;
|
|
647
865
|
}
|
|
648
|
-
function
|
|
649
|
-
let
|
|
866
|
+
function A(h, y, v) {
|
|
867
|
+
let C = 0, T = 0, M = 0;
|
|
650
868
|
do
|
|
651
|
-
|
|
652
|
-
while (Math.abs(
|
|
653
|
-
return
|
|
654
|
-
}
|
|
655
|
-
function
|
|
656
|
-
let
|
|
657
|
-
const
|
|
658
|
-
for (;
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
const
|
|
662
|
-
return
|
|
663
|
-
}
|
|
664
|
-
for (let
|
|
665
|
-
|
|
666
|
-
return (
|
|
667
|
-
}
|
|
668
|
-
function
|
|
669
|
-
const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(
|
|
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);
|
|
871
|
+
return T;
|
|
872
|
+
}
|
|
873
|
+
function E(h) {
|
|
874
|
+
let y = 0, v = 1;
|
|
875
|
+
const C = 10;
|
|
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);
|
|
670
888
|
if (!e)
|
|
671
|
-
return (
|
|
672
|
-
const t = Math.max(1, parseInt(e[1], 10)),
|
|
673
|
-
return
|
|
674
|
-
}
|
|
675
|
-
function
|
|
676
|
-
if (!
|
|
677
|
-
return (t) =>
|
|
678
|
-
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();
|
|
679
897
|
if (!e || e === "linear")
|
|
680
|
-
return (t) =>
|
|
681
|
-
if (
|
|
682
|
-
const [t,
|
|
683
|
-
return (
|
|
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)));
|
|
684
902
|
}
|
|
685
903
|
if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
|
|
686
|
-
const
|
|
687
|
-
if (
|
|
688
|
-
const [s, i,
|
|
689
|
-
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)));
|
|
690
908
|
}
|
|
691
909
|
}
|
|
692
910
|
if (e.startsWith("steps(") && e.endsWith(")")) {
|
|
693
|
-
const t =
|
|
694
|
-
return (
|
|
911
|
+
const t = Pt(e);
|
|
912
|
+
return (n) => t(N(n));
|
|
695
913
|
}
|
|
696
|
-
return (t) =>
|
|
914
|
+
return (t) => N(t);
|
|
697
915
|
}
|
|
698
|
-
function
|
|
699
|
-
if (!
|
|
916
|
+
function xt(r) {
|
|
917
|
+
if (!r)
|
|
700
918
|
return;
|
|
701
|
-
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);
|
|
702
920
|
if (!e)
|
|
703
921
|
return;
|
|
704
|
-
const [t,
|
|
705
|
-
if (![t,
|
|
706
|
-
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 };
|
|
707
925
|
}
|
|
708
|
-
class
|
|
926
|
+
class Ut {
|
|
709
927
|
bindingsByStyle = /* @__PURE__ */ new Map();
|
|
710
928
|
observer;
|
|
711
929
|
observeScheduled = !1;
|
|
@@ -717,29 +935,29 @@ class Qe {
|
|
|
717
935
|
registerStyle(e, t) {
|
|
718
936
|
if (!e)
|
|
719
937
|
return;
|
|
720
|
-
const
|
|
721
|
-
if (!
|
|
938
|
+
const n = this.parseMetadata(t);
|
|
939
|
+
if (!n) {
|
|
722
940
|
this.bindingsByStyle.delete(e), this.cleanupStyle(e);
|
|
723
941
|
return;
|
|
724
942
|
}
|
|
725
|
-
this.bindingsByStyle.set(e,
|
|
943
|
+
this.bindingsByStyle.set(e, n), this.cleanupStyle(e), this.ensureObserver(), this.scheduleScan(e);
|
|
726
944
|
}
|
|
727
945
|
reset() {
|
|
728
946
|
for (const e of Array.from(this.globalCleanups))
|
|
729
947
|
try {
|
|
730
948
|
e();
|
|
731
949
|
} catch (t) {
|
|
732
|
-
|
|
950
|
+
te.warn("Failed to cleanup binding listener", t);
|
|
733
951
|
}
|
|
734
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);
|
|
735
953
|
}
|
|
736
954
|
parseMetadata(e) {
|
|
737
955
|
if (e)
|
|
738
956
|
try {
|
|
739
|
-
const
|
|
740
|
-
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 };
|
|
741
959
|
} catch (t) {
|
|
742
|
-
|
|
960
|
+
te.warn("Failed to parse motion metadata", t);
|
|
743
961
|
return;
|
|
744
962
|
}
|
|
745
963
|
}
|
|
@@ -747,16 +965,16 @@ class Qe {
|
|
|
747
965
|
const t = e.source?.trim();
|
|
748
966
|
if (!t)
|
|
749
967
|
return;
|
|
750
|
-
const
|
|
751
|
-
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 : {
|
|
752
970
|
source: t.toLowerCase(),
|
|
753
|
-
min:
|
|
754
|
-
max:
|
|
755
|
-
clamp:
|
|
756
|
-
reverse:
|
|
757
|
-
ease:
|
|
758
|
-
map:
|
|
759
|
-
targetId:
|
|
971
|
+
min: n,
|
|
972
|
+
max: s,
|
|
973
|
+
clamp: i === "freeze-start" || i === "freeze-end" || i === "unclamped" ? i : "clamp",
|
|
974
|
+
reverse: c,
|
|
975
|
+
ease: l,
|
|
976
|
+
map: u,
|
|
977
|
+
targetId: d
|
|
760
978
|
};
|
|
761
979
|
}
|
|
762
980
|
ensureObserver() {
|
|
@@ -786,79 +1004,79 @@ class Qe {
|
|
|
786
1004
|
this.scanScheduled = !1;
|
|
787
1005
|
return;
|
|
788
1006
|
}
|
|
789
|
-
const
|
|
1007
|
+
const o = Array.from(this.pendingScanStyles);
|
|
790
1008
|
this.pendingScanStyles.clear(), this.scanScheduled = !1;
|
|
791
|
-
for (const
|
|
792
|
-
this.scanExistingNodes(
|
|
793
|
-
},
|
|
1009
|
+
for (const s of o)
|
|
1010
|
+
this.scanExistingNodes(s);
|
|
1011
|
+
}, n = () => {
|
|
794
1012
|
this.scanScheduled = !0, typeof queueMicrotask == "function" ? queueMicrotask(t) : setTimeout(t, 0);
|
|
795
1013
|
};
|
|
796
1014
|
document.readyState === "loading" ? document.addEventListener(
|
|
797
1015
|
"DOMContentLoaded",
|
|
798
1016
|
() => {
|
|
799
|
-
|
|
1017
|
+
n();
|
|
800
1018
|
},
|
|
801
1019
|
{ once: !0 }
|
|
802
|
-
) :
|
|
1020
|
+
) : n();
|
|
803
1021
|
}
|
|
804
1022
|
scanExistingNodes(e) {
|
|
805
1023
|
const t = this.bindingsByStyle.get(e);
|
|
806
1024
|
if (!t || typeof document > "u")
|
|
807
1025
|
return;
|
|
808
|
-
const
|
|
809
|
-
document.querySelectorAll(
|
|
1026
|
+
const n = `.${Ne(e)}`;
|
|
1027
|
+
document.querySelectorAll(n).forEach((s) => this.applyStyleToElement(s, e, t));
|
|
810
1028
|
}
|
|
811
|
-
applyStyleToElement(e, t,
|
|
812
|
-
this.ensureStyleState(e, t) && this.attachBindings(e, t,
|
|
1029
|
+
applyStyleToElement(e, t, n) {
|
|
1030
|
+
this.ensureStyleState(e, t) && this.attachBindings(e, t, n);
|
|
813
1031
|
}
|
|
814
1032
|
ensureStyleState(e, t) {
|
|
815
|
-
let
|
|
816
|
-
if (
|
|
1033
|
+
let n = this.elementStates.get(e);
|
|
1034
|
+
if (n || (n = /* @__PURE__ */ new Map(), this.elementStates.set(e, n)), n.has(t))
|
|
817
1035
|
return !1;
|
|
818
|
-
|
|
819
|
-
let
|
|
820
|
-
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;
|
|
821
1039
|
}
|
|
822
|
-
attachBindings(e, t,
|
|
823
|
-
for (const
|
|
824
|
-
this.attachBinding(e, t,
|
|
1040
|
+
attachBindings(e, t, n) {
|
|
1041
|
+
for (const o of n.bindings)
|
|
1042
|
+
this.attachBinding(e, t, o);
|
|
825
1043
|
}
|
|
826
|
-
attachBinding(e, t,
|
|
827
|
-
switch (
|
|
1044
|
+
attachBinding(e, t, n) {
|
|
1045
|
+
switch (n.source) {
|
|
828
1046
|
case "scrolly":
|
|
829
|
-
this.attachScrollBinding(e, t,
|
|
1047
|
+
this.attachScrollBinding(e, t, n);
|
|
830
1048
|
break;
|
|
831
1049
|
}
|
|
832
1050
|
}
|
|
833
|
-
attachScrollBinding(e, t,
|
|
834
|
-
const
|
|
835
|
-
if (!
|
|
1051
|
+
attachScrollBinding(e, t, n) {
|
|
1052
|
+
const o = this.resolveScrollContainer(e, n);
|
|
1053
|
+
if (!o)
|
|
836
1054
|
return;
|
|
837
|
-
const
|
|
838
|
-
this.applyBindingValues(e,
|
|
1055
|
+
const s = () => {
|
|
1056
|
+
this.applyBindingValues(e, n, o.scrollTop);
|
|
839
1057
|
};
|
|
840
|
-
|
|
841
|
-
const
|
|
842
|
-
|
|
843
|
-
const
|
|
844
|
-
window.addEventListener("resize",
|
|
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();
|
|
1062
|
+
window.addEventListener("resize", c), this.registerCleanup(e, t, () => window.removeEventListener("resize", c));
|
|
845
1063
|
}
|
|
846
1064
|
resolveScrollContainer(e, t) {
|
|
847
1065
|
if (t.targetId) {
|
|
848
|
-
const
|
|
849
|
-
if (
|
|
850
|
-
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;
|
|
851
1069
|
}
|
|
852
|
-
return e.closest('[data-ikon-
|
|
853
|
-
}
|
|
854
|
-
applyBindingValues(e, t,
|
|
855
|
-
const
|
|
856
|
-
let
|
|
857
|
-
t.reverse && (
|
|
858
|
-
const
|
|
859
|
-
if (e.style.setProperty("--tw-motion-bind-source-value", `${
|
|
860
|
-
const
|
|
861
|
-
|
|
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}`);
|
|
862
1080
|
} else
|
|
863
1081
|
e.style.removeProperty("--tw-motion-bind-value");
|
|
864
1082
|
}
|
|
@@ -873,59 +1091,62 @@ class Qe {
|
|
|
873
1091
|
case "unclamped":
|
|
874
1092
|
return e;
|
|
875
1093
|
default:
|
|
876
|
-
return
|
|
1094
|
+
return N(e);
|
|
877
1095
|
}
|
|
878
1096
|
}
|
|
879
1097
|
applyMap(e, t) {
|
|
880
|
-
const
|
|
881
|
-
if (
|
|
1098
|
+
const n = t.inEnd - t.inStart;
|
|
1099
|
+
if (n === 0)
|
|
882
1100
|
return t.outEnd;
|
|
883
|
-
const
|
|
884
|
-
return t.outStart +
|
|
1101
|
+
const o = (e - t.inStart) / n;
|
|
1102
|
+
return t.outStart + o * (t.outEnd - t.outStart);
|
|
885
1103
|
}
|
|
886
|
-
registerCleanup(e, t,
|
|
887
|
-
const
|
|
888
|
-
|
|
1104
|
+
registerCleanup(e, t, n) {
|
|
1105
|
+
const s = this.elementStates.get(e)?.get(t);
|
|
1106
|
+
s && (s.add(n), this.globalCleanups.add(n));
|
|
889
1107
|
}
|
|
890
1108
|
cleanupStyle(e) {
|
|
891
1109
|
const t = this.styleToElements.get(e);
|
|
892
1110
|
if (!t)
|
|
893
1111
|
return;
|
|
894
|
-
const
|
|
895
|
-
for (const
|
|
896
|
-
this.cleanupElementStyle(
|
|
1112
|
+
const n = Array.from(t);
|
|
1113
|
+
for (const o of n)
|
|
1114
|
+
this.cleanupElementStyle(o, e);
|
|
897
1115
|
this.styleToElements.delete(e);
|
|
898
1116
|
}
|
|
899
1117
|
cleanupElement(e) {
|
|
900
1118
|
const t = this.elementStates.get(e);
|
|
901
1119
|
if (!t)
|
|
902
1120
|
return;
|
|
903
|
-
const
|
|
904
|
-
for (const
|
|
905
|
-
this.cleanupElementStyle(e,
|
|
1121
|
+
const n = Array.from(t.keys());
|
|
1122
|
+
for (const o of n)
|
|
1123
|
+
this.cleanupElementStyle(e, o);
|
|
906
1124
|
}
|
|
907
1125
|
cleanupElementStyle(e, t) {
|
|
908
|
-
const
|
|
909
|
-
if (!
|
|
1126
|
+
const n = this.elementStates.get(e);
|
|
1127
|
+
if (!n)
|
|
1128
|
+
return;
|
|
1129
|
+
const o = n.get(t);
|
|
1130
|
+
if (!o)
|
|
910
1131
|
return;
|
|
911
|
-
for (const
|
|
1132
|
+
for (const i of o) {
|
|
912
1133
|
try {
|
|
913
|
-
|
|
914
|
-
} catch (
|
|
915
|
-
|
|
1134
|
+
i();
|
|
1135
|
+
} catch (c) {
|
|
1136
|
+
te.warn("Failed to cleanup listener", c);
|
|
916
1137
|
}
|
|
917
|
-
this.globalCleanups.delete(
|
|
1138
|
+
this.globalCleanups.delete(i);
|
|
918
1139
|
}
|
|
919
|
-
|
|
920
|
-
const
|
|
921
|
-
|
|
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));
|
|
922
1143
|
}
|
|
923
1144
|
clearBindingProperties(e) {
|
|
924
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");
|
|
925
1146
|
}
|
|
926
1147
|
handleMutations(e) {
|
|
927
1148
|
for (const t of e)
|
|
928
|
-
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);
|
|
929
1150
|
}
|
|
930
1151
|
handleClassMutation(e) {
|
|
931
1152
|
const t = this.elementStates.get(e);
|
|
@@ -933,174 +1154,557 @@ class Qe {
|
|
|
933
1154
|
this.processElement(e);
|
|
934
1155
|
return;
|
|
935
1156
|
}
|
|
936
|
-
const
|
|
937
|
-
for (const
|
|
938
|
-
|
|
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);
|
|
939
1160
|
this.processElement(e);
|
|
940
1161
|
}
|
|
941
1162
|
scanNode(e) {
|
|
942
1163
|
if (!(e instanceof HTMLElement))
|
|
943
1164
|
return;
|
|
944
|
-
this.processElement(e), e.querySelectorAll("[class]").forEach((
|
|
1165
|
+
this.processElement(e), e.querySelectorAll("[class]").forEach((n) => this.processElement(n));
|
|
945
1166
|
}
|
|
946
1167
|
cleanupNode(e) {
|
|
947
1168
|
if (!(e instanceof HTMLElement))
|
|
948
1169
|
return;
|
|
949
|
-
this.cleanupElement(e), e.querySelectorAll("[class]").forEach((
|
|
1170
|
+
this.cleanupElement(e), e.querySelectorAll("[class]").forEach((n) => this.cleanupElement(n));
|
|
950
1171
|
}
|
|
951
1172
|
processElement(e) {
|
|
952
1173
|
if (!(!e.classList || e.classList.length === 0))
|
|
953
1174
|
for (const t of Array.from(e.classList)) {
|
|
954
|
-
const
|
|
955
|
-
|
|
1175
|
+
const n = this.bindingsByStyle.get(t);
|
|
1176
|
+
n && this.ensureStyleState(e, t) && this.attachBindings(e, t, n);
|
|
956
1177
|
}
|
|
957
1178
|
}
|
|
958
1179
|
}
|
|
959
|
-
const
|
|
960
|
-
function
|
|
961
|
-
const e =
|
|
962
|
-
if (!
|
|
963
|
-
let
|
|
964
|
-
|
|
965
|
-
}, []), t =
|
|
966
|
-
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();
|
|
967
1188
|
}, []);
|
|
968
|
-
return
|
|
969
|
-
if (!
|
|
970
|
-
for (const
|
|
971
|
-
e(
|
|
972
|
-
const
|
|
1189
|
+
return Y(() => {
|
|
1190
|
+
if (!r) return;
|
|
1191
|
+
for (const o of r.getUiStyles())
|
|
1192
|
+
e(o);
|
|
1193
|
+
const n = r.subscribeToStyles(e);
|
|
973
1194
|
return () => {
|
|
974
|
-
|
|
1195
|
+
n?.(), t();
|
|
975
1196
|
};
|
|
976
|
-
}, [
|
|
1197
|
+
}, [r, t, e]), Y(() => () => t(), [t]), { setStyle: e, reset: t };
|
|
977
1198
|
}
|
|
978
|
-
var
|
|
979
|
-
function
|
|
980
|
-
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];
|
|
981
1202
|
try {
|
|
982
|
-
|
|
983
|
-
var
|
|
1203
|
+
r[B] = void 0;
|
|
1204
|
+
var n = !0;
|
|
984
1205
|
} catch {
|
|
985
1206
|
}
|
|
986
|
-
var
|
|
987
|
-
return
|
|
1207
|
+
var o = Vt.call(r);
|
|
1208
|
+
return n && (e ? r[B] = t : delete r[B]), o;
|
|
988
1209
|
}
|
|
989
|
-
var
|
|
990
|
-
function
|
|
991
|
-
return
|
|
1210
|
+
var Wt = Object.prototype, qt = Wt.toString;
|
|
1211
|
+
function Yt(r) {
|
|
1212
|
+
return qt.call(r);
|
|
992
1213
|
}
|
|
993
|
-
var
|
|
994
|
-
function
|
|
995
|
-
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);
|
|
996
1217
|
}
|
|
997
|
-
function
|
|
998
|
-
return
|
|
1218
|
+
function Jt(r) {
|
|
1219
|
+
return r != null && typeof r == "object";
|
|
999
1220
|
}
|
|
1000
|
-
var
|
|
1001
|
-
function
|
|
1002
|
-
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;
|
|
1003
1224
|
}
|
|
1004
|
-
const
|
|
1005
|
-
function
|
|
1006
|
-
return typeof
|
|
1225
|
+
const Ae = "ikonUiModules";
|
|
1226
|
+
function ae(r) {
|
|
1227
|
+
return typeof r == "object" && r !== null && !Array.isArray(r);
|
|
1007
1228
|
}
|
|
1008
|
-
function
|
|
1009
|
-
if (!Array.isArray(
|
|
1229
|
+
function er(r) {
|
|
1230
|
+
if (!Array.isArray(r))
|
|
1010
1231
|
return;
|
|
1011
1232
|
const e = /* @__PURE__ */ new Set();
|
|
1012
|
-
for (const t of
|
|
1013
|
-
if (!
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1233
|
+
for (const t of r) {
|
|
1234
|
+
if (!Qt(t)) continue;
|
|
1235
|
+
const n = t.trim();
|
|
1236
|
+
n && (e.has(n) || e.add(n));
|
|
1016
1237
|
}
|
|
1017
1238
|
return Array.from(e);
|
|
1018
1239
|
}
|
|
1019
|
-
function
|
|
1020
|
-
if (
|
|
1240
|
+
function Mr(r, e) {
|
|
1241
|
+
if (r === e)
|
|
1021
1242
|
return !0;
|
|
1022
|
-
if (!
|
|
1023
|
-
return !
|
|
1024
|
-
if (
|
|
1243
|
+
if (!r || !e)
|
|
1244
|
+
return !r && !e;
|
|
1245
|
+
if (r.length !== e.length)
|
|
1025
1246
|
return !1;
|
|
1026
|
-
for (let t = 0; t <
|
|
1027
|
-
if (
|
|
1247
|
+
for (let t = 0; t < r.length; t += 1)
|
|
1248
|
+
if (r[t] !== e[t])
|
|
1028
1249
|
return !1;
|
|
1029
1250
|
return !0;
|
|
1030
1251
|
}
|
|
1031
|
-
function
|
|
1032
|
-
if (!(!
|
|
1033
|
-
return
|
|
1252
|
+
function tr(r) {
|
|
1253
|
+
if (!(!ae(r) || !Object.prototype.hasOwnProperty.call(r, Ae)))
|
|
1254
|
+
return er(r[Ae]);
|
|
1034
1255
|
}
|
|
1035
|
-
function
|
|
1036
|
-
for (const e of
|
|
1037
|
-
const t =
|
|
1256
|
+
function Ir(...r) {
|
|
1257
|
+
for (const e of r) {
|
|
1258
|
+
const t = tr(e);
|
|
1038
1259
|
if (t !== void 0)
|
|
1039
1260
|
return t;
|
|
1040
1261
|
}
|
|
1041
1262
|
}
|
|
1042
|
-
function
|
|
1043
|
-
if (!
|
|
1263
|
+
function Pr(r) {
|
|
1264
|
+
if (!ae(r))
|
|
1044
1265
|
return;
|
|
1045
|
-
const e =
|
|
1266
|
+
const e = r, t = Object.keys(e).find((l) => l.toLowerCase() === "modules");
|
|
1046
1267
|
if (!t)
|
|
1047
1268
|
return;
|
|
1048
|
-
const
|
|
1049
|
-
if (
|
|
1269
|
+
const n = e[t];
|
|
1270
|
+
if (n === null)
|
|
1050
1271
|
return { resetToDefault: !0 };
|
|
1051
|
-
if (!Array.isArray(
|
|
1272
|
+
if (!Array.isArray(n))
|
|
1052
1273
|
return;
|
|
1053
|
-
const
|
|
1054
|
-
for (const
|
|
1055
|
-
if (typeof
|
|
1056
|
-
const
|
|
1057
|
-
if (!
|
|
1274
|
+
const o = [], s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
1275
|
+
for (const l of n) {
|
|
1276
|
+
if (typeof l == "string") {
|
|
1277
|
+
const E = l.trim();
|
|
1278
|
+
if (!E || i.has(E))
|
|
1058
1279
|
continue;
|
|
1059
|
-
|
|
1280
|
+
o.push(E), i.add(E);
|
|
1060
1281
|
continue;
|
|
1061
1282
|
}
|
|
1062
|
-
if (!
|
|
1283
|
+
if (!ae(l))
|
|
1063
1284
|
continue;
|
|
1064
|
-
const
|
|
1065
|
-
if (!
|
|
1285
|
+
const u = l, d = Object.keys(u).find((E) => E.toLowerCase() === "name");
|
|
1286
|
+
if (!d)
|
|
1066
1287
|
continue;
|
|
1067
|
-
const
|
|
1068
|
-
if (typeof
|
|
1288
|
+
const m = u[d];
|
|
1289
|
+
if (typeof m != "string")
|
|
1069
1290
|
continue;
|
|
1070
|
-
const
|
|
1071
|
-
if (!
|
|
1291
|
+
const g = m.trim();
|
|
1292
|
+
if (!g)
|
|
1072
1293
|
continue;
|
|
1073
|
-
const
|
|
1074
|
-
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));
|
|
1075
1296
|
}
|
|
1076
|
-
if (!
|
|
1297
|
+
if (!o.length && s.size === 0)
|
|
1077
1298
|
return { modules: [] };
|
|
1078
|
-
const
|
|
1079
|
-
name:
|
|
1080
|
-
javascript:
|
|
1299
|
+
const c = Array.from(s.entries()).map(([l, u]) => ({
|
|
1300
|
+
name: l,
|
|
1301
|
+
javascript: u
|
|
1081
1302
|
}));
|
|
1082
|
-
return
|
|
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}`);
|
|
1083
1680
|
}
|
|
1084
1681
|
export {
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
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
|
|
1106
1710
|
};
|