@rive-app/canvas 2.21.6 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rive.d.ts +6 -2
- package/rive.js +319 -299
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +26 -1
- package/rive_fallback.wasm +0 -0
package/rive.js
CHANGED
|
@@ -96,61 +96,65 @@ const ia = m.onRuntimeInitialized;
|
|
|
96
96
|
m.onRuntimeInitialized = function() {
|
|
97
97
|
ia && ia();
|
|
98
98
|
let a = m.decodeAudio;
|
|
99
|
-
m.decodeAudio = function(
|
|
100
|
-
|
|
101
|
-
e
|
|
99
|
+
m.decodeAudio = function(e, f) {
|
|
100
|
+
e = a(e);
|
|
101
|
+
f(e);
|
|
102
102
|
};
|
|
103
103
|
let b = m.decodeFont;
|
|
104
|
-
m.decodeFont = function(
|
|
105
|
-
|
|
106
|
-
e
|
|
104
|
+
m.decodeFont = function(e, f) {
|
|
105
|
+
e = b(e);
|
|
106
|
+
f(e);
|
|
107
107
|
};
|
|
108
108
|
const c = m.FileAssetLoader;
|
|
109
|
-
m.ptrToAsset =
|
|
110
|
-
let
|
|
111
|
-
return
|
|
109
|
+
m.ptrToAsset = e => {
|
|
110
|
+
let f = m.ptrToFileAsset(e);
|
|
111
|
+
return f.isImage ? m.ptrToImageAsset(e) : f.isFont ? m.ptrToFontAsset(e) : f.isAudio ? m.ptrToAudioAsset(e) : f;
|
|
112
112
|
};
|
|
113
|
-
m.CustomFileAssetLoader = c.extend("CustomFileAssetLoader", {__construct:function({loadContents:
|
|
113
|
+
m.CustomFileAssetLoader = c.extend("CustomFileAssetLoader", {__construct:function({loadContents:e}) {
|
|
114
114
|
this.__parent.__construct.call(this);
|
|
115
|
-
this.Gb =
|
|
116
|
-
}, loadContents:function(
|
|
117
|
-
|
|
118
|
-
return this.Gb(
|
|
115
|
+
this.Gb = e;
|
|
116
|
+
}, loadContents:function(e, f) {
|
|
117
|
+
e = m.ptrToAsset(e);
|
|
118
|
+
return this.Gb(e, f);
|
|
119
119
|
},});
|
|
120
120
|
m.CDNFileAssetLoader = c.extend("CDNFileAssetLoader", {__construct:function() {
|
|
121
121
|
this.__parent.__construct.call(this);
|
|
122
|
-
}, loadContents:function(
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
if ("" ===
|
|
122
|
+
}, loadContents:function(e) {
|
|
123
|
+
let f = m.ptrToAsset(e);
|
|
124
|
+
e = f.cdnUuid;
|
|
125
|
+
if ("" === e) {
|
|
126
126
|
return !1;
|
|
127
127
|
}
|
|
128
|
-
(function(
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
4 ==
|
|
128
|
+
(function(g, n) {
|
|
129
|
+
var p = new XMLHttpRequest();
|
|
130
|
+
p.responseType = "arraybuffer";
|
|
131
|
+
p.onreadystatechange = function() {
|
|
132
|
+
4 == p.readyState && 200 == p.status && n(p);
|
|
133
133
|
};
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
})(
|
|
137
|
-
|
|
134
|
+
p.open("GET", g, !0);
|
|
135
|
+
p.send(null);
|
|
136
|
+
})(f.cdnBaseUrl + "/" + e, g => {
|
|
137
|
+
f.decode(new Uint8Array(g.response));
|
|
138
138
|
});
|
|
139
139
|
return !0;
|
|
140
140
|
},});
|
|
141
141
|
m.FallbackFileAssetLoader = c.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
142
142
|
this.__parent.__construct.call(this);
|
|
143
143
|
this.kb = [];
|
|
144
|
-
}, addLoader:function(
|
|
145
|
-
this.kb.push(
|
|
146
|
-
}, loadContents:function(
|
|
147
|
-
for (let
|
|
148
|
-
if (
|
|
144
|
+
}, addLoader:function(e) {
|
|
145
|
+
this.kb.push(e);
|
|
146
|
+
}, loadContents:function(e, f) {
|
|
147
|
+
for (let g of this.kb) {
|
|
148
|
+
if (g.loadContents(e, f)) {
|
|
149
149
|
return !0;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
return !1;
|
|
153
153
|
},});
|
|
154
|
+
let d = m.computeAlignment;
|
|
155
|
+
m.computeAlignment = function(e, f, g, n, p = 1.0) {
|
|
156
|
+
return d.call(this, e, f, g, n, p);
|
|
157
|
+
};
|
|
154
158
|
};
|
|
155
159
|
const ja = "createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "), ka = new function() {
|
|
156
160
|
function a() {
|
|
@@ -191,7 +195,7 @@ const ja = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
191
195
|
}
|
|
192
196
|
},});
|
|
193
197
|
d = Math.min(r.getParameter(r.MAX_RENDERBUFFER_SIZE), r.getParameter(r.MAX_TEXTURE_SIZE));
|
|
194
|
-
function
|
|
198
|
+
function B(D, w, M) {
|
|
195
199
|
w = r.createShader(w);
|
|
196
200
|
r.shaderSource(w, M);
|
|
197
201
|
r.compileShader(w);
|
|
@@ -202,8 +206,8 @@ const ja = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
202
206
|
r.attachShader(D, w);
|
|
203
207
|
}
|
|
204
208
|
k = r.createProgram();
|
|
205
|
-
|
|
206
|
-
|
|
209
|
+
B(k, r.VERTEX_SHADER, "attribute vec2 vertex;\n attribute vec2 uv;\n uniform vec4 mat;\n uniform vec2 translate;\n varying vec2 st;\n void main() {\n st = uv;\n gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n }");
|
|
210
|
+
B(k, r.FRAGMENT_SHADER, "precision highp float;\n uniform sampler2D image;\n varying vec2 st;\n void main() {\n gl_FragColor = texture2D(image, st);\n }");
|
|
207
211
|
r.bindAttribLocation(k, 0, "vertex");
|
|
208
212
|
r.bindAttribLocation(k, 1, "uv");
|
|
209
213
|
r.linkProgram(k);
|
|
@@ -250,7 +254,7 @@ const ja = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
250
254
|
return t;
|
|
251
255
|
};
|
|
252
256
|
const l = new ha(8), u = new ha(8), v = new ha(10), x = new ha(10);
|
|
253
|
-
this.Qb = function(k, t, r,
|
|
257
|
+
this.Qb = function(k, t, r, B, D) {
|
|
254
258
|
if (a()) {
|
|
255
259
|
var w = l.push(k), M = u.push(t);
|
|
256
260
|
if (b.canvas) {
|
|
@@ -262,18 +266,18 @@ const ja = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
262
266
|
b.clearColor(0, 0, 0, 0);
|
|
263
267
|
b.clear(b.COLOR_BUFFER_BIT);
|
|
264
268
|
b.enable(b.SCISSOR_TEST);
|
|
265
|
-
r.sort((
|
|
266
|
-
w = v.push(
|
|
269
|
+
r.sort((H, ba) => ba.wb - H.wb);
|
|
270
|
+
w = v.push(B);
|
|
267
271
|
g != w && (b.bufferData(b.ARRAY_BUFFER, 8 * w, b.DYNAMIC_DRAW), g = w);
|
|
268
272
|
w = 0;
|
|
269
273
|
for (var T of r) {
|
|
270
274
|
b.bufferSubData(b.ARRAY_BUFFER, w, T.Ta), w += 4 * T.Ta.length;
|
|
271
275
|
}
|
|
272
|
-
console.assert(w == 4 *
|
|
276
|
+
console.assert(w == 4 * B);
|
|
273
277
|
for (var ca of r) {
|
|
274
278
|
b.bufferSubData(b.ARRAY_BUFFER, w, ca.Db), w += 4 * ca.Db.length;
|
|
275
279
|
}
|
|
276
|
-
console.assert(w == 8 *
|
|
280
|
+
console.assert(w == 8 * B);
|
|
277
281
|
w = x.push(D);
|
|
278
282
|
n != w && (b.bufferData(b.ELEMENT_ARRAY_BUFFER, 2 * w, b.DYNAMIC_DRAW), n = w);
|
|
279
283
|
T = 0;
|
|
@@ -284,20 +288,20 @@ const ja = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
284
288
|
ra = 0;
|
|
285
289
|
ca = !0;
|
|
286
290
|
w = T = 0;
|
|
287
|
-
for (const
|
|
288
|
-
|
|
289
|
-
|
|
291
|
+
for (const H of r) {
|
|
292
|
+
H.image.Ka != ra && (b.bindTexture(b.TEXTURE_2D, H.image.Ja || null), ra = H.image.Ka);
|
|
293
|
+
H.mc ? (b.scissor(H.Ya, M - H.Za - H.jb, H.Ac, H.jb), ca = !0) : ca && (b.scissor(0, M - t, k, t), ca = !1);
|
|
290
294
|
r = 2 / k;
|
|
291
295
|
const ba = -2 / t;
|
|
292
|
-
b.uniform4f(e,
|
|
293
|
-
b.uniform2f(f,
|
|
296
|
+
b.uniform4f(e, H.ha[0] * r * H.Ba, H.ha[1] * ba * H.Ca, H.ha[2] * r * H.Ba, H.ha[3] * ba * H.Ca);
|
|
297
|
+
b.uniform2f(f, H.ha[4] * r * H.Ba + r * (H.Ya - H.ic * H.Ba) - 1, H.ha[5] * ba * H.Ca + ba * (H.Za - H.jc * H.Ca) + 1);
|
|
294
298
|
b.vertexAttribPointer(0, 2, b.FLOAT, !1, 0, w);
|
|
295
|
-
b.vertexAttribPointer(1, 2, b.FLOAT, !1, 0, w + 4 *
|
|
296
|
-
b.drawElements(b.TRIANGLES,
|
|
297
|
-
w += 4 *
|
|
298
|
-
T += 2 *
|
|
299
|
+
b.vertexAttribPointer(1, 2, b.FLOAT, !1, 0, w + 4 * B);
|
|
300
|
+
b.drawElements(b.TRIANGLES, H.indices.length, b.UNSIGNED_SHORT, T);
|
|
301
|
+
w += 4 * H.Ta.length;
|
|
302
|
+
T += 2 * H.indices.length;
|
|
299
303
|
}
|
|
300
|
-
console.assert(w == 4 *
|
|
304
|
+
console.assert(w == 4 * B);
|
|
301
305
|
console.assert(T == 2 * D);
|
|
302
306
|
}
|
|
303
307
|
}
|
|
@@ -349,8 +353,8 @@ m.onRuntimeInitialized = function() {
|
|
|
349
353
|
function c() {
|
|
350
354
|
0 < M.length && (ka.Qb(w.drawWidth(), w.drawHeight(), M, T, ca), M = [], ca = T = 0, w.reset(512, 512));
|
|
351
355
|
for (const q of D) {
|
|
352
|
-
for (const
|
|
353
|
-
|
|
356
|
+
for (const y of q.H) {
|
|
357
|
+
y();
|
|
354
358
|
}
|
|
355
359
|
q.H = [];
|
|
356
360
|
}
|
|
@@ -360,54 +364,54 @@ m.onRuntimeInitialized = function() {
|
|
|
360
364
|
var d = m.RenderPaintStyle;
|
|
361
365
|
const e = m.RenderPath, f = m.RenderPaint, g = m.Renderer, n = m.StrokeCap, p = m.StrokeJoin, l = m.BlendMode, u = d.fill, v = d.stroke, x = m.FillRule.evenOdd;
|
|
362
366
|
let k = 1;
|
|
363
|
-
var t = m.RenderImage.extend("CanvasRenderImage", {__construct:function({la:q, xa:
|
|
367
|
+
var t = m.RenderImage.extend("CanvasRenderImage", {__construct:function({la:q, xa:y} = {}) {
|
|
364
368
|
this.__parent.__construct.call(this);
|
|
365
369
|
this.Ka = k;
|
|
366
370
|
k = k + 1 & 2147483647 || 1;
|
|
367
371
|
this.la = q;
|
|
368
|
-
this.xa =
|
|
372
|
+
this.xa = y;
|
|
369
373
|
}, __destruct:function() {
|
|
370
374
|
this.Ja && (ka.Mb(this.Ja), URL.revokeObjectURL(this.Wa));
|
|
371
375
|
this.__parent.__destruct.call(this);
|
|
372
376
|
}, decode:function(q) {
|
|
373
|
-
var
|
|
374
|
-
|
|
375
|
-
var
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
377
|
+
var y = this;
|
|
378
|
+
y.xa && y.xa(y);
|
|
379
|
+
var F = new Image();
|
|
380
|
+
y.Wa = URL.createObjectURL(new Blob([q], {type:"image/png",}));
|
|
381
|
+
F.onload = function() {
|
|
382
|
+
y.Fb = F;
|
|
383
|
+
y.Ja = ka.Lb(F);
|
|
384
|
+
y.size(F.width, F.height);
|
|
385
|
+
y.la && y.la(y);
|
|
382
386
|
};
|
|
383
|
-
|
|
387
|
+
F.src = y.Wa;
|
|
384
388
|
},}), r = e.extend("CanvasRenderPath", {__construct:function() {
|
|
385
389
|
this.__parent.__construct.call(this);
|
|
386
390
|
this.T = new Path2D();
|
|
387
391
|
}, rewind:function() {
|
|
388
392
|
this.T = new Path2D();
|
|
389
|
-
}, addPath:function(q,
|
|
393
|
+
}, addPath:function(q, y, F, G, A, I, J) {
|
|
390
394
|
var K = this.T, X = K.addPath;
|
|
391
395
|
q = q.T;
|
|
392
396
|
const Q = new DOMMatrix();
|
|
393
|
-
Q.a =
|
|
394
|
-
Q.b =
|
|
395
|
-
Q.c =
|
|
396
|
-
Q.d =
|
|
397
|
+
Q.a = y;
|
|
398
|
+
Q.b = F;
|
|
399
|
+
Q.c = G;
|
|
400
|
+
Q.d = A;
|
|
397
401
|
Q.e = I;
|
|
398
402
|
Q.f = J;
|
|
399
403
|
X.call(K, q, Q);
|
|
400
404
|
}, fillRule:function(q) {
|
|
401
405
|
this.Va = q;
|
|
402
|
-
}, moveTo:function(q,
|
|
403
|
-
this.T.moveTo(q,
|
|
404
|
-
}, lineTo:function(q,
|
|
405
|
-
this.T.lineTo(q,
|
|
406
|
-
}, cubicTo:function(q,
|
|
407
|
-
this.T.bezierCurveTo(q,
|
|
406
|
+
}, moveTo:function(q, y) {
|
|
407
|
+
this.T.moveTo(q, y);
|
|
408
|
+
}, lineTo:function(q, y) {
|
|
409
|
+
this.T.lineTo(q, y);
|
|
410
|
+
}, cubicTo:function(q, y, F, G, A, I) {
|
|
411
|
+
this.T.bezierCurveTo(q, y, F, G, A, I);
|
|
408
412
|
}, close:function() {
|
|
409
413
|
this.T.closePath();
|
|
410
|
-
},}),
|
|
414
|
+
},}), B = f.extend("CanvasRenderPaint", {color:function(q) {
|
|
411
415
|
this.Xa = b(q);
|
|
412
416
|
}, thickness:function(q) {
|
|
413
417
|
this.Ib = q;
|
|
@@ -439,40 +443,40 @@ m.onRuntimeInitialized = function() {
|
|
|
439
443
|
this.Eb = a(q);
|
|
440
444
|
}, clearGradient:function() {
|
|
441
445
|
this.ja = null;
|
|
442
|
-
}, linearGradient:function(q,
|
|
443
|
-
this.ja = {yb:q, zb:
|
|
444
|
-
}, radialGradient:function(q,
|
|
445
|
-
this.ja = {yb:q, zb:
|
|
446
|
-
}, addStop:function(q,
|
|
447
|
-
this.ja.Ra.push({color:q, stop:
|
|
446
|
+
}, linearGradient:function(q, y, F, G) {
|
|
447
|
+
this.ja = {yb:q, zb:y, bb:F, cb:G, Ra:[],};
|
|
448
|
+
}, radialGradient:function(q, y, F, G) {
|
|
449
|
+
this.ja = {yb:q, zb:y, bb:F, cb:G, Ra:[], ec:!0,};
|
|
450
|
+
}, addStop:function(q, y) {
|
|
451
|
+
this.ja.Ra.push({color:q, stop:y,});
|
|
448
452
|
}, completeGradient:function() {
|
|
449
|
-
}, draw:function(q,
|
|
450
|
-
let
|
|
451
|
-
var
|
|
453
|
+
}, draw:function(q, y, F) {
|
|
454
|
+
let G = this.Hb;
|
|
455
|
+
var A = this.Xa, I = this.ja;
|
|
452
456
|
q.globalCompositeOperation = this.Eb;
|
|
453
457
|
if (null != I) {
|
|
454
|
-
|
|
458
|
+
A = I.yb;
|
|
455
459
|
var J = I.zb;
|
|
456
460
|
const X = I.bb;
|
|
457
461
|
var K = I.cb;
|
|
458
462
|
const Q = I.Ra;
|
|
459
|
-
I.ec ? (I = X -
|
|
463
|
+
I.ec ? (I = X - A, K -= J, A = q.createRadialGradient(A, J, 0, A, J, Math.sqrt(I * I + K * K))) : A = q.createLinearGradient(A, J, X, K);
|
|
460
464
|
for (let da = 0, R = Q.length; da < R; da++) {
|
|
461
|
-
J = Q[da],
|
|
465
|
+
J = Q[da], A.addColorStop(J.stop, b(J.color));
|
|
462
466
|
}
|
|
463
|
-
this.Xa =
|
|
467
|
+
this.Xa = A;
|
|
464
468
|
this.ja = null;
|
|
465
469
|
}
|
|
466
|
-
switch(
|
|
470
|
+
switch(G) {
|
|
467
471
|
case v:
|
|
468
|
-
q.strokeStyle =
|
|
472
|
+
q.strokeStyle = A;
|
|
469
473
|
q.lineWidth = this.Ib;
|
|
470
474
|
q.lineCap = this.Ha;
|
|
471
475
|
q.lineJoin = this.Ia;
|
|
472
|
-
q.stroke(
|
|
476
|
+
q.stroke(y);
|
|
473
477
|
break;
|
|
474
478
|
case u:
|
|
475
|
-
q.fillStyle =
|
|
479
|
+
q.fillStyle = A, q.fill(y, F);
|
|
476
480
|
}
|
|
477
481
|
},});
|
|
478
482
|
const D = new Set();
|
|
@@ -493,33 +497,33 @@ m.onRuntimeInitialized = function() {
|
|
|
493
497
|
}
|
|
494
498
|
this.S.splice(q);
|
|
495
499
|
this.H.push(this.C.restore.bind(this.C));
|
|
496
|
-
}, transform:function(q,
|
|
500
|
+
}, transform:function(q, y, F, G, A, I) {
|
|
497
501
|
const J = this.S, K = J.length - 6;
|
|
498
|
-
J.splice(K, 6, J[K] * q + J[K + 2] *
|
|
499
|
-
this.H.push(this.C.transform.bind(this.C, q,
|
|
502
|
+
J.splice(K, 6, J[K] * q + J[K + 2] * y, J[K + 1] * q + J[K + 3] * y, J[K] * F + J[K + 2] * G, J[K + 1] * F + J[K + 3] * G, J[K] * A + J[K + 2] * I + J[K + 4], J[K + 1] * A + J[K + 3] * I + J[K + 5]);
|
|
503
|
+
this.H.push(this.C.transform.bind(this.C, q, y, F, G, A, I));
|
|
500
504
|
}, rotate:function(q) {
|
|
501
|
-
const
|
|
505
|
+
const y = Math.sin(q);
|
|
502
506
|
q = Math.cos(q);
|
|
503
|
-
this.transform(q,
|
|
504
|
-
}, _drawPath:function(q,
|
|
505
|
-
this.H.push(
|
|
506
|
-
}, _drawRiveImage:function(q,
|
|
507
|
-
var
|
|
508
|
-
if (
|
|
509
|
-
var
|
|
507
|
+
this.transform(q, y, -y, q, 0, 0);
|
|
508
|
+
}, _drawPath:function(q, y) {
|
|
509
|
+
this.H.push(y.draw.bind(y, this.C, q.T, q.Va === x ? "evenodd" : "nonzero"));
|
|
510
|
+
}, _drawRiveImage:function(q, y, F) {
|
|
511
|
+
var G = q.Fb;
|
|
512
|
+
if (G) {
|
|
513
|
+
var A = this.C, I = a(y);
|
|
510
514
|
this.H.push(function() {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
+
A.globalCompositeOperation = I;
|
|
516
|
+
A.globalAlpha = F;
|
|
517
|
+
A.drawImage(G, 0, 0);
|
|
518
|
+
A.globalAlpha = 1;
|
|
515
519
|
});
|
|
516
520
|
}
|
|
517
521
|
}, _getMatrix:function(q) {
|
|
518
|
-
const
|
|
519
|
-
for (let
|
|
520
|
-
q[
|
|
522
|
+
const y = this.S, F = y.length - 6;
|
|
523
|
+
for (let G = 0; 6 > G; ++G) {
|
|
524
|
+
q[G] = y[F + G];
|
|
521
525
|
}
|
|
522
|
-
}, _drawImageMesh:function(q,
|
|
526
|
+
}, _drawImageMesh:function(q, y, F, G, A, I, J, K, X, Q) {
|
|
523
527
|
var da = this.C.canvas.width, R = this.C.canvas.height;
|
|
524
528
|
const Yb = X - J, Zb = Q - K;
|
|
525
529
|
J = Math.max(J, 0);
|
|
@@ -540,15 +544,15 @@ m.onRuntimeInitialized = function() {
|
|
|
540
544
|
R = w.addRect(sa, ta);
|
|
541
545
|
0 > R && (c(), D.add(this), R = w.addRect(sa, ta), console.assert(0 <= R));
|
|
542
546
|
var $b = R & 65535, ac = R >> 16;
|
|
543
|
-
M.push({ha:this.S.slice(this.S.length - 6), image:q, Ya:$b, Za:ac, ic:J, jc:K, Ac:sa, jb:ta, Ba:Q, Ca:da, Ta:new Float32Array(
|
|
544
|
-
T +=
|
|
547
|
+
M.push({ha:this.S.slice(this.S.length - 6), image:q, Ya:$b, Za:ac, ic:J, jc:K, Ac:sa, jb:ta, Ba:Q, Ca:da, Ta:new Float32Array(G), Db:new Float32Array(A), indices:new Uint16Array(I), mc:X, wb:q.Ka << 1 | (X ? 1 : 0),});
|
|
548
|
+
T += G.length;
|
|
545
549
|
ca += I.length;
|
|
546
|
-
var za = this.C, qd = a(
|
|
550
|
+
var za = this.C, qd = a(y);
|
|
547
551
|
this.H.push(function() {
|
|
548
552
|
za.save();
|
|
549
553
|
za.resetTransform();
|
|
550
554
|
za.globalCompositeOperation = qd;
|
|
551
|
-
za.globalAlpha =
|
|
555
|
+
za.globalAlpha = F;
|
|
552
556
|
const bc = ka.canvas();
|
|
553
557
|
bc && za.drawImage(bc, $b, ac, sa, ta, J, K, Ga, Ha);
|
|
554
558
|
za.restore();
|
|
@@ -560,39 +564,39 @@ m.onRuntimeInitialized = function() {
|
|
|
560
564
|
D.add(this);
|
|
561
565
|
this.H.push(this.C.clearRect.bind(this.C, 0, 0, this.Ua.width, this.Ua.height));
|
|
562
566
|
}, flush:function() {
|
|
563
|
-
}, translate:function(q,
|
|
564
|
-
this.transform(1, 0, 0, 1, q,
|
|
567
|
+
}, translate:function(q, y) {
|
|
568
|
+
this.transform(1, 0, 0, 1, q, y);
|
|
565
569
|
},});
|
|
566
570
|
m.makeRenderer = function(q) {
|
|
567
|
-
const
|
|
568
|
-
return new Proxy(
|
|
569
|
-
if ("function" === typeof
|
|
571
|
+
const y = new ra(q), F = y.C;
|
|
572
|
+
return new Proxy(y, {get(G, A) {
|
|
573
|
+
if ("function" === typeof G[A]) {
|
|
570
574
|
return function(...I) {
|
|
571
|
-
return
|
|
575
|
+
return G[A].apply(G, I);
|
|
572
576
|
};
|
|
573
577
|
}
|
|
574
|
-
if ("function" === typeof
|
|
575
|
-
if (-1 < ja.indexOf(
|
|
576
|
-
throw Error("RiveException: Method call to '" +
|
|
578
|
+
if ("function" === typeof F[A]) {
|
|
579
|
+
if (-1 < ja.indexOf(A)) {
|
|
580
|
+
throw Error("RiveException: Method call to '" + A + "()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");
|
|
577
581
|
}
|
|
578
582
|
return function(...I) {
|
|
579
|
-
|
|
583
|
+
y.H.push(F[A].bind(F, ...I));
|
|
580
584
|
};
|
|
581
585
|
}
|
|
582
|
-
return
|
|
583
|
-
}, set(
|
|
584
|
-
if (
|
|
585
|
-
return
|
|
586
|
-
|
|
586
|
+
return G[A];
|
|
587
|
+
}, set(G, A, I) {
|
|
588
|
+
if (A in F) {
|
|
589
|
+
return y.H.push(() => {
|
|
590
|
+
F[A] = I;
|
|
587
591
|
}), !0;
|
|
588
592
|
}
|
|
589
593
|
},});
|
|
590
594
|
};
|
|
591
|
-
m.decodeImage = function(q,
|
|
592
|
-
(new t({la:
|
|
595
|
+
m.decodeImage = function(q, y) {
|
|
596
|
+
(new t({la:y})).decode(q);
|
|
593
597
|
};
|
|
594
598
|
m.renderFactory = {makeRenderPaint:function() {
|
|
595
|
-
return new
|
|
599
|
+
return new B();
|
|
596
600
|
}, makeRenderPath:function() {
|
|
597
601
|
return new r();
|
|
598
602
|
}, makeRenderImage:function() {
|
|
@@ -602,25 +606,29 @@ m.onRuntimeInitialized = function() {
|
|
|
602
606
|
}, la:() => {
|
|
603
607
|
q.loaded++;
|
|
604
608
|
if (q.loaded === q.total) {
|
|
605
|
-
const
|
|
606
|
-
|
|
609
|
+
const y = q.ready;
|
|
610
|
+
y && (y(), q.ready = null);
|
|
607
611
|
}
|
|
608
612
|
},});
|
|
609
613
|
},};
|
|
610
|
-
let
|
|
611
|
-
m.load = function(q,
|
|
612
|
-
const
|
|
613
|
-
void 0 !==
|
|
614
|
-
|
|
615
|
-
return new Promise(function(
|
|
614
|
+
let H = m.load, ba = null;
|
|
615
|
+
m.load = function(q, y, F = !0) {
|
|
616
|
+
const G = new m.FallbackFileAssetLoader();
|
|
617
|
+
void 0 !== y && G.addLoader(y);
|
|
618
|
+
F && (y = new m.CDNFileAssetLoader(), G.addLoader(y));
|
|
619
|
+
return new Promise(function(A) {
|
|
616
620
|
let I = null;
|
|
617
621
|
ba = {total:0, loaded:0, ready:function() {
|
|
618
|
-
|
|
622
|
+
A(I);
|
|
619
623
|
},};
|
|
620
|
-
I =
|
|
621
|
-
0 == ba.total &&
|
|
624
|
+
I = H(q, G);
|
|
625
|
+
0 == ba.total && A(I);
|
|
622
626
|
});
|
|
623
627
|
};
|
|
628
|
+
let rd = m.RendererWrapper.prototype.align;
|
|
629
|
+
m.RendererWrapper.prototype.align = function(q, y, F, G, A = 1.0) {
|
|
630
|
+
rd.call(this, q, y, F, G, A);
|
|
631
|
+
};
|
|
624
632
|
d = new fa();
|
|
625
633
|
m.requestAnimationFrame = d.requestAnimationFrame.bind(d);
|
|
626
634
|
m.cancelAnimationFrame = d.cancelAnimationFrame.bind(d);
|
|
@@ -659,10 +667,10 @@ var ya;
|
|
|
659
667
|
m.wasmBinary && (ya = m.wasmBinary);
|
|
660
668
|
var noExitRuntime = m.noExitRuntime || !0;
|
|
661
669
|
"object" != typeof WebAssembly && Aa("no native wasm support detected");
|
|
662
|
-
var Ba,
|
|
670
|
+
var Ba, z, Ca = !1, C, E, Da, Ea, L, N, Fa, Ia;
|
|
663
671
|
function Ja() {
|
|
664
672
|
var a = Ba.buffer;
|
|
665
|
-
m.HEAP8 =
|
|
673
|
+
m.HEAP8 = C = new Int8Array(a);
|
|
666
674
|
m.HEAP16 = Da = new Int16Array(a);
|
|
667
675
|
m.HEAP32 = L = new Int32Array(a);
|
|
668
676
|
m.HEAPU8 = E = new Uint8Array(a);
|
|
@@ -738,7 +746,7 @@ function Ya(a, b) {
|
|
|
738
746
|
return Xa(c, a, b);
|
|
739
747
|
}));
|
|
740
748
|
}
|
|
741
|
-
var Za, $a, db = {
|
|
749
|
+
var Za, $a, db = {438588:(a, b, c, d, e) => {
|
|
742
750
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
743
751
|
return 0;
|
|
744
752
|
}
|
|
@@ -801,9 +809,9 @@ var Za, $a, db = {437932:(a, b, c, d, e) => {
|
|
|
801
809
|
}
|
|
802
810
|
window.h.Aa += 1;
|
|
803
811
|
return 1;
|
|
804
|
-
},
|
|
812
|
+
}, 440766:() => {
|
|
805
813
|
"undefined" !== typeof window.h && (--window.h.Aa, 0 === window.h.Aa && delete window.h);
|
|
806
|
-
},
|
|
814
|
+
}, 440930:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 441034:() => {
|
|
807
815
|
try {
|
|
808
816
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
809
817
|
a.close();
|
|
@@ -811,7 +819,7 @@ var Za, $a, db = {437932:(a, b, c, d, e) => {
|
|
|
811
819
|
} catch (c) {
|
|
812
820
|
return 0;
|
|
813
821
|
}
|
|
814
|
-
},
|
|
822
|
+
}, 441205:(a, b, c, d, e, f) => {
|
|
815
823
|
if ("undefined" === typeof window.h) {
|
|
816
824
|
return -1;
|
|
817
825
|
}
|
|
@@ -857,7 +865,7 @@ var Za, $a, db = {437932:(a, b, c, d, e) => {
|
|
|
857
865
|
a == window.h.I.ya && g.Z.connect(g.J.destination);
|
|
858
866
|
g.pb = f;
|
|
859
867
|
return window.h.yc(g);
|
|
860
|
-
},
|
|
868
|
+
}, 444082:a => window.h.ra(a).J.sampleRate, 444155:a => {
|
|
861
869
|
a = window.h.ra(a);
|
|
862
870
|
void 0 !== a.Z && (a.Z.onaudioprocess = function() {
|
|
863
871
|
}, a.Z.disconnect(), a.Z = void 0);
|
|
@@ -865,13 +873,13 @@ var Za, $a, db = {437932:(a, b, c, d, e) => {
|
|
|
865
873
|
a.J.close();
|
|
866
874
|
a.J = void 0;
|
|
867
875
|
a.pb = void 0;
|
|
868
|
-
},
|
|
876
|
+
}, 444555:a => {
|
|
869
877
|
window.h.Cb(a);
|
|
870
|
-
},
|
|
878
|
+
}, 444605:a => {
|
|
871
879
|
a = window.h.ra(a);
|
|
872
880
|
a.J.resume();
|
|
873
881
|
a.state = window.h.ga.xb;
|
|
874
|
-
},
|
|
882
|
+
}, 444744:a => {
|
|
875
883
|
a = window.h.ra(a);
|
|
876
884
|
a.J.suspend();
|
|
877
885
|
a.state = window.h.ga.stopped;
|
|
@@ -1201,7 +1209,7 @@ var P = {O:null, U() {
|
|
|
1201
1209
|
}
|
|
1202
1210
|
return a;
|
|
1203
1211
|
}, write(a, b, c, d, e, f) {
|
|
1204
|
-
b.buffer ===
|
|
1212
|
+
b.buffer === C.buffer && (f = !1);
|
|
1205
1213
|
if (!d) {
|
|
1206
1214
|
return 0;
|
|
1207
1215
|
}
|
|
@@ -1242,7 +1250,7 @@ var P = {O:null, U() {
|
|
|
1242
1250
|
throw new O(43);
|
|
1243
1251
|
}
|
|
1244
1252
|
a = a.node.j;
|
|
1245
|
-
if (e & 2 || a.buffer !==
|
|
1253
|
+
if (e & 2 || a.buffer !== C.buffer) {
|
|
1246
1254
|
if (0 < c || c + b < a.length) {
|
|
1247
1255
|
a.subarray ? a = a.subarray(c, c + b) : a = Array.prototype.slice.call(a, c, c + b);
|
|
1248
1256
|
}
|
|
@@ -1252,7 +1260,7 @@ var P = {O:null, U() {
|
|
|
1252
1260
|
if (!b) {
|
|
1253
1261
|
throw new O(48);
|
|
1254
1262
|
}
|
|
1255
|
-
|
|
1263
|
+
C.set(a, b);
|
|
1256
1264
|
} else {
|
|
1257
1265
|
c = !1, b = a.byteOffset;
|
|
1258
1266
|
}
|
|
@@ -1949,34 +1957,34 @@ function pd(a, b, c, d, e) {
|
|
|
1949
1957
|
Rc(x);
|
|
1950
1958
|
} else {
|
|
1951
1959
|
for (var r = g ? 1 : 2; r < b.length; r++) {
|
|
1952
|
-
var
|
|
1953
|
-
null !== b[r].K && b[r].K(
|
|
1960
|
+
var B = 1 === r ? k : u[r - 2];
|
|
1961
|
+
null !== b[r].K && b[r].K(B);
|
|
1954
1962
|
}
|
|
1955
1963
|
}
|
|
1956
1964
|
k = p ? b[0].fromWireType(t) : void 0;
|
|
1957
1965
|
return k;
|
|
1958
1966
|
};
|
|
1959
1967
|
}
|
|
1960
|
-
function
|
|
1968
|
+
function sd(a, b) {
|
|
1961
1969
|
for (var c = [], d = 0; d < a; d++) {
|
|
1962
1970
|
c.push(N[b + 4 * d >> 2]);
|
|
1963
1971
|
}
|
|
1964
1972
|
return c;
|
|
1965
1973
|
}
|
|
1966
|
-
function
|
|
1974
|
+
function td(a, b, c) {
|
|
1967
1975
|
a instanceof Object || V(`${c} with invalid "this": ${a}`);
|
|
1968
1976
|
a instanceof b.i.constructor || V(`${c} incompatible with "this" of type ${a.constructor.name}`);
|
|
1969
1977
|
a.g.o || V(`cannot call emscripten binding method ${c} on deleted object`);
|
|
1970
1978
|
return cd(a.g.o, a.g.u.i, b.i);
|
|
1971
1979
|
}
|
|
1972
|
-
function
|
|
1980
|
+
function ud(a) {
|
|
1973
1981
|
a >= U.h && 0 === --U.get(a).tb && U.Zb(a);
|
|
1974
1982
|
}
|
|
1975
|
-
function
|
|
1983
|
+
function vd(a, b, c) {
|
|
1976
1984
|
switch(b) {
|
|
1977
1985
|
case 0:
|
|
1978
1986
|
return function(d) {
|
|
1979
|
-
return this.fromWireType((c ?
|
|
1987
|
+
return this.fromWireType((c ? C : E)[d]);
|
|
1980
1988
|
};
|
|
1981
1989
|
case 1:
|
|
1982
1990
|
return function(d) {
|
|
@@ -1997,7 +2005,7 @@ function ed(a) {
|
|
|
1997
2005
|
var b = typeof a;
|
|
1998
2006
|
return "object" === b || "array" === b || "function" === b ? a.toString() : "" + a;
|
|
1999
2007
|
}
|
|
2000
|
-
function
|
|
2008
|
+
function wd(a, b) {
|
|
2001
2009
|
switch(b) {
|
|
2002
2010
|
case 2:
|
|
2003
2011
|
return function(c) {
|
|
@@ -2011,11 +2019,11 @@ function vd(a, b) {
|
|
|
2011
2019
|
throw new TypeError("Unknown float type: " + a);
|
|
2012
2020
|
}
|
|
2013
2021
|
}
|
|
2014
|
-
function
|
|
2022
|
+
function xd(a, b, c) {
|
|
2015
2023
|
switch(b) {
|
|
2016
2024
|
case 0:
|
|
2017
2025
|
return c ? function(d) {
|
|
2018
|
-
return
|
|
2026
|
+
return C[d];
|
|
2019
2027
|
} : function(d) {
|
|
2020
2028
|
return E[d];
|
|
2021
2029
|
};
|
|
@@ -2035,14 +2043,14 @@ function wd(a, b, c) {
|
|
|
2035
2043
|
throw new TypeError("Unknown integer type: " + a);
|
|
2036
2044
|
}
|
|
2037
2045
|
}
|
|
2038
|
-
var
|
|
2046
|
+
var yd = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, zd = (a, b) => {
|
|
2039
2047
|
var c = a >> 1;
|
|
2040
2048
|
for (var d = c + b / 2; !(c >= d) && Ea[c];) {
|
|
2041
2049
|
++c;
|
|
2042
2050
|
}
|
|
2043
2051
|
c <<= 1;
|
|
2044
|
-
if (32 < c - a &&
|
|
2045
|
-
return
|
|
2052
|
+
if (32 < c - a && yd) {
|
|
2053
|
+
return yd.decode(E.subarray(a, c));
|
|
2046
2054
|
}
|
|
2047
2055
|
c = "";
|
|
2048
2056
|
for (d = 0; !(d >= b / 2); ++d) {
|
|
@@ -2053,7 +2061,7 @@ var xd = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
|
|
|
2053
2061
|
c += String.fromCharCode(e);
|
|
2054
2062
|
}
|
|
2055
2063
|
return c;
|
|
2056
|
-
},
|
|
2064
|
+
}, Ad = (a, b, c) => {
|
|
2057
2065
|
void 0 === c && (c = 2147483647);
|
|
2058
2066
|
if (2 > c) {
|
|
2059
2067
|
return 0;
|
|
@@ -2066,7 +2074,7 @@ var xd = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
|
|
|
2066
2074
|
}
|
|
2067
2075
|
Da[b >> 1] = 0;
|
|
2068
2076
|
return b - d;
|
|
2069
|
-
},
|
|
2077
|
+
}, Bd = a => 2 * a.length, Cd = (a, b) => {
|
|
2070
2078
|
for (var c = 0, d = ""; !(c >= b / 4);) {
|
|
2071
2079
|
var e = L[a + 4 * c >> 2];
|
|
2072
2080
|
if (0 == e) {
|
|
@@ -2076,7 +2084,7 @@ var xd = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
|
|
|
2076
2084
|
65536 <= e ? (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : d += String.fromCharCode(e);
|
|
2077
2085
|
}
|
|
2078
2086
|
return d;
|
|
2079
|
-
},
|
|
2087
|
+
}, Dd = (a, b, c) => {
|
|
2080
2088
|
void 0 === c && (c = 2147483647);
|
|
2081
2089
|
if (4 > c) {
|
|
2082
2090
|
return 0;
|
|
@@ -2097,44 +2105,44 @@ var xd = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void
|
|
|
2097
2105
|
}
|
|
2098
2106
|
L[b >> 2] = 0;
|
|
2099
2107
|
return b - d;
|
|
2100
|
-
},
|
|
2108
|
+
}, Ed = a => {
|
|
2101
2109
|
for (var b = 0, c = 0; c < a.length; ++c) {
|
|
2102
2110
|
var d = a.charCodeAt(c);
|
|
2103
2111
|
55296 <= d && 57343 >= d && ++c;
|
|
2104
2112
|
b += 4;
|
|
2105
2113
|
}
|
|
2106
2114
|
return b;
|
|
2107
|
-
},
|
|
2108
|
-
function
|
|
2109
|
-
var b =
|
|
2115
|
+
}, Fd = {};
|
|
2116
|
+
function Gd(a) {
|
|
2117
|
+
var b = Fd[a];
|
|
2110
2118
|
return void 0 === b ? W(a) : b;
|
|
2111
2119
|
}
|
|
2112
|
-
var
|
|
2113
|
-
function
|
|
2114
|
-
var b =
|
|
2115
|
-
|
|
2120
|
+
var Hd = [];
|
|
2121
|
+
function Id(a) {
|
|
2122
|
+
var b = Hd.length;
|
|
2123
|
+
Hd.push(a);
|
|
2116
2124
|
return b;
|
|
2117
2125
|
}
|
|
2118
|
-
function
|
|
2126
|
+
function Jd(a, b) {
|
|
2119
2127
|
for (var c = Array(a), d = 0; d < a; ++d) {
|
|
2120
2128
|
c[d] = Fc(N[b + 4 * d >> 2], "parameter " + d);
|
|
2121
2129
|
}
|
|
2122
2130
|
return c;
|
|
2123
2131
|
}
|
|
2124
|
-
var
|
|
2125
|
-
if (!
|
|
2132
|
+
var Kd = [], Ld = [], Md = {}, Od = () => {
|
|
2133
|
+
if (!Nd) {
|
|
2126
2134
|
var a = {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", _:na || "./this.program"}, b;
|
|
2127
|
-
for (b in
|
|
2128
|
-
void 0 ===
|
|
2135
|
+
for (b in Md) {
|
|
2136
|
+
void 0 === Md[b] ? delete a[b] : a[b] = Md[b];
|
|
2129
2137
|
}
|
|
2130
2138
|
var c = [];
|
|
2131
2139
|
for (b in a) {
|
|
2132
2140
|
c.push(`${b}=${a[b]}`);
|
|
2133
2141
|
}
|
|
2134
|
-
|
|
2142
|
+
Nd = c;
|
|
2135
2143
|
}
|
|
2136
|
-
return
|
|
2137
|
-
},
|
|
2144
|
+
return Nd;
|
|
2145
|
+
}, Nd, Pd = a => 0 === a % 4 && (0 !== a % 100 || 0 === a % 400), Qd = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Rd = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Sd = (a, b, c, d) => {
|
|
2138
2146
|
function e(k, t, r) {
|
|
2139
2147
|
for (k = "number" == typeof k ? k.toString() : k || ""; k.length < t;) {
|
|
2140
2148
|
k = r[0] + k;
|
|
@@ -2148,9 +2156,9 @@ var Jd = [], Kd = [], Ld = {}, Nd = () => {
|
|
|
2148
2156
|
function r(D) {
|
|
2149
2157
|
return 0 > D ? -1 : 0 < D ? 1 : 0;
|
|
2150
2158
|
}
|
|
2151
|
-
var
|
|
2152
|
-
0 === (
|
|
2153
|
-
return
|
|
2159
|
+
var B;
|
|
2160
|
+
0 === (B = r(k.getFullYear() - t.getFullYear())) && 0 === (B = r(k.getMonth() - t.getMonth())) && (B = r(k.getDate() - t.getDate()));
|
|
2161
|
+
return B;
|
|
2154
2162
|
}
|
|
2155
2163
|
function n(k) {
|
|
2156
2164
|
switch(k.getDay()) {
|
|
@@ -2173,9 +2181,9 @@ var Jd = [], Kd = [], Ld = {}, Nd = () => {
|
|
|
2173
2181
|
function p(k) {
|
|
2174
2182
|
var t = k.ca;
|
|
2175
2183
|
for (k = new Date((new Date(k.da + 1900, 0, 1)).getTime()); 0 < t;) {
|
|
2176
|
-
var r = k.getMonth(),
|
|
2177
|
-
if (t >
|
|
2178
|
-
t -=
|
|
2184
|
+
var r = k.getMonth(), B = (Pd(k.getFullYear()) ? Qd : Rd)[r];
|
|
2185
|
+
if (t > B - k.getDate()) {
|
|
2186
|
+
t -= B - k.getDate() + 1, k.setDate(1), 11 > r ? k.setMonth(r + 1) : (k.setMonth(0), k.setFullYear(k.getFullYear() + 1));
|
|
2179
2187
|
} else {
|
|
2180
2188
|
k.setDate(k.getDate() + t);
|
|
2181
2189
|
break;
|
|
@@ -2199,18 +2207,18 @@ var Jd = [], Kd = [], Ld = {}, Nd = () => {
|
|
|
2199
2207
|
0 == k ? k = 12 : 12 < k && (k -= 12);
|
|
2200
2208
|
return f(k, 2);
|
|
2201
2209
|
}, "%j":k => {
|
|
2202
|
-
for (var t = 0, r = 0; r <= k.Ga - 1; t += (
|
|
2210
|
+
for (var t = 0, r = 0; r <= k.Ga - 1; t += (Pd(k.da + 1900) ? Qd : Rd)[r++]) {
|
|
2203
2211
|
}
|
|
2204
2212
|
return f(k.Sa + t, 3);
|
|
2205
2213
|
}, "%m":k => f(k.Ga + 1, 2), "%M":k => f(k.vc, 2), "%n":() => "\n", "%p":k => 0 <= k.Fa && 12 > k.Fa ? "AM" : "PM", "%S":k => f(k.wc, 2), "%t":() => "\t", "%u":k => k.R || 7, "%U":k => f(Math.floor((k.ca + 7 - k.R) / 7), 2), "%V":k => {
|
|
2206
2214
|
var t = Math.floor((k.ca + 7 - (k.R + 6) % 7) / 7);
|
|
2207
2215
|
2 >= (k.R + 371 - k.ca - 2) % 7 && t++;
|
|
2208
2216
|
if (t) {
|
|
2209
|
-
53 == t && (r = (k.R + 371 - k.ca) % 7, 4 == r || 3 == r &&
|
|
2217
|
+
53 == t && (r = (k.R + 371 - k.ca) % 7, 4 == r || 3 == r && Pd(k.da) || (t = 1));
|
|
2210
2218
|
} else {
|
|
2211
2219
|
t = 52;
|
|
2212
2220
|
var r = (k.R + 7 - k.ca - 1) % 7;
|
|
2213
|
-
(4 == r || 5 == r &&
|
|
2221
|
+
(4 == r || 5 == r && Pd(k.da % 400 - 1)) && t++;
|
|
2214
2222
|
}
|
|
2215
2223
|
return f(t, 2);
|
|
2216
2224
|
}, "%w":k => k.R, "%W":k => f(Math.floor((k.ca + 7 - (k.R + 6) % 7) / 7), 2), "%y":k => (k.da + 1900).toString().substring(2), "%Y":k => k.da + 1900, "%z":k => {
|
|
@@ -2228,7 +2236,7 @@ var Jd = [], Kd = [], Ld = {}, Nd = () => {
|
|
|
2228
2236
|
if (u.length > b) {
|
|
2229
2237
|
return 0;
|
|
2230
2238
|
}
|
|
2231
|
-
|
|
2239
|
+
C.set(u, a);
|
|
2232
2240
|
return u.length - 1;
|
|
2233
2241
|
};
|
|
2234
2242
|
function Pb(a, b, c, d) {
|
|
@@ -2316,10 +2324,10 @@ m.count_emval_handles = function() {
|
|
|
2316
2324
|
return a;
|
|
2317
2325
|
};
|
|
2318
2326
|
uc = m.PureVirtualError = tc("PureVirtualError");
|
|
2319
|
-
for (var
|
|
2320
|
-
|
|
2327
|
+
for (var Td = Array(256), Ud = 0; 256 > Ud; ++Ud) {
|
|
2328
|
+
Td[Ud] = String.fromCharCode(Ud);
|
|
2321
2329
|
}
|
|
2322
|
-
vc =
|
|
2330
|
+
vc = Td;
|
|
2323
2331
|
m.getInheritedInstanceCount = function() {
|
|
2324
2332
|
return Object.keys(zc).length;
|
|
2325
2333
|
};
|
|
@@ -2424,7 +2432,7 @@ hd.prototype.fromWireType = function(a) {
|
|
|
2424
2432
|
return null === e ? b.call(this) : this.ua ? Oc(d.i.N, {u:d, o:e, L:this, G:a,}) : Oc(d.i.N, {u:d, o:e,});
|
|
2425
2433
|
};
|
|
2426
2434
|
nd = m.UnboundTypeError = tc("UnboundTypeError");
|
|
2427
|
-
var
|
|
2435
|
+
var Xd = {__syscall_fcntl64:function(a, b, c) {
|
|
2428
2436
|
lc = c;
|
|
2429
2437
|
try {
|
|
2430
2438
|
var d = Tb(a);
|
|
@@ -2448,7 +2456,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2448
2456
|
case 8:
|
|
2449
2457
|
return -28;
|
|
2450
2458
|
case 9:
|
|
2451
|
-
return L[
|
|
2459
|
+
return L[Vd() >> 2] = 28, -1;
|
|
2452
2460
|
default:
|
|
2453
2461
|
return -28;
|
|
2454
2462
|
}
|
|
@@ -2477,7 +2485,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2477
2485
|
L[e + 8 >> 2] = 191;
|
|
2478
2486
|
L[e + 12 >> 2] = 35387;
|
|
2479
2487
|
for (var f = 0; 32 > f; f++) {
|
|
2480
|
-
|
|
2488
|
+
C[e + f + 17 >> 0] = b[f] || 0;
|
|
2481
2489
|
}
|
|
2482
2490
|
}
|
|
2483
2491
|
return 0;
|
|
@@ -2493,7 +2501,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2493
2501
|
}
|
|
2494
2502
|
if (d.s.V.cc) {
|
|
2495
2503
|
for (e = mc(), b = [], f = 0; 32 > f; f++) {
|
|
2496
|
-
b.push(
|
|
2504
|
+
b.push(C[e + f + 17 >> 0]);
|
|
2497
2505
|
}
|
|
2498
2506
|
}
|
|
2499
2507
|
return 0;
|
|
@@ -2599,9 +2607,9 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2599
2607
|
var n = {};
|
|
2600
2608
|
e.forEach((p, l) => {
|
|
2601
2609
|
var u = g[l], v = p.Wb, x = p.Xb, k = g[l + e.length], t = p.qc, r = p.sc;
|
|
2602
|
-
n[p.Sb] = {read:
|
|
2610
|
+
n[p.Sb] = {read:B => u.fromWireType(v(x, B)), write:(B, D) => {
|
|
2603
2611
|
var w = [];
|
|
2604
|
-
t(r,
|
|
2612
|
+
t(r, B, k.toWireType(w, D));
|
|
2605
2613
|
Rc(w);
|
|
2606
2614
|
}};
|
|
2607
2615
|
});
|
|
@@ -2636,7 +2644,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2636
2644
|
return n ? d : e;
|
|
2637
2645
|
}, argPackAdvance:8, readValueFromPointer:function(g) {
|
|
2638
2646
|
if (1 === c) {
|
|
2639
|
-
var n =
|
|
2647
|
+
var n = C;
|
|
2640
2648
|
} else if (2 === c) {
|
|
2641
2649
|
n = Da;
|
|
2642
2650
|
} else if (4 === c) {
|
|
@@ -2660,9 +2668,9 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2660
2668
|
t = t[0];
|
|
2661
2669
|
if (d) {
|
|
2662
2670
|
var r = t.i;
|
|
2663
|
-
var
|
|
2671
|
+
var B = r.N;
|
|
2664
2672
|
} else {
|
|
2665
|
-
|
|
2673
|
+
B = Zc.prototype;
|
|
2666
2674
|
}
|
|
2667
2675
|
t = oc(k, function() {
|
|
2668
2676
|
if (Object.getPrototypeOf(this) !== D) {
|
|
@@ -2677,19 +2685,19 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2677
2685
|
}
|
|
2678
2686
|
return T.apply(this, arguments);
|
|
2679
2687
|
});
|
|
2680
|
-
var D = Object.create(
|
|
2688
|
+
var D = Object.create(B, {constructor:{value:t},});
|
|
2681
2689
|
t.prototype = D;
|
|
2682
2690
|
var w = new bd(u, t, D, x, r, f, n, l);
|
|
2683
2691
|
w.A && (void 0 === w.A.oa && (w.A.oa = []), w.A.oa.push(w));
|
|
2684
2692
|
r = new hd(u, w, !0, !1);
|
|
2685
|
-
|
|
2693
|
+
B = new hd(u + "*", w, !1, !1);
|
|
2686
2694
|
var M = new hd(u + " const*", w, !1, !0);
|
|
2687
|
-
Kc[a] = {pointerType:
|
|
2695
|
+
Kc[a] = {pointerType:B, Kb:M};
|
|
2688
2696
|
jd(k, t);
|
|
2689
|
-
return [r,
|
|
2697
|
+
return [r, B, M];
|
|
2690
2698
|
});
|
|
2691
2699
|
}, _embind_register_class_class_function:function(a, b, c, d, e, f, g) {
|
|
2692
|
-
var n =
|
|
2700
|
+
var n = sd(c, d);
|
|
2693
2701
|
b = W(b);
|
|
2694
2702
|
f = Z(e, f);
|
|
2695
2703
|
Y([], [a], function(p) {
|
|
@@ -2743,7 +2751,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2743
2751
|
return [];
|
|
2744
2752
|
});
|
|
2745
2753
|
}, _embind_register_class_constructor:function(a, b, c, d, e, f) {
|
|
2746
|
-
var g =
|
|
2754
|
+
var g = sd(b, c);
|
|
2747
2755
|
e = Z(d, e);
|
|
2748
2756
|
Y([], [a], function(n) {
|
|
2749
2757
|
n = n[0];
|
|
@@ -2763,7 +2771,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2763
2771
|
return [];
|
|
2764
2772
|
});
|
|
2765
2773
|
}, _embind_register_class_function:function(a, b, c, d, e, f, g, n) {
|
|
2766
|
-
var p =
|
|
2774
|
+
var p = sd(c, d);
|
|
2767
2775
|
b = W(b);
|
|
2768
2776
|
f = Z(e, f);
|
|
2769
2777
|
Y([], [a], function(l) {
|
|
@@ -2799,15 +2807,15 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2799
2807
|
Object.defineProperty(u.i.N, b, x);
|
|
2800
2808
|
Y([], p ? [c, g] : [c], function(k) {
|
|
2801
2809
|
var t = k[0], r = {get() {
|
|
2802
|
-
var D =
|
|
2810
|
+
var D = td(this, u, v + " getter");
|
|
2803
2811
|
return t.fromWireType(e(f, D));
|
|
2804
2812
|
}, enumerable:!0};
|
|
2805
2813
|
if (p) {
|
|
2806
2814
|
p = Z(n, p);
|
|
2807
|
-
var
|
|
2815
|
+
var B = k[1];
|
|
2808
2816
|
r.set = function(D) {
|
|
2809
|
-
var w =
|
|
2810
|
-
p(l, w,
|
|
2817
|
+
var w = td(this, u, v + " setter"), M = [];
|
|
2818
|
+
p(l, w, B.toWireType(M, D));
|
|
2811
2819
|
Rc(M);
|
|
2812
2820
|
};
|
|
2813
2821
|
}
|
|
@@ -2820,7 +2828,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2820
2828
|
b = W(b);
|
|
2821
2829
|
Vc(a, {name:b, fromWireType:function(c) {
|
|
2822
2830
|
var d = rc(c);
|
|
2823
|
-
|
|
2831
|
+
ud(c);
|
|
2824
2832
|
return d;
|
|
2825
2833
|
}, toWireType:function(c, d) {
|
|
2826
2834
|
return sc(d);
|
|
@@ -2835,7 +2843,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2835
2843
|
return this.constructor.values[f];
|
|
2836
2844
|
}, toWireType:function(f, g) {
|
|
2837
2845
|
return g.value;
|
|
2838
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
2846
|
+
}, argPackAdvance:8, readValueFromPointer:vd(b, c, d), K:null,});
|
|
2839
2847
|
ad(b, e);
|
|
2840
2848
|
}, _embind_register_enum_value:function(a, b, c) {
|
|
2841
2849
|
var d = Fc(a, "enum");
|
|
@@ -2852,9 +2860,9 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2852
2860
|
return d;
|
|
2853
2861
|
}, toWireType:function(d, e) {
|
|
2854
2862
|
return e;
|
|
2855
|
-
}, argPackAdvance:8, readValueFromPointer:
|
|
2863
|
+
}, argPackAdvance:8, readValueFromPointer:wd(b, c), K:null,});
|
|
2856
2864
|
}, _embind_register_function:function(a, b, c, d, e, f) {
|
|
2857
|
-
var g =
|
|
2865
|
+
var g = sd(b, c);
|
|
2858
2866
|
a = W(a);
|
|
2859
2867
|
e = Z(d, e);
|
|
2860
2868
|
ad(a, function() {
|
|
@@ -2878,7 +2886,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2878
2886
|
} : function(n, p) {
|
|
2879
2887
|
return p;
|
|
2880
2888
|
};
|
|
2881
|
-
Vc(a, {name:b, fromWireType:f, toWireType:c, argPackAdvance:8, readValueFromPointer:
|
|
2889
|
+
Vc(a, {name:b, fromWireType:f, toWireType:c, argPackAdvance:8, readValueFromPointer:xd(b, e, 0 !== d), K:null,});
|
|
2882
2890
|
}, _embind_register_memory_view:function(a, b, c) {
|
|
2883
2891
|
function d(f) {
|
|
2884
2892
|
f >>= 2;
|
|
@@ -2920,7 +2928,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2920
2928
|
var f = "string" == typeof e;
|
|
2921
2929
|
f || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array || V("Cannot pass non-string to std::string");
|
|
2922
2930
|
var g = c && f ? pb(e) : e.length;
|
|
2923
|
-
var n =
|
|
2931
|
+
var n = Wd(4 + g + 1), p = n + 4;
|
|
2924
2932
|
N[n >> 2] = g;
|
|
2925
2933
|
if (c && f) {
|
|
2926
2934
|
qb(e, E, p, g + 1);
|
|
@@ -2945,13 +2953,13 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2945
2953
|
}, _embind_register_std_wstring:function(a, b, c) {
|
|
2946
2954
|
c = W(c);
|
|
2947
2955
|
if (2 === b) {
|
|
2948
|
-
var d =
|
|
2949
|
-
var e =
|
|
2950
|
-
var f =
|
|
2956
|
+
var d = zd;
|
|
2957
|
+
var e = Ad;
|
|
2958
|
+
var f = Bd;
|
|
2951
2959
|
var g = () => Ea;
|
|
2952
2960
|
var n = 1;
|
|
2953
2961
|
} else {
|
|
2954
|
-
4 === b && (d =
|
|
2962
|
+
4 === b && (d = Cd, e = Dd, f = Ed, g = () => N, n = 2);
|
|
2955
2963
|
}
|
|
2956
2964
|
Vc(a, {name:c, fromWireType:function(p) {
|
|
2957
2965
|
for (var l = N[p >> 2], u = g(), v, x = p + 4, k = 0; k <= l; ++k) {
|
|
@@ -2964,7 +2972,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2964
2972
|
return v;
|
|
2965
2973
|
}, toWireType:function(p, l) {
|
|
2966
2974
|
"string" != typeof l && V(`Cannot pass non-string to C++ string type ${c}`);
|
|
2967
|
-
var u = f(l), v =
|
|
2975
|
+
var u = f(l), v = Wd(4 + u + b);
|
|
2968
2976
|
N[v >> 2] = u >> n;
|
|
2969
2977
|
e(l, v + 4, u + b);
|
|
2970
2978
|
null !== p && p.push(Ec, v);
|
|
@@ -2988,28 +2996,28 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2988
2996
|
N[c >> 2] = e;
|
|
2989
2997
|
return b.toWireType(d, a);
|
|
2990
2998
|
}, _emval_call_method:function(a, b, c, d, e) {
|
|
2991
|
-
a =
|
|
2999
|
+
a = Hd[a];
|
|
2992
3000
|
b = rc(b);
|
|
2993
|
-
c =
|
|
3001
|
+
c = Gd(c);
|
|
2994
3002
|
var f = [];
|
|
2995
3003
|
N[d >> 2] = sc(f);
|
|
2996
3004
|
return a(b, c, f, e);
|
|
2997
3005
|
}, _emval_call_void_method:function(a, b, c, d) {
|
|
2998
|
-
a =
|
|
3006
|
+
a = Hd[a];
|
|
2999
3007
|
b = rc(b);
|
|
3000
|
-
c =
|
|
3008
|
+
c = Gd(c);
|
|
3001
3009
|
a(b, c, null, d);
|
|
3002
|
-
}, _emval_decref:
|
|
3003
|
-
var c =
|
|
3010
|
+
}, _emval_decref:ud, _emval_get_method_caller:function(a, b) {
|
|
3011
|
+
var c = Jd(a, b), d = c[0];
|
|
3004
3012
|
b = d.name + "_$" + c.slice(1).map(function(g) {
|
|
3005
3013
|
return g.name;
|
|
3006
3014
|
}).join("_") + "$";
|
|
3007
|
-
var e =
|
|
3015
|
+
var e = Kd[b];
|
|
3008
3016
|
if (void 0 !== e) {
|
|
3009
3017
|
return e;
|
|
3010
3018
|
}
|
|
3011
3019
|
var f = Array(a - 1);
|
|
3012
|
-
e =
|
|
3020
|
+
e = Id((g, n, p, l) => {
|
|
3013
3021
|
for (var u = 0, v = 0; v < a - 1; ++v) {
|
|
3014
3022
|
f[v] = c[v + 1].readValueFromPointer(l + u), u += c[v + 1].argPackAdvance;
|
|
3015
3023
|
}
|
|
@@ -3021,9 +3029,9 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3021
3029
|
return d.toWireType(p, g);
|
|
3022
3030
|
}
|
|
3023
3031
|
});
|
|
3024
|
-
return
|
|
3032
|
+
return Kd[b] = e;
|
|
3025
3033
|
}, _emval_get_module_property:function(a) {
|
|
3026
|
-
a =
|
|
3034
|
+
a = Gd(a);
|
|
3027
3035
|
return sc(m[a]);
|
|
3028
3036
|
}, _emval_get_property:function(a, b) {
|
|
3029
3037
|
a = rc(a);
|
|
@@ -3032,13 +3040,13 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3032
3040
|
}, _emval_incref:function(a) {
|
|
3033
3041
|
4 < a && (U.get(a).tb += 1);
|
|
3034
3042
|
}, _emval_new_cstring:function(a) {
|
|
3035
|
-
return sc(
|
|
3043
|
+
return sc(Gd(a));
|
|
3036
3044
|
}, _emval_new_object:function() {
|
|
3037
3045
|
return sc({});
|
|
3038
3046
|
}, _emval_run_destructors:function(a) {
|
|
3039
3047
|
var b = rc(a);
|
|
3040
3048
|
Rc(b);
|
|
3041
|
-
|
|
3049
|
+
ud(a);
|
|
3042
3050
|
}, _emval_set_property:function(a, b, c) {
|
|
3043
3051
|
a = rc(a);
|
|
3044
3052
|
b = rc(b);
|
|
@@ -3051,12 +3059,12 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3051
3059
|
}, abort:() => {
|
|
3052
3060
|
Aa("");
|
|
3053
3061
|
}, emscripten_asm_const_int:(a, b, c) => {
|
|
3054
|
-
|
|
3062
|
+
Ld.length = 0;
|
|
3055
3063
|
var d;
|
|
3056
3064
|
for (c >>= 2; d = E[b++];) {
|
|
3057
|
-
c += 105 != d & c,
|
|
3065
|
+
c += 105 != d & c, Ld.push(105 == d ? L[c] : Ia[c++ >> 1]), ++c;
|
|
3058
3066
|
}
|
|
3059
|
-
return db[a].apply(null,
|
|
3067
|
+
return db[a].apply(null, Ld);
|
|
3060
3068
|
}, emscripten_date_now:function() {
|
|
3061
3069
|
return Date.now();
|
|
3062
3070
|
}, emscripten_get_now:() => performance.now(), emscripten_memcpy_big:(a, b, c) => E.copyWithin(a, b, b + c), emscripten_resize_heap:a => {
|
|
@@ -3088,18 +3096,18 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3088
3096
|
return !1;
|
|
3089
3097
|
}, environ_get:(a, b) => {
|
|
3090
3098
|
var c = 0;
|
|
3091
|
-
|
|
3099
|
+
Od().forEach(function(d, e) {
|
|
3092
3100
|
var f = b + c;
|
|
3093
3101
|
e = N[a + 4 * e >> 2] = f;
|
|
3094
3102
|
for (f = 0; f < d.length; ++f) {
|
|
3095
|
-
|
|
3103
|
+
C[e++ >> 0] = d.charCodeAt(f);
|
|
3096
3104
|
}
|
|
3097
|
-
|
|
3105
|
+
C[e >> 0] = 0;
|
|
3098
3106
|
c += d.length + 1;
|
|
3099
3107
|
});
|
|
3100
3108
|
return 0;
|
|
3101
3109
|
}, environ_sizes_get:(a, b) => {
|
|
3102
|
-
var c =
|
|
3110
|
+
var c = Od();
|
|
3103
3111
|
N[a >> 2] = c.length;
|
|
3104
3112
|
var d = 0;
|
|
3105
3113
|
c.forEach(function(e) {
|
|
@@ -3137,7 +3145,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3137
3145
|
for (var f, g = b = 0; g < c; g++) {
|
|
3138
3146
|
var n = N[a >> 2], p = N[a + 4 >> 2];
|
|
3139
3147
|
a += 8;
|
|
3140
|
-
var l = e, u = n, v = p, x = f, k =
|
|
3148
|
+
var l = e, u = n, v = p, x = f, k = C;
|
|
3141
3149
|
if (0 > v || 0 > x) {
|
|
3142
3150
|
throw new O(28);
|
|
3143
3151
|
}
|
|
@@ -3161,16 +3169,16 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3161
3169
|
}
|
|
3162
3170
|
var r = l.m.read(l, k, u, v, x);
|
|
3163
3171
|
t || (l.position += r);
|
|
3164
|
-
var
|
|
3165
|
-
if (0 >
|
|
3172
|
+
var B = r;
|
|
3173
|
+
if (0 > B) {
|
|
3166
3174
|
var D = -1;
|
|
3167
3175
|
break a;
|
|
3168
3176
|
}
|
|
3169
|
-
b +=
|
|
3170
|
-
if (
|
|
3177
|
+
b += B;
|
|
3178
|
+
if (B < p) {
|
|
3171
3179
|
break;
|
|
3172
3180
|
}
|
|
3173
|
-
"undefined" !== typeof f && (f +=
|
|
3181
|
+
"undefined" !== typeof f && (f += B);
|
|
3174
3182
|
}
|
|
3175
3183
|
D = b;
|
|
3176
3184
|
}
|
|
@@ -3209,7 +3217,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3209
3217
|
for (var f, g = b = 0; g < c; g++) {
|
|
3210
3218
|
var n = N[a >> 2], p = N[a + 4 >> 2];
|
|
3211
3219
|
a += 8;
|
|
3212
|
-
var l = e, u = n, v = p, x = f, k =
|
|
3220
|
+
var l = e, u = n, v = p, x = f, k = C;
|
|
3213
3221
|
if (0 > v || 0 > x) {
|
|
3214
3222
|
throw new O(28);
|
|
3215
3223
|
}
|
|
@@ -3234,13 +3242,13 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3234
3242
|
}
|
|
3235
3243
|
var r = l.m.write(l, k, u, v, x, void 0);
|
|
3236
3244
|
t || (l.position += r);
|
|
3237
|
-
var
|
|
3238
|
-
if (0 >
|
|
3245
|
+
var B = r;
|
|
3246
|
+
if (0 > B) {
|
|
3239
3247
|
var D = -1;
|
|
3240
3248
|
break a;
|
|
3241
3249
|
}
|
|
3242
|
-
b +=
|
|
3243
|
-
"undefined" !== typeof f && (f +=
|
|
3250
|
+
b += B;
|
|
3251
|
+
"undefined" !== typeof f && (f += B);
|
|
3244
3252
|
}
|
|
3245
3253
|
D = b;
|
|
3246
3254
|
}
|
|
@@ -3252,14 +3260,14 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3252
3260
|
}
|
|
3253
3261
|
return w.aa;
|
|
3254
3262
|
}
|
|
3255
|
-
}, strftime_l:(a, b, c, d) =>
|
|
3263
|
+
}, strftime_l:(a, b, c, d) => Sd(a, b, c, d)};
|
|
3256
3264
|
(function() {
|
|
3257
3265
|
function a(c) {
|
|
3258
|
-
|
|
3259
|
-
Ba =
|
|
3266
|
+
z = c = c.exports;
|
|
3267
|
+
Ba = z.memory;
|
|
3260
3268
|
Ja();
|
|
3261
|
-
Ka =
|
|
3262
|
-
Ma.unshift(
|
|
3269
|
+
Ka = z.__indirect_function_table;
|
|
3270
|
+
Ma.unshift(z.__wasm_call_ctors);
|
|
3263
3271
|
Pa--;
|
|
3264
3272
|
m.monitorRunDependencies && m.monitorRunDependencies(Pa);
|
|
3265
3273
|
if (0 == Pa && (null !== Qa && (clearInterval(Qa), Qa = null), Ra)) {
|
|
@@ -3269,7 +3277,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3269
3277
|
}
|
|
3270
3278
|
return c;
|
|
3271
3279
|
}
|
|
3272
|
-
var b = {env:
|
|
3280
|
+
var b = {env:Xd, wasi_snapshot_preview1:Xd,};
|
|
3273
3281
|
Pa++;
|
|
3274
3282
|
m.monitorRunDependencies && m.monitorRunDependencies(Pa);
|
|
3275
3283
|
if (m.instantiateWasm) {
|
|
@@ -3284,28 +3292,28 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3284
3292
|
}).catch(ea);
|
|
3285
3293
|
return {};
|
|
3286
3294
|
})();
|
|
3287
|
-
var Ec = a => (Ec =
|
|
3288
|
-
m._ma_malloc_emscripten = (a, b) => (m._ma_malloc_emscripten =
|
|
3289
|
-
m._ma_free_emscripten = (a, b) => (m._ma_free_emscripten =
|
|
3290
|
-
var bb = m._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (bb = m._ma_device_process_pcm_frames_capture__webaudio =
|
|
3291
|
-
m.__embind_initialize_bindings = () => (m.__embind_initialize_bindings =
|
|
3292
|
-
m.dynCall_iiji = (a, b, c, d, e) => (m.dynCall_iiji =
|
|
3293
|
-
m.dynCall_jiji = (a, b, c, d, e) => (m.dynCall_jiji =
|
|
3294
|
-
m.dynCall_iiiji = (a, b, c, d, e, f) => (m.dynCall_iiiji =
|
|
3295
|
-
m.dynCall_iij = (a, b, c, d) => (m.dynCall_iij =
|
|
3296
|
-
m.dynCall_jii = (a, b, c) => (m.dynCall_jii =
|
|
3297
|
-
m.dynCall_viijii = (a, b, c, d, e, f, g) => (m.dynCall_viijii =
|
|
3298
|
-
m.dynCall_iiiiij = (a, b, c, d, e, f, g) => (m.dynCall_iiiiij =
|
|
3299
|
-
m.dynCall_iiiiijj = (a, b, c, d, e, f, g, n, p) => (m.dynCall_iiiiijj =
|
|
3300
|
-
m.dynCall_iiiiiijj = (a, b, c, d, e, f, g, n, p, l) => (m.dynCall_iiiiiijj =
|
|
3301
|
-
var
|
|
3302
|
-
Ra = function
|
|
3303
|
-
|
|
3304
|
-
|
|
3295
|
+
var Ec = a => (Ec = z.free)(a), Wd = a => (Wd = z.malloc)(a), ab = m._ma_device__on_notification_unlocked = a => (ab = m._ma_device__on_notification_unlocked = z.ma_device__on_notification_unlocked)(a);
|
|
3296
|
+
m._ma_malloc_emscripten = (a, b) => (m._ma_malloc_emscripten = z.ma_malloc_emscripten)(a, b);
|
|
3297
|
+
m._ma_free_emscripten = (a, b) => (m._ma_free_emscripten = z.ma_free_emscripten)(a, b);
|
|
3298
|
+
var bb = m._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (bb = m._ma_device_process_pcm_frames_capture__webaudio = z.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), cb = m._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (cb = m._ma_device_process_pcm_frames_playback__webaudio = z.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), Vd = () => (Vd = z.__errno_location)(), Dc = a => (Dc = z.__getTypeName)(a);
|
|
3299
|
+
m.__embind_initialize_bindings = () => (m.__embind_initialize_bindings = z._embind_initialize_bindings)();
|
|
3300
|
+
m.dynCall_iiji = (a, b, c, d, e) => (m.dynCall_iiji = z.dynCall_iiji)(a, b, c, d, e);
|
|
3301
|
+
m.dynCall_jiji = (a, b, c, d, e) => (m.dynCall_jiji = z.dynCall_jiji)(a, b, c, d, e);
|
|
3302
|
+
m.dynCall_iiiji = (a, b, c, d, e, f) => (m.dynCall_iiiji = z.dynCall_iiiji)(a, b, c, d, e, f);
|
|
3303
|
+
m.dynCall_iij = (a, b, c, d) => (m.dynCall_iij = z.dynCall_iij)(a, b, c, d);
|
|
3304
|
+
m.dynCall_jii = (a, b, c) => (m.dynCall_jii = z.dynCall_jii)(a, b, c);
|
|
3305
|
+
m.dynCall_viijii = (a, b, c, d, e, f, g) => (m.dynCall_viijii = z.dynCall_viijii)(a, b, c, d, e, f, g);
|
|
3306
|
+
m.dynCall_iiiiij = (a, b, c, d, e, f, g) => (m.dynCall_iiiiij = z.dynCall_iiiiij)(a, b, c, d, e, f, g);
|
|
3307
|
+
m.dynCall_iiiiijj = (a, b, c, d, e, f, g, n, p) => (m.dynCall_iiiiijj = z.dynCall_iiiiijj)(a, b, c, d, e, f, g, n, p);
|
|
3308
|
+
m.dynCall_iiiiiijj = (a, b, c, d, e, f, g, n, p, l) => (m.dynCall_iiiiiijj = z.dynCall_iiiiiijj)(a, b, c, d, e, f, g, n, p, l);
|
|
3309
|
+
var Yd;
|
|
3310
|
+
Ra = function Zd() {
|
|
3311
|
+
Yd || $d();
|
|
3312
|
+
Yd || (Ra = Zd);
|
|
3305
3313
|
};
|
|
3306
|
-
function
|
|
3314
|
+
function $d() {
|
|
3307
3315
|
function a() {
|
|
3308
|
-
if (!
|
|
3316
|
+
if (!Yd && (Yd = !0, m.calledRun = !0, !Ca)) {
|
|
3309
3317
|
m.noFSInit || hc || (hc = !0, gc(), m.stdin = m.stdin, m.stdout = m.stdout, m.stderr = m.stderr, m.stdin ? jc("stdin", m.stdin) : cc("/dev/tty", "/dev/stdin"), m.stdout ? jc("stdout", null, m.stdout) : cc("/dev/tty", "/dev/stdout"), m.stderr ? jc("stderr", null, m.stderr) : cc("/dev/tty1", "/dev/stderr"), ec("/dev/stdin", 0), ec("/dev/stdout", 1), ec("/dev/stderr", 1));
|
|
3310
3318
|
Jb = !1;
|
|
3311
3319
|
eb(Ma);
|
|
@@ -3342,7 +3350,7 @@ if (m.preInit) {
|
|
|
3342
3350
|
m.preInit.pop()();
|
|
3343
3351
|
}
|
|
3344
3352
|
}
|
|
3345
|
-
|
|
3353
|
+
$d();
|
|
3346
3354
|
|
|
3347
3355
|
|
|
3348
3356
|
|
|
@@ -3357,7 +3365,7 @@ Zd();
|
|
|
3357
3365
|
/* 2 */
|
|
3358
3366
|
/***/ ((module) => {
|
|
3359
3367
|
|
|
3360
|
-
module.exports = JSON.parse('{"name":"@rive-app/canvas","version":"2.
|
|
3368
|
+
module.exports = JSON.parse('{"name":"@rive-app/canvas","version":"2.22.0","description":"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}}');
|
|
3361
3369
|
|
|
3362
3370
|
/***/ }),
|
|
3363
3371
|
/* 3 */
|
|
@@ -3901,6 +3909,7 @@ var Fit;
|
|
|
3901
3909
|
Fit["FitHeight"] = "fitHeight";
|
|
3902
3910
|
Fit["None"] = "none";
|
|
3903
3911
|
Fit["ScaleDown"] = "scaleDown";
|
|
3912
|
+
Fit["Layout"] = "layout";
|
|
3904
3913
|
})(Fit || (Fit = {}));
|
|
3905
3914
|
// Alignment options for the canvas
|
|
3906
3915
|
var Alignment;
|
|
@@ -3918,13 +3927,14 @@ var Alignment;
|
|
|
3918
3927
|
// Alignment options for Rive animations in a HTML canvas
|
|
3919
3928
|
var Layout = /** @class */ (function () {
|
|
3920
3929
|
function Layout(params) {
|
|
3921
|
-
var _a, _b, _c, _d, _e, _f;
|
|
3930
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
3922
3931
|
this.fit = (_a = params === null || params === void 0 ? void 0 : params.fit) !== null && _a !== void 0 ? _a : Fit.Contain;
|
|
3923
3932
|
this.alignment = (_b = params === null || params === void 0 ? void 0 : params.alignment) !== null && _b !== void 0 ? _b : Alignment.Center;
|
|
3924
|
-
this.
|
|
3925
|
-
this.
|
|
3926
|
-
this.
|
|
3927
|
-
this.
|
|
3933
|
+
this.layoutScaleFactor = (_c = params === null || params === void 0 ? void 0 : params.layoutScaleFactor) !== null && _c !== void 0 ? _c : 1;
|
|
3934
|
+
this.minX = (_d = params === null || params === void 0 ? void 0 : params.minX) !== null && _d !== void 0 ? _d : 0;
|
|
3935
|
+
this.minY = (_e = params === null || params === void 0 ? void 0 : params.minY) !== null && _e !== void 0 ? _e : 0;
|
|
3936
|
+
this.maxX = (_f = params === null || params === void 0 ? void 0 : params.maxX) !== null && _f !== void 0 ? _f : 0;
|
|
3937
|
+
this.maxY = (_g = params === null || params === void 0 ? void 0 : params.maxY) !== null && _g !== void 0 ? _g : 0;
|
|
3928
3938
|
}
|
|
3929
3939
|
// Alternative constructor to build a Layout from an interface/object
|
|
3930
3940
|
Layout.new = function (_a) {
|
|
@@ -3936,10 +3946,11 @@ var Layout = /** @class */ (function () {
|
|
|
3936
3946
|
* Makes a copy of the layout, replacing any specified parameters
|
|
3937
3947
|
*/
|
|
3938
3948
|
Layout.prototype.copyWith = function (_a) {
|
|
3939
|
-
var fit = _a.fit, alignment = _a.alignment, minX = _a.minX, minY = _a.minY, maxX = _a.maxX, maxY = _a.maxY;
|
|
3949
|
+
var fit = _a.fit, alignment = _a.alignment, layoutScaleFactor = _a.layoutScaleFactor, minX = _a.minX, minY = _a.minY, maxX = _a.maxX, maxY = _a.maxY;
|
|
3940
3950
|
return new Layout({
|
|
3941
3951
|
fit: fit !== null && fit !== void 0 ? fit : this.fit,
|
|
3942
3952
|
alignment: alignment !== null && alignment !== void 0 ? alignment : this.alignment,
|
|
3953
|
+
layoutScaleFactor: layoutScaleFactor !== null && layoutScaleFactor !== void 0 ? layoutScaleFactor : this.layoutScaleFactor,
|
|
3943
3954
|
minX: minX !== null && minX !== void 0 ? minX : this.minX,
|
|
3944
3955
|
minY: minY !== null && minY !== void 0 ? minY : this.minY,
|
|
3945
3956
|
maxX: maxX !== null && maxX !== void 0 ? maxX : this.maxX,
|
|
@@ -3963,6 +3974,8 @@ var Layout = /** @class */ (function () {
|
|
|
3963
3974
|
fit = rive.Fit.fitHeight;
|
|
3964
3975
|
else if (this.fit === Fit.ScaleDown)
|
|
3965
3976
|
fit = rive.Fit.scaleDown;
|
|
3977
|
+
else if (this.fit === Fit.Layout)
|
|
3978
|
+
fit = rive.Fit.layout;
|
|
3966
3979
|
else
|
|
3967
3980
|
fit = rive.Fit.none;
|
|
3968
3981
|
this.cachedRuntimeFit = fit;
|
|
@@ -5081,6 +5094,7 @@ var Rive = /** @class */ (function () {
|
|
|
5081
5094
|
this.enableRiveAssetCDN = true;
|
|
5082
5095
|
// Keep a local value of the set volume to update it asynchronously
|
|
5083
5096
|
this._volume = 1;
|
|
5097
|
+
this._devicePixelRatioUsed = 1;
|
|
5084
5098
|
// Whether the canvas element's size is 0
|
|
5085
5099
|
this._hasZeroSize = false;
|
|
5086
5100
|
// Durations to generate a frame for the last second. Used for performance profiling.
|
|
@@ -5507,7 +5521,7 @@ var Rive = /** @class */ (function () {
|
|
|
5507
5521
|
minY: _layout.minY,
|
|
5508
5522
|
maxX: _layout.maxX,
|
|
5509
5523
|
maxY: _layout.maxY,
|
|
5510
|
-
}, artboard.bounds);
|
|
5524
|
+
}, artboard.bounds, this._devicePixelRatioUsed * _layout.layoutScaleFactor);
|
|
5511
5525
|
};
|
|
5512
5526
|
Object.defineProperty(Rive.prototype, "fps", {
|
|
5513
5527
|
get: function () {
|
|
@@ -5760,10 +5774,16 @@ var Rive = /** @class */ (function () {
|
|
|
5760
5774
|
if (this.canvas instanceof HTMLCanvasElement && !!window) {
|
|
5761
5775
|
var _a = this.canvas.getBoundingClientRect(), width = _a.width, height = _a.height;
|
|
5762
5776
|
var dpr = customDevicePixelRatio || window.devicePixelRatio || 1;
|
|
5777
|
+
this._devicePixelRatioUsed = dpr;
|
|
5763
5778
|
this.canvas.width = dpr * width;
|
|
5764
5779
|
this.canvas.height = dpr * height;
|
|
5765
5780
|
this.startRendering();
|
|
5766
5781
|
this.resizeToCanvas();
|
|
5782
|
+
if (this.layout.fit === Fit.Layout) {
|
|
5783
|
+
var scaleFactor = this._layout.layoutScaleFactor;
|
|
5784
|
+
this.artboard.width = width / scaleFactor;
|
|
5785
|
+
this.artboard.height = height / scaleFactor;
|
|
5786
|
+
}
|
|
5767
5787
|
}
|
|
5768
5788
|
};
|
|
5769
5789
|
Object.defineProperty(Rive.prototype, "source", {
|