@rive-app/webgl2-advanced 2.39.1 → 2.40.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.wasm +0 -0
- package/webgl2_advanced.mjs +139 -3565
package/webgl2_advanced.mjs
CHANGED
|
@@ -1,3566 +1,140 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
};
|
|
140
|
-
const ja = k.onRuntimeInitialized;
|
|
141
|
-
k.onRuntimeInitialized = function() {
|
|
142
|
-
function a(q) {
|
|
143
|
-
this.D = q;
|
|
144
|
-
this.rb = q.getContext("2d");
|
|
145
|
-
this.Sa = d;
|
|
146
|
-
this.O = [];
|
|
147
|
-
this.ga = 0;
|
|
148
|
-
this.clear = function() {
|
|
149
|
-
console.assert(0 == this.ga);
|
|
150
|
-
this.O = [];
|
|
151
|
-
e.delete(this);
|
|
152
|
-
};
|
|
153
|
-
this.save = function() {
|
|
154
|
-
++this.ga;
|
|
155
|
-
this.O.push(d.save.bind(d));
|
|
156
|
-
};
|
|
157
|
-
this.restore = function() {
|
|
158
|
-
0 < this.ga && (this.O.push(d.restore.bind(d)), --this.ga);
|
|
159
|
-
};
|
|
160
|
-
this.transform = function(t) {
|
|
161
|
-
this.O.push(d.transform.bind(d, t));
|
|
162
|
-
};
|
|
163
|
-
this.align = function(t, y, z, B, G = 1.0) {
|
|
164
|
-
this.O.push(d.align.bind(d, t, y, z, B, G));
|
|
165
|
-
};
|
|
166
|
-
this.flush = function() {
|
|
167
|
-
console.assert(0 == this.ga);
|
|
168
|
-
e.add(this);
|
|
169
|
-
d.Ra || c();
|
|
170
|
-
};
|
|
171
|
-
this.bindContext = function() {
|
|
172
|
-
const t = this.Sa;
|
|
173
|
-
t && t.W && ka(t.W);
|
|
174
|
-
};
|
|
175
|
-
this["delete"] = function() {
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
function b(q, t = !1) {
|
|
179
|
-
var y = {alpha:!0, depth:t, stencil:t, antialias:t, premultipliedAlpha:!0, preserveDrawingBuffer:0, powerPreference:"high-performance", failIfMajorPerformanceCaveat:0, enableExtensionsByDefault:!1, explicitSwapControl:0, renderViaOffscreenBackBuffer:0,};
|
|
180
|
-
t = q.getContext("webgl2", y);
|
|
181
|
-
if (!t) {
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
y = la(t, y);
|
|
185
|
-
ka(y);
|
|
186
|
-
const z = f(q.width, q.height);
|
|
187
|
-
z.W = y;
|
|
188
|
-
z.D = q;
|
|
189
|
-
z.Ia = q.width;
|
|
190
|
-
z.Ha = q.height;
|
|
191
|
-
z.P = t;
|
|
192
|
-
z.wb = function() {
|
|
193
|
-
this.W && ka(this.W);
|
|
194
|
-
};
|
|
195
|
-
var B = z.delete;
|
|
196
|
-
z.delete = function() {
|
|
197
|
-
this.wb();
|
|
198
|
-
B.call(this);
|
|
199
|
-
var G = this.W;
|
|
200
|
-
p === v[G] && (p = null);
|
|
201
|
-
"object" == typeof JSEvents && JSEvents.Gc(v[G].C.canvas);
|
|
202
|
-
v[G] && v[G].C.canvas && (v[G].C.canvas.qb = void 0);
|
|
203
|
-
this.W = this.D = this.Ia = this.Ha = this.P = v[G] = null;
|
|
204
|
-
};
|
|
205
|
-
return z;
|
|
206
|
-
}
|
|
207
|
-
function c() {
|
|
208
|
-
if (d) {
|
|
209
|
-
var q = d.ub, t = 0, y = 0, z = 0, B = Array(e.size), G = 0;
|
|
210
|
-
for (var I of e) {
|
|
211
|
-
I.ca = Math.min(I.D.width, q), I.ba = Math.min(I.D.height, q), I.Fa = I.ba * I.ca, t = Math.max(t, I.ca), y = Math.max(y, I.ba), z += I.Fa, B[G++] = I;
|
|
212
|
-
}
|
|
213
|
-
e.clear();
|
|
214
|
-
if (!(0 >= z)) {
|
|
215
|
-
t = 1 << (0 >= t ? 0 : 32 - Math.clz32(t - 1));
|
|
216
|
-
for (y = 1 << (0 >= y ? 0 : 32 - Math.clz32(y - 1)); y * t < z;) {
|
|
217
|
-
t <= y ? t *= 2 : y *= 2;
|
|
218
|
-
}
|
|
219
|
-
t = Math.min(t, q);
|
|
220
|
-
t = Math.min(y, q);
|
|
221
|
-
B.sort((Y, nb) => nb.Fa - Y.Fa);
|
|
222
|
-
z = new k.DynamicRectanizer(q);
|
|
223
|
-
for (I = 0; I < B.length;) {
|
|
224
|
-
z.reset(t, y);
|
|
225
|
-
for (G = I; G < B.length; ++G) {
|
|
226
|
-
var J = B[G], H = z.addRect(J.ca, J.ba);
|
|
227
|
-
if (0 > H) {
|
|
228
|
-
console.assert(G > I);
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
J.ma = H & 65535;
|
|
232
|
-
J.na = H >> 16;
|
|
233
|
-
}
|
|
234
|
-
J = m.push(z.drawWidth());
|
|
235
|
-
H = l.push(z.drawHeight());
|
|
236
|
-
console.assert(J >= z.drawWidth());
|
|
237
|
-
console.assert(H >= z.drawHeight());
|
|
238
|
-
console.assert(J <= q);
|
|
239
|
-
console.assert(H <= q);
|
|
240
|
-
d.D.width != J && (d.D.width = J);
|
|
241
|
-
d.D.height != H && (d.D.height = H);
|
|
242
|
-
d.clear();
|
|
243
|
-
for (J = I; J < G; ++J) {
|
|
244
|
-
H = B[J];
|
|
245
|
-
d.saveClipRect(H.ma, H.na, H.ma + H.ca, H.na + H.ba);
|
|
246
|
-
let Y = new k.Mat2D();
|
|
247
|
-
Y.xx = H.ca / H.D.width;
|
|
248
|
-
Y.yy = H.ba / H.D.height;
|
|
249
|
-
Y.xy = Y.yx = 0;
|
|
250
|
-
Y.tx = H.ma;
|
|
251
|
-
Y.ty = H.na;
|
|
252
|
-
d.transform(Y);
|
|
253
|
-
for (const nb of H.O) {
|
|
254
|
-
nb();
|
|
255
|
-
}
|
|
256
|
-
d.restoreClipRect();
|
|
257
|
-
H.O = [];
|
|
258
|
-
}
|
|
259
|
-
for (d.flush(); I < G; ++I) {
|
|
260
|
-
J = B[I], H = J.rb, H.globalCompositeOperation = "copy", H.drawImage(d.D, J.ma, J.na, J.ca, J.ba, 0, 0, J.D.width, J.D.height);
|
|
261
|
-
}
|
|
262
|
-
I = G;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
ja && ja();
|
|
268
|
-
let d = null;
|
|
269
|
-
const e = new Set(), f = k.makeRenderer;
|
|
270
|
-
k.makeRenderer = function(q, t) {
|
|
271
|
-
if (!d) {
|
|
272
|
-
function y(z) {
|
|
273
|
-
var B = document.createElement("canvas");
|
|
274
|
-
B.width = 1;
|
|
275
|
-
B.height = 1;
|
|
276
|
-
d = b(B, z);
|
|
277
|
-
if (!d) {
|
|
278
|
-
return null;
|
|
279
|
-
}
|
|
280
|
-
d.Ra = !!d.P.getExtension("WEBGL_shader_pixel_local_storage");
|
|
281
|
-
d.ub = Math.min(d.P.getParameter(d.P.MAX_RENDERBUFFER_SIZE), d.P.getParameter(d.P.MAX_TEXTURE_SIZE));
|
|
282
|
-
d.Ga = !d.Ra;
|
|
283
|
-
if (z = d.P.getExtension("WEBGL_debug_renderer_info")) {
|
|
284
|
-
B = d.P.getParameter(z.UNMASKED_RENDERER_WEBGL), d.P.getParameter(z.UNMASKED_VENDOR_WEBGL).includes("Google") && B.includes("ANGLE Metal Renderer") && (d.Ga = !1);
|
|
285
|
-
}
|
|
286
|
-
return d;
|
|
287
|
-
}
|
|
288
|
-
d = y(!0);
|
|
289
|
-
if (!d) {
|
|
290
|
-
throw "Unable to create WebGL context, your environment may not support WebGL. Try out @rive-app/canvas as an alternative.";
|
|
291
|
-
}
|
|
292
|
-
d.Ga || (d = y(!1));
|
|
293
|
-
}
|
|
294
|
-
return t ? new a(q) : b(q, d.Ga);
|
|
295
|
-
};
|
|
296
|
-
const g = k.Artboard.prototype["delete"];
|
|
297
|
-
k.Artboard.prototype["delete"] = function() {
|
|
298
|
-
this.vb = !0;
|
|
299
|
-
g.call(this);
|
|
300
|
-
};
|
|
301
|
-
const h = k.Artboard.prototype.draw;
|
|
302
|
-
k.Artboard.prototype.draw = function(q) {
|
|
303
|
-
q.O ? q.O.push(() => {
|
|
304
|
-
this.vb || h.call(this, q.Sa);
|
|
305
|
-
}) : h.call(this, q);
|
|
306
|
-
};
|
|
307
|
-
const m = new ha(), l = new ha(), r = new fa();
|
|
308
|
-
k.requestAnimationFrame = r.requestAnimationFrame.bind(r);
|
|
309
|
-
k.cancelAnimationFrame = r.cancelAnimationFrame.bind(r);
|
|
310
|
-
k.enableFPSCounter = r.Cb.bind(r);
|
|
311
|
-
r.fb = c;
|
|
312
|
-
k.resolveAnimationFrame = c;
|
|
313
|
-
let u = k.load;
|
|
314
|
-
k.load = function(q, t, y = !0) {
|
|
315
|
-
const z = new k.FallbackFileAssetLoader();
|
|
316
|
-
void 0 !== t && z.addLoader(t);
|
|
317
|
-
y && (t = new k.CDNFileAssetLoader(), z.addLoader(t));
|
|
318
|
-
return Promise.resolve(u(q, z));
|
|
319
|
-
};
|
|
320
|
-
const w = k.WebGL2Renderer.prototype.clear;
|
|
321
|
-
k.WebGL2Renderer.prototype.clear = function() {
|
|
322
|
-
ka(this.W);
|
|
323
|
-
const q = this.D;
|
|
324
|
-
if (this.Ia != q.width || this.Ha != q.height) {
|
|
325
|
-
this.resize(q.width, q.height), this.Ia = q.width, this.Ha = q.height;
|
|
326
|
-
}
|
|
327
|
-
w.call(this);
|
|
328
|
-
};
|
|
329
|
-
k.decodeImage = function(q, t) {
|
|
330
|
-
q = k.decodeWebGL2Image(q);
|
|
331
|
-
t(q);
|
|
332
|
-
};
|
|
333
|
-
let n = k.Renderer.prototype.align;
|
|
334
|
-
k.Renderer.prototype.align = function(q, t, y, z, B = 1.0) {
|
|
335
|
-
n.call(this, q, t, y, z, B);
|
|
336
|
-
};
|
|
337
|
-
};
|
|
338
|
-
var ma = Object.assign({}, k), na = "./this.program", x = "", oa, pa;
|
|
339
|
-
if (da || ea) {
|
|
340
|
-
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 && (pa = a => {
|
|
341
|
-
var b = new XMLHttpRequest();
|
|
342
|
-
b.open("GET", a, !1);
|
|
343
|
-
b.responseType = "arraybuffer";
|
|
344
|
-
b.send(null);
|
|
345
|
-
return new Uint8Array(b.response);
|
|
346
|
-
}), oa = (a, b, c) => {
|
|
347
|
-
if (qa(a)) {
|
|
348
|
-
var d = new XMLHttpRequest();
|
|
349
|
-
d.open("GET", a, !0);
|
|
350
|
-
d.responseType = "arraybuffer";
|
|
351
|
-
d.onload = () => {
|
|
352
|
-
200 == d.status || 0 == d.status && d.response ? b(d.response) : c();
|
|
353
|
-
};
|
|
354
|
-
d.onerror = c;
|
|
355
|
-
d.send(null);
|
|
356
|
-
} else {
|
|
357
|
-
fetch(a, {credentials:"same-origin"}).then(e => e.ok ? e.arrayBuffer() : Promise.reject(Error(e.status + " : " + e.url))).then(b, c);
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
var ra = k.print || console.log.bind(console), A = k.printErr || console.error.bind(console);
|
|
362
|
-
Object.assign(k, ma);
|
|
363
|
-
ma = null;
|
|
364
|
-
k.thisProgram && (na = k.thisProgram);
|
|
365
|
-
var sa;
|
|
366
|
-
k.wasmBinary && (sa = k.wasmBinary);
|
|
367
|
-
var ta, ua = !1, C, D, E, va, F, K, wa, xa;
|
|
368
|
-
function ya() {
|
|
369
|
-
var a = ta.buffer;
|
|
370
|
-
k.HEAP8 = C = new Int8Array(a);
|
|
371
|
-
k.HEAP16 = E = new Int16Array(a);
|
|
372
|
-
k.HEAPU8 = D = new Uint8Array(a);
|
|
373
|
-
k.HEAPU16 = va = new Uint16Array(a);
|
|
374
|
-
k.HEAP32 = F = new Int32Array(a);
|
|
375
|
-
k.HEAPU32 = K = new Uint32Array(a);
|
|
376
|
-
k.HEAPF32 = wa = new Float32Array(a);
|
|
377
|
-
k.HEAPF64 = xa = new Float64Array(a);
|
|
378
|
-
}
|
|
379
|
-
var za = [], Aa = [], Ba = [];
|
|
380
|
-
function Ca() {
|
|
381
|
-
var a = k.preRun.shift();
|
|
382
|
-
za.unshift(a);
|
|
383
|
-
}
|
|
384
|
-
var Da = 0, Ea = null, Fa = null;
|
|
385
|
-
function Ga(a) {
|
|
386
|
-
k.onAbort?.(a);
|
|
387
|
-
a = "Aborted(" + a + ")";
|
|
388
|
-
A(a);
|
|
389
|
-
ua = !0;
|
|
390
|
-
a = new WebAssembly.RuntimeError(a + ". Build with -sASSERTIONS for more info.");
|
|
391
|
-
ba(a);
|
|
392
|
-
throw a;
|
|
393
|
-
}
|
|
394
|
-
var Ha = a => a.startsWith("data:application/octet-stream;base64,"), qa = a => a.startsWith("file://"), Ia;
|
|
395
|
-
function Ja(a) {
|
|
396
|
-
if (a == Ia && sa) {
|
|
397
|
-
return new Uint8Array(sa);
|
|
398
|
-
}
|
|
399
|
-
if (pa) {
|
|
400
|
-
return pa(a);
|
|
401
|
-
}
|
|
402
|
-
throw "both async and sync fetching of the wasm failed";
|
|
403
|
-
}
|
|
404
|
-
function Ka(a) {
|
|
405
|
-
return sa ? Promise.resolve().then(() => Ja(a)) : new Promise((b, c) => {
|
|
406
|
-
oa(a, d => b(new Uint8Array(d)), () => {
|
|
407
|
-
try {
|
|
408
|
-
b(Ja(a));
|
|
409
|
-
} catch (d) {
|
|
410
|
-
c(d);
|
|
411
|
-
}
|
|
412
|
-
});
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
function La(a, b, c) {
|
|
416
|
-
return Ka(a).then(d => WebAssembly.instantiate(d, b)).then(c, d => {
|
|
417
|
-
A(`failed to asynchronously prepare wasm: ${d}`);
|
|
418
|
-
Ga(d);
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
function Ma(a, b) {
|
|
422
|
-
var c = Ia;
|
|
423
|
-
return sa || "function" != typeof WebAssembly.instantiateStreaming || Ha(c) || qa(c) || "function" != typeof fetch ? La(c, a, b) : fetch(c, {credentials:"same-origin"}).then(d => WebAssembly.instantiateStreaming(d, a).then(b, function(e) {
|
|
424
|
-
A(`wasm streaming compile failed: ${e}`);
|
|
425
|
-
A("falling back to ArrayBuffer instantiation");
|
|
426
|
-
return La(c, a, b);
|
|
427
|
-
}));
|
|
428
|
-
}
|
|
429
|
-
var Na, Oa, Sa = {573663:(a, b, c, d, e) => {
|
|
430
|
-
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
431
|
-
return 0;
|
|
432
|
-
}
|
|
433
|
-
if ("undefined" === typeof window.miniaudio) {
|
|
434
|
-
window.miniaudio = {referenceCount:0};
|
|
435
|
-
window.miniaudio.device_type = {};
|
|
436
|
-
window.miniaudio.device_type.playback = a;
|
|
437
|
-
window.miniaudio.device_type.capture = b;
|
|
438
|
-
window.miniaudio.device_type.duplex = c;
|
|
439
|
-
window.miniaudio.device_state = {};
|
|
440
|
-
window.miniaudio.device_state.stopped = d;
|
|
441
|
-
window.miniaudio.device_state.started = e;
|
|
442
|
-
let f = window.miniaudio;
|
|
443
|
-
f.devices = [];
|
|
444
|
-
f.track_device = function(g) {
|
|
445
|
-
for (var h = 0; h < f.devices.length; ++h) {
|
|
446
|
-
if (null == f.devices[h]) {
|
|
447
|
-
return f.devices[h] = g, h;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
f.devices.push(g);
|
|
451
|
-
return f.devices.length - 1;
|
|
452
|
-
};
|
|
453
|
-
f.untrack_device_by_index = function(g) {
|
|
454
|
-
for (f.devices[g] = null; 0 < f.devices.length;) {
|
|
455
|
-
if (null == f.devices[f.devices.length - 1]) {
|
|
456
|
-
f.devices.pop();
|
|
457
|
-
} else {
|
|
458
|
-
break;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
f.untrack_device = function(g) {
|
|
463
|
-
for (var h = 0; h < f.devices.length; ++h) {
|
|
464
|
-
if (f.devices[h] == g) {
|
|
465
|
-
return f.untrack_device_by_index(h);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
f.get_device_by_index = function(g) {
|
|
470
|
-
return f.devices[g];
|
|
471
|
-
};
|
|
472
|
-
f.unlock_event_types = ["touchend", "click"];
|
|
473
|
-
f.unlock = function() {
|
|
474
|
-
for (var g = 0; g < f.devices.length; ++g) {
|
|
475
|
-
var h = f.devices[g];
|
|
476
|
-
null != h && null != h.H && h.state === f.device_state.started && h.H.resume().then(() => {
|
|
477
|
-
Pa(h.gb);
|
|
478
|
-
}, m => {
|
|
479
|
-
console.error("Failed to resume audiocontext", m);
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
f.unlock_event_types.map(function(m) {
|
|
483
|
-
document.removeEventListener(m, f.unlock, !0);
|
|
484
|
-
});
|
|
485
|
-
};
|
|
486
|
-
f.unlock_event_types.map(function(g) {
|
|
487
|
-
document.addEventListener(g, f.unlock, !0);
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
window.miniaudio.referenceCount += 1;
|
|
491
|
-
return 1;
|
|
492
|
-
}, 575841:() => {
|
|
493
|
-
"undefined" !== typeof window.miniaudio && (window.miniaudio.unlock_event_types.map(function(a) {
|
|
494
|
-
document.removeEventListener(a, window.miniaudio.unlock, !0);
|
|
495
|
-
}), --window.miniaudio.referenceCount, 0 === window.miniaudio.referenceCount && delete window.miniaudio);
|
|
496
|
-
}, 576145:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 576249:() => {
|
|
497
|
-
try {
|
|
498
|
-
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
499
|
-
a.close();
|
|
500
|
-
return b;
|
|
501
|
-
} catch (c) {
|
|
502
|
-
return 0;
|
|
503
|
-
}
|
|
504
|
-
}, 576420:(a, b, c, d, e, f) => {
|
|
505
|
-
if ("undefined" === typeof window.miniaudio) {
|
|
506
|
-
return -1;
|
|
507
|
-
}
|
|
508
|
-
var g = {}, h = {};
|
|
509
|
-
a == window.miniaudio.device_type.playback && 0 != c && (h.sampleRate = c);
|
|
510
|
-
g.H = new (window.AudioContext || window.webkitAudioContext)(h);
|
|
511
|
-
g.H.suspend();
|
|
512
|
-
g.state = window.miniaudio.device_state.stopped;
|
|
513
|
-
c = 0;
|
|
514
|
-
a != window.miniaudio.device_type.playback && (c = b);
|
|
515
|
-
g.V = g.H.createScriptProcessor(d, c, b);
|
|
516
|
-
g.V.onaudioprocess = function(m) {
|
|
517
|
-
if (null == g.ra || 0 == g.ra.length) {
|
|
518
|
-
g.ra = new Float32Array(wa.buffer, e, d * b);
|
|
519
|
-
}
|
|
520
|
-
if (a == window.miniaudio.device_type.capture || a == window.miniaudio.device_type.duplex) {
|
|
521
|
-
for (var l = 0; l < b; l += 1) {
|
|
522
|
-
for (var r = m.inputBuffer.getChannelData(l), u = g.ra, w = 0; w < d; w += 1) {
|
|
523
|
-
u[w * b + l] = r[w];
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
Qa(f, d, e);
|
|
527
|
-
}
|
|
528
|
-
if (a == window.miniaudio.device_type.playback || a == window.miniaudio.device_type.duplex) {
|
|
529
|
-
for (Ra(f, d, e), l = 0; l < m.outputBuffer.numberOfChannels; ++l) {
|
|
530
|
-
for (r = m.outputBuffer.getChannelData(l), u = g.ra, w = 0; w < d; w += 1) {
|
|
531
|
-
r[w] = u[w * b + l];
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
} else {
|
|
535
|
-
for (l = 0; l < m.outputBuffer.numberOfChannels; ++l) {
|
|
536
|
-
m.outputBuffer.getChannelData(l).fill(0.0);
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
a != window.miniaudio.device_type.capture && a != window.miniaudio.device_type.duplex || navigator.mediaDevices.getUserMedia({audio:!0, video:!1}).then(function(m) {
|
|
541
|
-
g.Ba = g.H.createMediaStreamSource(m);
|
|
542
|
-
g.Ba.connect(g.V);
|
|
543
|
-
g.V.connect(g.H.destination);
|
|
544
|
-
}).catch(function(m) {
|
|
545
|
-
console.log("Failed to get user media: " + m);
|
|
546
|
-
});
|
|
547
|
-
a == window.miniaudio.device_type.playback && g.V.connect(g.H.destination);
|
|
548
|
-
g.gb = f;
|
|
549
|
-
return window.miniaudio.track_device(g);
|
|
550
|
-
}, 579297:a => window.miniaudio.get_device_by_index(a).H.sampleRate, 579370:a => {
|
|
551
|
-
a = window.miniaudio.get_device_by_index(a);
|
|
552
|
-
void 0 !== a.V && (a.V.onaudioprocess = function() {
|
|
553
|
-
}, a.V.disconnect(), a.V = void 0);
|
|
554
|
-
void 0 !== a.Ba && (a.Ba.disconnect(), a.Ba = void 0);
|
|
555
|
-
a.H.close();
|
|
556
|
-
a.H = void 0;
|
|
557
|
-
a.gb = void 0;
|
|
558
|
-
}, 579770:a => {
|
|
559
|
-
window.miniaudio.untrack_device_by_index(a);
|
|
560
|
-
}, 579820:a => {
|
|
561
|
-
a = window.miniaudio.get_device_by_index(a);
|
|
562
|
-
a.H.resume();
|
|
563
|
-
a.state = window.miniaudio.device_state.started;
|
|
564
|
-
}, 579959:a => {
|
|
565
|
-
a = window.miniaudio.get_device_by_index(a);
|
|
566
|
-
a.H.suspend();
|
|
567
|
-
a.state = window.miniaudio.device_state.stopped;
|
|
568
|
-
}}, Ta = a => {
|
|
569
|
-
for (; 0 < a.length;) {
|
|
570
|
-
a.shift()(k);
|
|
571
|
-
}
|
|
572
|
-
};
|
|
573
|
-
function Ua() {
|
|
574
|
-
var a = F[+Va >> 2];
|
|
575
|
-
Va += 4;
|
|
576
|
-
return a;
|
|
577
|
-
}
|
|
578
|
-
var Wa = (a, b) => {
|
|
579
|
-
for (var c = 0, d = a.length - 1; 0 <= d; d--) {
|
|
580
|
-
var e = a[d];
|
|
581
|
-
"." === e ? a.splice(d, 1) : ".." === e ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--);
|
|
582
|
-
}
|
|
583
|
-
if (b) {
|
|
584
|
-
for (; c; c--) {
|
|
585
|
-
a.unshift("..");
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
return a;
|
|
589
|
-
}, Xa = a => {
|
|
590
|
-
var b = "/" === a.charAt(0), c = "/" === a.substr(-1);
|
|
591
|
-
(a = Wa(a.split("/").filter(d => !!d), !b).join("/")) || b || (a = ".");
|
|
592
|
-
a && c && (a += "/");
|
|
593
|
-
return (b ? "/" : "") + a;
|
|
594
|
-
}, Ya = a => {
|
|
595
|
-
var b = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
|
|
596
|
-
a = b[0];
|
|
597
|
-
b = b[1];
|
|
598
|
-
if (!a && !b) {
|
|
599
|
-
return ".";
|
|
600
|
-
}
|
|
601
|
-
b &&= b.substr(0, b.length - 1);
|
|
602
|
-
return a + b;
|
|
603
|
-
}, Za = a => {
|
|
604
|
-
if ("/" === a) {
|
|
605
|
-
return "/";
|
|
606
|
-
}
|
|
607
|
-
a = Xa(a);
|
|
608
|
-
a = a.replace(/\/$/, "");
|
|
609
|
-
var b = a.lastIndexOf("/");
|
|
610
|
-
return -1 === b ? a : a.substr(b + 1);
|
|
611
|
-
}, $a = () => {
|
|
612
|
-
if ("object" == typeof crypto && "function" == typeof crypto.getRandomValues) {
|
|
613
|
-
return a => crypto.getRandomValues(a);
|
|
614
|
-
}
|
|
615
|
-
Ga("initRandomDevice");
|
|
616
|
-
}, ab = a => (ab = $a())(a), bb = (...a) => {
|
|
617
|
-
for (var b = "", c = !1, d = a.length - 1; -1 <= d && !c; d--) {
|
|
618
|
-
c = 0 <= d ? a[d] : "/";
|
|
619
|
-
if ("string" != typeof c) {
|
|
620
|
-
throw new TypeError("Arguments to path.resolve must be strings");
|
|
621
|
-
}
|
|
622
|
-
if (!c) {
|
|
623
|
-
return "";
|
|
624
|
-
}
|
|
625
|
-
b = c + "/" + b;
|
|
626
|
-
c = "/" === c.charAt(0);
|
|
627
|
-
}
|
|
628
|
-
b = Wa(b.split("/").filter(e => !!e), !c).join("/");
|
|
629
|
-
return (c ? "/" : "") + b || ".";
|
|
630
|
-
}, cb = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, L = (a, b, c) => {
|
|
631
|
-
var d = b + c;
|
|
632
|
-
for (c = b; a[c] && !(c >= d);) {
|
|
633
|
-
++c;
|
|
634
|
-
}
|
|
635
|
-
if (16 < c - b && a.buffer && cb) {
|
|
636
|
-
return cb.decode(a.subarray(b, c));
|
|
637
|
-
}
|
|
638
|
-
for (d = ""; b < c;) {
|
|
639
|
-
var e = a[b++];
|
|
640
|
-
if (e & 128) {
|
|
641
|
-
var f = a[b++] & 63;
|
|
642
|
-
if (192 == (e & 224)) {
|
|
643
|
-
d += String.fromCharCode((e & 31) << 6 | f);
|
|
644
|
-
} else {
|
|
645
|
-
var g = a[b++] & 63;
|
|
646
|
-
e = 224 == (e & 240) ? (e & 15) << 12 | f << 6 | g : (e & 7) << 18 | f << 12 | g << 6 | a[b++] & 63;
|
|
647
|
-
65536 > e ? d += String.fromCharCode(e) : (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023));
|
|
648
|
-
}
|
|
649
|
-
} else {
|
|
650
|
-
d += String.fromCharCode(e);
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
return d;
|
|
654
|
-
}, db = [], eb = a => {
|
|
655
|
-
for (var b = 0, c = 0; c < a.length; ++c) {
|
|
656
|
-
var d = a.charCodeAt(c);
|
|
657
|
-
127 >= d ? b++ : 2047 >= d ? b += 2 : 55296 <= d && 57343 >= d ? (b += 4, ++c) : b += 3;
|
|
658
|
-
}
|
|
659
|
-
return b;
|
|
660
|
-
}, fb = (a, b, c, d) => {
|
|
661
|
-
if (!(0 < d)) {
|
|
662
|
-
return 0;
|
|
663
|
-
}
|
|
664
|
-
var e = c;
|
|
665
|
-
d = c + d - 1;
|
|
666
|
-
for (var f = 0; f < a.length; ++f) {
|
|
667
|
-
var g = a.charCodeAt(f);
|
|
668
|
-
if (55296 <= g && 57343 >= g) {
|
|
669
|
-
var h = a.charCodeAt(++f);
|
|
670
|
-
g = 65536 + ((g & 1023) << 10) | h & 1023;
|
|
671
|
-
}
|
|
672
|
-
if (127 >= g) {
|
|
673
|
-
if (c >= d) {
|
|
674
|
-
break;
|
|
675
|
-
}
|
|
676
|
-
b[c++] = g;
|
|
677
|
-
} else {
|
|
678
|
-
if (2047 >= g) {
|
|
679
|
-
if (c + 1 >= d) {
|
|
680
|
-
break;
|
|
681
|
-
}
|
|
682
|
-
b[c++] = 192 | g >> 6;
|
|
683
|
-
} else {
|
|
684
|
-
if (65535 >= g) {
|
|
685
|
-
if (c + 2 >= d) {
|
|
686
|
-
break;
|
|
687
|
-
}
|
|
688
|
-
b[c++] = 224 | g >> 12;
|
|
689
|
-
} else {
|
|
690
|
-
if (c + 3 >= d) {
|
|
691
|
-
break;
|
|
692
|
-
}
|
|
693
|
-
b[c++] = 240 | g >> 18;
|
|
694
|
-
b[c++] = 128 | g >> 12 & 63;
|
|
695
|
-
}
|
|
696
|
-
b[c++] = 128 | g >> 6 & 63;
|
|
697
|
-
}
|
|
698
|
-
b[c++] = 128 | g & 63;
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
b[c] = 0;
|
|
702
|
-
return c - e;
|
|
703
|
-
};
|
|
704
|
-
function gb(a, b) {
|
|
705
|
-
var c = Array(eb(a) + 1);
|
|
706
|
-
a = fb(a, c, 0, c.length);
|
|
707
|
-
b && (c.length = a);
|
|
708
|
-
return c;
|
|
709
|
-
}
|
|
710
|
-
var hb = [];
|
|
711
|
-
function ib(a, b) {
|
|
712
|
-
hb[a] = {input:[], F:[], S:b};
|
|
713
|
-
jb(a, kb);
|
|
714
|
-
}
|
|
715
|
-
var kb = {open(a) {
|
|
716
|
-
var b = hb[a.node.Aa];
|
|
717
|
-
if (!b) {
|
|
718
|
-
throw new M(43);
|
|
719
|
-
}
|
|
720
|
-
a.o = b;
|
|
721
|
-
a.seekable = !1;
|
|
722
|
-
}, close(a) {
|
|
723
|
-
a.o.S.pa(a.o);
|
|
724
|
-
}, pa(a) {
|
|
725
|
-
a.o.S.pa(a.o);
|
|
726
|
-
}, read(a, b, c, d) {
|
|
727
|
-
if (!a.o || !a.o.S.$a) {
|
|
728
|
-
throw new M(60);
|
|
729
|
-
}
|
|
730
|
-
for (var e = 0, f = 0; f < d; f++) {
|
|
731
|
-
try {
|
|
732
|
-
var g = a.o.S.$a(a.o);
|
|
733
|
-
} catch (h) {
|
|
734
|
-
throw new M(29);
|
|
735
|
-
}
|
|
736
|
-
if (void 0 === g && 0 === e) {
|
|
737
|
-
throw new M(6);
|
|
738
|
-
}
|
|
739
|
-
if (null === g || void 0 === g) {
|
|
740
|
-
break;
|
|
741
|
-
}
|
|
742
|
-
e++;
|
|
743
|
-
b[c + f] = g;
|
|
744
|
-
}
|
|
745
|
-
e && (a.node.timestamp = Date.now());
|
|
746
|
-
return e;
|
|
747
|
-
}, write(a, b, c, d) {
|
|
748
|
-
if (!a.o || !a.o.S.Ma) {
|
|
749
|
-
throw new M(60);
|
|
750
|
-
}
|
|
751
|
-
try {
|
|
752
|
-
for (var e = 0; e < d; e++) {
|
|
753
|
-
a.o.S.Ma(a.o, b[c + e]);
|
|
754
|
-
}
|
|
755
|
-
} catch (f) {
|
|
756
|
-
throw new M(29);
|
|
757
|
-
}
|
|
758
|
-
d && (a.node.timestamp = Date.now());
|
|
759
|
-
return e;
|
|
760
|
-
},}, lb = {$a() {
|
|
761
|
-
a: {
|
|
762
|
-
if (!db.length) {
|
|
763
|
-
var a = null;
|
|
764
|
-
"undefined" != typeof window && "function" == typeof window.prompt && (a = window.prompt("Input: "), null !== a && (a += "\n"));
|
|
765
|
-
if (!a) {
|
|
766
|
-
a = null;
|
|
767
|
-
break a;
|
|
768
|
-
}
|
|
769
|
-
db = gb(a, !0);
|
|
770
|
-
}
|
|
771
|
-
a = db.shift();
|
|
772
|
-
}
|
|
773
|
-
return a;
|
|
774
|
-
}, Ma(a, b) {
|
|
775
|
-
null === b || 10 === b ? (ra(L(a.F, 0)), a.F = []) : 0 != b && a.F.push(b);
|
|
776
|
-
}, pa(a) {
|
|
777
|
-
a.F && 0 < a.F.length && (ra(L(a.F, 0)), a.F = []);
|
|
778
|
-
}, Nb() {
|
|
779
|
-
return {nc:25856, pc:5, mc:191, oc:35387, lc:[3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]};
|
|
780
|
-
}, Ob() {
|
|
781
|
-
return 0;
|
|
782
|
-
}, Pb() {
|
|
783
|
-
return [24, 80];
|
|
784
|
-
},}, mb = {Ma(a, b) {
|
|
785
|
-
null === b || 10 === b ? (A(L(a.F, 0)), a.F = []) : 0 != b && a.F.push(b);
|
|
786
|
-
}, pa(a) {
|
|
787
|
-
a.F && 0 < a.F.length && (A(L(a.F, 0)), a.F = []);
|
|
788
|
-
},};
|
|
789
|
-
function ob(a, b) {
|
|
790
|
-
var c = a.j ? a.j.length : 0;
|
|
791
|
-
c >= b || (b = Math.max(b, c * (1048576 > c ? 2.0 : 1.125) >>> 0), 0 != c && (b = Math.max(b, 256)), c = a.j, a.j = new Uint8Array(b), 0 < a.u && a.j.set(c.subarray(0, a.u), 0));
|
|
792
|
-
}
|
|
793
|
-
var N = {K:null, R() {
|
|
794
|
-
return N.createNode(null, "/", 16895, 0);
|
|
795
|
-
}, createNode(a, b, c, d) {
|
|
796
|
-
if (24576 === (c & 61440) || 4096 === (c & 61440)) {
|
|
797
|
-
throw new M(63);
|
|
798
|
-
}
|
|
799
|
-
N.K || (N.K = {dir:{node:{U:N.i.U, M:N.i.M, ha:N.i.ha, xa:N.i.xa, lb:N.i.lb, pb:N.i.pb, mb:N.i.mb, kb:N.i.kb, Ca:N.i.Ca}, stream:{Z:N.l.Z}}, file:{node:{U:N.i.U, M:N.i.M}, stream:{Z:N.l.Z, read:N.l.read, write:N.l.write, Ta:N.l.Ta, bb:N.l.bb, eb:N.l.eb}}, link:{node:{U:N.i.U, M:N.i.M, ia:N.i.ia}, stream:{}}, Ua:{node:{U:N.i.U, M:N.i.M}, stream:pb}});
|
|
800
|
-
c = qb(a, b, c, d);
|
|
801
|
-
16384 === (c.mode & 61440) ? (c.i = N.K.dir.node, c.l = N.K.dir.stream, c.j = {}) : 32768 === (c.mode & 61440) ? (c.i = N.K.file.node, c.l = N.K.file.stream, c.u = 0, c.j = null) : 40960 === (c.mode & 61440) ? (c.i = N.K.link.node, c.l = N.K.link.stream) : 8192 === (c.mode & 61440) && (c.i = N.K.Ua.node, c.l = N.K.Ua.stream);
|
|
802
|
-
c.timestamp = Date.now();
|
|
803
|
-
a && (a.j[b] = c, a.timestamp = c.timestamp);
|
|
804
|
-
return c;
|
|
805
|
-
}, vc(a) {
|
|
806
|
-
return a.j ? a.j.subarray ? a.j.subarray(0, a.u) : new Uint8Array(a.j) : new Uint8Array(0);
|
|
807
|
-
}, i:{U(a) {
|
|
808
|
-
var b = {};
|
|
809
|
-
b.sc = 8192 === (a.mode & 61440) ? a.id : 1;
|
|
810
|
-
b.xc = a.id;
|
|
811
|
-
b.mode = a.mode;
|
|
812
|
-
b.Dc = 1;
|
|
813
|
-
b.uid = 0;
|
|
814
|
-
b.wc = 0;
|
|
815
|
-
b.Aa = a.Aa;
|
|
816
|
-
16384 === (a.mode & 61440) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.u : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
|
|
817
|
-
b.jc = new Date(a.timestamp);
|
|
818
|
-
b.Cc = new Date(a.timestamp);
|
|
819
|
-
b.qc = new Date(a.timestamp);
|
|
820
|
-
b.xb = 4096;
|
|
821
|
-
b.kc = Math.ceil(b.size / b.xb);
|
|
822
|
-
return b;
|
|
823
|
-
}, M(a, b) {
|
|
824
|
-
void 0 !== b.mode && (a.mode = b.mode);
|
|
825
|
-
void 0 !== b.timestamp && (a.timestamp = b.timestamp);
|
|
826
|
-
if (void 0 !== b.size && (b = b.size, a.u != b)) {
|
|
827
|
-
if (0 == b) {
|
|
828
|
-
a.j = null, a.u = 0;
|
|
829
|
-
} else {
|
|
830
|
-
var c = a.j;
|
|
831
|
-
a.j = new Uint8Array(b);
|
|
832
|
-
c && a.j.set(c.subarray(0, Math.min(b, a.u)));
|
|
833
|
-
a.u = b;
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
}, ha() {
|
|
837
|
-
throw rb[44];
|
|
838
|
-
}, xa(a, b, c, d) {
|
|
839
|
-
return N.createNode(a, b, c, d);
|
|
840
|
-
}, lb(a, b, c) {
|
|
841
|
-
if (16384 === (a.mode & 61440)) {
|
|
842
|
-
try {
|
|
843
|
-
var d = sb(b, c);
|
|
844
|
-
} catch (f) {
|
|
845
|
-
}
|
|
846
|
-
if (d) {
|
|
847
|
-
for (var e in d.j) {
|
|
848
|
-
throw new M(55);
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
delete a.parent.j[a.name];
|
|
853
|
-
a.parent.timestamp = Date.now();
|
|
854
|
-
a.name = c;
|
|
855
|
-
b.j[c] = a;
|
|
856
|
-
b.timestamp = a.parent.timestamp;
|
|
857
|
-
}, pb(a, b) {
|
|
858
|
-
delete a.j[b];
|
|
859
|
-
a.timestamp = Date.now();
|
|
860
|
-
}, mb(a, b) {
|
|
861
|
-
var c = sb(a, b), d;
|
|
862
|
-
for (d in c.j) {
|
|
863
|
-
throw new M(55);
|
|
864
|
-
}
|
|
865
|
-
delete a.j[b];
|
|
866
|
-
a.timestamp = Date.now();
|
|
867
|
-
}, kb(a) {
|
|
868
|
-
var b = [".", ".."], c;
|
|
869
|
-
for (c of Object.keys(a.j)) {
|
|
870
|
-
b.push(c);
|
|
871
|
-
}
|
|
872
|
-
return b;
|
|
873
|
-
}, Ca(a, b, c) {
|
|
874
|
-
a = N.createNode(a, b, 41471, 0);
|
|
875
|
-
a.link = c;
|
|
876
|
-
return a;
|
|
877
|
-
}, ia(a) {
|
|
878
|
-
if (40960 !== (a.mode & 61440)) {
|
|
879
|
-
throw new M(28);
|
|
880
|
-
}
|
|
881
|
-
return a.link;
|
|
882
|
-
},}, l:{read(a, b, c, d, e) {
|
|
883
|
-
var f = a.node.j;
|
|
884
|
-
if (e >= a.node.u) {
|
|
885
|
-
return 0;
|
|
886
|
-
}
|
|
887
|
-
a = Math.min(a.node.u - e, d);
|
|
888
|
-
if (8 < a && f.subarray) {
|
|
889
|
-
b.set(f.subarray(e, e + a), c);
|
|
890
|
-
} else {
|
|
891
|
-
for (d = 0; d < a; d++) {
|
|
892
|
-
b[c + d] = f[e + d];
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
return a;
|
|
896
|
-
}, write(a, b, c, d, e, f) {
|
|
897
|
-
b.buffer === C.buffer && (f = !1);
|
|
898
|
-
if (!d) {
|
|
899
|
-
return 0;
|
|
900
|
-
}
|
|
901
|
-
a = a.node;
|
|
902
|
-
a.timestamp = Date.now();
|
|
903
|
-
if (b.subarray && (!a.j || a.j.subarray)) {
|
|
904
|
-
if (f) {
|
|
905
|
-
return a.j = b.subarray(c, c + d), a.u = d;
|
|
906
|
-
}
|
|
907
|
-
if (0 === a.u && 0 === e) {
|
|
908
|
-
return a.j = b.slice(c, c + d), a.u = d;
|
|
909
|
-
}
|
|
910
|
-
if (e + d <= a.u) {
|
|
911
|
-
return a.j.set(b.subarray(c, c + d), e), d;
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
ob(a, e + d);
|
|
915
|
-
if (a.j.subarray && b.subarray) {
|
|
916
|
-
a.j.set(b.subarray(c, c + d), e);
|
|
917
|
-
} else {
|
|
918
|
-
for (f = 0; f < d; f++) {
|
|
919
|
-
a.j[e + f] = b[c + f];
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
a.u = Math.max(a.u, e + d);
|
|
923
|
-
return d;
|
|
924
|
-
}, Z(a, b, c) {
|
|
925
|
-
1 === c ? b += a.position : 2 === c && 32768 === (a.node.mode & 61440) && (b += a.node.u);
|
|
926
|
-
if (0 > b) {
|
|
927
|
-
throw new M(28);
|
|
928
|
-
}
|
|
929
|
-
return b;
|
|
930
|
-
}, Ta(a, b, c) {
|
|
931
|
-
ob(a.node, b + c);
|
|
932
|
-
a.node.u = Math.max(a.node.u, b + c);
|
|
933
|
-
}, bb(a, b, c, d, e) {
|
|
934
|
-
if (32768 !== (a.node.mode & 61440)) {
|
|
935
|
-
throw new M(43);
|
|
936
|
-
}
|
|
937
|
-
a = a.node.j;
|
|
938
|
-
if (e & 2 || a.buffer !== C.buffer) {
|
|
939
|
-
if (0 < c || c + b < a.length) {
|
|
940
|
-
a.subarray ? a = a.subarray(c, c + b) : a = Array.prototype.slice.call(a, c, c + b);
|
|
941
|
-
}
|
|
942
|
-
c = !0;
|
|
943
|
-
Ga();
|
|
944
|
-
b = void 0;
|
|
945
|
-
if (!b) {
|
|
946
|
-
throw new M(48);
|
|
947
|
-
}
|
|
948
|
-
C.set(a, b);
|
|
949
|
-
} else {
|
|
950
|
-
c = !1, b = a.byteOffset;
|
|
951
|
-
}
|
|
952
|
-
return {m:b, ic:c};
|
|
953
|
-
}, eb(a, b, c, d) {
|
|
954
|
-
N.l.write(a, b, 0, d, c, !1);
|
|
955
|
-
return 0;
|
|
956
|
-
},},}, tb = (a, b) => {
|
|
957
|
-
var c = 0;
|
|
958
|
-
a && (c |= 365);
|
|
959
|
-
b && (c |= 146);
|
|
960
|
-
return c;
|
|
961
|
-
}, ub = null, vb = {}, wb = [], xb = 1, yb = null, zb = !0, M = class {
|
|
962
|
-
constructor(a) {
|
|
963
|
-
this.name = "ErrnoError";
|
|
964
|
-
this.Y = a;
|
|
965
|
-
}
|
|
966
|
-
}, rb = {}, Ab = class {
|
|
967
|
-
constructor() {
|
|
968
|
-
this.qa = {};
|
|
969
|
-
this.node = null;
|
|
970
|
-
}
|
|
971
|
-
get flags() {
|
|
972
|
-
return this.qa.flags;
|
|
973
|
-
}
|
|
974
|
-
set flags(a) {
|
|
975
|
-
this.qa.flags = a;
|
|
976
|
-
}
|
|
977
|
-
get position() {
|
|
978
|
-
return this.qa.position;
|
|
979
|
-
}
|
|
980
|
-
set position(a) {
|
|
981
|
-
this.qa.position = a;
|
|
982
|
-
}
|
|
983
|
-
}, Bb = class {
|
|
984
|
-
constructor(a, b, c, d) {
|
|
985
|
-
a ||= this;
|
|
986
|
-
this.parent = a;
|
|
987
|
-
this.R = a.R;
|
|
988
|
-
this.ya = null;
|
|
989
|
-
this.id = xb++;
|
|
990
|
-
this.name = b;
|
|
991
|
-
this.mode = c;
|
|
992
|
-
this.i = {};
|
|
993
|
-
this.l = {};
|
|
994
|
-
this.Aa = d;
|
|
995
|
-
}
|
|
996
|
-
get read() {
|
|
997
|
-
return 365 === (this.mode & 365);
|
|
998
|
-
}
|
|
999
|
-
set read(a) {
|
|
1000
|
-
a ? this.mode |= 365 : this.mode &= -366;
|
|
1001
|
-
}
|
|
1002
|
-
get write() {
|
|
1003
|
-
return 146 === (this.mode & 146);
|
|
1004
|
-
}
|
|
1005
|
-
set write(a) {
|
|
1006
|
-
a ? this.mode |= 146 : this.mode &= -147;
|
|
1007
|
-
}
|
|
1008
|
-
};
|
|
1009
|
-
function Cb(a, b = {}) {
|
|
1010
|
-
a = bb(a);
|
|
1011
|
-
if (!a) {
|
|
1012
|
-
return {path:"", node:null};
|
|
1013
|
-
}
|
|
1014
|
-
b = Object.assign({Za:!0, Oa:0}, b);
|
|
1015
|
-
if (8 < b.Oa) {
|
|
1016
|
-
throw new M(32);
|
|
1017
|
-
}
|
|
1018
|
-
a = a.split("/").filter(g => !!g);
|
|
1019
|
-
for (var c = ub, d = "/", e = 0; e < a.length; e++) {
|
|
1020
|
-
var f = e === a.length - 1;
|
|
1021
|
-
if (f && b.parent) {
|
|
1022
|
-
break;
|
|
1023
|
-
}
|
|
1024
|
-
c = sb(c, a[e]);
|
|
1025
|
-
d = Xa(d + "/" + a[e]);
|
|
1026
|
-
c.ya && (!f || f && b.Za) && (c = c.ya.root);
|
|
1027
|
-
if (!f || b.Ya) {
|
|
1028
|
-
for (f = 0; 40960 === (c.mode & 61440);) {
|
|
1029
|
-
if (c = Db(d), d = bb(Ya(d), c), c = Cb(d, {Oa:b.Oa + 1}).node, 40 < f++) {
|
|
1030
|
-
throw new M(32);
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
return {path:d, node:c};
|
|
1036
|
-
}
|
|
1037
|
-
function Eb(a) {
|
|
1038
|
-
for (var b;;) {
|
|
1039
|
-
if (a === a.parent) {
|
|
1040
|
-
return a = a.R.cb, b ? "/" !== a[a.length - 1] ? `${a}/${b}` : a + b : a;
|
|
1041
|
-
}
|
|
1042
|
-
b = b ? `${a.name}/${b}` : a.name;
|
|
1043
|
-
a = a.parent;
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
function Fb(a, b) {
|
|
1047
|
-
for (var c = 0, d = 0; d < b.length; d++) {
|
|
1048
|
-
c = (c << 5) - c + b.charCodeAt(d) | 0;
|
|
1049
|
-
}
|
|
1050
|
-
return (a + c >>> 0) % yb.length;
|
|
1051
|
-
}
|
|
1052
|
-
function sb(a, b) {
|
|
1053
|
-
var c = 16384 === (a.mode & 61440) ? (c = Gb(a, "x")) ? c : a.i.ha ? 0 : 2 : 54;
|
|
1054
|
-
if (c) {
|
|
1055
|
-
throw new M(c);
|
|
1056
|
-
}
|
|
1057
|
-
for (c = yb[Fb(a.id, b)]; c; c = c.Sb) {
|
|
1058
|
-
var d = c.name;
|
|
1059
|
-
if (c.parent.id === a.id && d === b) {
|
|
1060
|
-
return c;
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
return a.i.ha(a, b);
|
|
1064
|
-
}
|
|
1065
|
-
function qb(a, b, c, d) {
|
|
1066
|
-
a = new Bb(a, b, c, d);
|
|
1067
|
-
b = Fb(a.parent.id, a.name);
|
|
1068
|
-
a.Sb = yb[b];
|
|
1069
|
-
return yb[b] = a;
|
|
1070
|
-
}
|
|
1071
|
-
function Hb(a) {
|
|
1072
|
-
var b = ["r", "w", "rw"][a & 3];
|
|
1073
|
-
a & 512 && (b += "w");
|
|
1074
|
-
return b;
|
|
1075
|
-
}
|
|
1076
|
-
function Gb(a, b) {
|
|
1077
|
-
if (zb) {
|
|
1078
|
-
return 0;
|
|
1079
|
-
}
|
|
1080
|
-
if (!b.includes("r") || a.mode & 292) {
|
|
1081
|
-
if (b.includes("w") && !(a.mode & 146) || b.includes("x") && !(a.mode & 73)) {
|
|
1082
|
-
return 2;
|
|
1083
|
-
}
|
|
1084
|
-
} else {
|
|
1085
|
-
return 2;
|
|
1086
|
-
}
|
|
1087
|
-
return 0;
|
|
1088
|
-
}
|
|
1089
|
-
function Ib(a, b) {
|
|
1090
|
-
try {
|
|
1091
|
-
return sb(a, b), 20;
|
|
1092
|
-
} catch (c) {
|
|
1093
|
-
}
|
|
1094
|
-
return Gb(a, "wx");
|
|
1095
|
-
}
|
|
1096
|
-
function Jb(a) {
|
|
1097
|
-
a = wb[a];
|
|
1098
|
-
if (!a) {
|
|
1099
|
-
throw new M(8);
|
|
1100
|
-
}
|
|
1101
|
-
return a;
|
|
1102
|
-
}
|
|
1103
|
-
function Kb(a, b = -1) {
|
|
1104
|
-
a = Object.assign(new Ab(), a);
|
|
1105
|
-
if (-1 == b) {
|
|
1106
|
-
a: {
|
|
1107
|
-
for (b = 0; 4096 >= b; b++) {
|
|
1108
|
-
if (!wb[b]) {
|
|
1109
|
-
break a;
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
throw new M(33);
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
a.T = b;
|
|
1116
|
-
return wb[b] = a;
|
|
1117
|
-
}
|
|
1118
|
-
function Lb(a, b = -1) {
|
|
1119
|
-
a = Kb(a, b);
|
|
1120
|
-
a.l?.uc?.(a);
|
|
1121
|
-
return a;
|
|
1122
|
-
}
|
|
1123
|
-
var pb = {open(a) {
|
|
1124
|
-
a.l = vb[a.node.Aa].l;
|
|
1125
|
-
a.l.open?.(a);
|
|
1126
|
-
}, Z() {
|
|
1127
|
-
throw new M(70);
|
|
1128
|
-
},};
|
|
1129
|
-
function jb(a, b) {
|
|
1130
|
-
vb[a] = {l:b};
|
|
1131
|
-
}
|
|
1132
|
-
function Mb(a, b) {
|
|
1133
|
-
var c = "/" === b;
|
|
1134
|
-
if (c && ub) {
|
|
1135
|
-
throw new M(10);
|
|
1136
|
-
}
|
|
1137
|
-
if (!c && b) {
|
|
1138
|
-
var d = Cb(b, {Za:!1});
|
|
1139
|
-
b = d.path;
|
|
1140
|
-
d = d.node;
|
|
1141
|
-
if (d.ya) {
|
|
1142
|
-
throw new M(10);
|
|
1143
|
-
}
|
|
1144
|
-
if (16384 !== (d.mode & 61440)) {
|
|
1145
|
-
throw new M(54);
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
b = {type:a, Fc:{}, cb:b, Qb:[]};
|
|
1149
|
-
a = a.R(b);
|
|
1150
|
-
a.R = b;
|
|
1151
|
-
b.root = a;
|
|
1152
|
-
c ? ub = a : d && (d.ya = b, d.R && d.R.Qb.push(b));
|
|
1153
|
-
}
|
|
1154
|
-
function Nb(a, b, c) {
|
|
1155
|
-
var d = Cb(a, {parent:!0}).node;
|
|
1156
|
-
a = Za(a);
|
|
1157
|
-
if (!a || "." === a || ".." === a) {
|
|
1158
|
-
throw new M(28);
|
|
1159
|
-
}
|
|
1160
|
-
var e = Ib(d, a);
|
|
1161
|
-
if (e) {
|
|
1162
|
-
throw new M(e);
|
|
1163
|
-
}
|
|
1164
|
-
if (!d.i.xa) {
|
|
1165
|
-
throw new M(63);
|
|
1166
|
-
}
|
|
1167
|
-
return d.i.xa(d, a, b, c);
|
|
1168
|
-
}
|
|
1169
|
-
function Ob(a) {
|
|
1170
|
-
return Nb(a, 16895, 0);
|
|
1171
|
-
}
|
|
1172
|
-
function Pb(a, b, c) {
|
|
1173
|
-
"undefined" == typeof c && (c = b, b = 438);
|
|
1174
|
-
Nb(a, b | 8192, c);
|
|
1175
|
-
}
|
|
1176
|
-
function Qb(a, b) {
|
|
1177
|
-
if (!bb(a)) {
|
|
1178
|
-
throw new M(44);
|
|
1179
|
-
}
|
|
1180
|
-
var c = Cb(b, {parent:!0}).node;
|
|
1181
|
-
if (!c) {
|
|
1182
|
-
throw new M(44);
|
|
1183
|
-
}
|
|
1184
|
-
b = Za(b);
|
|
1185
|
-
var d = Ib(c, b);
|
|
1186
|
-
if (d) {
|
|
1187
|
-
throw new M(d);
|
|
1188
|
-
}
|
|
1189
|
-
if (!c.i.Ca) {
|
|
1190
|
-
throw new M(63);
|
|
1191
|
-
}
|
|
1192
|
-
c.i.Ca(c, b, a);
|
|
1193
|
-
}
|
|
1194
|
-
function Db(a) {
|
|
1195
|
-
a = Cb(a).node;
|
|
1196
|
-
if (!a) {
|
|
1197
|
-
throw new M(44);
|
|
1198
|
-
}
|
|
1199
|
-
if (!a.i.ia) {
|
|
1200
|
-
throw new M(28);
|
|
1201
|
-
}
|
|
1202
|
-
return bb(Eb(a.parent), a.i.ia(a));
|
|
1203
|
-
}
|
|
1204
|
-
function Rb(a, b, c) {
|
|
1205
|
-
if ("" === a) {
|
|
1206
|
-
throw new M(44);
|
|
1207
|
-
}
|
|
1208
|
-
if ("string" == typeof b) {
|
|
1209
|
-
var d = {r:0, "r+":2, w:577, "w+":578, a:1089, "a+":1090,}[b];
|
|
1210
|
-
if ("undefined" == typeof d) {
|
|
1211
|
-
throw Error(`Unknown file open mode: ${b}`);
|
|
1212
|
-
}
|
|
1213
|
-
b = d;
|
|
1214
|
-
}
|
|
1215
|
-
c = b & 64 ? ("undefined" == typeof c ? 438 : c) & 4095 | 32768 : 0;
|
|
1216
|
-
if ("object" == typeof a) {
|
|
1217
|
-
var e = a;
|
|
1218
|
-
} else {
|
|
1219
|
-
a = Xa(a);
|
|
1220
|
-
try {
|
|
1221
|
-
e = Cb(a, {Ya:!(b & 131072)}).node;
|
|
1222
|
-
} catch (f) {
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
d = !1;
|
|
1226
|
-
if (b & 64) {
|
|
1227
|
-
if (e) {
|
|
1228
|
-
if (b & 128) {
|
|
1229
|
-
throw new M(20);
|
|
1230
|
-
}
|
|
1231
|
-
} else {
|
|
1232
|
-
e = Nb(a, c, 0), d = !0;
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
if (!e) {
|
|
1236
|
-
throw new M(44);
|
|
1237
|
-
}
|
|
1238
|
-
8192 === (e.mode & 61440) && (b &= -513);
|
|
1239
|
-
if (b & 65536 && 16384 !== (e.mode & 61440)) {
|
|
1240
|
-
throw new M(54);
|
|
1241
|
-
}
|
|
1242
|
-
if (!d && (c = e ? 40960 === (e.mode & 61440) ? 32 : 16384 === (e.mode & 61440) && ("r" !== Hb(b) || b & 512) ? 31 : Gb(e, Hb(b)) : 44)) {
|
|
1243
|
-
throw new M(c);
|
|
1244
|
-
}
|
|
1245
|
-
if (b & 512 && !d) {
|
|
1246
|
-
c = e;
|
|
1247
|
-
c = "string" == typeof c ? Cb(c, {Ya:!0}).node : c;
|
|
1248
|
-
if (!c.i.M) {
|
|
1249
|
-
throw new M(63);
|
|
1250
|
-
}
|
|
1251
|
-
if (16384 === (c.mode & 61440)) {
|
|
1252
|
-
throw new M(31);
|
|
1253
|
-
}
|
|
1254
|
-
if (32768 !== (c.mode & 61440)) {
|
|
1255
|
-
throw new M(28);
|
|
1256
|
-
}
|
|
1257
|
-
if (d = Gb(c, "w")) {
|
|
1258
|
-
throw new M(d);
|
|
1259
|
-
}
|
|
1260
|
-
c.i.M(c, {size:0, timestamp:Date.now()});
|
|
1261
|
-
}
|
|
1262
|
-
b &= -131713;
|
|
1263
|
-
e = Kb({node:e, path:Eb(e), flags:b, seekable:!0, position:0, l:e.l, cc:[], error:!1});
|
|
1264
|
-
e.l.open && e.l.open(e);
|
|
1265
|
-
!k.logReadFiles || b & 1 || (Sb ||= {}, a in Sb || (Sb[a] = 1));
|
|
1266
|
-
return e;
|
|
1267
|
-
}
|
|
1268
|
-
function Tb(a, b, c) {
|
|
1269
|
-
if (null === a.T) {
|
|
1270
|
-
throw new M(8);
|
|
1271
|
-
}
|
|
1272
|
-
if (!a.seekable || !a.l.Z) {
|
|
1273
|
-
throw new M(70);
|
|
1274
|
-
}
|
|
1275
|
-
if (0 != c && 1 != c && 2 != c) {
|
|
1276
|
-
throw new M(28);
|
|
1277
|
-
}
|
|
1278
|
-
a.position = a.l.Z(a, b, c);
|
|
1279
|
-
a.cc = [];
|
|
1280
|
-
}
|
|
1281
|
-
var Ub;
|
|
1282
|
-
function Vb(a, b, c) {
|
|
1283
|
-
a = Xa("/dev/" + a);
|
|
1284
|
-
var d = tb(!!b, !!c);
|
|
1285
|
-
Wb ||= 64;
|
|
1286
|
-
var e = Wb++ << 8 | 0;
|
|
1287
|
-
jb(e, {open(f) {
|
|
1288
|
-
f.seekable = !1;
|
|
1289
|
-
}, close() {
|
|
1290
|
-
c?.buffer?.length && c(10);
|
|
1291
|
-
}, read(f, g, h, m) {
|
|
1292
|
-
for (var l = 0, r = 0; r < m; r++) {
|
|
1293
|
-
try {
|
|
1294
|
-
var u = b();
|
|
1295
|
-
} catch (w) {
|
|
1296
|
-
throw new M(29);
|
|
1297
|
-
}
|
|
1298
|
-
if (void 0 === u && 0 === l) {
|
|
1299
|
-
throw new M(6);
|
|
1300
|
-
}
|
|
1301
|
-
if (null === u || void 0 === u) {
|
|
1302
|
-
break;
|
|
1303
|
-
}
|
|
1304
|
-
l++;
|
|
1305
|
-
g[h + r] = u;
|
|
1306
|
-
}
|
|
1307
|
-
l && (f.node.timestamp = Date.now());
|
|
1308
|
-
return l;
|
|
1309
|
-
}, write(f, g, h, m) {
|
|
1310
|
-
for (var l = 0; l < m; l++) {
|
|
1311
|
-
try {
|
|
1312
|
-
c(g[h + l]);
|
|
1313
|
-
} catch (r) {
|
|
1314
|
-
throw new M(29);
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
m && (f.node.timestamp = Date.now());
|
|
1318
|
-
return l;
|
|
1319
|
-
}});
|
|
1320
|
-
Pb(a, d, e);
|
|
1321
|
-
}
|
|
1322
|
-
var Wb, Xb = {}, Sb, Va = void 0, Yb = (a, b) => Object.defineProperty(b, "name", {value:a}), Zb = [], O = [], P, Q = a => {
|
|
1323
|
-
if (!a) {
|
|
1324
|
-
throw new P("Cannot use deleted val. handle = " + a);
|
|
1325
|
-
}
|
|
1326
|
-
return O[a];
|
|
1327
|
-
}, $b = a => {
|
|
1328
|
-
switch(a) {
|
|
1329
|
-
case void 0:
|
|
1330
|
-
return 2;
|
|
1331
|
-
case null:
|
|
1332
|
-
return 4;
|
|
1333
|
-
case !0:
|
|
1334
|
-
return 6;
|
|
1335
|
-
case !1:
|
|
1336
|
-
return 8;
|
|
1337
|
-
default:
|
|
1338
|
-
const b = Zb.pop() || O.length;
|
|
1339
|
-
O[b] = a;
|
|
1340
|
-
O[b + 1] = 1;
|
|
1341
|
-
return b;
|
|
1342
|
-
}
|
|
1343
|
-
}, ac = a => {
|
|
1344
|
-
var b = Error, c = Yb(a, function(d) {
|
|
1345
|
-
this.name = a;
|
|
1346
|
-
this.message = d;
|
|
1347
|
-
d = Error(d).stack;
|
|
1348
|
-
void 0 !== d && (this.stack = this.toString() + "\n" + d.replace(/^Error(:[^\n]*)?\n/, ""));
|
|
1349
|
-
});
|
|
1350
|
-
c.prototype = Object.create(b.prototype);
|
|
1351
|
-
c.prototype.constructor = c;
|
|
1352
|
-
c.prototype.toString = function() {
|
|
1353
|
-
return void 0 === this.message ? this.name : `${this.name}: ${this.message}`;
|
|
1354
|
-
};
|
|
1355
|
-
return c;
|
|
1356
|
-
}, bc, cc, R = a => {
|
|
1357
|
-
for (var b = ""; D[a];) {
|
|
1358
|
-
b += cc[D[a++]];
|
|
1359
|
-
}
|
|
1360
|
-
return b;
|
|
1361
|
-
}, dc = [], ec = () => {
|
|
1362
|
-
for (; dc.length;) {
|
|
1363
|
-
var a = dc.pop();
|
|
1364
|
-
a.g.ea = !1;
|
|
1365
|
-
a["delete"]();
|
|
1366
|
-
}
|
|
1367
|
-
}, fc, gc = {}, hc = (a, b) => {
|
|
1368
|
-
if (void 0 === b) {
|
|
1369
|
-
throw new P("ptr should not be undefined");
|
|
1370
|
-
}
|
|
1371
|
-
for (; a.A;) {
|
|
1372
|
-
b = a.ka(b), a = a.A;
|
|
1373
|
-
}
|
|
1374
|
-
return b;
|
|
1375
|
-
}, ic = {}, lc = a => {
|
|
1376
|
-
a = jc(a);
|
|
1377
|
-
var b = R(a);
|
|
1378
|
-
kc(a);
|
|
1379
|
-
return b;
|
|
1380
|
-
}, mc = (a, b) => {
|
|
1381
|
-
var c = ic[a];
|
|
1382
|
-
if (void 0 === c) {
|
|
1383
|
-
throw a = `${b} has unknown type ${lc(a)}`, new P(a);
|
|
1384
|
-
}
|
|
1385
|
-
return c;
|
|
1386
|
-
}, nc = () => {
|
|
1387
|
-
}, oc = !1, pc = (a, b, c) => {
|
|
1388
|
-
if (b === c) {
|
|
1389
|
-
return a;
|
|
1390
|
-
}
|
|
1391
|
-
if (void 0 === c.A) {
|
|
1392
|
-
return null;
|
|
1393
|
-
}
|
|
1394
|
-
a = pc(a, b, c.A);
|
|
1395
|
-
return null === a ? null : c.Ab(a);
|
|
1396
|
-
}, qc = {}, rc = (a, b) => {
|
|
1397
|
-
b = hc(a, b);
|
|
1398
|
-
return gc[b];
|
|
1399
|
-
}, sc, uc = (a, b) => {
|
|
1400
|
-
if (!b.s || !b.m) {
|
|
1401
|
-
throw new sc("makeClassHandle requires ptr and ptrType");
|
|
1402
|
-
}
|
|
1403
|
-
if (!!b.G !== !!b.B) {
|
|
1404
|
-
throw new sc("Both smartPtrType and smartPtr must be specified");
|
|
1405
|
-
}
|
|
1406
|
-
b.count = {value:1};
|
|
1407
|
-
return tc(Object.create(a, {g:{value:b, writable:!0,},}));
|
|
1408
|
-
}, tc = a => {
|
|
1409
|
-
if ("undefined" === typeof FinalizationRegistry) {
|
|
1410
|
-
return tc = b => b, a;
|
|
1411
|
-
}
|
|
1412
|
-
oc = new FinalizationRegistry(b => {
|
|
1413
|
-
b = b.g;
|
|
1414
|
-
--b.count.value;
|
|
1415
|
-
0 === b.count.value && (b.B ? b.G.L(b.B) : b.s.h.L(b.m));
|
|
1416
|
-
});
|
|
1417
|
-
tc = b => {
|
|
1418
|
-
var c = b.g;
|
|
1419
|
-
c.B && oc.register(b, {g:c}, b);
|
|
1420
|
-
return b;
|
|
1421
|
-
};
|
|
1422
|
-
nc = b => {
|
|
1423
|
-
oc.unregister(b);
|
|
1424
|
-
};
|
|
1425
|
-
return tc(a);
|
|
1426
|
-
}, vc = {}, wc = a => {
|
|
1427
|
-
for (; a.length;) {
|
|
1428
|
-
var b = a.pop();
|
|
1429
|
-
a.pop()(b);
|
|
1430
|
-
}
|
|
1431
|
-
};
|
|
1432
|
-
function xc(a) {
|
|
1433
|
-
return this.fromWireType(K[a >> 2]);
|
|
1434
|
-
}
|
|
1435
|
-
var yc = {}, zc = {}, T = (a, b, c) => {
|
|
1436
|
-
function d(h) {
|
|
1437
|
-
h = c(h);
|
|
1438
|
-
if (h.length !== a.length) {
|
|
1439
|
-
throw new sc("Mismatched type converter count");
|
|
1440
|
-
}
|
|
1441
|
-
for (var m = 0; m < a.length; ++m) {
|
|
1442
|
-
S(a[m], h[m]);
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
a.forEach(function(h) {
|
|
1446
|
-
zc[h] = b;
|
|
1447
|
-
});
|
|
1448
|
-
var e = Array(b.length), f = [], g = 0;
|
|
1449
|
-
b.forEach((h, m) => {
|
|
1450
|
-
ic.hasOwnProperty(h) ? e[m] = ic[h] : (f.push(h), yc.hasOwnProperty(h) || (yc[h] = []), yc[h].push(() => {
|
|
1451
|
-
e[m] = ic[h];
|
|
1452
|
-
++g;
|
|
1453
|
-
g === f.length && d(e);
|
|
1454
|
-
}));
|
|
1455
|
-
});
|
|
1456
|
-
0 === f.length && d(e);
|
|
1457
|
-
};
|
|
1458
|
-
function Ac(a, b, c = {}) {
|
|
1459
|
-
var d = b.name;
|
|
1460
|
-
if (!a) {
|
|
1461
|
-
throw new P(`type "${d}" must have a positive integer typeid pointer`);
|
|
1462
|
-
}
|
|
1463
|
-
if (ic.hasOwnProperty(a)) {
|
|
1464
|
-
if (c.Kb) {
|
|
1465
|
-
return;
|
|
1466
|
-
}
|
|
1467
|
-
throw new P(`Cannot register type '${d}' twice`);
|
|
1468
|
-
}
|
|
1469
|
-
ic[a] = b;
|
|
1470
|
-
delete zc[a];
|
|
1471
|
-
yc.hasOwnProperty(a) && (b = yc[a], delete yc[a], b.forEach(e => e()));
|
|
1472
|
-
}
|
|
1473
|
-
function S(a, b, c = {}) {
|
|
1474
|
-
if (!("argPackAdvance" in b)) {
|
|
1475
|
-
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
1476
|
-
}
|
|
1477
|
-
return Ac(a, b, c);
|
|
1478
|
-
}
|
|
1479
|
-
var Bc = a => {
|
|
1480
|
-
throw new P(a.g.s.h.name + " instance already deleted");
|
|
1481
|
-
};
|
|
1482
|
-
function Cc() {
|
|
1483
|
-
}
|
|
1484
|
-
var Dc = (a, b, c) => {
|
|
1485
|
-
if (void 0 === a[b].v) {
|
|
1486
|
-
var d = a[b];
|
|
1487
|
-
a[b] = function(...e) {
|
|
1488
|
-
if (!a[b].v.hasOwnProperty(e.length)) {
|
|
1489
|
-
throw new P(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${a[b].v})!`);
|
|
1490
|
-
}
|
|
1491
|
-
return a[b].v[e.length].apply(this, e);
|
|
1492
|
-
};
|
|
1493
|
-
a[b].v = [];
|
|
1494
|
-
a[b].v[d.da] = d;
|
|
1495
|
-
}
|
|
1496
|
-
}, Ec = (a, b, c) => {
|
|
1497
|
-
if (k.hasOwnProperty(a)) {
|
|
1498
|
-
if (void 0 === c || void 0 !== k[a].v && void 0 !== k[a].v[c]) {
|
|
1499
|
-
throw new P(`Cannot register public name '${a}' twice`);
|
|
1500
|
-
}
|
|
1501
|
-
Dc(k, a, a);
|
|
1502
|
-
if (k.hasOwnProperty(c)) {
|
|
1503
|
-
throw new P(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
|
|
1504
|
-
}
|
|
1505
|
-
k[a].v[c] = b;
|
|
1506
|
-
} else {
|
|
1507
|
-
k[a] = b, void 0 !== c && (k[a].Ec = c);
|
|
1508
|
-
}
|
|
1509
|
-
}, Fc = a => {
|
|
1510
|
-
if (void 0 === a) {
|
|
1511
|
-
return "_unknown";
|
|
1512
|
-
}
|
|
1513
|
-
a = a.replace(/[^a-zA-Z0-9_]/g, "$");
|
|
1514
|
-
var b = a.charCodeAt(0);
|
|
1515
|
-
return 48 <= b && 57 >= b ? `_${a}` : a;
|
|
1516
|
-
};
|
|
1517
|
-
function Gc(a, b, c, d, e, f, g, h) {
|
|
1518
|
-
this.name = a;
|
|
1519
|
-
this.constructor = b;
|
|
1520
|
-
this.J = c;
|
|
1521
|
-
this.L = d;
|
|
1522
|
-
this.A = e;
|
|
1523
|
-
this.Fb = f;
|
|
1524
|
-
this.ka = g;
|
|
1525
|
-
this.Ab = h;
|
|
1526
|
-
this.hb = [];
|
|
1527
|
-
}
|
|
1528
|
-
var Hc = (a, b, c) => {
|
|
1529
|
-
for (; b !== c;) {
|
|
1530
|
-
if (!b.ka) {
|
|
1531
|
-
throw new P(`Expected null or instance of ${c.name}, got an instance of ${b.name}`);
|
|
1532
|
-
}
|
|
1533
|
-
a = b.ka(a);
|
|
1534
|
-
b = b.A;
|
|
1535
|
-
}
|
|
1536
|
-
return a;
|
|
1537
|
-
};
|
|
1538
|
-
function Ic(a, b) {
|
|
1539
|
-
if (null === b) {
|
|
1540
|
-
if (this.La) {
|
|
1541
|
-
throw new P(`null is not a valid ${this.name}`);
|
|
1542
|
-
}
|
|
1543
|
-
return 0;
|
|
1544
|
-
}
|
|
1545
|
-
if (!b.g) {
|
|
1546
|
-
throw new P(`Cannot pass "${Jc(b)}" as a ${this.name}`);
|
|
1547
|
-
}
|
|
1548
|
-
if (!b.g.m) {
|
|
1549
|
-
throw new P(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1550
|
-
}
|
|
1551
|
-
return Hc(b.g.m, b.g.s.h, this.h);
|
|
1552
|
-
}
|
|
1553
|
-
function Kc(a, b) {
|
|
1554
|
-
if (null === b) {
|
|
1555
|
-
if (this.La) {
|
|
1556
|
-
throw new P(`null is not a valid ${this.name}`);
|
|
1557
|
-
}
|
|
1558
|
-
if (this.ta) {
|
|
1559
|
-
var c = this.Na();
|
|
1560
|
-
null !== a && a.push(this.L, c);
|
|
1561
|
-
return c;
|
|
1562
|
-
}
|
|
1563
|
-
return 0;
|
|
1564
|
-
}
|
|
1565
|
-
if (!b || !b.g) {
|
|
1566
|
-
throw new P(`Cannot pass "${Jc(b)}" as a ${this.name}`);
|
|
1567
|
-
}
|
|
1568
|
-
if (!b.g.m) {
|
|
1569
|
-
throw new P(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1570
|
-
}
|
|
1571
|
-
if (!this.sa && b.g.s.sa) {
|
|
1572
|
-
throw new P(`Cannot convert argument of type ${b.g.G ? b.g.G.name : b.g.s.name} to parameter type ${this.name}`);
|
|
1573
|
-
}
|
|
1574
|
-
c = Hc(b.g.m, b.g.s.h, this.h);
|
|
1575
|
-
if (this.ta) {
|
|
1576
|
-
if (void 0 === b.g.B) {
|
|
1577
|
-
throw new P("Passing raw pointer to smart pointer is illegal");
|
|
1578
|
-
}
|
|
1579
|
-
switch(this.Yb) {
|
|
1580
|
-
case 0:
|
|
1581
|
-
if (b.g.G === this) {
|
|
1582
|
-
c = b.g.B;
|
|
1583
|
-
} else {
|
|
1584
|
-
throw new P(`Cannot convert argument of type ${b.g.G ? b.g.G.name : b.g.s.name} to parameter type ${this.name}`);
|
|
1585
|
-
}
|
|
1586
|
-
break;
|
|
1587
|
-
case 1:
|
|
1588
|
-
c = b.g.B;
|
|
1589
|
-
break;
|
|
1590
|
-
case 2:
|
|
1591
|
-
if (b.g.G === this) {
|
|
1592
|
-
c = b.g.B;
|
|
1593
|
-
} else {
|
|
1594
|
-
var d = b.clone();
|
|
1595
|
-
c = this.Ub(c, $b(() => d["delete"]()));
|
|
1596
|
-
null !== a && a.push(this.L, c);
|
|
1597
|
-
}
|
|
1598
|
-
break;
|
|
1599
|
-
default:
|
|
1600
|
-
throw new P("Unsupporting sharing policy");
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
return c;
|
|
1604
|
-
}
|
|
1605
|
-
function Lc(a, b) {
|
|
1606
|
-
if (null === b) {
|
|
1607
|
-
if (this.La) {
|
|
1608
|
-
throw new P(`null is not a valid ${this.name}`);
|
|
1609
|
-
}
|
|
1610
|
-
return 0;
|
|
1611
|
-
}
|
|
1612
|
-
if (!b.g) {
|
|
1613
|
-
throw new P(`Cannot pass "${Jc(b)}" as a ${this.name}`);
|
|
1614
|
-
}
|
|
1615
|
-
if (!b.g.m) {
|
|
1616
|
-
throw new P(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1617
|
-
}
|
|
1618
|
-
if (b.g.s.sa) {
|
|
1619
|
-
throw new P(`Cannot convert argument of type ${b.g.s.name} to parameter type ${this.name}`);
|
|
1620
|
-
}
|
|
1621
|
-
return Hc(b.g.m, b.g.s.h, this.h);
|
|
1622
|
-
}
|
|
1623
|
-
function Mc(a, b, c, d, e, f, g, h, m, l, r) {
|
|
1624
|
-
this.name = a;
|
|
1625
|
-
this.h = b;
|
|
1626
|
-
this.La = c;
|
|
1627
|
-
this.sa = d;
|
|
1628
|
-
this.ta = e;
|
|
1629
|
-
this.Tb = f;
|
|
1630
|
-
this.Yb = g;
|
|
1631
|
-
this.jb = h;
|
|
1632
|
-
this.Na = m;
|
|
1633
|
-
this.Ub = l;
|
|
1634
|
-
this.L = r;
|
|
1635
|
-
e || void 0 !== b.A ? this.toWireType = Kc : (this.toWireType = d ? Ic : Lc, this.I = null);
|
|
1636
|
-
}
|
|
1637
|
-
var Nc = (a, b, c) => {
|
|
1638
|
-
if (!k.hasOwnProperty(a)) {
|
|
1639
|
-
throw new sc("Replacing nonexistent public symbol");
|
|
1640
|
-
}
|
|
1641
|
-
void 0 !== k[a].v && void 0 !== c ? k[a].v[c] = b : (k[a] = b, k[a].da = c);
|
|
1642
|
-
}, Oc = [], Pc, Qc = a => {
|
|
1643
|
-
var b = Oc[a];
|
|
1644
|
-
b || (a >= Oc.length && (Oc.length = a + 1), Oc[a] = b = Pc.get(a));
|
|
1645
|
-
return b;
|
|
1646
|
-
}, Rc = (a, b, c = []) => {
|
|
1647
|
-
a.includes("j") ? (a = a.replace(/p/g, "i"), b = (0,k["dynCall_" + a])(b, ...c)) : b = Qc(b)(...c);
|
|
1648
|
-
return b;
|
|
1649
|
-
}, Sc = (a, b) => (...c) => Rc(a, b, c), U = (a, b) => {
|
|
1650
|
-
a = R(a);
|
|
1651
|
-
var c = a.includes("j") ? Sc(a, b) : Qc(b);
|
|
1652
|
-
if ("function" != typeof c) {
|
|
1653
|
-
throw new P(`unknown function pointer with signature ${a}: ${b}`);
|
|
1654
|
-
}
|
|
1655
|
-
return c;
|
|
1656
|
-
}, Tc, Uc = (a, b) => {
|
|
1657
|
-
function c(f) {
|
|
1658
|
-
e[f] || ic[f] || (zc[f] ? zc[f].forEach(c) : (d.push(f), e[f] = !0));
|
|
1659
|
-
}
|
|
1660
|
-
var d = [], e = {};
|
|
1661
|
-
b.forEach(c);
|
|
1662
|
-
throw new Tc(`${a}: ` + d.map(lc).join([", "]));
|
|
1663
|
-
};
|
|
1664
|
-
function Vc(a) {
|
|
1665
|
-
for (var b = 1; b < a.length; ++b) {
|
|
1666
|
-
if (null !== a[b] && void 0 === a[b].I) {
|
|
1667
|
-
return !0;
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
return !1;
|
|
1671
|
-
}
|
|
1672
|
-
function Wc(a, b, c, d, e) {
|
|
1673
|
-
var f = b.length;
|
|
1674
|
-
if (2 > f) {
|
|
1675
|
-
throw new P("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1676
|
-
}
|
|
1677
|
-
var g = null !== b[1] && null !== c, h = Vc(b), m = "void" !== b[0].name, l = f - 2, r = Array(l), u = [], w = [];
|
|
1678
|
-
return Yb(a, function(...n) {
|
|
1679
|
-
if (n.length !== l) {
|
|
1680
|
-
throw new P(`function ${a} called with ${n.length} arguments, expected ${l}`);
|
|
1681
|
-
}
|
|
1682
|
-
w.length = 0;
|
|
1683
|
-
u.length = g ? 2 : 1;
|
|
1684
|
-
u[0] = e;
|
|
1685
|
-
if (g) {
|
|
1686
|
-
var q = b[1].toWireType(w, this);
|
|
1687
|
-
u[1] = q;
|
|
1688
|
-
}
|
|
1689
|
-
for (var t = 0; t < l; ++t) {
|
|
1690
|
-
r[t] = b[t + 2].toWireType(w, n[t]), u.push(r[t]);
|
|
1691
|
-
}
|
|
1692
|
-
n = d(...u);
|
|
1693
|
-
if (h) {
|
|
1694
|
-
wc(w);
|
|
1695
|
-
} else {
|
|
1696
|
-
for (t = g ? 1 : 2; t < b.length; t++) {
|
|
1697
|
-
var y = 1 === t ? q : r[t - 2];
|
|
1698
|
-
null !== b[t].I && b[t].I(y);
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
q = m ? b[0].fromWireType(n) : void 0;
|
|
1702
|
-
return q;
|
|
1703
|
-
});
|
|
1704
|
-
}
|
|
1705
|
-
var Xc = (a, b) => {
|
|
1706
|
-
for (var c = [], d = 0; d < a; d++) {
|
|
1707
|
-
c.push(K[b + 4 * d >> 2]);
|
|
1708
|
-
}
|
|
1709
|
-
return c;
|
|
1710
|
-
}, Yc = a => {
|
|
1711
|
-
a = a.trim();
|
|
1712
|
-
const b = a.indexOf("(");
|
|
1713
|
-
return -1 !== b ? a.substr(0, b) : a;
|
|
1714
|
-
}, Zc = (a, b, c) => {
|
|
1715
|
-
if (!(a instanceof Object)) {
|
|
1716
|
-
throw new P(`${c} with invalid "this": ${a}`);
|
|
1717
|
-
}
|
|
1718
|
-
if (!(a instanceof b.h.constructor)) {
|
|
1719
|
-
throw new P(`${c} incompatible with "this" of type ${a.constructor.name}`);
|
|
1720
|
-
}
|
|
1721
|
-
if (!a.g.m) {
|
|
1722
|
-
throw new P(`cannot call emscripten binding method ${c} on deleted object`);
|
|
1723
|
-
}
|
|
1724
|
-
return Hc(a.g.m, a.g.s.h, b.h);
|
|
1725
|
-
}, $c = a => {
|
|
1726
|
-
9 < a && 0 === --O[a + 1] && (O[a] = void 0, Zb.push(a));
|
|
1727
|
-
}, ad = {name:"emscripten::val", fromWireType:a => {
|
|
1728
|
-
var b = Q(a);
|
|
1729
|
-
$c(a);
|
|
1730
|
-
return b;
|
|
1731
|
-
}, toWireType:(a, b) => $b(b), argPackAdvance:8, readValueFromPointer:xc, I:null,}, bd = (a, b, c) => {
|
|
1732
|
-
switch(b) {
|
|
1733
|
-
case 1:
|
|
1734
|
-
return c ? function(d) {
|
|
1735
|
-
return this.fromWireType(C[d]);
|
|
1736
|
-
} : function(d) {
|
|
1737
|
-
return this.fromWireType(D[d]);
|
|
1738
|
-
};
|
|
1739
|
-
case 2:
|
|
1740
|
-
return c ? function(d) {
|
|
1741
|
-
return this.fromWireType(E[d >> 1]);
|
|
1742
|
-
} : function(d) {
|
|
1743
|
-
return this.fromWireType(va[d >> 1]);
|
|
1744
|
-
};
|
|
1745
|
-
case 4:
|
|
1746
|
-
return c ? function(d) {
|
|
1747
|
-
return this.fromWireType(F[d >> 2]);
|
|
1748
|
-
} : function(d) {
|
|
1749
|
-
return this.fromWireType(K[d >> 2]);
|
|
1750
|
-
};
|
|
1751
|
-
default:
|
|
1752
|
-
throw new TypeError(`invalid integer width (${b}): ${a}`);
|
|
1753
|
-
}
|
|
1754
|
-
}, Jc = a => {
|
|
1755
|
-
if (null === a) {
|
|
1756
|
-
return "null";
|
|
1757
|
-
}
|
|
1758
|
-
var b = typeof a;
|
|
1759
|
-
return "object" === b || "array" === b || "function" === b ? a.toString() : "" + a;
|
|
1760
|
-
}, cd = (a, b) => {
|
|
1761
|
-
switch(b) {
|
|
1762
|
-
case 4:
|
|
1763
|
-
return function(c) {
|
|
1764
|
-
return this.fromWireType(wa[c >> 2]);
|
|
1765
|
-
};
|
|
1766
|
-
case 8:
|
|
1767
|
-
return function(c) {
|
|
1768
|
-
return this.fromWireType(xa[c >> 3]);
|
|
1769
|
-
};
|
|
1770
|
-
default:
|
|
1771
|
-
throw new TypeError(`invalid float width (${b}): ${a}`);
|
|
1772
|
-
}
|
|
1773
|
-
}, dd = (a, b, c) => {
|
|
1774
|
-
switch(b) {
|
|
1775
|
-
case 1:
|
|
1776
|
-
return c ? d => C[d] : d => D[d];
|
|
1777
|
-
case 2:
|
|
1778
|
-
return c ? d => E[d >> 1] : d => va[d >> 1];
|
|
1779
|
-
case 4:
|
|
1780
|
-
return c ? d => F[d >> 2] : d => K[d >> 2];
|
|
1781
|
-
default:
|
|
1782
|
-
throw new TypeError(`invalid integer width (${b}): ${a}`);
|
|
1783
|
-
}
|
|
1784
|
-
}, ed = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, fd = (a, b) => {
|
|
1785
|
-
var c = a >> 1;
|
|
1786
|
-
for (var d = c + b / 2; !(c >= d) && va[c];) {
|
|
1787
|
-
++c;
|
|
1788
|
-
}
|
|
1789
|
-
c <<= 1;
|
|
1790
|
-
if (32 < c - a && ed) {
|
|
1791
|
-
return ed.decode(D.subarray(a, c));
|
|
1792
|
-
}
|
|
1793
|
-
c = "";
|
|
1794
|
-
for (d = 0; !(d >= b / 2); ++d) {
|
|
1795
|
-
var e = E[a + 2 * d >> 1];
|
|
1796
|
-
if (0 == e) {
|
|
1797
|
-
break;
|
|
1798
|
-
}
|
|
1799
|
-
c += String.fromCharCode(e);
|
|
1800
|
-
}
|
|
1801
|
-
return c;
|
|
1802
|
-
}, gd = (a, b, c) => {
|
|
1803
|
-
c ??= 2147483647;
|
|
1804
|
-
if (2 > c) {
|
|
1805
|
-
return 0;
|
|
1806
|
-
}
|
|
1807
|
-
c -= 2;
|
|
1808
|
-
var d = b;
|
|
1809
|
-
c = c < 2 * a.length ? c / 2 : a.length;
|
|
1810
|
-
for (var e = 0; e < c; ++e) {
|
|
1811
|
-
E[b >> 1] = a.charCodeAt(e), b += 2;
|
|
1812
|
-
}
|
|
1813
|
-
E[b >> 1] = 0;
|
|
1814
|
-
return b - d;
|
|
1815
|
-
}, hd = a => 2 * a.length, jd = (a, b) => {
|
|
1816
|
-
for (var c = 0, d = ""; !(c >= b / 4);) {
|
|
1817
|
-
var e = F[a + 4 * c >> 2];
|
|
1818
|
-
if (0 == e) {
|
|
1819
|
-
break;
|
|
1820
|
-
}
|
|
1821
|
-
++c;
|
|
1822
|
-
65536 <= e ? (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : d += String.fromCharCode(e);
|
|
1823
|
-
}
|
|
1824
|
-
return d;
|
|
1825
|
-
}, kd = (a, b, c) => {
|
|
1826
|
-
c ??= 2147483647;
|
|
1827
|
-
if (4 > c) {
|
|
1828
|
-
return 0;
|
|
1829
|
-
}
|
|
1830
|
-
var d = b;
|
|
1831
|
-
c = d + c - 4;
|
|
1832
|
-
for (var e = 0; e < a.length; ++e) {
|
|
1833
|
-
var f = a.charCodeAt(e);
|
|
1834
|
-
if (55296 <= f && 57343 >= f) {
|
|
1835
|
-
var g = a.charCodeAt(++e);
|
|
1836
|
-
f = 65536 + ((f & 1023) << 10) | g & 1023;
|
|
1837
|
-
}
|
|
1838
|
-
F[b >> 2] = f;
|
|
1839
|
-
b += 4;
|
|
1840
|
-
if (b + 4 > c) {
|
|
1841
|
-
break;
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
F[b >> 2] = 0;
|
|
1845
|
-
return b - d;
|
|
1846
|
-
}, ld = a => {
|
|
1847
|
-
for (var b = 0, c = 0; c < a.length; ++c) {
|
|
1848
|
-
var d = a.charCodeAt(c);
|
|
1849
|
-
55296 <= d && 57343 >= d && ++c;
|
|
1850
|
-
b += 4;
|
|
1851
|
-
}
|
|
1852
|
-
return b;
|
|
1853
|
-
}, md = (a, b, c) => {
|
|
1854
|
-
var d = [];
|
|
1855
|
-
a = a.toWireType(d, c);
|
|
1856
|
-
d.length && (K[b >> 2] = $b(d));
|
|
1857
|
-
return a;
|
|
1858
|
-
}, nd = [], od = {}, pd = a => {
|
|
1859
|
-
var b = od[a];
|
|
1860
|
-
return void 0 === b ? R(a) : b;
|
|
1861
|
-
}, qd = a => {
|
|
1862
|
-
var b = nd.length;
|
|
1863
|
-
nd.push(a);
|
|
1864
|
-
return b;
|
|
1865
|
-
}, rd = (a, b) => {
|
|
1866
|
-
for (var c = Array(a), d = 0; d < a; ++d) {
|
|
1867
|
-
c[d] = mc(K[b + 4 * d >> 2], "parameter " + d);
|
|
1868
|
-
}
|
|
1869
|
-
return c;
|
|
1870
|
-
}, sd = Reflect.construct, td = a => 0 === a % 4 && (0 !== a % 100 || 0 === a % 400), ud = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335], vd = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], wd = [], xd = a => {
|
|
1871
|
-
a.tc = a.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");
|
|
1872
|
-
}, yd = a => {
|
|
1873
|
-
a.Bc = a.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");
|
|
1874
|
-
}, zd = a => {
|
|
1875
|
-
var b = "EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw".split(" ");
|
|
1876
|
-
return (a.getSupportedExtensions() || []).filter(c => b.includes(c));
|
|
1877
|
-
}, Ad = 1, Bd = [], V = [], Cd = [], Dd = [], Ed = [], Fd = [], Gd = [], v = [], Hd = {}, Id = 4, Jd = 0, Kd = a => {
|
|
1878
|
-
for (var b = Ad++, c = a.length; c < b; c++) {
|
|
1879
|
-
a[c] = null;
|
|
1880
|
-
}
|
|
1881
|
-
return b;
|
|
1882
|
-
}, Ld = (a, b, c, d) => {
|
|
1883
|
-
for (var e = 0; e < a; e++) {
|
|
1884
|
-
var f = W[c](), g = f && Kd(d);
|
|
1885
|
-
f ? (f.name = g, d[g] = f) : X ||= 1282;
|
|
1886
|
-
F[b + 4 * e >> 2] = g;
|
|
1887
|
-
}
|
|
1888
|
-
}, la = (a, b) => {
|
|
1889
|
-
var c = Kd(v), d = {handle:c, attributes:b, version:b.Ac, C:a};
|
|
1890
|
-
a.canvas && (a.canvas.qb = d);
|
|
1891
|
-
v[c] = d;
|
|
1892
|
-
("undefined" == typeof b.Bb || b.Bb) && Md(d);
|
|
1893
|
-
return c;
|
|
1894
|
-
}, ka = a => {
|
|
1895
|
-
p = v[a];
|
|
1896
|
-
k.rc = W = p?.C;
|
|
1897
|
-
return !(a && !W);
|
|
1898
|
-
}, Md = a => {
|
|
1899
|
-
a ||= p;
|
|
1900
|
-
if (!a.Lb) {
|
|
1901
|
-
a.Lb = !0;
|
|
1902
|
-
var b = a.C;
|
|
1903
|
-
xd(b);
|
|
1904
|
-
yd(b);
|
|
1905
|
-
2 <= a.version && (b.Wa = b.getExtension("EXT_disjoint_timer_query_webgl2"));
|
|
1906
|
-
if (2 > a.version || !b.Wa) {
|
|
1907
|
-
b.Wa = b.getExtension("EXT_disjoint_timer_query");
|
|
1908
|
-
}
|
|
1909
|
-
b.Rb = b.getExtension("WEBGL_multi_draw");
|
|
1910
|
-
zd(b).forEach(c => {
|
|
1911
|
-
c.includes("lose_context") || c.includes("debug") || b.getExtension(c);
|
|
1912
|
-
});
|
|
1913
|
-
}
|
|
1914
|
-
}, X, p, Nd = {}, Pd = () => {
|
|
1915
|
-
if (!Od) {
|
|
1916
|
-
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;
|
|
1917
|
-
for (b in Nd) {
|
|
1918
|
-
void 0 === Nd[b] ? delete a[b] : a[b] = Nd[b];
|
|
1919
|
-
}
|
|
1920
|
-
var c = [];
|
|
1921
|
-
for (b in a) {
|
|
1922
|
-
c.push(`${b}=${a[b]}`);
|
|
1923
|
-
}
|
|
1924
|
-
Od = c;
|
|
1925
|
-
}
|
|
1926
|
-
return Od;
|
|
1927
|
-
}, Od, Qd = [];
|
|
1928
|
-
function Rd() {
|
|
1929
|
-
var a = zd(W);
|
|
1930
|
-
return a = a.concat(a.map(b => "GL_" + b));
|
|
1931
|
-
}
|
|
1932
|
-
var Sd = (a, b) => {
|
|
1933
|
-
if (b) {
|
|
1934
|
-
var c = void 0;
|
|
1935
|
-
switch(a) {
|
|
1936
|
-
case 36346:
|
|
1937
|
-
c = 1;
|
|
1938
|
-
break;
|
|
1939
|
-
case 36344:
|
|
1940
|
-
return;
|
|
1941
|
-
case 34814:
|
|
1942
|
-
case 36345:
|
|
1943
|
-
c = 0;
|
|
1944
|
-
break;
|
|
1945
|
-
case 34466:
|
|
1946
|
-
var d = W.getParameter(34467);
|
|
1947
|
-
c = d ? d.length : 0;
|
|
1948
|
-
break;
|
|
1949
|
-
case 33309:
|
|
1950
|
-
if (2 > p.version) {
|
|
1951
|
-
X ||= 1282;
|
|
1952
|
-
return;
|
|
1953
|
-
}
|
|
1954
|
-
c = Rd().length;
|
|
1955
|
-
break;
|
|
1956
|
-
case 33307:
|
|
1957
|
-
case 33308:
|
|
1958
|
-
if (2 > p.version) {
|
|
1959
|
-
X ||= 1280;
|
|
1960
|
-
return;
|
|
1961
|
-
}
|
|
1962
|
-
c = 33307 == a ? 3 : 0;
|
|
1963
|
-
}
|
|
1964
|
-
if (void 0 === c) {
|
|
1965
|
-
switch(d = W.getParameter(a), typeof d) {
|
|
1966
|
-
case "number":
|
|
1967
|
-
c = d;
|
|
1968
|
-
break;
|
|
1969
|
-
case "boolean":
|
|
1970
|
-
c = d ? 1 : 0;
|
|
1971
|
-
break;
|
|
1972
|
-
case "string":
|
|
1973
|
-
X ||= 1280;
|
|
1974
|
-
return;
|
|
1975
|
-
case "object":
|
|
1976
|
-
if (null === d) {
|
|
1977
|
-
switch(a) {
|
|
1978
|
-
case 34964:
|
|
1979
|
-
case 35725:
|
|
1980
|
-
case 34965:
|
|
1981
|
-
case 36006:
|
|
1982
|
-
case 36007:
|
|
1983
|
-
case 32873:
|
|
1984
|
-
case 34229:
|
|
1985
|
-
case 36662:
|
|
1986
|
-
case 36663:
|
|
1987
|
-
case 35053:
|
|
1988
|
-
case 35055:
|
|
1989
|
-
case 36010:
|
|
1990
|
-
case 35097:
|
|
1991
|
-
case 35869:
|
|
1992
|
-
case 32874:
|
|
1993
|
-
case 36389:
|
|
1994
|
-
case 35983:
|
|
1995
|
-
case 35368:
|
|
1996
|
-
case 34068:
|
|
1997
|
-
c = 0;
|
|
1998
|
-
break;
|
|
1999
|
-
default:
|
|
2000
|
-
X ||= 1280;
|
|
2001
|
-
return;
|
|
2002
|
-
}
|
|
2003
|
-
} else {
|
|
2004
|
-
if (d instanceof Float32Array || d instanceof Uint32Array || d instanceof Int32Array || d instanceof Array) {
|
|
2005
|
-
for (a = 0; a < d.length; ++a) {
|
|
2006
|
-
F[b + 4 * a >> 2] = d[a];
|
|
2007
|
-
}
|
|
2008
|
-
return;
|
|
2009
|
-
}
|
|
2010
|
-
try {
|
|
2011
|
-
c = d.name | 0;
|
|
2012
|
-
} catch (e) {
|
|
2013
|
-
X ||= 1280;
|
|
2014
|
-
A(`GL_INVALID_ENUM in glGet${0}v: Unknown object returned from WebGL getParameter(${a})! (error: ${e})`);
|
|
2015
|
-
return;
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
break;
|
|
2019
|
-
default:
|
|
2020
|
-
X ||= 1280;
|
|
2021
|
-
A(`GL_INVALID_ENUM in glGet${0}v: Native code calling glGet${0}v(${a}) and it returns ${d} of type ${typeof d}!`);
|
|
2022
|
-
return;
|
|
2023
|
-
}
|
|
2024
|
-
}
|
|
2025
|
-
F[b >> 2] = c;
|
|
2026
|
-
} else {
|
|
2027
|
-
X ||= 1281;
|
|
2028
|
-
}
|
|
2029
|
-
}, Ud = a => {
|
|
2030
|
-
var b = eb(a) + 1, c = Td(b);
|
|
2031
|
-
c && fb(a, D, c, b);
|
|
2032
|
-
return c;
|
|
2033
|
-
}, Vd = a => "]" == a.slice(-1) && a.lastIndexOf("["), Wd = a => {
|
|
2034
|
-
a -= 5120;
|
|
2035
|
-
return 0 == a ? C : 1 == a ? D : 2 == a ? E : 4 == a ? F : 6 == a ? wa : 5 == a || 28922 == a || 28520 == a || 30779 == a || 30782 == a ? K : va;
|
|
2036
|
-
}, Xd = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Yd = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Zd = (a, b, c, d) => {
|
|
2037
|
-
function e(n, q, t) {
|
|
2038
|
-
for (n = "number" == typeof n ? n.toString() : n || ""; n.length < q;) {
|
|
2039
|
-
n = t[0] + n;
|
|
2040
|
-
}
|
|
2041
|
-
return n;
|
|
2042
|
-
}
|
|
2043
|
-
function f(n, q) {
|
|
2044
|
-
return e(n, q, "0");
|
|
2045
|
-
}
|
|
2046
|
-
function g(n, q) {
|
|
2047
|
-
function t(z) {
|
|
2048
|
-
return 0 > z ? -1 : 0 < z ? 1 : 0;
|
|
2049
|
-
}
|
|
2050
|
-
var y;
|
|
2051
|
-
0 === (y = t(n.getFullYear() - q.getFullYear())) && 0 === (y = t(n.getMonth() - q.getMonth())) && (y = t(n.getDate() - q.getDate()));
|
|
2052
|
-
return y;
|
|
2053
|
-
}
|
|
2054
|
-
function h(n) {
|
|
2055
|
-
switch(n.getDay()) {
|
|
2056
|
-
case 0:
|
|
2057
|
-
return new Date(n.getFullYear() - 1, 11, 29);
|
|
2058
|
-
case 1:
|
|
2059
|
-
return n;
|
|
2060
|
-
case 2:
|
|
2061
|
-
return new Date(n.getFullYear(), 0, 3);
|
|
2062
|
-
case 3:
|
|
2063
|
-
return new Date(n.getFullYear(), 0, 2);
|
|
2064
|
-
case 4:
|
|
2065
|
-
return new Date(n.getFullYear(), 0, 1);
|
|
2066
|
-
case 5:
|
|
2067
|
-
return new Date(n.getFullYear() - 1, 11, 31);
|
|
2068
|
-
case 6:
|
|
2069
|
-
return new Date(n.getFullYear() - 1, 11, 30);
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
function m(n) {
|
|
2073
|
-
var q = n.$;
|
|
2074
|
-
for (n = new Date((new Date(n.aa + 1900, 0, 1)).getTime()); 0 < q;) {
|
|
2075
|
-
var t = n.getMonth(), y = (td(n.getFullYear()) ? Xd : Yd)[t];
|
|
2076
|
-
if (q > y - n.getDate()) {
|
|
2077
|
-
q -= y - n.getDate() + 1, n.setDate(1), 11 > t ? n.setMonth(t + 1) : (n.setMonth(0), n.setFullYear(n.getFullYear() + 1));
|
|
2078
|
-
} else {
|
|
2079
|
-
n.setDate(n.getDate() + q);
|
|
2080
|
-
break;
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
t = new Date(n.getFullYear() + 1, 0, 4);
|
|
2084
|
-
q = h(new Date(n.getFullYear(), 0, 4));
|
|
2085
|
-
t = h(t);
|
|
2086
|
-
return 0 >= g(q, n) ? 0 >= g(t, n) ? n.getFullYear() + 1 : n.getFullYear() : n.getFullYear() - 1;
|
|
2087
|
-
}
|
|
2088
|
-
var l = K[d + 40 >> 2];
|
|
2089
|
-
d = {ac:F[d >> 2], $b:F[d + 4 >> 2], Da:F[d + 8 >> 2], Pa:F[d + 12 >> 2], Ea:F[d + 16 >> 2], aa:F[d + 20 >> 2], N:F[d + 24 >> 2], $:F[d + 28 >> 2], Ic:F[d + 32 >> 2], Zb:F[d + 36 >> 2], bc:l ? l ? L(D, l) : "" : ""};
|
|
2090
|
-
c = c ? L(D, c) : "";
|
|
2091
|
-
l = {"%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",};
|
|
2092
|
-
for (var r in l) {
|
|
2093
|
-
c = c.replace(new RegExp(r, "g"), l[r]);
|
|
2094
|
-
}
|
|
2095
|
-
var u = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), w = "January February March April May June July August September October November December".split(" ");
|
|
2096
|
-
l = {"%a":n => u[n.N].substring(0, 3), "%A":n => u[n.N], "%b":n => w[n.Ea].substring(0, 3), "%B":n => w[n.Ea], "%C":n => f((n.aa + 1900) / 100 | 0, 2), "%d":n => f(n.Pa, 2), "%e":n => e(n.Pa, 2, " "), "%g":n => m(n).toString().substring(2), "%G":m, "%H":n => f(n.Da, 2), "%I":n => {
|
|
2097
|
-
n = n.Da;
|
|
2098
|
-
0 == n ? n = 12 : 12 < n && (n -= 12);
|
|
2099
|
-
return f(n, 2);
|
|
2100
|
-
}, "%j":n => {
|
|
2101
|
-
for (var q = 0, t = 0; t <= n.Ea - 1; q += (td(n.aa + 1900) ? Xd : Yd)[t++]) {
|
|
2102
|
-
}
|
|
2103
|
-
return f(n.Pa + q, 3);
|
|
2104
|
-
}, "%m":n => f(n.Ea + 1, 2), "%M":n => f(n.$b, 2), "%n":() => "\n", "%p":n => 0 <= n.Da && 12 > n.Da ? "AM" : "PM", "%S":n => f(n.ac, 2), "%t":() => "\t", "%u":n => n.N || 7, "%U":n => f(Math.floor((n.$ + 7 - n.N) / 7), 2), "%V":n => {
|
|
2105
|
-
var q = Math.floor((n.$ + 7 - (n.N + 6) % 7) / 7);
|
|
2106
|
-
2 >= (n.N + 371 - n.$ - 2) % 7 && q++;
|
|
2107
|
-
if (q) {
|
|
2108
|
-
53 == q && (t = (n.N + 371 - n.$) % 7, 4 == t || 3 == t && td(n.aa) || (q = 1));
|
|
2109
|
-
} else {
|
|
2110
|
-
q = 52;
|
|
2111
|
-
var t = (n.N + 7 - n.$ - 1) % 7;
|
|
2112
|
-
(4 == t || 5 == t && td(n.aa % 400 - 1)) && q++;
|
|
2113
|
-
}
|
|
2114
|
-
return f(q, 2);
|
|
2115
|
-
}, "%w":n => n.N, "%W":n => f(Math.floor((n.$ + 7 - (n.N + 6) % 7) / 7), 2), "%y":n => (n.aa + 1900).toString().substring(2), "%Y":n => n.aa + 1900, "%z":n => {
|
|
2116
|
-
n = n.Zb;
|
|
2117
|
-
var q = 0 <= n;
|
|
2118
|
-
n = Math.abs(n) / 60;
|
|
2119
|
-
return (q ? "+" : "-") + String("0000" + (n / 60 * 100 + n % 60)).slice(-4);
|
|
2120
|
-
}, "%Z":n => n.bc, "%%":() => "%"};
|
|
2121
|
-
c = c.replace(/%%/g, "\x00\x00");
|
|
2122
|
-
for (r in l) {
|
|
2123
|
-
c.includes(r) && (c = c.replace(new RegExp(r, "g"), l[r](d)));
|
|
2124
|
-
}
|
|
2125
|
-
c = c.replace(/\0\0/g, "%");
|
|
2126
|
-
r = gb(c, !1);
|
|
2127
|
-
if (r.length > b) {
|
|
2128
|
-
return 0;
|
|
2129
|
-
}
|
|
2130
|
-
C.set(r, a);
|
|
2131
|
-
return r.length - 1;
|
|
2132
|
-
};
|
|
2133
|
-
[44].forEach(a => {
|
|
2134
|
-
rb[a] = new M(a);
|
|
2135
|
-
rb[a].stack = "<generic error, no stack>";
|
|
2136
|
-
});
|
|
2137
|
-
yb = Array(4096);
|
|
2138
|
-
Mb(N, "/");
|
|
2139
|
-
Ob("/tmp");
|
|
2140
|
-
Ob("/home");
|
|
2141
|
-
Ob("/home/web_user");
|
|
2142
|
-
(function() {
|
|
2143
|
-
Ob("/dev");
|
|
2144
|
-
jb(259, {read:() => 0, write:(d, e, f, g) => g,});
|
|
2145
|
-
Pb("/dev/null", 259);
|
|
2146
|
-
ib(1280, lb);
|
|
2147
|
-
ib(1536, mb);
|
|
2148
|
-
Pb("/dev/tty", 1280);
|
|
2149
|
-
Pb("/dev/tty1", 1536);
|
|
2150
|
-
var a = new Uint8Array(1024), b = 0, c = () => {
|
|
2151
|
-
0 === b && (b = ab(a).byteLength);
|
|
2152
|
-
return a[--b];
|
|
2153
|
-
};
|
|
2154
|
-
Vb("random", c);
|
|
2155
|
-
Vb("urandom", c);
|
|
2156
|
-
Ob("/dev/shm");
|
|
2157
|
-
Ob("/dev/shm/tmp");
|
|
2158
|
-
})();
|
|
2159
|
-
(function() {
|
|
2160
|
-
Ob("/proc");
|
|
2161
|
-
var a = Ob("/proc/self");
|
|
2162
|
-
Ob("/proc/self/fd");
|
|
2163
|
-
Mb({R() {
|
|
2164
|
-
var b = qb(a, "fd", 16895, 73);
|
|
2165
|
-
b.i = {ha(c, d) {
|
|
2166
|
-
var e = Jb(+d);
|
|
2167
|
-
c = {parent:null, R:{cb:"fake"}, i:{ia:() => e.path},};
|
|
2168
|
-
return c.parent = c;
|
|
2169
|
-
}};
|
|
2170
|
-
return b;
|
|
2171
|
-
}}, "/proc/self/fd");
|
|
2172
|
-
})();
|
|
2173
|
-
P = k.BindingError = class extends Error {
|
|
2174
|
-
constructor(a) {
|
|
2175
|
-
super(a);
|
|
2176
|
-
this.name = "BindingError";
|
|
2177
|
-
}
|
|
2178
|
-
};
|
|
2179
|
-
O.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1,);
|
|
2180
|
-
k.count_emval_handles = () => O.length / 2 - 5 - Zb.length;
|
|
2181
|
-
bc = k.PureVirtualError = ac("PureVirtualError");
|
|
2182
|
-
for (var $d = Array(256), ae = 0; 256 > ae; ++ae) {
|
|
2183
|
-
$d[ae] = String.fromCharCode(ae);
|
|
2184
|
-
}
|
|
2185
|
-
cc = $d;
|
|
2186
|
-
k.getInheritedInstanceCount = () => Object.keys(gc).length;
|
|
2187
|
-
k.getLiveInheritedInstances = () => {
|
|
2188
|
-
var a = [], b;
|
|
2189
|
-
for (b in gc) {
|
|
2190
|
-
gc.hasOwnProperty(b) && a.push(gc[b]);
|
|
2191
|
-
}
|
|
2192
|
-
return a;
|
|
2193
|
-
};
|
|
2194
|
-
k.flushPendingDeletes = ec;
|
|
2195
|
-
k.setDelayFunction = a => {
|
|
2196
|
-
fc = a;
|
|
2197
|
-
dc.length && fc && fc(ec);
|
|
2198
|
-
};
|
|
2199
|
-
sc = k.InternalError = class extends Error {
|
|
2200
|
-
constructor(a) {
|
|
2201
|
-
super(a);
|
|
2202
|
-
this.name = "InternalError";
|
|
2203
|
-
}
|
|
2204
|
-
};
|
|
2205
|
-
Object.assign(Cc.prototype, {isAliasOf:function(a) {
|
|
2206
|
-
if (!(this instanceof Cc && a instanceof Cc)) {
|
|
2207
|
-
return !1;
|
|
2208
|
-
}
|
|
2209
|
-
var b = this.g.s.h, c = this.g.m;
|
|
2210
|
-
a.g = a.g;
|
|
2211
|
-
var d = a.g.s.h;
|
|
2212
|
-
for (a = a.g.m; b.A;) {
|
|
2213
|
-
c = b.ka(c), b = b.A;
|
|
2214
|
-
}
|
|
2215
|
-
for (; d.A;) {
|
|
2216
|
-
a = d.ka(a), d = d.A;
|
|
2217
|
-
}
|
|
2218
|
-
return b === d && c === a;
|
|
2219
|
-
}, clone:function() {
|
|
2220
|
-
this.g.m || Bc(this);
|
|
2221
|
-
if (this.g.fa) {
|
|
2222
|
-
return this.g.count.value += 1, this;
|
|
2223
|
-
}
|
|
2224
|
-
var a = tc, b = Object, c = b.create, d = Object.getPrototypeOf(this), e = this.g;
|
|
2225
|
-
a = a(c.call(b, d, {g:{value:{count:e.count, ea:e.ea, fa:e.fa, m:e.m, s:e.s, B:e.B, G:e.G,},}}));
|
|
2226
|
-
a.g.count.value += 1;
|
|
2227
|
-
a.g.ea = !1;
|
|
2228
|
-
return a;
|
|
2229
|
-
}, ["delete"]() {
|
|
2230
|
-
this.g.m || Bc(this);
|
|
2231
|
-
if (this.g.ea && !this.g.fa) {
|
|
2232
|
-
throw new P("Object already scheduled for deletion");
|
|
2233
|
-
}
|
|
2234
|
-
nc(this);
|
|
2235
|
-
var a = this.g;
|
|
2236
|
-
--a.count.value;
|
|
2237
|
-
0 === a.count.value && (a.B ? a.G.L(a.B) : a.s.h.L(a.m));
|
|
2238
|
-
this.g.fa || (this.g.B = void 0, this.g.m = void 0);
|
|
2239
|
-
}, isDeleted:function() {
|
|
2240
|
-
return !this.g.m;
|
|
2241
|
-
}, deleteLater:function() {
|
|
2242
|
-
this.g.m || Bc(this);
|
|
2243
|
-
if (this.g.ea && !this.g.fa) {
|
|
2244
|
-
throw new P("Object already scheduled for deletion");
|
|
2245
|
-
}
|
|
2246
|
-
dc.push(this);
|
|
2247
|
-
1 === dc.length && fc && fc(ec);
|
|
2248
|
-
this.g.ea = !0;
|
|
2249
|
-
return this;
|
|
2250
|
-
},});
|
|
2251
|
-
Object.assign(Mc.prototype, {Gb(a) {
|
|
2252
|
-
this.jb && (a = this.jb(a));
|
|
2253
|
-
return a;
|
|
2254
|
-
}, Va(a) {
|
|
2255
|
-
this.L?.(a);
|
|
2256
|
-
}, argPackAdvance:8, readValueFromPointer:xc, fromWireType:function(a) {
|
|
2257
|
-
function b() {
|
|
2258
|
-
return this.ta ? uc(this.h.J, {s:this.Tb, m:c, G:this, B:a,}) : uc(this.h.J, {s:this, m:a,});
|
|
2259
|
-
}
|
|
2260
|
-
var c = this.Gb(a);
|
|
2261
|
-
if (!c) {
|
|
2262
|
-
return this.Va(a), null;
|
|
2263
|
-
}
|
|
2264
|
-
var d = rc(this.h, c);
|
|
2265
|
-
if (void 0 !== d) {
|
|
2266
|
-
if (0 === d.g.count.value) {
|
|
2267
|
-
return d.g.m = c, d.g.B = a, d.clone();
|
|
2268
|
-
}
|
|
2269
|
-
d = d.clone();
|
|
2270
|
-
this.Va(a);
|
|
2271
|
-
return d;
|
|
2272
|
-
}
|
|
2273
|
-
d = this.h.Fb(c);
|
|
2274
|
-
d = qc[d];
|
|
2275
|
-
if (!d) {
|
|
2276
|
-
return b.call(this);
|
|
2277
|
-
}
|
|
2278
|
-
d = this.sa ? d.yb : d.pointerType;
|
|
2279
|
-
var e = pc(c, this.h, d.h);
|
|
2280
|
-
return null === e ? b.call(this) : this.ta ? uc(d.h.J, {s:d, m:e, G:this, B:a,}) : uc(d.h.J, {s:d, m:e,});
|
|
2281
|
-
},});
|
|
2282
|
-
Tc = k.UnboundTypeError = ac("UnboundTypeError");
|
|
2283
|
-
for (var W, be = 0; 32 > be; ++be) {
|
|
2284
|
-
Qd.push(Array(be));
|
|
2285
|
-
}
|
|
2286
|
-
var de = {__syscall_fcntl64:function(a, b, c) {
|
|
2287
|
-
Va = c;
|
|
2288
|
-
try {
|
|
2289
|
-
var d = Jb(a);
|
|
2290
|
-
switch(b) {
|
|
2291
|
-
case 0:
|
|
2292
|
-
var e = Ua();
|
|
2293
|
-
if (0 > e) {
|
|
2294
|
-
break;
|
|
2295
|
-
}
|
|
2296
|
-
for (; wb[e];) {
|
|
2297
|
-
e++;
|
|
2298
|
-
}
|
|
2299
|
-
return Lb(d, e).T;
|
|
2300
|
-
case 1:
|
|
2301
|
-
case 2:
|
|
2302
|
-
return 0;
|
|
2303
|
-
case 3:
|
|
2304
|
-
return d.flags;
|
|
2305
|
-
case 4:
|
|
2306
|
-
return e = Ua(), d.flags |= e, 0;
|
|
2307
|
-
case 12:
|
|
2308
|
-
return e = Ua(), E[e + 0 >> 1] = 2, 0;
|
|
2309
|
-
case 13:
|
|
2310
|
-
case 14:
|
|
2311
|
-
return 0;
|
|
2312
|
-
}
|
|
2313
|
-
return -28;
|
|
2314
|
-
} catch (f) {
|
|
2315
|
-
if ("undefined" == typeof Xb || "ErrnoError" !== f.name) {
|
|
2316
|
-
throw f;
|
|
2317
|
-
}
|
|
2318
|
-
return -f.Y;
|
|
2319
|
-
}
|
|
2320
|
-
}, __syscall_ioctl:function(a, b, c) {
|
|
2321
|
-
Va = c;
|
|
2322
|
-
try {
|
|
2323
|
-
var d = Jb(a);
|
|
2324
|
-
switch(b) {
|
|
2325
|
-
case 21509:
|
|
2326
|
-
return d.o ? 0 : -59;
|
|
2327
|
-
case 21505:
|
|
2328
|
-
if (!d.o) {
|
|
2329
|
-
return -59;
|
|
2330
|
-
}
|
|
2331
|
-
if (d.o.S.Nb) {
|
|
2332
|
-
a = [3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,];
|
|
2333
|
-
var e = Ua();
|
|
2334
|
-
F[e >> 2] = 25856;
|
|
2335
|
-
F[e + 4 >> 2] = 5;
|
|
2336
|
-
F[e + 8 >> 2] = 191;
|
|
2337
|
-
F[e + 12 >> 2] = 35387;
|
|
2338
|
-
for (var f = 0; 32 > f; f++) {
|
|
2339
|
-
C[e + f + 17] = a[f] || 0;
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
return 0;
|
|
2343
|
-
case 21510:
|
|
2344
|
-
case 21511:
|
|
2345
|
-
case 21512:
|
|
2346
|
-
return d.o ? 0 : -59;
|
|
2347
|
-
case 21506:
|
|
2348
|
-
case 21507:
|
|
2349
|
-
case 21508:
|
|
2350
|
-
if (!d.o) {
|
|
2351
|
-
return -59;
|
|
2352
|
-
}
|
|
2353
|
-
if (d.o.S.Ob) {
|
|
2354
|
-
for (e = Ua(), a = [], f = 0; 32 > f; f++) {
|
|
2355
|
-
a.push(C[e + f + 17]);
|
|
2356
|
-
}
|
|
2357
|
-
}
|
|
2358
|
-
return 0;
|
|
2359
|
-
case 21519:
|
|
2360
|
-
if (!d.o) {
|
|
2361
|
-
return -59;
|
|
2362
|
-
}
|
|
2363
|
-
e = Ua();
|
|
2364
|
-
return F[e >> 2] = 0;
|
|
2365
|
-
case 21520:
|
|
2366
|
-
return d.o ? -28 : -59;
|
|
2367
|
-
case 21531:
|
|
2368
|
-
e = Ua();
|
|
2369
|
-
if (!d.l.Mb) {
|
|
2370
|
-
throw new M(59);
|
|
2371
|
-
}
|
|
2372
|
-
return d.l.Mb(d, b, e);
|
|
2373
|
-
case 21523:
|
|
2374
|
-
if (!d.o) {
|
|
2375
|
-
return -59;
|
|
2376
|
-
}
|
|
2377
|
-
d.o.S.Pb && (f = [24, 80], e = Ua(), E[e >> 1] = f[0], E[e + 2 >> 1] = f[1]);
|
|
2378
|
-
return 0;
|
|
2379
|
-
case 21524:
|
|
2380
|
-
return d.o ? 0 : -59;
|
|
2381
|
-
case 21515:
|
|
2382
|
-
return d.o ? 0 : -59;
|
|
2383
|
-
default:
|
|
2384
|
-
return -28;
|
|
2385
|
-
}
|
|
2386
|
-
} catch (g) {
|
|
2387
|
-
if ("undefined" == typeof Xb || "ErrnoError" !== g.name) {
|
|
2388
|
-
throw g;
|
|
2389
|
-
}
|
|
2390
|
-
return -g.Y;
|
|
2391
|
-
}
|
|
2392
|
-
}, __syscall_openat:function(a, b, c, d) {
|
|
2393
|
-
Va = d;
|
|
2394
|
-
try {
|
|
2395
|
-
b = b ? L(D, b) : "";
|
|
2396
|
-
var e = b;
|
|
2397
|
-
if ("/" === e.charAt(0)) {
|
|
2398
|
-
b = e;
|
|
2399
|
-
} else {
|
|
2400
|
-
var f = -100 === a ? "/" : Jb(a).path;
|
|
2401
|
-
if (0 == e.length) {
|
|
2402
|
-
throw new M(44);
|
|
2403
|
-
}
|
|
2404
|
-
b = Xa(f + "/" + e);
|
|
2405
|
-
}
|
|
2406
|
-
var g = d ? Ua() : 0;
|
|
2407
|
-
return Rb(b, c, g).T;
|
|
2408
|
-
} catch (h) {
|
|
2409
|
-
if ("undefined" == typeof Xb || "ErrnoError" !== h.name) {
|
|
2410
|
-
throw h;
|
|
2411
|
-
}
|
|
2412
|
-
return -h.Y;
|
|
2413
|
-
}
|
|
2414
|
-
}, _abort_js:() => {
|
|
2415
|
-
Ga("");
|
|
2416
|
-
}, _embind_create_inheriting_constructor:(a, b, c) => {
|
|
2417
|
-
a = R(a);
|
|
2418
|
-
b = mc(b, "wrapper");
|
|
2419
|
-
c = Q(c);
|
|
2420
|
-
var d = b.h, e = d.J, f = d.A.J, g = d.A.constructor;
|
|
2421
|
-
a = Yb(a, function(...h) {
|
|
2422
|
-
d.A.hb.forEach(function(m) {
|
|
2423
|
-
if (this[m] === f[m]) {
|
|
2424
|
-
throw new bc(`Pure virtual function ${m} must be implemented in JavaScript`);
|
|
2425
|
-
}
|
|
2426
|
-
}.bind(this));
|
|
2427
|
-
Object.defineProperty(this, "__parent", {value:e});
|
|
2428
|
-
this.__construct(...h);
|
|
2429
|
-
});
|
|
2430
|
-
e.__construct = function(...h) {
|
|
2431
|
-
if (this === e) {
|
|
2432
|
-
throw new P("Pass correct 'this' to __construct");
|
|
2433
|
-
}
|
|
2434
|
-
h = g.implement(this, ...h);
|
|
2435
|
-
nc(h);
|
|
2436
|
-
var m = h.g;
|
|
2437
|
-
h.notifyOnDestruction();
|
|
2438
|
-
m.fa = !0;
|
|
2439
|
-
Object.defineProperties(this, {g:{value:m}});
|
|
2440
|
-
tc(this);
|
|
2441
|
-
h = m.m;
|
|
2442
|
-
h = hc(d, h);
|
|
2443
|
-
if (gc.hasOwnProperty(h)) {
|
|
2444
|
-
throw new P(`Tried to register registered instance: ${h}`);
|
|
2445
|
-
}
|
|
2446
|
-
gc[h] = this;
|
|
2447
|
-
};
|
|
2448
|
-
e.__destruct = function() {
|
|
2449
|
-
if (this === e) {
|
|
2450
|
-
throw new P("Pass correct 'this' to __destruct");
|
|
2451
|
-
}
|
|
2452
|
-
nc(this);
|
|
2453
|
-
var h = this.g.m;
|
|
2454
|
-
h = hc(d, h);
|
|
2455
|
-
if (gc.hasOwnProperty(h)) {
|
|
2456
|
-
delete gc[h];
|
|
2457
|
-
} else {
|
|
2458
|
-
throw new P(`Tried to unregister unregistered instance: ${h}`);
|
|
2459
|
-
}
|
|
2460
|
-
};
|
|
2461
|
-
a.prototype = Object.create(e);
|
|
2462
|
-
Object.assign(a.prototype, c);
|
|
2463
|
-
return $b(a);
|
|
2464
|
-
}, _embind_finalize_value_object:a => {
|
|
2465
|
-
var b = vc[a];
|
|
2466
|
-
delete vc[a];
|
|
2467
|
-
var c = b.Na, d = b.L, e = b.Xa, f = e.map(g => g.Jb).concat(e.map(g => g.Wb));
|
|
2468
|
-
T([a], f, g => {
|
|
2469
|
-
var h = {};
|
|
2470
|
-
e.forEach((m, l) => {
|
|
2471
|
-
var r = g[l], u = m.Hb, w = m.Ib, n = g[l + e.length], q = m.Vb, t = m.Xb;
|
|
2472
|
-
h[m.Db] = {read:y => r.fromWireType(u(w, y)), write:(y, z) => {
|
|
2473
|
-
var B = [];
|
|
2474
|
-
q(t, y, n.toWireType(B, z));
|
|
2475
|
-
wc(B);
|
|
2476
|
-
}};
|
|
2477
|
-
});
|
|
2478
|
-
return [{name:b.name, fromWireType:m => {
|
|
2479
|
-
var l = {}, r;
|
|
2480
|
-
for (r in h) {
|
|
2481
|
-
l[r] = h[r].read(m);
|
|
2482
|
-
}
|
|
2483
|
-
d(m);
|
|
2484
|
-
return l;
|
|
2485
|
-
}, toWireType:(m, l) => {
|
|
2486
|
-
for (var r in h) {
|
|
2487
|
-
if (!(r in l)) {
|
|
2488
|
-
throw new TypeError(`Missing field: "${r}"`);
|
|
2489
|
-
}
|
|
2490
|
-
}
|
|
2491
|
-
var u = c();
|
|
2492
|
-
for (r in h) {
|
|
2493
|
-
h[r].write(u, l[r]);
|
|
2494
|
-
}
|
|
2495
|
-
null !== m && m.push(d, u);
|
|
2496
|
-
return u;
|
|
2497
|
-
}, argPackAdvance:8, readValueFromPointer:xc, I:d,}];
|
|
2498
|
-
});
|
|
2499
|
-
}, _embind_register_bigint:() => {
|
|
2500
|
-
}, _embind_register_bool:(a, b, c, d) => {
|
|
2501
|
-
b = R(b);
|
|
2502
|
-
S(a, {name:b, fromWireType:function(e) {
|
|
2503
|
-
return !!e;
|
|
2504
|
-
}, toWireType:function(e, f) {
|
|
2505
|
-
return f ? c : d;
|
|
2506
|
-
}, argPackAdvance:8, readValueFromPointer:function(e) {
|
|
2507
|
-
return this.fromWireType(D[e]);
|
|
2508
|
-
}, I:null,});
|
|
2509
|
-
}, _embind_register_class:(a, b, c, d, e, f, g, h, m, l, r, u, w) => {
|
|
2510
|
-
r = R(r);
|
|
2511
|
-
f = U(e, f);
|
|
2512
|
-
h &&= U(g, h);
|
|
2513
|
-
l &&= U(m, l);
|
|
2514
|
-
w = U(u, w);
|
|
2515
|
-
var n = Fc(r);
|
|
2516
|
-
Ec(n, function() {
|
|
2517
|
-
Uc(`Cannot construct ${r} due to unbound types`, [d]);
|
|
2518
|
-
});
|
|
2519
|
-
T([a, b, c], d ? [d] : [], q => {
|
|
2520
|
-
q = q[0];
|
|
2521
|
-
if (d) {
|
|
2522
|
-
var t = q.h;
|
|
2523
|
-
var y = t.J;
|
|
2524
|
-
} else {
|
|
2525
|
-
y = Cc.prototype;
|
|
2526
|
-
}
|
|
2527
|
-
q = Yb(r, function(...I) {
|
|
2528
|
-
if (Object.getPrototypeOf(this) !== z) {
|
|
2529
|
-
throw new P("Use 'new' to construct " + r);
|
|
2530
|
-
}
|
|
2531
|
-
if (void 0 === B.X) {
|
|
2532
|
-
throw new P(r + " has no accessible constructor");
|
|
2533
|
-
}
|
|
2534
|
-
var J = B.X[I.length];
|
|
2535
|
-
if (void 0 === J) {
|
|
2536
|
-
throw new P(`Tried to invoke ctor of ${r} with invalid number of parameters (${I.length}) - expected (${Object.keys(B.X).toString()}) parameters instead!`);
|
|
2537
|
-
}
|
|
2538
|
-
return J.apply(this, I);
|
|
2539
|
-
});
|
|
2540
|
-
var z = Object.create(y, {constructor:{value:q},});
|
|
2541
|
-
q.prototype = z;
|
|
2542
|
-
var B = new Gc(r, q, z, w, t, f, h, l);
|
|
2543
|
-
if (B.A) {
|
|
2544
|
-
var G;
|
|
2545
|
-
(G = B.A).la ?? (G.la = []);
|
|
2546
|
-
B.A.la.push(B);
|
|
2547
|
-
}
|
|
2548
|
-
t = new Mc(r, B, !0, !1, !1);
|
|
2549
|
-
G = new Mc(r + "*", B, !1, !1, !1);
|
|
2550
|
-
y = new Mc(r + " const*", B, !1, !0, !1);
|
|
2551
|
-
qc[a] = {pointerType:G, yb:y};
|
|
2552
|
-
Nc(n, q);
|
|
2553
|
-
return [t, G, y];
|
|
2554
|
-
});
|
|
2555
|
-
}, _embind_register_class_class_function:(a, b, c, d, e, f, g) => {
|
|
2556
|
-
var h = Xc(c, d);
|
|
2557
|
-
b = R(b);
|
|
2558
|
-
b = Yc(b);
|
|
2559
|
-
f = U(e, f);
|
|
2560
|
-
T([], [a], m => {
|
|
2561
|
-
function l() {
|
|
2562
|
-
Uc(`Cannot call ${r} due to unbound types`, h);
|
|
2563
|
-
}
|
|
2564
|
-
m = m[0];
|
|
2565
|
-
var r = `${m.name}.${b}`;
|
|
2566
|
-
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2567
|
-
var u = m.h.constructor;
|
|
2568
|
-
void 0 === u[b] ? (l.da = c - 1, u[b] = l) : (Dc(u, b, r), u[b].v[c - 1] = l);
|
|
2569
|
-
T([], h, w => {
|
|
2570
|
-
w = Wc(r, [w[0], null].concat(w.slice(1)), null, f, g);
|
|
2571
|
-
void 0 === u[b].v ? (w.da = c - 1, u[b] = w) : u[b].v[c - 1] = w;
|
|
2572
|
-
if (m.h.la) {
|
|
2573
|
-
for (const n of m.h.la) {
|
|
2574
|
-
n.constructor.hasOwnProperty(b) || (n.constructor[b] = w);
|
|
2575
|
-
}
|
|
2576
|
-
}
|
|
2577
|
-
return [];
|
|
2578
|
-
});
|
|
2579
|
-
return [];
|
|
2580
|
-
});
|
|
2581
|
-
}, _embind_register_class_class_property:(a, b, c, d, e, f, g, h) => {
|
|
2582
|
-
b = R(b);
|
|
2583
|
-
f = U(e, f);
|
|
2584
|
-
T([], [a], m => {
|
|
2585
|
-
m = m[0];
|
|
2586
|
-
var l = `${m.name}.${b}`, r = {get() {
|
|
2587
|
-
Uc(`Cannot access ${l} due to unbound types`, [c]);
|
|
2588
|
-
}, enumerable:!0, configurable:!0};
|
|
2589
|
-
r.set = h ? () => {
|
|
2590
|
-
Uc(`Cannot access ${l} due to unbound types`, [c]);
|
|
2591
|
-
} : () => {
|
|
2592
|
-
throw new P(`${l} is a read-only property`);
|
|
2593
|
-
};
|
|
2594
|
-
Object.defineProperty(m.h.constructor, b, r);
|
|
2595
|
-
T([], [c], u => {
|
|
2596
|
-
u = u[0];
|
|
2597
|
-
var w = {get() {
|
|
2598
|
-
return u.fromWireType(f(d));
|
|
2599
|
-
}, enumerable:!0};
|
|
2600
|
-
h && (h = U(g, h), w.set = n => {
|
|
2601
|
-
var q = [];
|
|
2602
|
-
h(d, u.toWireType(q, n));
|
|
2603
|
-
wc(q);
|
|
2604
|
-
});
|
|
2605
|
-
Object.defineProperty(m.h.constructor, b, w);
|
|
2606
|
-
return [];
|
|
2607
|
-
});
|
|
2608
|
-
return [];
|
|
2609
|
-
});
|
|
2610
|
-
}, _embind_register_class_constructor:(a, b, c, d, e, f) => {
|
|
2611
|
-
var g = Xc(b, c);
|
|
2612
|
-
e = U(d, e);
|
|
2613
|
-
T([], [a], h => {
|
|
2614
|
-
h = h[0];
|
|
2615
|
-
var m = `constructor ${h.name}`;
|
|
2616
|
-
void 0 === h.h.X && (h.h.X = []);
|
|
2617
|
-
if (void 0 !== h.h.X[b - 1]) {
|
|
2618
|
-
throw new P(`Cannot register multiple constructors with identical number of parameters (${b - 1}) for class '${h.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
2619
|
-
}
|
|
2620
|
-
h.h.X[b - 1] = () => {
|
|
2621
|
-
Uc(`Cannot construct ${h.name} due to unbound types`, g);
|
|
2622
|
-
};
|
|
2623
|
-
T([], g, l => {
|
|
2624
|
-
l.splice(1, 0, null);
|
|
2625
|
-
h.h.X[b - 1] = Wc(m, l, null, e, f);
|
|
2626
|
-
return [];
|
|
2627
|
-
});
|
|
2628
|
-
return [];
|
|
2629
|
-
});
|
|
2630
|
-
}, _embind_register_class_function:(a, b, c, d, e, f, g, h) => {
|
|
2631
|
-
var m = Xc(c, d);
|
|
2632
|
-
b = R(b);
|
|
2633
|
-
b = Yc(b);
|
|
2634
|
-
f = U(e, f);
|
|
2635
|
-
T([], [a], l => {
|
|
2636
|
-
function r() {
|
|
2637
|
-
Uc(`Cannot call ${u} due to unbound types`, m);
|
|
2638
|
-
}
|
|
2639
|
-
l = l[0];
|
|
2640
|
-
var u = `${l.name}.${b}`;
|
|
2641
|
-
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2642
|
-
h && l.h.hb.push(b);
|
|
2643
|
-
var w = l.h.J, n = w[b];
|
|
2644
|
-
void 0 === n || void 0 === n.v && n.className !== l.name && n.da === c - 2 ? (r.da = c - 2, r.className = l.name, w[b] = r) : (Dc(w, b, u), w[b].v[c - 2] = r);
|
|
2645
|
-
T([], m, q => {
|
|
2646
|
-
q = Wc(u, q, l, f, g);
|
|
2647
|
-
void 0 === w[b].v ? (q.da = c - 2, w[b] = q) : w[b].v[c - 2] = q;
|
|
2648
|
-
return [];
|
|
2649
|
-
});
|
|
2650
|
-
return [];
|
|
2651
|
-
});
|
|
2652
|
-
}, _embind_register_class_property:(a, b, c, d, e, f, g, h, m, l) => {
|
|
2653
|
-
b = R(b);
|
|
2654
|
-
e = U(d, e);
|
|
2655
|
-
T([], [a], r => {
|
|
2656
|
-
r = r[0];
|
|
2657
|
-
var u = `${r.name}.${b}`, w = {get() {
|
|
2658
|
-
Uc(`Cannot access ${u} due to unbound types`, [c, g]);
|
|
2659
|
-
}, enumerable:!0, configurable:!0};
|
|
2660
|
-
w.set = m ? () => Uc(`Cannot access ${u} due to unbound types`, [c, g]) : () => {
|
|
2661
|
-
throw new P(u + " is a read-only property");
|
|
2662
|
-
};
|
|
2663
|
-
Object.defineProperty(r.h.J, b, w);
|
|
2664
|
-
T([], m ? [c, g] : [c], n => {
|
|
2665
|
-
var q = n[0], t = {get() {
|
|
2666
|
-
var z = Zc(this, r, u + " getter");
|
|
2667
|
-
return q.fromWireType(e(f, z));
|
|
2668
|
-
}, enumerable:!0};
|
|
2669
|
-
if (m) {
|
|
2670
|
-
m = U(h, m);
|
|
2671
|
-
var y = n[1];
|
|
2672
|
-
t.set = function(z) {
|
|
2673
|
-
var B = Zc(this, r, u + " setter"), G = [];
|
|
2674
|
-
m(l, B, y.toWireType(G, z));
|
|
2675
|
-
wc(G);
|
|
2676
|
-
};
|
|
2677
|
-
}
|
|
2678
|
-
Object.defineProperty(r.h.J, b, t);
|
|
2679
|
-
return [];
|
|
2680
|
-
});
|
|
2681
|
-
return [];
|
|
2682
|
-
});
|
|
2683
|
-
}, _embind_register_emval:a => S(a, ad), _embind_register_enum:(a, b, c, d) => {
|
|
2684
|
-
function e() {
|
|
2685
|
-
}
|
|
2686
|
-
b = R(b);
|
|
2687
|
-
e.values = {};
|
|
2688
|
-
S(a, {name:b, constructor:e, fromWireType:function(f) {
|
|
2689
|
-
return this.constructor.values[f];
|
|
2690
|
-
}, toWireType:(f, g) => g.value, argPackAdvance:8, readValueFromPointer:bd(b, c, d), I:null,});
|
|
2691
|
-
Ec(b, e);
|
|
2692
|
-
}, _embind_register_enum_value:(a, b, c) => {
|
|
2693
|
-
var d = mc(a, "enum");
|
|
2694
|
-
b = R(b);
|
|
2695
|
-
a = d.constructor;
|
|
2696
|
-
d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value:Yb(`${d.name}_${b}`, function() {
|
|
2697
|
-
})},});
|
|
2698
|
-
a.values[c] = d;
|
|
2699
|
-
a[b] = d;
|
|
2700
|
-
}, _embind_register_float:(a, b, c) => {
|
|
2701
|
-
b = R(b);
|
|
2702
|
-
S(a, {name:b, fromWireType:d => d, toWireType:(d, e) => e, argPackAdvance:8, readValueFromPointer:cd(b, c), I:null,});
|
|
2703
|
-
}, _embind_register_function:(a, b, c, d, e, f) => {
|
|
2704
|
-
var g = Xc(b, c);
|
|
2705
|
-
a = R(a);
|
|
2706
|
-
a = Yc(a);
|
|
2707
|
-
e = U(d, e);
|
|
2708
|
-
Ec(a, function() {
|
|
2709
|
-
Uc(`Cannot call ${a} due to unbound types`, g);
|
|
2710
|
-
}, b - 1);
|
|
2711
|
-
T([], g, h => {
|
|
2712
|
-
Nc(a, Wc(a, [h[0], null].concat(h.slice(1)), null, e, f), b - 1);
|
|
2713
|
-
return [];
|
|
2714
|
-
});
|
|
2715
|
-
}, _embind_register_integer:(a, b, c, d, e) => {
|
|
2716
|
-
b = R(b);
|
|
2717
|
-
-1 === e && (e = 4294967295);
|
|
2718
|
-
e = h => h;
|
|
2719
|
-
if (0 === d) {
|
|
2720
|
-
var f = 32 - 8 * c;
|
|
2721
|
-
e = h => h << f >>> f;
|
|
2722
|
-
}
|
|
2723
|
-
var g = b.includes("unsigned") ? function(h, m) {
|
|
2724
|
-
return m >>> 0;
|
|
2725
|
-
} : function(h, m) {
|
|
2726
|
-
return m;
|
|
2727
|
-
};
|
|
2728
|
-
S(a, {name:b, fromWireType:e, toWireType:g, argPackAdvance:8, readValueFromPointer:dd(b, c, 0 !== d), I:null,});
|
|
2729
|
-
}, _embind_register_memory_view:(a, b, c) => {
|
|
2730
|
-
function d(f) {
|
|
2731
|
-
return new e(C.buffer, K[f + 4 >> 2], K[f >> 2]);
|
|
2732
|
-
}
|
|
2733
|
-
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][b];
|
|
2734
|
-
c = R(c);
|
|
2735
|
-
S(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Kb:!0,});
|
|
2736
|
-
}, _embind_register_std_string:(a, b) => {
|
|
2737
|
-
b = R(b);
|
|
2738
|
-
var c = "std::string" === b;
|
|
2739
|
-
S(a, {name:b, fromWireType:function(d) {
|
|
2740
|
-
var e = K[d >> 2], f = d + 4;
|
|
2741
|
-
if (c) {
|
|
2742
|
-
for (var g = f, h = 0; h <= e; ++h) {
|
|
2743
|
-
var m = f + h;
|
|
2744
|
-
if (h == e || 0 == D[m]) {
|
|
2745
|
-
g = g ? L(D, g, m - g) : "";
|
|
2746
|
-
if (void 0 === l) {
|
|
2747
|
-
var l = g;
|
|
2748
|
-
} else {
|
|
2749
|
-
l += String.fromCharCode(0), l += g;
|
|
2750
|
-
}
|
|
2751
|
-
g = m + 1;
|
|
2752
|
-
}
|
|
2753
|
-
}
|
|
2754
|
-
} else {
|
|
2755
|
-
l = Array(e);
|
|
2756
|
-
for (h = 0; h < e; ++h) {
|
|
2757
|
-
l[h] = String.fromCharCode(D[f + h]);
|
|
2758
|
-
}
|
|
2759
|
-
l = l.join("");
|
|
2760
|
-
}
|
|
2761
|
-
kc(d);
|
|
2762
|
-
return l;
|
|
2763
|
-
}, toWireType:function(d, e) {
|
|
2764
|
-
e instanceof ArrayBuffer && (e = new Uint8Array(e));
|
|
2765
|
-
var f = "string" == typeof e;
|
|
2766
|
-
if (!(f || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array)) {
|
|
2767
|
-
throw new P("Cannot pass non-string to std::string");
|
|
2768
|
-
}
|
|
2769
|
-
var g = c && f ? eb(e) : e.length;
|
|
2770
|
-
var h = Td(4 + g + 1), m = h + 4;
|
|
2771
|
-
K[h >> 2] = g;
|
|
2772
|
-
if (c && f) {
|
|
2773
|
-
fb(e, D, m, g + 1);
|
|
2774
|
-
} else {
|
|
2775
|
-
if (f) {
|
|
2776
|
-
for (f = 0; f < g; ++f) {
|
|
2777
|
-
var l = e.charCodeAt(f);
|
|
2778
|
-
if (255 < l) {
|
|
2779
|
-
throw kc(m), new P("String has UTF-16 code units that do not fit in 8 bits");
|
|
2780
|
-
}
|
|
2781
|
-
D[m + f] = l;
|
|
2782
|
-
}
|
|
2783
|
-
} else {
|
|
2784
|
-
for (f = 0; f < g; ++f) {
|
|
2785
|
-
D[m + f] = e[f];
|
|
2786
|
-
}
|
|
2787
|
-
}
|
|
2788
|
-
}
|
|
2789
|
-
null !== d && d.push(kc, h);
|
|
2790
|
-
return h;
|
|
2791
|
-
}, argPackAdvance:8, readValueFromPointer:xc, I(d) {
|
|
2792
|
-
kc(d);
|
|
2793
|
-
},});
|
|
2794
|
-
}, _embind_register_std_wstring:(a, b, c) => {
|
|
2795
|
-
c = R(c);
|
|
2796
|
-
if (2 === b) {
|
|
2797
|
-
var d = fd;
|
|
2798
|
-
var e = gd;
|
|
2799
|
-
var f = hd;
|
|
2800
|
-
var g = h => va[h >> 1];
|
|
2801
|
-
} else {
|
|
2802
|
-
4 === b && (d = jd, e = kd, f = ld, g = h => K[h >> 2]);
|
|
2803
|
-
}
|
|
2804
|
-
S(a, {name:c, fromWireType:h => {
|
|
2805
|
-
for (var m = K[h >> 2], l, r = h + 4, u = 0; u <= m; ++u) {
|
|
2806
|
-
var w = h + 4 + u * b;
|
|
2807
|
-
if (u == m || 0 == g(w)) {
|
|
2808
|
-
r = d(r, w - r), void 0 === l ? l = r : (l += String.fromCharCode(0), l += r), r = w + b;
|
|
2809
|
-
}
|
|
2810
|
-
}
|
|
2811
|
-
kc(h);
|
|
2812
|
-
return l;
|
|
2813
|
-
}, toWireType:(h, m) => {
|
|
2814
|
-
if ("string" != typeof m) {
|
|
2815
|
-
throw new P(`Cannot pass non-string to C++ string type ${c}`);
|
|
2816
|
-
}
|
|
2817
|
-
var l = f(m), r = Td(4 + l + b);
|
|
2818
|
-
K[r >> 2] = l / b;
|
|
2819
|
-
e(m, r + 4, l + b);
|
|
2820
|
-
null !== h && h.push(kc, r);
|
|
2821
|
-
return r;
|
|
2822
|
-
}, argPackAdvance:8, readValueFromPointer:xc, I(h) {
|
|
2823
|
-
kc(h);
|
|
2824
|
-
}});
|
|
2825
|
-
}, _embind_register_value_object:(a, b, c, d, e, f) => {
|
|
2826
|
-
vc[a] = {name:R(b), Na:U(c, d), L:U(e, f), Xa:[],};
|
|
2827
|
-
}, _embind_register_value_object_field:(a, b, c, d, e, f, g, h, m, l) => {
|
|
2828
|
-
vc[a].Xa.push({Db:R(b), Jb:c, Hb:U(d, e), Ib:f, Wb:g, Vb:U(h, m), Xb:l,});
|
|
2829
|
-
}, _embind_register_void:(a, b) => {
|
|
2830
|
-
b = R(b);
|
|
2831
|
-
S(a, {yc:!0, name:b, argPackAdvance:0, fromWireType:() => {
|
|
2832
|
-
}, toWireType:() => {
|
|
2833
|
-
},});
|
|
2834
|
-
}, _emscripten_get_now_is_monotonic:() => 1, _emscripten_memcpy_js:(a, b, c) => D.copyWithin(a, b, b + c), _emscripten_throw_longjmp:() => {
|
|
2835
|
-
throw Infinity;
|
|
2836
|
-
}, _emval_as:(a, b, c) => {
|
|
2837
|
-
a = Q(a);
|
|
2838
|
-
b = mc(b, "emval::as");
|
|
2839
|
-
return md(b, c, a);
|
|
2840
|
-
}, _emval_call:(a, b, c, d) => {
|
|
2841
|
-
a = nd[a];
|
|
2842
|
-
b = Q(b);
|
|
2843
|
-
return a(null, b, c, d);
|
|
2844
|
-
}, _emval_call_method:(a, b, c, d, e) => {
|
|
2845
|
-
a = nd[a];
|
|
2846
|
-
b = Q(b);
|
|
2847
|
-
c = pd(c);
|
|
2848
|
-
return a(b, b[c], d, e);
|
|
2849
|
-
}, _emval_decref:$c, _emval_get_method_caller:(a, b, c) => {
|
|
2850
|
-
var d = rd(a, b), e = d.shift();
|
|
2851
|
-
a--;
|
|
2852
|
-
var f = Array(a);
|
|
2853
|
-
b = `methodCaller<(${d.map(g => g.name).join(", ")}) => ${e.name}>`;
|
|
2854
|
-
return qd(Yb(b, (g, h, m, l) => {
|
|
2855
|
-
for (var r = 0, u = 0; u < a; ++u) {
|
|
2856
|
-
f[u] = d[u].readValueFromPointer(l + r), r += d[u].argPackAdvance;
|
|
2857
|
-
}
|
|
2858
|
-
g = 1 === c ? sd(h, f) : h.apply(g, f);
|
|
2859
|
-
return md(e, m, g);
|
|
2860
|
-
}));
|
|
2861
|
-
}, _emval_get_property:(a, b) => {
|
|
2862
|
-
a = Q(a);
|
|
2863
|
-
b = Q(b);
|
|
2864
|
-
return $b(a[b]);
|
|
2865
|
-
}, _emval_incref:a => {
|
|
2866
|
-
9 < a && (O[a + 1] += 1);
|
|
2867
|
-
}, _emval_new_array:() => $b([]), _emval_new_cstring:a => $b(pd(a)), _emval_new_object:() => $b({}), _emval_run_destructors:a => {
|
|
2868
|
-
var b = Q(a);
|
|
2869
|
-
wc(b);
|
|
2870
|
-
$c(a);
|
|
2871
|
-
}, _emval_set_property:(a, b, c) => {
|
|
2872
|
-
a = Q(a);
|
|
2873
|
-
b = Q(b);
|
|
2874
|
-
c = Q(c);
|
|
2875
|
-
a[b] = c;
|
|
2876
|
-
}, _emval_take_value:(a, b) => {
|
|
2877
|
-
a = mc(a, "_emval_take_value");
|
|
2878
|
-
a = a.readValueFromPointer(b);
|
|
2879
|
-
return $b(a);
|
|
2880
|
-
}, _gmtime_js:function(a, b, c) {
|
|
2881
|
-
a = new Date(1000 * (b + 2097152 >>> 0 < 4194305 - !!a ? (a >>> 0) + 4294967296 * b : NaN));
|
|
2882
|
-
F[c >> 2] = a.getUTCSeconds();
|
|
2883
|
-
F[c + 4 >> 2] = a.getUTCMinutes();
|
|
2884
|
-
F[c + 8 >> 2] = a.getUTCHours();
|
|
2885
|
-
F[c + 12 >> 2] = a.getUTCDate();
|
|
2886
|
-
F[c + 16 >> 2] = a.getUTCMonth();
|
|
2887
|
-
F[c + 20 >> 2] = a.getUTCFullYear() - 1900;
|
|
2888
|
-
F[c + 24 >> 2] = a.getUTCDay();
|
|
2889
|
-
F[c + 28 >> 2] = (a.getTime() - Date.UTC(a.getUTCFullYear(), 0, 1, 0, 0, 0, 0)) / 864E5 | 0;
|
|
2890
|
-
}, _localtime_js:function(a, b, c) {
|
|
2891
|
-
a = new Date(1000 * (b + 2097152 >>> 0 < 4194305 - !!a ? (a >>> 0) + 4294967296 * b : NaN));
|
|
2892
|
-
F[c >> 2] = a.getSeconds();
|
|
2893
|
-
F[c + 4 >> 2] = a.getMinutes();
|
|
2894
|
-
F[c + 8 >> 2] = a.getHours();
|
|
2895
|
-
F[c + 12 >> 2] = a.getDate();
|
|
2896
|
-
F[c + 16 >> 2] = a.getMonth();
|
|
2897
|
-
F[c + 20 >> 2] = a.getFullYear() - 1900;
|
|
2898
|
-
F[c + 24 >> 2] = a.getDay();
|
|
2899
|
-
F[c + 28 >> 2] = (td(a.getFullYear()) ? ud : vd)[a.getMonth()] + a.getDate() - 1 | 0;
|
|
2900
|
-
F[c + 36 >> 2] = -(60 * a.getTimezoneOffset());
|
|
2901
|
-
b = (new Date(a.getFullYear(), 6, 1)).getTimezoneOffset();
|
|
2902
|
-
var d = (new Date(a.getFullYear(), 0, 1)).getTimezoneOffset();
|
|
2903
|
-
F[c + 32 >> 2] = (b != d && a.getTimezoneOffset() == Math.min(d, b)) | 0;
|
|
2904
|
-
}, _tzset_js:(a, b, c, d) => {
|
|
2905
|
-
var e = (new Date()).getFullYear(), f = new Date(e, 0, 1), g = new Date(e, 6, 1);
|
|
2906
|
-
e = f.getTimezoneOffset();
|
|
2907
|
-
var h = g.getTimezoneOffset();
|
|
2908
|
-
K[a >> 2] = 60 * Math.max(e, h);
|
|
2909
|
-
F[b >> 2] = Number(e != h);
|
|
2910
|
-
a = m => m.toLocaleTimeString(void 0, {hour12:!1, timeZoneName:"short"}).split(" ")[1];
|
|
2911
|
-
f = a(f);
|
|
2912
|
-
g = a(g);
|
|
2913
|
-
h < e ? (fb(f, D, c, 17), fb(g, D, d, 17)) : (fb(f, D, d, 17), fb(g, D, c, 17));
|
|
2914
|
-
}, beginPixelLocalStorageWEBGL:function(a, b, c) {
|
|
2915
|
-
(a = v[a].C.za) && a.beginPixelLocalStorageWEBGL(k.HEAPU32.subarray(c, c + b));
|
|
2916
|
-
}, decode_image:function(a, b, c) {
|
|
2917
|
-
var d = k.images;
|
|
2918
|
-
d || (d = new Map(), k.images = d);
|
|
2919
|
-
var e = new Image();
|
|
2920
|
-
d.set(a, e);
|
|
2921
|
-
b = k.HEAP8.subarray(b, b + c);
|
|
2922
|
-
c = new Uint8Array(c);
|
|
2923
|
-
c.set(b);
|
|
2924
|
-
e.src = URL.createObjectURL(new Blob([c], {type:"image/png"}));
|
|
2925
|
-
e.onload = function() {
|
|
2926
|
-
k._setWebImage(a, e.width, e.height);
|
|
2927
|
-
};
|
|
2928
|
-
}, delete_image:function(a) {
|
|
2929
|
-
var b = k.images;
|
|
2930
|
-
b && b.get(a) && b.delete(a);
|
|
2931
|
-
}, emscripten_asm_const_int:(a, b, c) => {
|
|
2932
|
-
wd.length = 0;
|
|
2933
|
-
for (var d; d = D[b++];) {
|
|
2934
|
-
var e = 105 != d;
|
|
2935
|
-
e &= 112 != d;
|
|
2936
|
-
c += e && c % 8 ? 4 : 0;
|
|
2937
|
-
wd.push(112 == d ? K[c >> 2] : 105 == d ? F[c >> 2] : xa[c >> 3]);
|
|
2938
|
-
c += e ? 8 : 4;
|
|
2939
|
-
}
|
|
2940
|
-
return Sa[a](...wd);
|
|
2941
|
-
}, emscripten_date_now:() => Date.now(), emscripten_get_now:() => performance.now(), emscripten_resize_heap:a => {
|
|
2942
|
-
var b = D.length;
|
|
2943
|
-
a >>>= 0;
|
|
2944
|
-
if (2147483648 < a) {
|
|
2945
|
-
return !1;
|
|
2946
|
-
}
|
|
2947
|
-
for (var c = 1; 4 >= c; c *= 2) {
|
|
2948
|
-
var d = b * (1 + 0.2 / c);
|
|
2949
|
-
d = Math.min(d, a + 100663296);
|
|
2950
|
-
var e = Math;
|
|
2951
|
-
d = Math.max(a, d);
|
|
2952
|
-
a: {
|
|
2953
|
-
e = (e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536) - ta.buffer.byteLength + 65535) / 65536;
|
|
2954
|
-
try {
|
|
2955
|
-
ta.grow(e);
|
|
2956
|
-
ya();
|
|
2957
|
-
var f = 1;
|
|
2958
|
-
break a;
|
|
2959
|
-
} catch (g) {
|
|
2960
|
-
}
|
|
2961
|
-
f = void 0;
|
|
2962
|
-
}
|
|
2963
|
-
if (f) {
|
|
2964
|
-
return !0;
|
|
2965
|
-
}
|
|
2966
|
-
}
|
|
2967
|
-
return !1;
|
|
2968
|
-
}, emscripten_webgl_enable_extension:(a, b) => {
|
|
2969
|
-
a = v[a];
|
|
2970
|
-
b = b ? L(D, b) : "";
|
|
2971
|
-
b.startsWith("GL_") && (b = b.substr(3));
|
|
2972
|
-
"WEBGL_draw_instanced_base_vertex_base_instance" == b && xd(W);
|
|
2973
|
-
"WEBGL_multi_draw_instanced_base_vertex_base_instance" == b && yd(W);
|
|
2974
|
-
"WEBGL_multi_draw" == b && (W.Rb = W.getExtension("WEBGL_multi_draw"));
|
|
2975
|
-
return !!a.C.getExtension(b);
|
|
2976
|
-
}, emscripten_webgl_get_current_context:() => p ? p.handle : 0, emscripten_webgl_make_context_current:a => ka(a) ? 0 : -5, enable_WEBGL_provoking_vertex:function(a) {
|
|
2977
|
-
a = v[a].C;
|
|
2978
|
-
a.ib = a.getExtension("WEBGL_provoking_vertex");
|
|
2979
|
-
return !!a.ib;
|
|
2980
|
-
}, enable_WEBGL_shader_pixel_local_storage_coherent:function(a) {
|
|
2981
|
-
a = v[a].C;
|
|
2982
|
-
const b = a.getExtension("WEBGL_shader_pixel_local_storage");
|
|
2983
|
-
if (b && b.isCoherent()) {
|
|
2984
|
-
if (5 == b.framebufferTexturePixelLocalStorageWEBGL.length) {
|
|
2985
|
-
return a.za = b, !0;
|
|
2986
|
-
}
|
|
2987
|
-
console.warn("WEBGL_shader_pixel_local_storage is advertised, but a deprecated version has been detected. Disabling.");
|
|
2988
|
-
}
|
|
2989
|
-
return !1;
|
|
2990
|
-
}, endPixelLocalStorageWEBGL:function(a, b, c) {
|
|
2991
|
-
(a = v[a].C.za) && a.endPixelLocalStorageWEBGL(k.HEAPU32.subarray(c, c + b));
|
|
2992
|
-
}, environ_get:(a, b) => {
|
|
2993
|
-
var c = 0;
|
|
2994
|
-
Pd().forEach((d, e) => {
|
|
2995
|
-
var f = b + c;
|
|
2996
|
-
e = K[a + 4 * e >> 2] = f;
|
|
2997
|
-
for (f = 0; f < d.length; ++f) {
|
|
2998
|
-
C[e++] = d.charCodeAt(f);
|
|
2999
|
-
}
|
|
3000
|
-
C[e] = 0;
|
|
3001
|
-
c += d.length + 1;
|
|
3002
|
-
});
|
|
3003
|
-
return 0;
|
|
3004
|
-
}, environ_sizes_get:(a, b) => {
|
|
3005
|
-
var c = Pd();
|
|
3006
|
-
K[a >> 2] = c.length;
|
|
3007
|
-
var d = 0;
|
|
3008
|
-
c.forEach(e => d += e.length + 1);
|
|
3009
|
-
K[b >> 2] = d;
|
|
3010
|
-
return 0;
|
|
3011
|
-
}, fd_close:function(a) {
|
|
3012
|
-
try {
|
|
3013
|
-
var b = Jb(a);
|
|
3014
|
-
if (null === b.T) {
|
|
3015
|
-
throw new M(8);
|
|
3016
|
-
}
|
|
3017
|
-
b.Ka && (b.Ka = null);
|
|
3018
|
-
try {
|
|
3019
|
-
b.l.close && b.l.close(b);
|
|
3020
|
-
} catch (c) {
|
|
3021
|
-
throw c;
|
|
3022
|
-
} finally {
|
|
3023
|
-
wb[b.T] = null;
|
|
3024
|
-
}
|
|
3025
|
-
b.T = null;
|
|
3026
|
-
return 0;
|
|
3027
|
-
} catch (c) {
|
|
3028
|
-
if ("undefined" == typeof Xb || "ErrnoError" !== c.name) {
|
|
3029
|
-
throw c;
|
|
3030
|
-
}
|
|
3031
|
-
return c.Y;
|
|
3032
|
-
}
|
|
3033
|
-
}, fd_read:function(a, b, c, d) {
|
|
3034
|
-
try {
|
|
3035
|
-
a: {
|
|
3036
|
-
var e = Jb(a);
|
|
3037
|
-
a = b;
|
|
3038
|
-
for (var f, g = b = 0; g < c; g++) {
|
|
3039
|
-
var h = K[a >> 2], m = K[a + 4 >> 2];
|
|
3040
|
-
a += 8;
|
|
3041
|
-
var l = e, r = f, u = C;
|
|
3042
|
-
if (0 > m || 0 > r) {
|
|
3043
|
-
throw new M(28);
|
|
3044
|
-
}
|
|
3045
|
-
if (null === l.T) {
|
|
3046
|
-
throw new M(8);
|
|
3047
|
-
}
|
|
3048
|
-
if (1 === (l.flags & 2097155)) {
|
|
3049
|
-
throw new M(8);
|
|
3050
|
-
}
|
|
3051
|
-
if (16384 === (l.node.mode & 61440)) {
|
|
3052
|
-
throw new M(31);
|
|
3053
|
-
}
|
|
3054
|
-
if (!l.l.read) {
|
|
3055
|
-
throw new M(28);
|
|
3056
|
-
}
|
|
3057
|
-
var w = "undefined" != typeof r;
|
|
3058
|
-
if (!w) {
|
|
3059
|
-
r = l.position;
|
|
3060
|
-
} else if (!l.seekable) {
|
|
3061
|
-
throw new M(70);
|
|
3062
|
-
}
|
|
3063
|
-
var n = l.l.read(l, u, h, m, r);
|
|
3064
|
-
w || (l.position += n);
|
|
3065
|
-
var q = n;
|
|
3066
|
-
if (0 > q) {
|
|
3067
|
-
var t = -1;
|
|
3068
|
-
break a;
|
|
3069
|
-
}
|
|
3070
|
-
b += q;
|
|
3071
|
-
if (q < m) {
|
|
3072
|
-
break;
|
|
3073
|
-
}
|
|
3074
|
-
"undefined" != typeof f && (f += q);
|
|
3075
|
-
}
|
|
3076
|
-
t = b;
|
|
3077
|
-
}
|
|
3078
|
-
K[d >> 2] = t;
|
|
3079
|
-
return 0;
|
|
3080
|
-
} catch (y) {
|
|
3081
|
-
if ("undefined" == typeof Xb || "ErrnoError" !== y.name) {
|
|
3082
|
-
throw y;
|
|
3083
|
-
}
|
|
3084
|
-
return y.Y;
|
|
3085
|
-
}
|
|
3086
|
-
}, fd_seek:function(a, b, c, d, e) {
|
|
3087
|
-
b = c + 2097152 >>> 0 < 4194305 - !!b ? (b >>> 0) + 4294967296 * c : NaN;
|
|
3088
|
-
try {
|
|
3089
|
-
if (isNaN(b)) {
|
|
3090
|
-
return 61;
|
|
3091
|
-
}
|
|
3092
|
-
var f = Jb(a);
|
|
3093
|
-
Tb(f, b, d);
|
|
3094
|
-
Oa = [f.position >>> 0, (Na = f.position, 1.0 <= +Math.abs(Na) ? 0.0 < Na ? +Math.floor(Na / 4294967296.0) >>> 0 : ~~+Math.ceil((Na - +(~~Na >>> 0)) / 4294967296.0) >>> 0 : 0)];
|
|
3095
|
-
F[e >> 2] = Oa[0];
|
|
3096
|
-
F[e + 4 >> 2] = Oa[1];
|
|
3097
|
-
f.Ka && 0 === b && 0 === d && (f.Ka = null);
|
|
3098
|
-
return 0;
|
|
3099
|
-
} catch (g) {
|
|
3100
|
-
if ("undefined" == typeof Xb || "ErrnoError" !== g.name) {
|
|
3101
|
-
throw g;
|
|
3102
|
-
}
|
|
3103
|
-
return g.Y;
|
|
3104
|
-
}
|
|
3105
|
-
}, fd_write:function(a, b, c, d) {
|
|
3106
|
-
try {
|
|
3107
|
-
a: {
|
|
3108
|
-
var e = Jb(a);
|
|
3109
|
-
a = b;
|
|
3110
|
-
for (var f, g = b = 0; g < c; g++) {
|
|
3111
|
-
var h = K[a >> 2], m = K[a + 4 >> 2];
|
|
3112
|
-
a += 8;
|
|
3113
|
-
var l = e, r = h, u = m, w = f, n = C;
|
|
3114
|
-
if (0 > u || 0 > w) {
|
|
3115
|
-
throw new M(28);
|
|
3116
|
-
}
|
|
3117
|
-
if (null === l.T) {
|
|
3118
|
-
throw new M(8);
|
|
3119
|
-
}
|
|
3120
|
-
if (0 === (l.flags & 2097155)) {
|
|
3121
|
-
throw new M(8);
|
|
3122
|
-
}
|
|
3123
|
-
if (16384 === (l.node.mode & 61440)) {
|
|
3124
|
-
throw new M(31);
|
|
3125
|
-
}
|
|
3126
|
-
if (!l.l.write) {
|
|
3127
|
-
throw new M(28);
|
|
3128
|
-
}
|
|
3129
|
-
l.seekable && l.flags & 1024 && Tb(l, 0, 2);
|
|
3130
|
-
var q = "undefined" != typeof w;
|
|
3131
|
-
if (!q) {
|
|
3132
|
-
w = l.position;
|
|
3133
|
-
} else if (!l.seekable) {
|
|
3134
|
-
throw new M(70);
|
|
3135
|
-
}
|
|
3136
|
-
var t = l.l.write(l, n, r, u, w, void 0);
|
|
3137
|
-
q || (l.position += t);
|
|
3138
|
-
var y = t;
|
|
3139
|
-
if (0 > y) {
|
|
3140
|
-
var z = -1;
|
|
3141
|
-
break a;
|
|
3142
|
-
}
|
|
3143
|
-
b += y;
|
|
3144
|
-
"undefined" != typeof f && (f += y);
|
|
3145
|
-
}
|
|
3146
|
-
z = b;
|
|
3147
|
-
}
|
|
3148
|
-
K[d >> 2] = z;
|
|
3149
|
-
return 0;
|
|
3150
|
-
} catch (B) {
|
|
3151
|
-
if ("undefined" == typeof Xb || "ErrnoError" !== B.name) {
|
|
3152
|
-
throw B;
|
|
3153
|
-
}
|
|
3154
|
-
return B.Y;
|
|
3155
|
-
}
|
|
3156
|
-
}, framebufferPixelLocalClearValuefvWEBGL:function(a, b, c, d, e, f) {
|
|
3157
|
-
(a = v[a].C.za) && a.framebufferPixelLocalClearValuefvWEBGL(b, [c, d, e, f]);
|
|
3158
|
-
}, framebufferTexturePixelLocalStorageWEBGL:function(a, b, c, d, e, f) {
|
|
3159
|
-
(a = v[a].C.za) && a.framebufferTexturePixelLocalStorageWEBGL(b, Ed[c], d, e, f);
|
|
3160
|
-
}, glActiveTexture:a => W.activeTexture(a), glAttachShader:(a, b) => {
|
|
3161
|
-
W.attachShader(V[a], Fd[b]);
|
|
3162
|
-
}, glBindBuffer:(a, b) => {
|
|
3163
|
-
35051 == a ? W.Ja = b : 35052 == a && (W.oa = b);
|
|
3164
|
-
W.bindBuffer(a, Bd[b]);
|
|
3165
|
-
}, glBindBufferRange:(a, b, c, d, e) => {
|
|
3166
|
-
W.bindBufferRange(a, b, Bd[c], d, e);
|
|
3167
|
-
}, glBindFramebuffer:(a, b) => {
|
|
3168
|
-
W.bindFramebuffer(a, Cd[b]);
|
|
3169
|
-
}, glBindRenderbuffer:(a, b) => {
|
|
3170
|
-
W.bindRenderbuffer(a, Dd[b]);
|
|
3171
|
-
}, glBindTexture:(a, b) => {
|
|
3172
|
-
W.bindTexture(a, Ed[b]);
|
|
3173
|
-
}, glBindVertexArray:a => {
|
|
3174
|
-
W.bindVertexArray(Gd[a]);
|
|
3175
|
-
}, glBlendEquation:a => W.blendEquation(a), glBlendFunc:(a, b) => W.blendFunc(a, b), glBlitFramebuffer:(a, b, c, d, e, f, g, h, m, l) => W.blitFramebuffer(a, b, c, d, e, f, g, h, m, l), glBufferData:(a, b, c, d) => {
|
|
3176
|
-
c && b ? W.bufferData(a, D, d, c, b) : W.bufferData(a, b, d);
|
|
3177
|
-
}, glBufferSubData:(a, b, c, d) => {
|
|
3178
|
-
c && W.bufferSubData(a, b, D, d, c);
|
|
3179
|
-
}, glClear:a => W.clear(a), glClearBufferfv:(a, b, c) => {
|
|
3180
|
-
W.clearBufferfv(a, b, wa, c >> 2);
|
|
3181
|
-
}, glClearBufferuiv:(a, b, c) => {
|
|
3182
|
-
W.clearBufferuiv(a, b, K, c >> 2);
|
|
3183
|
-
}, glClearColor:(a, b, c, d) => W.clearColor(a, b, c, d), glClearDepthf:a => W.clearDepth(a), glClearStencil:a => W.clearStencil(a), glColorMask:(a, b, c, d) => {
|
|
3184
|
-
W.colorMask(!!a, !!b, !!c, !!d);
|
|
3185
|
-
}, glCompileShader:a => {
|
|
3186
|
-
W.compileShader(Fd[a]);
|
|
3187
|
-
}, glCompressedTexSubImage2D:(a, b, c, d, e, f, g, h, m) => {
|
|
3188
|
-
W.oa || !h ? W.compressedTexSubImage2D(a, b, c, d, e, f, g, h, m) : W.compressedTexSubImage2D(a, b, c, d, e, f, g, D, m, h);
|
|
3189
|
-
}, glCreateProgram:() => {
|
|
3190
|
-
var a = Kd(V), b = W.createProgram();
|
|
3191
|
-
b.name = a;
|
|
3192
|
-
b.wa = b.ua = b.va = 0;
|
|
3193
|
-
b.Qa = 1;
|
|
3194
|
-
V[a] = b;
|
|
3195
|
-
return a;
|
|
3196
|
-
}, glCreateShader:a => {
|
|
3197
|
-
var b = Kd(Fd);
|
|
3198
|
-
Fd[b] = W.createShader(a);
|
|
3199
|
-
return b;
|
|
3200
|
-
}, glCullFace:a => W.cullFace(a), glDeleteBuffers:(a, b) => {
|
|
3201
|
-
for (var c = 0; c < a; c++) {
|
|
3202
|
-
var d = F[b + 4 * c >> 2], e = Bd[d];
|
|
3203
|
-
e && (W.deleteBuffer(e), e.name = 0, Bd[d] = null, d == W.Ja && (W.Ja = 0), d == W.oa && (W.oa = 0));
|
|
3204
|
-
}
|
|
3205
|
-
}, glDeleteFramebuffers:(a, b) => {
|
|
3206
|
-
for (var c = 0; c < a; ++c) {
|
|
3207
|
-
var d = F[b + 4 * c >> 2], e = Cd[d];
|
|
3208
|
-
e && (W.deleteFramebuffer(e), e.name = 0, Cd[d] = null);
|
|
3209
|
-
}
|
|
3210
|
-
}, glDeleteProgram:a => {
|
|
3211
|
-
if (a) {
|
|
3212
|
-
var b = V[a];
|
|
3213
|
-
b ? (W.deleteProgram(b), b.name = 0, V[a] = null) : X ||= 1281;
|
|
3214
|
-
}
|
|
3215
|
-
}, glDeleteRenderbuffers:(a, b) => {
|
|
3216
|
-
for (var c = 0; c < a; c++) {
|
|
3217
|
-
var d = F[b + 4 * c >> 2], e = Dd[d];
|
|
3218
|
-
e && (W.deleteRenderbuffer(e), e.name = 0, Dd[d] = null);
|
|
3219
|
-
}
|
|
3220
|
-
}, glDeleteShader:a => {
|
|
3221
|
-
if (a) {
|
|
3222
|
-
var b = Fd[a];
|
|
3223
|
-
b ? (W.deleteShader(b), Fd[a] = null) : X ||= 1281;
|
|
3224
|
-
}
|
|
3225
|
-
}, glDeleteTextures:(a, b) => {
|
|
3226
|
-
for (var c = 0; c < a; c++) {
|
|
3227
|
-
var d = F[b + 4 * c >> 2], e = Ed[d];
|
|
3228
|
-
e && (W.deleteTexture(e), e.name = 0, Ed[d] = null);
|
|
3229
|
-
}
|
|
3230
|
-
}, glDeleteVertexArrays:(a, b) => {
|
|
3231
|
-
for (var c = 0; c < a; c++) {
|
|
3232
|
-
var d = F[b + 4 * c >> 2];
|
|
3233
|
-
W.deleteVertexArray(Gd[d]);
|
|
3234
|
-
Gd[d] = null;
|
|
3235
|
-
}
|
|
3236
|
-
}, glDepthFunc:a => W.depthFunc(a), glDepthMask:a => {
|
|
3237
|
-
W.depthMask(!!a);
|
|
3238
|
-
}, glDepthRangef:(a, b) => W.depthRange(a, b), glDisable:a => W.disable(a), glDrawArrays:(a, b, c) => {
|
|
3239
|
-
W.drawArrays(a, b, c);
|
|
3240
|
-
}, glDrawArraysInstanced:(a, b, c, d) => {
|
|
3241
|
-
W.drawArraysInstanced(a, b, c, d);
|
|
3242
|
-
}, glDrawBuffers:(a, b) => {
|
|
3243
|
-
for (var c = Qd[a], d = 0; d < a; d++) {
|
|
3244
|
-
c[d] = F[b + 4 * d >> 2];
|
|
3245
|
-
}
|
|
3246
|
-
W.drawBuffers(c);
|
|
3247
|
-
}, glDrawElementsInstanced:(a, b, c, d, e) => {
|
|
3248
|
-
W.drawElementsInstanced(a, b, c, d, e);
|
|
3249
|
-
}, glEnable:a => W.enable(a), glEnableVertexAttribArray:a => {
|
|
3250
|
-
W.enableVertexAttribArray(a);
|
|
3251
|
-
}, glFlush:() => W.flush(), glFramebufferRenderbuffer:(a, b, c, d) => {
|
|
3252
|
-
W.framebufferRenderbuffer(a, b, c, Dd[d]);
|
|
3253
|
-
}, glFramebufferTexture2D:(a, b, c, d, e) => {
|
|
3254
|
-
W.framebufferTexture2D(a, b, c, Ed[d], e);
|
|
3255
|
-
}, glFrontFace:a => W.frontFace(a), glGenBuffers:(a, b) => {
|
|
3256
|
-
Ld(a, b, "createBuffer", Bd);
|
|
3257
|
-
}, glGenFramebuffers:(a, b) => {
|
|
3258
|
-
Ld(a, b, "createFramebuffer", Cd);
|
|
3259
|
-
}, glGenRenderbuffers:(a, b) => {
|
|
3260
|
-
Ld(a, b, "createRenderbuffer", Dd);
|
|
3261
|
-
}, glGenTextures:(a, b) => {
|
|
3262
|
-
Ld(a, b, "createTexture", Ed);
|
|
3263
|
-
}, glGenVertexArrays:(a, b) => {
|
|
3264
|
-
Ld(a, b, "createVertexArray", Gd);
|
|
3265
|
-
}, glGenerateMipmap:a => W.generateMipmap(a), glGetIntegerv:(a, b) => Sd(a, b), glGetProgramiv:(a, b, c) => {
|
|
3266
|
-
if (c) {
|
|
3267
|
-
if (a >= Ad) {
|
|
3268
|
-
X ||= 1281;
|
|
3269
|
-
} else {
|
|
3270
|
-
if (a = V[a], 35716 == b) {
|
|
3271
|
-
a = W.getProgramInfoLog(a), null === a && (a = "(unknown error)"), F[c >> 2] = a.length + 1;
|
|
3272
|
-
} else if (35719 == b) {
|
|
3273
|
-
if (!a.wa) {
|
|
3274
|
-
for (b = 0; b < W.getProgramParameter(a, 35718); ++b) {
|
|
3275
|
-
a.wa = Math.max(a.wa, W.getActiveUniform(a, b).name.length + 1);
|
|
3276
|
-
}
|
|
3277
|
-
}
|
|
3278
|
-
F[c >> 2] = a.wa;
|
|
3279
|
-
} else if (35722 == b) {
|
|
3280
|
-
if (!a.ua) {
|
|
3281
|
-
for (b = 0; b < W.getProgramParameter(a, 35721); ++b) {
|
|
3282
|
-
a.ua = Math.max(a.ua, W.getActiveAttrib(a, b).name.length + 1);
|
|
3283
|
-
}
|
|
3284
|
-
}
|
|
3285
|
-
F[c >> 2] = a.ua;
|
|
3286
|
-
} else if (35381 == b) {
|
|
3287
|
-
if (!a.va) {
|
|
3288
|
-
for (b = 0; b < W.getProgramParameter(a, 35382); ++b) {
|
|
3289
|
-
a.va = Math.max(a.va, W.getActiveUniformBlockName(a, b).length + 1);
|
|
3290
|
-
}
|
|
3291
|
-
}
|
|
3292
|
-
F[c >> 2] = a.va;
|
|
3293
|
-
} else {
|
|
3294
|
-
F[c >> 2] = W.getProgramParameter(a, b);
|
|
3295
|
-
}
|
|
3296
|
-
}
|
|
3297
|
-
} else {
|
|
3298
|
-
X ||= 1281;
|
|
3299
|
-
}
|
|
3300
|
-
}, glGetString:a => {
|
|
3301
|
-
var b = Hd[a];
|
|
3302
|
-
if (!b) {
|
|
3303
|
-
switch(a) {
|
|
3304
|
-
case 7939:
|
|
3305
|
-
b = Ud(Rd().join(" "));
|
|
3306
|
-
break;
|
|
3307
|
-
case 7936:
|
|
3308
|
-
case 7937:
|
|
3309
|
-
case 37445:
|
|
3310
|
-
case 37446:
|
|
3311
|
-
(b = W.getParameter(a)) || (X ||= 1280);
|
|
3312
|
-
b = b ? Ud(b) : 0;
|
|
3313
|
-
break;
|
|
3314
|
-
case 7938:
|
|
3315
|
-
b = Ud(`OpenGL ES 3.0 (${W.getParameter(7938)})`);
|
|
3316
|
-
break;
|
|
3317
|
-
case 35724:
|
|
3318
|
-
b = W.getParameter(35724);
|
|
3319
|
-
var c = b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);
|
|
3320
|
-
null !== c && (3 == c[1].length && (c[1] += "0"), b = `OpenGL ES GLSL ES ${c[1]} (${b})`);
|
|
3321
|
-
b = Ud(b);
|
|
3322
|
-
break;
|
|
3323
|
-
default:
|
|
3324
|
-
X ||= 1280;
|
|
3325
|
-
}
|
|
3326
|
-
Hd[a] = b;
|
|
3327
|
-
}
|
|
3328
|
-
return b;
|
|
3329
|
-
}, glGetUniformBlockIndex:(a, b) => W.getUniformBlockIndex(V[a], b ? L(D, b) : ""), glGetUniformLocation:(a, b) => {
|
|
3330
|
-
b = b ? L(D, b) : "";
|
|
3331
|
-
if (a = V[a]) {
|
|
3332
|
-
var c = a, d = c.ja, e = c.ob, f;
|
|
3333
|
-
if (!d) {
|
|
3334
|
-
for (c.ja = d = {}, c.nb = {}, f = 0; f < W.getProgramParameter(c, 35718); ++f) {
|
|
3335
|
-
var g = W.getActiveUniform(c, f);
|
|
3336
|
-
var h = g.name;
|
|
3337
|
-
g = g.size;
|
|
3338
|
-
var m = Vd(h);
|
|
3339
|
-
m = 0 < m ? h.slice(0, m) : h;
|
|
3340
|
-
var l = c.Qa;
|
|
3341
|
-
c.Qa += g;
|
|
3342
|
-
e[m] = [g, l];
|
|
3343
|
-
for (h = 0; h < g; ++h) {
|
|
3344
|
-
d[l] = h, c.nb[l++] = m;
|
|
3345
|
-
}
|
|
3346
|
-
}
|
|
3347
|
-
}
|
|
3348
|
-
c = a.ja;
|
|
3349
|
-
d = 0;
|
|
3350
|
-
e = b;
|
|
3351
|
-
f = Vd(b);
|
|
3352
|
-
0 < f && (d = parseInt(b.slice(f + 1)) >>> 0, e = b.slice(0, f));
|
|
3353
|
-
if ((e = a.ob[e]) && d < e[0] && (d += e[1], c[d] = c[d] || W.getUniformLocation(a, b))) {
|
|
3354
|
-
return d;
|
|
3355
|
-
}
|
|
3356
|
-
} else {
|
|
3357
|
-
X ||= 1281;
|
|
3358
|
-
}
|
|
3359
|
-
return -1;
|
|
3360
|
-
}, glInvalidateFramebuffer:(a, b, c) => {
|
|
3361
|
-
for (var d = Qd[b], e = 0; e < b; e++) {
|
|
3362
|
-
d[e] = F[c + 4 * e >> 2];
|
|
3363
|
-
}
|
|
3364
|
-
W.invalidateFramebuffer(a, d);
|
|
3365
|
-
}, glLinkProgram:a => {
|
|
3366
|
-
a = V[a];
|
|
3367
|
-
W.linkProgram(a);
|
|
3368
|
-
a.ja = 0;
|
|
3369
|
-
a.ob = {};
|
|
3370
|
-
}, glPixelStorei:(a, b) => {
|
|
3371
|
-
3317 == a ? Id = b : 3314 == a && (Jd = b);
|
|
3372
|
-
W.pixelStorei(a, b);
|
|
3373
|
-
}, glReadPixels:(a, b, c, d, e, f, g) => {
|
|
3374
|
-
if (W.Ja) {
|
|
3375
|
-
W.readPixels(a, b, c, d, e, f, g);
|
|
3376
|
-
} else {
|
|
3377
|
-
var h = Wd(f);
|
|
3378
|
-
g >>>= 31 - Math.clz32(h.BYTES_PER_ELEMENT);
|
|
3379
|
-
W.readPixels(a, b, c, d, e, f, h, g);
|
|
3380
|
-
}
|
|
3381
|
-
}, glRenderbufferStorageMultisample:(a, b, c, d, e) => W.renderbufferStorageMultisample(a, b, c, d, e), glScissor:(a, b, c, d) => W.scissor(a, b, c, d), glShaderSource:(a, b, c, d) => {
|
|
3382
|
-
for (var e = "", f = 0; f < b; ++f) {
|
|
3383
|
-
var g = (g = K[c + 4 * f >> 2]) ? L(D, g, d ? K[d + 4 * f >> 2] : void 0) : "";
|
|
3384
|
-
e += g;
|
|
3385
|
-
}
|
|
3386
|
-
W.shaderSource(Fd[a], e);
|
|
3387
|
-
}, glStencilFunc:(a, b, c) => W.stencilFunc(a, b, c), glStencilFuncSeparate:(a, b, c, d) => W.stencilFuncSeparate(a, b, c, d), glStencilMask:a => W.stencilMask(a), glStencilOp:(a, b, c) => W.stencilOp(a, b, c), glStencilOpSeparate:(a, b, c, d) => W.stencilOpSeparate(a, b, c, d), glTexParameteri:(a, b, c) => W.texParameteri(a, b, c), glTexStorage2D:(a, b, c, d, e) => W.texStorage2D(a, b, c, d, e), glTexStorage3D:(a, b, c, d, e, f) => W.texStorage3D(a, b, c, d, e, f), glTexSubImage2D:(a, b, c, d, e,
|
|
3388
|
-
f, g, h, m) => {
|
|
3389
|
-
if (W.oa) {
|
|
3390
|
-
W.texSubImage2D(a, b, c, d, e, f, g, h, m);
|
|
3391
|
-
} else {
|
|
3392
|
-
if (m) {
|
|
3393
|
-
var l = Wd(h);
|
|
3394
|
-
W.texSubImage2D(a, b, c, d, e, f, g, h, l, m >>> 31 - Math.clz32(l.BYTES_PER_ELEMENT));
|
|
3395
|
-
} else {
|
|
3396
|
-
if (m) {
|
|
3397
|
-
l = Wd(h);
|
|
3398
|
-
var r = f * ((Jd || e) * ({5:3, 6:4, 8:2, 29502:3, 29504:4, 26917:2, 26918:2, 29846:3, 29847:4}[g - 6402] || 1) * l.BYTES_PER_ELEMENT + Id - 1 & -Id);
|
|
3399
|
-
m = l.subarray(m >>> 31 - Math.clz32(l.BYTES_PER_ELEMENT), m + r >>> 31 - Math.clz32(l.BYTES_PER_ELEMENT));
|
|
3400
|
-
} else {
|
|
3401
|
-
m = null;
|
|
3402
|
-
}
|
|
3403
|
-
W.texSubImage2D(a, b, c, d, e, f, g, h, m);
|
|
3404
|
-
}
|
|
3405
|
-
}
|
|
3406
|
-
}, glUniform1i:(a, b) => {
|
|
3407
|
-
var c = W, d = c.uniform1i;
|
|
3408
|
-
var e = W.zb;
|
|
3409
|
-
if (e) {
|
|
3410
|
-
var f = e.ja[a];
|
|
3411
|
-
"number" == typeof f && (e.ja[a] = f = W.getUniformLocation(e, e.nb[a] + (0 < f ? `[${f}]` : "")));
|
|
3412
|
-
a = f;
|
|
3413
|
-
} else {
|
|
3414
|
-
X ||= 1282, a = void 0;
|
|
3415
|
-
}
|
|
3416
|
-
d.call(c, a, b);
|
|
3417
|
-
}, glUniformBlockBinding:(a, b, c) => {
|
|
3418
|
-
a = V[a];
|
|
3419
|
-
W.uniformBlockBinding(a, b, c);
|
|
3420
|
-
}, glUseProgram:a => {
|
|
3421
|
-
a = V[a];
|
|
3422
|
-
W.useProgram(a);
|
|
3423
|
-
W.zb = a;
|
|
3424
|
-
}, glVertexAttribDivisor:(a, b) => {
|
|
3425
|
-
W.vertexAttribDivisor(a, b);
|
|
3426
|
-
}, glVertexAttribIPointer:(a, b, c, d, e) => {
|
|
3427
|
-
W.vertexAttribIPointer(a, b, c, d, e);
|
|
3428
|
-
}, glVertexAttribPointer:(a, b, c, d, e, f) => {
|
|
3429
|
-
W.vertexAttribPointer(a, b, c, !!d, e, f);
|
|
3430
|
-
}, glViewport:(a, b, c, d) => W.viewport(a, b, c, d), invoke_vii:ce, isWindowsBrowser:function() {
|
|
3431
|
-
return -1 < navigator.platform.indexOf("Win");
|
|
3432
|
-
}, provokingVertexWEBGL:function(a, b) {
|
|
3433
|
-
(a = v[a].C.ib) && a.provokingVertexWEBGL(b);
|
|
3434
|
-
}, strftime:Zd, strftime_l:(a, b, c, d) => Zd(a, b, c, d), upload_image:function(a, b) {
|
|
3435
|
-
var c = k.images;
|
|
3436
|
-
c && (b = c.get(b)) && (a = v[a].C, a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0), a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, b), a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1));
|
|
3437
|
-
}, wasm_start_image_decode:function(a, b, c) {
|
|
3438
|
-
b = k.HEAP8.subarray(b, b + c);
|
|
3439
|
-
c = new Uint8Array(c);
|
|
3440
|
-
c.set(b);
|
|
3441
|
-
createImageBitmap(new Blob([c])).then(function(d) {
|
|
3442
|
-
var e = (new OffscreenCanvas(d.width, d.height)).getContext("2d");
|
|
3443
|
-
e.drawImage(d, 0, 0);
|
|
3444
|
-
e = e.getImageData(0, 0, d.width, d.height);
|
|
3445
|
-
var f = e.data.length, g = k.tb(f);
|
|
3446
|
-
k.dc.set(e.data, g);
|
|
3447
|
-
k.fc(a, d.width, d.height, g, f);
|
|
3448
|
-
}).catch(function(d) {
|
|
3449
|
-
d = d.message || "decode failed";
|
|
3450
|
-
var e = k.zc(d) + 1, f = k.tb(e);
|
|
3451
|
-
k.Hc(d, f, e);
|
|
3452
|
-
k.hc(a, f);
|
|
3453
|
-
k.ec(f);
|
|
3454
|
-
});
|
|
3455
|
-
}}, Z = function() {
|
|
3456
|
-
function a(c) {
|
|
3457
|
-
Z = c.exports;
|
|
3458
|
-
ta = Z.memory;
|
|
3459
|
-
ya();
|
|
3460
|
-
Pc = Z.__indirect_function_table;
|
|
3461
|
-
Aa.unshift(Z.__wasm_call_ctors);
|
|
3462
|
-
Da--;
|
|
3463
|
-
k.monitorRunDependencies?.(Da);
|
|
3464
|
-
0 == Da && (null !== Ea && (clearInterval(Ea), Ea = null), Fa && (c = Fa, Fa = null, c()));
|
|
3465
|
-
return Z;
|
|
3466
|
-
}
|
|
3467
|
-
var b = {env:de, wasi_snapshot_preview1:de,};
|
|
3468
|
-
Da++;
|
|
3469
|
-
k.monitorRunDependencies?.(Da);
|
|
3470
|
-
if (k.instantiateWasm) {
|
|
3471
|
-
try {
|
|
3472
|
-
return k.instantiateWasm(b, a);
|
|
3473
|
-
} catch (c) {
|
|
3474
|
-
A(`Module.instantiateWasm callback failed with error: ${c}`), ba(c);
|
|
3475
|
-
}
|
|
3476
|
-
}
|
|
3477
|
-
Ia ||= Ha("webgl2_advanced.wasm") ? "webgl2_advanced.wasm" : k.locateFile ? k.locateFile("webgl2_advanced.wasm", x) : x + "webgl2_advanced.wasm";
|
|
3478
|
-
Ma(b, function(c) {
|
|
3479
|
-
a(c.instance);
|
|
3480
|
-
}).catch(ba);
|
|
3481
|
-
return {};
|
|
3482
|
-
}(), kc = a => (kc = Z.free)(a), Td = a => (Td = Z.malloc)(a);
|
|
3483
|
-
k._setWebImage = (a, b, c) => (k._setWebImage = Z.setWebImage)(a, b, c);
|
|
3484
|
-
var jc = a => (jc = Z.__getTypeName)(a);
|
|
3485
|
-
k._wasm_image_decode_complete = (a, b, c, d, e) => (k._wasm_image_decode_complete = Z.wasm_image_decode_complete)(a, b, c, d, e);
|
|
3486
|
-
k._wasm_image_decode_error = (a, b) => (k._wasm_image_decode_error = Z.wasm_image_decode_error)(a, b);
|
|
3487
|
-
var Pa = k._ma_device__on_notification_unlocked = a => (Pa = k._ma_device__on_notification_unlocked = Z.ma_device__on_notification_unlocked)(a);
|
|
3488
|
-
k._ma_malloc_emscripten = (a, b) => (k._ma_malloc_emscripten = Z.ma_malloc_emscripten)(a, b);
|
|
3489
|
-
k._ma_free_emscripten = (a, b) => (k._ma_free_emscripten = Z.ma_free_emscripten)(a, b);
|
|
3490
|
-
var Qa = k._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (Qa = k._ma_device_process_pcm_frames_capture__webaudio = Z.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), Ra = k._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (Ra = k._ma_device_process_pcm_frames_playback__webaudio = Z.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), ee = (a, b) => (ee = Z.setThrew)(a, b), fe = a => (fe = Z._emscripten_stack_restore)(a), ge = () => (ge = Z.emscripten_stack_get_current)();
|
|
3491
|
-
k.dynCall_iiiji = (a, b, c, d, e, f) => (k.dynCall_iiiji = Z.dynCall_iiiji)(a, b, c, d, e, f);
|
|
3492
|
-
k.dynCall_iij = (a, b, c, d) => (k.dynCall_iij = Z.dynCall_iij)(a, b, c, d);
|
|
3493
|
-
k.dynCall_iiji = (a, b, c, d, e) => (k.dynCall_iiji = Z.dynCall_iiji)(a, b, c, d, e);
|
|
3494
|
-
k.dynCall_jii = (a, b, c) => (k.dynCall_jii = Z.dynCall_jii)(a, b, c);
|
|
3495
|
-
k.dynCall_vijj = (a, b, c, d, e, f) => (k.dynCall_vijj = Z.dynCall_vijj)(a, b, c, d, e, f);
|
|
3496
|
-
k.dynCall_jiji = (a, b, c, d, e) => (k.dynCall_jiji = Z.dynCall_jiji)(a, b, c, d, e);
|
|
3497
|
-
k.dynCall_viijii = (a, b, c, d, e, f, g) => (k.dynCall_viijii = Z.dynCall_viijii)(a, b, c, d, e, f, g);
|
|
3498
|
-
k.dynCall_iiiiij = (a, b, c, d, e, f, g) => (k.dynCall_iiiiij = Z.dynCall_iiiiij)(a, b, c, d, e, f, g);
|
|
3499
|
-
k.dynCall_iiiiijj = (a, b, c, d, e, f, g, h, m) => (k.dynCall_iiiiijj = Z.dynCall_iiiiijj)(a, b, c, d, e, f, g, h, m);
|
|
3500
|
-
k.dynCall_iiiiiijj = (a, b, c, d, e, f, g, h, m, l) => (k.dynCall_iiiiiijj = Z.dynCall_iiiiiijj)(a, b, c, d, e, f, g, h, m, l);
|
|
3501
|
-
function ce(a, b, c) {
|
|
3502
|
-
var d = ge();
|
|
3503
|
-
try {
|
|
3504
|
-
Qc(a)(b, c);
|
|
3505
|
-
} catch (e) {
|
|
3506
|
-
fe(d);
|
|
3507
|
-
if (e !== e + 0) {
|
|
3508
|
-
throw e;
|
|
3509
|
-
}
|
|
3510
|
-
ee(1, 0);
|
|
3511
|
-
}
|
|
3512
|
-
}
|
|
3513
|
-
var he;
|
|
3514
|
-
Fa = function ie() {
|
|
3515
|
-
he || je();
|
|
3516
|
-
he || (Fa = ie);
|
|
3517
|
-
};
|
|
3518
|
-
function je() {
|
|
3519
|
-
function a() {
|
|
3520
|
-
if (!he && (he = !0, k.calledRun = !0, !ua)) {
|
|
3521
|
-
k.noFSInit || Ub || (Ub = !0, k.stdin = k.stdin, k.stdout = k.stdout, k.stderr = k.stderr, k.stdin ? Vb("stdin", k.stdin) : Qb("/dev/tty", "/dev/stdin"), k.stdout ? Vb("stdout", null, k.stdout) : Qb("/dev/tty", "/dev/stdout"), k.stderr ? Vb("stderr", null, k.stderr) : Qb("/dev/tty1", "/dev/stderr"), Rb("/dev/stdin", 0), Rb("/dev/stdout", 1), Rb("/dev/stderr", 1));
|
|
3522
|
-
zb = !1;
|
|
3523
|
-
Ta(Aa);
|
|
3524
|
-
aa(k);
|
|
3525
|
-
if (k.onRuntimeInitialized) {
|
|
3526
|
-
k.onRuntimeInitialized();
|
|
3527
|
-
}
|
|
3528
|
-
if (k.postRun) {
|
|
3529
|
-
for ("function" == typeof k.postRun && (k.postRun = [k.postRun]); k.postRun.length;) {
|
|
3530
|
-
var b = k.postRun.shift();
|
|
3531
|
-
Ba.unshift(b);
|
|
3532
|
-
}
|
|
3533
|
-
}
|
|
3534
|
-
Ta(Ba);
|
|
3535
|
-
}
|
|
3536
|
-
}
|
|
3537
|
-
if (!(0 < Da)) {
|
|
3538
|
-
if (k.preRun) {
|
|
3539
|
-
for ("function" == typeof k.preRun && (k.preRun = [k.preRun]); k.preRun.length;) {
|
|
3540
|
-
Ca();
|
|
3541
|
-
}
|
|
3542
|
-
}
|
|
3543
|
-
Ta(za);
|
|
3544
|
-
0 < Da || (k.setStatus ? (k.setStatus("Running..."), setTimeout(function() {
|
|
3545
|
-
setTimeout(function() {
|
|
3546
|
-
k.setStatus("");
|
|
3547
|
-
}, 1);
|
|
3548
|
-
a();
|
|
3549
|
-
}, 1)) : a());
|
|
3550
|
-
}
|
|
3551
|
-
}
|
|
3552
|
-
if (k.preInit) {
|
|
3553
|
-
for ("function" == typeof k.preInit && (k.preInit = [k.preInit]); 0 < k.preInit.length;) {
|
|
3554
|
-
k.preInit.pop()();
|
|
3555
|
-
}
|
|
3556
|
-
}
|
|
3557
|
-
je();
|
|
3558
|
-
moduleRtn = ca;
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
return moduleRtn;
|
|
3563
|
-
}
|
|
3564
|
-
);
|
|
3565
|
-
})();
|
|
1
|
+
var Rive=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;var l=moduleArg,aa=!!globalThis.window,ba=!!globalThis.WorkerGlobalScope;
|
|
2
|
+
function ca(){function a(g){const h=d;c=b=0;d=new Map;h.forEach(k=>{try{k(g)}catch(m){console.error(m)}});this.Vd();e&&e.we()}let b=0,c=0,d=new Map,e=null,f=null;this.requestAnimationFrame=function(g){b||=requestAnimationFrame(a.bind(this));const h=++c;d.set(h,g);return h};this.cancelAnimationFrame=function(g){d.delete(g);b&&0==d.size&&(cancelAnimationFrame(b),b=0)};this.se=function(g){f&&(document.body.remove(f),f=null);g||(f=document.createElement("div"),f.style.backgroundColor="black",f.style.position=
|
|
3
|
+
"fixed",f.style.right=0,f.style.top=0,f.style.color="white",f.style.padding="4px",f.innerHTML="RIVE FPS",g=function(h){f.innerHTML="RIVE FPS "+h.toFixed(1)},document.body.appendChild(f));e=new function(){let h=0,k=0;this.we=function(){var m=performance.now();k?(++h,m-=k,1E3<m&&(g(1E3*h/m),h=k=0)):(k=m,h=0)}}};this.Vd=function(){}}
|
|
4
|
+
function da(){console.assert(!0);const a=new Map;let b=-Infinity;this.push=function(c){c=c+255>>8;a.has(c)&&clearTimeout(a.get(c));a.set(c,setTimeout(function(){a.delete(c);0==a.length?b=-Infinity:c==b&&(b=Math.max(...a.keys()),console.assert(b<c))},1E3));b=Math.max(c,b);return b<<8}}const ea=l.onRuntimeInitialized;
|
|
5
|
+
l.onRuntimeInitialized=function(){ea&&ea();let a=l.decodeAudio;l.decodeAudio=function(f,g){f=a(f);g(f)};let b=l.decodeFont;l.decodeFont=function(f,g){f=b(f);g(f)};let c=l.setFallbackFontCb;l.setFallbackFontCallback="function"===typeof c?function(f){c(f)}:function(){console.warn("Module.setFallbackFontCallback called, but text support is not enabled in this build.")};const d=l.FileAssetLoader;l.ptrToAsset=f=>{let g=l.ptrToFileAsset(f);return g.isImage?l.ptrToImageAsset(f):g.isFont?l.ptrToFontAsset(f):
|
|
6
|
+
g.isAudio?l.ptrToAudioAsset(f):g};l.CustomFileAssetLoader=d.extend("CustomFileAssetLoader",{__construct:function({loadContents:f}){this.__parent.__construct.call(this);this.ie=f},loadContents:function(f,g){f=l.ptrToAsset(f);return this.ie(f,g)}});l.CDNFileAssetLoader=d.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(f){let g=l.ptrToAsset(f);f=g.cdnUuid;if(""===f)return!1;(function(h,k){var m=new XMLHttpRequest;m.responseType="arraybuffer";
|
|
7
|
+
m.onreadystatechange=function(){4==m.readyState&&200==m.status&&k(m)};m.open("GET",h,!0);m.send(null)})(g.cdnBaseUrl+"/"+f,h=>{g.decode(new Uint8Array(h.response))});return!0}});l.FallbackFileAssetLoader=d.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this);this.Qd=[]},addLoader:function(f){this.Qd.push(f)},loadContents:function(f,g){for(let h of this.Qd)if(h.loadContents(f,g))return!0;return!1}});let e=l.computeAlignment;l.computeAlignment=function(f,g,h,
|
|
8
|
+
k,m=1){return e.call(this,f,g,h,k,m)}};const fa=l.onRuntimeInitialized;
|
|
9
|
+
l.onRuntimeInitialized=function(){function a(p){this.uc=p;this.he=p.getContext("2d");this.Kd=d;this.Gc=[];this.Wc=0;this.clear=function(){console.assert(0==this.Wc);this.Gc=[];e.delete(this)};this.save=function(){++this.Wc;this.Gc.push(d.save.bind(d))};this.restore=function(){0<this.Wc&&(this.Gc.push(d.restore.bind(d)),--this.Wc)};this.transform=function(r){this.Gc.push(d.transform.bind(d,r))};this.align=function(r,w,x,z,E=1){this.Gc.push(d.align.bind(d,r,w,x,z,E))};this.flush=function(){console.assert(0==
|
|
10
|
+
this.Wc);e.add(this);d.Jd||c()};this.bindContext=function(){const r=this.Kd;r&&r.Pc&&ha(r.Pc)};this["delete"]=function(){}}function b(p,r=!1){var w={alpha:!0,depth:r,stencil:r,antialias:r,premultipliedAlpha:!0,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:!1,explicitSwapControl:0,renderViaOffscreenBackBuffer:0};r=p.getContext("webgl2",w);if(!r)return null;w=ia(r,w);ha(w);const x=f(p.width,p.height);x.Pc=w;x.uc=p;x.xd=p.width;x.wd=
|
|
11
|
+
p.height;x.Hc=r;x.me=function(){this.Pc&&ha(this.Pc)};var z=x.delete;x.delete=function(){this.me();z.call(this);var E=this.Pc;n===u[E]&&(n=null);"object"==typeof JSEvents&&JSEvents.sf(u[E].tc.canvas);u[E]?.tc.canvas&&(u[E].tc.canvas.ge=void 0);this.Pc=this.uc=this.xd=this.wd=this.Hc=u[E]=null};return x}function c(){if(d){var p=d.ke,r=0,w=0,x=0,z=Array(e.size),E=0;for(var H of e)H.Tc=Math.min(H.uc.width,p),H.Sc=Math.min(H.uc.height,p),H.ud=H.Sc*H.Tc,r=Math.max(r,H.Tc),w=Math.max(w,H.Sc),x+=H.ud,z[E++]=
|
|
12
|
+
H;e.clear();if(!(0>=x)){r=1<<(0>=r?0:32-Math.clz32(r-1));for(w=1<<(0>=w?0:32-Math.clz32(w-1));w*r<x;)r<=w?r*=2:w*=2;r=Math.min(r,p);r=Math.min(w,p);z.sort((U,ab)=>ab.ud-U.ud);x=new l.DynamicRectanizer(p);for(H=0;H<z.length;){x.reset(r,w);for(E=H;E<z.length;++E){var I=z[E],F=x.addRect(I.Tc,I.Sc);if(0>F){console.assert(E>H);break}I.cd=F&65535;I.dd=F>>16}I=k.push(x.drawWidth());F=m.push(x.drawHeight());console.assert(I>=x.drawWidth());console.assert(F>=x.drawHeight());console.assert(I<=p);console.assert(F<=
|
|
13
|
+
p);d.uc.width!=I&&(d.uc.width=I);d.uc.height!=F&&(d.uc.height=F);d.clear();for(I=H;I<E;++I){F=z[I];d.saveClipRect(F.cd,F.dd,F.cd+F.Tc,F.dd+F.Sc);let U=new l.Mat2D;U.xx=F.Tc/F.uc.width;U.yy=F.Sc/F.uc.height;U.xy=U.yx=0;U.tx=F.cd;U.ty=F.dd;d.transform(U);for(const ab of F.Gc)ab();d.restoreClipRect();F.Gc=[]}for(d.flush();H<E;++H)I=z[H],F=I.he,F.globalCompositeOperation="copy",F.drawImage(d.uc,I.cd,I.dd,I.Tc,I.Sc,0,0,I.uc.width,I.uc.height);H=E}}}}fa&&fa();let d=null;const e=new Set,f=l.makeRenderer;
|
|
14
|
+
l.makeRenderer=function(p,r){if(!d){function w(x){var z=document.createElement("canvas");z.width=1;z.height=1;d=b(z,x);if(!d)return null;d.Jd=!!d.Hc.getExtension("WEBGL_shader_pixel_local_storage");d.ke=Math.min(d.Hc.getParameter(d.Hc.MAX_RENDERBUFFER_SIZE),d.Hc.getParameter(d.Hc.MAX_TEXTURE_SIZE));d.vd=!d.Jd;if(x=d.Hc.getExtension("WEBGL_debug_renderer_info"))z=d.Hc.getParameter(x.UNMASKED_RENDERER_WEBGL),d.Hc.getParameter(x.UNMASKED_VENDOR_WEBGL).includes("Google")&&z.includes("ANGLE Metal Renderer")&&
|
|
15
|
+
(d.vd=!1);return d}d=w(!0);if(!d)throw"Unable to create WebGL context, your environment may not support WebGL. Try out @rive-app/canvas as an alternative.";d.vd||(d=w(!1))}return r?new a(p):b(p,d.vd)};const g=l.Artboard.prototype["delete"];l.Artboard.prototype["delete"]=function(){this.le=!0;g.call(this)};const h=l.Artboard.prototype.draw;l.Artboard.prototype.draw=function(p){p.Gc?p.Gc.push(()=>{this.le||h.call(this,p.Kd)}):h.call(this,p)};const k=new da,m=new da,q=new ca;l.requestAnimationFrame=
|
|
16
|
+
q.requestAnimationFrame.bind(q);l.cancelAnimationFrame=q.cancelAnimationFrame.bind(q);l.enableFPSCounter=q.se.bind(q);q.Vd=c;l.resolveAnimationFrame=c;let v=l.load;l.load=function(p,r,w=!0){const x=new l.FallbackFileAssetLoader;void 0!==r&&x.addLoader(r);w&&(r=new l.CDNFileAssetLoader,x.addLoader(r));return Promise.resolve(v(p,x))};const t=l.WebGL2Renderer.prototype.clear;l.WebGL2Renderer.prototype.clear=function(){ha(this.Pc);const p=this.uc;if(this.xd!=p.width||this.wd!=p.height)this.resize(p.width,
|
|
17
|
+
p.height),this.xd=p.width,this.wd=p.height;t.call(this)};l.decodeImage=function(p,r){p=l.decodeWebGL2Image(p);r(p)};let C=l.Renderer.prototype.align;l.Renderer.prototype.align=function(p,r,w,x,z=1){C.call(this,p,r,w,x,z)}};var ja="./this.program";ba&&(_scriptName=self.location.href);var ka="",la,ma;
|
|
18
|
+
if(aa||ba){try{ka=(new URL(".",_scriptName)).href}catch{}ba&&(ma=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});la=async a=>{if(na(a))return new Promise((c,d)=>{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=()=>{200==e.status||0==e.status&&e.response?c(e.response):d(e.status)};e.onerror=d;e.send(null)});var b=await fetch(a,{credentials:"same-origin"});if(b.ok)return b.arrayBuffer();throw Error(b.status+
|
|
19
|
+
" : "+b.url);}}var oa=console.log.bind(console),y=console.error.bind(console),pa,qa=!1,na=a=>a.startsWith("file://"),ra,sa,A,B,D,ta,G,J,ua,va,wa,xa,ya=!1;function za(){var a=Aa.buffer;l.HEAP8=A=new Int8Array(a);D=new Int16Array(a);l.HEAPU8=B=new Uint8Array(a);l.HEAPU16=ta=new Uint16Array(a);l.HEAP32=G=new Int32Array(a);l.HEAPU32=J=new Uint32Array(a);l.HEAPF32=ua=new Float32Array(a);va=new Float64Array(a);wa=new BigInt64Array(a);xa=new BigUint64Array(a)}
|
|
20
|
+
function Ba(a){l.onAbort?.(a);a="Aborted("+a+")";y(a);qa=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");sa?.(a);throw a;}var Ca;async function Da(a){if(!pa)try{var b=await la(a);return new Uint8Array(b)}catch{}if(a==Ca&&pa)a=new Uint8Array(pa);else if(ma)a=ma(a);else throw"both async and sync fetching of the wasm failed";return a}
|
|
21
|
+
async function Ea(a,b){try{var c=await Da(a);return await WebAssembly.instantiate(c,b)}catch(d){y(`failed to asynchronously prepare wasm: ${d}`),Ba(d)}}async function Fa(a){var b=Ca;if(!pa&&!na(b))try{var c=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(c,a)}catch(d){y(`wasm streaming compile failed: ${d}`),y("falling back to ArrayBuffer instantiation")}return Ea(b,a)}
|
|
22
|
+
var Ga=a=>{for(;0<a.length;)a.shift()(l)},Ha=[],Ia=[],Ja=()=>{var a=l.preRun.shift();Ia.push(a)},K=()=>{var a=G[+Ka>>2];Ka+=4;return a},La=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ma=a=>{var b="/"===a.charAt(0),c="/"===a.slice(-1);(a=La(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Na=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
|
|
23
|
+
a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.slice(0,-1);return a+b},Oa=()=>a=>crypto.getRandomValues(a),Pa=a=>{(Pa=Oa())(a)},Qa=(...a)=>{for(var b="",c=!1,d=a.length-1;-1<=d&&!c;d--){c=0<=d?a[d]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=La(b.split("/").filter(e=>!!e),!c).join("/");return(c?"/":"")+b||"."},Ra=globalThis.TextDecoder&&new TextDecoder,Sa=(a,b,c,d)=>{c=b+c;if(d)return c;for(;a[b]&&!(b>=c);)++b;
|
|
24
|
+
return b},L=(a,b=0,c,d)=>{c=Sa(a,b,c,d);if(16<c-b&&a.buffer&&Ra)return Ra.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|g:(e&7)<<18|f<<12|g<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d},Ta=[],Ua=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:
|
|
25
|
+
2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},Va=(a,b,c,d)=>{if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var g=a.codePointAt(f);if(127>=g){if(c>=d)break;b[c++]=g}else if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6;b[c++]=128|g&63}else if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12;b[c++]=128|g>>6&63;b[c++]=128|g&63}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>>12&63;b[c++]=128|g>>6&63;b[c++]=128|g&63;f++}}b[c]=0;return c-e},Wa=[];
|
|
26
|
+
function Xa(a,b){Wa[a]={input:[],output:[],Kc:b};Ya(a,Za)}
|
|
27
|
+
var Za={open(a){var b=Wa[a.node.rd];if(!b)throw new M(43);a.mc=b;a.seekable=!1},close(a){a.mc.Kc.gd(a.mc)},gd(a){a.mc.Kc.gd(a.mc)},read(a,b,c,d){if(!a.mc||!a.mc.Kc.Pd)throw new M(60);for(var e=0,f=0;f<d;f++){try{var g=a.mc.Kc.Pd(a.mc)}catch(h){throw new M(29);}if(void 0===g&&0===e)throw new M(6);if(null===g||void 0===g)break;e++;b[c+f]=g}e&&(a.node.Qc=Date.now());return e},write(a,b,c,d){if(!a.mc||!a.mc.Kc.Fd)throw new M(60);try{for(var e=0;e<d;e++)a.mc.Kc.Fd(a.mc,b[c+e])}catch(f){throw new M(29);
|
|
28
|
+
}d&&(a.node.Ac=a.node.xc=Date.now());return e}},$a={Pd(){a:{if(!Ta.length){var a=null;globalThis.window?.prompt&&(a=window.prompt("Input: "),null!==a&&(a+="\n"));if(!a){var b=null;break a}b=Array(Ua(a)+1);a=Va(a,b,0,b.length);b.length=a;Ta=b}b=Ta.shift()}return b},Fd(a,b){null===b||10===b?(oa(L(a.output)),a.output=[]):0!=b&&a.output.push(b)},gd(a){0<a.output?.length&&(oa(L(a.output)),a.output=[])},Fe(){return{bf:25856,df:5,af:191,cf:35387,$e:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,
|
|
29
|
+
0,0,0,0,0,0,0,0,0,0]}},Ge(){return 0},He(){return[24,80]}},bb={Fd(a,b){null===b||10===b?(y(L(a.output)),a.output=[]):0!=b&&a.output.push(b)},gd(a){0<a.output?.length&&(y(L(a.output)),a.output=[])}},N={Dc:null,Jc(){return N.createNode(null,"/",16895,0)},createNode(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new M(63);N.Dc||(N.Dc={dir:{node:{Nc:N.jc.Nc,Fc:N.jc.Fc,Yc:N.jc.Yc,od:N.jc.od,$d:N.jc.$d,ee:N.jc.ee,be:N.jc.be,Hd:N.jc.Hd,td:N.jc.td},stream:{Cc:N.hc.Cc}},file:{node:{Nc:N.jc.Nc,Fc:N.jc.Fc},
|
|
30
|
+
stream:{Cc:N.hc.Cc,read:N.hc.read,write:N.hc.write,Sd:N.hc.Sd,Ud:N.hc.Ud}},link:{node:{Nc:N.jc.Nc,Fc:N.jc.Fc,Zc:N.jc.Zc},stream:{}},Ld:{node:{Nc:N.jc.Nc,Fc:N.jc.Fc},stream:cb}});c=db(a,b,c,d);16384===(c.mode&61440)?(c.jc=N.Dc.dir.node,c.hc=N.Dc.dir.stream,c.ic={}):32768===(c.mode&61440)?(c.jc=N.Dc.file.node,c.hc=N.Dc.file.stream,c.qc=0,c.ic=null):40960===(c.mode&61440)?(c.jc=N.Dc.link.node,c.hc=N.Dc.link.stream):8192===(c.mode&61440)&&(c.jc=N.Dc.Ld.node,c.hc=N.Dc.Ld.stream);c.Qc=c.Ac=c.xc=Date.now();
|
|
31
|
+
a&&(a.ic[b]=c,a.Qc=a.Ac=a.xc=c.Qc);return c},jf(a){return a.ic?a.ic.subarray?a.ic.subarray(0,a.qc):new Uint8Array(a.ic):new Uint8Array(0)},jc:{Nc(a){var b={};b.ef=8192===(a.mode&61440)?a.id:1;b.lf=a.id;b.mode=a.mode;b.qf=1;b.uid=0;b.kf=0;b.rd=a.rd;16384===(a.mode&61440)?b.size=4096:32768===(a.mode&61440)?b.size=a.qc:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.Qc=new Date(a.Qc);b.Ac=new Date(a.Ac);b.xc=new Date(a.xc);b.ne=4096;b.Ze=Math.ceil(b.size/b.ne);return b},Fc(a,b){for(var c of["mode",
|
|
32
|
+
"atime","mtime","ctime"])null!=b[c]&&(a[c]=b[c]);void 0!==b.size&&(b=b.size,a.qc!=b&&(0==b?(a.ic=null,a.qc=0):(c=a.ic,a.ic=new Uint8Array(b),c&&a.ic.set(c.subarray(0,Math.min(b,a.qc))),a.qc=b)))},Yc(){N.zd||(N.zd=new M(44),N.zd.stack="<generic error, no stack>");throw N.zd;},od(a,b,c,d){return N.createNode(a,b,c,d)},$d(a,b,c){try{var d=eb(b,c)}catch(f){}if(d){if(16384===(a.mode&61440))for(var e in d.ic)throw new M(55);e=fb(d.parent.id,d.name);if(gb[e]===d)gb[e]=d.Uc;else for(e=gb[e];e;){if(e.Uc===
|
|
33
|
+
d){e.Uc=d.Uc;break}e=e.Uc}}delete a.parent.ic[a.name];b.ic[c]=a;a.name=c;b.xc=b.Ac=a.parent.xc=a.parent.Ac=Date.now()},ee(a,b){delete a.ic[b];a.xc=a.Ac=Date.now()},be(a,b){var c=eb(a,b),d;for(d in c.ic)throw new M(55);delete a.ic[b];a.xc=a.Ac=Date.now()},Hd(a){return[".","..",...Object.keys(a.ic)]},td(a,b,c){a=N.createNode(a,b,41471,0);a.link=c;return a},Zc(a){if(40960!==(a.mode&61440))throw new M(28);return a.link}},hc:{read(a,b,c,d,e){var f=a.node.ic;if(e>=a.node.qc)return 0;a=Math.min(a.node.qc-
|
|
34
|
+
e,d);if(8<a&&f.subarray)b.set(f.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=f[e+d];return a},write(a,b,c,d,e,f){b.buffer===A.buffer&&(f=!1);if(!d)return 0;a=a.node;a.Ac=a.xc=Date.now();if(b.subarray&&(!a.ic||a.ic.subarray)){if(f)return a.ic=b.subarray(c,c+d),a.qc=d;if(0===a.qc&&0===e)return a.ic=b.slice(c,c+d),a.qc=d;if(e+d<=a.qc)return a.ic.set(b.subarray(c,c+d),e),d}f=e+d;var g=a.ic?a.ic.length:0;g>=f||(f=Math.max(f,g*(1048576>g?2:1.125)>>>0),0!=g&&(f=Math.max(f,256)),g=a.ic,a.ic=new Uint8Array(f),
|
|
35
|
+
0<a.qc&&a.ic.set(g.subarray(0,a.qc),0));if(a.ic.subarray&&b.subarray)a.ic.set(b.subarray(c,c+d),e);else for(f=0;f<d;f++)a.ic[e+f]=b[c+f];a.qc=Math.max(a.qc,e+d);return d},Cc(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.qc);if(0>b)throw new M(28);return b},Sd(a,b,c,d,e){if(32768!==(a.node.mode&61440))throw new M(43);a=a.node.ic;if(e&2||!a||a.buffer!==A.buffer){d=!0;Ba();e=void 0;if(!e)throw new M(48);if(a){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,
|
|
36
|
+
c,c+b);A.set(a,e)}}else d=!1,e=a.byteOffset;return{lc:e,Ye:d}},Ud(a,b,c,d){N.hc.write(a,b,0,d,c,!1);return 0}}},hb=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},ib=null,jb={},kb=[],lb=1,gb=null,mb=!1,nb=!0,ob={},M=class{name="ErrnoError";constructor(a){this.Lc=a}},pb=class{fd={};node=null;get flags(){return this.fd.flags}set flags(a){this.fd.flags=a}get position(){return this.fd.position}set position(a){this.fd.position=a}},qb=class{jc={};hc={};pd=null;constructor(a,b,c,d){a||=this;this.parent=
|
|
37
|
+
a;this.Jc=a.Jc;this.id=lb++;this.name=b;this.mode=c;this.rd=d;this.Qc=this.Ac=this.xc=Date.now()}get read(){return 365===(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}};
|
|
38
|
+
function rb(a,b={}){if(!a)throw new M(44);b.Bd??(b.Bd=!0);"/"===a.charAt(0)||(a="//"+a);var c=0;a:for(;40>c;c++){a=a.split("/").filter(h=>!!h);for(var d=ib,e="/",f=0;f<a.length;f++){var g=f===a.length-1;if(g&&b.parent)break;if("."!==a[f])if(".."===a[f])if(e=Na(e),d===d.parent){a=e+"/"+a.slice(f+1).join("/");c--;continue a}else d=d.parent;else{e=Ma(e+"/"+a[f]);try{d=eb(d,a[f])}catch(h){if(44===h?.Lc&&g&&b.Le)return{path:e};throw h;}!d.pd||g&&!b.Bd||(d=d.pd.root);if(40960===(d.mode&61440)&&(!g||b.Ad)){if(!d.jc.Zc)throw new M(52);
|
|
39
|
+
d=d.jc.Zc(d);"/"===d.charAt(0)||(d=Na(e)+"/"+d);a=d+"/"+a.slice(f+1).join("/");continue a}}}return{path:e,node:d}}throw new M(32);}function fb(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%gb.length}function eb(a,b){var c=16384===(a.mode&61440)?(c=sb(a,"x"))?c:a.jc.Yc?0:2:54;if(c)throw new M(c);for(c=gb[fb(a.id,b)];c;c=c.Uc){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.jc.Yc(a,b)}
|
|
40
|
+
function db(a,b,c,d){a=new qb(a,b,c,d);b=fb(a.parent.id,a.name);a.Uc=gb[b];return gb[b]=a}function tb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function sb(a,b){if(nb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function ub(a,b){if(16384!==(a.mode&61440))return 54;try{return eb(a,b),20}catch(c){}return sb(a,"wx")}function vb(a){a=kb[a];if(!a)throw new M(8);return a}
|
|
41
|
+
function wb(a,b=-1){a=Object.assign(new pb,a);if(-1==b)a:{for(b=0;4096>=b;b++)if(!kb[b])break a;throw new M(33);}a.Mc=b;return kb[b]=a}function xb(a,b=-1){a=wb(a,b);a.hc?.hf?.(a);return a}function yb(a,b){var c=null?.hc.Fc,d=c?null:a;c??=a.jc.Fc;if(!c)throw new M(63);c(d,b)}var cb={open(a){a.hc=jb[a.node.rd].hc;a.hc.open?.(a)},Cc(){throw new M(70);}};function Ya(a,b){jb[a]={hc:b}}
|
|
42
|
+
function zb(a,b){var c="/"===b;if(c&&ib)throw new M(10);if(!c&&b){var d=rb(b,{Bd:!1});b=d.path;d=d.node;if(d.pd)throw new M(10);if(16384!==(d.mode&61440))throw new M(54);}b={type:a,rf:{},Td:b,Je:[]};a=a.Jc(b);a.Jc=b;b.root=a;c?ib=a:d&&(d.pd=b,d.Jc&&d.Jc.Je.push(b))}function Ab(a,b,c){var d=rb(a,{parent:!0}).node;a=a&&a.match(/([^\/]+|\/)\/*$/)[1];if(!a)throw new M(28);if("."===a||".."===a)throw new M(20);var e=ub(d,a);if(e)throw new M(e);if(!d.jc.od)throw new M(63);return d.jc.od(d,a,b,c)}
|
|
43
|
+
function O(a){return Ab(a,16895,0)}function Bb(a,b,c){"undefined"==typeof c&&(c=b,b=438);Ab(a,b|8192,c)}function Cb(a,b){if(!Qa(a))throw new M(44);var c=rb(b,{parent:!0}).node;if(!c)throw new M(44);b=b&&b.match(/([^\/]+|\/)\/*$/)[1];var d=ub(c,b);if(d)throw new M(d);if(!c.jc.td)throw new M(63);c.jc.td(c,b,a)}
|
|
44
|
+
function Db(a,b,c=438){if(""===a)throw new M(44);if("string"==typeof b){var d={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof d)throw Error(`Unknown file open mode: ${b}`);b=d}c=b&64?c&4095|32768:0;if("object"==typeof a)d=a;else{var e=a.endsWith("/");a=rb(a,{Ad:!(b&131072),Le:!0});d=a.node;a=a.path}var f=!1;if(b&64)if(d){if(b&128)throw new M(20);}else{if(e)throw new M(31);d=Ab(a,c|511,0);f=!0}if(!d)throw new M(44);8192===(d.mode&61440)&&(b&=-513);if(b&65536&&16384!==(d.mode&
|
|
45
|
+
61440))throw new M(54);if(!f&&(e=d?40960===(d.mode&61440)?32:16384===(d.mode&61440)&&("r"!==tb(b)||b&576)?31:sb(d,tb(b)):44))throw new M(e);if(b&512&&!f){e=d;e="string"==typeof e?rb(e,{Ad:!0}).node:e;if(16384===(e.mode&61440))throw new M(31);if(32768!==(e.mode&61440))throw new M(28);var g=sb(e,"w");if(g)throw new M(g);yb(e,{size:0,timestamp:Date.now()})}b&=-131713;a:for(e=d;;){if(e===e.parent){e=e.Jc.Td;var h=h?"/"!==e[e.length-1]?`${e}/${h}`:e+h:e;break a}h=h?`${e.name}/${h}`:e.name;e=e.parent}h=
|
|
46
|
+
wb({node:d,path:h,flags:b,seekable:!0,position:0,hc:d.hc,Se:[],error:!1});h.hc.open&&h.hc.open(h);f&&(c&=511,d="string"==typeof d?rb(d,{Ad:!0}).node:d,yb(d,{mode:c&4095|d.mode&-4096,xc:Date.now(),gf:void 0}));!l.logReadFiles||b&1||a in ob||(ob[a]=1);return h}function Eb(a,b,c){if(null===a.Mc)throw new M(8);if(!a.seekable||!a.hc.Cc)throw new M(70);if(0!=c&&1!=c&&2!=c)throw new M(28);a.position=a.hc.Cc(a,b,c);a.Se=[]}
|
|
47
|
+
function Fb(a,b,c){a=Ma("/dev/"+a);var d=hb(!!b,!!c);Fb.Rd??(Fb.Rd=64);var e=Fb.Rd++<<8|0;Ya(e,{open(f){f.seekable=!1},close(){c?.buffer?.length&&c(10)},read(f,g,h,k){for(var m=0,q=0;q<k;q++){try{var v=b()}catch(t){throw new M(29);}if(void 0===v&&0===m)throw new M(6);if(null===v||void 0===v)break;m++;g[h+q]=v}m&&(f.node.Qc=Date.now());return m},write(f,g,h,k){for(var m=0;m<k;m++)try{c(g[h+m])}catch(q){throw new M(29);}k&&(f.node.Ac=f.node.xc=Date.now());return m}});Bb(a,d,e)}
|
|
48
|
+
var Gb={},Ka=void 0,Hb=(a,b)=>Object.defineProperty(b,"name",{value:a}),Ib=[],Jb=[0,1,,1,null,1,!0,1,!1,1],P=class extends Error{constructor(a){super(a);this.name="BindingError"}},Q=a=>{if(!a)throw new P(`Cannot use deleted val. handle = ${a}`);return Jb[a]},Kb=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=Ib.pop()||Jb.length;Jb[b]=a;Jb[b+1]=1;return b}};class Lb extends Error{}
|
|
49
|
+
var R=a=>{for(var b="";;){var c=B[a++];if(!c)return b;b+=String.fromCharCode(c)}},Mb={},Nb=(a,b)=>{if(void 0===b)throw new P("ptr should not be undefined");for(;a.rc;)b=a.ad(b),a=a.rc;return b},Ob={},Rb=a=>{a=Pb(a);var b=R(a);Qb(a);return b},Sb=(a,b)=>{var c=Ob[a];if(void 0===c)throw a=`${b} has unknown type ${Rb(a)}`,new P(a);return c},Tb=()=>{},Ub=!1,Vb=a=>{if(!globalThis.FinalizationRegistry)return Vb=b=>b,a;Ub=new FinalizationRegistry(b=>{b=b.ec;--b.count.value;0===b.count.value&&(b.sc?b.yc.Ec(b.sc):
|
|
50
|
+
b.nc.fc.Ec(b.lc))});Vb=b=>{var c=b.ec;c.sc&&Ub.register(b,{ec:c},b);return b};Tb=b=>{Ub.unregister(b)};return Vb(a)},Wb={},Xb=a=>{for(;a.length;){var b=a.pop();a.pop()(b)}};function Yb(a){return this.kc(J[a>>2])}
|
|
51
|
+
var Zb={},$b={},ac=class extends Error{constructor(a){super(a);this.name="InternalError"}},T=(a,b,c)=>{function d(h){h=c(h);if(h.length!==a.length)throw new ac("Mismatched type converter count");for(var k=0;k<a.length;++k)S(a[k],h[k])}a.forEach(h=>$b[h]=b);var e=Array(b.length),f=[],g=0;for(let [h,k]of b.entries())Ob.hasOwnProperty(k)?e[h]=Ob[k]:(f.push(k),Zb.hasOwnProperty(k)||(Zb[k]=[]),Zb[k].push(()=>{e[h]=Ob[k];++g;g===f.length&&d(e)}));0===f.length&&d(e)};
|
|
52
|
+
function bc(a,b,c={}){var d=b.name;if(!a)throw new P(`type "${d}" must have a positive integer typeid pointer`);if(Ob.hasOwnProperty(a)){if(c.Ce)return;throw new P(`Cannot register type '${d}' twice`);}Ob[a]=b;delete $b[a];Zb.hasOwnProperty(a)&&(b=Zb[a],delete Zb[a],b.forEach(e=>e()))}function S(a,b,c={}){return bc(a,b,c)}
|
|
53
|
+
var cc=(a,b,c)=>{switch(b){case 1:return c?d=>A[d]:d=>B[d];case 2:return c?d=>D[d>>1]:d=>ta[d>>1];case 4:return c?d=>G[d>>2]:d=>J[d>>2];case 8:return c?d=>wa[d>>3]:d=>xa[d>>3];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},dc=a=>{throw new P(a.ec.nc.fc.name+" instance already deleted");},ec=[];function fc(){}
|
|
54
|
+
var gc={},hc=(a,b,c)=>{if(void 0===a[b].pc){var d=a[b];a[b]=function(...e){if(!a[b].pc.hasOwnProperty(e.length))throw new P(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${a[b].pc})!`);return a[b].pc[e.length].apply(this,e)};a[b].pc=[];a[b].pc[d.Ic]=d}},ic=(a,b,c)=>{if(l.hasOwnProperty(a)){if(void 0===c||void 0!==l[a].pc&&void 0!==l[a].pc[c])throw new P(`Cannot register public name '${a}' twice`);hc(l,a,a);if(l[a].pc.hasOwnProperty(c))throw new P(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
|
|
55
|
+
l[a].pc[c]=b}else l[a]=b,l[a].Ic=c},jc=a=>{a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a};function kc(a,b,c,d,e,f,g,h){this.name=a;this.constructor=b;this.Bc=c;this.Ec=d;this.rc=e;this.xe=f;this.ad=g;this.qe=h;this.Xd=[]}
|
|
56
|
+
var lc=(a,b,c)=>{for(;b!==c;){if(!b.ad)throw new P(`Expected null or instance of ${c.name}, got an instance of ${b.name}`);a=b.ad(a);b=b.rc}return a},mc=a=>{if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a};
|
|
57
|
+
function nc(a,b){if(null===b){if(this.Dd)throw new P(`null is not a valid ${this.name}`);return 0}if(!b.ec)throw new P(`Cannot pass "${mc(b)}" as a ${this.name}`);if(!b.ec.lc)throw new P(`Cannot pass deleted object as a pointer of type ${this.name}`);return lc(b.ec.lc,b.ec.nc.fc,this.fc)}
|
|
58
|
+
function oc(a,b){if(null===b){if(this.Dd)throw new P(`null is not a valid ${this.name}`);if(this.kd){var c=this.Gd();null!==a&&a.push(this.Ec,c);return c}return 0}if(!b||!b.ec)throw new P(`Cannot pass "${mc(b)}" as a ${this.name}`);if(!b.ec.lc)throw new P(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.jd&&b.ec.nc.jd)throw new P(`Cannot convert argument of type ${b.ec.yc?b.ec.yc.name:b.ec.nc.name} to parameter type ${this.name}`);c=lc(b.ec.lc,b.ec.nc.fc,this.fc);if(this.kd){if(void 0===
|
|
59
|
+
b.ec.sc)throw new P("Passing raw pointer to smart pointer is illegal");switch(this.Re){case 0:if(b.ec.yc===this)c=b.ec.sc;else throw new P(`Cannot convert argument of type ${b.ec.yc?b.ec.yc.name:b.ec.nc.name} to parameter type ${this.name}`);break;case 1:c=b.ec.sc;break;case 2:if(b.ec.yc===this)c=b.ec.sc;else{var d=b.clone();c=this.Ne(c,Kb(()=>d["delete"]()));null!==a&&a.push(this.Ec,c)}break;default:throw new P("Unsupported sharing policy");}}return c}
|
|
60
|
+
function pc(a,b){if(null===b){if(this.Dd)throw new P(`null is not a valid ${this.name}`);return 0}if(!b.ec)throw new P(`Cannot pass "${mc(b)}" as a ${this.name}`);if(!b.ec.lc)throw new P(`Cannot pass deleted object as a pointer of type ${this.name}`);if(b.ec.nc.jd)throw new P(`Cannot convert argument of type ${b.ec.nc.name} to parameter type ${this.name}`);return lc(b.ec.lc,b.ec.nc.fc,this.fc)}
|
|
61
|
+
var qc=(a,b,c)=>{if(b===c)return a;if(void 0===c.rc)return null;a=qc(a,b,c.rc);return null===a?null:c.qe(a)},rc=(a,b)=>{b=Nb(a,b);return Mb[b]},sc=(a,b)=>{if(!b.nc||!b.lc)throw new ac("makeClassHandle requires ptr and ptrType");if(!!b.yc!==!!b.sc)throw new ac("Both smartPtrType and smartPtr must be specified");b.count={value:1};return Vb(Object.create(a,{ec:{value:b,writable:!0}}))};
|
|
62
|
+
function tc(a,b,c,d,e,f,g,h,k,m,q){this.name=a;this.fc=b;this.Dd=c;this.jd=d;this.kd=e;this.Me=f;this.Re=g;this.Zd=h;this.Gd=k;this.Ne=m;this.Ec=q;e||void 0!==b.rc?this.oc=oc:(this.oc=d?nc:pc,this.vc=null)}var uc=(a,b,c)=>{if(!l.hasOwnProperty(a))throw new ac("Replacing nonexistent public symbol");void 0!==l[a].pc&&void 0!==c?l[a].pc[c]=b:(l[a]=b,l[a].Ic=c)},V=(a,b)=>{a=R(a);var c=vc.get(b);if("function"!=typeof c)throw new P(`unknown function pointer with signature ${a}: ${b}`);return c};
|
|
63
|
+
class wc extends Error{}var W=(a,b)=>{function c(f){e[f]||Ob[f]||($b[f]?$b[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};b.forEach(c);throw new wc(`${a}: `+d.map(Rb).join([", "]));};function xc(a){for(var b=1;b<a.length;++b)if(null!==a[b]&&void 0===a[b].vc)return!0;return!1}
|
|
64
|
+
function yc(a,b,c,d,e){var f=b.length;if(2>f)throw new P("argTypes array size mismatch! Must at least get return value and 'this' types!");var g=null!==b[1]&&null!==c,h=xc(b),k=!b[0].Ie,m=f-2,q=Array(m),v=[],t=[];return Hb(a,function(...C){t.length=0;v.length=g?2:1;v[0]=e;if(g){var p=b[1].oc(t,this);v[1]=p}for(var r=0;r<m;++r)q[r]=b[r+2].oc(t,C[r]),v.push(q[r]);C=d(...v);if(h)Xb(t);else for(r=g?1:2;r<b.length;r++){var w=1===r?p:q[r-2];null!==b[r].vc&&b[r].vc(w)}p=k?b[0].kc(C):void 0;return p})}
|
|
65
|
+
var zc=(a,b)=>{for(var c=[],d=0;d<a;d++)c.push(J[b+4*d>>2]);return c},Ac=a=>{a=a.trim();const b=a.indexOf("(");return-1===b?a:a.slice(0,b)},Bc=(a,b,c)=>{if(!(a instanceof Object))throw new P(`${c} with invalid "this": ${a}`);if(!(a instanceof b.fc.constructor))throw new P(`${c} incompatible with "this" of type ${a.constructor.name}`);if(!a.ec.lc)throw new P(`cannot call emscripten binding method ${c} on deleted object`);return lc(a.ec.lc,a.ec.nc.fc,b.fc)},Cc=a=>{9<a&&0===--Jb[a+1]&&(Jb[a]=void 0,
|
|
66
|
+
Ib.push(a))},Dc={name:"emscripten::val",kc:a=>{var b=Q(a);Cc(a);return b},oc:(a,b)=>Kb(b),wc:Yb,vc:null},Ec=(a,b,c)=>{switch(b){case 1:return c?function(d){return this.kc(A[d])}:function(d){return this.kc(B[d])};case 2:return c?function(d){return this.kc(D[d>>1])}:function(d){return this.kc(ta[d>>1])};case 4:return c?function(d){return this.kc(G[d>>2])}:function(d){return this.kc(J[d>>2])};default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},Fc=(a,b)=>{switch(b){case 4:return function(c){return this.kc(ua[c>>
|
|
67
|
+
2])};case 8:return function(c){return this.kc(va[c>>3])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}},Gc=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,Hc=(a,b,c)=>{a>>=1;b=Sa(ta,a,b/2,c);if(16<b-a&&Gc)return Gc.decode(ta.subarray(a,b));for(c="";a<b;++a)c+=String.fromCharCode(ta[a]);return c},Ic=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)D[b>>1]=a.charCodeAt(e),b+=2;D[b>>1]=0;return b-d},Jc=a=>2*a.length,Kc=
|
|
68
|
+
(a,b,c)=>{var d="";a>>=2;for(var e=0;!(e>=b/4);e++){var f=J[a+e];if(!f&&!c)break;d+=String.fromCodePoint(f)}return d},Lc=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var f=a.codePointAt(e);65535<f&&e++;G[b>>2]=f;b+=4;if(b+4>c)break}G[b>>2]=0;return b-d},Mc=a=>{for(var b=0,c=0;c<a.length;++c)65535<a.codePointAt(c)&&c++,b+=4;return b},Nc=[],Oc=a=>{var b=Nc.length;Nc.push(a);return b},Pc=(a,b)=>{for(var c=Array(a),d=0;d<a;++d)c[d]=Sb(J[b+4*d>>2],`parameter ${d}`);
|
|
69
|
+
return c},Qc={},Rc=a=>{var b=Qc[a];return void 0===b?R(a):b},Sc=[0,31,60,91,121,152,182,213,244,274,305,335],Tc=[0,31,59,90,120,151,181,212,243,273,304,334],Uc=[],Vc=a=>{a.ff=a.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")},Wc=a=>{a.pf=a.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")},X,Xc=a=>{var b="EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_clip_control EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_polygon_offset_clamp EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw WEBGL_polygon_mode".split(" ");
|
|
70
|
+
return(a.getSupportedExtensions()||[]).filter(c=>b.includes(c))},Yc=1,Zc=[],Y=[],$c=[],ad=[],bd=[],cd=[],dd=[],u=[],ed=[],fd={},gd=4,hd=0,jd=a=>{for(var b=Yc++,c=a.length;c<b;c++)a[c]=null;return b},kd=(a,b,c,d)=>{for(var e=0;e<a;e++){var f=X[c](),g=f&&jd(d);f?(f.name=g,d[g]=f):Z||=1282;G[b+4*e>>2]=g}},ia=(a,b)=>{var c=jd(u),d={handle:c,attributes:b,version:b.nf,tc:a};a.canvas&&(a.canvas.ge=d);u[c]=d;if("undefined"==typeof b.re||b.re)if((a=d)||(a=n),!a.De){a.De=!0;b=a.tc;b.Ke=b.getExtension("WEBGL_multi_draw");
|
|
71
|
+
b.ue=b.getExtension("EXT_polygon_offset_clamp");b.te=b.getExtension("EXT_clip_control");b.Te=b.getExtension("WEBGL_polygon_mode");Vc(b);Wc(b);2<=a.version&&(b.Nd=b.getExtension("EXT_disjoint_timer_query_webgl2"));if(2>a.version||!b.Nd)b.Nd=b.getExtension("EXT_disjoint_timer_query");for(var e of Xc(b))e.includes("lose_context")||e.includes("debug")||b.getExtension(e)}return c},ha=a=>{n=u[a];l.ctx=X=n?.tc;return!(a&&!X)},Z,n,ld={},nd=()=>{if(!md){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",
|
|
72
|
+
HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:ja||"./this.program"},b;for(b in ld)void 0===ld[b]?delete a[b]:a[b]=ld[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);md=c}return md},md,od=[],pd=()=>{var a=Xc(X);return a=a.concat(a.map(b=>"GL_"+b))},qd=(a,b)=>{if(b){var c=void 0;switch(a){case 36346:c=1;break;case 36344:return;case 34814:case 36345:c=0;break;case 34466:var d=X.getParameter(34467);c=d?d.length:0;break;case 33309:if(2>n.version){Z||=1282;return}c=
|
|
73
|
+
pd().length;break;case 33307:case 33308:if(2>n.version){Z||=1280;return}c=33307==a?3:0}if(void 0===c)switch(d=X.getParameter(a),typeof d){case "number":c=d;break;case "boolean":c=d?1:0;break;case "string":Z||=1280;return;case "object":if(null===d)switch(a){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:c=0;break;default:Z||=1280;return}else{if(d instanceof
|
|
74
|
+
Float32Array||d instanceof Uint32Array||d instanceof Int32Array||d instanceof Array){for(a=0;a<d.length;++a)G[b+4*a>>2]=d[a];return}try{c=d.name|0}catch(e){Z||=1280;y(`GL_INVALID_ENUM in glGet${0}v: Unknown object returned from WebGL getParameter(${a})! (error: ${e})`);return}}break;default:Z||=1280;y(`GL_INVALID_ENUM in glGet${0}v: Native code calling glGet${0}v(${a}) and it returns ${d} of type ${typeof d}!`);return}G[b>>2]=c}else Z||=1281},sd=a=>{var b=Ua(a)+1,c=rd(b);c&&Va(a,B,c,b);return c},
|
|
75
|
+
td=a=>"]"==a.slice(-1)&&a.lastIndexOf("["),ud=a=>{a-=5120;return 0==a?A:1==a?B:2==a?D:4==a?G:6==a?ua:5==a||28922==a||28520==a||30779==a||30782==a?J:ta};gb=Array(4096);zb(N,"/");O("/tmp");O("/home");O("/home/web_user");
|
|
76
|
+
(function(){O("/dev");Ya(259,{read:()=>0,write:(d,e,f,g)=>g,Cc:()=>0});Bb("/dev/null",259);Xa(1280,$a);Xa(1536,bb);Bb("/dev/tty",1280);Bb("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(Pa(a),b=a.byteLength);return a[--b]};Fb("random",c);Fb("urandom",c);O("/dev/shm");O("/dev/shm/tmp")})();
|
|
77
|
+
(function(){O("/proc");var a=O("/proc/self");O("/proc/self/fd");zb({Jc(){var b=db(a,"fd",16895,73);b.hc={Cc:N.hc.Cc};b.jc={Yc(c,d){c=+d;var e=vb(c);c={parent:null,Jc:{Td:"fake"},jc:{Zc:()=>e.path},id:c+1};return c.parent=c},Hd(){return Array.from(kb.entries()).filter(([,c])=>c).map(([c])=>c.toString())}};return b}},"/proc/self/fd")})();
|
|
78
|
+
(()=>{let a=fc.prototype;Object.assign(a,{isAliasOf:function(c){if(!(this instanceof fc&&c instanceof fc))return!1;var d=this.ec.nc.fc,e=this.ec.lc;c.ec=c.ec;var f=c.ec.nc.fc;for(c=c.ec.lc;d.rc;)e=d.ad(e),d=d.rc;for(;f.rc;)c=f.ad(c),f=f.rc;return d===f&&e===c},clone:function(){this.ec.lc||dc(this);if(this.ec.Vc)return this.ec.count.value+=1,this;var c=Vb,d=Object,e=d.create,f=Object.getPrototypeOf(this),g=this.ec;c=c(e.call(d,f,{ec:{value:{count:g.count,Xc:g.Xc,Vc:g.Vc,lc:g.lc,nc:g.nc,sc:g.sc,yc:g.yc}}}));
|
|
79
|
+
c.ec.count.value+=1;c.ec.Xc=!1;return c},["delete"](){this.ec.lc||dc(this);if(this.ec.Xc&&!this.ec.Vc)throw new P("Object already scheduled for deletion");Tb(this);var c=this.ec;--c.count.value;0===c.count.value&&(c.sc?c.yc.Ec(c.sc):c.nc.fc.Ec(c.lc));this.ec.Vc||(this.ec.sc=void 0,this.ec.lc=void 0)},isDeleted:function(){return!this.ec.lc},deleteLater:function(){this.ec.lc||dc(this);if(this.ec.Xc&&!this.ec.Vc)throw new P("Object already scheduled for deletion");ec.push(this);this.ec.Xc=!0;return this}});
|
|
80
|
+
const b=Symbol.dispose;b&&(a[b]=a["delete"])})();
|
|
81
|
+
Object.assign(tc.prototype,{ye(a){this.Zd&&(a=this.Zd(a));return a},Md(a){this.Ec?.(a)},wc:Yb,kc:function(a){function b(){return this.kd?sc(this.fc.Bc,{nc:this.Me,lc:c,yc:this,sc:a}):sc(this.fc.Bc,{nc:this,lc:a})}var c=this.ye(a);if(!c)return this.Md(a),null;var d=rc(this.fc,c);if(void 0!==d){if(0===d.ec.count.value)return d.ec.lc=c,d.ec.sc=a,d.clone();d=d.clone();this.Md(a);return d}d=this.fc.xe(c);d=gc[d];if(!d)return b.call(this);d=this.jd?d.oe:d.pointerType;var e=qc(c,this.fc,d.fc);return null===
|
|
82
|
+
e?b.call(this):this.kd?sc(d.fc.Bc,{nc:d,lc:e,yc:this,sc:a}):sc(d.fc.Bc,{nc:d,lc:e})}});for(let a=0;32>a;++a)od.push(Array(a));l.print&&(oa=l.print);l.printErr&&(y=l.printErr);l.wasmBinary&&(pa=l.wasmBinary);l.thisProgram&&(ja=l.thisProgram);if(l.preInit)for("function"==typeof l.preInit&&(l.preInit=[l.preInit]);0<l.preInit.length;)l.preInit.shift()();
|
|
83
|
+
var yd={324599:(a,b,c,d,e)=>{if("undefined"===typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if("undefined"===typeof window.miniaudio){window.miniaudio={referenceCount:0};window.miniaudio.device_type={};window.miniaudio.device_type.playback=a;window.miniaudio.device_type.capture=b;window.miniaudio.device_type.duplex=c;window.miniaudio.device_state={};window.miniaudio.device_state.stopped=d;window.miniaudio.device_state.started=e;let f=window.miniaudio;f.devices=
|
|
84
|
+
[];f.track_device=function(g){for(var h=0;h<f.devices.length;++h)if(null==f.devices[h])return f.devices[h]=g,h;f.devices.push(g);return f.devices.length-1};f.untrack_device_by_index=function(g){for(f.devices[g]=null;0<f.devices.length;)if(null==f.devices[f.devices.length-1])f.devices.pop();else break};f.untrack_device=function(g){for(var h=0;h<f.devices.length;++h)if(f.devices[h]==g)return f.untrack_device_by_index(h)};f.get_device_by_index=function(g){return f.devices[g]};f.unlock_event_types=["touchend",
|
|
85
|
+
"click"];f.unlock=function(){for(var g=0;g<f.devices.length;++g){var h=f.devices[g];null!=h&&null!=h.zc&&h.state===f.device_state.started&&h.zc.resume().then(()=>{vd(h.Wd)},k=>{console.error("Failed to resume audiocontext",k)})}f.unlock_event_types.map(function(k){document.removeEventListener(k,f.unlock,!0)})};f.unlock_event_types.map(function(g){document.addEventListener(g,f.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},326777:()=>{"undefined"!==typeof window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(a){document.removeEventListener(a,
|
|
86
|
+
window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},327081:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,327185:()=>{try{var a=new (window.AudioContext||window.webkitAudioContext),b=a.sampleRate;a.close();return b}catch(c){return 0}},327356:(a,b,c,d,e,f)=>{if("undefined"===typeof window.miniaudio)return-1;var g={},h={};a==window.miniaudio.device_type.playback&&0!=c&&(h.sampleRate=c);g.zc=
|
|
87
|
+
new (window.AudioContext||window.webkitAudioContext)(h);g.zc.suspend();g.state=window.miniaudio.device_state.stopped;c=0;a!=window.miniaudio.device_type.playback&&(c=b);g.Oc=g.zc.createScriptProcessor(d,c,b);g.Oc.onaudioprocess=function(k){if(null==g.hd||0==g.hd.length)g.hd=new Float32Array(ua.buffer,e,d*b);if(a==window.miniaudio.device_type.capture||a==window.miniaudio.device_type.duplex){for(var m=0;m<b;m+=1)for(var q=k.inputBuffer.getChannelData(m),v=g.hd,t=0;t<d;t+=1)v[t*b+m]=q[t];wd(f,d,e)}if(a==
|
|
88
|
+
window.miniaudio.device_type.playback||a==window.miniaudio.device_type.duplex)for(xd(f,d,e),m=0;m<k.outputBuffer.numberOfChannels;++m)for(q=k.outputBuffer.getChannelData(m),v=g.hd,t=0;t<d;t+=1)q[t]=v[t*b+m];else for(m=0;m<k.outputBuffer.numberOfChannels;++m)k.outputBuffer.getChannelData(m).fill(0)};a!=window.miniaudio.device_type.capture&&a!=window.miniaudio.device_type.duplex||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(k){g.sd=g.zc.createMediaStreamSource(k);g.sd.connect(g.Oc);
|
|
89
|
+
g.Oc.connect(g.zc.destination)}).catch(function(k){console.log("Failed to get user media: "+k)});a==window.miniaudio.device_type.playback&&g.Oc.connect(g.zc.destination);g.Wd=f;return window.miniaudio.track_device(g)},330233:a=>window.miniaudio.get_device_by_index(a).zc.sampleRate,330306:a=>{a=window.miniaudio.get_device_by_index(a);void 0!==a.Oc&&(a.Oc.onaudioprocess=function(){},a.Oc.disconnect(),a.Oc=void 0);void 0!==a.sd&&(a.sd.disconnect(),a.sd=void 0);a.zc.close();a.zc=void 0;a.Wd=void 0},330706:a=>
|
|
90
|
+
{window.miniaudio.untrack_device_by_index(a)},330756:a=>{a=window.miniaudio.get_device_by_index(a);a.zc.resume();a.state=window.miniaudio.device_state.started},330895:a=>{a=window.miniaudio.get_device_by_index(a);a.zc.suspend();a.state=window.miniaudio.device_state.stopped}},Qb,rd,Pb,vd,wd,xd,zd,Ad,Bd,Aa,vc,Dd={pa:function(a,b,c){Ka=c;try{var d=vb(a);switch(b){case 0:var e=K();if(0>e)break;for(;kb[e];)e++;return xb(d,e).Mc;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=K(),d.flags|=
|
|
91
|
+
e,0;case 12:return e=K(),D[e+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(f){if("undefined"==typeof Gb||"ErrnoError"!==f.name)throw f;return-f.Lc}},vb:function(a,b,c){Ka=c;try{var d=vb(a);switch(b){case 21509:return d.mc?0:-59;case 21505:if(!d.mc)return-59;if(d.mc.Kc.Fe){a=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var e=K();G[e>>2]=25856;G[e+4>>2]=5;G[e+8>>2]=191;G[e+12>>2]=35387;for(var f=0;32>f;f++)A[e+f+17]=a[f]||0}return 0;case 21510:case 21511:case 21512:return d.mc?
|
|
92
|
+
0:-59;case 21506:case 21507:case 21508:if(!d.mc)return-59;if(d.mc.Kc.Ge)for(e=K(),a=[],f=0;32>f;f++)a.push(A[e+f+17]);return 0;case 21519:if(!d.mc)return-59;e=K();return G[e>>2]=0;case 21520:return d.mc?-28:-59;case 21537:case 21531:e=K();if(!d.hc.Ee)throw new M(59);return d.hc.Ee(d,b,e);case 21523:if(!d.mc)return-59;d.mc.Kc.He&&(f=[24,80],e=K(),D[e>>1]=f[0],D[e+2>>1]=f[1]);return 0;case 21524:return d.mc?0:-59;case 21515:return d.mc?0:-59;default:return-28}}catch(g){if("undefined"==typeof Gb||"ErrnoError"!==
|
|
93
|
+
g.name)throw g;return-g.Lc}},wb:function(a,b,c,d){Ka=d;try{b=b?L(B,b):"";var e=b;if("/"===e.charAt(0))b=e;else{var f=-100===a?"/":vb(a).path;if(0==e.length)throw new M(44);b=f+"/"+e}var g=d?K():0;return Db(b,c,g).Mc}catch(h){if("undefined"==typeof Gb||"ErrnoError"!==h.name)throw h;return-h.Lc}},zb:()=>Ba(""),la:(a,b,c)=>{a=R(a);b=Sb(b,"wrapper");c=Q(c);var d=b.fc,e=d.Bc,f=d.rc.Bc,g=d.rc.constructor;a=Hb(a,function(...h){for(var k of d.rc.Xd)if(this[k]===f[k])throw new Lb(`Pure virtual function ${k} must be implemented in JavaScript`);
|
|
94
|
+
Object.defineProperty(this,"__parent",{value:e});this.__construct(...h)});e.__construct=function(...h){if(this===e)throw new P("Pass correct 'this' to __construct");h=g.implement(this,...h);Tb(h);var k=h.ec;h.notifyOnDestruction();k.Vc=!0;Object.defineProperties(this,{ec:{value:k}});Vb(this);h=k.lc;h=Nb(d,h);if(Mb.hasOwnProperty(h))throw new P(`Tried to register registered instance: ${h}`);Mb[h]=this};e.__destruct=function(){if(this===e)throw new P("Pass correct 'this' to __destruct");Tb(this);var h=
|
|
95
|
+
this.ec.lc;h=Nb(d,h);if(Mb.hasOwnProperty(h))delete Mb[h];else throw new P(`Tried to unregister unregistered instance: ${h}`);};a.prototype=Object.create(e);Object.assign(a.prototype,c);return Kb(a)},Cb:a=>{var b=Wb[a];delete Wb[a];var c=b.Gd,d=b.Ec,e=b.Od,f=e.map(g=>g.Be).concat(e.map(g=>g.Pe));T([a],f,g=>{var h={},k,m;for([k,m]of e.entries()){const q=g[k],v=m.ze,t=m.Ae,C=g[k+e.length],p=m.Oe,r=m.Qe;h[m.ve]={read:w=>q.kc(v(t,w)),write:(w,x)=>{var z=[];p(r,w,C.oc(z,x));Xb(z)},optional:q.optional}}return[{name:b.name,
|
|
96
|
+
kc:q=>{var v={},t;for(t in h)v[t]=h[t].read(q);d(q);return v},oc:(q,v)=>{for(var t in h)if(!(t in v||h[t].optional))throw new TypeError(`Missing field: "${t}"`);var C=c();for(t in h)h[t].write(C,v[t]);null!==q&&q.push(d,C);return C},wc:Yb,vc:d}]})},ia:(a,b,c,d,e)=>{b=R(b);d=0n===d;let f=g=>g;if(d){const g=8*c;f=h=>BigInt.asUintN(g,h);e=f(e)}S(a,{name:b,kc:f,oc:(g,h)=>{"number"==typeof h&&(h=BigInt(h));return h},wc:cc(b,c,!d),vc:null})},cb:(a,b,c,d)=>{b=R(b);S(a,{name:b,kc:function(e){return!!e},oc:function(e,
|
|
97
|
+
f){return f?c:d},wc:function(e){return this.kc(B[e])},vc:null})},c:(a,b,c,d,e,f,g,h,k,m,q,v,t)=>{q=R(q);f=V(e,f);h&&=V(g,h);m&&=V(k,m);t=V(v,t);var C=jc(q);ic(C,function(){W(`Cannot construct ${q} due to unbound types`,[d])});T([a,b,c],d?[d]:[],p=>{p=p[0];if(d){var r=p.fc;var w=r.Bc}else w=fc.prototype;p=Hb(q,function(...H){if(Object.getPrototypeOf(this)!==x)throw new P(`Use 'new' to construct ${q}`);if(void 0===z.Rc)throw new P(`${q} has no accessible constructor`);var I=z.Rc[H.length];if(void 0===
|
|
98
|
+
I)throw new P(`Tried to invoke ctor of ${q} with invalid number of parameters (${H.length}) - expected (${Object.keys(z.Rc).toString()}) parameters instead!`);return I.apply(this,H)});var x=Object.create(w,{constructor:{value:p}});p.prototype=x;var z=new kc(q,p,x,t,r,f,h,m);if(z.rc){var E;(E=z.rc).bd??(E.bd=[]);z.rc.bd.push(z)}r=new tc(q,z,!0,!1,!1);E=new tc(q+"*",z,!1,!1,!1);w=new tc(q+" const*",z,!1,!0,!1);gc[a]={pointerType:E,oe:w};uc(C,p);return[r,E,w]})},N:(a,b,c,d,e,f,g)=>{var h=zc(c,d);b=R(b);
|
|
99
|
+
b=Ac(b);f=V(e,f);T([],[a],k=>{function m(){W(`Cannot call ${q} due to unbound types`,h)}k=k[0];var q=`${k.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var v=k.fc.constructor;void 0===v[b]?(m.Ic=c-1,v[b]=m):(hc(v,b,q),v[b].pc[c-1]=m);T([],h,t=>{t=yc(q,[t[0],null].concat(t.slice(1)),null,f,g);void 0===v[b].pc?(t.Ic=c-1,v[b]=t):v[b].pc[c-1]=t;if(k.fc.bd)for(const C of k.fc.bd)C.constructor.hasOwnProperty(b)||(C.constructor[b]=t);return[]});return[]})},V:(a,b,c,d,e,f,g,h)=>{b=R(b);f=V(e,
|
|
100
|
+
f);T([],[a],k=>{k=k[0];var m=`${k.name}.${b}`,q={get(){W(`Cannot access ${m} due to unbound types`,[c])},enumerable:!0,configurable:!0};q.set=h?()=>{W(`Cannot access ${m} due to unbound types`,[c])}:()=>{throw new P(`${m} is a read-only property`);};Object.defineProperty(k.fc.constructor,b,q);T([],[c],v=>{v=v[0];var t={get(){return v.kc(f(d))},enumerable:!0};h&&(h=V(g,h),t.set=C=>{var p=[];h(d,v.oc(p,C));Xb(p)});Object.defineProperty(k.fc.constructor,b,t);return[]});return[]})},F:(a,b,c,d,e,f)=>{var g=
|
|
101
|
+
zc(b,c);e=V(d,e);T([],[a],h=>{h=h[0];var k=`constructor ${h.name}`;void 0===h.fc.Rc&&(h.fc.Rc=[]);if(void 0!==h.fc.Rc[b-1])throw new P(`Cannot register multiple constructors with identical number of parameters (${b-1}) for class '${h.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);h.fc.Rc[b-1]=()=>{W(`Cannot construct ${h.name} due to unbound types`,g)};T([],g,m=>{m.splice(1,0,null);h.fc.Rc[b-1]=yc(k,m,null,e,f);return[]});return[]})},a:(a,
|
|
102
|
+
b,c,d,e,f,g,h)=>{var k=zc(c,d);b=R(b);b=Ac(b);f=V(e,f);T([],[a],m=>{function q(){W(`Cannot call ${v} due to unbound types`,k)}m=m[0];var v=`${m.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);h&&m.fc.Xd.push(b);var t=m.fc.Bc,C=t[b];void 0===C||void 0===C.pc&&C.className!==m.name&&C.Ic===c-2?(q.Ic=c-2,q.className=m.name,t[b]=q):(hc(t,b,v),t[b].pc[c-2]=q);T([],k,p=>{p=yc(v,p,m,f,g);void 0===t[b].pc?(p.Ic=c-2,t[b]=p):t[b].pc[c-2]=p;return[]});return[]})},b:(a,b,c,d,e,f,g,h,k,m)=>{b=R(b);e=
|
|
103
|
+
V(d,e);T([],[a],q=>{q=q[0];var v=`${q.name}.${b}`,t={get(){W(`Cannot access ${v} due to unbound types`,[c,g])},enumerable:!0,configurable:!0};t.set=k?()=>W(`Cannot access ${v} due to unbound types`,[c,g]):()=>{throw new P(v+" is a read-only property");};Object.defineProperty(q.fc.Bc,b,t);T([],k?[c,g]:[c],C=>{var p=C[0],r={get(){var x=Bc(this,q,v+" getter");return p.kc(e(f,x))},enumerable:!0};if(k){k=V(h,k);var w=C[1];r.set=function(x){var z=Bc(this,q,v+" setter"),E=[];k(m,z,w.oc(E,x));Xb(E)}}Object.defineProperty(q.fc.Bc,
|
|
104
|
+
b,r);return[]});return[]})},$a:a=>S(a,Dc),ma:(a,b,c,d,e)=>{b=R(b);e=0===e?"object":1===e?"number":"string";switch(e){case "object":function g(){}g.values={};S(a,{name:b,constructor:g,valueType:e,kc:function(h){return this.constructor.values[h]},oc:(h,k)=>k.value,wc:Ec(b,c,d),vc:null});ic(b,g);break;case "number":var f={};S(a,{name:b,Ed:f,valueType:e,kc:h=>h,oc:(h,k)=>k,wc:Ec(b,c,d),vc:null});ic(b,f);delete l[b].Ic;break;case "string":f={},S(a,{name:b,fe:{},ae:{},Ed:f,valueType:e,kc:function(h){return this.ae[h]},
|
|
105
|
+
oc:function(h,k){return this.fe[k]},wc:Ec(b,c,d),vc:null}),ic(b,f),delete l[b].Ic}},k:(a,b,c)=>{var d=Sb(a,"enum");b=R(b);switch(d.valueType){case "object":a=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:Hb(`${d.name}_${b}`,function(){})}});a.values[c]=d;a[b]=d;break;case "number":d.Ed[b]=c;break;case "string":d.fe[b]=c,d.ae[c]=b,d.Ed[b]=b}},ha:(a,b,c)=>{b=R(b);S(a,{name:b,kc:d=>d,oc:(d,e)=>e,wc:Fc(b,c),vc:null})},j:(a,b,c,d,e,f)=>{var g=zc(b,c);a=R(a);
|
|
106
|
+
a=Ac(a);e=V(d,e);ic(a,function(){W(`Cannot call ${a} due to unbound types`,g)},b-1);T([],g,h=>{uc(a,yc(a,[h[0],null].concat(h.slice(1)),null,e,f),b-1);return[]})},v:(a,b,c,d,e)=>{b=R(b);let f=h=>h;if(0===d){var g=32-8*c;f=h=>h<<g>>>g;e=f(e)}S(a,{name:b,kc:f,oc:(h,k)=>k,wc:cc(b,c,0!==d),vc:null})},h:(a,b,c)=>{function d(f){return new e(A.buffer,J[f+4>>2],J[f>>2])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];c=R(c);
|
|
107
|
+
S(a,{name:c,kc:d,wc:d},{Ce:!0})},ab:(a,b)=>{b=R(b);S(a,{name:b,kc(c){var d=(d=c+4)?L(B,d,J[c>>2],!0):"";Qb(c);return d},oc(c,d){d instanceof ArrayBuffer&&(d=new Uint8Array(d));var e="string"==typeof d;if(!(e||ArrayBuffer.isView(d)&&1==d.BYTES_PER_ELEMENT))throw new P("Cannot pass non-string to std::string");var f=e?Ua(d):d.length;var g=rd(4+f+1),h=g+4;J[g>>2]=f;e?Va(d,B,h,f+1):B.set(d,h);null!==c&&c.push(Qb,g);return g},wc:Yb,vc(c){Qb(c)}})},S:(a,b,c)=>{c=R(c);if(2===b){var d=Hc;var e=Ic;var f=Jc}else d=
|
|
108
|
+
Kc,e=Lc,f=Mc;S(a,{name:c,kc:g=>{var h=d(g+4,J[g>>2]*b,!0);Qb(g);return h},oc:(g,h)=>{if("string"!=typeof h)throw new P(`Cannot pass non-string to C++ string type ${c}`);var k=f(h),m=rd(4+k+b);J[m>>2]=k/b;e(h,m+4,k+b);null!==g&&g.push(Qb,m);return m},wc:Yb,vc(g){Qb(g)}})},lb:(a,b,c,d,e,f)=>{Wb[a]={name:R(b),Gd:V(c,d),Ec:V(e,f),Od:[]}},kb:(a,b,c,d,e,f,g,h,k,m)=>{Wb[a].Od.push({ve:R(b),Be:c,ze:V(d,e),Ae:f,Pe:g,Oe:V(h,k),Qe:m})},db:(a,b)=>{b=R(b);S(a,{Ie:!0,name:b,kc:()=>{},oc:()=>{}})},ob:()=>{throw Infinity;
|
|
109
|
+
},m:(a,b,c)=>{var [d,...e]=Pc(a,b),f=d.oc.bind(d),g=e.map(k=>k.wc.bind(k));a--;var h=Array(a);b=`methodCaller<(${e.map(k=>k.name)}) => ${d.name}>`;return Oc(Hb(b,(k,m,q,v)=>{for(var t=0,C=0;C<a;++C)h[C]=g[C](v+t),t+=8;switch(c){case 0:var p=Q(k).apply(null,h);break;case 2:p=Reflect.construct(Q(k),h);break;case 3:p=h[0];break;case 1:p=Q(k)[Rc(m)](...h)}k=[];p=f(k,p);k.length&&(J[q>>2]=Kb(k));return p}))},jb:Cc,bb:(a,b)=>{a=Q(a);b=Q(b);return Kb(a[b])},ga:a=>{9<a&&(Jb[a+1]+=1)},l:(a,b,c,d,e)=>Nc[a](b,
|
|
110
|
+
c,d,e),gb:()=>Kb([]),ib:a=>Kb(Rc(a)),Ob:()=>Kb({}),Fa:a=>{var b=Q(a);Xb(b);Cc(a)},q:(a,b,c)=>{a=Q(a);b=Q(b);c=Q(c);a[b]=c},qb:function(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);G[b>>2]=a.getUTCSeconds();G[b+4>>2]=a.getUTCMinutes();G[b+8>>2]=a.getUTCHours();G[b+12>>2]=a.getUTCDate();G[b+16>>2]=a.getUTCMonth();G[b+20>>2]=a.getUTCFullYear()-1900;G[b+24>>2]=a.getUTCDay();G[b+28>>2]=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0},rb:function(a,b){a=
|
|
111
|
+
-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);G[b>>2]=a.getSeconds();G[b+4>>2]=a.getMinutes();G[b+8>>2]=a.getHours();G[b+12>>2]=a.getDate();G[b+16>>2]=a.getMonth();G[b+20>>2]=a.getFullYear()-1900;G[b+24>>2]=a.getDay();var c=a.getFullYear();G[b+28>>2]=(0!==c%4||0===c%100&&0!==c%400?Tc:Sc)[a.getMonth()]+a.getDate()-1|0;G[b+36>>2]=-(60*a.getTimezoneOffset());c=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var d=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();G[b+32>>
|
|
112
|
+
2]=(c!=d&&a.getTimezoneOffset()==Math.min(d,c))|0},sb:(a,b,c,d)=>{var e=(new Date).getFullYear(),f=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();J[a>>2]=60*Math.max(f,e);G[b>>2]=Number(f!=e);b=g=>{var h=Math.abs(g);return`UTC${0<=g?"-":"+"}${String(Math.floor(h/60)).padStart(2,"0")}${String(h%60).padStart(2,"0")}`};a=b(f);b=b(e);e<f?(Va(a,B,c,17),Va(b,B,d,17)):(Va(a,B,d,17),Va(b,B,c,17))},Ia:function(a,b,c){(a=u[a].tc.qd)&&a.beginPixelLocalStorageWEBGL(l.HEAPU32.subarray(c,
|
|
113
|
+
c+b))},yb:function(a,b,c){if(!(0<=a&&3>=a))return 28;wa[c>>3]=BigInt(Math.round(1E6*(0===a?Date.now():performance.now())));return 0},fb:function(a,b,c){var d=l.images;d||(d=new Map,l.images=d);var e=new Image;d.set(a,e);b=l.HEAP8.subarray(b,b+c);c=new Uint8Array(c);c.set(b);e.src=URL.createObjectURL(new Blob([c],{type:"image/png"}));e.onload=function(){l._setWebImage(a,e.width,e.height)}},eb:function(a){var b=l.images;b&&b.get(a)&&b.delete(a)},s:(a,b,c)=>{Uc.length=0;for(var d;d=B[b++];){var e=105!=
|
|
114
|
+
d;e&=112!=d;c+=e&&c%8?4:0;Uc.push(112==d?J[c>>2]:106==d?wa[c>>3]:105==d?G[c>>2]:va[c>>3]);c+=e?8:4}return yd[a](...Uc)},xb:()=>Date.now(),Xa:()=>performance.now(),pb:a=>{var b=B.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);a:{d=(Math.min(2147483648,65536*Math.ceil(Math.max(a,d)/65536))-Aa.buffer.byteLength+65535)/65536|0;try{Aa.grow(d);za();var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},t:(a,b)=>{a=u[a];b=b?L(B,b):"";b.startsWith("GL_")&&
|
|
115
|
+
(b=b.slice(3));"WEBGL_draw_instanced_base_vertex_base_instance"==b&&Vc(X);"WEBGL_multi_draw_instanced_base_vertex_base_instance"==b&&Wc(X);"WEBGL_multi_draw"==b&&(X.Ke=X.getExtension("WEBGL_multi_draw"));"EXT_polygon_offset_clamp"==b&&(X.ue=X.getExtension("EXT_polygon_offset_clamp"));"EXT_clip_control"==b&&(X.te=X.getExtension("EXT_clip_control"));"WEBGL_polygon_mode"==b&&(X.Te=X.getExtension("WEBGL_polygon_mode"));return!!a.tc.getExtension(b)},f:()=>n?n.handle:0,ja:a=>ha(a)?0:-5,Ga:function(a){a=
|
|
116
|
+
u[a].tc;a.Yd=a.getExtension("WEBGL_provoking_vertex");return!!a.Yd},La:function(a){a=u[a].tc;const b=a.getExtension("WEBGL_shader_pixel_local_storage");if(b&&b.isCoherent()){if(5==b.framebufferTexturePixelLocalStorageWEBGL.length)return a.qd=b,!0;console.warn("WEBGL_shader_pixel_local_storage is advertised, but a deprecated version has been detected. Disabling.")}return!1},Ha:function(a,b,c){(a=u[a].tc.qd)&&a.endPixelLocalStorageWEBGL(l.HEAPU32.subarray(c,c+b))},mb:(a,b)=>{var c=0,d=0,e;for(e of nd()){var f=
|
|
117
|
+
b+c;J[a+d>>2]=f;c+=Va(e,B,f,Infinity)+1;d+=4}return 0},nb:(a,b)=>{var c=nd();J[a>>2]=c.length;a=0;for(var d of c)a+=Ua(d)+1;J[b>>2]=a;return 0},na:function(a){try{var b=vb(a);if(null===b.Mc)throw new M(8);b.Cd&&(b.Cd=null);try{b.hc.close&&b.hc.close(b)}catch(c){throw c;}finally{kb[b.Mc]=null}b.Mc=null;return 0}catch(c){if("undefined"==typeof Gb||"ErrnoError"!==c.name)throw c;return c.Lc}},ub:function(a,b,c,d){try{a:{var e=vb(a);a=b;for(var f,g=b=0;g<c;g++){var h=J[a>>2],k=J[a+4>>2];a+=8;var m=e,q=
|
|
118
|
+
h,v=k,t=f,C=A;if(0>v||0>t)throw new M(28);if(null===m.Mc)throw new M(8);if(1===(m.flags&2097155))throw new M(8);if(16384===(m.node.mode&61440))throw new M(31);if(!m.hc.read)throw new M(28);var p="undefined"!=typeof t;if(!p)t=m.position;else if(!m.seekable)throw new M(70);var r=m.hc.read(m,C,q,v,t);p||(m.position+=r);var w=r;if(0>w){var x=-1;break a}b+=w;if(w<k)break;"undefined"!=typeof f&&(f+=w)}x=b}J[d>>2]=x;return 0}catch(z){if("undefined"==typeof Gb||"ErrnoError"!==z.name)throw z;return z.Lc}},
|
|
119
|
+
tb:function(a,b,c,d){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var e=vb(a);Eb(e,b,c);wa[d>>3]=BigInt(e.position);e.Cd&&0===b&&0===c&&(e.Cd=null);return 0}catch(f){if("undefined"==typeof Gb||"ErrnoError"!==f.name)throw f;return f.Lc}},oa:function(a,b,c,d){try{a:{var e=vb(a);a=b;for(var f,g=b=0;g<c;g++){var h=J[a>>2],k=J[a+4>>2];a+=8;var m=e,q=h,v=k,t=f,C=A;if(0>v||0>t)throw new M(28);if(null===m.Mc)throw new M(8);if(0===(m.flags&2097155))throw new M(8);if(16384===
|
|
120
|
+
(m.node.mode&61440))throw new M(31);if(!m.hc.write)throw new M(28);m.seekable&&m.flags&1024&&Eb(m,0,2);var p="undefined"!=typeof t;if(!p)t=m.position;else if(!m.seekable)throw new M(70);var r=m.hc.write(m,C,q,v,t,void 0);p||(m.position+=r);var w=r;if(0>w){var x=-1;break a}b+=w;if(w<k)break;"undefined"!=typeof f&&(f+=w)}x=b}J[d>>2]=x;return 0}catch(z){if("undefined"==typeof Gb||"ErrnoError"!==z.name)throw z;return z.Lc}},Ja:function(a,b,c,d,e,f){(a=u[a].tc.qd)&&a.framebufferPixelLocalClearValuefvWEBGL(b,
|
|
121
|
+
[c,d,e,f])},Ka:function(a,b,c,d,e,f){(a=u[a].tc.qd)&&a.framebufferTexturePixelLocalStorageWEBGL(b,bd[c],d,e,f)},e:a=>X.activeTexture(a),E:(a,b)=>{X.attachShader(Y[a],cd[b])},M:(a,b)=>{35051==a?X.yd=b:35052==a&&(X.ed=b);X.bindBuffer(a,Zc[b])},va:(a,b,c,d,e)=>{X.bindBufferRange(a,b,Zc[c],d,e)},i:(a,b)=>{X.bindFramebuffer(a,$c[b])},sa:(a,b)=>{X.bindRenderbuffer(a,ad[b])},Kb:(a,b)=>{X.bindSampler(a,ed[b])},d:(a,b)=>{X.bindTexture(a,bd[b])},Na:a=>{X.bindVertexArray(dd[a])},g:a=>X.blendEquation(a),L:(a,
|
|
122
|
+
b)=>X.blendFunc(a,b),Y:(a,b,c,d,e,f,g,h,k,m)=>X.blitFramebuffer(a,b,c,d,e,f,g,h,k,m),y:(a,b,c,d)=>{c&&b?X.bufferData(a,B,d,c,b):X.bufferData(a,b,d)},ya:(a,b,c,d)=>{c&&X.bufferSubData(a,b,B,d,c)},Db:a=>X.clear(a),Gb:(a,b,c)=>{X.clearBufferfv(a,b,ua,c>>2)},Fb:(a,b,c)=>{X.clearBufferuiv(a,b,J,c>>2)},Eb:(a,b,c,d)=>X.clearColor(a,b,c,d),Ua:a=>X.clearDepth(a),Ta:a=>X.clearStencil(a),fa:(a,b,c,d)=>{X.colorMask(!!a,!!b,!!c,!!d)},za:a=>{X.compileShader(cd[a])},Jb:(a,b,c,d,e,f,g,h,k)=>{X.ed||!h?X.compressedTexSubImage2D(a,
|
|
123
|
+
b,c,d,e,f,g,h,k):X.compressedTexSubImage2D(a,b,c,d,e,f,g,B,k,h)},H:()=>{var a=jd(Y),b=X.createProgram();b.name=a;b.nd=b.ld=b.md=0;b.Id=1;Y[a]=b;return a},Ba:a=>{var b=jd(cd);cd[b]=X.createShader(a);return b},Ra:a=>X.cullFace(a),$:(a,b)=>{for(var c=0;c<a;c++){var d=G[b+4*c>>2],e=Zc[d];e&&(X.deleteBuffer(e),e.name=0,Zc[d]=null,d==X.yd&&(X.yd=0),d==X.ed&&(X.ed=0))}},Da:(a,b)=>{for(var c=0;c<a;++c){var d=G[b+4*c>>2],e=$c[d];e&&(X.deleteFramebuffer(e),e.name=0,$c[d]=null)}},aa:a=>{if(a){var b=Y[a];b?(X.deleteProgram(b),
|
|
124
|
+
b.name=0,Y[a]=null):Z||=1281}},Ca:(a,b)=>{for(var c=0;c<a;c++){var d=G[b+4*c>>2],e=ad[d];e&&(X.deleteRenderbuffer(e),e.name=0,ad[d]=null)}},_:a=>{if(a){var b=cd[a];b?(X.deleteShader(b),cd[a]=null):Z||=1281}},z:(a,b)=>{for(var c=0;c<a;c++){var d=G[b+4*c>>2],e=bd[d];e&&(X.deleteTexture(e),e.name=0,bd[d]=null)}},Ma:(a,b)=>{for(var c=0;c<a;c++){var d=G[b+4*c>>2];X.deleteVertexArray(dd[d]);dd[d]=null}},Va:a=>X.depthFunc(a),ea:a=>{X.depthMask(!!a)},Wa:(a,b)=>X.depthRange(a,b),n:a=>X.disable(a),G:(a,b,c)=>
|
|
125
|
+
{X.drawArrays(a,b,c)},Hb:(a,b,c,d)=>{X.drawArraysInstanced(a,b,c,d)},xa:(a,b)=>{for(var c=od[a],d=0;d<a;d++)c[d]=G[b+4*d>>2];X.drawBuffers(c)},O:(a,b,c,d,e)=>{X.drawElementsInstanced(a,b,c,d,e)},A:a=>X.enable(a),r:a=>{X.enableVertexAttribArray(a)},Lb:()=>X.finish(),ua:()=>X.flush(),qa:(a,b,c,d)=>{X.framebufferRenderbuffer(a,b,c,ad[d])},w:(a,b,c,d,e)=>{X.framebufferTexture2D(a,b,c,bd[d],e)},R:a=>X.frontFace(a),W:(a,b)=>{kd(a,b,"createBuffer",Zc)},Mb:(a,b)=>{kd(a,b,"createFramebuffer",$c)},Bb:(a,b)=>
|
|
126
|
+
{kd(a,b,"createRenderbuffer",ad)},B:(a,b)=>{kd(a,b,"createTexture",bd)},Nb:(a,b)=>{kd(a,b,"createVertexArray",dd)},ka:a=>X.generateMipmap(a),T:(a,b)=>qd(a,b),wa:(a,b,c)=>{if(c)if(a>=Yc)Z||=1281;else if(a=Y[a],35716==b)a=X.getProgramInfoLog(a),null===a&&(a="(unknown error)"),G[c>>2]=a.length+1;else if(35719==b){if(!a.nd){var d=X.getProgramParameter(a,35718);for(b=0;b<d;++b)a.nd=Math.max(a.nd,X.getActiveUniform(a,b).name.length+1)}G[c>>2]=a.nd}else if(35722==b){if(!a.ld)for(d=X.getProgramParameter(a,
|
|
127
|
+
35721),b=0;b<d;++b)a.ld=Math.max(a.ld,X.getActiveAttrib(a,b).name.length+1);G[c>>2]=a.ld}else if(35381==b){if(!a.md)for(d=X.getProgramParameter(a,35382),b=0;b<d;++b)a.md=Math.max(a.md,X.getActiveUniformBlockName(a,b).length+1);G[c>>2]=a.md}else G[c>>2]=X.getProgramParameter(a,b);else Z||=1281},ta:a=>{var b=fd[a];if(!b){switch(a){case 7939:b=sd(pd().join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=X.getParameter(a))||(Z||=1280);b=b?sd(b):0;break;case 7938:b=sd(`OpenGL ES 3.0 (${X.getParameter(7938)})`);
|
|
128
|
+
break;case 35724:b=X.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b=`OpenGL ES GLSL ES ${c[1]} (${b})`);b=sd(b);break;default:Z||=1280}fd[a]=b}return b},K:(a,b)=>X.getUniformBlockIndex(Y[a],b?L(B,b):""),Q:(a,b)=>{b=b?L(B,b):"";if(a=Y[a]){var c=a,d=c.$c,e=c.de,f;if(!d){c.$c=d={};c.ce={};var g=X.getProgramParameter(c,35718);for(f=0;f<g;++f){var h=X.getActiveUniform(c,f);var k=h.name;h=h.size;var m=td(k);m=0<m?k.slice(0,m):k;
|
|
129
|
+
var q=c.Id;c.Id+=h;e[m]=[h,q];for(k=0;k<h;++k)d[q]=k,c.ce[q++]=m}}c=a.$c;d=0;e=b;f=td(b);0<f&&(d=parseInt(b.slice(f+1))>>>0,e=b.slice(0,f));if((e=a.de[e])&&d<e[0]&&(d+=e[1],c[d]=c[d]||X.getUniformLocation(a,b)))return d}else Z||=1281;return-1},C:(a,b,c)=>{for(var d=od[b],e=0;e<b;e++)d[e]=G[c+4*e>>2];X.invalidateFramebuffer(a,d)},Z:a=>{a=Y[a];X.linkProgram(a);a.$c=0;a.de={}},x:(a,b)=>{3317==a?gd=b:3314==a&&(hd=b);X.pixelStorei(a,b)},Ib:(a,b,c,d,e,f,g)=>{if(X.yd)X.readPixels(a,b,c,d,e,f,g);else{var h=
|
|
130
|
+
ud(f);g>>>=31-Math.clz32(h.BYTES_PER_ELEMENT);X.readPixels(a,b,c,d,e,f,h,g)}},ra:(a,b,c,d,e)=>X.renderbufferStorageMultisample(a,b,c,d,e),Sa:(a,b,c,d)=>X.scissor(a,b,c,d),Aa:(a,b,c,d)=>{for(var e="",f=0;f<b;++f){var g=(g=J[c+4*f>>2])?L(B,g,d?J[d+4*f>>2]:void 0):"";e+=g}X.shaderSource(cd[a],e)},Qa:(a,b,c)=>X.stencilFunc(a,b,c),ca:(a,b,c,d)=>X.stencilFuncSeparate(a,b,c,d),da:a=>X.stencilMask(a),Pa:(a,b,c)=>X.stencilOp(a,b,c),ba:(a,b,c,d)=>X.stencilOpSeparate(a,b,c,d),p:(a,b,c)=>X.texParameteri(a,b,
|
|
131
|
+
c),o:(a,b,c,d,e)=>X.texStorage2D(a,b,c,d,e),Ab:(a,b,c,d,e,f)=>X.texStorage3D(a,b,c,d,e,f),D:(a,b,c,d,e,f,g,h,k)=>{if(X.ed)X.texSubImage2D(a,b,c,d,e,f,g,h,k);else if(k){var m=ud(h);X.texSubImage2D(a,b,c,d,e,f,g,h,m,k>>>31-Math.clz32(m.BYTES_PER_ELEMENT))}else{if(k){m=ud(h);var q=f*((hd||e)*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[g-6402]||1)*m.BYTES_PER_ELEMENT+gd-1&-gd);k=m.subarray(k>>>31-Math.clz32(m.BYTES_PER_ELEMENT),k+q>>>31-Math.clz32(m.BYTES_PER_ELEMENT))}else k=null;
|
|
132
|
+
X.texSubImage2D(a,b,c,d,e,f,g,h,k)}},X:(a,b)=>{var c=X,d=c.uniform1i;var e=X.pe;if(e){var f=e.$c[a];"number"==typeof f&&(e.$c[a]=f=X.getUniformLocation(e,e.ce[a]+(0<f?`[${f}]`:"")));a=f}else Z||=1282,a=void 0;d.call(c,a,b)},J:(a,b,c)=>{a=Y[a];X.uniformBlockBinding(a,b,c)},Oa:a=>{a=Y[a];X.useProgram(a);X.pe=a},I:(a,b)=>{X.vertexAttribDivisor(a,b)},U:(a,b,c,d,e)=>{X.vertexAttribIPointer(a,b,c,d,e)},u:(a,b,c,d,e,f)=>{X.vertexAttribPointer(a,b,c,!!d,e,f)},P:(a,b,c,d)=>X.viewport(a,b,c,d),Ya:Cd,Za:function(){return-1<
|
|
133
|
+
navigator.platform.indexOf("Win")},Ea:function(a,b){(a=u[a].tc.Yd)&&a.provokingVertexWEBGL(b)},hb:function(a,b){var c=l.images;c&&(b=c.get(b))&&(a=u[a].tc,a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1))},_a:function(a,b,c){b=l.HEAP8.subarray(b,b+c);c=new Uint8Array(c);c.set(b);createImageBitmap(new Blob([c])).then(function(d){var e=(new OffscreenCanvas(d.width,d.height)).getContext("2d");
|
|
134
|
+
e.drawImage(d,0,0);e=e.getImageData(0,0,d.width,d.height);var f=e.data.length,g=l.je(f);l.Ue.set(e.data,g);l.We(a,d.width,d.height,g,f)}).catch(function(d){d=d.message||"decode failed";var e=l.mf(d)+1,f=l.je(e);l.tf(d,f,e);l.Xe(a,f);l.Ve(f)})}};function Cd(a,b,c){var d=Bd();try{vc.get(a)(b,c)}catch(e){Ad(d);if(e!==e+0)throw e;zd(1,0)}}var Ed;
|
|
135
|
+
Ed=await (async function(){function a(c){c=Ed=c.exports;Qb=c.Sb;rd=c.Tb;l._setWebImage=c.Ub;Pb=c.Vb;l._wasm_image_decode_complete=c.Wb;l._wasm_image_decode_error=c.Xb;vd=l._ma_device__on_notification_unlocked=c.Yb;l._ma_malloc_emscripten=c.Zb;l._ma_free_emscripten=c._b;wd=l._ma_device_process_pcm_frames_capture__webaudio=c.$b;xd=l._ma_device_process_pcm_frames_playback__webaudio=c.ac;zd=c.bc;Ad=c.cc;Bd=c.dc;Aa=c.Pb;vc=c.Rb;za();return Ed}var b={a:Dd};if(l.instantiateWasm)return new Promise(c=>
|
|
136
|
+
{l.instantiateWasm(b,(d,e)=>{c(a(d,e))})});Ca??=l.locateFile?l.locateFile("webgl2_advanced.wasm",ka):ka+"webgl2_advanced.wasm";return a((await Fa(b)).instance)}());
|
|
137
|
+
(function(){function a(){l.calledRun=!0;if(!qa){ya=!0;if(!l.noFSInit&&!mb){var b,c;mb=!0;b??=l.stdin;c??=l.stdout;d??=l.stderr;b?Fb("stdin",b):Cb("/dev/tty","/dev/stdin");c?Fb("stdout",null,c):Cb("/dev/tty","/dev/stdout");d?Fb("stderr",null,d):Cb("/dev/tty1","/dev/stderr");Db("/dev/stdin",0);Db("/dev/stdout",1);Db("/dev/stderr",1)}Ed.Qb();nb=!1;ra?.(l);l.onRuntimeInitialized?.();if(l.postRun)for("function"==typeof l.postRun&&(l.postRun=[l.postRun]);l.postRun.length;){var d=l.postRun.shift();Ha.push(d)}Ga(Ha)}}
|
|
138
|
+
if(l.preRun)for("function"==typeof l.preRun&&(l.preRun=[l.preRun]);l.preRun.length;)Ja();Ga(Ia);l.setStatus?(l.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>l.setStatus(""),1);a()},1)):a()})();ya?moduleRtn=l:moduleRtn=new Promise((a,b)=>{ra=a;sa=b});
|
|
139
|
+
;return moduleRtn}})();
|
|
3566
140
|
export default Rive;
|