@rive-app/canvas-lite 2.31.6 → 2.32.1
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/package.json +1 -1
- package/rive.d.ts +46 -3
- package/rive.js +1449 -1349
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +39 -4
- package/rive_fallback.wasm +0 -0
package/rive.js
CHANGED
|
@@ -21,63 +21,63 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21
21
|
/* harmony export */ });
|
|
22
22
|
|
|
23
23
|
var Rive = (() => {
|
|
24
|
-
var
|
|
24
|
+
var _scriptName = typeof document != 'undefined' ? document.currentScript?.src : undefined;
|
|
25
25
|
|
|
26
26
|
return (
|
|
27
27
|
function(moduleArg = {}) {
|
|
28
|
+
var moduleRtn;
|
|
28
29
|
|
|
29
|
-
var
|
|
30
|
-
h.ready = new Promise((b, a) => {
|
|
30
|
+
var k = moduleArg, aa, ba, ca = new Promise((b, a) => {
|
|
31
31
|
aa = b;
|
|
32
32
|
ba = a;
|
|
33
|
-
});
|
|
34
|
-
function
|
|
33
|
+
}), da = "object" == typeof window, ea = "function" == typeof importScripts;
|
|
34
|
+
function ja() {
|
|
35
35
|
function b(m) {
|
|
36
|
-
const
|
|
36
|
+
const h = d;
|
|
37
37
|
c = a = 0;
|
|
38
38
|
d = new Map();
|
|
39
|
-
|
|
39
|
+
h.forEach(l => {
|
|
40
40
|
try {
|
|
41
|
-
|
|
42
|
-
} catch (
|
|
43
|
-
console.error(
|
|
41
|
+
l(m);
|
|
42
|
+
} catch (n) {
|
|
43
|
+
console.error(n);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
this.
|
|
47
|
-
e && e.
|
|
46
|
+
this.ua();
|
|
47
|
+
e && e.Oa();
|
|
48
48
|
}
|
|
49
49
|
let a = 0, c = 0, d = new Map(), e = null, f = null;
|
|
50
50
|
this.requestAnimationFrame = function(m) {
|
|
51
|
-
a
|
|
52
|
-
const
|
|
53
|
-
d.set(
|
|
54
|
-
return
|
|
51
|
+
a ||= requestAnimationFrame(b.bind(this));
|
|
52
|
+
const h = ++c;
|
|
53
|
+
d.set(h, m);
|
|
54
|
+
return h;
|
|
55
55
|
};
|
|
56
56
|
this.cancelAnimationFrame = function(m) {
|
|
57
57
|
d.delete(m);
|
|
58
58
|
a && 0 == d.size && (cancelAnimationFrame(a), a = 0);
|
|
59
59
|
};
|
|
60
|
-
this.
|
|
60
|
+
this.Ma = function(m) {
|
|
61
61
|
f && (document.body.remove(f), f = null);
|
|
62
|
-
m || (f = document.createElement("div"), f.style.backgroundColor = "black", f.style.position = "fixed", f.style.right = 0, f.style.top = 0, f.style.color = "white", f.style.padding = "4px", f.innerHTML = "RIVE FPS", m = function(
|
|
63
|
-
f.innerHTML = "RIVE FPS " +
|
|
62
|
+
m || (f = document.createElement("div"), f.style.backgroundColor = "black", f.style.position = "fixed", f.style.right = 0, f.style.top = 0, f.style.color = "white", f.style.padding = "4px", f.innerHTML = "RIVE FPS", m = function(h) {
|
|
63
|
+
f.innerHTML = "RIVE FPS " + h.toFixed(1);
|
|
64
64
|
}, document.body.appendChild(f));
|
|
65
65
|
e = new function() {
|
|
66
|
-
let
|
|
67
|
-
this.
|
|
68
|
-
var
|
|
69
|
-
|
|
66
|
+
let h = 0, l = 0;
|
|
67
|
+
this.Oa = function() {
|
|
68
|
+
var n = performance.now();
|
|
69
|
+
l ? (++h, n -= l, 1000 < n && (m(1000 * h / n), h = l = 0)) : (l = n, h = 0);
|
|
70
70
|
};
|
|
71
71
|
}();
|
|
72
72
|
};
|
|
73
|
-
this.
|
|
73
|
+
this.Ja = function() {
|
|
74
74
|
f && (document.body.remove(f), f = null);
|
|
75
75
|
e = null;
|
|
76
76
|
};
|
|
77
|
-
this.
|
|
77
|
+
this.ua = function() {
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ka(b) {
|
|
81
81
|
console.assert(!0);
|
|
82
82
|
const a = new Map();
|
|
83
83
|
let c = -Infinity;
|
|
@@ -92,84 +92,84 @@ function da(b) {
|
|
|
92
92
|
return c << b;
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
let b =
|
|
99
|
-
|
|
95
|
+
const la = k.onRuntimeInitialized;
|
|
96
|
+
k.onRuntimeInitialized = function() {
|
|
97
|
+
la && la();
|
|
98
|
+
let b = k.decodeAudio;
|
|
99
|
+
k.decodeAudio = function(e, f) {
|
|
100
100
|
e = b(e);
|
|
101
101
|
f(e);
|
|
102
102
|
};
|
|
103
|
-
let a =
|
|
104
|
-
|
|
103
|
+
let a = k.decodeFont;
|
|
104
|
+
k.decodeFont = function(e, f) {
|
|
105
105
|
e = a(e);
|
|
106
106
|
f(e);
|
|
107
107
|
};
|
|
108
|
-
const c =
|
|
109
|
-
|
|
110
|
-
let f =
|
|
111
|
-
return f.isImage ?
|
|
108
|
+
const c = k.FileAssetLoader;
|
|
109
|
+
k.ptrToAsset = e => {
|
|
110
|
+
let f = k.ptrToFileAsset(e);
|
|
111
|
+
return f.isImage ? k.ptrToImageAsset(e) : f.isFont ? k.ptrToFontAsset(e) : f.isAudio ? k.ptrToAudioAsset(e) : f;
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
k.CustomFileAssetLoader = c.extend("CustomFileAssetLoader", {__construct:function({loadContents:e}) {
|
|
114
114
|
this.__parent.__construct.call(this);
|
|
115
|
-
this.
|
|
115
|
+
this.Da = e;
|
|
116
116
|
}, loadContents:function(e, f) {
|
|
117
|
-
e =
|
|
118
|
-
return this.
|
|
117
|
+
e = k.ptrToAsset(e);
|
|
118
|
+
return this.Da(e, f);
|
|
119
119
|
},});
|
|
120
|
-
|
|
120
|
+
k.CDNFileAssetLoader = c.extend("CDNFileAssetLoader", {__construct:function() {
|
|
121
121
|
this.__parent.__construct.call(this);
|
|
122
122
|
}, loadContents:function(e) {
|
|
123
|
-
let f =
|
|
123
|
+
let f = k.ptrToAsset(e);
|
|
124
124
|
e = f.cdnUuid;
|
|
125
125
|
if ("" === e) {
|
|
126
126
|
return !1;
|
|
127
127
|
}
|
|
128
|
-
(function(m,
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
4 ==
|
|
128
|
+
(function(m, h) {
|
|
129
|
+
var l = new XMLHttpRequest();
|
|
130
|
+
l.responseType = "arraybuffer";
|
|
131
|
+
l.onreadystatechange = function() {
|
|
132
|
+
4 == l.readyState && 200 == l.status && h(l);
|
|
133
133
|
};
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
l.open("GET", m, !0);
|
|
135
|
+
l.send(null);
|
|
136
136
|
})(f.cdnBaseUrl + "/" + e, m => {
|
|
137
137
|
f.decode(new Uint8Array(m.response));
|
|
138
138
|
});
|
|
139
139
|
return !0;
|
|
140
140
|
},});
|
|
141
|
-
|
|
141
|
+
k.FallbackFileAssetLoader = c.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
142
142
|
this.__parent.__construct.call(this);
|
|
143
|
-
this.
|
|
143
|
+
this.ta = [];
|
|
144
144
|
}, addLoader:function(e) {
|
|
145
|
-
this.
|
|
145
|
+
this.ta.push(e);
|
|
146
146
|
}, loadContents:function(e, f) {
|
|
147
|
-
for (let m of this.
|
|
147
|
+
for (let m of this.ta) {
|
|
148
148
|
if (m.loadContents(e, f)) {
|
|
149
149
|
return !0;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
return !1;
|
|
153
153
|
},});
|
|
154
|
-
let d =
|
|
155
|
-
|
|
156
|
-
return d.call(this, e, f, m,
|
|
154
|
+
let d = k.computeAlignment;
|
|
155
|
+
k.computeAlignment = function(e, f, m, h, l = 1.0) {
|
|
156
|
+
return d.call(this, e, f, m, h, l);
|
|
157
157
|
};
|
|
158
158
|
};
|
|
159
|
-
const
|
|
159
|
+
const na = "createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "), oa = new function() {
|
|
160
160
|
function b() {
|
|
161
161
|
if (!a) {
|
|
162
|
-
var g = document.createElement("canvas"),
|
|
162
|
+
var g = document.createElement("canvas"), t = {alpha:1, depth:0, stencil:0, antialias:0, premultipliedAlpha:1, preserveDrawingBuffer:0, powerPreference:"high-performance", failIfMajorPerformanceCaveat:0, enableExtensionsByDefault:1, explicitSwapControl:1, renderViaOffscreenBackBuffer:1,};
|
|
163
163
|
let q;
|
|
164
164
|
if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
|
|
165
|
-
if (q = g.getContext("webgl",
|
|
165
|
+
if (q = g.getContext("webgl", t), c = 1, !q) {
|
|
166
166
|
return console.log("No WebGL support. Image mesh will not be drawn."), !1;
|
|
167
167
|
}
|
|
168
168
|
} else {
|
|
169
|
-
if (q = g.getContext("webgl2",
|
|
169
|
+
if (q = g.getContext("webgl2", t)) {
|
|
170
170
|
c = 2;
|
|
171
171
|
} else {
|
|
172
|
-
if (q = g.getContext("webgl",
|
|
172
|
+
if (q = g.getContext("webgl", t)) {
|
|
173
173
|
c = 1;
|
|
174
174
|
} else {
|
|
175
175
|
return console.log("No WebGL support. Image mesh will not be drawn."), !1;
|
|
@@ -178,7 +178,7 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
178
178
|
}
|
|
179
179
|
q = new Proxy(q, {get(E, v) {
|
|
180
180
|
if (E.isContextLost()) {
|
|
181
|
-
if (
|
|
181
|
+
if (l || (console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ", v), l = !0), "function" === typeof E[v]) {
|
|
182
182
|
return function() {
|
|
183
183
|
};
|
|
184
184
|
}
|
|
@@ -189,7 +189,7 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
189
189
|
}
|
|
190
190
|
}, set(E, v, I) {
|
|
191
191
|
if (E.isContextLost()) {
|
|
192
|
-
|
|
192
|
+
l || (console.error("Cannot render the mesh because the GL Context was lost. Tried to set property " + v), l = !0);
|
|
193
193
|
} else {
|
|
194
194
|
return E[v] = I, !0;
|
|
195
195
|
}
|
|
@@ -211,9 +211,9 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
211
211
|
q.bindAttribLocation(g, 0, "vertex");
|
|
212
212
|
q.bindAttribLocation(g, 1, "uv");
|
|
213
213
|
q.linkProgram(g);
|
|
214
|
-
|
|
215
|
-
if (0 < (
|
|
216
|
-
throw
|
|
214
|
+
t = q.getProgramInfoLog(g);
|
|
215
|
+
if (0 < (t || "").trim().length) {
|
|
216
|
+
throw t;
|
|
217
217
|
}
|
|
218
218
|
e = q.getUniformLocation(g, "mat");
|
|
219
219
|
f = q.getUniformLocation(g, "translate");
|
|
@@ -228,122 +228,122 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
228
228
|
}
|
|
229
229
|
return !0;
|
|
230
230
|
}
|
|
231
|
-
let a = null, c = 0, d = 0, e = null, f = null, m = 0,
|
|
231
|
+
let a = null, c = 0, d = 0, e = null, f = null, m = 0, h = 0, l = !1;
|
|
232
232
|
b();
|
|
233
|
-
this.
|
|
233
|
+
this.Wa = function() {
|
|
234
234
|
b();
|
|
235
235
|
return d;
|
|
236
236
|
};
|
|
237
|
-
this.
|
|
237
|
+
this.Ia = function(g) {
|
|
238
238
|
a.deleteTexture && a.deleteTexture(g);
|
|
239
239
|
};
|
|
240
|
-
this.
|
|
240
|
+
this.Ha = function(g) {
|
|
241
241
|
if (!b()) {
|
|
242
242
|
return null;
|
|
243
243
|
}
|
|
244
|
-
const
|
|
245
|
-
if (!
|
|
244
|
+
const t = a.createTexture();
|
|
245
|
+
if (!t) {
|
|
246
246
|
return null;
|
|
247
247
|
}
|
|
248
|
-
a.bindTexture(a.TEXTURE_2D,
|
|
248
|
+
a.bindTexture(a.TEXTURE_2D, t);
|
|
249
249
|
a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, g);
|
|
250
250
|
a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE);
|
|
251
251
|
a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE);
|
|
252
252
|
a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR);
|
|
253
253
|
2 == c ? (a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR_MIPMAP_LINEAR), a.generateMipmap(a.TEXTURE_2D)) : a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR);
|
|
254
|
-
return
|
|
254
|
+
return t;
|
|
255
255
|
};
|
|
256
|
-
const
|
|
257
|
-
this.
|
|
256
|
+
const n = new ka(8), r = new ka(8), w = new ka(10), y = new ka(10);
|
|
257
|
+
this.La = function(g, t, q, F, E) {
|
|
258
258
|
if (b()) {
|
|
259
|
-
var v =
|
|
259
|
+
var v = n.push(g), I = r.push(t);
|
|
260
260
|
if (a.canvas) {
|
|
261
261
|
if (a.canvas.width != v || a.canvas.height != I) {
|
|
262
262
|
a.canvas.width = v, a.canvas.height = I;
|
|
263
263
|
}
|
|
264
|
-
a.viewport(0, I -
|
|
264
|
+
a.viewport(0, I - t, g, t);
|
|
265
265
|
a.disable(a.SCISSOR_TEST);
|
|
266
266
|
a.clearColor(0, 0, 0, 0);
|
|
267
267
|
a.clear(a.COLOR_BUFFER_BIT);
|
|
268
268
|
a.enable(a.SCISSOR_TEST);
|
|
269
|
-
q.sort((C,
|
|
269
|
+
q.sort((C, W) => W.xa - C.xa);
|
|
270
270
|
v = w.push(F);
|
|
271
271
|
m != v && (a.bufferData(a.ARRAY_BUFFER, 8 * v, a.DYNAMIC_DRAW), m = v);
|
|
272
272
|
v = 0;
|
|
273
|
-
for (var
|
|
274
|
-
a.bufferSubData(a.ARRAY_BUFFER, v,
|
|
273
|
+
for (var L of q) {
|
|
274
|
+
a.bufferSubData(a.ARRAY_BUFFER, v, L.ha), v += 4 * L.ha.length;
|
|
275
275
|
}
|
|
276
276
|
console.assert(v == 4 * F);
|
|
277
|
-
for (var
|
|
278
|
-
a.bufferSubData(a.ARRAY_BUFFER, v,
|
|
277
|
+
for (var R of q) {
|
|
278
|
+
a.bufferSubData(a.ARRAY_BUFFER, v, R.Aa), v += 4 * R.Aa.length;
|
|
279
279
|
}
|
|
280
280
|
console.assert(v == 8 * F);
|
|
281
|
-
v =
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
for (var
|
|
285
|
-
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,
|
|
286
|
-
}
|
|
287
|
-
console.assert(
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
v =
|
|
281
|
+
v = y.push(E);
|
|
282
|
+
h != v && (a.bufferData(a.ELEMENT_ARRAY_BUFFER, 2 * v, a.DYNAMIC_DRAW), h = v);
|
|
283
|
+
L = 0;
|
|
284
|
+
for (var fa of q) {
|
|
285
|
+
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER, L, fa.indices), L += 2 * fa.indices.length;
|
|
286
|
+
}
|
|
287
|
+
console.assert(L == 2 * E);
|
|
288
|
+
fa = 0;
|
|
289
|
+
R = !0;
|
|
290
|
+
v = L = 0;
|
|
291
291
|
for (const C of q) {
|
|
292
|
-
C.image.
|
|
293
|
-
C.
|
|
292
|
+
C.image.ca != fa && (a.bindTexture(a.TEXTURE_2D, C.image.ba || null), fa = C.image.ca);
|
|
293
|
+
C.Za ? (a.scissor(C.ma, I - C.na - C.sa, C.kb, C.sa), R = !0) : R && (a.scissor(0, I - t, g, t), R = !1);
|
|
294
294
|
q = 2 / g;
|
|
295
|
-
const
|
|
296
|
-
a.uniform4f(e, C.
|
|
297
|
-
a.uniform2f(f, C.
|
|
295
|
+
const W = -2 / t;
|
|
296
|
+
a.uniform4f(e, C.M[0] * q * C.W, C.M[1] * W * C.X, C.M[2] * q * C.W, C.M[3] * W * C.X);
|
|
297
|
+
a.uniform2f(f, C.M[4] * q * C.W + q * (C.ma - C.Xa * C.W) - 1, C.M[5] * W * C.X + W * (C.na - C.Ya * C.X) + 1);
|
|
298
298
|
a.vertexAttribPointer(0, 2, a.FLOAT, !1, 0, v);
|
|
299
299
|
a.vertexAttribPointer(1, 2, a.FLOAT, !1, 0, v + 4 * F);
|
|
300
|
-
a.drawElements(a.TRIANGLES, C.indices.length, a.UNSIGNED_SHORT,
|
|
301
|
-
v += 4 * C.
|
|
302
|
-
|
|
300
|
+
a.drawElements(a.TRIANGLES, C.indices.length, a.UNSIGNED_SHORT, L);
|
|
301
|
+
v += 4 * C.ha.length;
|
|
302
|
+
L += 2 * C.indices.length;
|
|
303
303
|
}
|
|
304
304
|
console.assert(v == 4 * F);
|
|
305
|
-
console.assert(
|
|
305
|
+
console.assert(L == 2 * E);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
};
|
|
309
309
|
this.canvas = function() {
|
|
310
310
|
return b() && a.canvas;
|
|
311
311
|
};
|
|
312
|
-
}(),
|
|
313
|
-
|
|
312
|
+
}(), pa = k.onRuntimeInitialized;
|
|
313
|
+
k.onRuntimeInitialized = function() {
|
|
314
314
|
function b(p) {
|
|
315
315
|
switch(p) {
|
|
316
|
-
case
|
|
316
|
+
case n.srcOver:
|
|
317
317
|
return "source-over";
|
|
318
|
-
case
|
|
318
|
+
case n.screen:
|
|
319
319
|
return "screen";
|
|
320
|
-
case
|
|
320
|
+
case n.overlay:
|
|
321
321
|
return "overlay";
|
|
322
|
-
case
|
|
322
|
+
case n.darken:
|
|
323
323
|
return "darken";
|
|
324
|
-
case
|
|
324
|
+
case n.lighten:
|
|
325
325
|
return "lighten";
|
|
326
|
-
case
|
|
326
|
+
case n.colorDodge:
|
|
327
327
|
return "color-dodge";
|
|
328
|
-
case
|
|
328
|
+
case n.colorBurn:
|
|
329
329
|
return "color-burn";
|
|
330
|
-
case
|
|
330
|
+
case n.hardLight:
|
|
331
331
|
return "hard-light";
|
|
332
|
-
case
|
|
332
|
+
case n.softLight:
|
|
333
333
|
return "soft-light";
|
|
334
|
-
case
|
|
334
|
+
case n.difference:
|
|
335
335
|
return "difference";
|
|
336
|
-
case
|
|
336
|
+
case n.exclusion:
|
|
337
337
|
return "exclusion";
|
|
338
|
-
case
|
|
338
|
+
case n.multiply:
|
|
339
339
|
return "multiply";
|
|
340
|
-
case
|
|
340
|
+
case n.hue:
|
|
341
341
|
return "hue";
|
|
342
|
-
case
|
|
342
|
+
case n.saturation:
|
|
343
343
|
return "saturation";
|
|
344
|
-
case
|
|
344
|
+
case n.color:
|
|
345
345
|
return "color";
|
|
346
|
-
case
|
|
346
|
+
case n.luminosity:
|
|
347
347
|
return "luminosity";
|
|
348
348
|
}
|
|
349
349
|
}
|
|
@@ -351,7 +351,7 @@ h.onRuntimeInitialized = function() {
|
|
|
351
351
|
return "rgba(" + ((16711680 & p) >>> 16) + "," + ((65280 & p) >>> 8) + "," + ((255 & p) >>> 0) + "," + ((4278190080 & p) >>> 24) / 255 + ")";
|
|
352
352
|
}
|
|
353
353
|
function c() {
|
|
354
|
-
0 < I.length && (
|
|
354
|
+
0 < I.length && (oa.La(v.drawWidth(), v.drawHeight(), I, L, R), I = [], R = L = 0, v.reset(512, 512));
|
|
355
355
|
for (const p of E) {
|
|
356
356
|
for (const u of p.u) {
|
|
357
357
|
u();
|
|
@@ -360,251 +360,251 @@ h.onRuntimeInitialized = function() {
|
|
|
360
360
|
}
|
|
361
361
|
E.clear();
|
|
362
362
|
}
|
|
363
|
-
|
|
364
|
-
var d =
|
|
365
|
-
const e =
|
|
363
|
+
pa && pa();
|
|
364
|
+
var d = k.RenderPaintStyle;
|
|
365
|
+
const e = k.RenderPath, f = k.RenderPaint, m = k.Renderer, h = k.StrokeCap, l = k.StrokeJoin, n = k.BlendMode, r = d.fill, w = d.stroke, y = k.FillRule.evenOdd;
|
|
366
366
|
let g = 1;
|
|
367
|
-
var
|
|
367
|
+
var t = k.RenderImage.extend("CanvasRenderImage", {__construct:function({P:p, V:u} = {}) {
|
|
368
368
|
this.__parent.__construct.call(this);
|
|
369
|
-
this.
|
|
369
|
+
this.ca = g;
|
|
370
370
|
g = g + 1 & 2147483647 || 1;
|
|
371
|
-
this.
|
|
372
|
-
this.
|
|
371
|
+
this.P = p;
|
|
372
|
+
this.V = u;
|
|
373
373
|
}, __destruct:function() {
|
|
374
|
-
this.
|
|
374
|
+
this.ba && (oa.Ia(this.ba), URL.revokeObjectURL(this.ka));
|
|
375
375
|
this.__parent.__destruct.call(this);
|
|
376
376
|
}, decode:function(p) {
|
|
377
377
|
var u = this;
|
|
378
|
-
u.
|
|
378
|
+
u.V && u.V(u);
|
|
379
379
|
var A = new Image();
|
|
380
|
-
u.
|
|
380
|
+
u.ka = URL.createObjectURL(new Blob([p], {type:"image/png",}));
|
|
381
381
|
A.onload = function() {
|
|
382
|
-
u.
|
|
383
|
-
u.
|
|
382
|
+
u.Ca = A;
|
|
383
|
+
u.ba = oa.Ha(A);
|
|
384
384
|
u.size(A.width, A.height);
|
|
385
|
-
u.
|
|
385
|
+
u.P && u.P(u);
|
|
386
386
|
};
|
|
387
|
-
A.src = u.
|
|
387
|
+
A.src = u.ka;
|
|
388
388
|
},}), q = e.extend("CanvasRenderPath", {__construct:function() {
|
|
389
389
|
this.__parent.__construct.call(this);
|
|
390
|
-
this.
|
|
390
|
+
this.G = new Path2D();
|
|
391
391
|
}, rewind:function() {
|
|
392
|
-
this.
|
|
393
|
-
}, addPath:function(p, u, A, D,
|
|
394
|
-
var H = this.
|
|
395
|
-
p = p.
|
|
392
|
+
this.G = new Path2D();
|
|
393
|
+
}, addPath:function(p, u, A, D, z, B, G) {
|
|
394
|
+
var H = this.G, V = H.addPath;
|
|
395
|
+
p = p.G;
|
|
396
396
|
const M = new DOMMatrix();
|
|
397
397
|
M.a = u;
|
|
398
398
|
M.b = A;
|
|
399
399
|
M.c = D;
|
|
400
|
-
M.d =
|
|
400
|
+
M.d = z;
|
|
401
401
|
M.e = B;
|
|
402
402
|
M.f = G;
|
|
403
403
|
V.call(H, p, M);
|
|
404
404
|
}, fillRule:function(p) {
|
|
405
|
-
this.
|
|
405
|
+
this.ja = p;
|
|
406
406
|
}, moveTo:function(p, u) {
|
|
407
|
-
this.
|
|
407
|
+
this.G.moveTo(p, u);
|
|
408
408
|
}, lineTo:function(p, u) {
|
|
409
|
-
this.
|
|
410
|
-
}, cubicTo:function(p, u, A, D,
|
|
411
|
-
this.
|
|
409
|
+
this.G.lineTo(p, u);
|
|
410
|
+
}, cubicTo:function(p, u, A, D, z, B) {
|
|
411
|
+
this.G.bezierCurveTo(p, u, A, D, z, B);
|
|
412
412
|
}, close:function() {
|
|
413
|
-
this.
|
|
413
|
+
this.G.closePath();
|
|
414
414
|
},}), F = f.extend("CanvasRenderPaint", {color:function(p) {
|
|
415
|
-
this.
|
|
415
|
+
this.la = a(p);
|
|
416
416
|
}, thickness:function(p) {
|
|
417
|
-
this.
|
|
417
|
+
this.Fa = p;
|
|
418
418
|
}, join:function(p) {
|
|
419
419
|
switch(p) {
|
|
420
|
-
case
|
|
421
|
-
this.
|
|
420
|
+
case l.miter:
|
|
421
|
+
this.aa = "miter";
|
|
422
422
|
break;
|
|
423
|
-
case
|
|
424
|
-
this.
|
|
423
|
+
case l.round:
|
|
424
|
+
this.aa = "round";
|
|
425
425
|
break;
|
|
426
|
-
case
|
|
427
|
-
this.
|
|
426
|
+
case l.bevel:
|
|
427
|
+
this.aa = "bevel";
|
|
428
428
|
}
|
|
429
429
|
}, cap:function(p) {
|
|
430
430
|
switch(p) {
|
|
431
|
-
case
|
|
432
|
-
this
|
|
431
|
+
case h.butt:
|
|
432
|
+
this.$ = "butt";
|
|
433
433
|
break;
|
|
434
|
-
case
|
|
435
|
-
this
|
|
434
|
+
case h.round:
|
|
435
|
+
this.$ = "round";
|
|
436
436
|
break;
|
|
437
|
-
case
|
|
438
|
-
this
|
|
437
|
+
case h.square:
|
|
438
|
+
this.$ = "square";
|
|
439
439
|
}
|
|
440
440
|
}, style:function(p) {
|
|
441
|
-
this.
|
|
441
|
+
this.Ea = p;
|
|
442
442
|
}, blendMode:function(p) {
|
|
443
|
-
this.
|
|
443
|
+
this.Ba = b(p);
|
|
444
444
|
}, clearGradient:function() {
|
|
445
|
-
this.
|
|
445
|
+
this.O = null;
|
|
446
446
|
}, linearGradient:function(p, u, A, D) {
|
|
447
|
-
this.
|
|
447
|
+
this.O = {ya:p, za:u, pa:A, qa:D, fa:[],};
|
|
448
448
|
}, radialGradient:function(p, u, A, D) {
|
|
449
|
-
this.
|
|
449
|
+
this.O = {ya:p, za:u, pa:A, qa:D, fa:[], Va:!0,};
|
|
450
450
|
}, addStop:function(p, u) {
|
|
451
|
-
this.
|
|
451
|
+
this.O.fa.push({color:p, stop:u,});
|
|
452
452
|
}, completeGradient:function() {
|
|
453
453
|
}, draw:function(p, u, A) {
|
|
454
|
-
let D = this.
|
|
455
|
-
var
|
|
456
|
-
p.globalCompositeOperation = this.
|
|
454
|
+
let D = this.Ea;
|
|
455
|
+
var z = this.la, B = this.O;
|
|
456
|
+
p.globalCompositeOperation = this.Ba;
|
|
457
457
|
if (null != B) {
|
|
458
|
-
|
|
459
|
-
var G = B.
|
|
460
|
-
const V = B.
|
|
461
|
-
var H = B.
|
|
462
|
-
const M = B.
|
|
463
|
-
B.
|
|
464
|
-
for (let
|
|
465
|
-
G = M[
|
|
458
|
+
z = B.ya;
|
|
459
|
+
var G = B.za;
|
|
460
|
+
const V = B.pa;
|
|
461
|
+
var H = B.qa;
|
|
462
|
+
const M = B.fa;
|
|
463
|
+
B.Va ? (B = V - z, H -= G, z = p.createRadialGradient(z, G, 0, z, G, Math.sqrt(B * B + H * H))) : z = p.createLinearGradient(z, G, V, H);
|
|
464
|
+
for (let U = 0, N = M.length; U < N; U++) {
|
|
465
|
+
G = M[U], z.addColorStop(G.stop, a(G.color));
|
|
466
466
|
}
|
|
467
|
-
this.
|
|
468
|
-
this.
|
|
467
|
+
this.la = z;
|
|
468
|
+
this.O = null;
|
|
469
469
|
}
|
|
470
470
|
switch(D) {
|
|
471
471
|
case w:
|
|
472
|
-
p.strokeStyle =
|
|
473
|
-
p.lineWidth = this.
|
|
474
|
-
p.lineCap = this
|
|
475
|
-
p.lineJoin = this.
|
|
472
|
+
p.strokeStyle = z;
|
|
473
|
+
p.lineWidth = this.Fa;
|
|
474
|
+
p.lineCap = this.$;
|
|
475
|
+
p.lineJoin = this.aa;
|
|
476
476
|
p.stroke(u);
|
|
477
477
|
break;
|
|
478
|
-
case
|
|
479
|
-
p.fillStyle =
|
|
478
|
+
case r:
|
|
479
|
+
p.fillStyle = z, p.fill(u, A);
|
|
480
480
|
}
|
|
481
481
|
},});
|
|
482
482
|
const E = new Set();
|
|
483
|
-
let v = null, I = [],
|
|
484
|
-
var
|
|
483
|
+
let v = null, I = [], L = 0, R = 0;
|
|
484
|
+
var fa = k.CanvasRenderer = m.extend("Renderer", {__construct:function(p) {
|
|
485
485
|
this.__parent.__construct.call(this);
|
|
486
|
-
this.
|
|
487
|
-
this.
|
|
488
|
-
this.
|
|
486
|
+
this.F = [1, 0, 0, 1, 0, 0];
|
|
487
|
+
this.m = p.getContext("2d");
|
|
488
|
+
this.ia = p;
|
|
489
489
|
this.u = [];
|
|
490
490
|
}, save:function() {
|
|
491
|
-
this.
|
|
492
|
-
this.u.push(this.
|
|
491
|
+
this.F.push(...this.F.slice(this.F.length - 6));
|
|
492
|
+
this.u.push(this.m.save.bind(this.m));
|
|
493
493
|
}, restore:function() {
|
|
494
|
-
const p = this.
|
|
494
|
+
const p = this.F.length - 6;
|
|
495
495
|
if (6 > p) {
|
|
496
496
|
throw "restore() called without matching save().";
|
|
497
497
|
}
|
|
498
|
-
this.
|
|
499
|
-
this.u.push(this.
|
|
500
|
-
}, transform:function(p, u, A, D,
|
|
501
|
-
const G = this.
|
|
502
|
-
G.splice(H, 6, G[H] * p + G[H + 2] * u, G[H + 1] * p + G[H + 3] * u, G[H] * A + G[H + 2] * D, G[H + 1] * A + G[H + 3] * D, G[H] *
|
|
503
|
-
this.u.push(this.
|
|
498
|
+
this.F.splice(p);
|
|
499
|
+
this.u.push(this.m.restore.bind(this.m));
|
|
500
|
+
}, transform:function(p, u, A, D, z, B) {
|
|
501
|
+
const G = this.F, H = G.length - 6;
|
|
502
|
+
G.splice(H, 6, G[H] * p + G[H + 2] * u, G[H + 1] * p + G[H + 3] * u, G[H] * A + G[H + 2] * D, G[H + 1] * A + G[H + 3] * D, G[H] * z + G[H + 2] * B + G[H + 4], G[H + 1] * z + G[H + 3] * B + G[H + 5]);
|
|
503
|
+
this.u.push(this.m.transform.bind(this.m, p, u, A, D, z, B));
|
|
504
504
|
}, rotate:function(p) {
|
|
505
505
|
const u = Math.sin(p);
|
|
506
506
|
p = Math.cos(p);
|
|
507
507
|
this.transform(p, u, -u, p, 0, 0);
|
|
508
508
|
}, _drawPath:function(p, u) {
|
|
509
|
-
this.u.push(u.draw.bind(u, this.
|
|
509
|
+
this.u.push(u.draw.bind(u, this.m, p.G, p.ja === y ? "evenodd" : "nonzero"));
|
|
510
510
|
}, _drawRiveImage:function(p, u, A, D) {
|
|
511
|
-
var
|
|
512
|
-
if (
|
|
513
|
-
var B = this.
|
|
511
|
+
var z = p.Ca;
|
|
512
|
+
if (z) {
|
|
513
|
+
var B = this.m, G = b(A);
|
|
514
514
|
this.u.push(function() {
|
|
515
515
|
B.globalCompositeOperation = G;
|
|
516
516
|
B.globalAlpha = D;
|
|
517
|
-
B.drawImage(
|
|
517
|
+
B.drawImage(z, 0, 0);
|
|
518
518
|
B.globalAlpha = 1;
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
}, _getMatrix:function(p) {
|
|
522
|
-
const u = this.
|
|
522
|
+
const u = this.F, A = u.length - 6;
|
|
523
523
|
for (let D = 0; 6 > D; ++D) {
|
|
524
524
|
p[D] = u[A + D];
|
|
525
525
|
}
|
|
526
|
-
}, _drawImageMesh:function(p, u, A, D,
|
|
527
|
-
u = this.
|
|
528
|
-
var N = this.
|
|
529
|
-
const
|
|
526
|
+
}, _drawImageMesh:function(p, u, A, D, z, B, G, H, V, M, U) {
|
|
527
|
+
u = this.m.canvas.width;
|
|
528
|
+
var N = this.m.canvas.height;
|
|
529
|
+
const rb = M - H, sb = U - V;
|
|
530
530
|
H = Math.max(H, 0);
|
|
531
531
|
V = Math.max(V, 0);
|
|
532
532
|
M = Math.min(M, u);
|
|
533
|
-
|
|
534
|
-
const
|
|
535
|
-
console.assert(
|
|
536
|
-
console.assert(
|
|
537
|
-
if (!(0 >=
|
|
538
|
-
M =
|
|
539
|
-
u =
|
|
540
|
-
var
|
|
541
|
-
N =
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
v || (v = new
|
|
545
|
-
N = v.addRect(
|
|
546
|
-
0 > N && (c(), E.add(this), N = v.addRect(
|
|
547
|
-
var
|
|
548
|
-
I.push({
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
var
|
|
533
|
+
U = Math.min(U, N);
|
|
534
|
+
const ta = M - H, ua = U - V;
|
|
535
|
+
console.assert(ta <= Math.min(rb, u));
|
|
536
|
+
console.assert(ua <= Math.min(sb, N));
|
|
537
|
+
if (!(0 >= ta || 0 >= ua)) {
|
|
538
|
+
M = ta < rb || ua < sb;
|
|
539
|
+
u = U = 1;
|
|
540
|
+
var ha = Math.ceil(ta * U), ia = Math.ceil(ua * u);
|
|
541
|
+
N = oa.Wa();
|
|
542
|
+
ha > N && (U *= N / ha, ha = N);
|
|
543
|
+
ia > N && (u *= N / ia, ia = N);
|
|
544
|
+
v || (v = new k.DynamicRectanizer(N), v.reset(512, 512));
|
|
545
|
+
N = v.addRect(ha, ia);
|
|
546
|
+
0 > N && (c(), E.add(this), N = v.addRect(ha, ia), console.assert(0 <= N));
|
|
547
|
+
var tb = N & 65535, ub = N >> 16;
|
|
548
|
+
I.push({M:this.F.slice(this.F.length - 6), image:p, ma:tb, na:ub, Xa:H, Ya:V, kb:ha, sa:ia, W:U, X:u, ha:new Float32Array(z), Aa:new Float32Array(B), indices:new Uint16Array(G), Za:M, xa:p.ca << 1 | (M ? 1 : 0),});
|
|
549
|
+
L += z.length;
|
|
550
|
+
R += G.length;
|
|
551
|
+
var ma = this.m, lc = b(A);
|
|
552
552
|
this.u.push(function() {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
|
|
553
|
+
ma.save();
|
|
554
|
+
ma.resetTransform();
|
|
555
|
+
ma.globalCompositeOperation = lc;
|
|
556
|
+
ma.globalAlpha = D;
|
|
557
|
+
const vb = oa.canvas();
|
|
558
|
+
vb && ma.drawImage(vb, tb, ub, ha, ia, H, V, ta, ua);
|
|
559
|
+
ma.restore();
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
562
|
}, _clipPath:function(p) {
|
|
563
|
-
this.u.push(this.
|
|
563
|
+
this.u.push(this.m.clip.bind(this.m, p.G, p.ja === y ? "evenodd" : "nonzero"));
|
|
564
564
|
}, clear:function() {
|
|
565
565
|
E.add(this);
|
|
566
|
-
this.u.push(this.
|
|
566
|
+
this.u.push(this.m.clearRect.bind(this.m, 0, 0, this.ia.width, this.ia.height));
|
|
567
567
|
}, flush:function() {
|
|
568
568
|
}, translate:function(p, u) {
|
|
569
569
|
this.transform(1, 0, 0, 1, p, u);
|
|
570
570
|
},});
|
|
571
|
-
|
|
572
|
-
const u = new
|
|
573
|
-
return new Proxy(u, {get(D,
|
|
574
|
-
if ("function" === typeof D[
|
|
571
|
+
k.makeRenderer = function(p) {
|
|
572
|
+
const u = new fa(p), A = u.m;
|
|
573
|
+
return new Proxy(u, {get(D, z) {
|
|
574
|
+
if ("function" === typeof D[z]) {
|
|
575
575
|
return function(...B) {
|
|
576
|
-
return D[
|
|
576
|
+
return D[z].apply(D, B);
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
if ("function" === typeof A[
|
|
580
|
-
if (-1 <
|
|
581
|
-
throw Error("RiveException: Method call to '" +
|
|
579
|
+
if ("function" === typeof A[z]) {
|
|
580
|
+
if (-1 < na.indexOf(z)) {
|
|
581
|
+
throw Error("RiveException: Method call to '" + z + "()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");
|
|
582
582
|
}
|
|
583
583
|
return function(...B) {
|
|
584
|
-
u.u.push(A[
|
|
584
|
+
u.u.push(A[z].bind(A, ...B));
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
|
-
return D[
|
|
588
|
-
}, set(D,
|
|
589
|
-
if (
|
|
587
|
+
return D[z];
|
|
588
|
+
}, set(D, z, B) {
|
|
589
|
+
if (z in A) {
|
|
590
590
|
return u.u.push(() => {
|
|
591
|
-
A[
|
|
591
|
+
A[z] = B;
|
|
592
592
|
}), !0;
|
|
593
593
|
}
|
|
594
594
|
},});
|
|
595
595
|
};
|
|
596
|
-
|
|
597
|
-
(new
|
|
596
|
+
k.decodeImage = function(p, u) {
|
|
597
|
+
(new t({P:u})).decode(p);
|
|
598
598
|
};
|
|
599
|
-
|
|
599
|
+
k.renderFactory = {makeRenderPaint:function() {
|
|
600
600
|
return new F();
|
|
601
601
|
}, makeRenderPath:function() {
|
|
602
602
|
return new q();
|
|
603
603
|
}, makeRenderImage:function() {
|
|
604
|
-
let p =
|
|
605
|
-
return new
|
|
604
|
+
let p = W;
|
|
605
|
+
return new t({V:() => {
|
|
606
606
|
p.total++;
|
|
607
|
-
},
|
|
607
|
+
}, P:() => {
|
|
608
608
|
p.loaded++;
|
|
609
609
|
if (p.loaded === p.total) {
|
|
610
610
|
const u = p.ready;
|
|
@@ -612,187 +612,153 @@ h.onRuntimeInitialized = function() {
|
|
|
612
612
|
}
|
|
613
613
|
},});
|
|
614
614
|
},};
|
|
615
|
-
let C =
|
|
616
|
-
|
|
617
|
-
const D = new
|
|
615
|
+
let C = k.load, W = null;
|
|
616
|
+
k.load = function(p, u, A = !0) {
|
|
617
|
+
const D = new k.FallbackFileAssetLoader();
|
|
618
618
|
void 0 !== u && D.addLoader(u);
|
|
619
|
-
A && (u = new
|
|
620
|
-
return new Promise(function(
|
|
619
|
+
A && (u = new k.CDNFileAssetLoader(), D.addLoader(u));
|
|
620
|
+
return new Promise(function(z) {
|
|
621
621
|
let B = null;
|
|
622
|
-
|
|
623
|
-
|
|
622
|
+
W = {total:0, loaded:0, ready:function() {
|
|
623
|
+
z(B);
|
|
624
624
|
},};
|
|
625
625
|
B = C(p, D);
|
|
626
|
-
0 ==
|
|
626
|
+
0 == W.total && z(B);
|
|
627
627
|
});
|
|
628
628
|
};
|
|
629
|
-
let
|
|
630
|
-
|
|
631
|
-
|
|
629
|
+
let mc = k.RendererWrapper.prototype.align;
|
|
630
|
+
k.RendererWrapper.prototype.align = function(p, u, A, D, z = 1.0) {
|
|
631
|
+
mc.call(this, p, u, A, D, z);
|
|
632
632
|
};
|
|
633
|
-
d = new
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
d.
|
|
639
|
-
|
|
640
|
-
|
|
633
|
+
d = new ja();
|
|
634
|
+
k.requestAnimationFrame = d.requestAnimationFrame.bind(d);
|
|
635
|
+
k.cancelAnimationFrame = d.cancelAnimationFrame.bind(d);
|
|
636
|
+
k.enableFPSCounter = d.Ma.bind(d);
|
|
637
|
+
k.disableFPSCounter = d.Ja;
|
|
638
|
+
d.ua = c;
|
|
639
|
+
k.resolveAnimationFrame = c;
|
|
640
|
+
k.cleanup = function() {
|
|
641
641
|
v && v.delete();
|
|
642
642
|
};
|
|
643
643
|
};
|
|
644
|
-
var
|
|
645
|
-
if (
|
|
646
|
-
|
|
644
|
+
var qa = Object.assign({}, k), ra = "./this.program", x = "", sa, va;
|
|
645
|
+
if (da || ea) {
|
|
646
|
+
ea ? x = self.location.href : "undefined" != typeof document && document.currentScript && (x = document.currentScript.src), _scriptName && (x = _scriptName), x.startsWith("blob:") ? x = "" : x = x.substr(0, x.replace(/[?#].*/, "").lastIndexOf("/") + 1), ea && (va = b => {
|
|
647
647
|
var a = new XMLHttpRequest();
|
|
648
648
|
a.open("GET", b, !1);
|
|
649
649
|
a.responseType = "arraybuffer";
|
|
650
650
|
a.send(null);
|
|
651
651
|
return new Uint8Array(a.response);
|
|
652
652
|
}), sa = (b, a, c) => {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
653
|
+
if (wa(b)) {
|
|
654
|
+
var d = new XMLHttpRequest();
|
|
655
|
+
d.open("GET", b, !0);
|
|
656
|
+
d.responseType = "arraybuffer";
|
|
657
|
+
d.onload = () => {
|
|
658
|
+
200 == d.status || 0 == d.status && d.response ? a(d.response) : c();
|
|
659
|
+
};
|
|
660
|
+
d.onerror = c;
|
|
661
|
+
d.send(null);
|
|
662
|
+
} else {
|
|
663
|
+
fetch(b, {credentials:"same-origin"}).then(e => e.ok ? e.arrayBuffer() : Promise.reject(Error(e.status + " : " + e.url))).then(a, c);
|
|
664
|
+
}
|
|
661
665
|
};
|
|
662
666
|
}
|
|
663
|
-
var
|
|
664
|
-
Object.assign(
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
var
|
|
668
|
-
|
|
669
|
-
var
|
|
670
|
-
"object" != typeof WebAssembly && za("no native wasm support detected");
|
|
671
|
-
var Aa, z, Ba = !1, Ca, J, Da, Ea, K, L, Fa, Ga;
|
|
667
|
+
var xa = k.print || console.log.bind(console), ya = k.printErr || console.error.bind(console);
|
|
668
|
+
Object.assign(k, qa);
|
|
669
|
+
qa = null;
|
|
670
|
+
k.thisProgram && (ra = k.thisProgram);
|
|
671
|
+
var za;
|
|
672
|
+
k.wasmBinary && (za = k.wasmBinary);
|
|
673
|
+
var Aa, Ba = !1, Ca, J, Da, Ea, K, O, Fa, Ga;
|
|
672
674
|
function Ha() {
|
|
673
675
|
var b = Aa.buffer;
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
676
|
+
k.HEAP8 = Ca = new Int8Array(b);
|
|
677
|
+
k.HEAP16 = Da = new Int16Array(b);
|
|
678
|
+
k.HEAPU8 = J = new Uint8Array(b);
|
|
679
|
+
k.HEAPU16 = Ea = new Uint16Array(b);
|
|
680
|
+
k.HEAP32 = K = new Int32Array(b);
|
|
681
|
+
k.HEAPU32 = O = new Uint32Array(b);
|
|
682
|
+
k.HEAPF32 = Fa = new Float32Array(b);
|
|
683
|
+
k.HEAPF64 = Ga = new Float64Array(b);
|
|
682
684
|
}
|
|
683
|
-
var Ia
|
|
684
|
-
function
|
|
685
|
-
var b =
|
|
686
|
-
|
|
685
|
+
var Ia = [], Ja = [], Ka = [];
|
|
686
|
+
function La() {
|
|
687
|
+
var b = k.preRun.shift();
|
|
688
|
+
Ia.unshift(b);
|
|
687
689
|
}
|
|
688
|
-
var
|
|
689
|
-
function
|
|
690
|
-
|
|
691
|
-
h.onAbort(b);
|
|
692
|
-
}
|
|
690
|
+
var Ma = 0, Na = null, Oa = null;
|
|
691
|
+
function Pa(b) {
|
|
692
|
+
k.onAbort?.(b);
|
|
693
693
|
b = "Aborted(" + b + ")";
|
|
694
|
-
|
|
694
|
+
ya(b);
|
|
695
695
|
Ba = !0;
|
|
696
696
|
b = new WebAssembly.RuntimeError(b + ". Build with -sASSERTIONS for more info.");
|
|
697
697
|
ba(b);
|
|
698
698
|
throw b;
|
|
699
699
|
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
Ra = "canvas_advanced.wasm";
|
|
705
|
-
if (!Qa(Ra)) {
|
|
706
|
-
var Sa = Ra;
|
|
707
|
-
Ra = h.locateFile ? h.locateFile(Sa, ra) : ra + Sa;
|
|
708
|
-
}
|
|
709
|
-
function Ta(b) {
|
|
710
|
-
if (b == Ra && ya) {
|
|
711
|
-
return new Uint8Array(ya);
|
|
700
|
+
var Qa = b => b.startsWith("data:application/octet-stream;base64,"), wa = b => b.startsWith("file://"), Ra;
|
|
701
|
+
function Sa(b) {
|
|
702
|
+
if (b == Ra && za) {
|
|
703
|
+
return new Uint8Array(za);
|
|
712
704
|
}
|
|
713
|
-
if (
|
|
714
|
-
return
|
|
705
|
+
if (va) {
|
|
706
|
+
return va(b);
|
|
715
707
|
}
|
|
716
708
|
throw "both async and sync fetching of the wasm failed";
|
|
717
709
|
}
|
|
718
|
-
function
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
if (sa) {
|
|
729
|
-
return new Promise((a, c) => {
|
|
730
|
-
sa(b, d => a(new Uint8Array(d)), c);
|
|
731
|
-
});
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
return Promise.resolve().then(() => Ta(b));
|
|
710
|
+
function Ta(b) {
|
|
711
|
+
return za ? Promise.resolve().then(() => Sa(b)) : new Promise((a, c) => {
|
|
712
|
+
sa(b, d => a(new Uint8Array(d)), () => {
|
|
713
|
+
try {
|
|
714
|
+
a(Sa(b));
|
|
715
|
+
} catch (d) {
|
|
716
|
+
c(d);
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
});
|
|
735
720
|
}
|
|
736
|
-
function
|
|
737
|
-
return
|
|
738
|
-
|
|
739
|
-
|
|
721
|
+
function Ua(b, a, c) {
|
|
722
|
+
return Ta(b).then(d => WebAssembly.instantiate(d, a)).then(c, d => {
|
|
723
|
+
ya(`failed to asynchronously prepare wasm: ${d}`);
|
|
724
|
+
Pa(d);
|
|
740
725
|
});
|
|
741
726
|
}
|
|
742
|
-
function
|
|
727
|
+
function Va(b, a) {
|
|
743
728
|
var c = Ra;
|
|
744
|
-
return
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
return
|
|
729
|
+
return za || "function" != typeof WebAssembly.instantiateStreaming || Qa(c) || wa(c) || "function" != typeof fetch ? Ua(c, b, a) : fetch(c, {credentials:"same-origin"}).then(d => WebAssembly.instantiateStreaming(d, b).then(a, function(e) {
|
|
730
|
+
ya(`wasm streaming compile failed: ${e}`);
|
|
731
|
+
ya("falling back to ArrayBuffer instantiation");
|
|
732
|
+
return Ua(c, b, a);
|
|
748
733
|
}));
|
|
749
734
|
}
|
|
750
|
-
var
|
|
735
|
+
var Wa = b => {
|
|
751
736
|
for (; 0 < b.length;) {
|
|
752
|
-
b.shift()(
|
|
737
|
+
b.shift()(k);
|
|
753
738
|
}
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
return "_unknown";
|
|
739
|
+
}, Xa = (b, a) => Object.defineProperty(a, "name", {value:b}), Ya = [], P = [], Q, S = b => {
|
|
740
|
+
if (!b) {
|
|
741
|
+
throw new Q("Cannot use deleted val. handle = " + b);
|
|
758
742
|
}
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
return 48 <= a && 57 >= a ? `_${b}` : b;
|
|
762
|
-
}
|
|
763
|
-
function Za(b, a) {
|
|
764
|
-
b = Ya(b);
|
|
765
|
-
return {[b]:function() {
|
|
766
|
-
return a.apply(this, arguments);
|
|
767
|
-
}}[b];
|
|
768
|
-
}
|
|
769
|
-
function $a() {
|
|
770
|
-
this.G = [void 0];
|
|
771
|
-
this.ta = [];
|
|
772
|
-
}
|
|
773
|
-
var P = new $a(), ab = void 0;
|
|
774
|
-
function Q(b) {
|
|
775
|
-
throw new ab(b);
|
|
776
|
-
}
|
|
777
|
-
var R = b => {
|
|
778
|
-
b || Q("Cannot use deleted val. handle = " + b);
|
|
779
|
-
return P.get(b).value;
|
|
780
|
-
}, S = b => {
|
|
743
|
+
return P[b];
|
|
744
|
+
}, Za = b => {
|
|
781
745
|
switch(b) {
|
|
782
746
|
case void 0:
|
|
783
|
-
return 1;
|
|
784
|
-
case null:
|
|
785
747
|
return 2;
|
|
748
|
+
case null:
|
|
749
|
+
return 4;
|
|
786
750
|
case !0:
|
|
787
|
-
return
|
|
751
|
+
return 6;
|
|
788
752
|
case !1:
|
|
789
|
-
return
|
|
753
|
+
return 8;
|
|
790
754
|
default:
|
|
791
|
-
|
|
755
|
+
const a = Ya.pop() || P.length;
|
|
756
|
+
P[a] = b;
|
|
757
|
+
P[a + 1] = 1;
|
|
758
|
+
return a;
|
|
792
759
|
}
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
var a = Error, c = Za(b, function(d) {
|
|
760
|
+
}, $a = b => {
|
|
761
|
+
var a = Error, c = Xa(b, function(d) {
|
|
796
762
|
this.name = b;
|
|
797
763
|
this.message = d;
|
|
798
764
|
d = Error(d).stack;
|
|
@@ -804,408 +770,435 @@ function bb(b) {
|
|
|
804
770
|
return void 0 === this.message ? this.name : `${this.name}: ${this.message}`;
|
|
805
771
|
};
|
|
806
772
|
return c;
|
|
807
|
-
}
|
|
808
|
-
var cb = void 0, db = void 0;
|
|
809
|
-
function U(b) {
|
|
773
|
+
}, ab, bb, T = b => {
|
|
810
774
|
for (var a = ""; J[b];) {
|
|
811
|
-
a +=
|
|
775
|
+
a += bb[J[b++]];
|
|
812
776
|
}
|
|
813
777
|
return a;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
var b = eb.pop();
|
|
819
|
-
b.g.M = !1;
|
|
778
|
+
}, cb = [], db = () => {
|
|
779
|
+
for (; cb.length;) {
|
|
780
|
+
var b = cb.pop();
|
|
781
|
+
b.g.L = !1;
|
|
820
782
|
b["delete"]();
|
|
821
783
|
}
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
784
|
+
}, eb, fb = {}, gb = (b, a) => {
|
|
785
|
+
if (void 0 === a) {
|
|
786
|
+
throw new Q("ptr should not be undefined");
|
|
787
|
+
}
|
|
788
|
+
for (; b.o;) {
|
|
789
|
+
a = b.R(a), b = b.o;
|
|
827
790
|
}
|
|
828
791
|
return a;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
var a = U(b);
|
|
834
|
-
mb(b);
|
|
792
|
+
}, hb = {}, kb = b => {
|
|
793
|
+
b = ib(b);
|
|
794
|
+
var a = T(b);
|
|
795
|
+
jb(b);
|
|
835
796
|
return a;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
797
|
+
}, lb = (b, a) => {
|
|
798
|
+
var c = hb[b];
|
|
799
|
+
if (void 0 === c) {
|
|
800
|
+
throw b = `${a} has unknown type ${kb(b)}`, new Q(b);
|
|
801
|
+
}
|
|
840
802
|
return c;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
}
|
|
844
|
-
var pb = !1;
|
|
845
|
-
function qb(b) {
|
|
846
|
-
--b.count.value;
|
|
847
|
-
0 === b.count.value && (b.s ? b.A.H(b.s) : b.j.h.H(b.i));
|
|
848
|
-
}
|
|
849
|
-
function rb(b, a, c) {
|
|
803
|
+
}, mb = () => {
|
|
804
|
+
}, nb = !1, ob = (b, a, c) => {
|
|
850
805
|
if (a === c) {
|
|
851
806
|
return b;
|
|
852
807
|
}
|
|
853
|
-
if (void 0 === c.
|
|
808
|
+
if (void 0 === c.o) {
|
|
854
809
|
return null;
|
|
855
810
|
}
|
|
856
|
-
b =
|
|
857
|
-
return null === b ? null : c.
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
}
|
|
868
|
-
function Bb(b, a) {
|
|
869
|
-
a.j && a.i || Ab("makeClassHandle requires ptr and ptrType");
|
|
870
|
-
!!a.A !== !!a.s && Ab("Both smartPtrType and smartPtr must be specified");
|
|
811
|
+
b = ob(b, a, c.o);
|
|
812
|
+
return null === b ? null : c.Ka(b);
|
|
813
|
+
}, pb = {}, qb = (b, a) => {
|
|
814
|
+
a = gb(b, a);
|
|
815
|
+
return fb[a];
|
|
816
|
+
}, wb, yb = (b, a) => {
|
|
817
|
+
if (!a.j || !a.i) {
|
|
818
|
+
throw new wb("makeClassHandle requires ptr and ptrType");
|
|
819
|
+
}
|
|
820
|
+
if (!!a.v !== !!a.s) {
|
|
821
|
+
throw new wb("Both smartPtrType and smartPtr must be specified");
|
|
822
|
+
}
|
|
871
823
|
a.count = {value:1};
|
|
872
|
-
return
|
|
873
|
-
}
|
|
874
|
-
function Cb(b) {
|
|
824
|
+
return xb(Object.create(b, {g:{value:a, writable:!0,},}));
|
|
825
|
+
}, xb = b => {
|
|
875
826
|
if ("undefined" === typeof FinalizationRegistry) {
|
|
876
|
-
return
|
|
827
|
+
return xb = a => a, b;
|
|
877
828
|
}
|
|
878
|
-
|
|
879
|
-
|
|
829
|
+
nb = new FinalizationRegistry(a => {
|
|
830
|
+
a = a.g;
|
|
831
|
+
--a.count.value;
|
|
832
|
+
0 === a.count.value && (a.s ? a.v.C(a.s) : a.j.h.C(a.i));
|
|
880
833
|
});
|
|
881
|
-
|
|
834
|
+
xb = a => {
|
|
882
835
|
var c = a.g;
|
|
883
|
-
c.s &&
|
|
836
|
+
c.s && nb.register(a, {g:c}, a);
|
|
884
837
|
return a;
|
|
885
838
|
};
|
|
886
|
-
|
|
887
|
-
|
|
839
|
+
mb = a => {
|
|
840
|
+
nb.unregister(a);
|
|
888
841
|
};
|
|
889
|
-
return
|
|
890
|
-
}
|
|
891
|
-
var Db = {};
|
|
892
|
-
function Eb(b) {
|
|
842
|
+
return xb(b);
|
|
843
|
+
}, zb = {}, Ab = b => {
|
|
893
844
|
for (; b.length;) {
|
|
894
845
|
var a = b.pop();
|
|
895
846
|
b.pop()(a);
|
|
896
847
|
}
|
|
848
|
+
};
|
|
849
|
+
function Bb(b) {
|
|
850
|
+
return this.fromWireType(O[b >> 2]);
|
|
897
851
|
}
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
for (var n = 0; n < b.length; ++n) {
|
|
907
|
-
Ib(b[n], k[n]);
|
|
852
|
+
var Cb = {}, Db = {}, X = (b, a, c) => {
|
|
853
|
+
function d(h) {
|
|
854
|
+
h = c(h);
|
|
855
|
+
if (h.length !== b.length) {
|
|
856
|
+
throw new wb("Mismatched type converter count");
|
|
857
|
+
}
|
|
858
|
+
for (var l = 0; l < b.length; ++l) {
|
|
859
|
+
Eb(b[l], h[l]);
|
|
908
860
|
}
|
|
909
861
|
}
|
|
910
|
-
b.forEach(function(
|
|
911
|
-
|
|
862
|
+
b.forEach(function(h) {
|
|
863
|
+
Db[h] = a;
|
|
912
864
|
});
|
|
913
865
|
var e = Array(a.length), f = [], m = 0;
|
|
914
|
-
a.forEach((
|
|
915
|
-
|
|
916
|
-
e[
|
|
866
|
+
a.forEach((h, l) => {
|
|
867
|
+
hb.hasOwnProperty(h) ? e[l] = hb[h] : (f.push(h), Cb.hasOwnProperty(h) || (Cb[h] = []), Cb[h].push(() => {
|
|
868
|
+
e[l] = hb[h];
|
|
917
869
|
++m;
|
|
918
870
|
m === f.length && d(e);
|
|
919
871
|
}));
|
|
920
872
|
});
|
|
921
873
|
0 === f.length && d(e);
|
|
922
|
-
}
|
|
923
|
-
function
|
|
924
|
-
switch(b) {
|
|
925
|
-
case 1:
|
|
926
|
-
return 0;
|
|
927
|
-
case 2:
|
|
928
|
-
return 1;
|
|
929
|
-
case 4:
|
|
930
|
-
return 2;
|
|
931
|
-
case 8:
|
|
932
|
-
return 3;
|
|
933
|
-
default:
|
|
934
|
-
throw new TypeError(`Unknown type size: ${b}`);
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
function Kb(b, a, c = {}) {
|
|
874
|
+
};
|
|
875
|
+
function Fb(b, a, c = {}) {
|
|
938
876
|
var d = a.name;
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
877
|
+
if (!b) {
|
|
878
|
+
throw new Q(`type "${d}" must have a positive integer typeid pointer`);
|
|
879
|
+
}
|
|
880
|
+
if (hb.hasOwnProperty(b)) {
|
|
881
|
+
if (c.Ua) {
|
|
942
882
|
return;
|
|
943
883
|
}
|
|
944
|
-
Q(`Cannot register type '${d}' twice`);
|
|
884
|
+
throw new Q(`Cannot register type '${d}' twice`);
|
|
945
885
|
}
|
|
946
|
-
|
|
947
|
-
delete
|
|
948
|
-
|
|
886
|
+
hb[b] = a;
|
|
887
|
+
delete Db[b];
|
|
888
|
+
Cb.hasOwnProperty(b) && (a = Cb[b], delete Cb[b], a.forEach(e => e()));
|
|
949
889
|
}
|
|
950
|
-
function
|
|
890
|
+
function Eb(b, a, c = {}) {
|
|
951
891
|
if (!("argPackAdvance" in a)) {
|
|
952
892
|
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
953
893
|
}
|
|
954
|
-
|
|
955
|
-
}
|
|
956
|
-
function Lb(b) {
|
|
957
|
-
Q(b.g.j.h.name + " instance already deleted");
|
|
894
|
+
return Fb(b, a, c);
|
|
958
895
|
}
|
|
959
|
-
|
|
896
|
+
var Gb = b => {
|
|
897
|
+
throw new Q(b.g.j.h.name + " instance already deleted");
|
|
898
|
+
};
|
|
899
|
+
function Hb() {
|
|
960
900
|
}
|
|
961
|
-
|
|
962
|
-
if (void 0 === b[a].
|
|
901
|
+
var Ib = (b, a, c) => {
|
|
902
|
+
if (void 0 === b[a].l) {
|
|
963
903
|
var d = b[a];
|
|
964
|
-
b[a] = function() {
|
|
965
|
-
b[a].
|
|
966
|
-
|
|
904
|
+
b[a] = function(...e) {
|
|
905
|
+
if (!b[a].l.hasOwnProperty(e.length)) {
|
|
906
|
+
throw new Q(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${b[a].l})!`);
|
|
907
|
+
}
|
|
908
|
+
return b[a].l[e.length].apply(this, e);
|
|
967
909
|
};
|
|
968
|
-
b[a].
|
|
969
|
-
b[a].
|
|
910
|
+
b[a].l = [];
|
|
911
|
+
b[a].l[d.K] = d;
|
|
970
912
|
}
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
}
|
|
975
|
-
|
|
913
|
+
}, Jb = (b, a, c) => {
|
|
914
|
+
if (k.hasOwnProperty(b)) {
|
|
915
|
+
if (void 0 === c || void 0 !== k[b].l && void 0 !== k[b].l[c]) {
|
|
916
|
+
throw new Q(`Cannot register public name '${b}' twice`);
|
|
917
|
+
}
|
|
918
|
+
Ib(k, b, b);
|
|
919
|
+
if (k.hasOwnProperty(c)) {
|
|
920
|
+
throw new Q(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
|
|
921
|
+
}
|
|
922
|
+
k[b].l[c] = a;
|
|
923
|
+
} else {
|
|
924
|
+
k[b] = a, void 0 !== c && (k[b].mb = c);
|
|
925
|
+
}
|
|
926
|
+
}, Kb = b => {
|
|
927
|
+
if (void 0 === b) {
|
|
928
|
+
return "_unknown";
|
|
929
|
+
}
|
|
930
|
+
b = b.replace(/[^a-zA-Z0-9_]/g, "$");
|
|
931
|
+
var a = b.charCodeAt(0);
|
|
932
|
+
return 48 <= a && 57 >= a ? `_${b}` : b;
|
|
933
|
+
};
|
|
934
|
+
function Lb(b, a, c, d, e, f, m, h) {
|
|
976
935
|
this.name = b;
|
|
977
936
|
this.constructor = a;
|
|
978
937
|
this.B = c;
|
|
979
|
-
this.
|
|
980
|
-
this.
|
|
981
|
-
this.
|
|
982
|
-
this.
|
|
983
|
-
this.
|
|
984
|
-
this.
|
|
938
|
+
this.C = d;
|
|
939
|
+
this.o = e;
|
|
940
|
+
this.Pa = f;
|
|
941
|
+
this.R = m;
|
|
942
|
+
this.Ka = h;
|
|
943
|
+
this.va = [];
|
|
985
944
|
}
|
|
986
|
-
|
|
945
|
+
var Mb = (b, a, c) => {
|
|
987
946
|
for (; a !== c;) {
|
|
988
|
-
|
|
947
|
+
if (!a.R) {
|
|
948
|
+
throw new Q(`Expected null or instance of ${c.name}, got an instance of ${a.name}`);
|
|
949
|
+
}
|
|
950
|
+
b = a.R(b);
|
|
951
|
+
a = a.o;
|
|
989
952
|
}
|
|
990
953
|
return b;
|
|
991
|
-
}
|
|
992
|
-
function
|
|
954
|
+
};
|
|
955
|
+
function Nb(b, a) {
|
|
993
956
|
if (null === a) {
|
|
994
|
-
|
|
957
|
+
if (this.da) {
|
|
958
|
+
throw new Q(`null is not a valid ${this.name}`);
|
|
959
|
+
}
|
|
960
|
+
return 0;
|
|
961
|
+
}
|
|
962
|
+
if (!a.g) {
|
|
963
|
+
throw new Q(`Cannot pass "${Ob(a)}" as a ${this.name}`);
|
|
995
964
|
}
|
|
996
|
-
a.g
|
|
997
|
-
|
|
998
|
-
|
|
965
|
+
if (!a.g.i) {
|
|
966
|
+
throw new Q(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
967
|
+
}
|
|
968
|
+
return Mb(a.g.i, a.g.j.h, this.h);
|
|
999
969
|
}
|
|
1000
|
-
function
|
|
970
|
+
function Pb(b, a) {
|
|
1001
971
|
if (null === a) {
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
972
|
+
if (this.da) {
|
|
973
|
+
throw new Q(`null is not a valid ${this.name}`);
|
|
974
|
+
}
|
|
975
|
+
if (this.U) {
|
|
976
|
+
var c = this.ea();
|
|
977
|
+
null !== b && b.push(this.C, c);
|
|
1006
978
|
return c;
|
|
1007
979
|
}
|
|
1008
980
|
return 0;
|
|
1009
981
|
}
|
|
1010
|
-
a
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
982
|
+
if (!a || !a.g) {
|
|
983
|
+
throw new Q(`Cannot pass "${Ob(a)}" as a ${this.name}`);
|
|
984
|
+
}
|
|
985
|
+
if (!a.g.i) {
|
|
986
|
+
throw new Q(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
987
|
+
}
|
|
988
|
+
if (!this.T && a.g.j.T) {
|
|
989
|
+
throw new Q(`Cannot convert argument of type ${a.g.v ? a.g.v.name : a.g.j.name} to parameter type ${this.name}`);
|
|
990
|
+
}
|
|
991
|
+
c = Mb(a.g.i, a.g.j.h, this.h);
|
|
992
|
+
if (this.U) {
|
|
993
|
+
if (void 0 === a.g.s) {
|
|
994
|
+
throw new Q("Passing raw pointer to smart pointer is illegal");
|
|
995
|
+
}
|
|
996
|
+
switch(this.fb) {
|
|
1016
997
|
case 0:
|
|
1017
|
-
a.g.
|
|
998
|
+
if (a.g.v === this) {
|
|
999
|
+
c = a.g.s;
|
|
1000
|
+
} else {
|
|
1001
|
+
throw new Q(`Cannot convert argument of type ${a.g.v ? a.g.v.name : a.g.j.name} to parameter type ${this.name}`);
|
|
1002
|
+
}
|
|
1018
1003
|
break;
|
|
1019
1004
|
case 1:
|
|
1020
1005
|
c = a.g.s;
|
|
1021
1006
|
break;
|
|
1022
1007
|
case 2:
|
|
1023
|
-
if (a.g.
|
|
1008
|
+
if (a.g.v === this) {
|
|
1024
1009
|
c = a.g.s;
|
|
1025
1010
|
} else {
|
|
1026
1011
|
var d = a.clone();
|
|
1027
|
-
c = this.
|
|
1028
|
-
|
|
1029
|
-
}));
|
|
1030
|
-
null !== b && b.push(this.H, c);
|
|
1012
|
+
c = this.ab(c, Za(() => d["delete"]()));
|
|
1013
|
+
null !== b && b.push(this.C, c);
|
|
1031
1014
|
}
|
|
1032
1015
|
break;
|
|
1033
1016
|
default:
|
|
1034
|
-
Q("Unsupporting sharing policy");
|
|
1017
|
+
throw new Q("Unsupporting sharing policy");
|
|
1035
1018
|
}
|
|
1036
1019
|
}
|
|
1037
1020
|
return c;
|
|
1038
1021
|
}
|
|
1039
|
-
function
|
|
1022
|
+
function Qb(b, a) {
|
|
1040
1023
|
if (null === a) {
|
|
1041
|
-
|
|
1024
|
+
if (this.da) {
|
|
1025
|
+
throw new Q(`null is not a valid ${this.name}`);
|
|
1026
|
+
}
|
|
1027
|
+
return 0;
|
|
1028
|
+
}
|
|
1029
|
+
if (!a.g) {
|
|
1030
|
+
throw new Q(`Cannot pass "${Ob(a)}" as a ${this.name}`);
|
|
1031
|
+
}
|
|
1032
|
+
if (!a.g.i) {
|
|
1033
|
+
throw new Q(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1042
1034
|
}
|
|
1043
|
-
a.g
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
return
|
|
1035
|
+
if (a.g.j.T) {
|
|
1036
|
+
throw new Q(`Cannot convert argument of type ${a.g.j.name} to parameter type ${this.name}`);
|
|
1037
|
+
}
|
|
1038
|
+
return Mb(a.g.i, a.g.j.h, this.h);
|
|
1047
1039
|
}
|
|
1048
|
-
function
|
|
1040
|
+
function Rb(b, a, c, d, e, f, m, h, l, n, r) {
|
|
1049
1041
|
this.name = b;
|
|
1050
1042
|
this.h = a;
|
|
1051
|
-
this.
|
|
1052
|
-
this.
|
|
1053
|
-
this.
|
|
1054
|
-
this
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1043
|
+
this.da = c;
|
|
1044
|
+
this.T = d;
|
|
1045
|
+
this.U = e;
|
|
1046
|
+
this.$a = f;
|
|
1047
|
+
this.fb = m;
|
|
1048
|
+
this.wa = h;
|
|
1049
|
+
this.ea = l;
|
|
1050
|
+
this.ab = n;
|
|
1051
|
+
this.C = r;
|
|
1052
|
+
e || void 0 !== a.o ? this.toWireType = Pb : (this.toWireType = d ? Nb : Qb, this.A = null);
|
|
1060
1053
|
}
|
|
1061
|
-
var
|
|
1062
|
-
|
|
1063
|
-
|
|
1054
|
+
var Sb = (b, a, c) => {
|
|
1055
|
+
if (!k.hasOwnProperty(b)) {
|
|
1056
|
+
throw new wb("Replacing nonexistent public symbol");
|
|
1057
|
+
}
|
|
1058
|
+
void 0 !== k[b].l && void 0 !== c ? k[b].l[c] = a : (k[b] = a, k[b].K = c);
|
|
1059
|
+
}, Tb = [], Ub, Vb = b => {
|
|
1060
|
+
var a = Tb[b];
|
|
1061
|
+
a || (b >= Tb.length && (Tb.length = b + 1), Tb[b] = a = Ub.get(b));
|
|
1064
1062
|
return a;
|
|
1065
|
-
},
|
|
1066
|
-
|
|
1067
|
-
return
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
d = Yb(a).apply(null, c);
|
|
1075
|
-
}
|
|
1076
|
-
return d;
|
|
1077
|
-
};
|
|
1078
|
-
};
|
|
1079
|
-
function X(b, a) {
|
|
1080
|
-
b = U(b);
|
|
1081
|
-
var c = b.includes("j") ? Zb(b, a) : Yb(a);
|
|
1082
|
-
"function" != typeof c && Q(`unknown function pointer with signature ${b}: ${a}`);
|
|
1063
|
+
}, Wb = (b, a, c = []) => {
|
|
1064
|
+
b.includes("j") ? (b = b.replace(/p/g, "i"), a = (0,k["dynCall_" + b])(a, ...c)) : a = Vb(a)(...c);
|
|
1065
|
+
return a;
|
|
1066
|
+
}, Xb = (b, a) => (...c) => Wb(b, a, c), Y = (b, a) => {
|
|
1067
|
+
b = T(b);
|
|
1068
|
+
var c = b.includes("j") ? Xb(b, a) : Vb(a);
|
|
1069
|
+
if ("function" != typeof c) {
|
|
1070
|
+
throw new Q(`unknown function pointer with signature ${b}: ${a}`);
|
|
1071
|
+
}
|
|
1083
1072
|
return c;
|
|
1084
|
-
}
|
|
1085
|
-
var $b = void 0;
|
|
1086
|
-
function ac(b, a) {
|
|
1073
|
+
}, Yb, Zb = (b, a) => {
|
|
1087
1074
|
function c(f) {
|
|
1088
|
-
e[f] ||
|
|
1075
|
+
e[f] || hb[f] || (Db[f] ? Db[f].forEach(c) : (d.push(f), e[f] = !0));
|
|
1089
1076
|
}
|
|
1090
1077
|
var d = [], e = {};
|
|
1091
1078
|
a.forEach(c);
|
|
1092
|
-
throw new
|
|
1079
|
+
throw new Yb(`${b}: ` + d.map(kb).join([", "]));
|
|
1080
|
+
};
|
|
1081
|
+
function $b(b) {
|
|
1082
|
+
for (var a = 1; a < b.length; ++a) {
|
|
1083
|
+
if (null !== b[a] && void 0 === b[a].A) {
|
|
1084
|
+
return !0;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
return !1;
|
|
1093
1088
|
}
|
|
1094
|
-
function
|
|
1089
|
+
function ac(b, a, c, d, e) {
|
|
1095
1090
|
var f = a.length;
|
|
1096
|
-
2 > f
|
|
1097
|
-
|
|
1098
|
-
for (c = 1; c < a.length; ++c) {
|
|
1099
|
-
if (null !== a[c] && void 0 === a[c].v) {
|
|
1100
|
-
k = !0;
|
|
1101
|
-
break;
|
|
1102
|
-
}
|
|
1091
|
+
if (2 > f) {
|
|
1092
|
+
throw new Q("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1103
1093
|
}
|
|
1104
|
-
var
|
|
1105
|
-
return function() {
|
|
1106
|
-
|
|
1107
|
-
|
|
1094
|
+
var m = null !== a[1] && null !== c, h = $b(a), l = "void" !== a[0].name, n = f - 2, r = Array(n), w = [], y = [];
|
|
1095
|
+
return Xa(b, function(...g) {
|
|
1096
|
+
if (g.length !== n) {
|
|
1097
|
+
throw new Q(`function ${b} called with ${g.length} arguments, expected ${n}`);
|
|
1098
|
+
}
|
|
1099
|
+
y.length = 0;
|
|
1108
1100
|
w.length = m ? 2 : 1;
|
|
1109
1101
|
w[0] = e;
|
|
1110
1102
|
if (m) {
|
|
1111
|
-
var
|
|
1112
|
-
w[1] =
|
|
1103
|
+
var t = a[1].toWireType(y, this);
|
|
1104
|
+
w[1] = t;
|
|
1113
1105
|
}
|
|
1114
|
-
for (var
|
|
1115
|
-
|
|
1106
|
+
for (var q = 0; q < n; ++q) {
|
|
1107
|
+
r[q] = a[q + 2].toWireType(y, g[q]), w.push(r[q]);
|
|
1116
1108
|
}
|
|
1117
|
-
|
|
1118
|
-
if (
|
|
1119
|
-
|
|
1109
|
+
g = d(...w);
|
|
1110
|
+
if (h) {
|
|
1111
|
+
Ab(y);
|
|
1120
1112
|
} else {
|
|
1121
|
-
for (
|
|
1122
|
-
var F = 1 === q ?
|
|
1123
|
-
null !== a[q].
|
|
1113
|
+
for (q = m ? 1 : 2; q < a.length; q++) {
|
|
1114
|
+
var F = 1 === q ? t : r[q - 2];
|
|
1115
|
+
null !== a[q].A && a[q].A(F);
|
|
1124
1116
|
}
|
|
1125
1117
|
}
|
|
1126
|
-
|
|
1127
|
-
return
|
|
1128
|
-
};
|
|
1118
|
+
t = l ? a[0].fromWireType(g) : void 0;
|
|
1119
|
+
return t;
|
|
1120
|
+
});
|
|
1129
1121
|
}
|
|
1130
|
-
|
|
1122
|
+
var bc = (b, a) => {
|
|
1131
1123
|
for (var c = [], d = 0; d < b; d++) {
|
|
1132
|
-
c.push(
|
|
1124
|
+
c.push(O[a + 4 * d >> 2]);
|
|
1133
1125
|
}
|
|
1134
1126
|
return c;
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
b
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1127
|
+
}, cc = b => {
|
|
1128
|
+
b = b.trim();
|
|
1129
|
+
const a = b.indexOf("(");
|
|
1130
|
+
return -1 !== a ? b.substr(0, a) : b;
|
|
1131
|
+
}, dc = (b, a, c) => {
|
|
1132
|
+
if (!(b instanceof Object)) {
|
|
1133
|
+
throw new Q(`${c} with invalid "this": ${b}`);
|
|
1134
|
+
}
|
|
1135
|
+
if (!(b instanceof a.h.constructor)) {
|
|
1136
|
+
throw new Q(`${c} incompatible with "this" of type ${b.constructor.name}`);
|
|
1137
|
+
}
|
|
1138
|
+
if (!b.g.i) {
|
|
1139
|
+
throw new Q(`cannot call emscripten binding method ${c} on deleted object`);
|
|
1140
|
+
}
|
|
1141
|
+
return Mb(b.g.i, b.g.j.h, a.h);
|
|
1142
|
+
}, ec = b => {
|
|
1143
|
+
9 < b && 0 === --P[b + 1] && (P[b] = void 0, Ya.push(b));
|
|
1144
|
+
}, fc = {name:"emscripten::val", fromWireType:b => {
|
|
1145
|
+
var a = S(b);
|
|
1146
|
+
ec(b);
|
|
1147
|
+
return a;
|
|
1148
|
+
}, toWireType:(b, a) => Za(a), argPackAdvance:8, readValueFromPointer:Bb, A:null,}, gc = (b, a, c) => {
|
|
1146
1149
|
switch(a) {
|
|
1147
|
-
case 0:
|
|
1148
|
-
return function(d) {
|
|
1149
|
-
return this.fromWireType((c ? Ca : J)[d]);
|
|
1150
|
-
};
|
|
1151
1150
|
case 1:
|
|
1152
|
-
return function(d) {
|
|
1153
|
-
return this.fromWireType(
|
|
1151
|
+
return c ? function(d) {
|
|
1152
|
+
return this.fromWireType(Ca[d]);
|
|
1153
|
+
} : function(d) {
|
|
1154
|
+
return this.fromWireType(J[d]);
|
|
1154
1155
|
};
|
|
1155
1156
|
case 2:
|
|
1156
|
-
return function(d) {
|
|
1157
|
-
return this.fromWireType(
|
|
1157
|
+
return c ? function(d) {
|
|
1158
|
+
return this.fromWireType(Da[d >> 1]);
|
|
1159
|
+
} : function(d) {
|
|
1160
|
+
return this.fromWireType(Ea[d >> 1]);
|
|
1161
|
+
};
|
|
1162
|
+
case 4:
|
|
1163
|
+
return c ? function(d) {
|
|
1164
|
+
return this.fromWireType(K[d >> 2]);
|
|
1165
|
+
} : function(d) {
|
|
1166
|
+
return this.fromWireType(O[d >> 2]);
|
|
1158
1167
|
};
|
|
1159
1168
|
default:
|
|
1160
|
-
throw new TypeError(
|
|
1169
|
+
throw new TypeError(`invalid integer width (${a}): ${b}`);
|
|
1161
1170
|
}
|
|
1162
|
-
}
|
|
1163
|
-
function Sb(b) {
|
|
1171
|
+
}, Ob = b => {
|
|
1164
1172
|
if (null === b) {
|
|
1165
1173
|
return "null";
|
|
1166
1174
|
}
|
|
1167
1175
|
var a = typeof b;
|
|
1168
1176
|
return "object" === a || "array" === a || "function" === a ? b.toString() : "" + b;
|
|
1169
|
-
}
|
|
1170
|
-
function gc(b, a) {
|
|
1177
|
+
}, hc = (b, a) => {
|
|
1171
1178
|
switch(a) {
|
|
1172
|
-
case
|
|
1179
|
+
case 4:
|
|
1173
1180
|
return function(c) {
|
|
1174
1181
|
return this.fromWireType(Fa[c >> 2]);
|
|
1175
1182
|
};
|
|
1176
|
-
case
|
|
1183
|
+
case 8:
|
|
1177
1184
|
return function(c) {
|
|
1178
1185
|
return this.fromWireType(Ga[c >> 3]);
|
|
1179
1186
|
};
|
|
1180
1187
|
default:
|
|
1181
|
-
throw new TypeError(
|
|
1188
|
+
throw new TypeError(`invalid float width (${a}): ${b}`);
|
|
1182
1189
|
}
|
|
1183
|
-
}
|
|
1184
|
-
function hc(b, a, c) {
|
|
1190
|
+
}, ic = (b, a, c) => {
|
|
1185
1191
|
switch(a) {
|
|
1186
|
-
case 0:
|
|
1187
|
-
return c ? function(d) {
|
|
1188
|
-
return Ca[d];
|
|
1189
|
-
} : function(d) {
|
|
1190
|
-
return J[d];
|
|
1191
|
-
};
|
|
1192
1192
|
case 1:
|
|
1193
|
-
return c ?
|
|
1194
|
-
return Da[d >> 1];
|
|
1195
|
-
} : function(d) {
|
|
1196
|
-
return Ea[d >> 1];
|
|
1197
|
-
};
|
|
1193
|
+
return c ? d => Ca[d] : d => J[d];
|
|
1198
1194
|
case 2:
|
|
1199
|
-
return c ?
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
return L[d >> 2];
|
|
1203
|
-
};
|
|
1195
|
+
return c ? d => Da[d >> 1] : d => Ea[d >> 1];
|
|
1196
|
+
case 4:
|
|
1197
|
+
return c ? d => K[d >> 2] : d => O[d >> 2];
|
|
1204
1198
|
default:
|
|
1205
|
-
throw new TypeError(
|
|
1199
|
+
throw new TypeError(`invalid integer width (${a}): ${b}`);
|
|
1206
1200
|
}
|
|
1207
|
-
}
|
|
1208
|
-
var ic = (b, a, c, d) => {
|
|
1201
|
+
}, jc = (b, a, c, d) => {
|
|
1209
1202
|
if (0 < d) {
|
|
1210
1203
|
d = c + d - 1;
|
|
1211
1204
|
for (var e = 0; e < b.length; ++e) {
|
|
@@ -1245,19 +1238,19 @@ var ic = (b, a, c, d) => {
|
|
|
1245
1238
|
}
|
|
1246
1239
|
a[c] = 0;
|
|
1247
1240
|
}
|
|
1248
|
-
},
|
|
1241
|
+
}, kc = b => {
|
|
1249
1242
|
for (var a = 0, c = 0; c < b.length; ++c) {
|
|
1250
1243
|
var d = b.charCodeAt(c);
|
|
1251
1244
|
127 >= d ? a++ : 2047 >= d ? a += 2 : 55296 <= d && 57343 >= d ? (a += 4, ++c) : a += 3;
|
|
1252
1245
|
}
|
|
1253
1246
|
return a;
|
|
1254
|
-
},
|
|
1247
|
+
}, nc = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, oc = (b, a, c) => {
|
|
1255
1248
|
var d = a + c;
|
|
1256
1249
|
for (c = a; b[c] && !(c >= d);) {
|
|
1257
1250
|
++c;
|
|
1258
1251
|
}
|
|
1259
|
-
if (16 < c - a && b.buffer &&
|
|
1260
|
-
return
|
|
1252
|
+
if (16 < c - a && b.buffer && nc) {
|
|
1253
|
+
return nc.decode(b.subarray(a, c));
|
|
1261
1254
|
}
|
|
1262
1255
|
for (d = ""; a < c;) {
|
|
1263
1256
|
var e = b[a++];
|
|
@@ -1275,14 +1268,14 @@ var ic = (b, a, c, d) => {
|
|
|
1275
1268
|
}
|
|
1276
1269
|
}
|
|
1277
1270
|
return d;
|
|
1278
|
-
},
|
|
1271
|
+
}, pc = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, qc = (b, a) => {
|
|
1279
1272
|
var c = b >> 1;
|
|
1280
1273
|
for (var d = c + a / 2; !(c >= d) && Ea[c];) {
|
|
1281
1274
|
++c;
|
|
1282
1275
|
}
|
|
1283
1276
|
c <<= 1;
|
|
1284
|
-
if (32 < c - b &&
|
|
1285
|
-
return
|
|
1277
|
+
if (32 < c - b && pc) {
|
|
1278
|
+
return pc.decode(J.subarray(b, c));
|
|
1286
1279
|
}
|
|
1287
1280
|
c = "";
|
|
1288
1281
|
for (d = 0; !(d >= a / 2); ++d) {
|
|
@@ -1293,8 +1286,8 @@ var ic = (b, a, c, d) => {
|
|
|
1293
1286
|
c += String.fromCharCode(e);
|
|
1294
1287
|
}
|
|
1295
1288
|
return c;
|
|
1296
|
-
},
|
|
1297
|
-
|
|
1289
|
+
}, rc = (b, a, c) => {
|
|
1290
|
+
c ??= 2147483647;
|
|
1298
1291
|
if (2 > c) {
|
|
1299
1292
|
return 0;
|
|
1300
1293
|
}
|
|
@@ -1306,7 +1299,7 @@ var ic = (b, a, c, d) => {
|
|
|
1306
1299
|
}
|
|
1307
1300
|
Da[a >> 1] = 0;
|
|
1308
1301
|
return a - d;
|
|
1309
|
-
},
|
|
1302
|
+
}, sc = b => 2 * b.length, tc = (b, a) => {
|
|
1310
1303
|
for (var c = 0, d = ""; !(c >= a / 4);) {
|
|
1311
1304
|
var e = K[b + 4 * c >> 2];
|
|
1312
1305
|
if (0 == e) {
|
|
@@ -1316,8 +1309,8 @@ var ic = (b, a, c, d) => {
|
|
|
1316
1309
|
65536 <= e ? (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : d += String.fromCharCode(e);
|
|
1317
1310
|
}
|
|
1318
1311
|
return d;
|
|
1319
|
-
},
|
|
1320
|
-
|
|
1312
|
+
}, uc = (b, a, c) => {
|
|
1313
|
+
c ??= 2147483647;
|
|
1321
1314
|
if (4 > c) {
|
|
1322
1315
|
return 0;
|
|
1323
1316
|
}
|
|
@@ -1337,68 +1330,68 @@ var ic = (b, a, c, d) => {
|
|
|
1337
1330
|
}
|
|
1338
1331
|
K[a >> 2] = 0;
|
|
1339
1332
|
return a - d;
|
|
1340
|
-
},
|
|
1333
|
+
}, vc = b => {
|
|
1341
1334
|
for (var a = 0, c = 0; c < b.length; ++c) {
|
|
1342
1335
|
var d = b.charCodeAt(c);
|
|
1343
1336
|
55296 <= d && 57343 >= d && ++c;
|
|
1344
1337
|
a += 4;
|
|
1345
1338
|
}
|
|
1346
1339
|
return a;
|
|
1347
|
-
},
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1340
|
+
}, wc = (b, a, c) => {
|
|
1341
|
+
var d = [];
|
|
1342
|
+
b = b.toWireType(d, c);
|
|
1343
|
+
d.length && (O[a >> 2] = Za(d));
|
|
1344
|
+
return b;
|
|
1345
|
+
}, xc = {}, yc = b => {
|
|
1346
|
+
var a = xc[b];
|
|
1347
|
+
return void 0 === a ? T(b) : a;
|
|
1348
|
+
}, zc = [], Ac = b => {
|
|
1349
|
+
var a = zc.length;
|
|
1350
|
+
zc.push(b);
|
|
1356
1351
|
return a;
|
|
1357
|
-
}
|
|
1358
|
-
function zc(b, a) {
|
|
1352
|
+
}, Bc = (b, a) => {
|
|
1359
1353
|
for (var c = Array(b), d = 0; d < b; ++d) {
|
|
1360
|
-
c[d] =
|
|
1354
|
+
c[d] = lb(O[a + 4 * d >> 2], "parameter " + d);
|
|
1361
1355
|
}
|
|
1362
1356
|
return c;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
void 0 === Bc[a] ? delete b[a] : b[a] = Bc[a];
|
|
1357
|
+
}, Cc = Reflect.construct, Dc = {}, Fc = () => {
|
|
1358
|
+
if (!Ec) {
|
|
1359
|
+
var b = {USER:"web_user", LOGNAME:"web_user", PATH:"/", PWD:"/", HOME:"/home/web_user", LANG:("object" == typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", _:ra || "./this.program"}, a;
|
|
1360
|
+
for (a in Dc) {
|
|
1361
|
+
void 0 === Dc[a] ? delete b[a] : b[a] = Dc[a];
|
|
1369
1362
|
}
|
|
1370
1363
|
var c = [];
|
|
1371
1364
|
for (a in b) {
|
|
1372
1365
|
c.push(`${a}=${b[a]}`);
|
|
1373
1366
|
}
|
|
1374
|
-
|
|
1367
|
+
Ec = c;
|
|
1375
1368
|
}
|
|
1376
|
-
return
|
|
1377
|
-
},
|
|
1378
|
-
function
|
|
1379
|
-
var a = Array(
|
|
1380
|
-
|
|
1369
|
+
return Ec;
|
|
1370
|
+
}, Ec, Gc = [null, [], []], Hc = b => 0 === b % 4 && (0 !== b % 100 || 0 === b % 400), Ic = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Jc = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1371
|
+
function Kc(b) {
|
|
1372
|
+
var a = Array(kc(b) + 1);
|
|
1373
|
+
jc(b, a, 0, a.length);
|
|
1381
1374
|
return a;
|
|
1382
1375
|
}
|
|
1383
|
-
var
|
|
1384
|
-
function e(g,
|
|
1385
|
-
for (g = "number" == typeof g ? g.toString() : g || ""; g.length <
|
|
1376
|
+
var Lc = (b, a, c, d) => {
|
|
1377
|
+
function e(g, t, q) {
|
|
1378
|
+
for (g = "number" == typeof g ? g.toString() : g || ""; g.length < t;) {
|
|
1386
1379
|
g = q[0] + g;
|
|
1387
1380
|
}
|
|
1388
1381
|
return g;
|
|
1389
1382
|
}
|
|
1390
|
-
function f(g,
|
|
1391
|
-
return e(g,
|
|
1383
|
+
function f(g, t) {
|
|
1384
|
+
return e(g, t, "0");
|
|
1392
1385
|
}
|
|
1393
|
-
function m(g,
|
|
1386
|
+
function m(g, t) {
|
|
1394
1387
|
function q(E) {
|
|
1395
1388
|
return 0 > E ? -1 : 0 < E ? 1 : 0;
|
|
1396
1389
|
}
|
|
1397
1390
|
var F;
|
|
1398
|
-
0 === (F = q(g.getFullYear() -
|
|
1391
|
+
0 === (F = q(g.getFullYear() - t.getFullYear())) && 0 === (F = q(g.getMonth() - t.getMonth())) && (F = q(g.getDate() - t.getDate()));
|
|
1399
1392
|
return F;
|
|
1400
1393
|
}
|
|
1401
|
-
function
|
|
1394
|
+
function h(g) {
|
|
1402
1395
|
switch(g.getDay()) {
|
|
1403
1396
|
case 0:
|
|
1404
1397
|
return new Date(g.getFullYear() - 1, 11, 29);
|
|
@@ -1416,705 +1409,641 @@ var Jc = (b, a, c, d) => {
|
|
|
1416
1409
|
return new Date(g.getFullYear() - 1, 11, 30);
|
|
1417
1410
|
}
|
|
1418
1411
|
}
|
|
1419
|
-
function
|
|
1420
|
-
var
|
|
1421
|
-
for (g = new Date((new Date(g.
|
|
1422
|
-
var q = g.getMonth(), F = (
|
|
1423
|
-
if (
|
|
1424
|
-
|
|
1412
|
+
function l(g) {
|
|
1413
|
+
var t = g.I;
|
|
1414
|
+
for (g = new Date((new Date(g.J + 1900, 0, 1)).getTime()); 0 < t;) {
|
|
1415
|
+
var q = g.getMonth(), F = (Hc(g.getFullYear()) ? Ic : Jc)[q];
|
|
1416
|
+
if (t > F - g.getDate()) {
|
|
1417
|
+
t -= F - g.getDate() + 1, g.setDate(1), 11 > q ? g.setMonth(q + 1) : (g.setMonth(0), g.setFullYear(g.getFullYear() + 1));
|
|
1425
1418
|
} else {
|
|
1426
|
-
g.setDate(g.getDate() +
|
|
1419
|
+
g.setDate(g.getDate() + t);
|
|
1427
1420
|
break;
|
|
1428
1421
|
}
|
|
1429
1422
|
}
|
|
1430
1423
|
q = new Date(g.getFullYear() + 1, 0, 4);
|
|
1431
|
-
|
|
1432
|
-
q =
|
|
1433
|
-
return 0 >= m(
|
|
1424
|
+
t = h(new Date(g.getFullYear(), 0, 4));
|
|
1425
|
+
q = h(q);
|
|
1426
|
+
return 0 >= m(t, g) ? 0 >= m(q, g) ? g.getFullYear() + 1 : g.getFullYear() : g.getFullYear() - 1;
|
|
1434
1427
|
}
|
|
1435
|
-
var
|
|
1436
|
-
d = {
|
|
1437
|
-
c = c ?
|
|
1438
|
-
|
|
1439
|
-
for (var
|
|
1440
|
-
c = c.replace(new RegExp(
|
|
1428
|
+
var n = O[d + 40 >> 2];
|
|
1429
|
+
d = {ib:K[d >> 2], hb:K[d + 4 >> 2], Y:K[d + 8 >> 2], ga:K[d + 12 >> 2], Z:K[d + 16 >> 2], J:K[d + 20 >> 2], D:K[d + 24 >> 2], I:K[d + 28 >> 2], nb:K[d + 32 >> 2], gb:K[d + 36 >> 2], jb:n ? n ? oc(J, n) : "" : ""};
|
|
1430
|
+
c = c ? oc(J, c) : "";
|
|
1431
|
+
n = {"%c":"%a %b %d %H:%M:%S %Y", "%D":"%m/%d/%y", "%F":"%Y-%m-%d", "%h":"%b", "%r":"%I:%M:%S %p", "%R":"%H:%M", "%T":"%H:%M:%S", "%x":"%m/%d/%y", "%X":"%H:%M:%S", "%Ec":"%c", "%EC":"%C", "%Ex":"%m/%d/%y", "%EX":"%H:%M:%S", "%Ey":"%y", "%EY":"%Y", "%Od":"%d", "%Oe":"%e", "%OH":"%H", "%OI":"%I", "%Om":"%m", "%OM":"%M", "%OS":"%S", "%Ou":"%u", "%OU":"%U", "%OV":"%V", "%Ow":"%w", "%OW":"%W", "%Oy":"%y",};
|
|
1432
|
+
for (var r in n) {
|
|
1433
|
+
c = c.replace(new RegExp(r, "g"), n[r]);
|
|
1441
1434
|
}
|
|
1442
|
-
var w = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
|
|
1443
|
-
|
|
1444
|
-
g = g.
|
|
1435
|
+
var w = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), y = "January February March April May June July August September October November December".split(" ");
|
|
1436
|
+
n = {"%a":g => w[g.D].substring(0, 3), "%A":g => w[g.D], "%b":g => y[g.Z].substring(0, 3), "%B":g => y[g.Z], "%C":g => f((g.J + 1900) / 100 | 0, 2), "%d":g => f(g.ga, 2), "%e":g => e(g.ga, 2, " "), "%g":g => l(g).toString().substring(2), "%G":l, "%H":g => f(g.Y, 2), "%I":g => {
|
|
1437
|
+
g = g.Y;
|
|
1445
1438
|
0 == g ? g = 12 : 12 < g && (g -= 12);
|
|
1446
1439
|
return f(g, 2);
|
|
1447
1440
|
}, "%j":g => {
|
|
1448
|
-
for (var
|
|
1441
|
+
for (var t = 0, q = 0; q <= g.Z - 1; t += (Hc(g.J + 1900) ? Ic : Jc)[q++]) {
|
|
1449
1442
|
}
|
|
1450
|
-
return f(g.
|
|
1451
|
-
}, "%m":g => f(g
|
|
1452
|
-
var
|
|
1453
|
-
2 >= (g.
|
|
1454
|
-
if (
|
|
1455
|
-
53 ==
|
|
1443
|
+
return f(g.ga + t, 3);
|
|
1444
|
+
}, "%m":g => f(g.Z + 1, 2), "%M":g => f(g.hb, 2), "%n":() => "\n", "%p":g => 0 <= g.Y && 12 > g.Y ? "AM" : "PM", "%S":g => f(g.ib, 2), "%t":() => "\t", "%u":g => g.D || 7, "%U":g => f(Math.floor((g.I + 7 - g.D) / 7), 2), "%V":g => {
|
|
1445
|
+
var t = Math.floor((g.I + 7 - (g.D + 6) % 7) / 7);
|
|
1446
|
+
2 >= (g.D + 371 - g.I - 2) % 7 && t++;
|
|
1447
|
+
if (t) {
|
|
1448
|
+
53 == t && (q = (g.D + 371 - g.I) % 7, 4 == q || 3 == q && Hc(g.J) || (t = 1));
|
|
1456
1449
|
} else {
|
|
1457
|
-
|
|
1458
|
-
var q = (g.
|
|
1459
|
-
(4 == q || 5 == q &&
|
|
1450
|
+
t = 52;
|
|
1451
|
+
var q = (g.D + 7 - g.I - 1) % 7;
|
|
1452
|
+
(4 == q || 5 == q && Hc(g.J % 400 - 1)) && t++;
|
|
1460
1453
|
}
|
|
1461
|
-
return f(
|
|
1462
|
-
}, "%w":g => g.
|
|
1463
|
-
g = g.
|
|
1464
|
-
var
|
|
1454
|
+
return f(t, 2);
|
|
1455
|
+
}, "%w":g => g.D, "%W":g => f(Math.floor((g.I + 7 - (g.D + 6) % 7) / 7), 2), "%y":g => (g.J + 1900).toString().substring(2), "%Y":g => g.J + 1900, "%z":g => {
|
|
1456
|
+
g = g.gb;
|
|
1457
|
+
var t = 0 <= g;
|
|
1465
1458
|
g = Math.abs(g) / 60;
|
|
1466
|
-
return (
|
|
1467
|
-
}, "%Z":g => g.
|
|
1459
|
+
return (t ? "+" : "-") + String("0000" + (g / 60 * 100 + g % 60)).slice(-4);
|
|
1460
|
+
}, "%Z":g => g.jb, "%%":() => "%"};
|
|
1468
1461
|
c = c.replace(/%%/g, "\x00\x00");
|
|
1469
|
-
for (
|
|
1470
|
-
c.includes(
|
|
1462
|
+
for (r in n) {
|
|
1463
|
+
c.includes(r) && (c = c.replace(new RegExp(r, "g"), n[r](d)));
|
|
1471
1464
|
}
|
|
1472
1465
|
c = c.replace(/\0\0/g, "%");
|
|
1473
|
-
|
|
1474
|
-
if (
|
|
1466
|
+
r = Kc(c);
|
|
1467
|
+
if (r.length > a) {
|
|
1475
1468
|
return 0;
|
|
1476
1469
|
}
|
|
1477
|
-
Ca.set(
|
|
1478
|
-
return
|
|
1470
|
+
Ca.set(r, b);
|
|
1471
|
+
return r.length - 1;
|
|
1479
1472
|
};
|
|
1480
|
-
|
|
1481
|
-
return this.G[b];
|
|
1482
|
-
}, has(b) {
|
|
1483
|
-
return void 0 !== this.G[b];
|
|
1484
|
-
}, Za(b) {
|
|
1485
|
-
var a = this.ta.pop() || this.G.length;
|
|
1486
|
-
this.G[a] = b;
|
|
1487
|
-
return a;
|
|
1488
|
-
}, $a(b) {
|
|
1489
|
-
this.G[b] = void 0;
|
|
1490
|
-
this.ta.push(b);
|
|
1491
|
-
}});
|
|
1492
|
-
ab = h.BindingError = class extends Error {
|
|
1473
|
+
Q = k.BindingError = class extends Error {
|
|
1493
1474
|
constructor(b) {
|
|
1494
1475
|
super(b);
|
|
1495
1476
|
this.name = "BindingError";
|
|
1496
1477
|
}
|
|
1497
1478
|
};
|
|
1498
|
-
P.
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
}
|
|
1504
|
-
return b;
|
|
1505
|
-
};
|
|
1506
|
-
cb = h.PureVirtualError = bb("PureVirtualError");
|
|
1507
|
-
for (var Kc = Array(256), Lc = 0; 256 > Lc; ++Lc) {
|
|
1508
|
-
Kc[Lc] = String.fromCharCode(Lc);
|
|
1479
|
+
P.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1,);
|
|
1480
|
+
k.count_emval_handles = () => P.length / 2 - 5 - Ya.length;
|
|
1481
|
+
ab = k.PureVirtualError = $a("PureVirtualError");
|
|
1482
|
+
for (var Mc = Array(256), Nc = 0; 256 > Nc; ++Nc) {
|
|
1483
|
+
Mc[Nc] = String.fromCharCode(Nc);
|
|
1509
1484
|
}
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
};
|
|
1514
|
-
h.getLiveInheritedInstances = function() {
|
|
1485
|
+
bb = Mc;
|
|
1486
|
+
k.getInheritedInstanceCount = () => Object.keys(fb).length;
|
|
1487
|
+
k.getLiveInheritedInstances = () => {
|
|
1515
1488
|
var b = [], a;
|
|
1516
|
-
for (a in
|
|
1517
|
-
|
|
1489
|
+
for (a in fb) {
|
|
1490
|
+
fb.hasOwnProperty(a) && b.push(fb[a]);
|
|
1518
1491
|
}
|
|
1519
1492
|
return b;
|
|
1520
1493
|
};
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1494
|
+
k.flushPendingDeletes = db;
|
|
1495
|
+
k.setDelayFunction = b => {
|
|
1496
|
+
eb = b;
|
|
1497
|
+
cb.length && eb && eb(db);
|
|
1525
1498
|
};
|
|
1526
|
-
|
|
1499
|
+
wb = k.InternalError = class extends Error {
|
|
1527
1500
|
constructor(b) {
|
|
1528
1501
|
super(b);
|
|
1529
1502
|
this.name = "InternalError";
|
|
1530
1503
|
}
|
|
1531
1504
|
};
|
|
1532
|
-
|
|
1533
|
-
if (!(this instanceof
|
|
1505
|
+
Object.assign(Hb.prototype, {isAliasOf:function(b) {
|
|
1506
|
+
if (!(this instanceof Hb && b instanceof Hb)) {
|
|
1534
1507
|
return !1;
|
|
1535
1508
|
}
|
|
1536
|
-
var a = this.g.j.h, c = this.g.i
|
|
1537
|
-
|
|
1538
|
-
|
|
1509
|
+
var a = this.g.j.h, c = this.g.i;
|
|
1510
|
+
b.g = b.g;
|
|
1511
|
+
var d = b.g.j.h;
|
|
1512
|
+
for (b = b.g.i; a.o;) {
|
|
1513
|
+
c = a.R(c), a = a.o;
|
|
1539
1514
|
}
|
|
1540
|
-
for (; d.
|
|
1541
|
-
b = d.
|
|
1515
|
+
for (; d.o;) {
|
|
1516
|
+
b = d.R(b), d = d.o;
|
|
1542
1517
|
}
|
|
1543
1518
|
return a === d && c === b;
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
this.g.
|
|
1547
|
-
if (this.g.O) {
|
|
1519
|
+
}, clone:function() {
|
|
1520
|
+
this.g.i || Gb(this);
|
|
1521
|
+
if (this.g.N) {
|
|
1548
1522
|
return this.g.count.value += 1, this;
|
|
1549
1523
|
}
|
|
1550
|
-
var b =
|
|
1551
|
-
b = b(c.call(a, d, {g:{value:{count:e.count,
|
|
1524
|
+
var b = xb, a = Object, c = a.create, d = Object.getPrototypeOf(this), e = this.g;
|
|
1525
|
+
b = b(c.call(a, d, {g:{value:{count:e.count, L:e.L, N:e.N, i:e.i, j:e.j, s:e.s, v:e.v,},}}));
|
|
1552
1526
|
b.g.count.value += 1;
|
|
1553
|
-
b.g.
|
|
1527
|
+
b.g.L = !1;
|
|
1554
1528
|
return b;
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
this.g.
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1529
|
+
}, ["delete"]() {
|
|
1530
|
+
this.g.i || Gb(this);
|
|
1531
|
+
if (this.g.L && !this.g.N) {
|
|
1532
|
+
throw new Q("Object already scheduled for deletion");
|
|
1533
|
+
}
|
|
1534
|
+
mb(this);
|
|
1535
|
+
var b = this.g;
|
|
1536
|
+
--b.count.value;
|
|
1537
|
+
0 === b.count.value && (b.s ? b.v.C(b.s) : b.j.h.C(b.i));
|
|
1538
|
+
this.g.N || (this.g.s = void 0, this.g.i = void 0);
|
|
1539
|
+
}, isDeleted:function() {
|
|
1564
1540
|
return !this.g.i;
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
this.g.
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1541
|
+
}, deleteLater:function() {
|
|
1542
|
+
this.g.i || Gb(this);
|
|
1543
|
+
if (this.g.L && !this.g.N) {
|
|
1544
|
+
throw new Q("Object already scheduled for deletion");
|
|
1545
|
+
}
|
|
1546
|
+
cb.push(this);
|
|
1547
|
+
1 === cb.length && eb && eb(db);
|
|
1548
|
+
this.g.L = !0;
|
|
1572
1549
|
return this;
|
|
1573
|
-
};
|
|
1574
|
-
|
|
1575
|
-
this.
|
|
1550
|
+
},});
|
|
1551
|
+
Object.assign(Rb.prototype, {Qa(b) {
|
|
1552
|
+
this.wa && (b = this.wa(b));
|
|
1576
1553
|
return b;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
};
|
|
1581
|
-
Vb.prototype.argPackAdvance = 8;
|
|
1582
|
-
Vb.prototype.readValueFromPointer = Fb;
|
|
1583
|
-
Vb.prototype.deleteObject = function(b) {
|
|
1584
|
-
if (null !== b) {
|
|
1585
|
-
b["delete"]();
|
|
1586
|
-
}
|
|
1587
|
-
};
|
|
1588
|
-
Vb.prototype.fromWireType = function(b) {
|
|
1554
|
+
}, oa(b) {
|
|
1555
|
+
this.C?.(b);
|
|
1556
|
+
}, argPackAdvance:8, readValueFromPointer:Bb, fromWireType:function(b) {
|
|
1589
1557
|
function a() {
|
|
1590
|
-
return this.
|
|
1558
|
+
return this.U ? yb(this.h.B, {j:this.$a, i:c, v:this, s:b,}) : yb(this.h.B, {j:this, i:b,});
|
|
1591
1559
|
}
|
|
1592
|
-
var c = this.
|
|
1560
|
+
var c = this.Qa(b);
|
|
1593
1561
|
if (!c) {
|
|
1594
|
-
return this.
|
|
1562
|
+
return this.oa(b), null;
|
|
1595
1563
|
}
|
|
1596
|
-
var d =
|
|
1564
|
+
var d = qb(this.h, c);
|
|
1597
1565
|
if (void 0 !== d) {
|
|
1598
1566
|
if (0 === d.g.count.value) {
|
|
1599
1567
|
return d.g.i = c, d.g.s = b, d.clone();
|
|
1600
1568
|
}
|
|
1601
1569
|
d = d.clone();
|
|
1602
|
-
this.
|
|
1570
|
+
this.oa(b);
|
|
1603
1571
|
return d;
|
|
1604
1572
|
}
|
|
1605
|
-
d = this.h.
|
|
1606
|
-
d =
|
|
1573
|
+
d = this.h.Pa(c);
|
|
1574
|
+
d = pb[d];
|
|
1607
1575
|
if (!d) {
|
|
1608
1576
|
return a.call(this);
|
|
1609
1577
|
}
|
|
1610
|
-
d = this.
|
|
1611
|
-
var e =
|
|
1612
|
-
return null === e ? a.call(this) : this.
|
|
1613
|
-
};
|
|
1614
|
-
|
|
1615
|
-
var
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1578
|
+
d = this.T ? d.Ga : d.pointerType;
|
|
1579
|
+
var e = ob(c, this.h, d.h);
|
|
1580
|
+
return null === e ? a.call(this) : this.U ? yb(d.h.B, {j:d, i:e, v:this, s:b,}) : yb(d.h.B, {j:d, i:e,});
|
|
1581
|
+
},});
|
|
1582
|
+
Yb = k.UnboundTypeError = $a("UnboundTypeError");
|
|
1583
|
+
var Pc = {_abort_js:() => {
|
|
1584
|
+
Pa("");
|
|
1585
|
+
}, _embind_create_inheriting_constructor:(b, a, c) => {
|
|
1586
|
+
b = T(b);
|
|
1587
|
+
a = lb(a, "wrapper");
|
|
1588
|
+
c = S(c);
|
|
1589
|
+
var d = a.h, e = d.B, f = d.o.B, m = d.o.constructor;
|
|
1590
|
+
b = Xa(b, function(...h) {
|
|
1591
|
+
d.o.va.forEach(function(l) {
|
|
1592
|
+
if (this[l] === f[l]) {
|
|
1593
|
+
throw new ab(`Pure virtual function ${l} must be implemented in JavaScript`);
|
|
1624
1594
|
}
|
|
1625
1595
|
}.bind(this));
|
|
1626
|
-
Object.defineProperty(this, "__parent", {value:
|
|
1627
|
-
this.__construct
|
|
1596
|
+
Object.defineProperty(this, "__parent", {value:e});
|
|
1597
|
+
this.__construct(...h);
|
|
1628
1598
|
});
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
l
|
|
1639
|
-
|
|
1640
|
-
|
|
1599
|
+
e.__construct = function(...h) {
|
|
1600
|
+
if (this === e) {
|
|
1601
|
+
throw new Q("Pass correct 'this' to __construct");
|
|
1602
|
+
}
|
|
1603
|
+
h = m.implement(this, ...h);
|
|
1604
|
+
mb(h);
|
|
1605
|
+
var l = h.g;
|
|
1606
|
+
h.notifyOnDestruction();
|
|
1607
|
+
l.N = !0;
|
|
1608
|
+
Object.defineProperties(this, {g:{value:l}});
|
|
1609
|
+
xb(this);
|
|
1610
|
+
h = l.i;
|
|
1611
|
+
h = gb(d, h);
|
|
1612
|
+
if (fb.hasOwnProperty(h)) {
|
|
1613
|
+
throw new Q(`Tried to register registered instance: ${h}`);
|
|
1614
|
+
}
|
|
1615
|
+
fb[h] = this;
|
|
1641
1616
|
};
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1617
|
+
e.__destruct = function() {
|
|
1618
|
+
if (this === e) {
|
|
1619
|
+
throw new Q("Pass correct 'this' to __destruct");
|
|
1620
|
+
}
|
|
1621
|
+
mb(this);
|
|
1622
|
+
var h = this.g.i;
|
|
1623
|
+
h = gb(d, h);
|
|
1624
|
+
if (fb.hasOwnProperty(h)) {
|
|
1625
|
+
delete fb[h];
|
|
1626
|
+
} else {
|
|
1627
|
+
throw new Q(`Tried to unregister unregistered instance: ${h}`);
|
|
1628
|
+
}
|
|
1648
1629
|
};
|
|
1649
|
-
b.prototype = Object.create(
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
var a =
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
var t = m[l], w = n.Wa, x = n.Xa, g = m[l + e.length], r = n.kb, q = n.mb;
|
|
1662
|
-
k[n.Sa] = {read:F => t.fromWireType(w(x, F)), write:(F, E) => {
|
|
1630
|
+
b.prototype = Object.create(e);
|
|
1631
|
+
Object.assign(b.prototype, c);
|
|
1632
|
+
return Za(b);
|
|
1633
|
+
}, _embind_finalize_value_object:b => {
|
|
1634
|
+
var a = zb[b];
|
|
1635
|
+
delete zb[b];
|
|
1636
|
+
var c = a.ea, d = a.C, e = a.ra, f = e.map(m => m.Ta).concat(e.map(m => m.cb));
|
|
1637
|
+
X([b], f, m => {
|
|
1638
|
+
var h = {};
|
|
1639
|
+
e.forEach((l, n) => {
|
|
1640
|
+
var r = m[n], w = l.Ra, y = l.Sa, g = m[n + e.length], t = l.bb, q = l.eb;
|
|
1641
|
+
h[l.Na] = {read:F => r.fromWireType(w(y, F)), write:(F, E) => {
|
|
1663
1642
|
var v = [];
|
|
1664
|
-
|
|
1665
|
-
|
|
1643
|
+
t(q, F, g.toWireType(v, E));
|
|
1644
|
+
Ab(v);
|
|
1666
1645
|
}};
|
|
1667
1646
|
});
|
|
1668
|
-
return [{name:a.name, fromWireType:
|
|
1669
|
-
var
|
|
1670
|
-
for (
|
|
1671
|
-
|
|
1647
|
+
return [{name:a.name, fromWireType:l => {
|
|
1648
|
+
var n = {}, r;
|
|
1649
|
+
for (r in h) {
|
|
1650
|
+
n[r] = h[r].read(l);
|
|
1672
1651
|
}
|
|
1673
|
-
d(
|
|
1674
|
-
return
|
|
1675
|
-
}, toWireType:
|
|
1676
|
-
for (var
|
|
1677
|
-
if (!(
|
|
1678
|
-
throw new TypeError(`Missing field: "${
|
|
1652
|
+
d(l);
|
|
1653
|
+
return n;
|
|
1654
|
+
}, toWireType:(l, n) => {
|
|
1655
|
+
for (var r in h) {
|
|
1656
|
+
if (!(r in n)) {
|
|
1657
|
+
throw new TypeError(`Missing field: "${r}"`);
|
|
1679
1658
|
}
|
|
1680
1659
|
}
|
|
1681
1660
|
var w = c();
|
|
1682
|
-
for (
|
|
1683
|
-
|
|
1661
|
+
for (r in h) {
|
|
1662
|
+
h[r].write(w, n[r]);
|
|
1684
1663
|
}
|
|
1685
|
-
null !==
|
|
1664
|
+
null !== l && l.push(d, w);
|
|
1686
1665
|
return w;
|
|
1687
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
1666
|
+
}, argPackAdvance:8, readValueFromPointer:Bb, A:d,}];
|
|
1688
1667
|
});
|
|
1689
|
-
}, _embind_register_bigint:
|
|
1690
|
-
}, _embind_register_bool:
|
|
1691
|
-
|
|
1692
|
-
a
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
}, v:null,});
|
|
1709
|
-
}, _embind_register_class:function(b, a, c, d, e, f, m, k, n, l, t, w, x) {
|
|
1710
|
-
t = U(t);
|
|
1711
|
-
f = X(e, f);
|
|
1712
|
-
k && (k = X(m, k));
|
|
1713
|
-
l && (l = X(n, l));
|
|
1714
|
-
x = X(w, x);
|
|
1715
|
-
var g = Ya(t);
|
|
1716
|
-
Ob(g, function() {
|
|
1717
|
-
ac(`Cannot construct ${t} due to unbound types`, [d]);
|
|
1668
|
+
}, _embind_register_bigint:() => {
|
|
1669
|
+
}, _embind_register_bool:(b, a, c, d) => {
|
|
1670
|
+
a = T(a);
|
|
1671
|
+
Eb(b, {name:a, fromWireType:function(e) {
|
|
1672
|
+
return !!e;
|
|
1673
|
+
}, toWireType:function(e, f) {
|
|
1674
|
+
return f ? c : d;
|
|
1675
|
+
}, argPackAdvance:8, readValueFromPointer:function(e) {
|
|
1676
|
+
return this.fromWireType(J[e]);
|
|
1677
|
+
}, A:null,});
|
|
1678
|
+
}, _embind_register_class:(b, a, c, d, e, f, m, h, l, n, r, w, y) => {
|
|
1679
|
+
r = T(r);
|
|
1680
|
+
f = Y(e, f);
|
|
1681
|
+
h &&= Y(m, h);
|
|
1682
|
+
n &&= Y(l, n);
|
|
1683
|
+
y = Y(w, y);
|
|
1684
|
+
var g = Kb(r);
|
|
1685
|
+
Jb(g, function() {
|
|
1686
|
+
Zb(`Cannot construct ${r} due to unbound types`, [d]);
|
|
1718
1687
|
});
|
|
1719
|
-
|
|
1720
|
-
|
|
1688
|
+
X([b, a, c], d ? [d] : [], t => {
|
|
1689
|
+
t = t[0];
|
|
1721
1690
|
if (d) {
|
|
1722
|
-
var q =
|
|
1691
|
+
var q = t.h;
|
|
1723
1692
|
var F = q.B;
|
|
1724
1693
|
} else {
|
|
1725
|
-
F =
|
|
1694
|
+
F = Hb.prototype;
|
|
1726
1695
|
}
|
|
1727
|
-
|
|
1696
|
+
t = Xa(r, function(...L) {
|
|
1728
1697
|
if (Object.getPrototypeOf(this) !== E) {
|
|
1729
|
-
throw new
|
|
1698
|
+
throw new Q("Use 'new' to construct " + r);
|
|
1730
1699
|
}
|
|
1731
|
-
if (void 0 === v.
|
|
1732
|
-
throw new
|
|
1700
|
+
if (void 0 === v.H) {
|
|
1701
|
+
throw new Q(r + " has no accessible constructor");
|
|
1733
1702
|
}
|
|
1734
|
-
var
|
|
1735
|
-
if (void 0 ===
|
|
1736
|
-
throw new
|
|
1703
|
+
var R = v.H[L.length];
|
|
1704
|
+
if (void 0 === R) {
|
|
1705
|
+
throw new Q(`Tried to invoke ctor of ${r} with invalid number of parameters (${L.length}) - expected (${Object.keys(v.H).toString()}) parameters instead!`);
|
|
1737
1706
|
}
|
|
1738
|
-
return
|
|
1707
|
+
return R.apply(this, L);
|
|
1739
1708
|
});
|
|
1740
|
-
var E = Object.create(F, {constructor:{value:
|
|
1741
|
-
|
|
1742
|
-
var v = new
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1709
|
+
var E = Object.create(F, {constructor:{value:t},});
|
|
1710
|
+
t.prototype = E;
|
|
1711
|
+
var v = new Lb(r, t, E, y, q, f, h, n);
|
|
1712
|
+
if (v.o) {
|
|
1713
|
+
var I;
|
|
1714
|
+
(I = v.o).S ?? (I.S = []);
|
|
1715
|
+
v.o.S.push(v);
|
|
1716
|
+
}
|
|
1717
|
+
q = new Rb(r, v, !0, !1, !1);
|
|
1718
|
+
I = new Rb(r + "*", v, !1, !1, !1);
|
|
1719
|
+
F = new Rb(r + " const*", v, !1, !0, !1);
|
|
1720
|
+
pb[b] = {pointerType:I, Ga:F};
|
|
1721
|
+
Sb(g, t);
|
|
1722
|
+
return [q, I, F];
|
|
1750
1723
|
});
|
|
1751
|
-
}, _embind_register_class_class_function:
|
|
1752
|
-
var
|
|
1753
|
-
a =
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1724
|
+
}, _embind_register_class_class_function:(b, a, c, d, e, f, m) => {
|
|
1725
|
+
var h = bc(c, d);
|
|
1726
|
+
a = T(a);
|
|
1727
|
+
a = cc(a);
|
|
1728
|
+
f = Y(e, f);
|
|
1729
|
+
X([], [b], l => {
|
|
1730
|
+
function n() {
|
|
1731
|
+
Zb(`Cannot call ${r} due to unbound types`, h);
|
|
1758
1732
|
}
|
|
1759
|
-
|
|
1760
|
-
var
|
|
1733
|
+
l = l[0];
|
|
1734
|
+
var r = `${l.name}.${a}`;
|
|
1761
1735
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1762
|
-
var w =
|
|
1763
|
-
void 0 === w[a] ? (
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
void 0 === w[a].
|
|
1767
|
-
if (
|
|
1768
|
-
for (const g of
|
|
1769
|
-
g.constructor.hasOwnProperty(a) || (g.constructor[a] =
|
|
1736
|
+
var w = l.h.constructor;
|
|
1737
|
+
void 0 === w[a] ? (n.K = c - 1, w[a] = n) : (Ib(w, a, r), w[a].l[c - 1] = n);
|
|
1738
|
+
X([], h, y => {
|
|
1739
|
+
y = ac(r, [y[0], null].concat(y.slice(1)), null, f, m);
|
|
1740
|
+
void 0 === w[a].l ? (y.K = c - 1, w[a] = y) : w[a].l[c - 1] = y;
|
|
1741
|
+
if (l.h.S) {
|
|
1742
|
+
for (const g of l.h.S) {
|
|
1743
|
+
g.constructor.hasOwnProperty(a) || (g.constructor[a] = y);
|
|
1770
1744
|
}
|
|
1771
1745
|
}
|
|
1772
1746
|
return [];
|
|
1773
1747
|
});
|
|
1774
1748
|
return [];
|
|
1775
1749
|
});
|
|
1776
|
-
}, _embind_register_class_class_property:
|
|
1777
|
-
a =
|
|
1778
|
-
f =
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
var
|
|
1782
|
-
|
|
1750
|
+
}, _embind_register_class_class_property:(b, a, c, d, e, f, m, h) => {
|
|
1751
|
+
a = T(a);
|
|
1752
|
+
f = Y(e, f);
|
|
1753
|
+
X([], [b], l => {
|
|
1754
|
+
l = l[0];
|
|
1755
|
+
var n = `${l.name}.${a}`, r = {get() {
|
|
1756
|
+
Zb(`Cannot access ${n} due to unbound types`, [c]);
|
|
1783
1757
|
}, enumerable:!0, configurable:!0};
|
|
1784
|
-
|
|
1785
|
-
|
|
1758
|
+
r.set = h ? () => {
|
|
1759
|
+
Zb(`Cannot access ${n} due to unbound types`, [c]);
|
|
1786
1760
|
} : () => {
|
|
1787
|
-
Q(`${
|
|
1761
|
+
throw new Q(`${n} is a read-only property`);
|
|
1788
1762
|
};
|
|
1789
|
-
Object.defineProperty(
|
|
1790
|
-
|
|
1763
|
+
Object.defineProperty(l.h.constructor, a, r);
|
|
1764
|
+
X([], [c], w => {
|
|
1791
1765
|
w = w[0];
|
|
1792
|
-
var
|
|
1766
|
+
var y = {get() {
|
|
1793
1767
|
return w.fromWireType(f(d));
|
|
1794
1768
|
}, enumerable:!0};
|
|
1795
|
-
|
|
1796
|
-
var
|
|
1797
|
-
|
|
1798
|
-
|
|
1769
|
+
h && (h = Y(m, h), y.set = g => {
|
|
1770
|
+
var t = [];
|
|
1771
|
+
h(d, w.toWireType(t, g));
|
|
1772
|
+
Ab(t);
|
|
1799
1773
|
});
|
|
1800
|
-
Object.defineProperty(
|
|
1774
|
+
Object.defineProperty(l.h.constructor, a, y);
|
|
1801
1775
|
return [];
|
|
1802
1776
|
});
|
|
1803
1777
|
return [];
|
|
1804
1778
|
});
|
|
1805
|
-
}, _embind_register_class_constructor:
|
|
1806
|
-
var m =
|
|
1807
|
-
e =
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
var
|
|
1811
|
-
void 0 ===
|
|
1812
|
-
if (void 0 !==
|
|
1813
|
-
throw new
|
|
1779
|
+
}, _embind_register_class_constructor:(b, a, c, d, e, f) => {
|
|
1780
|
+
var m = bc(a, c);
|
|
1781
|
+
e = Y(d, e);
|
|
1782
|
+
X([], [b], h => {
|
|
1783
|
+
h = h[0];
|
|
1784
|
+
var l = `constructor ${h.name}`;
|
|
1785
|
+
void 0 === h.h.H && (h.h.H = []);
|
|
1786
|
+
if (void 0 !== h.h.H[a - 1]) {
|
|
1787
|
+
throw new Q(`Cannot register multiple constructors with identical number of parameters (${a - 1}) for class '${h.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
1814
1788
|
}
|
|
1815
|
-
|
|
1816
|
-
|
|
1789
|
+
h.h.H[a - 1] = () => {
|
|
1790
|
+
Zb(`Cannot construct ${h.name} due to unbound types`, m);
|
|
1817
1791
|
};
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1792
|
+
X([], m, n => {
|
|
1793
|
+
n.splice(1, 0, null);
|
|
1794
|
+
h.h.H[a - 1] = ac(l, n, null, e, f);
|
|
1821
1795
|
return [];
|
|
1822
1796
|
});
|
|
1823
1797
|
return [];
|
|
1824
1798
|
});
|
|
1825
|
-
}, _embind_register_class_function:
|
|
1826
|
-
var
|
|
1827
|
-
a =
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1799
|
+
}, _embind_register_class_function:(b, a, c, d, e, f, m, h) => {
|
|
1800
|
+
var l = bc(c, d);
|
|
1801
|
+
a = T(a);
|
|
1802
|
+
a = cc(a);
|
|
1803
|
+
f = Y(e, f);
|
|
1804
|
+
X([], [b], n => {
|
|
1805
|
+
function r() {
|
|
1806
|
+
Zb(`Cannot call ${w} due to unbound types`, l);
|
|
1832
1807
|
}
|
|
1833
|
-
|
|
1834
|
-
var w = `${
|
|
1808
|
+
n = n[0];
|
|
1809
|
+
var w = `${n.name}.${a}`;
|
|
1835
1810
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1836
|
-
|
|
1837
|
-
var
|
|
1838
|
-
void 0 === g || void 0 === g.
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
void 0 ===
|
|
1811
|
+
h && n.h.va.push(a);
|
|
1812
|
+
var y = n.h.B, g = y[a];
|
|
1813
|
+
void 0 === g || void 0 === g.l && g.className !== n.name && g.K === c - 2 ? (r.K = c - 2, r.className = n.name, y[a] = r) : (Ib(y, a, w), y[a].l[c - 2] = r);
|
|
1814
|
+
X([], l, t => {
|
|
1815
|
+
t = ac(w, t, n, f, m);
|
|
1816
|
+
void 0 === y[a].l ? (t.K = c - 2, y[a] = t) : y[a].l[c - 2] = t;
|
|
1842
1817
|
return [];
|
|
1843
1818
|
});
|
|
1844
1819
|
return [];
|
|
1845
1820
|
});
|
|
1846
|
-
}, _embind_register_class_property:
|
|
1847
|
-
a =
|
|
1848
|
-
e =
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
var w = `${
|
|
1852
|
-
|
|
1821
|
+
}, _embind_register_class_property:(b, a, c, d, e, f, m, h, l, n) => {
|
|
1822
|
+
a = T(a);
|
|
1823
|
+
e = Y(d, e);
|
|
1824
|
+
X([], [b], r => {
|
|
1825
|
+
r = r[0];
|
|
1826
|
+
var w = `${r.name}.${a}`, y = {get() {
|
|
1827
|
+
Zb(`Cannot access ${w} due to unbound types`, [c, m]);
|
|
1853
1828
|
}, enumerable:!0, configurable:!0};
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
var E = dc(this, t, w + " getter");
|
|
1863
|
-
return r.fromWireType(e(f, E));
|
|
1829
|
+
y.set = l ? () => Zb(`Cannot access ${w} due to unbound types`, [c, m]) : () => {
|
|
1830
|
+
throw new Q(w + " is a read-only property");
|
|
1831
|
+
};
|
|
1832
|
+
Object.defineProperty(r.h.B, a, y);
|
|
1833
|
+
X([], l ? [c, m] : [c], g => {
|
|
1834
|
+
var t = g[0], q = {get() {
|
|
1835
|
+
var E = dc(this, r, w + " getter");
|
|
1836
|
+
return t.fromWireType(e(f, E));
|
|
1864
1837
|
}, enumerable:!0};
|
|
1865
|
-
if (
|
|
1866
|
-
|
|
1838
|
+
if (l) {
|
|
1839
|
+
l = Y(h, l);
|
|
1867
1840
|
var F = g[1];
|
|
1868
1841
|
q.set = function(E) {
|
|
1869
|
-
var v = dc(this,
|
|
1870
|
-
n
|
|
1871
|
-
|
|
1842
|
+
var v = dc(this, r, w + " setter"), I = [];
|
|
1843
|
+
l(n, v, F.toWireType(I, E));
|
|
1844
|
+
Ab(I);
|
|
1872
1845
|
};
|
|
1873
1846
|
}
|
|
1874
|
-
Object.defineProperty(
|
|
1847
|
+
Object.defineProperty(r.h.B, a, q);
|
|
1875
1848
|
return [];
|
|
1876
1849
|
});
|
|
1877
1850
|
return [];
|
|
1878
1851
|
});
|
|
1879
|
-
}, _embind_register_emval:
|
|
1880
|
-
a = U(a);
|
|
1881
|
-
Ib(b, {name:a, fromWireType:function(c) {
|
|
1882
|
-
var d = R(c);
|
|
1883
|
-
ec(c);
|
|
1884
|
-
return d;
|
|
1885
|
-
}, toWireType:function(c, d) {
|
|
1886
|
-
return S(d);
|
|
1887
|
-
}, argPackAdvance:8, readValueFromPointer:Fb, v:null,});
|
|
1888
|
-
}, _embind_register_enum:function(b, a, c, d) {
|
|
1852
|
+
}, _embind_register_emval:b => Eb(b, fc), _embind_register_enum:(b, a, c, d) => {
|
|
1889
1853
|
function e() {
|
|
1890
1854
|
}
|
|
1891
|
-
|
|
1892
|
-
a = U(a);
|
|
1855
|
+
a = T(a);
|
|
1893
1856
|
e.values = {};
|
|
1894
|
-
|
|
1857
|
+
Eb(b, {name:a, constructor:e, fromWireType:function(f) {
|
|
1895
1858
|
return this.constructor.values[f];
|
|
1896
|
-
}, toWireType:
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
var d = nb(b, "enum");
|
|
1902
|
-
a = U(a);
|
|
1859
|
+
}, toWireType:(f, m) => m.value, argPackAdvance:8, readValueFromPointer:gc(a, c, d), A:null,});
|
|
1860
|
+
Jb(a, e);
|
|
1861
|
+
}, _embind_register_enum_value:(b, a, c) => {
|
|
1862
|
+
var d = lb(b, "enum");
|
|
1863
|
+
a = T(a);
|
|
1903
1864
|
b = d.constructor;
|
|
1904
|
-
d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value:
|
|
1865
|
+
d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value:Xa(`${d.name}_${a}`, function() {
|
|
1905
1866
|
})},});
|
|
1906
1867
|
b.values[c] = d;
|
|
1907
1868
|
b[a] = d;
|
|
1908
|
-
}, _embind_register_float:
|
|
1909
|
-
|
|
1910
|
-
a
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
b = U(b);
|
|
1919
|
-
e = X(d, e);
|
|
1920
|
-
Ob(b, function() {
|
|
1921
|
-
ac(`Cannot call ${b} due to unbound types`, m);
|
|
1869
|
+
}, _embind_register_float:(b, a, c) => {
|
|
1870
|
+
a = T(a);
|
|
1871
|
+
Eb(b, {name:a, fromWireType:d => d, toWireType:(d, e) => e, argPackAdvance:8, readValueFromPointer:hc(a, c), A:null,});
|
|
1872
|
+
}, _embind_register_function:(b, a, c, d, e, f) => {
|
|
1873
|
+
var m = bc(a, c);
|
|
1874
|
+
b = T(b);
|
|
1875
|
+
b = cc(b);
|
|
1876
|
+
e = Y(d, e);
|
|
1877
|
+
Jb(b, function() {
|
|
1878
|
+
Zb(`Cannot call ${b} due to unbound types`, m);
|
|
1922
1879
|
}, a - 1);
|
|
1923
|
-
|
|
1924
|
-
|
|
1880
|
+
X([], m, h => {
|
|
1881
|
+
Sb(b, ac(b, [h[0], null].concat(h.slice(1)), null, e, f), a - 1);
|
|
1925
1882
|
return [];
|
|
1926
1883
|
});
|
|
1927
|
-
}, _embind_register_integer:
|
|
1928
|
-
a =
|
|
1884
|
+
}, _embind_register_integer:(b, a, c, d, e) => {
|
|
1885
|
+
a = T(a);
|
|
1929
1886
|
-1 === e && (e = 4294967295);
|
|
1930
|
-
e =
|
|
1931
|
-
var f = k => k;
|
|
1887
|
+
e = h => h;
|
|
1932
1888
|
if (0 === d) {
|
|
1933
|
-
var
|
|
1934
|
-
|
|
1889
|
+
var f = 32 - 8 * c;
|
|
1890
|
+
e = h => h << f >>> f;
|
|
1935
1891
|
}
|
|
1936
|
-
|
|
1937
|
-
return
|
|
1938
|
-
} : function(
|
|
1939
|
-
return
|
|
1892
|
+
var m = a.includes("unsigned") ? function(h, l) {
|
|
1893
|
+
return l >>> 0;
|
|
1894
|
+
} : function(h, l) {
|
|
1895
|
+
return l;
|
|
1940
1896
|
};
|
|
1941
|
-
|
|
1942
|
-
}, _embind_register_memory_view:
|
|
1897
|
+
Eb(b, {name:a, fromWireType:e, toWireType:m, argPackAdvance:8, readValueFromPointer:ic(a, c, 0 !== d), A:null,});
|
|
1898
|
+
}, _embind_register_memory_view:(b, a, c) => {
|
|
1943
1899
|
function d(f) {
|
|
1944
|
-
f
|
|
1945
|
-
var m = L;
|
|
1946
|
-
return new e(m.buffer, m[f + 1], m[f]);
|
|
1900
|
+
return new e(Ca.buffer, O[f + 4 >> 2], O[f >> 2]);
|
|
1947
1901
|
}
|
|
1948
1902
|
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][a];
|
|
1949
|
-
c =
|
|
1950
|
-
|
|
1951
|
-
}, _embind_register_std_string:
|
|
1952
|
-
a =
|
|
1903
|
+
c = T(c);
|
|
1904
|
+
Eb(b, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Ua:!0,});
|
|
1905
|
+
}, _embind_register_std_string:(b, a) => {
|
|
1906
|
+
a = T(a);
|
|
1953
1907
|
var c = "std::string" === a;
|
|
1954
|
-
|
|
1955
|
-
var e =
|
|
1908
|
+
Eb(b, {name:a, fromWireType:function(d) {
|
|
1909
|
+
var e = O[d >> 2], f = d + 4;
|
|
1956
1910
|
if (c) {
|
|
1957
|
-
for (var m = f,
|
|
1958
|
-
var
|
|
1959
|
-
if (
|
|
1960
|
-
m = m ?
|
|
1961
|
-
if (void 0 ===
|
|
1962
|
-
var
|
|
1911
|
+
for (var m = f, h = 0; h <= e; ++h) {
|
|
1912
|
+
var l = f + h;
|
|
1913
|
+
if (h == e || 0 == J[l]) {
|
|
1914
|
+
m = m ? oc(J, m, l - m) : "";
|
|
1915
|
+
if (void 0 === n) {
|
|
1916
|
+
var n = m;
|
|
1963
1917
|
} else {
|
|
1964
|
-
|
|
1918
|
+
n += String.fromCharCode(0), n += m;
|
|
1965
1919
|
}
|
|
1966
|
-
m =
|
|
1920
|
+
m = l + 1;
|
|
1967
1921
|
}
|
|
1968
1922
|
}
|
|
1969
1923
|
} else {
|
|
1970
|
-
|
|
1971
|
-
for (
|
|
1972
|
-
|
|
1924
|
+
n = Array(e);
|
|
1925
|
+
for (h = 0; h < e; ++h) {
|
|
1926
|
+
n[h] = String.fromCharCode(J[f + h]);
|
|
1973
1927
|
}
|
|
1974
|
-
|
|
1928
|
+
n = n.join("");
|
|
1975
1929
|
}
|
|
1976
|
-
|
|
1977
|
-
return
|
|
1930
|
+
jb(d);
|
|
1931
|
+
return n;
|
|
1978
1932
|
}, toWireType:function(d, e) {
|
|
1979
1933
|
e instanceof ArrayBuffer && (e = new Uint8Array(e));
|
|
1980
1934
|
var f = "string" == typeof e;
|
|
1981
|
-
f || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1935
|
+
if (!(f || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array)) {
|
|
1936
|
+
throw new Q("Cannot pass non-string to std::string");
|
|
1937
|
+
}
|
|
1938
|
+
var m = c && f ? kc(e) : e.length;
|
|
1939
|
+
var h = Oc(4 + m + 1), l = h + 4;
|
|
1940
|
+
O[h >> 2] = m;
|
|
1985
1941
|
if (c && f) {
|
|
1986
|
-
|
|
1942
|
+
jc(e, J, l, m + 1);
|
|
1987
1943
|
} else {
|
|
1988
1944
|
if (f) {
|
|
1989
1945
|
for (f = 0; f < m; ++f) {
|
|
1990
|
-
var
|
|
1991
|
-
255 <
|
|
1992
|
-
|
|
1946
|
+
var n = e.charCodeAt(f);
|
|
1947
|
+
if (255 < n) {
|
|
1948
|
+
throw jb(l), new Q("String has UTF-16 code units that do not fit in 8 bits");
|
|
1949
|
+
}
|
|
1950
|
+
J[l + f] = n;
|
|
1993
1951
|
}
|
|
1994
1952
|
} else {
|
|
1995
1953
|
for (f = 0; f < m; ++f) {
|
|
1996
|
-
J[
|
|
1954
|
+
J[l + f] = e[f];
|
|
1997
1955
|
}
|
|
1998
1956
|
}
|
|
1999
1957
|
}
|
|
2000
|
-
null !== d && d.push(
|
|
2001
|
-
return
|
|
2002
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
2003
|
-
|
|
1958
|
+
null !== d && d.push(jb, h);
|
|
1959
|
+
return h;
|
|
1960
|
+
}, argPackAdvance:8, readValueFromPointer:Bb, A(d) {
|
|
1961
|
+
jb(d);
|
|
2004
1962
|
},});
|
|
2005
|
-
}, _embind_register_std_wstring:
|
|
2006
|
-
c =
|
|
1963
|
+
}, _embind_register_std_wstring:(b, a, c) => {
|
|
1964
|
+
c = T(c);
|
|
2007
1965
|
if (2 === a) {
|
|
2008
|
-
var d =
|
|
2009
|
-
var e =
|
|
2010
|
-
var f =
|
|
2011
|
-
var m =
|
|
2012
|
-
var k = 1;
|
|
1966
|
+
var d = qc;
|
|
1967
|
+
var e = rc;
|
|
1968
|
+
var f = sc;
|
|
1969
|
+
var m = h => Ea[h >> 1];
|
|
2013
1970
|
} else {
|
|
2014
|
-
4 === a && (d =
|
|
1971
|
+
4 === a && (d = tc, e = uc, f = vc, m = h => O[h >> 2]);
|
|
2015
1972
|
}
|
|
2016
|
-
|
|
2017
|
-
for (var l =
|
|
2018
|
-
var
|
|
2019
|
-
if (
|
|
2020
|
-
|
|
1973
|
+
Eb(b, {name:c, fromWireType:h => {
|
|
1974
|
+
for (var l = O[h >> 2], n, r = h + 4, w = 0; w <= l; ++w) {
|
|
1975
|
+
var y = h + 4 + w * a;
|
|
1976
|
+
if (w == l || 0 == m(y)) {
|
|
1977
|
+
r = d(r, y - r), void 0 === n ? n = r : (n += String.fromCharCode(0), n += r), r = y + a;
|
|
2021
1978
|
}
|
|
2022
1979
|
}
|
|
2023
|
-
|
|
2024
|
-
return
|
|
2025
|
-
}, toWireType:
|
|
2026
|
-
"string" != typeof l
|
|
2027
|
-
|
|
2028
|
-
L[w >> 2] = t >> k;
|
|
2029
|
-
e(l, w + 4, t + a);
|
|
2030
|
-
null !== n && n.push(mb, w);
|
|
2031
|
-
return w;
|
|
2032
|
-
}, argPackAdvance:8, readValueFromPointer:Fb, v:function(n) {
|
|
2033
|
-
mb(n);
|
|
2034
|
-
},});
|
|
2035
|
-
}, _embind_register_value_object:function(b, a, c, d, e, f) {
|
|
2036
|
-
Db[b] = {name:U(a), fa:X(c, d), H:X(e, f), sa:[],};
|
|
2037
|
-
}, _embind_register_value_object_field:function(b, a, c, d, e, f, m, k, n, l) {
|
|
2038
|
-
Db[b].sa.push({Sa:U(a), Ya:c, Wa:X(d, e), Xa:f, lb:m, kb:X(k, n), mb:l,});
|
|
2039
|
-
}, _embind_register_void:function(b, a) {
|
|
2040
|
-
a = U(a);
|
|
2041
|
-
Ib(b, {cb:!0, name:a, argPackAdvance:0, fromWireType:function() {
|
|
2042
|
-
}, toWireType:function() {
|
|
2043
|
-
},});
|
|
2044
|
-
}, _emscripten_get_now_is_monotonic:() => !0, _emval_as:function(b, a, c) {
|
|
2045
|
-
b = R(b);
|
|
2046
|
-
a = nb(a, "emval::as");
|
|
2047
|
-
var d = [], e = S(d);
|
|
2048
|
-
L[c >> 2] = e;
|
|
2049
|
-
return a.toWireType(d, b);
|
|
2050
|
-
}, _emval_call_method:function(b, a, c, d, e) {
|
|
2051
|
-
b = xc[b];
|
|
2052
|
-
a = R(a);
|
|
2053
|
-
c = wc(c);
|
|
2054
|
-
var f = [];
|
|
2055
|
-
L[d >> 2] = S(f);
|
|
2056
|
-
return b(a, c, f, e);
|
|
2057
|
-
}, _emval_call_void_method:function(b, a, c, d) {
|
|
2058
|
-
b = xc[b];
|
|
2059
|
-
a = R(a);
|
|
2060
|
-
c = wc(c);
|
|
2061
|
-
b(a, c, null, d);
|
|
2062
|
-
}, _emval_decref:ec, _emval_get_method_caller:function(b, a) {
|
|
2063
|
-
var c = zc(b, a), d = c[0];
|
|
2064
|
-
a = d.name + "_$" + c.slice(1).map(function(m) {
|
|
2065
|
-
return m.name;
|
|
2066
|
-
}).join("_") + "$";
|
|
2067
|
-
var e = Ac[a];
|
|
2068
|
-
if (void 0 !== e) {
|
|
2069
|
-
return e;
|
|
2070
|
-
}
|
|
2071
|
-
var f = Array(b - 1);
|
|
2072
|
-
e = yc((m, k, n, l) => {
|
|
2073
|
-
for (var t = 0, w = 0; w < b - 1; ++w) {
|
|
2074
|
-
f[w] = c[w + 1].readValueFromPointer(l + t), t += c[w + 1].argPackAdvance;
|
|
2075
|
-
}
|
|
2076
|
-
m = m[k].apply(m, f);
|
|
2077
|
-
for (w = 0; w < b - 1; ++w) {
|
|
2078
|
-
c[w + 1].Na && c[w + 1].Na(f[w]);
|
|
1980
|
+
jb(h);
|
|
1981
|
+
return n;
|
|
1982
|
+
}, toWireType:(h, l) => {
|
|
1983
|
+
if ("string" != typeof l) {
|
|
1984
|
+
throw new Q(`Cannot pass non-string to C++ string type ${c}`);
|
|
2079
1985
|
}
|
|
2080
|
-
|
|
2081
|
-
|
|
1986
|
+
var n = f(l), r = Oc(4 + n + a);
|
|
1987
|
+
O[r >> 2] = n / a;
|
|
1988
|
+
e(l, r + 4, n + a);
|
|
1989
|
+
null !== h && h.push(jb, r);
|
|
1990
|
+
return r;
|
|
1991
|
+
}, argPackAdvance:8, readValueFromPointer:Bb, A(h) {
|
|
1992
|
+
jb(h);
|
|
1993
|
+
}});
|
|
1994
|
+
}, _embind_register_value_object:(b, a, c, d, e, f) => {
|
|
1995
|
+
zb[b] = {name:T(a), ea:Y(c, d), C:Y(e, f), ra:[],};
|
|
1996
|
+
}, _embind_register_value_object_field:(b, a, c, d, e, f, m, h, l, n) => {
|
|
1997
|
+
zb[b].ra.push({Na:T(a), Ta:c, Ra:Y(d, e), Sa:f, cb:m, bb:Y(h, l), eb:n,});
|
|
1998
|
+
}, _embind_register_void:(b, a) => {
|
|
1999
|
+
a = T(a);
|
|
2000
|
+
Eb(b, {lb:!0, name:a, argPackAdvance:0, fromWireType:() => {
|
|
2001
|
+
}, toWireType:() => {
|
|
2002
|
+
},});
|
|
2003
|
+
}, _emscripten_get_now_is_monotonic:() => 1, _emscripten_memcpy_js:(b, a, c) => J.copyWithin(b, a, a + c), _emval_as:(b, a, c) => {
|
|
2004
|
+
b = S(b);
|
|
2005
|
+
a = lb(a, "emval::as");
|
|
2006
|
+
return wc(a, c, b);
|
|
2007
|
+
}, _emval_call_method:(b, a, c, d, e) => {
|
|
2008
|
+
b = zc[b];
|
|
2009
|
+
a = S(a);
|
|
2010
|
+
c = yc(c);
|
|
2011
|
+
return b(a, a[c], d, e);
|
|
2012
|
+
}, _emval_decref:ec, _emval_get_method_caller:(b, a, c) => {
|
|
2013
|
+
var d = Bc(b, a), e = d.shift();
|
|
2014
|
+
b--;
|
|
2015
|
+
var f = Array(b);
|
|
2016
|
+
a = `methodCaller<(${d.map(m => m.name).join(", ")}) => ${e.name}>`;
|
|
2017
|
+
return Ac(Xa(a, (m, h, l, n) => {
|
|
2018
|
+
for (var r = 0, w = 0; w < b; ++w) {
|
|
2019
|
+
f[w] = d[w].readValueFromPointer(n + r), r += d[w].argPackAdvance;
|
|
2082
2020
|
}
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
}, _emval_new_object:function() {
|
|
2099
|
-
return S({});
|
|
2100
|
-
}, _emval_run_destructors:function(b) {
|
|
2101
|
-
var a = R(b);
|
|
2102
|
-
Eb(a);
|
|
2021
|
+
m = 1 === c ? Cc(h, f) : h.apply(m, f);
|
|
2022
|
+
return wc(e, l, m);
|
|
2023
|
+
}));
|
|
2024
|
+
}, _emval_get_module_property:b => {
|
|
2025
|
+
b = yc(b);
|
|
2026
|
+
return Za(k[b]);
|
|
2027
|
+
}, _emval_get_property:(b, a) => {
|
|
2028
|
+
b = S(b);
|
|
2029
|
+
a = S(a);
|
|
2030
|
+
return Za(b[a]);
|
|
2031
|
+
}, _emval_incref:b => {
|
|
2032
|
+
9 < b && (P[b + 1] += 1);
|
|
2033
|
+
}, _emval_new_array:() => Za([]), _emval_new_cstring:b => Za(yc(b)), _emval_new_object:() => Za({}), _emval_run_destructors:b => {
|
|
2034
|
+
var a = S(b);
|
|
2035
|
+
Ab(a);
|
|
2103
2036
|
ec(b);
|
|
2104
|
-
}, _emval_set_property:
|
|
2105
|
-
b =
|
|
2106
|
-
a =
|
|
2107
|
-
c =
|
|
2037
|
+
}, _emval_set_property:(b, a, c) => {
|
|
2038
|
+
b = S(b);
|
|
2039
|
+
a = S(a);
|
|
2040
|
+
c = S(c);
|
|
2108
2041
|
b[a] = c;
|
|
2109
|
-
}, _emval_take_value:
|
|
2110
|
-
b =
|
|
2042
|
+
}, _emval_take_value:(b, a) => {
|
|
2043
|
+
b = lb(b, "_emval_take_value");
|
|
2111
2044
|
b = b.readValueFromPointer(a);
|
|
2112
|
-
return
|
|
2113
|
-
},
|
|
2114
|
-
za("");
|
|
2115
|
-
}, emscripten_date_now:function() {
|
|
2116
|
-
return Date.now();
|
|
2117
|
-
}, emscripten_get_now:() => performance.now(), emscripten_memcpy_big:(b, a, c) => J.copyWithin(b, a, a + c), emscripten_resize_heap:b => {
|
|
2045
|
+
return Za(b);
|
|
2046
|
+
}, emscripten_date_now:() => Date.now(), emscripten_get_now:() => performance.now(), emscripten_resize_heap:b => {
|
|
2118
2047
|
var a = J.length;
|
|
2119
2048
|
b >>>= 0;
|
|
2120
2049
|
if (2147483648 < b) {
|
|
@@ -2126,7 +2055,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2126
2055
|
var e = Math;
|
|
2127
2056
|
d = Math.max(b, d);
|
|
2128
2057
|
a: {
|
|
2129
|
-
e = e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536) - Aa.buffer.byteLength + 65535
|
|
2058
|
+
e = (e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536) - Aa.buffer.byteLength + 65535) / 65536;
|
|
2130
2059
|
try {
|
|
2131
2060
|
Aa.grow(e);
|
|
2132
2061
|
Ha();
|
|
@@ -2143,136 +2072,129 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2143
2072
|
return !1;
|
|
2144
2073
|
}, environ_get:(b, a) => {
|
|
2145
2074
|
var c = 0;
|
|
2146
|
-
|
|
2075
|
+
Fc().forEach((d, e) => {
|
|
2147
2076
|
var f = a + c;
|
|
2148
|
-
e =
|
|
2077
|
+
e = O[b + 4 * e >> 2] = f;
|
|
2149
2078
|
for (f = 0; f < d.length; ++f) {
|
|
2150
|
-
Ca[e++
|
|
2079
|
+
Ca[e++] = d.charCodeAt(f);
|
|
2151
2080
|
}
|
|
2152
|
-
Ca[e
|
|
2081
|
+
Ca[e] = 0;
|
|
2153
2082
|
c += d.length + 1;
|
|
2154
2083
|
});
|
|
2155
2084
|
return 0;
|
|
2156
2085
|
}, environ_sizes_get:(b, a) => {
|
|
2157
|
-
var c =
|
|
2158
|
-
|
|
2086
|
+
var c = Fc();
|
|
2087
|
+
O[b >> 2] = c.length;
|
|
2159
2088
|
var d = 0;
|
|
2160
|
-
c.forEach(
|
|
2161
|
-
|
|
2162
|
-
});
|
|
2163
|
-
L[a >> 2] = d;
|
|
2089
|
+
c.forEach(e => d += e.length + 1);
|
|
2090
|
+
O[a >> 2] = d;
|
|
2164
2091
|
return 0;
|
|
2165
2092
|
}, fd_close:() => 52, fd_seek:function() {
|
|
2166
2093
|
return 70;
|
|
2167
2094
|
}, fd_write:(b, a, c, d) => {
|
|
2168
2095
|
for (var e = 0, f = 0; f < c; f++) {
|
|
2169
|
-
var m =
|
|
2096
|
+
var m = O[a >> 2], h = O[a + 4 >> 2];
|
|
2170
2097
|
a += 8;
|
|
2171
|
-
for (var
|
|
2172
|
-
var
|
|
2173
|
-
0 ===
|
|
2098
|
+
for (var l = 0; l < h; l++) {
|
|
2099
|
+
var n = J[m + l], r = Gc[b];
|
|
2100
|
+
0 === n || 10 === n ? ((1 === b ? xa : ya)(oc(r, 0)), r.length = 0) : r.push(n);
|
|
2174
2101
|
}
|
|
2175
|
-
e +=
|
|
2102
|
+
e += h;
|
|
2176
2103
|
}
|
|
2177
|
-
|
|
2104
|
+
O[d >> 2] = e;
|
|
2178
2105
|
return 0;
|
|
2179
|
-
}, strftime_l:(b, a, c, d) =>
|
|
2180
|
-
(function() {
|
|
2106
|
+
}, strftime_l:(b, a, c, d) => Lc(b, a, c, d)}, Z = function() {
|
|
2181
2107
|
function b(c) {
|
|
2182
|
-
|
|
2183
|
-
Aa =
|
|
2108
|
+
Z = c.exports;
|
|
2109
|
+
Aa = Z.memory;
|
|
2184
2110
|
Ha();
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
Pa = null;
|
|
2192
|
-
d();
|
|
2193
|
-
}
|
|
2194
|
-
return c;
|
|
2111
|
+
Ub = Z.__indirect_function_table;
|
|
2112
|
+
Ja.unshift(Z.__wasm_call_ctors);
|
|
2113
|
+
Ma--;
|
|
2114
|
+
k.monitorRunDependencies?.(Ma);
|
|
2115
|
+
0 == Ma && (null !== Na && (clearInterval(Na), Na = null), Oa && (c = Oa, Oa = null, c()));
|
|
2116
|
+
return Z;
|
|
2195
2117
|
}
|
|
2196
|
-
var a = {env:
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
if (
|
|
2118
|
+
var a = {env:Pc, wasi_snapshot_preview1:Pc,};
|
|
2119
|
+
Ma++;
|
|
2120
|
+
k.monitorRunDependencies?.(Ma);
|
|
2121
|
+
if (k.instantiateWasm) {
|
|
2200
2122
|
try {
|
|
2201
|
-
return
|
|
2123
|
+
return k.instantiateWasm(a, b);
|
|
2202
2124
|
} catch (c) {
|
|
2203
|
-
|
|
2125
|
+
ya(`Module.instantiateWasm callback failed with error: ${c}`), ba(c);
|
|
2204
2126
|
}
|
|
2205
2127
|
}
|
|
2206
|
-
|
|
2128
|
+
Ra ||= Qa("canvas_advanced.wasm") ? "canvas_advanced.wasm" : k.locateFile ? k.locateFile("canvas_advanced.wasm", x) : x + "canvas_advanced.wasm";
|
|
2129
|
+
Va(a, function(c) {
|
|
2207
2130
|
b(c.instance);
|
|
2208
2131
|
}).catch(ba);
|
|
2209
2132
|
return {};
|
|
2210
|
-
})();
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
Oc || Qc();
|
|
2221
|
-
Oc || (Pa = Pc);
|
|
2133
|
+
}(), jb = b => (jb = Z.free)(b), Oc = b => (Oc = Z.malloc)(b), ib = b => (ib = Z.__getTypeName)(b);
|
|
2134
|
+
k.dynCall_jiji = (b, a, c, d, e) => (k.dynCall_jiji = Z.dynCall_jiji)(b, a, c, d, e);
|
|
2135
|
+
k.dynCall_viijii = (b, a, c, d, e, f, m) => (k.dynCall_viijii = Z.dynCall_viijii)(b, a, c, d, e, f, m);
|
|
2136
|
+
k.dynCall_iiiiij = (b, a, c, d, e, f, m) => (k.dynCall_iiiiij = Z.dynCall_iiiiij)(b, a, c, d, e, f, m);
|
|
2137
|
+
k.dynCall_iiiiijj = (b, a, c, d, e, f, m, h, l) => (k.dynCall_iiiiijj = Z.dynCall_iiiiijj)(b, a, c, d, e, f, m, h, l);
|
|
2138
|
+
k.dynCall_iiiiiijj = (b, a, c, d, e, f, m, h, l, n) => (k.dynCall_iiiiiijj = Z.dynCall_iiiiiijj)(b, a, c, d, e, f, m, h, l, n);
|
|
2139
|
+
var Qc;
|
|
2140
|
+
Oa = function Rc() {
|
|
2141
|
+
Qc || Sc();
|
|
2142
|
+
Qc || (Oa = Rc);
|
|
2222
2143
|
};
|
|
2223
|
-
function
|
|
2144
|
+
function Sc() {
|
|
2224
2145
|
function b() {
|
|
2225
|
-
if (!
|
|
2226
|
-
|
|
2227
|
-
aa(
|
|
2228
|
-
if (
|
|
2229
|
-
|
|
2146
|
+
if (!Qc && (Qc = !0, k.calledRun = !0, !Ba)) {
|
|
2147
|
+
Wa(Ja);
|
|
2148
|
+
aa(k);
|
|
2149
|
+
if (k.onRuntimeInitialized) {
|
|
2150
|
+
k.onRuntimeInitialized();
|
|
2230
2151
|
}
|
|
2231
|
-
if (
|
|
2232
|
-
for ("function" == typeof
|
|
2233
|
-
var a =
|
|
2234
|
-
|
|
2152
|
+
if (k.postRun) {
|
|
2153
|
+
for ("function" == typeof k.postRun && (k.postRun = [k.postRun]); k.postRun.length;) {
|
|
2154
|
+
var a = k.postRun.shift();
|
|
2155
|
+
Ka.unshift(a);
|
|
2235
2156
|
}
|
|
2236
2157
|
}
|
|
2237
|
-
|
|
2158
|
+
Wa(Ka);
|
|
2238
2159
|
}
|
|
2239
2160
|
}
|
|
2240
|
-
if (!(0 <
|
|
2241
|
-
if (
|
|
2242
|
-
for ("function" == typeof
|
|
2243
|
-
|
|
2161
|
+
if (!(0 < Ma)) {
|
|
2162
|
+
if (k.preRun) {
|
|
2163
|
+
for ("function" == typeof k.preRun && (k.preRun = [k.preRun]); k.preRun.length;) {
|
|
2164
|
+
La();
|
|
2244
2165
|
}
|
|
2245
2166
|
}
|
|
2246
|
-
|
|
2247
|
-
0 <
|
|
2167
|
+
Wa(Ia);
|
|
2168
|
+
0 < Ma || (k.setStatus ? (k.setStatus("Running..."), setTimeout(function() {
|
|
2248
2169
|
setTimeout(function() {
|
|
2249
|
-
|
|
2170
|
+
k.setStatus("");
|
|
2250
2171
|
}, 1);
|
|
2251
2172
|
b();
|
|
2252
2173
|
}, 1)) : b());
|
|
2253
2174
|
}
|
|
2254
2175
|
}
|
|
2255
|
-
if (
|
|
2256
|
-
for ("function" == typeof
|
|
2257
|
-
|
|
2176
|
+
if (k.preInit) {
|
|
2177
|
+
for ("function" == typeof k.preInit && (k.preInit = [k.preInit]); 0 < k.preInit.length;) {
|
|
2178
|
+
k.preInit.pop()();
|
|
2258
2179
|
}
|
|
2259
2180
|
}
|
|
2260
|
-
|
|
2181
|
+
Sc();
|
|
2182
|
+
moduleRtn = ca;
|
|
2261
2183
|
|
|
2262
2184
|
|
|
2263
2185
|
|
|
2264
|
-
return
|
|
2186
|
+
return moduleRtn;
|
|
2265
2187
|
}
|
|
2266
|
-
|
|
2267
2188
|
);
|
|
2268
2189
|
})();
|
|
2269
2190
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Rive);
|
|
2270
2191
|
|
|
2192
|
+
|
|
2271
2193
|
/***/ }),
|
|
2272
2194
|
/* 2 */
|
|
2273
2195
|
/***/ ((module) => {
|
|
2274
2196
|
|
|
2275
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.
|
|
2197
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.32.1","description":"A lite version of Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
2276
2198
|
|
|
2277
2199
|
/***/ }),
|
|
2278
2200
|
/* 3 */
|
|
@@ -2453,40 +2375,61 @@ var _this = undefined;
|
|
|
2453
2375
|
* @param event - Either a TouchEvent or a MouseEvent
|
|
2454
2376
|
* @returns - Coordinates of the clientX and clientY properties from the touch/mouse event
|
|
2455
2377
|
*/
|
|
2456
|
-
var getClientCoordinates = function (event, isTouchScrollEnabled) {
|
|
2378
|
+
var getClientCoordinates = function (event, isTouchScrollEnabled, enableMultiTouch) {
|
|
2457
2379
|
var _a, _b;
|
|
2380
|
+
var coordinates = [];
|
|
2458
2381
|
if (["touchstart", "touchmove"].indexOf(event.type) > -1 &&
|
|
2459
|
-
((_a = event.
|
|
2382
|
+
((_a = event.changedTouches) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
2460
2383
|
// This flag, if false, prevents touch events on the canvas default behavior
|
|
2461
2384
|
// which may prevent scrolling if a drag motion on the canvas is performed
|
|
2462
2385
|
if (!isTouchScrollEnabled) {
|
|
2463
2386
|
event.preventDefault();
|
|
2464
2387
|
}
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2388
|
+
var cnt = 0;
|
|
2389
|
+
var totalTouches = enableMultiTouch
|
|
2390
|
+
? event.changedTouches.length
|
|
2391
|
+
: 1;
|
|
2392
|
+
while (cnt < totalTouches) {
|
|
2393
|
+
var touch = event.changedTouches[cnt];
|
|
2394
|
+
coordinates.push({
|
|
2395
|
+
clientX: touch.clientX,
|
|
2396
|
+
clientY: touch.clientY,
|
|
2397
|
+
identifier: touch.identifier,
|
|
2398
|
+
});
|
|
2399
|
+
cnt++;
|
|
2400
|
+
}
|
|
2469
2401
|
}
|
|
2470
2402
|
else if (event.type === "touchend" &&
|
|
2471
2403
|
((_b = event.changedTouches) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2404
|
+
var cnt = 0;
|
|
2405
|
+
var totalTouches = enableMultiTouch
|
|
2406
|
+
? event.changedTouches.length
|
|
2407
|
+
: 1;
|
|
2408
|
+
while (cnt < totalTouches) {
|
|
2409
|
+
var touch = event.changedTouches[cnt];
|
|
2410
|
+
coordinates.push({
|
|
2411
|
+
clientX: touch.clientX,
|
|
2412
|
+
clientY: touch.clientY,
|
|
2413
|
+
identifier: touch.identifier,
|
|
2414
|
+
});
|
|
2415
|
+
cnt++;
|
|
2416
|
+
}
|
|
2476
2417
|
}
|
|
2477
2418
|
else {
|
|
2478
|
-
|
|
2419
|
+
coordinates.push({
|
|
2479
2420
|
clientX: event.clientX,
|
|
2480
2421
|
clientY: event.clientY,
|
|
2481
|
-
|
|
2422
|
+
identifier: 0,
|
|
2423
|
+
});
|
|
2482
2424
|
}
|
|
2425
|
+
return coordinates;
|
|
2483
2426
|
};
|
|
2484
2427
|
/**
|
|
2485
2428
|
* Registers mouse move/up/down callback handlers on the canvas to send meaningful coordinates to
|
|
2486
2429
|
* the state machine pointer move/up/down functions based on cursor interaction
|
|
2487
2430
|
*/
|
|
2488
2431
|
var registerTouchInteractions = function (_a) {
|
|
2489
|
-
var canvas = _a.canvas, artboard = _a.artboard, _b = _a.stateMachines, stateMachines = _b === void 0 ? [] : _b, renderer = _a.renderer, rive = _a.rive, fit = _a.fit, alignment = _a.alignment, _c = _a.isTouchScrollEnabled, isTouchScrollEnabled = _c === void 0 ? false : _c, _d = _a.layoutScaleFactor, layoutScaleFactor =
|
|
2432
|
+
var canvas = _a.canvas, artboard = _a.artboard, _b = _a.stateMachines, stateMachines = _b === void 0 ? [] : _b, renderer = _a.renderer, rive = _a.rive, fit = _a.fit, alignment = _a.alignment, _c = _a.isTouchScrollEnabled, isTouchScrollEnabled = _c === void 0 ? false : _c, _d = _a.dispatchPointerExit, dispatchPointerExit = _d === void 0 ? true : _d, _e = _a.enableMultiTouch, enableMultiTouch = _e === void 0 ? false : _e, _f = _a.layoutScaleFactor, layoutScaleFactor = _f === void 0 ? 1.0 : _f;
|
|
2490
2433
|
if (!canvas ||
|
|
2491
2434
|
!stateMachines.length ||
|
|
2492
2435
|
!renderer ||
|
|
@@ -2530,12 +2473,7 @@ var registerTouchInteractions = function (_a) {
|
|
|
2530
2473
|
_prevEventType === "touchstart";
|
|
2531
2474
|
_prevEventType = event.type;
|
|
2532
2475
|
var boundingRect = event.currentTarget.getBoundingClientRect();
|
|
2533
|
-
var
|
|
2534
|
-
if (!clientX && !clientY) {
|
|
2535
|
-
return;
|
|
2536
|
-
}
|
|
2537
|
-
var canvasX = clientX - boundingRect.left;
|
|
2538
|
-
var canvasY = clientY - boundingRect.top;
|
|
2476
|
+
var coordinateSets = getClientCoordinates(event, isTouchScrollEnabled, enableMultiTouch);
|
|
2539
2477
|
var forwardMatrix = rive.computeAlignment(fit, alignment, {
|
|
2540
2478
|
minX: 0,
|
|
2541
2479
|
minY: 0,
|
|
@@ -2544,13 +2482,24 @@ var registerTouchInteractions = function (_a) {
|
|
|
2544
2482
|
}, artboard.bounds, layoutScaleFactor);
|
|
2545
2483
|
var invertedMatrix = new rive.Mat2D();
|
|
2546
2484
|
forwardMatrix.invert(invertedMatrix);
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2485
|
+
coordinateSets.forEach(function (coordinateSet) {
|
|
2486
|
+
var clientX = coordinateSet.clientX;
|
|
2487
|
+
var clientY = coordinateSet.clientY;
|
|
2488
|
+
if (!clientX && !clientY) {
|
|
2489
|
+
return;
|
|
2490
|
+
}
|
|
2491
|
+
var canvasX = clientX - boundingRect.left;
|
|
2492
|
+
var canvasY = clientY - boundingRect.top;
|
|
2493
|
+
var canvasCoordinatesVector = new rive.Vec2D(canvasX, canvasY);
|
|
2494
|
+
var transformedVector = rive.mapXY(invertedMatrix, canvasCoordinatesVector);
|
|
2495
|
+
var transformedX = transformedVector.x();
|
|
2496
|
+
var transformedY = transformedVector.y();
|
|
2497
|
+
coordinateSet.transformedX = transformedX;
|
|
2498
|
+
coordinateSet.transformedY = transformedY;
|
|
2499
|
+
transformedVector.delete();
|
|
2500
|
+
canvasCoordinatesVector.delete();
|
|
2501
|
+
});
|
|
2552
2502
|
invertedMatrix.delete();
|
|
2553
|
-
canvasCoordinatesVector.delete();
|
|
2554
2503
|
forwardMatrix.delete();
|
|
2555
2504
|
switch (event.type) {
|
|
2556
2505
|
/**
|
|
@@ -2561,41 +2510,77 @@ var registerTouchInteractions = function (_a) {
|
|
|
2561
2510
|
* to ensure that we report the mouse has truly exited the hitarea.
|
|
2562
2511
|
* https://github.com/rive-app/rive-cpp/blob/master/src/animation/state_machine_instance.cpp#L336
|
|
2563
2512
|
*
|
|
2564
|
-
* We add/subtract 10000 to account for when the graphic goes beyond the canvas bound
|
|
2565
|
-
* due to for example, a fit: 'cover'. Not perfect, but helps reliably (for now) ensure
|
|
2566
|
-
* we report going out of bounds when the mouse is out of the canvas
|
|
2567
2513
|
*/
|
|
2568
2514
|
case "mouseout":
|
|
2515
|
+
var _loop_1 = function (stateMachine) {
|
|
2516
|
+
if (dispatchPointerExit) {
|
|
2517
|
+
coordinateSets.forEach(function (coordinateSet) {
|
|
2518
|
+
stateMachine.pointerExit(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2519
|
+
});
|
|
2520
|
+
}
|
|
2521
|
+
else {
|
|
2522
|
+
coordinateSets.forEach(function (coordinateSet) {
|
|
2523
|
+
stateMachine.pointerMove(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2524
|
+
});
|
|
2525
|
+
}
|
|
2526
|
+
};
|
|
2569
2527
|
for (var _i = 0, stateMachines_1 = stateMachines; _i < stateMachines_1.length; _i++) {
|
|
2570
2528
|
var stateMachine = stateMachines_1[_i];
|
|
2571
|
-
stateMachine
|
|
2529
|
+
_loop_1(stateMachine);
|
|
2572
2530
|
}
|
|
2573
2531
|
break;
|
|
2574
2532
|
// Pointer moving/hovering on the canvas
|
|
2575
2533
|
case "touchmove":
|
|
2576
2534
|
case "mouseover":
|
|
2577
2535
|
case "mousemove": {
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2536
|
+
var _loop_2 = function (stateMachine) {
|
|
2537
|
+
coordinateSets.forEach(function (coordinateSet) {
|
|
2538
|
+
stateMachine.pointerMove(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2539
|
+
});
|
|
2540
|
+
};
|
|
2541
|
+
for (var _a = 0, stateMachines_2 = stateMachines; _a < stateMachines_2.length; _a++) {
|
|
2542
|
+
var stateMachine = stateMachines_2[_a];
|
|
2543
|
+
_loop_2(stateMachine);
|
|
2581
2544
|
}
|
|
2582
2545
|
break;
|
|
2583
2546
|
}
|
|
2584
2547
|
// Pointer click initiated but not released yet on the canvas
|
|
2585
2548
|
case "touchstart":
|
|
2586
2549
|
case "mousedown": {
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2550
|
+
var _loop_3 = function (stateMachine) {
|
|
2551
|
+
coordinateSets.forEach(function (coordinateSet) {
|
|
2552
|
+
stateMachine.pointerDown(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2553
|
+
});
|
|
2554
|
+
};
|
|
2555
|
+
for (var _b = 0, stateMachines_3 = stateMachines; _b < stateMachines_3.length; _b++) {
|
|
2556
|
+
var stateMachine = stateMachines_3[_b];
|
|
2557
|
+
_loop_3(stateMachine);
|
|
2590
2558
|
}
|
|
2591
2559
|
break;
|
|
2592
2560
|
}
|
|
2593
2561
|
// Pointer click released on the canvas
|
|
2594
|
-
case "touchend":
|
|
2562
|
+
case "touchend": {
|
|
2563
|
+
var _loop_4 = function (stateMachine) {
|
|
2564
|
+
coordinateSets.forEach(function (coordinateSet) {
|
|
2565
|
+
stateMachine.pointerUp(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2566
|
+
stateMachine.pointerExit(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2567
|
+
});
|
|
2568
|
+
};
|
|
2569
|
+
for (var _c = 0, stateMachines_4 = stateMachines; _c < stateMachines_4.length; _c++) {
|
|
2570
|
+
var stateMachine = stateMachines_4[_c];
|
|
2571
|
+
_loop_4(stateMachine);
|
|
2572
|
+
}
|
|
2573
|
+
break;
|
|
2574
|
+
}
|
|
2595
2575
|
case "mouseup": {
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2576
|
+
var _loop_5 = function (stateMachine) {
|
|
2577
|
+
coordinateSets.forEach(function (coordinateSet) {
|
|
2578
|
+
stateMachine.pointerUp(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2579
|
+
});
|
|
2580
|
+
};
|
|
2581
|
+
for (var _d = 0, stateMachines_5 = stateMachines; _d < stateMachines_5.length; _d++) {
|
|
2582
|
+
var stateMachine = stateMachines_5[_d];
|
|
2583
|
+
_loop_5(stateMachine);
|
|
2599
2584
|
}
|
|
2600
2585
|
break;
|
|
2601
2586
|
}
|
|
@@ -3420,12 +3405,38 @@ var RiveEventType;
|
|
|
3420
3405
|
RiveEventType[RiveEventType["General"] = 128] = "General";
|
|
3421
3406
|
RiveEventType[RiveEventType["OpenUrl"] = 131] = "OpenUrl";
|
|
3422
3407
|
})(RiveEventType || (RiveEventType = {}));
|
|
3423
|
-
var
|
|
3424
|
-
function
|
|
3425
|
-
this.
|
|
3408
|
+
var BaseArtboard = /** @class */ (function () {
|
|
3409
|
+
function BaseArtboard(_isBindableArtboard) {
|
|
3410
|
+
this.isBindableArtboard = false;
|
|
3411
|
+
this.isBindableArtboard = _isBindableArtboard;
|
|
3426
3412
|
}
|
|
3427
|
-
return
|
|
3413
|
+
return BaseArtboard;
|
|
3428
3414
|
}());
|
|
3415
|
+
var Artboard = /** @class */ (function (_super) {
|
|
3416
|
+
__extends(Artboard, _super);
|
|
3417
|
+
function Artboard(artboard, _file) {
|
|
3418
|
+
var _this = _super.call(this, false) || this;
|
|
3419
|
+
_this.nativeArtboard = artboard;
|
|
3420
|
+
_this.file = _file;
|
|
3421
|
+
return _this;
|
|
3422
|
+
}
|
|
3423
|
+
return Artboard;
|
|
3424
|
+
}(BaseArtboard));
|
|
3425
|
+
var BindableArtboard = /** @class */ (function (_super) {
|
|
3426
|
+
__extends(BindableArtboard, _super);
|
|
3427
|
+
function BindableArtboard(artboard) {
|
|
3428
|
+
var _this = _super.call(this, true) || this;
|
|
3429
|
+
_this.selfUnref = false;
|
|
3430
|
+
_this.nativeArtboard = artboard;
|
|
3431
|
+
return _this;
|
|
3432
|
+
}
|
|
3433
|
+
BindableArtboard.prototype.destroy = function () {
|
|
3434
|
+
if (this.selfUnref) {
|
|
3435
|
+
this.nativeArtboard.unref();
|
|
3436
|
+
}
|
|
3437
|
+
};
|
|
3438
|
+
return BindableArtboard;
|
|
3439
|
+
}(BaseArtboard));
|
|
3429
3440
|
var StateMachine = /** @class */ (function () {
|
|
3430
3441
|
/**
|
|
3431
3442
|
* @constructor
|
|
@@ -4258,6 +4269,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
4258
4269
|
this.referenceCount = 0;
|
|
4259
4270
|
this.destroyed = false;
|
|
4260
4271
|
this.selfUnref = false;
|
|
4272
|
+
this.bindableArtboards = [];
|
|
4261
4273
|
this.src = params.src;
|
|
4262
4274
|
this.buffer = params.buffer;
|
|
4263
4275
|
if (params.assetLoader)
|
|
@@ -4280,6 +4292,11 @@ var RiveFile = /** @class */ (function () {
|
|
|
4280
4292
|
}
|
|
4281
4293
|
this.file = null;
|
|
4282
4294
|
};
|
|
4295
|
+
RiveFile.prototype.releaseBindableArtboards = function () {
|
|
4296
|
+
this.bindableArtboards.forEach(function (bindableArtboard) {
|
|
4297
|
+
return bindableArtboard.destroy();
|
|
4298
|
+
});
|
|
4299
|
+
};
|
|
4283
4300
|
RiveFile.prototype.initData = function () {
|
|
4284
4301
|
return __awaiter(this, void 0, void 0, function () {
|
|
4285
4302
|
var _a, loader, loaderWrapper, _b, fileFinalizer;
|
|
@@ -4394,6 +4411,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
4394
4411
|
if (this.referenceCount <= 0) {
|
|
4395
4412
|
this.removeAllRiveEventListeners();
|
|
4396
4413
|
this.releaseFile();
|
|
4414
|
+
this.releaseBindableArtboards();
|
|
4397
4415
|
this.destroyed = true;
|
|
4398
4416
|
}
|
|
4399
4417
|
};
|
|
@@ -4417,12 +4435,38 @@ var RiveFile = /** @class */ (function () {
|
|
|
4417
4435
|
this.cleanup();
|
|
4418
4436
|
}
|
|
4419
4437
|
};
|
|
4438
|
+
RiveFile.prototype.createBindableArtboard = function (nativeBindableArtboard) {
|
|
4439
|
+
if (nativeBindableArtboard != null) {
|
|
4440
|
+
var bindableArtboard = new BindableArtboard(nativeBindableArtboard);
|
|
4441
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.createFinalization)(bindableArtboard, bindableArtboard.nativeArtboard);
|
|
4442
|
+
this.bindableArtboards.push(bindableArtboard);
|
|
4443
|
+
return bindableArtboard;
|
|
4444
|
+
}
|
|
4445
|
+
return null;
|
|
4446
|
+
};
|
|
4447
|
+
/**
|
|
4448
|
+
* @deprecated This function is deprecated. For better stability and memory management
|
|
4449
|
+
* use `getBindableArtboard()` instead.
|
|
4450
|
+
* @param {string} name - The name of the artboard.
|
|
4451
|
+
* @returns {Artboard} The artboard to bind to.
|
|
4452
|
+
*/
|
|
4420
4453
|
RiveFile.prototype.getArtboard = function (name) {
|
|
4421
4454
|
var nativeArtboard = this.file.artboardByName(name);
|
|
4422
4455
|
if (nativeArtboard != null) {
|
|
4423
|
-
return new Artboard(nativeArtboard);
|
|
4456
|
+
return new Artboard(nativeArtboard, this);
|
|
4424
4457
|
}
|
|
4425
|
-
|
|
4458
|
+
};
|
|
4459
|
+
RiveFile.prototype.getBindableArtboard = function (name) {
|
|
4460
|
+
var nativeArtboard = this.file.bindableArtboardByName(name);
|
|
4461
|
+
return this.createBindableArtboard(nativeArtboard);
|
|
4462
|
+
};
|
|
4463
|
+
RiveFile.prototype.getDefaultBindableArtboard = function () {
|
|
4464
|
+
var nativeArtboard = this.file.bindableArtboardDefault();
|
|
4465
|
+
return this.createBindableArtboard(nativeArtboard);
|
|
4466
|
+
};
|
|
4467
|
+
RiveFile.prototype.internalBindableArtboardFromArtboard = function (artboard) {
|
|
4468
|
+
var nativeBindableArtboard = this.file.internalBindableArtboardFromArtboard(artboard);
|
|
4469
|
+
return this.createBindableArtboard(nativeBindableArtboard);
|
|
4426
4470
|
};
|
|
4427
4471
|
// Error message for missing source or buffer
|
|
4428
4472
|
RiveFile.missingErrorMessage = "Rive source file or data buffer required";
|
|
@@ -4455,6 +4499,9 @@ var Rive = /** @class */ (function () {
|
|
|
4455
4499
|
this.eventCleanup = null;
|
|
4456
4500
|
this.shouldDisableRiveListeners = false;
|
|
4457
4501
|
this.automaticallyHandleEvents = false;
|
|
4502
|
+
this.dispatchPointerExit = true;
|
|
4503
|
+
// Allow all pointers to be passed to the runtime
|
|
4504
|
+
this.enableMultiTouch = false;
|
|
4458
4505
|
// Allow the runtime to automatically load assets hosted in Rive's runtime.
|
|
4459
4506
|
this.enableRiveAssetCDN = true;
|
|
4460
4507
|
// Keep a local value of the set volume to update it asynchronously
|
|
@@ -4507,6 +4554,11 @@ var Rive = /** @class */ (function () {
|
|
|
4507
4554
|
this.shouldDisableRiveListeners = !!params.shouldDisableRiveListeners;
|
|
4508
4555
|
this.isTouchScrollEnabled = !!params.isTouchScrollEnabled;
|
|
4509
4556
|
this.automaticallyHandleEvents = !!params.automaticallyHandleEvents;
|
|
4557
|
+
this.dispatchPointerExit =
|
|
4558
|
+
params.dispatchPointerExit === false
|
|
4559
|
+
? params.dispatchPointerExit
|
|
4560
|
+
: this.dispatchPointerExit;
|
|
4561
|
+
this.enableMultiTouch = !!params.enableMultiTouch;
|
|
4510
4562
|
this.enableRiveAssetCDN =
|
|
4511
4563
|
params.enableRiveAssetCDN === undefined
|
|
4512
4564
|
? true
|
|
@@ -4649,6 +4701,8 @@ var Rive = /** @class */ (function () {
|
|
|
4649
4701
|
.filter(function (sm) { return sm.playing && _this.runtime.hasListeners(sm.instance); })
|
|
4650
4702
|
.map(function (sm) { return sm.instance; });
|
|
4651
4703
|
var touchScrollEnabledOption = this.isTouchScrollEnabled;
|
|
4704
|
+
var dispatchPointerExit = this.dispatchPointerExit;
|
|
4705
|
+
var enableMultiTouch = this.enableMultiTouch;
|
|
4652
4706
|
if (riveListenerOptions &&
|
|
4653
4707
|
"isTouchScrollEnabled" in riveListenerOptions) {
|
|
4654
4708
|
touchScrollEnabledOption = riveListenerOptions.isTouchScrollEnabled;
|
|
@@ -4662,6 +4716,8 @@ var Rive = /** @class */ (function () {
|
|
|
4662
4716
|
fit: this._layout.runtimeFit(this.runtime),
|
|
4663
4717
|
alignment: this._layout.runtimeAlignment(this.runtime),
|
|
4664
4718
|
isTouchScrollEnabled: touchScrollEnabledOption,
|
|
4719
|
+
dispatchPointerExit: dispatchPointerExit,
|
|
4720
|
+
enableMultiTouch: enableMultiTouch,
|
|
4665
4721
|
layoutScaleFactor: this._layout.layoutScaleFactor,
|
|
4666
4722
|
});
|
|
4667
4723
|
}
|
|
@@ -4811,6 +4867,7 @@ var Rive = /** @class */ (function () {
|
|
|
4811
4867
|
var runtimeInstance = viewModel.defaultInstance();
|
|
4812
4868
|
if (runtimeInstance !== null) {
|
|
4813
4869
|
var viewModelInstance = new ViewModelInstance(runtimeInstance, null);
|
|
4870
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.createFinalization)(viewModelInstance, viewModelInstance.runtimeInstance);
|
|
4814
4871
|
this.bindViewModelInstance(viewModelInstance);
|
|
4815
4872
|
}
|
|
4816
4873
|
}
|
|
@@ -5865,10 +5922,24 @@ var Rive = /** @class */ (function () {
|
|
|
5865
5922
|
}
|
|
5866
5923
|
return null;
|
|
5867
5924
|
};
|
|
5925
|
+
/**
|
|
5926
|
+
* @deprecated This function is deprecated. For better stability and memory management
|
|
5927
|
+
* use `getBindableArtboard()` instead.
|
|
5928
|
+
* @param {string} name - The name of the artboard.
|
|
5929
|
+
* @returns {Artboard} The artboard to bind to.
|
|
5930
|
+
*/
|
|
5868
5931
|
Rive.prototype.getArtboard = function (name) {
|
|
5869
5932
|
var _a, _b;
|
|
5870
5933
|
return (_b = (_a = this.riveFile) === null || _a === void 0 ? void 0 : _a.getArtboard(name)) !== null && _b !== void 0 ? _b : null;
|
|
5871
5934
|
};
|
|
5935
|
+
Rive.prototype.getBindableArtboard = function (name) {
|
|
5936
|
+
var _a, _b;
|
|
5937
|
+
return (_b = (_a = this.riveFile) === null || _a === void 0 ? void 0 : _a.getBindableArtboard(name)) !== null && _b !== void 0 ? _b : null;
|
|
5938
|
+
};
|
|
5939
|
+
Rive.prototype.getDefaultBindableArtboard = function () {
|
|
5940
|
+
var _a, _b;
|
|
5941
|
+
return (_b = (_a = this.riveFile) === null || _a === void 0 ? void 0 : _a.getDefaultBindableArtboard()) !== null && _b !== void 0 ? _b : null;
|
|
5942
|
+
};
|
|
5872
5943
|
// Error message for missing source or buffer
|
|
5873
5944
|
Rive.missingErrorMessage = "Rive source file or data buffer required";
|
|
5874
5945
|
// Error message for removed rive file
|
|
@@ -5897,28 +5968,36 @@ var ViewModel = /** @class */ (function () {
|
|
|
5897
5968
|
ViewModel.prototype.instanceByIndex = function (index) {
|
|
5898
5969
|
var instance = this._viewModel.instanceByIndex(index);
|
|
5899
5970
|
if (instance !== null) {
|
|
5900
|
-
|
|
5971
|
+
var viewModelInstance = new ViewModelInstance(instance, null);
|
|
5972
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.createFinalization)(viewModelInstance, instance);
|
|
5973
|
+
return viewModelInstance;
|
|
5901
5974
|
}
|
|
5902
5975
|
return null;
|
|
5903
5976
|
};
|
|
5904
5977
|
ViewModel.prototype.instanceByName = function (name) {
|
|
5905
5978
|
var instance = this._viewModel.instanceByName(name);
|
|
5906
5979
|
if (instance !== null) {
|
|
5907
|
-
|
|
5980
|
+
var viewModelInstance = new ViewModelInstance(instance, null);
|
|
5981
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.createFinalization)(viewModelInstance, instance);
|
|
5982
|
+
return viewModelInstance;
|
|
5908
5983
|
}
|
|
5909
5984
|
return null;
|
|
5910
5985
|
};
|
|
5911
5986
|
ViewModel.prototype.defaultInstance = function () {
|
|
5912
5987
|
var runtimeInstance = this._viewModel.defaultInstance();
|
|
5913
5988
|
if (runtimeInstance !== null) {
|
|
5914
|
-
|
|
5989
|
+
var viewModelInstance = new ViewModelInstance(runtimeInstance, null);
|
|
5990
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.createFinalization)(viewModelInstance, runtimeInstance);
|
|
5991
|
+
return viewModelInstance;
|
|
5915
5992
|
}
|
|
5916
5993
|
return null;
|
|
5917
5994
|
};
|
|
5918
5995
|
ViewModel.prototype.instance = function () {
|
|
5919
5996
|
var runtimeInstance = this._viewModel.instance();
|
|
5920
5997
|
if (runtimeInstance !== null) {
|
|
5921
|
-
|
|
5998
|
+
var viewModelInstance = new ViewModelInstance(runtimeInstance, null);
|
|
5999
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.createFinalization)(viewModelInstance, runtimeInstance);
|
|
6000
|
+
return viewModelInstance;
|
|
5922
6001
|
}
|
|
5923
6002
|
return null;
|
|
5924
6003
|
};
|
|
@@ -5979,6 +6058,7 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
5979
6058
|
this._viewModelInstances = new Map();
|
|
5980
6059
|
this._propertiesWithCallbacks = [];
|
|
5981
6060
|
this._referenceCount = 0;
|
|
6061
|
+
this.selfUnref = false;
|
|
5982
6062
|
this._runtimeInstance = runtimeInstance;
|
|
5983
6063
|
if (parent !== null) {
|
|
5984
6064
|
this._parents.push(parent);
|
|
@@ -5991,6 +6071,13 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
5991
6071
|
enumerable: false,
|
|
5992
6072
|
configurable: true
|
|
5993
6073
|
});
|
|
6074
|
+
Object.defineProperty(ViewModelInstance.prototype, "nativeInstance", {
|
|
6075
|
+
get: function () {
|
|
6076
|
+
return this._runtimeInstance;
|
|
6077
|
+
},
|
|
6078
|
+
enumerable: false,
|
|
6079
|
+
configurable: true
|
|
6080
|
+
});
|
|
5994
6081
|
ViewModelInstance.prototype.handleCallbacks = function () {
|
|
5995
6082
|
if (this._propertiesWithCallbacks.length !== 0) {
|
|
5996
6083
|
this._propertiesWithCallbacks.forEach(function (property) {
|
|
@@ -6174,6 +6261,7 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
6174
6261
|
var viewModelRuntimeInstance = (_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.viewModel(name);
|
|
6175
6262
|
if (viewModelRuntimeInstance !== null) {
|
|
6176
6263
|
var viewModelInstance = new ViewModelInstance(viewModelRuntimeInstance, this);
|
|
6264
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.createFinalization)(viewModelInstance, viewModelRuntimeInstance);
|
|
6177
6265
|
viewModelInstance.internalIncrementReferenceCount();
|
|
6178
6266
|
this._viewModelInstances.set(name, viewModelInstance);
|
|
6179
6267
|
return viewModelInstance;
|
|
@@ -6342,8 +6430,12 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
6342
6430
|
};
|
|
6343
6431
|
ViewModelInstance.prototype.cleanup = function () {
|
|
6344
6432
|
var _this = this;
|
|
6433
|
+
var _a;
|
|
6345
6434
|
this._referenceCount--;
|
|
6346
6435
|
if (this._referenceCount <= 0) {
|
|
6436
|
+
if (this.selfUnref) {
|
|
6437
|
+
(_a = this._runtimeInstance) === null || _a === void 0 ? void 0 : _a.unref();
|
|
6438
|
+
}
|
|
6347
6439
|
this._runtimeInstance = null;
|
|
6348
6440
|
this.clearCallbacks();
|
|
6349
6441
|
this._propertiesWithCallbacks = [];
|
|
@@ -6575,6 +6667,7 @@ var ViewModelInstanceList = /** @class */ (function (_super) {
|
|
|
6575
6667
|
var runtimeInstance = this._viewModelInstanceValue.instanceAt(index);
|
|
6576
6668
|
if (runtimeInstance != null) {
|
|
6577
6669
|
var viewModelInstance = new ViewModelInstance(runtimeInstance, this._parentViewModel);
|
|
6670
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.createFinalization)(viewModelInstance, runtimeInstance);
|
|
6578
6671
|
return viewModelInstance;
|
|
6579
6672
|
}
|
|
6580
6673
|
return null;
|
|
@@ -6653,7 +6746,14 @@ var ViewModelInstanceArtboard = /** @class */ (function (_super) {
|
|
|
6653
6746
|
Object.defineProperty(ViewModelInstanceArtboard.prototype, "value", {
|
|
6654
6747
|
set: function (artboard) {
|
|
6655
6748
|
var _a;
|
|
6656
|
-
|
|
6749
|
+
var bindableArtboard;
|
|
6750
|
+
if (artboard.isBindableArtboard) {
|
|
6751
|
+
bindableArtboard = artboard;
|
|
6752
|
+
}
|
|
6753
|
+
else {
|
|
6754
|
+
bindableArtboard = artboard.file.internalBindableArtboardFromArtboard(artboard.nativeArtboard);
|
|
6755
|
+
}
|
|
6756
|
+
this._viewModelInstanceValue.value((_a = bindableArtboard === null || bindableArtboard === void 0 ? void 0 : bindableArtboard.nativeArtboard) !== null && _a !== void 0 ? _a : null);
|
|
6657
6757
|
},
|
|
6658
6758
|
enumerable: false,
|
|
6659
6759
|
configurable: true
|