@ikonai/sdk-react-ui-rive 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +450 -416
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Fit as
|
|
3
|
-
import { useUiNode as
|
|
4
|
-
var
|
|
1
|
+
import ge, { memo as be, useMemo as K, useRef as ee, useEffect as W, useCallback as H } from "react";
|
|
2
|
+
import { Fit as O, Alignment as S, Layout as he, useRive as ve, EventType as te } from "@rive-app/react-canvas";
|
|
3
|
+
import { useUiNode as ye } from "@ikonai/sdk-react-ui";
|
|
4
|
+
var J = { exports: {} }, q = {};
|
|
5
5
|
/**
|
|
6
6
|
* @license React
|
|
7
7
|
* react-jsx-runtime.production.js
|
|
@@ -13,27 +13,27 @@ var $ = { exports: {} }, z = {};
|
|
|
13
13
|
*/
|
|
14
14
|
var ce;
|
|
15
15
|
function pe() {
|
|
16
|
-
if (ce) return
|
|
16
|
+
if (ce) return q;
|
|
17
17
|
ce = 1;
|
|
18
18
|
var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
if (o !== void 0 && (
|
|
19
|
+
function i(s, r, o) {
|
|
20
|
+
var f = null;
|
|
21
|
+
if (o !== void 0 && (f = "" + o), r.key !== void 0 && (f = "" + r.key), "key" in r) {
|
|
22
22
|
o = {};
|
|
23
|
-
for (var
|
|
24
|
-
|
|
25
|
-
} else o =
|
|
26
|
-
return
|
|
23
|
+
for (var y in r)
|
|
24
|
+
y !== "key" && (o[y] = r[y]);
|
|
25
|
+
} else o = r;
|
|
26
|
+
return r = o.ref, {
|
|
27
27
|
$$typeof: e,
|
|
28
|
-
type:
|
|
29
|
-
key:
|
|
30
|
-
ref:
|
|
28
|
+
type: s,
|
|
29
|
+
key: f,
|
|
30
|
+
ref: r !== void 0 ? r : null,
|
|
31
31
|
props: o
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
return
|
|
34
|
+
return q.Fragment = n, q.jsx = i, q.jsxs = i, q;
|
|
35
35
|
}
|
|
36
|
-
var
|
|
36
|
+
var $ = {};
|
|
37
37
|
/**
|
|
38
38
|
* @license React
|
|
39
39
|
* react-jsx-runtime.development.js
|
|
@@ -44,46 +44,46 @@ var B = {};
|
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
46
|
var ue;
|
|
47
|
-
function
|
|
47
|
+
function Re() {
|
|
48
48
|
return ue || (ue = 1, process.env.NODE_ENV !== "production" && function() {
|
|
49
49
|
function e(t) {
|
|
50
50
|
if (t == null) return null;
|
|
51
51
|
if (typeof t == "function")
|
|
52
|
-
return t.$$typeof ===
|
|
52
|
+
return t.$$typeof === p ? null : t.displayName || t.name || null;
|
|
53
53
|
if (typeof t == "string") return t;
|
|
54
54
|
switch (t) {
|
|
55
|
-
case
|
|
55
|
+
case F:
|
|
56
56
|
return "Fragment";
|
|
57
|
-
case
|
|
57
|
+
case j:
|
|
58
58
|
return "Profiler";
|
|
59
|
-
case
|
|
59
|
+
case x:
|
|
60
60
|
return "StrictMode";
|
|
61
|
-
case b:
|
|
62
|
-
return "Suspense";
|
|
63
61
|
case m:
|
|
62
|
+
return "Suspense";
|
|
63
|
+
case b:
|
|
64
64
|
return "SuspenseList";
|
|
65
|
-
case
|
|
65
|
+
case R:
|
|
66
66
|
return "Activity";
|
|
67
67
|
}
|
|
68
68
|
if (typeof t == "object")
|
|
69
69
|
switch (typeof t.tag == "number" && console.error(
|
|
70
70
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
71
71
|
), t.$$typeof) {
|
|
72
|
-
case
|
|
72
|
+
case B:
|
|
73
73
|
return "Portal";
|
|
74
|
-
case
|
|
74
|
+
case l:
|
|
75
75
|
return (t.displayName || "Context") + ".Provider";
|
|
76
|
-
case
|
|
76
|
+
case a:
|
|
77
77
|
return (t._context.displayName || "Context") + ".Consumer";
|
|
78
78
|
case d:
|
|
79
|
-
var
|
|
80
|
-
return t = t.displayName, t || (t =
|
|
79
|
+
var u = t.render;
|
|
80
|
+
return t = t.displayName, t || (t = u.displayName || u.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
|
|
81
|
+
case h:
|
|
82
|
+
return u = t.displayName || null, u !== null ? u : e(t.type) || "Memo";
|
|
81
83
|
case g:
|
|
82
|
-
|
|
83
|
-
case v:
|
|
84
|
-
a = t._payload, t = t._init;
|
|
84
|
+
u = t._payload, t = t._init;
|
|
85
85
|
try {
|
|
86
|
-
return e(t(
|
|
86
|
+
return e(t(u));
|
|
87
87
|
} catch {
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -92,76 +92,76 @@ function ye() {
|
|
|
92
92
|
function n(t) {
|
|
93
93
|
return "" + t;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function i(t) {
|
|
96
96
|
try {
|
|
97
97
|
n(t);
|
|
98
|
-
var
|
|
98
|
+
var u = !1;
|
|
99
99
|
} catch {
|
|
100
|
-
|
|
100
|
+
u = !0;
|
|
101
101
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
return
|
|
106
|
-
|
|
102
|
+
if (u) {
|
|
103
|
+
u = console;
|
|
104
|
+
var v = u.error, w = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
105
|
+
return v.call(
|
|
106
|
+
u,
|
|
107
107
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
|
-
|
|
108
|
+
w
|
|
109
109
|
), n(t);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
if (t ===
|
|
114
|
-
if (typeof t == "object" && t !== null && t.$$typeof ===
|
|
112
|
+
function s(t) {
|
|
113
|
+
if (t === F) return "<>";
|
|
114
|
+
if (typeof t == "object" && t !== null && t.$$typeof === g)
|
|
115
115
|
return "<...>";
|
|
116
116
|
try {
|
|
117
|
-
var
|
|
118
|
-
return
|
|
117
|
+
var u = e(t);
|
|
118
|
+
return u ? "<" + u + ">" : "<...>";
|
|
119
119
|
} catch {
|
|
120
120
|
return "<...>";
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
var t =
|
|
123
|
+
function r() {
|
|
124
|
+
var t = V.A;
|
|
125
125
|
return t === null ? null : t.getOwner();
|
|
126
126
|
}
|
|
127
127
|
function o() {
|
|
128
128
|
return Error("react-stack-top-frame");
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
if (
|
|
132
|
-
var
|
|
133
|
-
if (
|
|
130
|
+
function f(t) {
|
|
131
|
+
if (U.call(t, "key")) {
|
|
132
|
+
var u = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
133
|
+
if (u && u.isReactWarning) return !1;
|
|
134
134
|
}
|
|
135
135
|
return t.key !== void 0;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
function
|
|
137
|
+
function y(t, u) {
|
|
138
|
+
function v() {
|
|
139
139
|
re || (re = !0, console.error(
|
|
140
140
|
"%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)",
|
|
141
|
-
|
|
141
|
+
u
|
|
142
142
|
));
|
|
143
143
|
}
|
|
144
|
-
|
|
145
|
-
get:
|
|
144
|
+
v.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
145
|
+
get: v,
|
|
146
146
|
configurable: !0
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function k() {
|
|
150
150
|
var t = e(this.type);
|
|
151
151
|
return oe[t] || (oe[t] = !0, console.error(
|
|
152
152
|
"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."
|
|
153
153
|
)), t = this.props.ref, t !== void 0 ? t : null;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
return
|
|
157
|
-
$$typeof:
|
|
155
|
+
function A(t, u, v, w, N, M, X, Z) {
|
|
156
|
+
return v = M.ref, t = {
|
|
157
|
+
$$typeof: D,
|
|
158
158
|
type: t,
|
|
159
|
-
key:
|
|
160
|
-
props:
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
159
|
+
key: u,
|
|
160
|
+
props: M,
|
|
161
|
+
_owner: N
|
|
162
|
+
}, (v !== void 0 ? v : null) !== null ? Object.defineProperty(t, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
|
-
get:
|
|
164
|
+
get: k
|
|
165
165
|
}) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
|
|
166
166
|
configurable: !1,
|
|
167
167
|
enumerable: !1,
|
|
@@ -184,113 +184,113 @@ function ye() {
|
|
|
184
184
|
value: Z
|
|
185
185
|
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
for (
|
|
193
|
-
E
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
function c(t, u, v, w, N, M, X, Z) {
|
|
188
|
+
var E = u.children;
|
|
189
|
+
if (E !== void 0)
|
|
190
|
+
if (w)
|
|
191
|
+
if (G(E)) {
|
|
192
|
+
for (w = 0; w < E.length; w++)
|
|
193
|
+
T(E[w]);
|
|
194
|
+
Object.freeze && Object.freeze(E);
|
|
195
195
|
} else
|
|
196
196
|
console.error(
|
|
197
197
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
198
198
|
);
|
|
199
|
-
else E
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
return
|
|
199
|
+
else T(E);
|
|
200
|
+
if (U.call(u, "key")) {
|
|
201
|
+
E = e(t);
|
|
202
|
+
var z = Object.keys(u).filter(function(me) {
|
|
203
|
+
return me !== "key";
|
|
204
204
|
});
|
|
205
|
-
|
|
205
|
+
w = 0 < z.length ? "{key: someKey, " + z.join(": ..., ") + ": ...}" : "{key: someKey}", ae[E + w] || (z = 0 < z.length ? "{" + z.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
207
207
|
let props = %s;
|
|
208
208
|
<%s {...props} />
|
|
209
209
|
React keys must be passed directly to JSX without using spread:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s key={someKey} {...props} />`,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
), ae[
|
|
212
|
+
w,
|
|
213
|
+
E,
|
|
214
|
+
z,
|
|
215
|
+
E
|
|
216
|
+
), ae[E + w] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
for (var Q in
|
|
221
|
-
Q !== "key" && (
|
|
222
|
-
} else
|
|
223
|
-
return
|
|
224
|
-
|
|
218
|
+
if (E = null, v !== void 0 && (i(v), E = "" + v), f(u) && (i(u.key), E = "" + u.key), "key" in u) {
|
|
219
|
+
v = {};
|
|
220
|
+
for (var Q in u)
|
|
221
|
+
Q !== "key" && (v[Q] = u[Q]);
|
|
222
|
+
} else v = u;
|
|
223
|
+
return E && y(
|
|
224
|
+
v,
|
|
225
225
|
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
|
226
|
-
),
|
|
226
|
+
), A(
|
|
227
227
|
t,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
E,
|
|
229
|
+
M,
|
|
230
|
+
N,
|
|
231
|
+
r(),
|
|
232
|
+
v,
|
|
233
233
|
X,
|
|
234
234
|
Z
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
typeof t == "object" && t !== null && t.$$typeof ===
|
|
237
|
+
function T(t) {
|
|
238
|
+
typeof t == "object" && t !== null && t.$$typeof === D && t._store && (t._store.validated = 1);
|
|
239
239
|
}
|
|
240
|
-
var
|
|
240
|
+
var P = ge, D = Symbol.for("react.transitional.element"), B = Symbol.for("react.portal"), F = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), p = Symbol.for("react.client.reference"), V = P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, G = Array.isArray, Y = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
|
-
|
|
243
|
+
P = {
|
|
244
244
|
"react-stack-bottom-frame": function(t) {
|
|
245
245
|
return t();
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var re, oe = {}, ie =
|
|
249
|
-
|
|
248
|
+
var re, oe = {}, ie = P["react-stack-bottom-frame"].bind(
|
|
249
|
+
P,
|
|
250
250
|
o
|
|
251
|
-
)(), se =
|
|
252
|
-
|
|
253
|
-
var
|
|
254
|
-
return
|
|
251
|
+
)(), se = Y(s(o)), ae = {};
|
|
252
|
+
$.Fragment = F, $.jsx = function(t, u, v, w, N) {
|
|
253
|
+
var M = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
254
|
+
return c(
|
|
255
255
|
t,
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
u,
|
|
257
|
+
v,
|
|
258
258
|
!1,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
w,
|
|
260
|
+
N,
|
|
261
|
+
M ? Error("react-stack-top-frame") : ie,
|
|
262
|
+
M ? Y(s(t)) : se
|
|
263
263
|
);
|
|
264
|
-
},
|
|
265
|
-
var
|
|
266
|
-
return
|
|
264
|
+
}, $.jsxs = function(t, u, v, w, N) {
|
|
265
|
+
var M = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
266
|
+
return c(
|
|
267
267
|
t,
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
u,
|
|
269
|
+
v,
|
|
270
270
|
!0,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
w,
|
|
272
|
+
N,
|
|
273
|
+
M ? Error("react-stack-top-frame") : ie,
|
|
274
|
+
M ? Y(s(t)) : se
|
|
275
275
|
);
|
|
276
276
|
};
|
|
277
|
-
}()),
|
|
277
|
+
}()), $;
|
|
278
278
|
}
|
|
279
279
|
var fe;
|
|
280
|
-
function
|
|
281
|
-
return fe || (fe = 1, process.env.NODE_ENV === "production" ?
|
|
280
|
+
function we() {
|
|
281
|
+
return fe || (fe = 1, process.env.NODE_ENV === "production" ? J.exports = pe() : J.exports = Re()), J.exports;
|
|
282
282
|
}
|
|
283
|
-
var ne =
|
|
283
|
+
var ne = we();
|
|
284
284
|
function C(e) {
|
|
285
285
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function _(e) {
|
|
288
288
|
if (typeof e == "string") {
|
|
289
289
|
const n = e.trim();
|
|
290
290
|
return n.length > 0 ? n : void 0;
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function I(e) {
|
|
294
294
|
if (typeof e == "boolean")
|
|
295
295
|
return e;
|
|
296
296
|
if (typeof e == "string") {
|
|
@@ -300,7 +300,7 @@ function N(e) {
|
|
|
300
300
|
return !1;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function L(e) {
|
|
304
304
|
if (typeof e == "number" && Number.isFinite(e))
|
|
305
305
|
return e;
|
|
306
306
|
if (typeof e == "string") {
|
|
@@ -316,482 +316,516 @@ function le(e) {
|
|
|
316
316
|
return n.length > 0 ? n : void 0;
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
function Ee(e, n,
|
|
320
|
-
const
|
|
321
|
-
for (const
|
|
322
|
-
if (typeof
|
|
323
|
-
const o =
|
|
324
|
-
o.length > 0 &&
|
|
319
|
+
function Ee(e, n, i) {
|
|
320
|
+
const s = [];
|
|
321
|
+
for (const r of e)
|
|
322
|
+
if (typeof r == "string") {
|
|
323
|
+
const o = r.trim();
|
|
324
|
+
o.length > 0 && s.push(o);
|
|
325
325
|
}
|
|
326
326
|
if (typeof n == "string") {
|
|
327
|
-
const
|
|
328
|
-
|
|
327
|
+
const r = n.trim();
|
|
328
|
+
r.length > 0 && s.push(r);
|
|
329
329
|
}
|
|
330
|
-
if (typeof
|
|
331
|
-
const
|
|
332
|
-
|
|
330
|
+
if (typeof i == "string") {
|
|
331
|
+
const r = i.trim();
|
|
332
|
+
r.length > 0 && s.push(r);
|
|
333
333
|
}
|
|
334
|
-
return
|
|
334
|
+
return s.length > 0 ? s.join(" ") : void 0;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function ke(e) {
|
|
337
337
|
if (typeof e == "string") {
|
|
338
338
|
const n = e.trim();
|
|
339
339
|
return n.length > 0 ? [n] : void 0;
|
|
340
340
|
}
|
|
341
341
|
if (Array.isArray(e)) {
|
|
342
|
-
const n = e.map((
|
|
342
|
+
const n = e.map((i) => typeof i == "string" ? i.trim() : "").filter((i) => i.length > 0);
|
|
343
343
|
return n.length > 0 ? Array.from(new Set(n)) : void 0;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
const
|
|
347
|
-
contain:
|
|
348
|
-
cover:
|
|
349
|
-
fill:
|
|
350
|
-
fitwidth:
|
|
351
|
-
fitheight:
|
|
352
|
-
width:
|
|
353
|
-
height:
|
|
354
|
-
scaledown:
|
|
355
|
-
layout:
|
|
356
|
-
stretch:
|
|
357
|
-
none:
|
|
346
|
+
const Te = {
|
|
347
|
+
contain: O.Contain,
|
|
348
|
+
cover: O.Cover,
|
|
349
|
+
fill: O.Fill,
|
|
350
|
+
fitwidth: O.FitWidth,
|
|
351
|
+
fitheight: O.FitHeight,
|
|
352
|
+
width: O.FitWidth,
|
|
353
|
+
height: O.FitHeight,
|
|
354
|
+
scaledown: O.ScaleDown,
|
|
355
|
+
layout: O.Layout,
|
|
356
|
+
stretch: O.Fill,
|
|
357
|
+
none: O.None
|
|
358
358
|
};
|
|
359
|
-
function
|
|
359
|
+
function _e(e) {
|
|
360
360
|
if (typeof e != "string")
|
|
361
361
|
return;
|
|
362
362
|
const n = e.replace(/[-_\s]/g, "").toLowerCase();
|
|
363
|
-
return
|
|
363
|
+
return Te[n];
|
|
364
364
|
}
|
|
365
|
-
const
|
|
366
|
-
center:
|
|
367
|
-
topleft:
|
|
368
|
-
topcenter:
|
|
369
|
-
topright:
|
|
370
|
-
centerleft:
|
|
371
|
-
centerright:
|
|
372
|
-
bottomleft:
|
|
373
|
-
bottomcenter:
|
|
374
|
-
bottomright:
|
|
365
|
+
const Ae = {
|
|
366
|
+
center: S.Center,
|
|
367
|
+
topleft: S.TopLeft,
|
|
368
|
+
topcenter: S.TopCenter,
|
|
369
|
+
topright: S.TopRight,
|
|
370
|
+
centerleft: S.CenterLeft,
|
|
371
|
+
centerright: S.CenterRight,
|
|
372
|
+
bottomleft: S.BottomLeft,
|
|
373
|
+
bottomcenter: S.BottomCenter,
|
|
374
|
+
bottomright: S.BottomRight
|
|
375
375
|
};
|
|
376
|
-
function
|
|
376
|
+
function Oe(e) {
|
|
377
377
|
if (typeof e != "string")
|
|
378
378
|
return;
|
|
379
379
|
const n = e.replace(/[-_\s]/g, "").toLowerCase();
|
|
380
|
-
return
|
|
380
|
+
return Ae[n];
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function Ce(e) {
|
|
383
383
|
if (!C(e))
|
|
384
384
|
return;
|
|
385
385
|
const n = {};
|
|
386
|
-
let
|
|
387
|
-
for (const [
|
|
388
|
-
const o =
|
|
386
|
+
let i = !1;
|
|
387
|
+
for (const [s, r] of Object.entries(e)) {
|
|
388
|
+
const o = s.trim();
|
|
389
389
|
if (!o)
|
|
390
390
|
continue;
|
|
391
|
-
const
|
|
392
|
-
|
|
391
|
+
const f = I(r);
|
|
392
|
+
f !== void 0 && (n[o] = f, i = !0);
|
|
393
393
|
}
|
|
394
|
-
return
|
|
394
|
+
return i ? n : void 0;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function de(e) {
|
|
397
397
|
if (!C(e))
|
|
398
398
|
return;
|
|
399
399
|
const n = {};
|
|
400
|
-
let
|
|
401
|
-
for (const [
|
|
402
|
-
const o =
|
|
400
|
+
let i = !1;
|
|
401
|
+
for (const [s, r] of Object.entries(e)) {
|
|
402
|
+
const o = s.trim();
|
|
403
403
|
if (!o)
|
|
404
404
|
continue;
|
|
405
|
-
const
|
|
406
|
-
|
|
405
|
+
const f = L(r);
|
|
406
|
+
f !== void 0 && (n[o] = f, i = !0);
|
|
407
407
|
}
|
|
408
|
-
return
|
|
408
|
+
return i ? n : void 0;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Me(e) {
|
|
411
411
|
if (!C(e))
|
|
412
412
|
return;
|
|
413
413
|
const n = {};
|
|
414
|
-
let
|
|
415
|
-
for (const [
|
|
416
|
-
const o =
|
|
414
|
+
let i = !1;
|
|
415
|
+
for (const [s, r] of Object.entries(e)) {
|
|
416
|
+
const o = s.trim();
|
|
417
417
|
if (!o)
|
|
418
418
|
continue;
|
|
419
|
-
const
|
|
420
|
-
|
|
419
|
+
const f = _(r);
|
|
420
|
+
f && (n[o] = f, i = !0);
|
|
421
421
|
}
|
|
422
|
-
return
|
|
422
|
+
return i ? n : void 0;
|
|
423
|
+
}
|
|
424
|
+
function Se(e) {
|
|
425
|
+
if (!C(e))
|
|
426
|
+
return;
|
|
427
|
+
const n = {};
|
|
428
|
+
let i = !1;
|
|
429
|
+
for (const [s, r] of Object.entries(e)) {
|
|
430
|
+
const o = s.trim();
|
|
431
|
+
if (!o || !C(r))
|
|
432
|
+
continue;
|
|
433
|
+
const f = L(r.r), y = L(r.g), k = L(r.b);
|
|
434
|
+
f === void 0 || y === void 0 || k === void 0 || (n[o] = { r: Math.round(f), g: Math.round(y), b: Math.round(k) }, i = !0);
|
|
435
|
+
}
|
|
436
|
+
return i ? n : void 0;
|
|
423
437
|
}
|
|
424
438
|
function je(e) {
|
|
425
439
|
if (!C(e))
|
|
426
440
|
return;
|
|
427
|
-
const n =
|
|
428
|
-
if (!(!n && !r && !
|
|
429
|
-
return { booleans: n, numbers:
|
|
441
|
+
const n = Ce(e.booleans), i = de(e.numbers), s = Me(e.strings), r = Se(e.colors), o = de(e.enums);
|
|
442
|
+
if (!(!n && !i && !s && !r && !o))
|
|
443
|
+
return { booleans: n, numbers: i, strings: s, colors: r, enums: o };
|
|
430
444
|
}
|
|
431
|
-
function
|
|
445
|
+
function Pe(e) {
|
|
432
446
|
if (!Array.isArray(e))
|
|
433
447
|
return;
|
|
434
448
|
const n = [];
|
|
435
|
-
for (const
|
|
436
|
-
if (!C(
|
|
449
|
+
for (const i of e) {
|
|
450
|
+
if (!C(i))
|
|
437
451
|
continue;
|
|
438
|
-
const
|
|
439
|
-
!
|
|
452
|
+
const s = _(i.name), r = L(i.sequence);
|
|
453
|
+
!s || r === void 0 || n.push({ name: s, sequence: r });
|
|
440
454
|
}
|
|
441
455
|
if (n.length !== 0)
|
|
442
456
|
return n;
|
|
443
457
|
}
|
|
444
|
-
function
|
|
458
|
+
function xe(e) {
|
|
445
459
|
if (!C(e))
|
|
446
460
|
return;
|
|
447
461
|
const n = {};
|
|
448
|
-
let
|
|
449
|
-
for (const [
|
|
450
|
-
const o =
|
|
462
|
+
let i = !1;
|
|
463
|
+
for (const [s, r] of Object.entries(e)) {
|
|
464
|
+
const o = s.trim();
|
|
451
465
|
if (o) {
|
|
452
|
-
if (typeof
|
|
453
|
-
n[o] =
|
|
466
|
+
if (typeof r == "boolean") {
|
|
467
|
+
n[o] = r, i = !0;
|
|
454
468
|
continue;
|
|
455
469
|
}
|
|
456
|
-
if (typeof
|
|
457
|
-
n[o] =
|
|
470
|
+
if (typeof r == "number" && Number.isFinite(r)) {
|
|
471
|
+
n[o] = r, i = !0;
|
|
458
472
|
continue;
|
|
459
473
|
}
|
|
460
|
-
if (typeof
|
|
461
|
-
const
|
|
462
|
-
if (!
|
|
474
|
+
if (typeof r == "string") {
|
|
475
|
+
const f = r.trim();
|
|
476
|
+
if (!f)
|
|
463
477
|
continue;
|
|
464
|
-
n[o] =
|
|
478
|
+
n[o] = f, i = !0;
|
|
465
479
|
}
|
|
466
480
|
}
|
|
467
481
|
}
|
|
468
|
-
return
|
|
482
|
+
return i ? n : void 0;
|
|
469
483
|
}
|
|
470
484
|
function Ne(e) {
|
|
471
485
|
if (!C(e))
|
|
472
486
|
return;
|
|
473
|
-
const n =
|
|
487
|
+
const n = _(e.name);
|
|
474
488
|
if (!n)
|
|
475
489
|
return;
|
|
476
|
-
const
|
|
490
|
+
const i = L(e.type), s = L(e.delay), r = _(e.url), o = _(e.target), f = xe(e.properties);
|
|
477
491
|
return {
|
|
478
492
|
name: n,
|
|
479
|
-
type:
|
|
480
|
-
delay:
|
|
481
|
-
url:
|
|
493
|
+
type: i === void 0 ? void 0 : Math.trunc(i),
|
|
494
|
+
delay: s,
|
|
495
|
+
url: r,
|
|
482
496
|
target: o,
|
|
483
|
-
properties:
|
|
497
|
+
properties: f
|
|
484
498
|
};
|
|
485
499
|
}
|
|
486
|
-
function
|
|
500
|
+
function Ie(e) {
|
|
487
501
|
if (!C(e))
|
|
488
502
|
return;
|
|
489
503
|
const n = {};
|
|
490
|
-
let
|
|
491
|
-
for (const [
|
|
492
|
-
const o =
|
|
504
|
+
let i = !1;
|
|
505
|
+
for (const [s, r] of Object.entries(e)) {
|
|
506
|
+
const o = s.trim();
|
|
493
507
|
if (!o)
|
|
494
508
|
continue;
|
|
495
|
-
const
|
|
496
|
-
|
|
509
|
+
const f = _(r);
|
|
510
|
+
f && (n[o] = f, i = !0);
|
|
497
511
|
}
|
|
498
|
-
return
|
|
512
|
+
return i ? n : void 0;
|
|
499
513
|
}
|
|
500
|
-
function
|
|
514
|
+
function Fe(e) {
|
|
501
515
|
if (!Array.isArray(e))
|
|
502
516
|
return;
|
|
503
517
|
const n = [];
|
|
504
|
-
for (const
|
|
505
|
-
if (!C(
|
|
518
|
+
for (const i of e) {
|
|
519
|
+
if (!C(i))
|
|
506
520
|
continue;
|
|
507
|
-
const
|
|
508
|
-
if (!
|
|
521
|
+
const s = _(i.key), r = _(i.input), o = _(i.kind);
|
|
522
|
+
if (!s || !r || !o)
|
|
509
523
|
continue;
|
|
510
|
-
const
|
|
511
|
-
let
|
|
512
|
-
switch (
|
|
524
|
+
const f = s.replace(/[-_\s]+/g, "").toLowerCase();
|
|
525
|
+
let y;
|
|
526
|
+
switch (f) {
|
|
513
527
|
case "arrowup":
|
|
514
528
|
case "up":
|
|
515
|
-
|
|
529
|
+
y = "ArrowUp";
|
|
516
530
|
break;
|
|
517
531
|
case "arrowdown":
|
|
518
532
|
case "down":
|
|
519
|
-
|
|
533
|
+
y = "ArrowDown";
|
|
520
534
|
break;
|
|
521
535
|
case "arrowleft":
|
|
522
536
|
case "left":
|
|
523
|
-
|
|
537
|
+
y = "ArrowLeft";
|
|
524
538
|
break;
|
|
525
539
|
case "arrowright":
|
|
526
540
|
case "right":
|
|
527
|
-
|
|
541
|
+
y = "ArrowRight";
|
|
528
542
|
break;
|
|
529
543
|
default:
|
|
530
544
|
continue;
|
|
531
545
|
}
|
|
532
|
-
const
|
|
533
|
-
let
|
|
534
|
-
|
|
546
|
+
const k = o.replace(/[-_\s]+/g, "").toLowerCase();
|
|
547
|
+
let A;
|
|
548
|
+
k === "boolean" ? A = "boolean" : k === "trigger" && (A = "trigger"), A && n.push({ key: y, input: r, kind: A });
|
|
535
549
|
}
|
|
536
550
|
return n.length > 0 ? n : void 0;
|
|
537
551
|
}
|
|
538
|
-
function
|
|
552
|
+
function Le(e, n) {
|
|
539
553
|
return n.byteLength > 0 ? (e.decode(n), !0) : !1;
|
|
540
554
|
}
|
|
541
|
-
function
|
|
555
|
+
function De() {
|
|
542
556
|
if (typeof globalThis > "u")
|
|
543
557
|
return !1;
|
|
544
|
-
const e = globalThis, n = typeof e.OffscreenCanvas < "u",
|
|
545
|
-
return n &&
|
|
558
|
+
const e = globalThis, n = typeof e.OffscreenCanvas < "u", i = typeof e.crossOriginIsolated == "boolean" ? e.crossOriginIsolated : !1;
|
|
559
|
+
return n && i;
|
|
546
560
|
}
|
|
547
|
-
function
|
|
548
|
-
const n =
|
|
549
|
-
() => new
|
|
550
|
-
fit: e.layoutFit ??
|
|
551
|
-
alignment: e.layoutAlignment ??
|
|
561
|
+
function ze(e) {
|
|
562
|
+
const n = K(
|
|
563
|
+
() => new he({
|
|
564
|
+
fit: e.layoutFit ?? O.Contain,
|
|
565
|
+
alignment: e.layoutAlignment ?? S.Center
|
|
552
566
|
}),
|
|
553
567
|
[e.layoutFit, e.layoutAlignment]
|
|
554
|
-
),
|
|
555
|
-
|
|
568
|
+
), i = K(() => De(), []), s = (e.useOffscreenRenderer ?? !0) && i, r = ee(null);
|
|
569
|
+
r.current === null && (r.current = {
|
|
556
570
|
src: e.src,
|
|
557
571
|
stateMachines: e.stateMachines,
|
|
558
572
|
autoplay: e.autoplay ?? !0,
|
|
559
|
-
useOffscreenRenderer:
|
|
573
|
+
useOffscreenRenderer: s,
|
|
560
574
|
autoBind: e.autoBind ?? !0,
|
|
561
575
|
enableMultiTouch: e.enableMultiTouch,
|
|
562
576
|
dispatchPointerExit: e.dispatchPointerExit,
|
|
563
577
|
isTouchScrollEnabled: e.isTouchScrollEnabled,
|
|
564
578
|
shouldDisableRiveListeners: e.shouldDisableRiveListeners,
|
|
565
579
|
layout: n,
|
|
566
|
-
assetLoader:
|
|
580
|
+
assetLoader: Le
|
|
567
581
|
});
|
|
568
|
-
const { rive: o, RiveComponent:
|
|
582
|
+
const { rive: o, RiveComponent: f } = ve(r.current), y = ee(/* @__PURE__ */ new Map()), { dispatchAction: k } = e, A = K(() => {
|
|
569
583
|
if (!e.eventHandlers)
|
|
570
584
|
return;
|
|
571
|
-
const
|
|
572
|
-
if (
|
|
585
|
+
const a = Object.entries(e.eventHandlers);
|
|
586
|
+
if (a.length === 0)
|
|
573
587
|
return;
|
|
574
|
-
const
|
|
575
|
-
for (const [d,
|
|
576
|
-
const
|
|
577
|
-
if (!
|
|
588
|
+
const l = /* @__PURE__ */ new Map();
|
|
589
|
+
for (const [d, m] of a) {
|
|
590
|
+
const b = d.trim();
|
|
591
|
+
if (!b)
|
|
578
592
|
continue;
|
|
579
|
-
const
|
|
580
|
-
|
|
593
|
+
const h = m.trim();
|
|
594
|
+
h && l.set(b, h);
|
|
581
595
|
}
|
|
582
|
-
return
|
|
583
|
-
}, [e.eventHandlers]),
|
|
596
|
+
return l.size > 0 ? l : void 0;
|
|
597
|
+
}, [e.eventHandlers]), c = K(() => {
|
|
584
598
|
if (!e.keyboardBindings || e.keyboardBindings.length === 0)
|
|
585
599
|
return;
|
|
586
|
-
const
|
|
587
|
-
for (const
|
|
588
|
-
const d =
|
|
589
|
-
d ? d.push(
|
|
600
|
+
const a = /* @__PURE__ */ new Map();
|
|
601
|
+
for (const l of e.keyboardBindings) {
|
|
602
|
+
const d = a.get(l.key);
|
|
603
|
+
d ? d.push(l) : a.set(l.key, [l]);
|
|
590
604
|
}
|
|
591
|
-
return
|
|
592
|
-
}, [e.keyboardBindings]),
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
}, [
|
|
596
|
-
const
|
|
597
|
-
if (!
|
|
605
|
+
return a;
|
|
606
|
+
}, [e.keyboardBindings]), T = ee(/* @__PURE__ */ new Set());
|
|
607
|
+
W(() => {
|
|
608
|
+
T.current.clear();
|
|
609
|
+
}, [c]), W(() => {
|
|
610
|
+
const a = o?.viewModelInstance;
|
|
611
|
+
if (!a)
|
|
598
612
|
return;
|
|
599
|
-
const
|
|
600
|
-
if (
|
|
601
|
-
for (const [
|
|
602
|
-
const
|
|
603
|
-
|
|
613
|
+
const l = e.viewModel?.booleans;
|
|
614
|
+
if (l)
|
|
615
|
+
for (const [g, R] of Object.entries(l)) {
|
|
616
|
+
const p = a.boolean(g);
|
|
617
|
+
p && (p.value = R);
|
|
604
618
|
}
|
|
605
619
|
const d = e.viewModel?.numbers;
|
|
606
620
|
if (d)
|
|
607
|
-
for (const [
|
|
608
|
-
const
|
|
609
|
-
|
|
621
|
+
for (const [g, R] of Object.entries(d)) {
|
|
622
|
+
const p = a.number(g);
|
|
623
|
+
p && (p.value = R);
|
|
610
624
|
}
|
|
611
|
-
const
|
|
625
|
+
const m = e.viewModel?.strings;
|
|
626
|
+
if (m)
|
|
627
|
+
for (const [g, R] of Object.entries(m)) {
|
|
628
|
+
const p = a.string(g);
|
|
629
|
+
p && (p.value = R);
|
|
630
|
+
}
|
|
631
|
+
const b = e.viewModel?.colors;
|
|
612
632
|
if (b)
|
|
613
|
-
for (const [
|
|
614
|
-
const
|
|
615
|
-
|
|
633
|
+
for (const [g, R] of Object.entries(b)) {
|
|
634
|
+
const p = a.color(g);
|
|
635
|
+
p && "rgb" in p && p.rgb(R.r, R.g, R.b);
|
|
636
|
+
}
|
|
637
|
+
const h = e.viewModel?.enums;
|
|
638
|
+
if (h)
|
|
639
|
+
for (const [g, R] of Object.entries(h)) {
|
|
640
|
+
const p = a.enum(g);
|
|
641
|
+
p && "valueIndex" in p && (p.valueIndex = R);
|
|
616
642
|
}
|
|
617
|
-
}, [e.viewModel, o]),
|
|
618
|
-
if (!(!o || !e.triggerRequests
|
|
619
|
-
for (const
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
643
|
+
}, [e.viewModel, o]), W(() => {
|
|
644
|
+
if (!(!o || !e.triggerRequests))
|
|
645
|
+
for (const a of e.triggerRequests) {
|
|
646
|
+
const l = y.current.get(a.name);
|
|
647
|
+
if (l !== void 0 && a.sequence <= l)
|
|
648
|
+
continue;
|
|
649
|
+
y.current.set(a.name, a.sequence);
|
|
650
|
+
let d = !1;
|
|
651
|
+
const m = o.viewModelInstance;
|
|
652
|
+
if (m) {
|
|
653
|
+
const b = m.trigger(a.name);
|
|
654
|
+
b && (b.trigger(), d = !0);
|
|
655
|
+
}
|
|
656
|
+
if (!d && e.stateMachines)
|
|
657
|
+
for (const b of e.stateMachines) {
|
|
658
|
+
const h = o.stateMachineInputs(b);
|
|
659
|
+
if (!h)
|
|
626
660
|
continue;
|
|
627
|
-
const
|
|
628
|
-
if (
|
|
629
|
-
|
|
661
|
+
const g = h.find((R) => R.name === a.name);
|
|
662
|
+
if (g && "fire" in g) {
|
|
663
|
+
g.fire();
|
|
630
664
|
break;
|
|
631
665
|
}
|
|
632
666
|
}
|
|
633
|
-
}
|
|
634
667
|
}
|
|
635
|
-
}, [e.triggerRequests, e.stateMachines, o]),
|
|
636
|
-
if (!o || !
|
|
668
|
+
}, [e.triggerRequests, e.stateMachines, o]), W(() => {
|
|
669
|
+
if (!o || !A || !k)
|
|
637
670
|
return;
|
|
638
|
-
const
|
|
639
|
-
if (
|
|
671
|
+
const a = (l) => {
|
|
672
|
+
if (l.type !== te.RiveEvent)
|
|
640
673
|
return;
|
|
641
|
-
const d = Ne(
|
|
674
|
+
const d = Ne(l.data);
|
|
642
675
|
if (!d)
|
|
643
676
|
return;
|
|
644
|
-
|
|
645
|
-
|
|
677
|
+
let m = A.get(d.name);
|
|
678
|
+
m || (m = A.get("*")), m && k(m, d);
|
|
646
679
|
};
|
|
647
|
-
return o.on?.(te.RiveEvent,
|
|
648
|
-
o.off?.(te.RiveEvent,
|
|
680
|
+
return o.on?.(te.RiveEvent, a), () => {
|
|
681
|
+
o.off?.(te.RiveEvent, a);
|
|
649
682
|
};
|
|
650
|
-
}, [o,
|
|
651
|
-
const
|
|
652
|
-
(
|
|
653
|
-
|
|
683
|
+
}, [o, A, k]);
|
|
684
|
+
const P = H(
|
|
685
|
+
(a) => {
|
|
686
|
+
c && a.currentTarget.focus();
|
|
654
687
|
},
|
|
655
|
-
[
|
|
656
|
-
),
|
|
657
|
-
(
|
|
658
|
-
if (!
|
|
688
|
+
[c]
|
|
689
|
+
), D = H(
|
|
690
|
+
(a) => {
|
|
691
|
+
if (!c)
|
|
659
692
|
return;
|
|
660
|
-
const
|
|
693
|
+
const l = a.key, d = c.get(l);
|
|
661
694
|
if (!d || d.length === 0)
|
|
662
695
|
return;
|
|
663
|
-
if (
|
|
664
|
-
|
|
696
|
+
if (T.current.has(l)) {
|
|
697
|
+
a.preventDefault();
|
|
665
698
|
return;
|
|
666
699
|
}
|
|
667
|
-
const
|
|
668
|
-
if (!
|
|
700
|
+
const m = o?.viewModelInstance;
|
|
701
|
+
if (!m)
|
|
669
702
|
return;
|
|
670
|
-
let
|
|
671
|
-
for (const
|
|
672
|
-
if (
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
} else if (
|
|
676
|
-
const
|
|
677
|
-
|
|
703
|
+
let b = !1;
|
|
704
|
+
for (const h of d)
|
|
705
|
+
if (h.kind === "boolean") {
|
|
706
|
+
const g = m.boolean(h.input);
|
|
707
|
+
g && (g.value = !0, b = !0);
|
|
708
|
+
} else if (h.kind === "trigger") {
|
|
709
|
+
const g = m.trigger(h.input);
|
|
710
|
+
g && (g.trigger(), b = !0);
|
|
678
711
|
}
|
|
679
|
-
|
|
712
|
+
b && (T.current.add(l), a.preventDefault());
|
|
680
713
|
},
|
|
681
|
-
[
|
|
682
|
-
),
|
|
683
|
-
(
|
|
684
|
-
if (!
|
|
714
|
+
[c, o]
|
|
715
|
+
), B = H(
|
|
716
|
+
(a) => {
|
|
717
|
+
if (!c)
|
|
685
718
|
return;
|
|
686
|
-
const
|
|
719
|
+
const l = a.key, d = c.get(l);
|
|
687
720
|
if (!d || d.length === 0)
|
|
688
721
|
return;
|
|
689
|
-
const
|
|
690
|
-
if (!
|
|
691
|
-
|
|
722
|
+
const m = o?.viewModelInstance;
|
|
723
|
+
if (!m) {
|
|
724
|
+
T.current.delete(l);
|
|
692
725
|
return;
|
|
693
726
|
}
|
|
694
|
-
|
|
695
|
-
let
|
|
696
|
-
for (const
|
|
697
|
-
if (
|
|
727
|
+
T.current.delete(l);
|
|
728
|
+
let b = !1;
|
|
729
|
+
for (const h of d) {
|
|
730
|
+
if (h.kind !== "boolean")
|
|
698
731
|
continue;
|
|
699
|
-
const
|
|
700
|
-
|
|
732
|
+
const g = m.boolean(h.input);
|
|
733
|
+
g && (g.value = !1, b = !0);
|
|
701
734
|
}
|
|
702
|
-
|
|
735
|
+
b && a.preventDefault();
|
|
703
736
|
},
|
|
704
|
-
[
|
|
705
|
-
),
|
|
706
|
-
if (!
|
|
707
|
-
|
|
737
|
+
[c, o]
|
|
738
|
+
), F = H(() => {
|
|
739
|
+
if (!c || c.size === 0) {
|
|
740
|
+
T.current.clear();
|
|
708
741
|
return;
|
|
709
742
|
}
|
|
710
|
-
const
|
|
711
|
-
if (
|
|
712
|
-
for (const d of
|
|
713
|
-
const
|
|
714
|
-
if (
|
|
715
|
-
for (const
|
|
716
|
-
if (
|
|
743
|
+
const a = o?.viewModelInstance, l = Array.from(T.current);
|
|
744
|
+
if (T.current.clear(), !!a)
|
|
745
|
+
for (const d of l) {
|
|
746
|
+
const m = c.get(d);
|
|
747
|
+
if (m)
|
|
748
|
+
for (const b of m) {
|
|
749
|
+
if (b.kind !== "boolean")
|
|
717
750
|
continue;
|
|
718
|
-
const
|
|
719
|
-
|
|
751
|
+
const h = a.boolean(b.input);
|
|
752
|
+
h && (h.value = !1);
|
|
720
753
|
}
|
|
721
754
|
}
|
|
722
|
-
}, [
|
|
723
|
-
e.backgroundColor && (
|
|
724
|
-
const
|
|
725
|
-
return /* @__PURE__ */ ne.jsx("div", { className: e.className, style:
|
|
726
|
-
|
|
755
|
+
}, [c, o]), x = {};
|
|
756
|
+
e.backgroundColor && (x.backgroundColor = e.backgroundColor), e.width && (x.width = e.width), e.height && (x.height = e.height);
|
|
757
|
+
const j = !!c;
|
|
758
|
+
return /* @__PURE__ */ ne.jsx("div", { className: e.className, style: x, children: /* @__PURE__ */ ne.jsx(
|
|
759
|
+
f,
|
|
727
760
|
{
|
|
728
761
|
style: { width: "100%", height: "100%", backgroundColor: "transparent" },
|
|
729
|
-
tabIndex:
|
|
730
|
-
onPointerDown:
|
|
731
|
-
onKeyDown:
|
|
732
|
-
onKeyUp:
|
|
733
|
-
onBlur:
|
|
762
|
+
tabIndex: j ? 0 : void 0,
|
|
763
|
+
onPointerDown: j ? P : void 0,
|
|
764
|
+
onKeyDown: j ? D : void 0,
|
|
765
|
+
onKeyUp: j ? B : void 0,
|
|
766
|
+
onBlur: j ? F : void 0
|
|
734
767
|
}
|
|
735
768
|
) });
|
|
736
769
|
}
|
|
737
|
-
function
|
|
770
|
+
function Be() {
|
|
738
771
|
const e = /* @__PURE__ */ new Map();
|
|
739
772
|
return (n) => {
|
|
740
773
|
if (n.type !== "rive-canvas")
|
|
741
774
|
return;
|
|
742
|
-
const
|
|
743
|
-
if (!
|
|
775
|
+
const i = _(n.props.src);
|
|
776
|
+
if (!i)
|
|
744
777
|
return;
|
|
745
|
-
const
|
|
746
|
-
if (
|
|
747
|
-
return
|
|
748
|
-
const
|
|
749
|
-
const
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
)
|
|
778
|
+
const s = e.get(n.id);
|
|
779
|
+
if (s)
|
|
780
|
+
return s;
|
|
781
|
+
const r = be(function({ nodeId: f, context: y, className: k }) {
|
|
782
|
+
const c = ye(y.store, f) ?? n, T = _(c.props.src) ?? i, P = ke(c.props.stateMachines), D = I(c.props.autoplay), B = I(c.props.autoBind), F = I(c.props.useOffscreenRenderer), x = I(c.props.enableMultiTouch), j = I(c.props.dispatchPointerExit), a = I(c.props.isTouchScrollEnabled), l = I(c.props.shouldDisableRiveListeners), d = Fe(c.props.keyboardBindings), m = _e(c.props.layoutFit), b = Oe(c.props.layoutAlignment), h = _(c.props.backgroundColor), g = le(c.props.width), R = le(c.props.height), p = je(c.props.viewModel), V = Pe(c.props.triggerRequests), U = Ie(c.props.eventHandlers), G = Ee(
|
|
783
|
+
c.styleIds,
|
|
784
|
+
k,
|
|
785
|
+
_(c.props.style)
|
|
786
|
+
), Y = `${m ?? "contain"}-${b ?? "center"}`;
|
|
754
787
|
return /* @__PURE__ */ ne.jsx(
|
|
755
|
-
|
|
788
|
+
ze,
|
|
756
789
|
{
|
|
757
|
-
src:
|
|
758
|
-
stateMachines:
|
|
759
|
-
autoplay:
|
|
760
|
-
autoBind:
|
|
761
|
-
useOffscreenRenderer:
|
|
762
|
-
enableMultiTouch:
|
|
763
|
-
dispatchPointerExit:
|
|
764
|
-
isTouchScrollEnabled:
|
|
765
|
-
shouldDisableRiveListeners:
|
|
790
|
+
src: T,
|
|
791
|
+
stateMachines: P,
|
|
792
|
+
autoplay: D,
|
|
793
|
+
autoBind: B,
|
|
794
|
+
useOffscreenRenderer: F,
|
|
795
|
+
enableMultiTouch: x,
|
|
796
|
+
dispatchPointerExit: j,
|
|
797
|
+
isTouchScrollEnabled: a,
|
|
798
|
+
shouldDisableRiveListeners: l,
|
|
766
799
|
keyboardBindings: d,
|
|
767
|
-
layoutFit:
|
|
768
|
-
layoutAlignment:
|
|
769
|
-
backgroundColor:
|
|
770
|
-
width:
|
|
771
|
-
height:
|
|
772
|
-
viewModel:
|
|
773
|
-
triggerRequests:
|
|
774
|
-
eventHandlers:
|
|
775
|
-
dispatchAction:
|
|
776
|
-
className:
|
|
777
|
-
}
|
|
800
|
+
layoutFit: m,
|
|
801
|
+
layoutAlignment: b,
|
|
802
|
+
backgroundColor: h,
|
|
803
|
+
width: g,
|
|
804
|
+
height: R,
|
|
805
|
+
viewModel: p,
|
|
806
|
+
triggerRequests: V,
|
|
807
|
+
eventHandlers: U,
|
|
808
|
+
dispatchAction: y.dispatchAction,
|
|
809
|
+
className: G
|
|
810
|
+
},
|
|
811
|
+
Y
|
|
778
812
|
);
|
|
779
813
|
});
|
|
780
|
-
return e.set(n.id,
|
|
814
|
+
return e.set(n.id, r), r;
|
|
781
815
|
};
|
|
782
816
|
}
|
|
783
|
-
const
|
|
784
|
-
function
|
|
785
|
-
return [
|
|
817
|
+
const Ve = "rive";
|
|
818
|
+
function Ye() {
|
|
819
|
+
return [Be()];
|
|
786
820
|
}
|
|
787
|
-
const
|
|
788
|
-
function
|
|
789
|
-
e.registerModule(
|
|
821
|
+
const qe = () => Ye();
|
|
822
|
+
function We(e) {
|
|
823
|
+
e.registerModule(Ve, qe);
|
|
790
824
|
}
|
|
791
825
|
export {
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
826
|
+
Ve as IKON_UI_RIVE_MODULE,
|
|
827
|
+
Be as createRiveCanvasResolver,
|
|
828
|
+
Ye as createRiveResolvers,
|
|
829
|
+
qe as loadRiveModule,
|
|
830
|
+
We as registerRiveModule
|
|
797
831
|
};
|