@pfct/purple 1.16.2 → 1.17.0
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/dist/chunks/Accordion.DYya7dTN.js +1 -0
- package/dist/chunks/Accordion.DgWTtf1u.js +716 -0
- package/dist/chunks/Divider.CptJ_x2Y.js +1 -0
- package/dist/chunks/{Divider.DBtnaPqJ.js → Divider.DR-c4z_i.js} +16 -13
- package/dist/chunks/DotLottie.BQNTv0XO.js +5 -0
- package/dist/chunks/DotLottie.qOfU0HjI.js +1993 -0
- package/dist/chunks/Switch.D7T_jbtK.js +207 -0
- package/dist/chunks/Switch.DUWZASi8.js +1 -0
- package/dist/chunks/Toast.Bnm65xmy.js +1 -0
- package/dist/chunks/Toast.C7OnkFjA.js +698 -0
- package/dist/chunks/{bottomSheet.BGKwHjuP.js → bottomSheet.DCURoJ3z.js} +1 -1
- package/dist/chunks/{bottomSheet.C99fAuQK.js → bottomSheet.DqOEMG09.js} +1 -1
- package/dist/chunks/checkbox.DjQsU_Pk.js +1 -0
- package/dist/chunks/{checkbox.DNdnhspb.js → checkbox.Dl8nNqLc.js} +100 -92
- package/dist/chunks/dist.AclwPuO5.js +1 -0
- package/dist/chunks/{dist.BskID78S.js → dist.B0edyUiC.js} +176 -178
- package/dist/chunks/dist.B4GZ3aX4.js +111 -0
- package/dist/chunks/dist.BE2xxxwt.js +96 -0
- package/dist/chunks/dist.Ba6P-3sU.js +1 -0
- package/dist/chunks/dist.BaV_5zx8.js +186 -0
- package/dist/chunks/{dist.CDZCWPu4.js → dist.BnLwXMBJ.js} +8 -4
- package/dist/chunks/dist.BpQ7SpeW.js +227 -0
- package/dist/chunks/dist.Bui5aGSB.js +197 -0
- package/dist/chunks/dist.CBOTGT1c.js +1 -0
- package/dist/chunks/dist.CIvT5XE_.js +1 -0
- package/dist/chunks/dist.CKG-hzoQ.js +1 -0
- package/dist/chunks/{dist.QtpYoD01.js → dist.CVClT59R.js} +8 -3
- package/dist/chunks/dist.CcSbgqVt.js +1 -0
- package/dist/chunks/dist.Cf8FjzvS.js +1 -0
- package/dist/chunks/{dist.DIjdcvlQ.js → dist.Cx1JFVV3.js} +48 -59
- package/dist/chunks/dist.D7s7BenH.js +1 -0
- package/dist/chunks/dist.DQ5uOc4y.js +1 -0
- package/dist/chunks/dist.DWzqVshx.js +16 -0
- package/dist/chunks/dist.DfLaHIBc.js +1 -0
- package/dist/chunks/dist.DomaJxrX.js +1 -0
- package/dist/chunks/dist.e7n2cf43.js +144 -0
- package/dist/chunks/dist.gUJz6qTg.js +185 -0
- package/dist/chunks/dist.zJ3rbM0i.js +1 -0
- package/dist/chunks/drawer.Cots0_ea.js +7 -0
- package/dist/chunks/drawer.ftfBm36h.js +1836 -0
- package/dist/chunks/es2015.CfvYaoE5.js +41 -0
- package/dist/chunks/{es2015.ByVyszJo.js → es2015.DCKfm2VN.js} +168 -187
- package/dist/chunks/{src.D-VoFbup.js → src.BAhu5d2_.js} +1 -1
- package/dist/chunks/{src.CmgILXZE.js → src.DlM6Ki-I.js} +5 -5
- package/dist/chunks/tooltip.8vKL7w2a.js +1 -0
- package/dist/chunks/tooltip.D9PoXwtV.js +448 -0
- package/dist/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.esm.js +1 -1
- package/dist/components/Control/Switch/index.cjs.js +1 -1
- package/dist/components/Control/Switch/index.esm.js +1 -1
- package/dist/components/Control/index.cjs.js +1 -1
- package/dist/components/Control/index.esm.js +2 -2
- package/dist/components/Divider/index.cjs.js +1 -1
- package/dist/components/Divider/index.esm.js +1 -1
- package/dist/components/LegacyModal/index.cjs.js +1 -1
- package/dist/components/LegacyModal/index.esm.js +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.esm.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.esm.js +1 -1
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.esm.js +1 -1
- package/dist/components/Pagination/index.cjs.js +1 -1
- package/dist/components/Pagination/index.esm.js +1 -1
- package/dist/components/Tabs/FillTabs/index.cjs.js +1 -1
- package/dist/components/Tabs/FillTabs/index.esm.js +1 -1
- package/dist/components/Tabs/index.cjs.js +1 -1
- package/dist/components/Tabs/index.esm.js +1 -1
- package/dist/components/Tag/index.cjs.js +1 -1
- package/dist/components/Tag/index.esm.js +1 -1
- package/dist/components/Terms/index.cjs.js +1 -1
- package/dist/components/Terms/index.esm.js +3 -3
- package/dist/components/Toast/index.cjs.js +1 -1
- package/dist/components/Toast/index.esm.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.esm.js +8 -8
- package/dist/components/ui/bottomSheet.cjs.js +1 -1
- package/dist/components/ui/bottomSheet.esm.js +1 -1
- package/dist/components/ui/button.cjs.js +1 -1
- package/dist/components/ui/button.esm.js +1 -1
- package/dist/components/ui/checkbox.cjs.js +1 -1
- package/dist/components/ui/checkbox.esm.js +1 -1
- package/dist/components/ui/dialog.cjs.js +1 -1
- package/dist/components/ui/dialog.esm.js +1 -1
- package/dist/components/ui/drawer.cjs.js +1 -1
- package/dist/components/ui/drawer.esm.js +1 -1
- package/dist/components/ui/impact-tooltip.cjs.js +1 -1
- package/dist/components/ui/impact-tooltip.esm.js +1 -1
- package/dist/components/ui/select.cjs.js +1 -1
- package/dist/components/ui/select.esm.js +3 -3
- package/dist/components/ui/tooltip.cjs.js +1 -1
- package/dist/components/ui/tooltip.esm.js +1 -1
- package/dist/components/ui/typography.cjs.js +1 -1
- package/dist/components/ui/typography.esm.js +1 -1
- package/dist/icons/src/aliases/aliases.cjs.js +1 -1
- package/dist/icons/src/aliases/aliases.d.ts +1 -1
- package/dist/icons/src/aliases/aliases.d.ts.map +1 -1
- package/dist/icons/src/aliases/aliases.esm.js +3 -3
- package/dist/icons/src/aliases/index.cjs.js +1 -1
- package/dist/icons/src/aliases/index.esm.js +3 -3
- package/dist/icons/src/aliases/prefixed.cjs.js +1 -1
- package/dist/icons/src/aliases/prefixed.d.ts +9 -9
- package/dist/icons/src/aliases/prefixed.d.ts.map +1 -1
- package/dist/icons/src/aliases/prefixed.esm.js +3 -3
- package/dist/icons/src/aliases/suffixed.cjs.js +1 -1
- package/dist/icons/src/aliases/suffixed.d.ts +10 -10
- package/dist/icons/src/aliases/suffixed.d.ts.map +1 -1
- package/dist/icons/src/aliases/suffixed.esm.js +3 -3
- package/dist/icons/src/icons/index.cjs.js +1 -1
- package/dist/icons/src/icons/index.esm.js +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +12 -12
- package/dist/library/DotLottie/index.cjs.js +1 -1
- package/dist/library/DotLottie/index.d.ts +13 -0
- package/dist/library/DotLottie/index.d.ts.map +1 -1
- package/dist/library/DotLottie/index.esm.js +1 -1
- package/dist/library/Lottie/index.cjs.js +1 -1
- package/dist/library/Lottie/index.d.ts +13 -0
- package/dist/library/Lottie/index.d.ts.map +1 -1
- package/dist/library/Lottie/index.esm.js +25 -25
- package/dist/library/index.cjs.js +1 -1
- package/dist/library/index.esm.js +1 -1
- package/package.json +4 -4
- package/dist/chunks/Accordion.Cs1f4aQZ.js +0 -373
- package/dist/chunks/Accordion.ZIp0NsA0.js +0 -1
- package/dist/chunks/Divider.BIS4pXEy.js +0 -1
- package/dist/chunks/DotLottie.CaDygpsw.js +0 -73962
- package/dist/chunks/DotLottie.Cf-SL2bJ.js +0 -5
- package/dist/chunks/Switch.C6xwIjJR.js +0 -1
- package/dist/chunks/Switch.D_myxCrS.js +0 -200
- package/dist/chunks/Toast.Cjdk4za6.js +0 -1
- package/dist/chunks/Toast.D1-VfeA2.js +0 -685
- package/dist/chunks/checkbox.CfWB_nqn.js +0 -1
- package/dist/chunks/dist.B2wZmrK1.js +0 -98
- package/dist/chunks/dist.B8tpQk-4.js +0 -1
- package/dist/chunks/dist.BC0-iqKU.js +0 -1
- package/dist/chunks/dist.BGATFz6w.js +0 -1
- package/dist/chunks/dist.BQIeYu70.js +0 -1
- package/dist/chunks/dist.BWsA5f1f.js +0 -1
- package/dist/chunks/dist.BixLWWwb.js +0 -71
- package/dist/chunks/dist.Bxqi8VAi.js +0 -1
- package/dist/chunks/dist.C8FJXTu6.js +0 -10
- package/dist/chunks/dist.C8NniehT.js +0 -1
- package/dist/chunks/dist.C8k7jQIp.js +0 -87
- package/dist/chunks/dist.CEJ-WCY_.js +0 -44
- package/dist/chunks/dist.CIQdvun-.js +0 -1
- package/dist/chunks/dist.Cff8LOoN.js +0 -67
- package/dist/chunks/dist.CmRTDXGG.js +0 -1
- package/dist/chunks/dist.CwMFqhEQ.js +0 -146
- package/dist/chunks/dist.CwWM0zXK.js +0 -25
- package/dist/chunks/dist.CyhalHxz.js +0 -1
- package/dist/chunks/dist.Czpint58.js +0 -1
- package/dist/chunks/dist.D3cPoDZ_.js +0 -194
- package/dist/chunks/dist.D4mQo5QB.js +0 -1
- package/dist/chunks/dist.D5ataprQ.js +0 -1
- package/dist/chunks/dist.D6A3yc_d.js +0 -11
- package/dist/chunks/dist.DKOi9kq6.js +0 -1
- package/dist/chunks/dist.DhCw5vjE.js +0 -1
- package/dist/chunks/dist.DrfVZqiO.js +0 -186
- package/dist/chunks/dist.SHmlpKFY.js +0 -1
- package/dist/chunks/dist.kg7EEYPp.js +0 -12
- package/dist/chunks/drawer.Cji5AtcU.js +0 -1720
- package/dist/chunks/drawer.Gt1AjdVH.js +0 -7
- package/dist/chunks/es2015.D2emqwtq.js +0 -41
- package/dist/chunks/tooltip.DGgNTZ5B.js +0 -444
- package/dist/chunks/tooltip.vEwTtt8v.js +0 -1
|
@@ -0,0 +1,1993 @@
|
|
|
1
|
+
import { t as e } from "./utils.UNiIm9Bz.js";
|
|
2
|
+
import t from "../hooks/useLayoutIsMobile.esm.js";
|
|
3
|
+
import "../hooks/index.esm.js";
|
|
4
|
+
import { t as n } from "./dist.e7n2cf43.js";
|
|
5
|
+
import { IconWithImage as r } from "../library/IconWithImage/index.esm.js";
|
|
6
|
+
import { useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
7
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
8
|
+
//#region node_modules/@lottiefiles/dotlottie-web/dist/index.js
|
|
9
|
+
function l(e) {
|
|
10
|
+
"@babel/helpers - typeof";
|
|
11
|
+
return l = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
12
|
+
return typeof e;
|
|
13
|
+
} : function(e) {
|
|
14
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
15
|
+
}, l(e);
|
|
16
|
+
}
|
|
17
|
+
function u(e, t) {
|
|
18
|
+
if (l(e) != "object" || !e) return e;
|
|
19
|
+
var n = e[Symbol.toPrimitive];
|
|
20
|
+
if (n !== void 0) {
|
|
21
|
+
var r = n.call(e, t || "default");
|
|
22
|
+
if (l(r) != "object") return r;
|
|
23
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
24
|
+
}
|
|
25
|
+
return (t === "string" ? String : Number)(e);
|
|
26
|
+
}
|
|
27
|
+
function d(e) {
|
|
28
|
+
var t = u(e, "string");
|
|
29
|
+
return l(t) == "symbol" ? t : t + "";
|
|
30
|
+
}
|
|
31
|
+
function f(e, t, n) {
|
|
32
|
+
return (t = d(t)) in e ? Object.defineProperty(e, t, {
|
|
33
|
+
value: n,
|
|
34
|
+
enumerable: !0,
|
|
35
|
+
configurable: !0,
|
|
36
|
+
writable: !0
|
|
37
|
+
}) : e[t] = n, e;
|
|
38
|
+
}
|
|
39
|
+
var p = class {
|
|
40
|
+
requestAnimationFrame(e) {
|
|
41
|
+
return requestAnimationFrame(e);
|
|
42
|
+
}
|
|
43
|
+
cancelAnimationFrame(e) {
|
|
44
|
+
cancelAnimationFrame(e);
|
|
45
|
+
}
|
|
46
|
+
}, m = class {
|
|
47
|
+
constructor() {
|
|
48
|
+
f(this, "_lastHandleId", 0), f(this, "_lastImmediate", null);
|
|
49
|
+
}
|
|
50
|
+
requestAnimationFrame(e) {
|
|
51
|
+
return this._lastHandleId >= 2 ** 53 - 1 && (this._lastHandleId = 0), this._lastHandleId += 1, this._lastImmediate = setImmediate(() => {
|
|
52
|
+
e(performance.now());
|
|
53
|
+
}), this._lastHandleId;
|
|
54
|
+
}
|
|
55
|
+
cancelAnimationFrame(e) {
|
|
56
|
+
this._lastImmediate && clearImmediate(this._lastImmediate);
|
|
57
|
+
}
|
|
58
|
+
}, h = class {
|
|
59
|
+
constructor() {
|
|
60
|
+
f(this, "_strategy", void 0), this._strategy = typeof requestAnimationFrame == "function" ? new p() : new m();
|
|
61
|
+
}
|
|
62
|
+
requestAnimationFrame(e) {
|
|
63
|
+
return this._strategy.requestAnimationFrame(e);
|
|
64
|
+
}
|
|
65
|
+
cancelAnimationFrame(e) {
|
|
66
|
+
this._strategy.cancelAnimationFrame(e);
|
|
67
|
+
}
|
|
68
|
+
}, g = typeof window < "u" && window.document !== void 0, _ = new Uint8Array([
|
|
69
|
+
80,
|
|
70
|
+
75,
|
|
71
|
+
3,
|
|
72
|
+
4
|
|
73
|
+
]), v = [
|
|
74
|
+
"v",
|
|
75
|
+
"ip",
|
|
76
|
+
"op",
|
|
77
|
+
"layers",
|
|
78
|
+
"fr",
|
|
79
|
+
"w",
|
|
80
|
+
"h"
|
|
81
|
+
], y, b = Array(128).fill(void 0);
|
|
82
|
+
b.push(void 0, null, !0, !1);
|
|
83
|
+
function x(e) {
|
|
84
|
+
return b[e];
|
|
85
|
+
}
|
|
86
|
+
var S = b.length;
|
|
87
|
+
function C(e) {
|
|
88
|
+
S === b.length && b.push(b.length + 1);
|
|
89
|
+
let t = S;
|
|
90
|
+
return S = b[t], b[t] = e, t;
|
|
91
|
+
}
|
|
92
|
+
function w(e, t) {
|
|
93
|
+
try {
|
|
94
|
+
return e.apply(this, t);
|
|
95
|
+
} catch (e) {
|
|
96
|
+
y.__wbindgen_export_0(C(e));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
var T = 0, E = null;
|
|
100
|
+
function D() {
|
|
101
|
+
return (E === null || E.byteLength === 0) && (E = new Uint8Array(y.memory.buffer)), E;
|
|
102
|
+
}
|
|
103
|
+
var O = typeof TextEncoder < "u" ? new TextEncoder("utf-8") : { encode: () => {
|
|
104
|
+
throw Error("TextEncoder not available");
|
|
105
|
+
} }, k = typeof O.encodeInto == "function" ? function(e, t) {
|
|
106
|
+
return O.encodeInto(e, t);
|
|
107
|
+
} : function(e, t) {
|
|
108
|
+
let n = O.encode(e);
|
|
109
|
+
return t.set(n), {
|
|
110
|
+
read: e.length,
|
|
111
|
+
written: n.length
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
function A(e, t, n) {
|
|
115
|
+
if (n === void 0) {
|
|
116
|
+
let n = O.encode(e), r = t(n.length, 1) >>> 0;
|
|
117
|
+
return D().subarray(r, r + n.length).set(n), T = n.length, r;
|
|
118
|
+
}
|
|
119
|
+
let r = e.length, i = t(r, 1) >>> 0, a = D(), o = 0;
|
|
120
|
+
for (; o < r; o++) {
|
|
121
|
+
let t = e.charCodeAt(o);
|
|
122
|
+
if (t > 127) break;
|
|
123
|
+
a[i + o] = t;
|
|
124
|
+
}
|
|
125
|
+
if (o !== r) {
|
|
126
|
+
o !== 0 && (e = e.slice(o)), i = n(i, r, r = o + e.length * 3, 1) >>> 0;
|
|
127
|
+
let t = D().subarray(i + o, i + r), a = k(e, t);
|
|
128
|
+
o += a.written, i = n(i, r, o, 1) >>> 0;
|
|
129
|
+
}
|
|
130
|
+
return T = o, i;
|
|
131
|
+
}
|
|
132
|
+
var j = null;
|
|
133
|
+
function M() {
|
|
134
|
+
return (j === null || j.buffer.detached === !0 || j.buffer.detached === void 0 && j.buffer !== y.memory.buffer) && (j = new DataView(y.memory.buffer)), j;
|
|
135
|
+
}
|
|
136
|
+
var N = typeof TextDecoder < "u" ? new TextDecoder("utf-8", {
|
|
137
|
+
ignoreBOM: !0,
|
|
138
|
+
fatal: !0
|
|
139
|
+
}) : { decode: () => {
|
|
140
|
+
throw Error("TextDecoder not available");
|
|
141
|
+
} };
|
|
142
|
+
typeof TextDecoder < "u" && N.decode();
|
|
143
|
+
function P(e, t) {
|
|
144
|
+
return e >>>= 0, N.decode(D().subarray(e, e + t));
|
|
145
|
+
}
|
|
146
|
+
function ee(e) {
|
|
147
|
+
e < 132 || (b[e] = S, S = e);
|
|
148
|
+
}
|
|
149
|
+
function F(e) {
|
|
150
|
+
let t = x(e);
|
|
151
|
+
return ee(e), t;
|
|
152
|
+
}
|
|
153
|
+
function I(e) {
|
|
154
|
+
return e == null;
|
|
155
|
+
}
|
|
156
|
+
function L(e, t) {
|
|
157
|
+
let n = t(e.length * 1, 1) >>> 0;
|
|
158
|
+
return D().set(e, n / 1), T = e.length, n;
|
|
159
|
+
}
|
|
160
|
+
function te(e, t) {
|
|
161
|
+
let n = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), r = T, i = L(t, y.__wbindgen_export_1), a = T;
|
|
162
|
+
return y.register_font(n, r, i, a) !== 0;
|
|
163
|
+
}
|
|
164
|
+
var R = null;
|
|
165
|
+
function ne() {
|
|
166
|
+
return (R === null || R.byteLength === 0) && (R = new Float32Array(y.memory.buffer)), R;
|
|
167
|
+
}
|
|
168
|
+
function re(e, t) {
|
|
169
|
+
let n = t(e.length * 4, 4) >>> 0;
|
|
170
|
+
return ne().set(e, n / 4), T = e.length, n;
|
|
171
|
+
}
|
|
172
|
+
function ie(e, t) {
|
|
173
|
+
let n = t(e.length * 4, 4) >>> 0, r = M();
|
|
174
|
+
for (let t = 0; t < e.length; t++) r.setUint32(n + 4 * t, C(e[t]), !0);
|
|
175
|
+
return T = e.length, n;
|
|
176
|
+
}
|
|
177
|
+
var z = Object.freeze({
|
|
178
|
+
Forward: 0,
|
|
179
|
+
0: "Forward",
|
|
180
|
+
Reverse: 1,
|
|
181
|
+
1: "Reverse",
|
|
182
|
+
Bounce: 2,
|
|
183
|
+
2: "Bounce",
|
|
184
|
+
ReverseBounce: 3,
|
|
185
|
+
3: "ReverseBounce"
|
|
186
|
+
}), B = Object.freeze({
|
|
187
|
+
Idle: 0,
|
|
188
|
+
0: "Idle",
|
|
189
|
+
Playing: 1,
|
|
190
|
+
1: "Playing",
|
|
191
|
+
Paused: 2,
|
|
192
|
+
2: "Paused",
|
|
193
|
+
Stopped: 3,
|
|
194
|
+
3: "Stopped",
|
|
195
|
+
Tweening: 4,
|
|
196
|
+
4: "Tweening"
|
|
197
|
+
}), V = typeof FinalizationRegistry > "u" ? {
|
|
198
|
+
register: () => {},
|
|
199
|
+
unregister: () => {}
|
|
200
|
+
} : new FinalizationRegistry((e) => y.__wbg_dotlottieplayerwasm_free(e >>> 0, 1)), ae = class {
|
|
201
|
+
__destroy_into_raw() {
|
|
202
|
+
let e = this.__wbg_ptr;
|
|
203
|
+
return this.__wbg_ptr = 0, V.unregister(this), e;
|
|
204
|
+
}
|
|
205
|
+
free() {
|
|
206
|
+
let e = this.__destroy_into_raw();
|
|
207
|
+
y.__wbg_dotlottieplayerwasm_free(e, 0);
|
|
208
|
+
}
|
|
209
|
+
clear_slot(e) {
|
|
210
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
211
|
+
return y.dotlottieplayerwasm_clear_slot(this.__wbg_ptr, t, n) !== 0;
|
|
212
|
+
}
|
|
213
|
+
layout_fit() {
|
|
214
|
+
let e, t;
|
|
215
|
+
try {
|
|
216
|
+
let i = y.__wbindgen_add_to_stack_pointer(-16);
|
|
217
|
+
y.dotlottieplayerwasm_layout_fit(i, this.__wbg_ptr);
|
|
218
|
+
var n = M().getInt32(i + 0, !0), r = M().getInt32(i + 4, !0);
|
|
219
|
+
return e = n, t = r, P(n, r);
|
|
220
|
+
} finally {
|
|
221
|
+
y.__wbindgen_add_to_stack_pointer(16), y.__wbindgen_export_3(e, t, 1);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
loop_count() {
|
|
225
|
+
return y.dotlottieplayerwasm_loop_count(this.__wbg_ptr) >>> 0;
|
|
226
|
+
}
|
|
227
|
+
poll_event() {
|
|
228
|
+
return F(y.dotlottieplayerwasm_poll_event(this.__wbg_ptr));
|
|
229
|
+
}
|
|
230
|
+
reset_slot(e) {
|
|
231
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
232
|
+
return y.dotlottieplayerwasm_reset_slot(this.__wbg_ptr, t, n) !== 0;
|
|
233
|
+
}
|
|
234
|
+
set_layout(e, t, n) {
|
|
235
|
+
let r = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), i = T;
|
|
236
|
+
return y.dotlottieplayerwasm_set_layout(this.__wbg_ptr, r, i, t, n) !== 0;
|
|
237
|
+
}
|
|
238
|
+
set_marker(e) {
|
|
239
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
240
|
+
y.dotlottieplayerwasm_set_marker(this.__wbg_ptr, t, n);
|
|
241
|
+
}
|
|
242
|
+
clear_slots() {
|
|
243
|
+
return y.dotlottieplayerwasm_clear_slots(this.__wbg_ptr) !== 0;
|
|
244
|
+
}
|
|
245
|
+
is_complete() {
|
|
246
|
+
return y.dotlottieplayerwasm_is_complete(this.__wbg_ptr) !== 0;
|
|
247
|
+
}
|
|
248
|
+
reset_slots() {
|
|
249
|
+
return y.dotlottieplayerwasm_reset_slots(this.__wbg_ptr) !== 0;
|
|
250
|
+
}
|
|
251
|
+
reset_theme() {
|
|
252
|
+
return y.dotlottieplayerwasm_reset_theme(this.__wbg_ptr) !== 0;
|
|
253
|
+
}
|
|
254
|
+
segment_end() {
|
|
255
|
+
return y.dotlottieplayerwasm_segment_end(this.__wbg_ptr);
|
|
256
|
+
}
|
|
257
|
+
set_quality(e) {
|
|
258
|
+
return y.dotlottieplayerwasm_set_quality(this.__wbg_ptr, e) !== 0;
|
|
259
|
+
}
|
|
260
|
+
set_segment(e, t) {
|
|
261
|
+
return y.dotlottieplayerwasm_set_segment(this.__wbg_ptr, e, t) !== 0;
|
|
262
|
+
}
|
|
263
|
+
sm_set_seed(e) {
|
|
264
|
+
return y.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr, e) !== 0;
|
|
265
|
+
}
|
|
266
|
+
static unload_font(e) {
|
|
267
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
268
|
+
return y.dotlottieplayerwasm_unload_font(t, n) !== 0;
|
|
269
|
+
}
|
|
270
|
+
animation_id() {
|
|
271
|
+
try {
|
|
272
|
+
let n = y.__wbindgen_add_to_stack_pointer(-16);
|
|
273
|
+
y.dotlottieplayerwasm_animation_id(n, this.__wbg_ptr);
|
|
274
|
+
var e = M().getInt32(n + 0, !0), t = M().getInt32(n + 4, !0);
|
|
275
|
+
let r;
|
|
276
|
+
return e !== 0 && (r = P(e, t).slice(), y.__wbindgen_export_3(e, t * 1, 1)), r;
|
|
277
|
+
} finally {
|
|
278
|
+
y.__wbindgen_add_to_stack_pointer(16);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
audio_volume() {
|
|
282
|
+
return y.dotlottieplayerwasm_audio_volume(this.__wbg_ptr);
|
|
283
|
+
}
|
|
284
|
+
background_a() {
|
|
285
|
+
return y.dotlottieplayerwasm_background_a(this.__wbg_ptr);
|
|
286
|
+
}
|
|
287
|
+
background_b() {
|
|
288
|
+
return y.dotlottieplayerwasm_background_b(this.__wbg_ptr);
|
|
289
|
+
}
|
|
290
|
+
background_g() {
|
|
291
|
+
return y.dotlottieplayerwasm_background_g(this.__wbg_ptr);
|
|
292
|
+
}
|
|
293
|
+
background_r() {
|
|
294
|
+
return y.dotlottieplayerwasm_background_r(this.__wbg_ptr);
|
|
295
|
+
}
|
|
296
|
+
clear_marker() {
|
|
297
|
+
y.dotlottieplayerwasm_clear_marker(this.__wbg_ptr);
|
|
298
|
+
}
|
|
299
|
+
emit_on_loop() {
|
|
300
|
+
y.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr);
|
|
301
|
+
}
|
|
302
|
+
get_slot_ids() {
|
|
303
|
+
return F(y.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr));
|
|
304
|
+
}
|
|
305
|
+
get_slot_str(e) {
|
|
306
|
+
try {
|
|
307
|
+
let r = y.__wbindgen_add_to_stack_pointer(-16), i = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), a = T;
|
|
308
|
+
y.dotlottieplayerwasm_get_slot_str(r, this.__wbg_ptr, i, a);
|
|
309
|
+
var t = M().getInt32(r + 0, !0), n = M().getInt32(r + 4, !0);
|
|
310
|
+
let o;
|
|
311
|
+
return t !== 0 && (o = P(t, n).slice(), y.__wbindgen_export_3(t, n * 1, 1)), o;
|
|
312
|
+
} finally {
|
|
313
|
+
y.__wbindgen_add_to_stack_pointer(16);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
marker_names() {
|
|
317
|
+
return F(y.dotlottieplayerwasm_marker_names(this.__wbg_ptr));
|
|
318
|
+
}
|
|
319
|
+
set_autoplay(e) {
|
|
320
|
+
y.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr, e);
|
|
321
|
+
}
|
|
322
|
+
set_slot_str(e, t) {
|
|
323
|
+
let n = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), r = T, i = A(t, y.__wbindgen_export_1, y.__wbindgen_export_2), a = T;
|
|
324
|
+
return y.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr, n, r, i, a) !== 0;
|
|
325
|
+
}
|
|
326
|
+
set_viewport(e, t, n, r) {
|
|
327
|
+
return y.dotlottieplayerwasm_set_viewport(this.__wbg_ptr, e, t, n, r) !== 0;
|
|
328
|
+
}
|
|
329
|
+
total_frames() {
|
|
330
|
+
return y.dotlottieplayerwasm_total_frames(this.__wbg_ptr);
|
|
331
|
+
}
|
|
332
|
+
clear_segment() {
|
|
333
|
+
return y.dotlottieplayerwasm_clear_segment(this.__wbg_ptr) !== 0;
|
|
334
|
+
}
|
|
335
|
+
current_frame() {
|
|
336
|
+
return y.dotlottieplayerwasm_current_frame(this.__wbg_ptr);
|
|
337
|
+
}
|
|
338
|
+
get_slot_type(e) {
|
|
339
|
+
try {
|
|
340
|
+
let r = y.__wbindgen_add_to_stack_pointer(-16), i = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), a = T;
|
|
341
|
+
y.dotlottieplayerwasm_get_slot_type(r, this.__wbg_ptr, i, a);
|
|
342
|
+
var t = M().getInt32(r + 0, !0), n = M().getInt32(r + 4, !0);
|
|
343
|
+
let o;
|
|
344
|
+
return t !== 0 && (o = P(t, n).slice(), y.__wbindgen_export_3(t, n * 1, 1)), o;
|
|
345
|
+
} finally {
|
|
346
|
+
y.__wbindgen_add_to_stack_pointer(16);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
get_slots_str() {
|
|
350
|
+
let e, t;
|
|
351
|
+
try {
|
|
352
|
+
let i = y.__wbindgen_add_to_stack_pointer(-16);
|
|
353
|
+
y.dotlottieplayerwasm_get_slots_str(i, this.__wbg_ptr);
|
|
354
|
+
var n = M().getInt32(i + 0, !0), r = M().getInt32(i + 4, !0);
|
|
355
|
+
return e = n, t = r, P(n, r);
|
|
356
|
+
} finally {
|
|
357
|
+
y.__wbindgen_add_to_stack_pointer(16), y.__wbindgen_export_3(e, t, 1);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
get_transform() {
|
|
361
|
+
return F(y.dotlottieplayerwasm_get_transform(this.__wbg_ptr));
|
|
362
|
+
}
|
|
363
|
+
segment_start() {
|
|
364
|
+
return y.dotlottieplayerwasm_segment_start(this.__wbg_ptr);
|
|
365
|
+
}
|
|
366
|
+
set_slots_str(e) {
|
|
367
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
368
|
+
return y.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr, t, n) !== 0;
|
|
369
|
+
}
|
|
370
|
+
set_text_slot(e, t) {
|
|
371
|
+
let n = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), r = T, i = A(t, y.__wbindgen_export_1, y.__wbindgen_export_2), a = T;
|
|
372
|
+
return y.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr, n, r, i, a) !== 0;
|
|
373
|
+
}
|
|
374
|
+
set_transform(e) {
|
|
375
|
+
let t = re(e, y.__wbindgen_export_1), n = T;
|
|
376
|
+
return y.dotlottieplayerwasm_set_transform(this.__wbg_ptr, t, n) !== 0;
|
|
377
|
+
}
|
|
378
|
+
sm_get_inputs() {
|
|
379
|
+
return F(y.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr));
|
|
380
|
+
}
|
|
381
|
+
sm_poll_event() {
|
|
382
|
+
return F(y.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr));
|
|
383
|
+
}
|
|
384
|
+
sm_post_click(e, t) {
|
|
385
|
+
y.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr, e, t);
|
|
386
|
+
}
|
|
387
|
+
animation_size() {
|
|
388
|
+
return F(y.dotlottieplayerwasm_animation_size(this.__wbg_ptr));
|
|
389
|
+
}
|
|
390
|
+
current_marker() {
|
|
391
|
+
try {
|
|
392
|
+
let n = y.__wbindgen_add_to_stack_pointer(-16);
|
|
393
|
+
y.dotlottieplayerwasm_current_marker(n, this.__wbg_ptr);
|
|
394
|
+
var e = M().getInt32(n + 0, !0), t = M().getInt32(n + 4, !0);
|
|
395
|
+
let r;
|
|
396
|
+
return e !== 0 && (r = P(e, t).slice(), y.__wbindgen_export_3(e, t * 1, 1)), r;
|
|
397
|
+
} finally {
|
|
398
|
+
y.__wbindgen_add_to_stack_pointer(16);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
layout_align_x() {
|
|
402
|
+
return y.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr);
|
|
403
|
+
}
|
|
404
|
+
layout_align_y() {
|
|
405
|
+
return y.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr);
|
|
406
|
+
}
|
|
407
|
+
load_animation(e) {
|
|
408
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
409
|
+
return y.dotlottieplayerwasm_load_animation(this.__wbg_ptr, t, n) !== 0;
|
|
410
|
+
}
|
|
411
|
+
loop_animation() {
|
|
412
|
+
return y.dotlottieplayerwasm_loop_animation(this.__wbg_ptr) !== 0;
|
|
413
|
+
}
|
|
414
|
+
set_background(e, t, n, r) {
|
|
415
|
+
return y.dotlottieplayerwasm_set_background(this.__wbg_ptr, e, t, n, r) !== 0;
|
|
416
|
+
}
|
|
417
|
+
set_color_slot(e, t, n, r) {
|
|
418
|
+
let i = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), a = T;
|
|
419
|
+
return y.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr, i, a, t, n, r) !== 0;
|
|
420
|
+
}
|
|
421
|
+
set_image_slot(e, t) {
|
|
422
|
+
let n = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), r = T, i = A(t, y.__wbindgen_export_1, y.__wbindgen_export_2), a = T;
|
|
423
|
+
return y.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr, n, r, i, a) !== 0;
|
|
424
|
+
}
|
|
425
|
+
set_loop_count(e) {
|
|
426
|
+
y.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr, e);
|
|
427
|
+
}
|
|
428
|
+
set_theme_data(e) {
|
|
429
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
430
|
+
return y.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr, t, n) !== 0;
|
|
431
|
+
}
|
|
432
|
+
sm_reset_input(e) {
|
|
433
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
434
|
+
y.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr, t, n);
|
|
435
|
+
}
|
|
436
|
+
manifest_string() {
|
|
437
|
+
let e, t;
|
|
438
|
+
try {
|
|
439
|
+
let i = y.__wbindgen_add_to_stack_pointer(-16);
|
|
440
|
+
y.dotlottieplayerwasm_manifest_string(i, this.__wbg_ptr);
|
|
441
|
+
var n = M().getInt32(i + 0, !0), r = M().getInt32(i + 4, !0);
|
|
442
|
+
return e = n, t = r, P(n, r);
|
|
443
|
+
} finally {
|
|
444
|
+
y.__wbindgen_add_to_stack_pointer(16), y.__wbindgen_export_3(e, t, 1);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
set_scalar_slot(e, t) {
|
|
448
|
+
let n = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), r = T;
|
|
449
|
+
return y.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr, n, r, t) !== 0;
|
|
450
|
+
}
|
|
451
|
+
set_vector_slot(e, t, n) {
|
|
452
|
+
let r = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), i = T;
|
|
453
|
+
return y.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr, r, i, t, n) !== 0;
|
|
454
|
+
}
|
|
455
|
+
setup_sw_target(e, t) {
|
|
456
|
+
return y.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr, e, t) !== 0;
|
|
457
|
+
}
|
|
458
|
+
get_pixel_buffer() {
|
|
459
|
+
return F(y.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr));
|
|
460
|
+
}
|
|
461
|
+
set_audio_volume(e) {
|
|
462
|
+
y.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr, e);
|
|
463
|
+
}
|
|
464
|
+
sm_current_state() {
|
|
465
|
+
let e, t;
|
|
466
|
+
try {
|
|
467
|
+
let i = y.__wbindgen_add_to_stack_pointer(-16);
|
|
468
|
+
y.dotlottieplayerwasm_sm_current_state(i, this.__wbg_ptr);
|
|
469
|
+
var n = M().getInt32(i + 0, !0), r = M().getInt32(i + 4, !0);
|
|
470
|
+
return e = n, t = r, P(n, r);
|
|
471
|
+
} finally {
|
|
472
|
+
y.__wbindgen_add_to_stack_pointer(16), y.__wbindgen_export_3(e, t, 1);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
state_machine_id() {
|
|
476
|
+
try {
|
|
477
|
+
let n = y.__wbindgen_add_to_stack_pointer(-16);
|
|
478
|
+
y.dotlottieplayerwasm_state_machine_id(n, this.__wbg_ptr);
|
|
479
|
+
var e = M().getInt32(n + 0, !0), t = M().getInt32(n + 4, !0);
|
|
480
|
+
let r;
|
|
481
|
+
return e !== 0 && (r = P(e, t).slice(), y.__wbindgen_export_3(e, t * 1, 1)), r;
|
|
482
|
+
} finally {
|
|
483
|
+
y.__wbindgen_add_to_stack_pointer(16);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
get_state_machine(e) {
|
|
487
|
+
try {
|
|
488
|
+
let r = y.__wbindgen_add_to_stack_pointer(-16), i = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), a = T;
|
|
489
|
+
y.dotlottieplayerwasm_get_state_machine(r, this.__wbg_ptr, i, a);
|
|
490
|
+
var t = M().getInt32(r + 0, !0), n = M().getInt32(r + 4, !0);
|
|
491
|
+
let o;
|
|
492
|
+
return t !== 0 && (o = P(t, n).slice(), y.__wbindgen_export_3(t, n * 1, 1)), o;
|
|
493
|
+
} finally {
|
|
494
|
+
y.__wbindgen_add_to_stack_pointer(16);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
set_position_slot(e, t, n) {
|
|
498
|
+
let r = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), i = T;
|
|
499
|
+
return y.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr, r, i, t, n) !== 0;
|
|
500
|
+
}
|
|
501
|
+
current_loop_count() {
|
|
502
|
+
return y.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr) >>> 0;
|
|
503
|
+
}
|
|
504
|
+
set_asset_resolver(e) {
|
|
505
|
+
y.dotlottieplayerwasm_set_asset_resolver(this.__wbg_ptr, I(e) ? 0 : C(e));
|
|
506
|
+
}
|
|
507
|
+
sm_framework_setup() {
|
|
508
|
+
return F(y.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr));
|
|
509
|
+
}
|
|
510
|
+
sm_post_pointer_up(e, t) {
|
|
511
|
+
y.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr, e, t);
|
|
512
|
+
}
|
|
513
|
+
state_machine_load(e) {
|
|
514
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
515
|
+
return y.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr, t, n) !== 0;
|
|
516
|
+
}
|
|
517
|
+
load_dotlottie_data(e) {
|
|
518
|
+
let t = L(e, y.__wbindgen_export_1), n = T;
|
|
519
|
+
return y.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr, t, n) !== 0;
|
|
520
|
+
}
|
|
521
|
+
sm_get_string_input(e) {
|
|
522
|
+
try {
|
|
523
|
+
let r = y.__wbindgen_add_to_stack_pointer(-16), i = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), a = T;
|
|
524
|
+
y.dotlottieplayerwasm_sm_get_string_input(r, this.__wbg_ptr, i, a);
|
|
525
|
+
var t = M().getInt32(r + 0, !0), n = M().getInt32(r + 4, !0);
|
|
526
|
+
let o;
|
|
527
|
+
return t !== 0 && (o = P(t, n).slice(), y.__wbindgen_export_3(t, n * 1, 1)), o;
|
|
528
|
+
} finally {
|
|
529
|
+
y.__wbindgen_add_to_stack_pointer(16);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
sm_set_string_input(e, t) {
|
|
533
|
+
let n = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), r = T, i = A(t, y.__wbindgen_export_1, y.__wbindgen_export_2), a = T;
|
|
534
|
+
return y.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr, n, r, i, a) !== 0;
|
|
535
|
+
}
|
|
536
|
+
sm_get_boolean_input(e) {
|
|
537
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T, r = y.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr, t, n);
|
|
538
|
+
return r === 16777215 ? void 0 : r !== 0;
|
|
539
|
+
}
|
|
540
|
+
sm_get_numeric_input(e) {
|
|
541
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T, r = y.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr, t, n);
|
|
542
|
+
return r === 4294967297 ? void 0 : r;
|
|
543
|
+
}
|
|
544
|
+
sm_post_pointer_down(e, t) {
|
|
545
|
+
y.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr, e, t);
|
|
546
|
+
}
|
|
547
|
+
sm_post_pointer_exit(e, t) {
|
|
548
|
+
y.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr, e, t);
|
|
549
|
+
}
|
|
550
|
+
sm_post_pointer_move(e, t) {
|
|
551
|
+
y.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr, e, t);
|
|
552
|
+
}
|
|
553
|
+
sm_set_boolean_input(e, t) {
|
|
554
|
+
let n = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), r = T;
|
|
555
|
+
return y.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr, n, r, t) !== 0;
|
|
556
|
+
}
|
|
557
|
+
sm_set_numeric_input(e, t) {
|
|
558
|
+
let n = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), r = T;
|
|
559
|
+
return y.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr, n, r, t) !== 0;
|
|
560
|
+
}
|
|
561
|
+
state_machine_unload() {
|
|
562
|
+
y.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr);
|
|
563
|
+
}
|
|
564
|
+
sm_post_pointer_enter(e, t) {
|
|
565
|
+
y.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr, e, t);
|
|
566
|
+
}
|
|
567
|
+
load_animation_from_id(e) {
|
|
568
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
569
|
+
return y.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr, t, n) !== 0;
|
|
570
|
+
}
|
|
571
|
+
sm_poll_internal_event() {
|
|
572
|
+
return F(y.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr));
|
|
573
|
+
}
|
|
574
|
+
use_frame_interpolation() {
|
|
575
|
+
return y.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr) !== 0;
|
|
576
|
+
}
|
|
577
|
+
reset_current_loop_count() {
|
|
578
|
+
y.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr);
|
|
579
|
+
}
|
|
580
|
+
sm_override_current_state(e, t) {
|
|
581
|
+
let n = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), r = T;
|
|
582
|
+
return y.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr, n, r, t) !== 0;
|
|
583
|
+
}
|
|
584
|
+
state_machine_load_from_id(e) {
|
|
585
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
586
|
+
return y.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr, t, n) !== 0;
|
|
587
|
+
}
|
|
588
|
+
set_use_frame_interpolation(e) {
|
|
589
|
+
y.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr, e);
|
|
590
|
+
}
|
|
591
|
+
constructor() {
|
|
592
|
+
let e = y.dotlottieplayerwasm_new();
|
|
593
|
+
return this.__wbg_ptr = e >>> 0, V.register(this, this.__wbg_ptr, this), this;
|
|
594
|
+
}
|
|
595
|
+
mode() {
|
|
596
|
+
return y.dotlottieplayerwasm_mode(this.__wbg_ptr);
|
|
597
|
+
}
|
|
598
|
+
play() {
|
|
599
|
+
return y.dotlottieplayerwasm_play(this.__wbg_ptr) !== 0;
|
|
600
|
+
}
|
|
601
|
+
stop() {
|
|
602
|
+
return y.dotlottieplayerwasm_stop(this.__wbg_ptr) !== 0;
|
|
603
|
+
}
|
|
604
|
+
tick(e) {
|
|
605
|
+
return y.dotlottieplayerwasm_tick(this.__wbg_ptr, e) !== 0;
|
|
606
|
+
}
|
|
607
|
+
pause() {
|
|
608
|
+
return y.dotlottieplayerwasm_pause(this.__wbg_ptr) !== 0;
|
|
609
|
+
}
|
|
610
|
+
speed() {
|
|
611
|
+
return y.dotlottieplayerwasm_speed(this.__wbg_ptr);
|
|
612
|
+
}
|
|
613
|
+
width() {
|
|
614
|
+
return y.dotlottieplayerwasm_width(this.__wbg_ptr) >>> 0;
|
|
615
|
+
}
|
|
616
|
+
height() {
|
|
617
|
+
return y.dotlottieplayerwasm_height(this.__wbg_ptr) >>> 0;
|
|
618
|
+
}
|
|
619
|
+
render() {
|
|
620
|
+
return y.dotlottieplayerwasm_render(this.__wbg_ptr) !== 0;
|
|
621
|
+
}
|
|
622
|
+
status() {
|
|
623
|
+
return y.dotlottieplayerwasm_status(this.__wbg_ptr);
|
|
624
|
+
}
|
|
625
|
+
markers() {
|
|
626
|
+
return F(y.dotlottieplayerwasm_markers(this.__wbg_ptr));
|
|
627
|
+
}
|
|
628
|
+
sm_fire(e) {
|
|
629
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
630
|
+
return y.dotlottieplayerwasm_sm_fire(this.__wbg_ptr, t, n) !== 0;
|
|
631
|
+
}
|
|
632
|
+
sm_stop() {
|
|
633
|
+
return y.dotlottieplayerwasm_sm_stop(this.__wbg_ptr) !== 0;
|
|
634
|
+
}
|
|
635
|
+
sm_tick(e) {
|
|
636
|
+
return y.dotlottieplayerwasm_sm_tick(this.__wbg_ptr, e) !== 0;
|
|
637
|
+
}
|
|
638
|
+
autoplay() {
|
|
639
|
+
return y.dotlottieplayerwasm_autoplay(this.__wbg_ptr) !== 0;
|
|
640
|
+
}
|
|
641
|
+
duration() {
|
|
642
|
+
return y.dotlottieplayerwasm_duration(this.__wbg_ptr);
|
|
643
|
+
}
|
|
644
|
+
set_loop(e) {
|
|
645
|
+
y.dotlottieplayerwasm_set_loop(this.__wbg_ptr, e);
|
|
646
|
+
}
|
|
647
|
+
set_mode(e) {
|
|
648
|
+
y.dotlottieplayerwasm_set_mode(this.__wbg_ptr, e);
|
|
649
|
+
}
|
|
650
|
+
sm_start(e, t) {
|
|
651
|
+
let n = ie(t, y.__wbindgen_export_1), r = T;
|
|
652
|
+
return y.dotlottieplayerwasm_sm_start(this.__wbg_ptr, e, n, r) !== 0;
|
|
653
|
+
}
|
|
654
|
+
theme_id() {
|
|
655
|
+
try {
|
|
656
|
+
let n = y.__wbindgen_add_to_stack_pointer(-16);
|
|
657
|
+
y.dotlottieplayerwasm_theme_id(n, this.__wbg_ptr);
|
|
658
|
+
var e = M().getInt32(n + 0, !0), t = M().getInt32(n + 4, !0);
|
|
659
|
+
let r;
|
|
660
|
+
return e !== 0 && (r = P(e, t).slice(), y.__wbindgen_export_3(e, t * 1, 1)), r;
|
|
661
|
+
} finally {
|
|
662
|
+
y.__wbindgen_add_to_stack_pointer(16);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
load_font(e, t) {
|
|
666
|
+
let n = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), r = T, i = L(t, y.__wbindgen_export_1), a = T;
|
|
667
|
+
return y.dotlottieplayerwasm_load_font(this.__wbg_ptr, n, r, i, a) !== 0;
|
|
668
|
+
}
|
|
669
|
+
set_frame(e) {
|
|
670
|
+
return y.dotlottieplayerwasm_set_frame(this.__wbg_ptr, e) !== 0;
|
|
671
|
+
}
|
|
672
|
+
set_speed(e) {
|
|
673
|
+
y.dotlottieplayerwasm_set_speed(this.__wbg_ptr, e);
|
|
674
|
+
}
|
|
675
|
+
set_theme(e) {
|
|
676
|
+
let t = A(e, y.__wbindgen_export_1, y.__wbindgen_export_2), n = T;
|
|
677
|
+
return y.dotlottieplayerwasm_set_theme(this.__wbg_ptr, t, n) !== 0;
|
|
678
|
+
}
|
|
679
|
+
sm_status() {
|
|
680
|
+
let e, t;
|
|
681
|
+
try {
|
|
682
|
+
let i = y.__wbindgen_add_to_stack_pointer(-16);
|
|
683
|
+
y.dotlottieplayerwasm_sm_status(i, this.__wbg_ptr);
|
|
684
|
+
var n = M().getInt32(i + 0, !0), r = M().getInt32(i + 4, !0);
|
|
685
|
+
return e = n, t = r, P(n, r);
|
|
686
|
+
} finally {
|
|
687
|
+
y.__wbindgen_add_to_stack_pointer(16), y.__wbindgen_export_3(e, t, 1);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
async function oe(e, t) {
|
|
692
|
+
if (typeof Response == "function" && e instanceof Response) {
|
|
693
|
+
if (typeof WebAssembly.instantiateStreaming == "function") try {
|
|
694
|
+
return await WebAssembly.instantiateStreaming(e, t);
|
|
695
|
+
} catch (t) {
|
|
696
|
+
if (e.headers.get("Content-Type") != "application/wasm") console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", t);
|
|
697
|
+
else throw t;
|
|
698
|
+
}
|
|
699
|
+
let n = await e.arrayBuffer();
|
|
700
|
+
return await WebAssembly.instantiate(n, t);
|
|
701
|
+
} else {
|
|
702
|
+
let n = await WebAssembly.instantiate(e, t);
|
|
703
|
+
return n instanceof WebAssembly.Instance ? {
|
|
704
|
+
instance: n,
|
|
705
|
+
module: e
|
|
706
|
+
} : n;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
function se() {
|
|
710
|
+
let e = {};
|
|
711
|
+
return e.wbg = {}, e.wbg.__wbg_buffer_609cc3eee51ed158 = function(e) {
|
|
712
|
+
let t = x(e).buffer;
|
|
713
|
+
return C(t);
|
|
714
|
+
}, e.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
|
|
715
|
+
return w(function(e, t, n) {
|
|
716
|
+
return C(x(e).call(x(t), x(n)));
|
|
717
|
+
}, arguments);
|
|
718
|
+
}, e.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764 = function() {
|
|
719
|
+
return w(function(e, t) {
|
|
720
|
+
let n = A(URL.createObjectURL(x(t)), y.__wbindgen_export_1, y.__wbindgen_export_2), r = T;
|
|
721
|
+
M().setInt32(e + 4, r, !0), M().setInt32(e + 0, n, !0);
|
|
722
|
+
}, arguments);
|
|
723
|
+
}, e.wbg.__wbg_ended_b873fb75d0c13ca7 = function(e) {
|
|
724
|
+
return x(e).ended;
|
|
725
|
+
}, e.wbg.__wbg_error_7534b8e9a36f1ab4 = function(e, t) {
|
|
726
|
+
let n, r;
|
|
727
|
+
try {
|
|
728
|
+
n = e, r = t, console.error(P(e, t));
|
|
729
|
+
} finally {
|
|
730
|
+
y.__wbindgen_export_3(n, r, 1);
|
|
731
|
+
}
|
|
732
|
+
}, e.wbg.__wbg_length_a446193dc22c12f8 = function(e) {
|
|
733
|
+
return x(e).length;
|
|
734
|
+
}, e.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
735
|
+
return C({});
|
|
736
|
+
}, e.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
737
|
+
return C([]);
|
|
738
|
+
}, e.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
739
|
+
return C(Error());
|
|
740
|
+
}, e.wbg.__wbg_new_a12002a7f91c75be = function(e) {
|
|
741
|
+
return C(new Uint8Array(x(e)));
|
|
742
|
+
}, e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(e, t, n) {
|
|
743
|
+
return C(new Uint8Array(x(e), t >>> 0, n >>> 0));
|
|
744
|
+
}, e.wbg.__wbg_newwithlength_5a5efe313cfd59f1 = function(e) {
|
|
745
|
+
return C(new Float32Array(e >>> 0));
|
|
746
|
+
}, e.wbg.__wbg_newwithsrc_20307ca7e8762a81 = function() {
|
|
747
|
+
return w(function(e, t) {
|
|
748
|
+
return C(new Audio(P(e, t)));
|
|
749
|
+
}, arguments);
|
|
750
|
+
}, e.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127 = function() {
|
|
751
|
+
return w(function(e, t) {
|
|
752
|
+
return C(new Blob(x(e), x(t)));
|
|
753
|
+
}, arguments);
|
|
754
|
+
}, e.wbg.__wbg_pause_b74c96d69f769518 = function() {
|
|
755
|
+
return w(function(e) {
|
|
756
|
+
x(e).pause();
|
|
757
|
+
}, arguments);
|
|
758
|
+
}, e.wbg.__wbg_play_f6ec5fc4e84b0d26 = function() {
|
|
759
|
+
return w(function(e) {
|
|
760
|
+
return C(x(e).play());
|
|
761
|
+
}, arguments);
|
|
762
|
+
}, e.wbg.__wbg_push_737cfc8c1432c2c6 = function(e, t) {
|
|
763
|
+
return x(e).push(x(t));
|
|
764
|
+
}, e.wbg.__wbg_revokeObjectURL_27267efebeb457c7 = function() {
|
|
765
|
+
return w(function(e, t) {
|
|
766
|
+
URL.revokeObjectURL(P(e, t));
|
|
767
|
+
}, arguments);
|
|
768
|
+
}, e.wbg.__wbg_set_65595bdd868b3009 = function(e, t, n) {
|
|
769
|
+
x(e).set(x(t), n >>> 0);
|
|
770
|
+
}, e.wbg.__wbg_set_bb8cecf6a62b9f46 = function() {
|
|
771
|
+
return w(function(e, t, n) {
|
|
772
|
+
return Reflect.set(x(e), x(t), x(n));
|
|
773
|
+
}, arguments);
|
|
774
|
+
}, e.wbg.__wbg_setcurrentTime_64727eddd3966512 = function(e, t) {
|
|
775
|
+
x(e).currentTime = t;
|
|
776
|
+
}, e.wbg.__wbg_setindex_4e73afdcd9bb95cd = function(e, t, n) {
|
|
777
|
+
x(e)[t >>> 0] = n;
|
|
778
|
+
}, e.wbg.__wbg_settype_39ed370d3edd403c = function(e, t, n) {
|
|
779
|
+
x(e).type = P(t, n);
|
|
780
|
+
}, e.wbg.__wbg_setvolume_3895e06a030ca4f7 = function(e, t) {
|
|
781
|
+
x(e).volume = t;
|
|
782
|
+
}, e.wbg.__wbg_stack_0ed75d68575b0f3c = function(e, t) {
|
|
783
|
+
let n = x(t).stack, r = A(n, y.__wbindgen_export_1, y.__wbindgen_export_2), i = T;
|
|
784
|
+
M().setInt32(e + 4, i, !0), M().setInt32(e + 0, r, !0);
|
|
785
|
+
}, e.wbg.__wbindgen_is_null = function(e) {
|
|
786
|
+
return x(e) === null;
|
|
787
|
+
}, e.wbg.__wbindgen_is_undefined = function(e) {
|
|
788
|
+
return x(e) === void 0;
|
|
789
|
+
}, e.wbg.__wbindgen_memory = function() {
|
|
790
|
+
let e = y.memory;
|
|
791
|
+
return C(e);
|
|
792
|
+
}, e.wbg.__wbindgen_number_new = function(e) {
|
|
793
|
+
return C(e);
|
|
794
|
+
}, e.wbg.__wbindgen_object_drop_ref = function(e) {
|
|
795
|
+
F(e);
|
|
796
|
+
}, e.wbg.__wbindgen_string_get = function(e, t) {
|
|
797
|
+
let n = x(t), r = typeof n == "string" ? n : void 0;
|
|
798
|
+
var i = I(r) ? 0 : A(r, y.__wbindgen_export_1, y.__wbindgen_export_2), a = T;
|
|
799
|
+
M().setInt32(e + 4, a, !0), M().setInt32(e + 0, i, !0);
|
|
800
|
+
}, e.wbg.__wbindgen_string_new = function(e, t) {
|
|
801
|
+
return C(P(e, t));
|
|
802
|
+
}, e.wbg.__wbindgen_throw = function(e, t) {
|
|
803
|
+
throw Error(P(e, t));
|
|
804
|
+
}, e;
|
|
805
|
+
}
|
|
806
|
+
function ce(e, t) {
|
|
807
|
+
return y = e.exports, H.__wbindgen_wasm_module = t, j = null, R = null, E = null, y;
|
|
808
|
+
}
|
|
809
|
+
async function H(e) {
|
|
810
|
+
if (y !== void 0) return y;
|
|
811
|
+
if (e !== void 0 && (Object.getPrototypeOf(e) === Object.prototype ? {module_or_path: e} = e : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), e === void 0) throw Error("WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().");
|
|
812
|
+
let t = se();
|
|
813
|
+
(typeof e == "string" || typeof Request == "function" && e instanceof Request || typeof URL == "function" && e instanceof URL) && (e = fetch(e));
|
|
814
|
+
let { instance: n, module: r } = await oe(await e, t);
|
|
815
|
+
return ce(n, r);
|
|
816
|
+
}
|
|
817
|
+
var le = class {
|
|
818
|
+
constructor() {
|
|
819
|
+
f(this, "_eventListeners", /* @__PURE__ */ new Map());
|
|
820
|
+
}
|
|
821
|
+
addEventListener(e, t) {
|
|
822
|
+
let n = this._eventListeners.get(e);
|
|
823
|
+
n || (n = /* @__PURE__ */ new Set(), this._eventListeners.set(e, n)), n.add(t);
|
|
824
|
+
}
|
|
825
|
+
removeEventListener(e, t) {
|
|
826
|
+
let n = this._eventListeners.get(e);
|
|
827
|
+
n && (t ? (n.delete(t), n.size === 0 && this._eventListeners.delete(e)) : this._eventListeners.delete(e));
|
|
828
|
+
}
|
|
829
|
+
dispatch(e) {
|
|
830
|
+
this._eventListeners.get(e.type)?.forEach((t) => t(e));
|
|
831
|
+
}
|
|
832
|
+
removeAllEventListeners() {
|
|
833
|
+
this._eventListeners.clear();
|
|
834
|
+
}
|
|
835
|
+
}, U = class e {
|
|
836
|
+
static _initializeObserver() {
|
|
837
|
+
e._observer ||= new IntersectionObserver((t) => {
|
|
838
|
+
t.forEach((t) => {
|
|
839
|
+
let n = e._observedCanvases.get(t.target);
|
|
840
|
+
n && (t.isIntersecting ? n.unfreeze() : n.freeze());
|
|
841
|
+
});
|
|
842
|
+
}, { threshold: 0 });
|
|
843
|
+
}
|
|
844
|
+
static observe(t, n) {
|
|
845
|
+
e._initializeObserver(), !e._observedCanvases.has(t) && (e._observedCanvases.set(t, n), e._observer?.observe(t));
|
|
846
|
+
}
|
|
847
|
+
static unobserve(t) {
|
|
848
|
+
e._observer?.unobserve(t), e._observedCanvases.delete(t), e._observedCanvases.size === 0 && (e._observer?.disconnect(), e._observer = null);
|
|
849
|
+
}
|
|
850
|
+
};
|
|
851
|
+
f(U, "_observer", null), f(U, "_observedCanvases", /* @__PURE__ */ new Map());
|
|
852
|
+
var W = class e {
|
|
853
|
+
static _initializeObserver() {
|
|
854
|
+
e._observer ||= new ResizeObserver((t) => {
|
|
855
|
+
t.forEach((t) => {
|
|
856
|
+
let n = e._observedCanvases.get(t.target);
|
|
857
|
+
if (!n) return;
|
|
858
|
+
let [r, i] = n;
|
|
859
|
+
clearTimeout(i);
|
|
860
|
+
let a = setTimeout(() => {
|
|
861
|
+
r.resize();
|
|
862
|
+
}, 100);
|
|
863
|
+
e._observedCanvases.set(t.target, [r, a]);
|
|
864
|
+
});
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
static observe(t, n) {
|
|
868
|
+
e._initializeObserver(), !e._observedCanvases.has(t) && (e._observedCanvases.set(t, [n, 0]), e._observer?.observe(t));
|
|
869
|
+
}
|
|
870
|
+
static unobserve(t) {
|
|
871
|
+
let n = e._observedCanvases.get(t);
|
|
872
|
+
if (n) {
|
|
873
|
+
let e = n[1];
|
|
874
|
+
e && clearTimeout(e);
|
|
875
|
+
}
|
|
876
|
+
e._observer?.unobserve(t), e._observedCanvases.delete(t), !e._observedCanvases.size && e._observer && (e._observer.disconnect(), e._observer = null);
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
f(W, "_observer", null), f(W, "_observedCanvases", /* @__PURE__ */ new Map());
|
|
880
|
+
function ue(e) {
|
|
881
|
+
return /^#([\da-f]{6}|[\da-f]{8})$/iu.test(e);
|
|
882
|
+
}
|
|
883
|
+
function de(e) {
|
|
884
|
+
if (!ue(e)) return [
|
|
885
|
+
0,
|
|
886
|
+
0,
|
|
887
|
+
0,
|
|
888
|
+
0
|
|
889
|
+
];
|
|
890
|
+
let t = e.replace("#", "");
|
|
891
|
+
return t = t.length === 6 ? `${t}ff` : t, [
|
|
892
|
+
parseInt(t.slice(0, 2), 16) / 255,
|
|
893
|
+
parseInt(t.slice(2, 4), 16) / 255,
|
|
894
|
+
parseInt(t.slice(4, 6), 16) / 255,
|
|
895
|
+
parseInt(t.slice(6, 8), 16) / 255
|
|
896
|
+
];
|
|
897
|
+
}
|
|
898
|
+
function G(e) {
|
|
899
|
+
if (e.byteLength < 4) return !1;
|
|
900
|
+
let t = new Uint8Array(e.slice(0, _.byteLength));
|
|
901
|
+
for (let e = 0; e < _.length; e += 1) if (_[e] !== t[e]) return !1;
|
|
902
|
+
return !0;
|
|
903
|
+
}
|
|
904
|
+
function fe(e) {
|
|
905
|
+
return v.every((t) => Object.hasOwn(e, t));
|
|
906
|
+
}
|
|
907
|
+
function K(e) {
|
|
908
|
+
return typeof e == "string" ? /^\s*\{/u.test(e) && /\}\s*$/u.test(e) : fe(e);
|
|
909
|
+
}
|
|
910
|
+
function q() {
|
|
911
|
+
return 1 + ((g ? window.devicePixelRatio : 1) - 1) * .75;
|
|
912
|
+
}
|
|
913
|
+
function J(e) {
|
|
914
|
+
let t = e.getBoundingClientRect(), n = window.innerHeight || document.documentElement.clientHeight, r = window.innerWidth || document.documentElement.clientWidth;
|
|
915
|
+
return !(t.bottom < 0 || t.top > n || t.right < 0 || t.left > r);
|
|
916
|
+
}
|
|
917
|
+
function Y(e) {
|
|
918
|
+
let t = e.target;
|
|
919
|
+
if (t instanceof HTMLCanvasElement) {
|
|
920
|
+
let n = t.getBoundingClientRect();
|
|
921
|
+
if (n.width === 0 || n.height === 0 || t.width === 0 || t.height === 0) return null;
|
|
922
|
+
let r = t.width / n.width, i = t.height / n.height, a = (e.clientX - n.left) * r, o = (e.clientY - n.top) * i;
|
|
923
|
+
return !Number.isFinite(a) || !Number.isFinite(o) || Number.isNaN(a) || Number.isNaN(o) ? null : {
|
|
924
|
+
x: a,
|
|
925
|
+
y: o
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
return null;
|
|
929
|
+
}
|
|
930
|
+
function pe(e) {
|
|
931
|
+
return new Promise((t, n) => {
|
|
932
|
+
let r = new FileReader();
|
|
933
|
+
r.onerror = () => n(r.error ?? Error("Failed to read image slot source")), r.onload = () => t(r.result), r.readAsDataURL(e);
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
async function me(e) {
|
|
937
|
+
if (!/^https?:\/\//i.test(e)) return e;
|
|
938
|
+
let t = await fetch(e);
|
|
939
|
+
if (!t.ok) throw Error(`Failed to fetch image slot source from URL: ${e}. ${t.status}: ${t.statusText}`);
|
|
940
|
+
return pe(await t.blob());
|
|
941
|
+
}
|
|
942
|
+
function he(e) {
|
|
943
|
+
let t = e.replace("OpenUrl: ", ""), n = t.indexOf(" | Target: "), r, i;
|
|
944
|
+
n === -1 ? (r = t, i = "_blank") : (r = t.substring(0, n), i = t.substring(n + 11)), window.open(r, i);
|
|
945
|
+
}
|
|
946
|
+
function ge(e, t, n) {
|
|
947
|
+
let r = null, i = t;
|
|
948
|
+
async function a(t) {
|
|
949
|
+
await e({ module_or_path: t });
|
|
950
|
+
}
|
|
951
|
+
async function o(t) {
|
|
952
|
+
let n = await fetch(t);
|
|
953
|
+
if (!n.ok) throw Error(`fetch ${t} responded with ${n.status} ${n.statusText}`);
|
|
954
|
+
await e({ module_or_path: await n.arrayBuffer() });
|
|
955
|
+
}
|
|
956
|
+
return {
|
|
957
|
+
load() {
|
|
958
|
+
if (!r) {
|
|
959
|
+
let e = i, t = n;
|
|
960
|
+
r = (async () => {
|
|
961
|
+
let n, i;
|
|
962
|
+
try {
|
|
963
|
+
await a(e);
|
|
964
|
+
return;
|
|
965
|
+
} catch (r) {
|
|
966
|
+
n = r, console.warn(`Primary WASM load failed from ${e}: ${r.message}`), console.warn(`Attempting to load WASM from backup URL: ${t}`);
|
|
967
|
+
}
|
|
968
|
+
try {
|
|
969
|
+
await a(t);
|
|
970
|
+
return;
|
|
971
|
+
} catch (e) {
|
|
972
|
+
i = e, console.warn(`Backup WASM load failed from ${t}: ${e.message}`);
|
|
973
|
+
}
|
|
974
|
+
console.warn("Retrying WASM load with buffered instantiation");
|
|
975
|
+
try {
|
|
976
|
+
await o(e);
|
|
977
|
+
return;
|
|
978
|
+
} catch (t) {
|
|
979
|
+
console.warn(`Buffered WASM load from ${e} failed: ${t.message}`);
|
|
980
|
+
}
|
|
981
|
+
try {
|
|
982
|
+
await o(t);
|
|
983
|
+
return;
|
|
984
|
+
} catch (e) {
|
|
985
|
+
throw console.error(`Primary WASM URL failed: ${n.message}`), console.error(`Backup WASM URL failed: ${i.message}`), console.error(`Buffered fallback failed: ${e.message}`), r = null, Error("WASM loading failed from all sources.");
|
|
986
|
+
}
|
|
987
|
+
})();
|
|
988
|
+
}
|
|
989
|
+
return r;
|
|
990
|
+
},
|
|
991
|
+
setWasmUrl(e) {
|
|
992
|
+
e !== i && (i = e, r = null);
|
|
993
|
+
}
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
var X = null;
|
|
997
|
+
function Z() {
|
|
998
|
+
return X ??= ge(H, "https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-web@0.79.1/dist/dotlottie-player.wasm", "https://unpkg.com/@lottiefiles/dotlottie-web@0.79.1/dist/dotlottie-player.wasm"), X;
|
|
999
|
+
}
|
|
1000
|
+
var Q = (e) => {
|
|
1001
|
+
switch (e) {
|
|
1002
|
+
case "reverse": return z.Reverse;
|
|
1003
|
+
case "bounce": return z.Bounce;
|
|
1004
|
+
case "reverse-bounce": return z.ReverseBounce;
|
|
1005
|
+
default: return z.Forward;
|
|
1006
|
+
}
|
|
1007
|
+
}, $ = (e) => {
|
|
1008
|
+
switch (e) {
|
|
1009
|
+
case z.Reverse: return "reverse";
|
|
1010
|
+
case z.Bounce: return "bounce";
|
|
1011
|
+
case z.ReverseBounce: return "reverse-bounce";
|
|
1012
|
+
default: return "forward";
|
|
1013
|
+
}
|
|
1014
|
+
}, _e = (e) => {
|
|
1015
|
+
switch (e) {
|
|
1016
|
+
case "contain": return "contain";
|
|
1017
|
+
case "cover": return "cover";
|
|
1018
|
+
case "fill": return "fill";
|
|
1019
|
+
case "fit-height": return "fit-height";
|
|
1020
|
+
case "fit-width": return "fit-width";
|
|
1021
|
+
case "none": return "none";
|
|
1022
|
+
default: return "contain";
|
|
1023
|
+
}
|
|
1024
|
+
}, ve = class {
|
|
1025
|
+
constructor(e) {
|
|
1026
|
+
f(this, "_canvas", null), f(this, "_pendingLoad", null), f(this, "_srcFetchAbort", null), f(this, "_context", null), f(this, "_eventManager", void 0), f(this, "_animationFrameId", null), f(this, "_frameManager", void 0), f(this, "_boundAnimationLoop", void 0), f(this, "_dotLottieCore", null), f(this, "_stateMachineId", ""), f(this, "_stateMachineConfig", null), f(this, "_isStateMachineRunning", !1), f(this, "_renderConfig", {}), f(this, "_isFrozen", !1), f(this, "_backgroundColor", null), f(this, "_lastFrameTime", null), f(this, "_boundOnClick", null), f(this, "_boundOnPointerUp", null), f(this, "_boundOnPointerDown", null), f(this, "_boundOnPointerMove", null), f(this, "_boundOnPointerEnter", null), f(this, "_boundOnPointerLeave", null), f(this, "_bufferMismatchCount", 0), f(this, "_lastExpectedBufferSize", 0), f(this, "_cachedImageData", null), f(this, "_cachedImageDataBuffer", null), f(this, "_cachedImageDataByteOffset", 0), f(this, "_marker", ""), f(this, "_segment", null), this._canvas = e.canvas ?? null, this._eventManager = new le(), this._frameManager = new h(), this._boundAnimationLoop = this._animationLoop.bind(this), this._renderConfig = {
|
|
1027
|
+
...e.renderConfig,
|
|
1028
|
+
devicePixelRatio: e.renderConfig?.devicePixelRatio || q(),
|
|
1029
|
+
freezeOnOffscreen: e.renderConfig?.freezeOnOffscreen ?? !0
|
|
1030
|
+
};
|
|
1031
|
+
let t = null;
|
|
1032
|
+
e.src && !e.data && (this._srcFetchAbort = new AbortController(), t = this._fetchData(e.src, this._srcFetchAbort.signal), t.catch(() => {})), this._initWasm().then(() => {
|
|
1033
|
+
this._dotLottieCore = this._createCore(), this._dotLottieCore.set_autoplay(e.autoplay ?? !1), this._dotLottieCore.set_loop(e.loop ?? !1), this._dotLottieCore.set_loop_count(e.loopCount ?? 0), this._dotLottieCore.set_mode(Q(e.mode ?? "forward")), this._dotLottieCore.set_speed(e.speed ?? 1), this._dotLottieCore.set_use_frame_interpolation(e.useFrameInterpolation ?? !0), e.segment && e.segment.length === 2 && (this._segment = [e.segment[0], e.segment[1]], this._dotLottieCore.set_segment(this._segment[0], this._segment[1])), this._marker = e.marker ?? "", this._marker && this._dotLottieCore.set_marker(this._marker), this._dotLottieCore.set_layout(e.layout?.fit ?? "contain", e.layout?.align?.[0] ?? .5, e.layout?.align?.[1] ?? .5), this._applyAssetResolver(e.assetResolver ?? null), this._stateMachineId = e.stateMachineId ?? "", this._stateMachineConfig = e.stateMachineConfig ?? null, this._onCoreCreated(), this._eventManager.dispatch({ type: "ready" }), e.data ? this._canvas ? this._loadFromData(e.data) : this._pendingLoad = { data: e.data } : e.src && (this._canvas ? this._loadFromSrc(e.src, t) : this._pendingLoad = {
|
|
1034
|
+
src: e.src,
|
|
1035
|
+
dataPromise: t
|
|
1036
|
+
}), e.backgroundColor && this.setBackgroundColor(e.backgroundColor);
|
|
1037
|
+
}).catch((e) => {
|
|
1038
|
+
this._srcFetchAbort?.abort(), console.error("[dotlottie-web] Initialization failed:", e), this._eventManager.dispatch({
|
|
1039
|
+
type: "loadError",
|
|
1040
|
+
error: Error(`Failed to load wasm module: ${e}`)
|
|
1041
|
+
});
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
async _initWasm() {
|
|
1045
|
+
return Z().load();
|
|
1046
|
+
}
|
|
1047
|
+
_createCore() {
|
|
1048
|
+
return new ae();
|
|
1049
|
+
}
|
|
1050
|
+
_onCoreCreated() {}
|
|
1051
|
+
_setupTarget(e, t) {
|
|
1052
|
+
return this._dotLottieCore ? this._dotLottieCore.setup_sw_target(e, t) : !1;
|
|
1053
|
+
}
|
|
1054
|
+
_drainPlayerEvents({ skipFrame: e = !1 } = {}) {
|
|
1055
|
+
if (this._dotLottieCore) for (;;) {
|
|
1056
|
+
let t = this._dotLottieCore.poll_event();
|
|
1057
|
+
if (t == null) break;
|
|
1058
|
+
switch (t.type) {
|
|
1059
|
+
case "Load":
|
|
1060
|
+
setTimeout(() => this._eventManager.dispatch({ type: "load" }), 0);
|
|
1061
|
+
break;
|
|
1062
|
+
case "LoadError":
|
|
1063
|
+
setTimeout(() => this._eventManager.dispatch({
|
|
1064
|
+
type: "loadError",
|
|
1065
|
+
error: Error("failed to load")
|
|
1066
|
+
}), 0);
|
|
1067
|
+
break;
|
|
1068
|
+
case "Play":
|
|
1069
|
+
queueMicrotask(() => this._eventManager.dispatch({ type: "play" }));
|
|
1070
|
+
break;
|
|
1071
|
+
case "Pause":
|
|
1072
|
+
queueMicrotask(() => this._eventManager.dispatch({ type: "pause" }));
|
|
1073
|
+
break;
|
|
1074
|
+
case "Stop":
|
|
1075
|
+
queueMicrotask(() => this._eventManager.dispatch({ type: "stop" }));
|
|
1076
|
+
break;
|
|
1077
|
+
case "Frame": {
|
|
1078
|
+
let n = t.frameNo ?? 0;
|
|
1079
|
+
e || queueMicrotask(() => this._eventManager.dispatch({
|
|
1080
|
+
type: "frame",
|
|
1081
|
+
currentFrame: n
|
|
1082
|
+
}));
|
|
1083
|
+
break;
|
|
1084
|
+
}
|
|
1085
|
+
case "Render": {
|
|
1086
|
+
let n = t.frameNo ?? 0;
|
|
1087
|
+
e || queueMicrotask(() => this._eventManager.dispatch({
|
|
1088
|
+
type: "render",
|
|
1089
|
+
currentFrame: n
|
|
1090
|
+
}));
|
|
1091
|
+
break;
|
|
1092
|
+
}
|
|
1093
|
+
case "Loop": {
|
|
1094
|
+
let e = t.loopCount ?? 0;
|
|
1095
|
+
queueMicrotask(() => this._eventManager.dispatch({
|
|
1096
|
+
type: "loop",
|
|
1097
|
+
loopCount: e
|
|
1098
|
+
}));
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
case "Complete":
|
|
1102
|
+
queueMicrotask(() => this._eventManager.dispatch({ type: "complete" }));
|
|
1103
|
+
break;
|
|
1104
|
+
default: break;
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
_discardPlayerEvents() {
|
|
1109
|
+
for (; this._dotLottieCore?.poll_event() != null;);
|
|
1110
|
+
}
|
|
1111
|
+
_drainSmEvents() {
|
|
1112
|
+
if (this._dotLottieCore) {
|
|
1113
|
+
for (;;) {
|
|
1114
|
+
let e = this._dotLottieCore.sm_poll_event();
|
|
1115
|
+
if (e == null) break;
|
|
1116
|
+
switch (e.type) {
|
|
1117
|
+
case "Start":
|
|
1118
|
+
queueMicrotask(() => {
|
|
1119
|
+
this._isStateMachineRunning = !0, this._eventManager.dispatch({ type: "stateMachineStart" }), this._startAnimationLoop();
|
|
1120
|
+
});
|
|
1121
|
+
break;
|
|
1122
|
+
case "Stop":
|
|
1123
|
+
queueMicrotask(() => {
|
|
1124
|
+
this._isStateMachineRunning = !1, this._eventManager.dispatch({ type: "stateMachineStop" }), this._dotLottieCore?.status() !== B.Playing && this._stopAnimationLoop();
|
|
1125
|
+
});
|
|
1126
|
+
break;
|
|
1127
|
+
case "CustomEvent":
|
|
1128
|
+
this._eventManager.dispatch({
|
|
1129
|
+
type: "stateMachineCustomEvent",
|
|
1130
|
+
eventName: e.message ?? ""
|
|
1131
|
+
});
|
|
1132
|
+
break;
|
|
1133
|
+
case "BooleanInputChange":
|
|
1134
|
+
this._eventManager.dispatch({
|
|
1135
|
+
type: "stateMachineBooleanInputValueChange",
|
|
1136
|
+
inputName: e.name ?? "",
|
|
1137
|
+
newValue: e.newValue,
|
|
1138
|
+
oldValue: e.oldValue
|
|
1139
|
+
});
|
|
1140
|
+
break;
|
|
1141
|
+
case "NumericInputChange":
|
|
1142
|
+
this._eventManager.dispatch({
|
|
1143
|
+
type: "stateMachineNumericInputValueChange",
|
|
1144
|
+
inputName: e.name ?? "",
|
|
1145
|
+
newValue: e.newValue,
|
|
1146
|
+
oldValue: e.oldValue
|
|
1147
|
+
});
|
|
1148
|
+
break;
|
|
1149
|
+
case "StringInputChange":
|
|
1150
|
+
this._eventManager.dispatch({
|
|
1151
|
+
type: "stateMachineStringInputValueChange",
|
|
1152
|
+
inputName: e.name ?? "",
|
|
1153
|
+
newValue: e.newValue,
|
|
1154
|
+
oldValue: e.oldValue
|
|
1155
|
+
});
|
|
1156
|
+
break;
|
|
1157
|
+
case "InputFired":
|
|
1158
|
+
this._eventManager.dispatch({
|
|
1159
|
+
type: "stateMachineInputFired",
|
|
1160
|
+
inputName: e.name ?? ""
|
|
1161
|
+
});
|
|
1162
|
+
break;
|
|
1163
|
+
case "Transition":
|
|
1164
|
+
this._eventManager.dispatch({
|
|
1165
|
+
type: "stateMachineTransition",
|
|
1166
|
+
fromState: e.previousState ?? "",
|
|
1167
|
+
toState: e.newState ?? ""
|
|
1168
|
+
});
|
|
1169
|
+
break;
|
|
1170
|
+
case "StateEntered":
|
|
1171
|
+
this._eventManager.dispatch({
|
|
1172
|
+
type: "stateMachineStateEntered",
|
|
1173
|
+
state: e.state ?? ""
|
|
1174
|
+
});
|
|
1175
|
+
break;
|
|
1176
|
+
case "StateExit":
|
|
1177
|
+
this._eventManager.dispatch({
|
|
1178
|
+
type: "stateMachineStateExit",
|
|
1179
|
+
state: e.state ?? ""
|
|
1180
|
+
});
|
|
1181
|
+
break;
|
|
1182
|
+
case "Error":
|
|
1183
|
+
this._eventManager.dispatch({
|
|
1184
|
+
type: "stateMachineError",
|
|
1185
|
+
error: e.message ?? ""
|
|
1186
|
+
});
|
|
1187
|
+
break;
|
|
1188
|
+
default: break;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
for (;;) {
|
|
1192
|
+
let e = this._dotLottieCore.sm_poll_internal_event();
|
|
1193
|
+
if (e == null) break;
|
|
1194
|
+
if (e.type === "Message") {
|
|
1195
|
+
let t = e.message ?? "";
|
|
1196
|
+
g && t.startsWith("OpenUrl: ") ? he(t) : this._eventManager.dispatch({
|
|
1197
|
+
type: "stateMachineInternalMessage",
|
|
1198
|
+
message: t
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
_dispatchError(e) {
|
|
1205
|
+
console.error(e), this._eventManager.dispatch({
|
|
1206
|
+
type: "loadError",
|
|
1207
|
+
error: Error(e)
|
|
1208
|
+
});
|
|
1209
|
+
}
|
|
1210
|
+
async _fetchData(e, t = null) {
|
|
1211
|
+
let n = await fetch(e, { signal: t });
|
|
1212
|
+
if (!n.ok) throw Error(`Failed to fetch animation data from URL: ${e}. ${n.status}: ${n.statusText}`);
|
|
1213
|
+
let r = await n.arrayBuffer();
|
|
1214
|
+
return G(r) ? r : new TextDecoder().decode(r);
|
|
1215
|
+
}
|
|
1216
|
+
_loadFromData(e) {
|
|
1217
|
+
if (this._dotLottieCore === null) return;
|
|
1218
|
+
if (!this._canvas) {
|
|
1219
|
+
console.warn("[dotlottie-web] Cannot load animation without canvas. Call setCanvas() first.");
|
|
1220
|
+
return;
|
|
1221
|
+
}
|
|
1222
|
+
this._syncCanvasSize(), this._setupTarget(this._canvas.width, this._canvas.height);
|
|
1223
|
+
let t = !1;
|
|
1224
|
+
if (typeof e == "string") {
|
|
1225
|
+
if (t = this._dotLottieCore.load_animation(e), !t && !K(e)) {
|
|
1226
|
+
this._discardPlayerEvents(), this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");
|
|
1227
|
+
return;
|
|
1228
|
+
}
|
|
1229
|
+
} else if (e instanceof ArrayBuffer) {
|
|
1230
|
+
if (!G(e)) {
|
|
1231
|
+
this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");
|
|
1232
|
+
return;
|
|
1233
|
+
}
|
|
1234
|
+
t = this._dotLottieCore.load_dotlottie_data(new Uint8Array(e));
|
|
1235
|
+
} else if (typeof e == "object") {
|
|
1236
|
+
if (!K(e)) {
|
|
1237
|
+
this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
t = this._dotLottieCore.load_animation(JSON.stringify(e));
|
|
1241
|
+
} else {
|
|
1242
|
+
this._dispatchError(`Unsupported data type for animation data. Expected:
|
|
1243
|
+
- string (Lottie JSON),
|
|
1244
|
+
- ArrayBuffer (dotLottie),
|
|
1245
|
+
- object (Lottie JSON).
|
|
1246
|
+
Received: ${typeof e}`);
|
|
1247
|
+
return;
|
|
1248
|
+
}
|
|
1249
|
+
if (t) {
|
|
1250
|
+
if (this._renderConfig.quality !== void 0 && this._dotLottieCore.set_quality(this._renderConfig.quality), this._drainPlayerEvents({ skipFrame: !!this._marker || !!this._segment }), this._marker && this._dotLottieCore.set_marker(this._marker), this._segment) {
|
|
1251
|
+
this._dotLottieCore.set_segment(this._segment[0], this._segment[1]);
|
|
1252
|
+
let e = $(this._dotLottieCore.mode()), t = e === "reverse" || e === "reverse-bounce" ? this._segment[1] : this._segment[0];
|
|
1253
|
+
this._dotLottieCore.set_frame(t);
|
|
1254
|
+
}
|
|
1255
|
+
setTimeout(() => {
|
|
1256
|
+
this._eventManager.dispatch({
|
|
1257
|
+
type: "frame",
|
|
1258
|
+
currentFrame: this.currentFrame
|
|
1259
|
+
});
|
|
1260
|
+
}, 0), this._dotLottieCore.render(), this._drainPlayerEvents(), this._draw(), this._stateMachineId ? this.stateMachineLoad(this._stateMachineId) && this.stateMachineStart() && this._startAnimationLoop() : this._dotLottieCore.status() === B.Playing && this._startAnimationLoop(), g && this._canvas instanceof HTMLCanvasElement && (this._renderConfig.freezeOnOffscreen && (U.observe(this._canvas, this), J(this._canvas) || this.freeze()), this._renderConfig.autoResize && W.observe(this._canvas, this));
|
|
1261
|
+
} else this._drainPlayerEvents();
|
|
1262
|
+
}
|
|
1263
|
+
_loadFromSrc(e, t) {
|
|
1264
|
+
(t ?? this._fetchData(e)).then((e) => this._loadFromData(e)).catch((t) => this._dispatchError(`Failed to load animation data from URL: ${e}. ${t}`));
|
|
1265
|
+
}
|
|
1266
|
+
get buffer() {
|
|
1267
|
+
return this._dotLottieCore ? this._dotLottieCore.get_pixel_buffer() : null;
|
|
1268
|
+
}
|
|
1269
|
+
get activeAnimationId() {
|
|
1270
|
+
return this._dotLottieCore?.animation_id() ?? void 0;
|
|
1271
|
+
}
|
|
1272
|
+
get activeThemeId() {
|
|
1273
|
+
return this._dotLottieCore?.theme_id() ?? void 0;
|
|
1274
|
+
}
|
|
1275
|
+
get layout() {
|
|
1276
|
+
if (this._dotLottieCore) return {
|
|
1277
|
+
align: [this._dotLottieCore.layout_align_x(), this._dotLottieCore.layout_align_y()],
|
|
1278
|
+
fit: _e(this._dotLottieCore.layout_fit())
|
|
1279
|
+
};
|
|
1280
|
+
}
|
|
1281
|
+
get marker() {
|
|
1282
|
+
return this._dotLottieCore?.current_marker() ?? "";
|
|
1283
|
+
}
|
|
1284
|
+
get manifest() {
|
|
1285
|
+
try {
|
|
1286
|
+
let e = this._dotLottieCore?.manifest_string();
|
|
1287
|
+
if (this._dotLottieCore === null || !e) return null;
|
|
1288
|
+
let t = JSON.parse(e);
|
|
1289
|
+
return Object.keys(t).length === 0 ? null : t;
|
|
1290
|
+
} catch {
|
|
1291
|
+
return null;
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
get renderConfig() {
|
|
1295
|
+
return this._renderConfig;
|
|
1296
|
+
}
|
|
1297
|
+
get segment() {
|
|
1298
|
+
if (this._dotLottieCore) return [this._dotLottieCore.segment_start(), this._dotLottieCore.segment_end()];
|
|
1299
|
+
}
|
|
1300
|
+
get loop() {
|
|
1301
|
+
return this._dotLottieCore?.loop_animation() ?? !1;
|
|
1302
|
+
}
|
|
1303
|
+
get mode() {
|
|
1304
|
+
return this._dotLottieCore ? $(this._dotLottieCore.mode()) : "forward";
|
|
1305
|
+
}
|
|
1306
|
+
get isFrozen() {
|
|
1307
|
+
return this._isFrozen;
|
|
1308
|
+
}
|
|
1309
|
+
get isStateMachineRunning() {
|
|
1310
|
+
return this._isStateMachineRunning;
|
|
1311
|
+
}
|
|
1312
|
+
get backgroundColor() {
|
|
1313
|
+
return this._backgroundColor ?? "";
|
|
1314
|
+
}
|
|
1315
|
+
get autoplay() {
|
|
1316
|
+
return this._dotLottieCore?.autoplay() ?? !1;
|
|
1317
|
+
}
|
|
1318
|
+
get useFrameInterpolation() {
|
|
1319
|
+
return this._dotLottieCore?.use_frame_interpolation() ?? !1;
|
|
1320
|
+
}
|
|
1321
|
+
get speed() {
|
|
1322
|
+
return this._dotLottieCore?.speed() ?? 0;
|
|
1323
|
+
}
|
|
1324
|
+
get isReady() {
|
|
1325
|
+
return this._dotLottieCore !== null;
|
|
1326
|
+
}
|
|
1327
|
+
get isLoaded() {
|
|
1328
|
+
return (this._dotLottieCore?.status() ?? B.Idle) !== B.Idle;
|
|
1329
|
+
}
|
|
1330
|
+
get isPlaying() {
|
|
1331
|
+
return this._dotLottieCore?.status() === B.Playing;
|
|
1332
|
+
}
|
|
1333
|
+
get isPaused() {
|
|
1334
|
+
return this._dotLottieCore?.status() === B.Paused;
|
|
1335
|
+
}
|
|
1336
|
+
get isStopped() {
|
|
1337
|
+
return this._dotLottieCore?.status() === B.Stopped;
|
|
1338
|
+
}
|
|
1339
|
+
get currentFrame() {
|
|
1340
|
+
return this._dotLottieCore ? Math.round(this._dotLottieCore.current_frame() * 100) / 100 : 0;
|
|
1341
|
+
}
|
|
1342
|
+
get loopCount() {
|
|
1343
|
+
return this._dotLottieCore?.current_loop_count() ?? 0;
|
|
1344
|
+
}
|
|
1345
|
+
get totalFrames() {
|
|
1346
|
+
return this._dotLottieCore?.total_frames() ?? 0;
|
|
1347
|
+
}
|
|
1348
|
+
get duration() {
|
|
1349
|
+
return (this._dotLottieCore?.duration() ?? 0) / 1e3;
|
|
1350
|
+
}
|
|
1351
|
+
get canvas() {
|
|
1352
|
+
return this._canvas;
|
|
1353
|
+
}
|
|
1354
|
+
load(e) {
|
|
1355
|
+
this._dotLottieCore !== null && (this._stopAnimationLoop(), this._cleanupCanvas(), this._isFrozen = !1, this._dotLottieCore.set_autoplay(e.autoplay ?? !1), this._dotLottieCore.set_loop(e.loop ?? !1), this._dotLottieCore.set_loop_count(e.loopCount ?? 0), this._dotLottieCore.set_mode(Q(e.mode ?? "forward")), this._dotLottieCore.set_speed(e.speed ?? 1), this._dotLottieCore.set_use_frame_interpolation(e.useFrameInterpolation ?? !0), e.segment && e.segment.length === 2 ? (this._segment = [e.segment[0], e.segment[1]], this._dotLottieCore.set_segment(this._segment[0], this._segment[1])) : (this._segment = null, this._dotLottieCore.clear_segment()), this._marker = e.marker ?? "", this._marker ? this._dotLottieCore.set_marker(this._marker) : this._dotLottieCore.clear_marker(), this._dotLottieCore.set_layout(e.layout?.fit ?? "contain", e.layout?.align?.[0] ?? .5, e.layout?.align?.[1] ?? .5), this._applyAssetResolver(e.assetResolver ?? null), e.data ? this._canvas ? this._loadFromData(e.data) : this._pendingLoad = { data: e.data } : e.src && (this._canvas ? this._loadFromSrc(e.src) : this._pendingLoad = { src: e.src }), e.backgroundColor && this.setBackgroundColor(e.backgroundColor));
|
|
1356
|
+
}
|
|
1357
|
+
_draw() {
|
|
1358
|
+
if (this._dotLottieCore === null || this._canvas === null || (!this._context && "getContext" in this._canvas && typeof this._canvas.getContext == "function" && (!g || typeof HTMLCanvasElement < "u" && this._canvas instanceof HTMLCanvasElement || typeof OffscreenCanvas < "u" && this._canvas instanceof OffscreenCanvas) && (this._context = this._canvas.getContext("2d")), !this._context)) return;
|
|
1359
|
+
let e = this._dotLottieCore.get_pixel_buffer(), t = this._canvas.width, n = this._canvas.height, r = t * n * 4;
|
|
1360
|
+
if (e.byteLength !== r) {
|
|
1361
|
+
this._lastExpectedBufferSize === r ? this._bufferMismatchCount += 1 : (this._bufferMismatchCount = 1, this._lastExpectedBufferSize = r), this._bufferMismatchCount === 10 && console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${r} bytes for canvas ${t}x${n}, but got ${e.byteLength} bytes. This may indicate a WASM memory allocation issue or invalid canvas dimensions.`);
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
this._bufferMismatchCount = 0, this._lastExpectedBufferSize = r;
|
|
1365
|
+
let i = this._cachedImageData;
|
|
1366
|
+
if (!(i !== null && i.width === t && i.height === n && i.data.byteLength === r && this._cachedImageDataBuffer === e.buffer && this._cachedImageDataByteOffset === e.byteOffset)) {
|
|
1367
|
+
if (typeof ImageData > "u") this._cachedImageData = this._context.createImageData(t, n);
|
|
1368
|
+
else {
|
|
1369
|
+
let r = new Uint8ClampedArray(e.buffer, e.byteOffset, e.byteLength);
|
|
1370
|
+
this._cachedImageData = new ImageData(r, t, n);
|
|
1371
|
+
}
|
|
1372
|
+
this._cachedImageDataBuffer = e.buffer, this._cachedImageDataByteOffset = e.byteOffset;
|
|
1373
|
+
}
|
|
1374
|
+
if (typeof ImageData > "u") {
|
|
1375
|
+
let t = new Uint8ClampedArray(e.buffer, e.byteOffset, e.byteLength);
|
|
1376
|
+
this._cachedImageData.data.set(t);
|
|
1377
|
+
}
|
|
1378
|
+
this._context.putImageData(this._cachedImageData, 0, 0);
|
|
1379
|
+
}
|
|
1380
|
+
_cleanupCanvas() {
|
|
1381
|
+
this._canvas && g && this._canvas instanceof HTMLCanvasElement && (U.unobserve(this._canvas), W.unobserve(this._canvas), this._cleanupStateMachineListeners());
|
|
1382
|
+
}
|
|
1383
|
+
_initializeCanvas() {
|
|
1384
|
+
this._setupRendererOnCanvas(), this._canvas && g && this._canvas instanceof HTMLCanvasElement && this.isLoaded && (this._renderConfig.freezeOnOffscreen && (U.observe(this._canvas, this), J(this._canvas) || this.freeze()), this._renderConfig.autoResize && W.observe(this._canvas, this), this._isStateMachineRunning && this._setupStateMachineListeners()), this._canvas && this._dotLottieCore && this.isLoaded && this._setupTarget(this._canvas.width, this._canvas.height) && (this._dotLottieCore.render(), this._draw());
|
|
1385
|
+
}
|
|
1386
|
+
_setupRendererOnCanvas() {
|
|
1387
|
+
this._context = null;
|
|
1388
|
+
}
|
|
1389
|
+
_stopAnimationLoop() {
|
|
1390
|
+
this._animationFrameId !== null && (this._frameManager.cancelAnimationFrame(this._animationFrameId), this._animationFrameId = null), this._lastFrameTime = null;
|
|
1391
|
+
}
|
|
1392
|
+
_startAnimationLoop() {
|
|
1393
|
+
this._animationFrameId === null && this._dotLottieCore && !this._isFrozen && (this._dotLottieCore.status() === B.Playing || this._isStateMachineRunning) && (this._animationFrameId = this._frameManager.requestAnimationFrame(this._boundAnimationLoop));
|
|
1394
|
+
}
|
|
1395
|
+
_animationLoop(e) {
|
|
1396
|
+
if (this._dotLottieCore === null) {
|
|
1397
|
+
this._stopAnimationLoop();
|
|
1398
|
+
return;
|
|
1399
|
+
}
|
|
1400
|
+
if (this._dotLottieCore.status() !== B.Playing && !this._isStateMachineRunning) {
|
|
1401
|
+
this._stopAnimationLoop();
|
|
1402
|
+
return;
|
|
1403
|
+
}
|
|
1404
|
+
try {
|
|
1405
|
+
let t = this._lastFrameTime === null ? 0 : e - this._lastFrameTime;
|
|
1406
|
+
this._lastFrameTime = e;
|
|
1407
|
+
let n = this._isStateMachineRunning ? this._dotLottieCore.sm_tick(t) : this._dotLottieCore.tick(t);
|
|
1408
|
+
this._isStateMachineRunning ? this._drainSmEvents() : this._drainPlayerEvents(), n && this._draw(), this._animationFrameId = this._frameManager.requestAnimationFrame(this._boundAnimationLoop);
|
|
1409
|
+
} catch (e) {
|
|
1410
|
+
console.error("Error in animation frame:", e), this._eventManager.dispatch({
|
|
1411
|
+
type: "renderError",
|
|
1412
|
+
error: e
|
|
1413
|
+
}), e instanceof WebAssembly.RuntimeError && this.destroy();
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
play() {
|
|
1417
|
+
if (this._dotLottieCore === null || !this.isLoaded) return;
|
|
1418
|
+
this._stopAnimationLoop();
|
|
1419
|
+
let e = this._dotLottieCore.play();
|
|
1420
|
+
this._drainPlayerEvents(), (e || this._dotLottieCore.status() === B.Playing) && (this._isFrozen = !1, this._startAnimationLoop()), this._canvas && g && this._canvas instanceof HTMLCanvasElement && this._renderConfig.freezeOnOffscreen && !J(this._canvas) && this.freeze();
|
|
1421
|
+
}
|
|
1422
|
+
pause() {
|
|
1423
|
+
this._dotLottieCore !== null && (this._dotLottieCore.pause(), this._drainPlayerEvents(), this._stopAnimationLoop());
|
|
1424
|
+
}
|
|
1425
|
+
stop() {
|
|
1426
|
+
if (this._dotLottieCore === null) return;
|
|
1427
|
+
let e = this._dotLottieCore.stop();
|
|
1428
|
+
this._drainPlayerEvents(), this._stopAnimationLoop(), e && (this._eventManager.dispatch({
|
|
1429
|
+
type: "frame",
|
|
1430
|
+
currentFrame: this.currentFrame
|
|
1431
|
+
}), this._dotLottieCore.render(), this._draw());
|
|
1432
|
+
}
|
|
1433
|
+
setFrame(e) {
|
|
1434
|
+
if (this._dotLottieCore !== null && this._dotLottieCore.set_frame(e)) {
|
|
1435
|
+
let e = this._dotLottieCore.render();
|
|
1436
|
+
this._drainPlayerEvents(), e && this._draw();
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
setSpeed(e) {
|
|
1440
|
+
this._dotLottieCore !== null && this._dotLottieCore.set_speed(e);
|
|
1441
|
+
}
|
|
1442
|
+
setBackgroundColor(e) {
|
|
1443
|
+
if (this._dotLottieCore !== null) {
|
|
1444
|
+
if (g && this._canvas instanceof HTMLCanvasElement) this._canvas.style.backgroundColor = e;
|
|
1445
|
+
else {
|
|
1446
|
+
let [t, n, r, i] = de(e);
|
|
1447
|
+
this._dotLottieCore.set_background(t, n, r, i);
|
|
1448
|
+
}
|
|
1449
|
+
this._backgroundColor = e;
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
setLoop(e) {
|
|
1453
|
+
this._dotLottieCore !== null && this._dotLottieCore.set_loop(e);
|
|
1454
|
+
}
|
|
1455
|
+
setLoopCount(e) {
|
|
1456
|
+
this._dotLottieCore !== null && this._dotLottieCore.set_loop_count(e);
|
|
1457
|
+
}
|
|
1458
|
+
setUseFrameInterpolation(e) {
|
|
1459
|
+
this._dotLottieCore !== null && this._dotLottieCore.set_use_frame_interpolation(e);
|
|
1460
|
+
}
|
|
1461
|
+
_applyAssetResolver(e) {
|
|
1462
|
+
if (this._dotLottieCore !== null) {
|
|
1463
|
+
if (e === null) {
|
|
1464
|
+
this._dotLottieCore.set_asset_resolver(null);
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1467
|
+
this._dotLottieCore.set_asset_resolver((t) => {
|
|
1468
|
+
try {
|
|
1469
|
+
return e(t) ?? null;
|
|
1470
|
+
} catch (e) {
|
|
1471
|
+
return console.error(`[dotlottie-web] assetResolver threw for "${t}":`, e), null;
|
|
1472
|
+
}
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
addEventListener(e, t) {
|
|
1477
|
+
this._eventManager.addEventListener(e, t);
|
|
1478
|
+
}
|
|
1479
|
+
removeEventListener(e, t) {
|
|
1480
|
+
this._eventManager.removeEventListener(e, t);
|
|
1481
|
+
}
|
|
1482
|
+
destroy() {
|
|
1483
|
+
this._stopAnimationLoop(), this._isStateMachineRunning = !1, this._cleanupCanvas(), this._srcFetchAbort?.abort(), this._srcFetchAbort = null, this._pendingLoad = null;
|
|
1484
|
+
let e = this._dotLottieCore;
|
|
1485
|
+
if (this._dotLottieCore = null, this._context = null, e) try {
|
|
1486
|
+
e.free();
|
|
1487
|
+
} catch (e) {
|
|
1488
|
+
console.warn("[dotlottie-web] Error freeing wasm core during destroy:", e);
|
|
1489
|
+
}
|
|
1490
|
+
this._eventManager.dispatch({ type: "destroy" }), this._eventManager.removeAllEventListeners(), this._cleanupStateMachineListeners();
|
|
1491
|
+
}
|
|
1492
|
+
freeze() {
|
|
1493
|
+
this._animationFrameId !== null && (this._stopAnimationLoop(), this._isFrozen = !0, this._eventManager.dispatch({ type: "freeze" }));
|
|
1494
|
+
}
|
|
1495
|
+
unfreeze() {
|
|
1496
|
+
this._animationFrameId === null && (this._isFrozen = !1, this._eventManager.dispatch({ type: "unfreeze" }), this._startAnimationLoop());
|
|
1497
|
+
}
|
|
1498
|
+
_syncCanvasSize() {
|
|
1499
|
+
if (!(g && this._canvas instanceof HTMLCanvasElement)) return;
|
|
1500
|
+
let e = this._renderConfig.devicePixelRatio || window.devicePixelRatio || 1, { height: t, width: n } = this._canvas.getBoundingClientRect();
|
|
1501
|
+
t !== 0 && n !== 0 && (this._canvas.width = n * e, this._canvas.height = t * e);
|
|
1502
|
+
}
|
|
1503
|
+
resize() {
|
|
1504
|
+
!this._dotLottieCore || !this.isLoaded || !this._canvas || (this._syncCanvasSize(), this._setupTarget(this._canvas.width, this._canvas.height) && (this._dotLottieCore.render(), this._draw()));
|
|
1505
|
+
}
|
|
1506
|
+
setCanvas(e) {
|
|
1507
|
+
if (!(!e || this._canvas === e) && (this._canvas && this._cleanupCanvas(), this._canvas = e, this._initializeCanvas(), this._pendingLoad)) {
|
|
1508
|
+
let e = this._pendingLoad;
|
|
1509
|
+
this._pendingLoad = null, e.data ? this._loadFromData(e.data) : e.src && this._loadFromSrc(e.src, e.dataPromise);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
setTransform(e) {
|
|
1513
|
+
if (!this._dotLottieCore) return !1;
|
|
1514
|
+
let t = this._dotLottieCore.set_transform(new Float32Array(e));
|
|
1515
|
+
return t && this._dotLottieCore.render() && this._draw(), t;
|
|
1516
|
+
}
|
|
1517
|
+
getTransform() {
|
|
1518
|
+
if (!this._dotLottieCore) return;
|
|
1519
|
+
let e = this._dotLottieCore.get_transform();
|
|
1520
|
+
return Array.from(e);
|
|
1521
|
+
}
|
|
1522
|
+
setSegment(e, t) {
|
|
1523
|
+
this._dotLottieCore !== null && (this._segment = [e, t], this._dotLottieCore.set_segment(e, t));
|
|
1524
|
+
}
|
|
1525
|
+
resetSegment() {
|
|
1526
|
+
this._dotLottieCore !== null && (this._segment = null, this._dotLottieCore.clear_segment());
|
|
1527
|
+
}
|
|
1528
|
+
setMode(e) {
|
|
1529
|
+
this._dotLottieCore !== null && this._dotLottieCore.set_mode(Q(e));
|
|
1530
|
+
}
|
|
1531
|
+
setRenderConfig(e) {
|
|
1532
|
+
let { devicePixelRatio: t, freezeOnOffscreen: n, quality: r, ...i } = e;
|
|
1533
|
+
this._renderConfig = {
|
|
1534
|
+
...this._renderConfig,
|
|
1535
|
+
...i,
|
|
1536
|
+
devicePixelRatio: t || q(),
|
|
1537
|
+
freezeOnOffscreen: n ?? !0,
|
|
1538
|
+
...r !== void 0 && { quality: r }
|
|
1539
|
+
}, r !== void 0 && this._dotLottieCore && this._dotLottieCore.set_quality(r), g && this._canvas instanceof HTMLCanvasElement && (this._renderConfig.autoResize ? W.observe(this._canvas, this) : W.unobserve(this._canvas), this._renderConfig.freezeOnOffscreen ? (U.observe(this._canvas, this), J(this._canvas) || this.freeze()) : (U.unobserve(this._canvas), this._isFrozen && this.unfreeze()));
|
|
1540
|
+
}
|
|
1541
|
+
loadAnimation(e) {
|
|
1542
|
+
this._dotLottieCore === null || this._dotLottieCore.animation_id() === e || !this._canvas || (this._syncCanvasSize(), this._setupTarget(this._canvas.width, this._canvas.height), this._dotLottieCore.load_animation_from_id(e) ? (this._renderConfig.quality !== void 0 && this._dotLottieCore.set_quality(this._renderConfig.quality), this._drainPlayerEvents(), this._dotLottieCore.render(), this._draw()) : this._dispatchError(`Failed to load animation with id: ${e}`));
|
|
1543
|
+
}
|
|
1544
|
+
setMarker(e) {
|
|
1545
|
+
this._dotLottieCore !== null && (this.markers().some((t) => t.name === e) ? (this._marker = e, this._dotLottieCore.set_marker(e)) : (this._marker = "", this._segment = null, this._dotLottieCore.clear_marker(), this._dotLottieCore.clear_segment()));
|
|
1546
|
+
}
|
|
1547
|
+
markers() {
|
|
1548
|
+
let e = this._dotLottieCore?.markers();
|
|
1549
|
+
return e && Array.isArray(e) ? e : [];
|
|
1550
|
+
}
|
|
1551
|
+
setTheme(e) {
|
|
1552
|
+
if (this._dotLottieCore === null) return !1;
|
|
1553
|
+
let t = this._dotLottieCore.set_theme(e);
|
|
1554
|
+
return t && (this._dotLottieCore.render(), this._draw()), t;
|
|
1555
|
+
}
|
|
1556
|
+
resetTheme() {
|
|
1557
|
+
if (this._dotLottieCore === null) return !1;
|
|
1558
|
+
let e = this._dotLottieCore.reset_theme();
|
|
1559
|
+
return e && (this._dotLottieCore.render(), this._draw()), e;
|
|
1560
|
+
}
|
|
1561
|
+
setThemeData(e) {
|
|
1562
|
+
if (this._dotLottieCore === null) return !1;
|
|
1563
|
+
let t = typeof e == "string" ? e : JSON.stringify(e), n = this._dotLottieCore.set_theme_data(t);
|
|
1564
|
+
return n && (this._dotLottieCore.render(), this._draw()), n;
|
|
1565
|
+
}
|
|
1566
|
+
setSlots(e) {
|
|
1567
|
+
this._dotLottieCore !== null && this._dotLottieCore.set_slots_str(JSON.stringify(e)) && (this._dotLottieCore.render(), this._draw());
|
|
1568
|
+
}
|
|
1569
|
+
_isKeyframeArray(e) {
|
|
1570
|
+
return Array.isArray(e) && e.length > 0 && typeof e[0] == "object" && e[0] !== null && "t" in e[0] && "s" in e[0];
|
|
1571
|
+
}
|
|
1572
|
+
getSlotIds() {
|
|
1573
|
+
if (!this._dotLottieCore) return [];
|
|
1574
|
+
let e = this._dotLottieCore.get_slot_ids();
|
|
1575
|
+
return Array.isArray(e) ? e : [];
|
|
1576
|
+
}
|
|
1577
|
+
getSlotType(e) {
|
|
1578
|
+
if (!this._dotLottieCore) return;
|
|
1579
|
+
let t = this._dotLottieCore.get_slot_type(e);
|
|
1580
|
+
if (t) return t;
|
|
1581
|
+
}
|
|
1582
|
+
getSlot(e) {
|
|
1583
|
+
if (!this._dotLottieCore) return;
|
|
1584
|
+
let t = this._dotLottieCore.get_slot_str(e);
|
|
1585
|
+
if (t) try {
|
|
1586
|
+
return JSON.parse(t);
|
|
1587
|
+
} catch {
|
|
1588
|
+
return;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
getSlots() {
|
|
1592
|
+
if (!this._dotLottieCore) return {};
|
|
1593
|
+
try {
|
|
1594
|
+
return JSON.parse(this._dotLottieCore.get_slots_str());
|
|
1595
|
+
} catch {
|
|
1596
|
+
return {};
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
setColorSlot(e, t) {
|
|
1600
|
+
if (this._dotLottieCore === null) return !1;
|
|
1601
|
+
let n = this._isKeyframeArray(t), r = JSON.stringify({
|
|
1602
|
+
a: +!!n,
|
|
1603
|
+
k: t
|
|
1604
|
+
}), i = this._dotLottieCore.set_slot_str(e, r);
|
|
1605
|
+
return this._dotLottieCore.render(), this._draw(), i;
|
|
1606
|
+
}
|
|
1607
|
+
setScalarSlot(e, t) {
|
|
1608
|
+
if (this._dotLottieCore === null) return !1;
|
|
1609
|
+
let n = JSON.stringify({
|
|
1610
|
+
a: typeof t == "number" ? 0 : 1,
|
|
1611
|
+
k: t
|
|
1612
|
+
}), r = this._dotLottieCore.set_slot_str(e, n);
|
|
1613
|
+
return this._dotLottieCore.render(), this._draw(), r;
|
|
1614
|
+
}
|
|
1615
|
+
setVectorSlot(e, t) {
|
|
1616
|
+
if (this._dotLottieCore === null) return !1;
|
|
1617
|
+
let n = this._isKeyframeArray(t), r = JSON.stringify({
|
|
1618
|
+
a: +!!n,
|
|
1619
|
+
k: t
|
|
1620
|
+
}), i = this._dotLottieCore.set_slot_str(e, r);
|
|
1621
|
+
return this._dotLottieCore.render(), this._draw(), i;
|
|
1622
|
+
}
|
|
1623
|
+
setGradientSlot(e, t, n) {
|
|
1624
|
+
if (this._dotLottieCore === null) return !1;
|
|
1625
|
+
let r = this._isKeyframeArray(t), i = JSON.stringify({
|
|
1626
|
+
k: {
|
|
1627
|
+
a: +!!r,
|
|
1628
|
+
k: t
|
|
1629
|
+
},
|
|
1630
|
+
p: n
|
|
1631
|
+
}), a = this._dotLottieCore.set_slot_str(e, i);
|
|
1632
|
+
return this._dotLottieCore.render(), this._draw(), a;
|
|
1633
|
+
}
|
|
1634
|
+
setTextSlot(e, t) {
|
|
1635
|
+
if (this._dotLottieCore === null) return !1;
|
|
1636
|
+
let n = this._dotLottieCore.get_slot_str(e), r = t;
|
|
1637
|
+
if (n) {
|
|
1638
|
+
let e = JSON.parse(n);
|
|
1639
|
+
if (e && "k" in e && Array.isArray(e.k)) {
|
|
1640
|
+
let n = e.k[0];
|
|
1641
|
+
"s" in n && typeof n.s == "object" && (r = {
|
|
1642
|
+
...n.s,
|
|
1643
|
+
...t
|
|
1644
|
+
});
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
let i = JSON.stringify({
|
|
1648
|
+
a: 0,
|
|
1649
|
+
k: [{
|
|
1650
|
+
t: 0,
|
|
1651
|
+
s: r
|
|
1652
|
+
}]
|
|
1653
|
+
}), a = this._dotLottieCore.set_slot_str(e, i);
|
|
1654
|
+
return this._dotLottieCore.render(), this._draw(), a;
|
|
1655
|
+
}
|
|
1656
|
+
async setImageSlot(e, t) {
|
|
1657
|
+
if (this._dotLottieCore === null) return !1;
|
|
1658
|
+
let n = await me(t);
|
|
1659
|
+
if (this._dotLottieCore === null) return !1;
|
|
1660
|
+
let r = this._dotLottieCore.set_image_slot(e, n);
|
|
1661
|
+
return this._dotLottieCore.render(), this._draw(), r;
|
|
1662
|
+
}
|
|
1663
|
+
resetSlot(e) {
|
|
1664
|
+
if (this._dotLottieCore === null) return !1;
|
|
1665
|
+
let t = this._dotLottieCore.reset_slot(e);
|
|
1666
|
+
return this._dotLottieCore.render(), this._draw(), t;
|
|
1667
|
+
}
|
|
1668
|
+
clearSlot(e) {
|
|
1669
|
+
if (this._dotLottieCore === null) return !1;
|
|
1670
|
+
let t = this._dotLottieCore.clear_slot(e);
|
|
1671
|
+
return this._dotLottieCore.render(), this._draw(), t;
|
|
1672
|
+
}
|
|
1673
|
+
resetSlots() {
|
|
1674
|
+
if (this._dotLottieCore === null) return !1;
|
|
1675
|
+
let e = this._dotLottieCore.reset_slots();
|
|
1676
|
+
return this._dotLottieCore.render(), this._draw(), e;
|
|
1677
|
+
}
|
|
1678
|
+
clearSlots() {
|
|
1679
|
+
if (this._dotLottieCore === null) return !1;
|
|
1680
|
+
let e = this._dotLottieCore.clear_slots();
|
|
1681
|
+
return this._dotLottieCore.render(), this._draw(), e;
|
|
1682
|
+
}
|
|
1683
|
+
setLayout(e) {
|
|
1684
|
+
this._dotLottieCore !== null && this._dotLottieCore.set_layout(e.fit ?? "contain", e.align?.[0] ?? .5, e.align?.[1] ?? .5);
|
|
1685
|
+
}
|
|
1686
|
+
setViewport(e, t, n, r) {
|
|
1687
|
+
return this._dotLottieCore === null ? !1 : this._dotLottieCore.set_viewport(e, t, n, r);
|
|
1688
|
+
}
|
|
1689
|
+
static setWasmUrl(e) {
|
|
1690
|
+
Z().setWasmUrl(e);
|
|
1691
|
+
}
|
|
1692
|
+
static preload() {
|
|
1693
|
+
return Z().load();
|
|
1694
|
+
}
|
|
1695
|
+
static async registerFont(e, t) {
|
|
1696
|
+
try {
|
|
1697
|
+
await Z().load();
|
|
1698
|
+
let n;
|
|
1699
|
+
if (typeof t == "string") {
|
|
1700
|
+
let e = await fetch(t);
|
|
1701
|
+
if (!e.ok) return console.error(`Failed to fetch font from URL: ${t}. Status: ${e.status}`), !1;
|
|
1702
|
+
n = new Uint8Array(await e.arrayBuffer());
|
|
1703
|
+
} else n = t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
1704
|
+
let r = te(e, n);
|
|
1705
|
+
return r || console.error(`Failed to register font "${e}". Font data may be invalid.`), r;
|
|
1706
|
+
} catch (t) {
|
|
1707
|
+
return console.error(`Error registering font "${e}":`, t), !1;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
animationSize() {
|
|
1711
|
+
let e = this._dotLottieCore?.animation_size();
|
|
1712
|
+
return {
|
|
1713
|
+
width: e?.[0] ?? 0,
|
|
1714
|
+
height: e?.[1] ?? 0
|
|
1715
|
+
};
|
|
1716
|
+
}
|
|
1717
|
+
stateMachineLoad(e) {
|
|
1718
|
+
return this._dotLottieCore ? this._dotLottieCore.state_machine_load_from_id(e) : !1;
|
|
1719
|
+
}
|
|
1720
|
+
stateMachineLoadData(e) {
|
|
1721
|
+
return this._dotLottieCore ? this._dotLottieCore.state_machine_load(e) : !1;
|
|
1722
|
+
}
|
|
1723
|
+
stateMachineSetConfig(e) {
|
|
1724
|
+
this._stateMachineConfig = e;
|
|
1725
|
+
}
|
|
1726
|
+
stateMachineStart() {
|
|
1727
|
+
if (this._dotLottieCore === null) return !1;
|
|
1728
|
+
let e = this._dotLottieCore.sm_start(this._stateMachineConfig?.openUrlPolicy?.requireUserInteraction ?? !0, this._stateMachineConfig?.openUrlPolicy?.whitelist ?? []);
|
|
1729
|
+
return this._drainSmEvents(), e && (this._isStateMachineRunning = !0, this._setupStateMachineListeners(), this._startAnimationLoop()), e;
|
|
1730
|
+
}
|
|
1731
|
+
stateMachineStop() {
|
|
1732
|
+
if (!this._dotLottieCore) return !1;
|
|
1733
|
+
let e = this._dotLottieCore.sm_stop();
|
|
1734
|
+
return this._drainSmEvents(), e && (this._isStateMachineRunning = !1, this._cleanupStateMachineListeners(), this._dotLottieCore.status() !== B.Playing && this._stopAnimationLoop()), e;
|
|
1735
|
+
}
|
|
1736
|
+
stateMachineGetStatus() {
|
|
1737
|
+
return this._dotLottieCore?.sm_status() ?? "";
|
|
1738
|
+
}
|
|
1739
|
+
stateMachineGetCurrentState() {
|
|
1740
|
+
return this._dotLottieCore?.sm_current_state() ?? "";
|
|
1741
|
+
}
|
|
1742
|
+
stateMachineGetActiveId() {
|
|
1743
|
+
return this._dotLottieCore?.state_machine_id() ?? "";
|
|
1744
|
+
}
|
|
1745
|
+
stateMachineOverrideState(e, t = !1) {
|
|
1746
|
+
return this._dotLottieCore?.sm_override_current_state(e, t) ?? !1;
|
|
1747
|
+
}
|
|
1748
|
+
stateMachineSetSeed(e) {
|
|
1749
|
+
return this._dotLottieCore?.sm_set_seed(BigInt(Math.trunc(e))) ?? !1;
|
|
1750
|
+
}
|
|
1751
|
+
stateMachineGet(e) {
|
|
1752
|
+
return this._dotLottieCore?.get_state_machine(e) ?? "";
|
|
1753
|
+
}
|
|
1754
|
+
stateMachineGetListeners() {
|
|
1755
|
+
if (!this._dotLottieCore) return [];
|
|
1756
|
+
let e = this._dotLottieCore.sm_framework_setup();
|
|
1757
|
+
return Array.isArray(e) ? e : [];
|
|
1758
|
+
}
|
|
1759
|
+
stateMachineSetBooleanInput(e, t) {
|
|
1760
|
+
return this._dotLottieCore?.sm_set_boolean_input(e, t) ?? !1;
|
|
1761
|
+
}
|
|
1762
|
+
stateMachineSetNumericInput(e, t) {
|
|
1763
|
+
return this._dotLottieCore?.sm_set_numeric_input(e, t) ?? !1;
|
|
1764
|
+
}
|
|
1765
|
+
stateMachineSetStringInput(e, t) {
|
|
1766
|
+
return this._dotLottieCore?.sm_set_string_input(e, t) ?? !1;
|
|
1767
|
+
}
|
|
1768
|
+
stateMachineGetBooleanInput(e) {
|
|
1769
|
+
return this._dotLottieCore?.sm_get_boolean_input(e) ?? void 0;
|
|
1770
|
+
}
|
|
1771
|
+
stateMachineGetNumericInput(e) {
|
|
1772
|
+
return this._dotLottieCore?.sm_get_numeric_input(e) ?? void 0;
|
|
1773
|
+
}
|
|
1774
|
+
stateMachineGetStringInput(e) {
|
|
1775
|
+
return this._dotLottieCore?.sm_get_string_input(e) ?? void 0;
|
|
1776
|
+
}
|
|
1777
|
+
stateMachineGetInputs() {
|
|
1778
|
+
if (!this._dotLottieCore) return [];
|
|
1779
|
+
let e = this._dotLottieCore.sm_get_inputs();
|
|
1780
|
+
return Array.isArray(e) ? e : [];
|
|
1781
|
+
}
|
|
1782
|
+
stateMachineFireEvent(e) {
|
|
1783
|
+
this._dotLottieCore?.sm_fire(e);
|
|
1784
|
+
}
|
|
1785
|
+
stateMachinePostClickEvent(e, t) {
|
|
1786
|
+
this._dotLottieCore?.sm_post_click(e, t);
|
|
1787
|
+
}
|
|
1788
|
+
stateMachinePostPointerUpEvent(e, t) {
|
|
1789
|
+
this._dotLottieCore?.sm_post_pointer_up(e, t);
|
|
1790
|
+
}
|
|
1791
|
+
stateMachinePostPointerDownEvent(e, t) {
|
|
1792
|
+
this._dotLottieCore?.sm_post_pointer_down(e, t);
|
|
1793
|
+
}
|
|
1794
|
+
stateMachinePostPointerMoveEvent(e, t) {
|
|
1795
|
+
this._dotLottieCore?.sm_post_pointer_move(e, t);
|
|
1796
|
+
}
|
|
1797
|
+
stateMachinePostPointerEnterEvent(e, t) {
|
|
1798
|
+
this._dotLottieCore?.sm_post_pointer_enter(e, t);
|
|
1799
|
+
}
|
|
1800
|
+
stateMachinePostPointerExitEvent(e, t) {
|
|
1801
|
+
this._dotLottieCore?.sm_post_pointer_exit(e, t);
|
|
1802
|
+
}
|
|
1803
|
+
_onClick(e) {
|
|
1804
|
+
let t = Y(e);
|
|
1805
|
+
t && this.stateMachinePostClickEvent(t.x, t.y);
|
|
1806
|
+
}
|
|
1807
|
+
_onPointerUp(e) {
|
|
1808
|
+
let t = Y(e);
|
|
1809
|
+
t && this.stateMachinePostPointerUpEvent(t.x, t.y);
|
|
1810
|
+
}
|
|
1811
|
+
_onPointerDown(e) {
|
|
1812
|
+
let t = Y(e);
|
|
1813
|
+
t && this.stateMachinePostPointerDownEvent(t.x, t.y);
|
|
1814
|
+
}
|
|
1815
|
+
_onPointerMove(e) {
|
|
1816
|
+
let t = Y(e);
|
|
1817
|
+
t && this.stateMachinePostPointerMoveEvent(t.x, t.y);
|
|
1818
|
+
}
|
|
1819
|
+
_onPointerEnter(e) {
|
|
1820
|
+
let t = Y(e);
|
|
1821
|
+
t && this.stateMachinePostPointerEnterEvent(t.x, t.y);
|
|
1822
|
+
}
|
|
1823
|
+
_onPointerLeave(e) {
|
|
1824
|
+
let t = Y(e);
|
|
1825
|
+
t && this.stateMachinePostPointerExitEvent(t.x, t.y);
|
|
1826
|
+
}
|
|
1827
|
+
_setupStateMachineListeners() {
|
|
1828
|
+
if (g && this._canvas instanceof HTMLCanvasElement && this._dotLottieCore !== null && this.isLoaded) {
|
|
1829
|
+
let e = this.stateMachineGetListeners();
|
|
1830
|
+
this._cleanupStateMachineListeners(), e.includes("Click") && (this._boundOnClick = this._onClick.bind(this), this._canvas.addEventListener("click", this._boundOnClick)), e.includes("PointerUp") && (this._boundOnPointerUp = this._onPointerUp.bind(this), this._canvas.addEventListener("pointerup", this._boundOnPointerUp)), e.includes("PointerDown") && (this._boundOnPointerDown = this._onPointerDown.bind(this), this._canvas.addEventListener("pointerdown", this._boundOnPointerDown)), e.includes("PointerMove") && (this._boundOnPointerMove = this._onPointerMove.bind(this), this._canvas.addEventListener("pointermove", this._boundOnPointerMove)), e.includes("PointerEnter") && (this._boundOnPointerEnter = this._onPointerEnter.bind(this), this._canvas.addEventListener("pointerenter", this._boundOnPointerEnter)), e.includes("PointerExit") && (this._boundOnPointerLeave = this._onPointerLeave.bind(this), this._canvas.addEventListener("pointerleave", this._boundOnPointerLeave));
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
_cleanupStateMachineListeners() {
|
|
1834
|
+
g && this._canvas instanceof HTMLCanvasElement && (this._boundOnClick &&= (this._canvas.removeEventListener("click", this._boundOnClick), null), this._boundOnPointerUp &&= (this._canvas.removeEventListener("pointerup", this._boundOnPointerUp), null), this._boundOnPointerDown &&= (this._canvas.removeEventListener("pointerdown", this._boundOnPointerDown), null), this._boundOnPointerMove &&= (this._canvas.removeEventListener("pointermove", this._boundOnPointerMove), null), this._boundOnPointerEnter &&= (this._canvas.removeEventListener("pointerenter", this._boundOnPointerEnter), null), this._boundOnPointerLeave &&= (this._canvas.removeEventListener("pointerleave", this._boundOnPointerLeave), null));
|
|
1835
|
+
}
|
|
1836
|
+
}, ye = ({ animationId: e, autoplay: t, backgroundColor: n, className: r, createDotLottie: s, data: l, dotLottieRefCallback: u, layout: d, loop: f, loopCount: p, mode: m, playOnHover: h, renderConfig: g, segment: _, speed: v, src: y, stateMachineConfig: b, stateMachineId: x, style: S, themeData: C, themeId: w, useFrameInterpolation: T, workerId: E, ...D }) => {
|
|
1837
|
+
let O = o(null), k = o(null), A = o(u), j = o(null), M = {
|
|
1838
|
+
speed: v,
|
|
1839
|
+
mode: m,
|
|
1840
|
+
loop: f,
|
|
1841
|
+
loopCount: p,
|
|
1842
|
+
useFrameInterpolation: T,
|
|
1843
|
+
segment: _,
|
|
1844
|
+
backgroundColor: n,
|
|
1845
|
+
autoplay: t,
|
|
1846
|
+
themeId: w,
|
|
1847
|
+
workerId: E,
|
|
1848
|
+
src: y,
|
|
1849
|
+
data: l,
|
|
1850
|
+
layout: d,
|
|
1851
|
+
renderConfig: g,
|
|
1852
|
+
animationId: e,
|
|
1853
|
+
stateMachineConfig: b,
|
|
1854
|
+
stateMachineId: x
|
|
1855
|
+
}, N = o(M);
|
|
1856
|
+
A.current = u, N.current = M;
|
|
1857
|
+
let P = i((e) => {
|
|
1858
|
+
if (k.current = e, e) {
|
|
1859
|
+
let t = j.current;
|
|
1860
|
+
t && t.canvas === e ? (clearTimeout(t.timer), j.current = null, O.current = t.instance) : O.current?.canvas !== e && (O.current = s({
|
|
1861
|
+
...N.current,
|
|
1862
|
+
canvas: e
|
|
1863
|
+
}));
|
|
1864
|
+
} else if (O.current) {
|
|
1865
|
+
let e = O.current, t = e.canvas;
|
|
1866
|
+
O.current = null, t instanceof HTMLCanvasElement ? j.current = {
|
|
1867
|
+
canvas: t,
|
|
1868
|
+
instance: e,
|
|
1869
|
+
timer: setTimeout(() => {
|
|
1870
|
+
j.current?.instance === e && (j.current = null), e.destroy();
|
|
1871
|
+
}, 0)
|
|
1872
|
+
} : e.destroy();
|
|
1873
|
+
}
|
|
1874
|
+
A.current?.(O.current);
|
|
1875
|
+
}, []);
|
|
1876
|
+
return a(() => {
|
|
1877
|
+
let e = (e) => {
|
|
1878
|
+
h && (e.type === "mouseenter" && O.current?.play(), e.type === "mouseleave" && O.current?.pause());
|
|
1879
|
+
};
|
|
1880
|
+
return k.current?.addEventListener("mouseenter", e), k.current?.addEventListener("mouseleave", e), () => {
|
|
1881
|
+
k.current?.removeEventListener("mouseenter", e), k.current?.removeEventListener("mouseleave", e);
|
|
1882
|
+
};
|
|
1883
|
+
}, [h]), a(() => {
|
|
1884
|
+
O.current?.setSpeed(v ?? 1);
|
|
1885
|
+
}, [v]), a(() => {
|
|
1886
|
+
O.current?.setMode(m ?? "forward");
|
|
1887
|
+
}, [m]), a(() => {
|
|
1888
|
+
O.current?.setLoop(f ?? !1);
|
|
1889
|
+
}, [f]), a(() => {
|
|
1890
|
+
O.current?.setLoopCount(p ?? 0);
|
|
1891
|
+
}, [p]), a(() => {
|
|
1892
|
+
O.current?.setUseFrameInterpolation(T ?? !0);
|
|
1893
|
+
}, [T]), a(() => {
|
|
1894
|
+
typeof _?.[0] == "number" && typeof _[1] == "number" ? O.current?.setSegment(_[0], _[1]) : O.current?.resetSegment();
|
|
1895
|
+
}, [_]), a(() => {
|
|
1896
|
+
O.current?.setBackgroundColor(n ?? "");
|
|
1897
|
+
}, [n]), a(() => {
|
|
1898
|
+
O.current?.setRenderConfig(g ?? {});
|
|
1899
|
+
}, [JSON.stringify(g)]), a(() => {
|
|
1900
|
+
typeof l != "string" && typeof l != "object" || O.current?.load({
|
|
1901
|
+
data: l,
|
|
1902
|
+
...N.current
|
|
1903
|
+
});
|
|
1904
|
+
}, [l]), a(() => {
|
|
1905
|
+
typeof y == "string" && O.current?.load({
|
|
1906
|
+
src: y,
|
|
1907
|
+
...N.current
|
|
1908
|
+
});
|
|
1909
|
+
}, [y]), a(() => {
|
|
1910
|
+
O.current?.setMarker(D.marker ?? "");
|
|
1911
|
+
}, [D.marker]), a(() => {
|
|
1912
|
+
O.current?.isLoaded && O.current.activeAnimationId !== e && O.current.loadAnimation(e ?? "");
|
|
1913
|
+
}, [e]), a(() => {
|
|
1914
|
+
typeof w == "string" && O.current?.setTheme(w);
|
|
1915
|
+
}, [w]), a(() => {
|
|
1916
|
+
O.current?.setThemeData(C ?? "");
|
|
1917
|
+
}, [C]), a(() => {
|
|
1918
|
+
O.current?.setLayout(d ?? {});
|
|
1919
|
+
}, [
|
|
1920
|
+
d?.fit,
|
|
1921
|
+
d?.align?.[0],
|
|
1922
|
+
d?.align?.[1]
|
|
1923
|
+
]), a(() => {
|
|
1924
|
+
O.current?.isLoaded && (typeof x == "string" && x ? O.current.stateMachineLoad(x) && O.current.stateMachineStart() : O.current.stateMachineStop());
|
|
1925
|
+
}, [x]), a(() => {
|
|
1926
|
+
O.current?.stateMachineSetConfig(b ?? null);
|
|
1927
|
+
}, [b]), c("div", {
|
|
1928
|
+
className: r,
|
|
1929
|
+
...!r && { style: {
|
|
1930
|
+
width: "100%",
|
|
1931
|
+
height: "100%",
|
|
1932
|
+
lineHeight: 0,
|
|
1933
|
+
...S
|
|
1934
|
+
} },
|
|
1935
|
+
children: c("canvas", {
|
|
1936
|
+
ref: P,
|
|
1937
|
+
style: {
|
|
1938
|
+
width: "100%",
|
|
1939
|
+
height: "100%"
|
|
1940
|
+
},
|
|
1941
|
+
...D
|
|
1942
|
+
})
|
|
1943
|
+
});
|
|
1944
|
+
}, be = (e) => new ve(e), xe = (e) => c(ye, {
|
|
1945
|
+
...e,
|
|
1946
|
+
createDotLottie: be
|
|
1947
|
+
}), Se = ({ width: i, height: o, className: l, playOnce: u, playThreshold: d, playRootMargin: f, autoplay: p = !1, alterImgSrcOnLoad: m, lottieFileSrcPath: h, bypassInView: g = !1 }) => {
|
|
1948
|
+
let _ = t(), [v, y] = s(null), [b, x] = s(!1), [S, C] = s(!1), { ref: w, inView: T } = n({
|
|
1949
|
+
threshold: d ?? (_ ? .4 : .9),
|
|
1950
|
+
rootMargin: f ?? (_ ? "20% 0% 0% 0%" : "40% 0% 10% 0%"),
|
|
1951
|
+
skip: g
|
|
1952
|
+
});
|
|
1953
|
+
return a(() => {
|
|
1954
|
+
if (!v) return;
|
|
1955
|
+
x(!1), C(v.isLoaded);
|
|
1956
|
+
let e = () => C(!0), t = () => x(!0);
|
|
1957
|
+
return v.addEventListener("load", e), v.addEventListener("loadError", t), () => {
|
|
1958
|
+
v.removeEventListener("load", e), v.removeEventListener("loadError", t);
|
|
1959
|
+
};
|
|
1960
|
+
}, [v]), a(() => {
|
|
1961
|
+
v && S && (g || T ? v.play() : u ? v.stop() : v.pause());
|
|
1962
|
+
}, [
|
|
1963
|
+
T,
|
|
1964
|
+
u,
|
|
1965
|
+
v,
|
|
1966
|
+
g,
|
|
1967
|
+
S
|
|
1968
|
+
]), (b || !h) && m ? /* @__PURE__ */ c("div", {
|
|
1969
|
+
className: "flex items-center justify-center",
|
|
1970
|
+
children: /* @__PURE__ */ c(r, {
|
|
1971
|
+
srcPath: m,
|
|
1972
|
+
width: i || 0
|
|
1973
|
+
})
|
|
1974
|
+
}) : /* @__PURE__ */ c("div", {
|
|
1975
|
+
className: "w-full",
|
|
1976
|
+
ref: w,
|
|
1977
|
+
children: /* @__PURE__ */ c("div", {
|
|
1978
|
+
className: e("flex", l),
|
|
1979
|
+
style: {
|
|
1980
|
+
width: i || void 0,
|
|
1981
|
+
height: o || void 0
|
|
1982
|
+
},
|
|
1983
|
+
children: /* @__PURE__ */ c(xe, {
|
|
1984
|
+
autoplay: p,
|
|
1985
|
+
dotLottieRefCallback: y,
|
|
1986
|
+
loop: !u,
|
|
1987
|
+
src: h
|
|
1988
|
+
})
|
|
1989
|
+
})
|
|
1990
|
+
});
|
|
1991
|
+
};
|
|
1992
|
+
//#endregion
|
|
1993
|
+
export { Se as t };
|