glassjar 0.3.1 → 0.4.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/README.md +1 -1
- package/dist/assets/{worker-BgBM-gEP.js → worker-KgNayWZL.js} +91 -91
- package/dist/engine_bg.wasm +0 -0
- package/dist/glassjar.js +303 -303
- package/dist/glassjar.umd.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/glassjar.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
function
|
|
1
|
+
function JA(Q) {
|
|
2
2
|
return Q && Q.__esModule && Object.prototype.hasOwnProperty.call(Q, "default") ? Q.default : Q;
|
|
3
3
|
}
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (CA) return
|
|
4
|
+
var l = { exports: {} }, CA;
|
|
5
|
+
function UA() {
|
|
6
|
+
if (CA) return l.exports;
|
|
7
7
|
CA = 1;
|
|
8
|
-
var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(E, o,
|
|
9
|
-
return Function.prototype.apply.call(E, o,
|
|
8
|
+
var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(E, o, F) {
|
|
9
|
+
return Function.prototype.apply.call(E, o, F);
|
|
10
10
|
}, g;
|
|
11
11
|
Q && typeof Q.ownKeys == "function" ? g = Q.ownKeys : Object.getOwnPropertySymbols ? g = function(E) {
|
|
12
12
|
return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E));
|
|
@@ -22,7 +22,7 @@ function JA() {
|
|
|
22
22
|
function B() {
|
|
23
23
|
B.init.call(this);
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
l.exports = B, l.exports.once = KA, B.EventEmitter = B, B.prototype._events = void 0, B.prototype._eventsCount = 0, B.prototype._maxListeners = void 0;
|
|
26
26
|
var i = 10;
|
|
27
27
|
function D(w) {
|
|
28
28
|
if (typeof w != "function")
|
|
@@ -51,93 +51,93 @@ function JA() {
|
|
|
51
51
|
B.prototype.getMaxListeners = function() {
|
|
52
52
|
return N(this);
|
|
53
53
|
}, B.prototype.emit = function(E) {
|
|
54
|
-
for (var o = [],
|
|
54
|
+
for (var o = [], F = 1; F < arguments.length; F++) o.push(arguments[F]);
|
|
55
55
|
var M = E === "error", R = this._events;
|
|
56
56
|
if (R !== void 0)
|
|
57
57
|
M = M && R.error === void 0;
|
|
58
58
|
else if (!M)
|
|
59
59
|
return !1;
|
|
60
60
|
if (M) {
|
|
61
|
-
var
|
|
62
|
-
if (o.length > 0 && (
|
|
63
|
-
throw
|
|
64
|
-
var
|
|
65
|
-
throw
|
|
61
|
+
var G;
|
|
62
|
+
if (o.length > 0 && (G = o[0]), G instanceof Error)
|
|
63
|
+
throw G;
|
|
64
|
+
var H = new Error("Unhandled error." + (G ? " (" + G.message + ")" : ""));
|
|
65
|
+
throw H.context = G, H;
|
|
66
66
|
}
|
|
67
|
-
var
|
|
68
|
-
if (
|
|
67
|
+
var V = R[E];
|
|
68
|
+
if (V === void 0)
|
|
69
69
|
return !1;
|
|
70
|
-
if (typeof
|
|
71
|
-
A(
|
|
70
|
+
if (typeof V == "function")
|
|
71
|
+
A(V, this, o);
|
|
72
72
|
else
|
|
73
|
-
for (var IA =
|
|
74
|
-
A(YA[
|
|
73
|
+
for (var IA = V.length, YA = Z(V, IA), F = 0; F < IA; ++F)
|
|
74
|
+
A(YA[F], this, o);
|
|
75
75
|
return !0;
|
|
76
76
|
};
|
|
77
|
-
function
|
|
78
|
-
var M, R,
|
|
77
|
+
function K(w, E, o, F) {
|
|
78
|
+
var M, R, G;
|
|
79
79
|
if (D(o), R = w._events, R === void 0 ? (R = w._events = /* @__PURE__ */ Object.create(null), w._eventsCount = 0) : (R.newListener !== void 0 && (w.emit(
|
|
80
80
|
"newListener",
|
|
81
81
|
E,
|
|
82
82
|
o.listener ? o.listener : o
|
|
83
|
-
), R = w._events),
|
|
84
|
-
|
|
85
|
-
else if (typeof
|
|
86
|
-
|
|
87
|
-
var
|
|
88
|
-
|
|
83
|
+
), R = w._events), G = R[E]), G === void 0)
|
|
84
|
+
G = R[E] = o, ++w._eventsCount;
|
|
85
|
+
else if (typeof G == "function" ? G = R[E] = F ? [o, G] : [G, o] : F ? G.unshift(o) : G.push(o), M = N(w), M > 0 && G.length > M && !G.warned) {
|
|
86
|
+
G.warned = !0;
|
|
87
|
+
var H = new Error("Possible EventEmitter memory leak detected. " + G.length + " " + String(E) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
88
|
+
H.name = "MaxListenersExceededWarning", H.emitter = w, H.type = E, H.count = G.length, I(H);
|
|
89
89
|
}
|
|
90
90
|
return w;
|
|
91
91
|
}
|
|
92
92
|
B.prototype.addListener = function(E, o) {
|
|
93
|
-
return
|
|
93
|
+
return K(this, E, o, !1);
|
|
94
94
|
}, B.prototype.on = B.prototype.addListener, B.prototype.prependListener = function(E, o) {
|
|
95
|
-
return
|
|
95
|
+
return K(this, E, o, !0);
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function U() {
|
|
98
98
|
if (!this.fired)
|
|
99
99
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
var
|
|
103
|
-
return M.listener = o,
|
|
101
|
+
function h(w, E, o) {
|
|
102
|
+
var F = { fired: !1, wrapFn: void 0, target: w, type: E, listener: o }, M = U.bind(F);
|
|
103
|
+
return M.listener = o, F.wrapFn = M, M;
|
|
104
104
|
}
|
|
105
105
|
B.prototype.once = function(E, o) {
|
|
106
|
-
return D(o), this.on(E,
|
|
106
|
+
return D(o), this.on(E, h(this, E, o)), this;
|
|
107
107
|
}, B.prototype.prependOnceListener = function(E, o) {
|
|
108
|
-
return D(o), this.prependListener(E,
|
|
108
|
+
return D(o), this.prependListener(E, h(this, E, o)), this;
|
|
109
109
|
}, B.prototype.removeListener = function(E, o) {
|
|
110
|
-
var
|
|
110
|
+
var F, M, R, G, H;
|
|
111
111
|
if (D(o), M = this._events, M === void 0)
|
|
112
112
|
return this;
|
|
113
|
-
if (
|
|
113
|
+
if (F = M[E], F === void 0)
|
|
114
114
|
return this;
|
|
115
|
-
if (
|
|
116
|
-
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete M[E], M.removeListener && this.emit("removeListener", E,
|
|
117
|
-
else if (typeof
|
|
118
|
-
for (R = -1,
|
|
119
|
-
if (
|
|
120
|
-
|
|
115
|
+
if (F === o || F.listener === o)
|
|
116
|
+
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete M[E], M.removeListener && this.emit("removeListener", E, F.listener || o));
|
|
117
|
+
else if (typeof F != "function") {
|
|
118
|
+
for (R = -1, G = F.length - 1; G >= 0; G--)
|
|
119
|
+
if (F[G] === o || F[G].listener === o) {
|
|
120
|
+
H = F[G].listener, R = G;
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
123
|
if (R < 0)
|
|
124
124
|
return this;
|
|
125
|
-
R === 0 ?
|
|
125
|
+
R === 0 ? F.shift() : p(F, R), F.length === 1 && (M[E] = F[0]), M.removeListener !== void 0 && this.emit("removeListener", E, H || o);
|
|
126
126
|
}
|
|
127
127
|
return this;
|
|
128
128
|
}, B.prototype.off = B.prototype.removeListener, B.prototype.removeAllListeners = function(E) {
|
|
129
|
-
var o,
|
|
130
|
-
if (
|
|
129
|
+
var o, F, M;
|
|
130
|
+
if (F = this._events, F === void 0)
|
|
131
131
|
return this;
|
|
132
|
-
if (
|
|
133
|
-
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) :
|
|
132
|
+
if (F.removeListener === void 0)
|
|
133
|
+
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : F[E] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete F[E]), this;
|
|
134
134
|
if (arguments.length === 0) {
|
|
135
|
-
var R = Object.keys(
|
|
135
|
+
var R = Object.keys(F), G;
|
|
136
136
|
for (M = 0; M < R.length; ++M)
|
|
137
|
-
|
|
137
|
+
G = R[M], G !== "removeListener" && this.removeAllListeners(G);
|
|
138
138
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
139
139
|
}
|
|
140
|
-
if (o =
|
|
140
|
+
if (o = F[E], typeof o == "function")
|
|
141
141
|
this.removeListener(E, o);
|
|
142
142
|
else if (o !== void 0)
|
|
143
143
|
for (M = o.length - 1; M >= 0; M--)
|
|
@@ -145,20 +145,20 @@ function JA() {
|
|
|
145
145
|
return this;
|
|
146
146
|
};
|
|
147
147
|
function Y(w, E, o) {
|
|
148
|
-
var
|
|
149
|
-
if (
|
|
148
|
+
var F = w._events;
|
|
149
|
+
if (F === void 0)
|
|
150
150
|
return [];
|
|
151
|
-
var M =
|
|
152
|
-
return M === void 0 ? [] : typeof M == "function" ? o ? [M.listener || M] : [M] : o ?
|
|
151
|
+
var M = F[E];
|
|
152
|
+
return M === void 0 ? [] : typeof M == "function" ? o ? [M.listener || M] : [M] : o ? yA(M) : Z(M, M.length);
|
|
153
153
|
}
|
|
154
154
|
B.prototype.listeners = function(E) {
|
|
155
155
|
return Y(this, E, !0);
|
|
156
156
|
}, B.prototype.rawListeners = function(E) {
|
|
157
157
|
return Y(this, E, !1);
|
|
158
158
|
}, B.listenerCount = function(w, E) {
|
|
159
|
-
return typeof w.listenerCount == "function" ? w.listenerCount(E) :
|
|
160
|
-
}, B.prototype.listenerCount =
|
|
161
|
-
function
|
|
159
|
+
return typeof w.listenerCount == "function" ? w.listenerCount(E) : S.call(w, E);
|
|
160
|
+
}, B.prototype.listenerCount = S;
|
|
161
|
+
function S(w) {
|
|
162
162
|
var E = this._events;
|
|
163
163
|
if (E !== void 0) {
|
|
164
164
|
var o = E[w];
|
|
@@ -172,9 +172,9 @@ function JA() {
|
|
|
172
172
|
B.prototype.eventNames = function() {
|
|
173
173
|
return this._eventsCount > 0 ? g(this._events) : [];
|
|
174
174
|
};
|
|
175
|
-
function
|
|
176
|
-
for (var o = new Array(E),
|
|
177
|
-
o[
|
|
175
|
+
function Z(w, E) {
|
|
176
|
+
for (var o = new Array(E), F = 0; F < E; ++F)
|
|
177
|
+
o[F] = w[F];
|
|
178
178
|
return o;
|
|
179
179
|
}
|
|
180
180
|
function p(w, E) {
|
|
@@ -182,15 +182,15 @@ function JA() {
|
|
|
182
182
|
w[E] = w[E + 1];
|
|
183
183
|
w.pop();
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function yA(w) {
|
|
186
186
|
for (var E = new Array(w.length), o = 0; o < E.length; ++o)
|
|
187
187
|
E[o] = w[o].listener || w[o];
|
|
188
188
|
return E;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
return new Promise(function(o,
|
|
192
|
-
function M(
|
|
193
|
-
w.removeListener(E, R),
|
|
190
|
+
function KA(w, E) {
|
|
191
|
+
return new Promise(function(o, F) {
|
|
192
|
+
function M(G) {
|
|
193
|
+
w.removeListener(E, R), F(G);
|
|
194
194
|
}
|
|
195
195
|
function R() {
|
|
196
196
|
typeof w.removeListener == "function" && w.removeListener("error", M), o([].slice.call(arguments));
|
|
@@ -201,20 +201,20 @@ function JA() {
|
|
|
201
201
|
function RA(w, E, o) {
|
|
202
202
|
typeof w.on == "function" && gA(w, "error", E, o);
|
|
203
203
|
}
|
|
204
|
-
function gA(w, E, o,
|
|
204
|
+
function gA(w, E, o, F) {
|
|
205
205
|
if (typeof w.on == "function")
|
|
206
|
-
|
|
206
|
+
F.once ? w.once(E, o) : w.on(E, o);
|
|
207
207
|
else if (typeof w.addEventListener == "function")
|
|
208
208
|
w.addEventListener(E, function M(R) {
|
|
209
|
-
|
|
209
|
+
F.once && w.removeEventListener(E, M), o(R);
|
|
210
210
|
});
|
|
211
211
|
else
|
|
212
212
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof w);
|
|
213
213
|
}
|
|
214
|
-
return
|
|
214
|
+
return l.exports;
|
|
215
215
|
}
|
|
216
|
-
var
|
|
217
|
-
const
|
|
216
|
+
var SA = UA();
|
|
217
|
+
const kA = /* @__PURE__ */ JA(SA);
|
|
218
218
|
class e {
|
|
219
219
|
__destroy_into_raw() {
|
|
220
220
|
const A = this.__wbg_ptr;
|
|
@@ -222,7 +222,7 @@ class e {
|
|
|
222
222
|
}
|
|
223
223
|
free() {
|
|
224
224
|
const A = this.__destroy_into_raw();
|
|
225
|
-
|
|
225
|
+
k.__wbg_dapadapter_free(A, 0);
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* Attaches a worker to the adapter.
|
|
@@ -233,46 +233,46 @@ class e {
|
|
|
233
233
|
* @param {Worker} worker
|
|
234
234
|
*/
|
|
235
235
|
attach(A) {
|
|
236
|
-
|
|
236
|
+
k.dapadapter_attach(this.__wbg_ptr, A);
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
239
|
* Retire the listener without borrowing session state (callbacks can synchronously Stop).
|
|
240
240
|
*/
|
|
241
241
|
detach() {
|
|
242
|
-
|
|
242
|
+
k.dapadapter_detach(this.__wbg_ptr);
|
|
243
243
|
}
|
|
244
244
|
constructor() {
|
|
245
|
-
const A =
|
|
245
|
+
const A = k.dapadapter_new();
|
|
246
246
|
return this.__wbg_ptr = A >>> 0, EA.register(this, this.__wbg_ptr, this), this;
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
* @param {Function} callback
|
|
250
250
|
*/
|
|
251
251
|
on(A) {
|
|
252
|
-
|
|
252
|
+
k.dapadapter_on(this.__wbg_ptr, A);
|
|
253
253
|
}
|
|
254
254
|
resetRun() {
|
|
255
|
-
|
|
255
|
+
k.dapadapter_resetRun(this.__wbg_ptr);
|
|
256
256
|
}
|
|
257
257
|
/**
|
|
258
258
|
* @param {any} msg
|
|
259
259
|
* @returns {any}
|
|
260
260
|
*/
|
|
261
261
|
sendMessage(A) {
|
|
262
|
-
return
|
|
262
|
+
return k.dapadapter_sendMessage(this.__wbg_ptr, A);
|
|
263
263
|
}
|
|
264
264
|
/**
|
|
265
265
|
* @param {boolean} value
|
|
266
266
|
*/
|
|
267
267
|
setFilterInternals(A) {
|
|
268
|
-
|
|
268
|
+
k.dapadapter_setFilterInternals(this.__wbg_ptr, A);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
Symbol.dispose && (e.prototype[Symbol.dispose] = e.prototype.free);
|
|
272
|
-
class
|
|
272
|
+
class X {
|
|
273
273
|
static __wrap(A) {
|
|
274
274
|
A = A >>> 0;
|
|
275
|
-
const g = Object.create(
|
|
275
|
+
const g = Object.create(X.prototype);
|
|
276
276
|
return g.__wbg_ptr = A, DA.register(g, g.__wbg_ptr, g), g;
|
|
277
277
|
}
|
|
278
278
|
__destroy_into_raw() {
|
|
@@ -281,32 +281,32 @@ class l {
|
|
|
281
281
|
}
|
|
282
282
|
free() {
|
|
283
283
|
const A = this.__destroy_into_raw();
|
|
284
|
-
|
|
284
|
+
k.__wbg_trap_free(A, 0);
|
|
285
285
|
}
|
|
286
286
|
/**
|
|
287
287
|
* A marker method to indicate that an object is an instance of the `Trap`
|
|
288
288
|
* class.
|
|
289
289
|
*/
|
|
290
290
|
static __wbg_wasmer_trap() {
|
|
291
|
-
|
|
291
|
+
k.trap___wbg_wasmer_trap();
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
Symbol.dispose && (
|
|
295
|
-
function
|
|
294
|
+
Symbol.dispose && (X.prototype[Symbol.dispose] = X.prototype.free);
|
|
295
|
+
function hA() {
|
|
296
296
|
let Q, A;
|
|
297
297
|
try {
|
|
298
|
-
const g =
|
|
298
|
+
const g = k.cpp_exception_hash();
|
|
299
299
|
return Q = g[0], A = g[1], c(g[0], g[1]);
|
|
300
300
|
} finally {
|
|
301
|
-
|
|
301
|
+
k.__wbindgen_free(Q, A, 1);
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
function QA(Q) {
|
|
305
|
-
const A =
|
|
306
|
-
var C =
|
|
307
|
-
return
|
|
305
|
+
const A = O(Q, k.__wbindgen_malloc, k.__wbindgen_realloc), g = d, I = k.prefetch_urls(A, g);
|
|
306
|
+
var C = FA(I[0], I[1]).slice();
|
|
307
|
+
return k.__wbindgen_free(I[0], I[1] * 4, 4), C;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function LA() {
|
|
310
310
|
return {
|
|
311
311
|
__proto__: null,
|
|
312
312
|
"./engine_bg.js": {
|
|
@@ -321,7 +321,7 @@ function hA() {
|
|
|
321
321
|
return Number(A);
|
|
322
322
|
},
|
|
323
323
|
__wbg_String_8f0eb39a4a4c2f66: function(A, g) {
|
|
324
|
-
const I = String(g), C =
|
|
324
|
+
const I = String(g), C = O(I, k.__wbindgen_malloc, k.__wbindgen_realloc), B = d;
|
|
325
325
|
s().setInt32(A + 4, B, !0), s().setInt32(A + 0, C, !0);
|
|
326
326
|
},
|
|
327
327
|
__wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(A, g) {
|
|
@@ -333,11 +333,11 @@ function hA() {
|
|
|
333
333
|
return q(I) ? 16777215 : I ? 1 : 0;
|
|
334
334
|
},
|
|
335
335
|
__wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(A, g) {
|
|
336
|
-
const I = _(g), C =
|
|
336
|
+
const I = _(g), C = O(I, k.__wbindgen_malloc, k.__wbindgen_realloc), B = d;
|
|
337
337
|
s().setInt32(A + 4, B, !0), s().setInt32(A + 0, C, !0);
|
|
338
338
|
},
|
|
339
339
|
__wbg___wbindgen_function_table_5ae7216dfcbcc506: function() {
|
|
340
|
-
return
|
|
340
|
+
return k.__wbindgen_export;
|
|
341
341
|
},
|
|
342
342
|
__wbg___wbindgen_in_47fa6863be6f2f25: function(A, g) {
|
|
343
343
|
return A in g;
|
|
@@ -382,7 +382,7 @@ function hA() {
|
|
|
382
382
|
},
|
|
383
383
|
__wbg___wbindgen_string_get_72fb696202c56729: function(A, g) {
|
|
384
384
|
const I = g, C = typeof I == "string" ? I : void 0;
|
|
385
|
-
var B = q(C) ? 0 :
|
|
385
|
+
var B = q(C) ? 0 : O(C, k.__wbindgen_malloc, k.__wbindgen_realloc), i = d;
|
|
386
386
|
s().setInt32(A + 4, i, !0), s().setInt32(A + 0, B, !0);
|
|
387
387
|
},
|
|
388
388
|
__wbg___wbindgen_throw_be289d5034ed271b: function(A, g) {
|
|
@@ -392,22 +392,22 @@ function hA() {
|
|
|
392
392
|
A._wbg_cb_unref();
|
|
393
393
|
},
|
|
394
394
|
__wbg_addEventListener_3acb0aad4483804c: function() {
|
|
395
|
-
return
|
|
395
|
+
return y(function(A, g, I, C) {
|
|
396
396
|
A.addEventListener(c(g, I), C);
|
|
397
397
|
}, arguments);
|
|
398
398
|
},
|
|
399
399
|
__wbg_apply_2e22c45cb4f12415: function() {
|
|
400
|
-
return
|
|
400
|
+
return y(function(A, g, I) {
|
|
401
401
|
return Reflect.apply(A, g, I);
|
|
402
402
|
}, arguments);
|
|
403
403
|
},
|
|
404
404
|
__wbg_apply_ada2ee1a60ac7b3c: function() {
|
|
405
|
-
return
|
|
405
|
+
return y(function(A, g, I) {
|
|
406
406
|
return A.apply(g, I);
|
|
407
407
|
}, arguments);
|
|
408
408
|
},
|
|
409
409
|
__wbg_arrayBuffer_bb54076166006c39: function() {
|
|
410
|
-
return
|
|
410
|
+
return y(function(A) {
|
|
411
411
|
return A.arrayBuffer();
|
|
412
412
|
}, arguments);
|
|
413
413
|
},
|
|
@@ -427,17 +427,17 @@ function hA() {
|
|
|
427
427
|
return A.byteLength;
|
|
428
428
|
},
|
|
429
429
|
__wbg_call_389efe28435a9388: function() {
|
|
430
|
-
return
|
|
430
|
+
return y(function(A, g) {
|
|
431
431
|
return A.call(g);
|
|
432
432
|
}, arguments);
|
|
433
433
|
},
|
|
434
434
|
__wbg_call_4708e0c13bdc8e95: function() {
|
|
435
|
-
return
|
|
435
|
+
return y(function(A, g, I) {
|
|
436
436
|
return A.call(g, I);
|
|
437
437
|
}, arguments);
|
|
438
438
|
},
|
|
439
439
|
__wbg_compareExchange_b578410c358e695e: function() {
|
|
440
|
-
return
|
|
440
|
+
return y(function(A, g, I, C) {
|
|
441
441
|
return Atomics.compareExchange(A, g >>> 0, I, C);
|
|
442
442
|
}, arguments);
|
|
443
443
|
},
|
|
@@ -464,7 +464,7 @@ function hA() {
|
|
|
464
464
|
try {
|
|
465
465
|
I = A, C = g, console.error(c(A, g));
|
|
466
466
|
} finally {
|
|
467
|
-
|
|
467
|
+
k.__wbindgen_free(I, C, 1);
|
|
468
468
|
}
|
|
469
469
|
},
|
|
470
470
|
__wbg_exports_794a42000dacd046: function(A) {
|
|
@@ -480,12 +480,12 @@ function hA() {
|
|
|
480
480
|
return Array.from(A);
|
|
481
481
|
},
|
|
482
482
|
__wbg_getPrototypeOf_2653517f1dc884d5: function() {
|
|
483
|
-
return
|
|
483
|
+
return y(function(A) {
|
|
484
484
|
return Reflect.getPrototypeOf(A);
|
|
485
485
|
}, arguments);
|
|
486
486
|
},
|
|
487
487
|
__wbg_getRandomValues_b3f15fcbfabb0f8b: function() {
|
|
488
|
-
return
|
|
488
|
+
return y(function(A, g) {
|
|
489
489
|
A.getRandomValues(g);
|
|
490
490
|
}, arguments);
|
|
491
491
|
},
|
|
@@ -499,7 +499,7 @@ function hA() {
|
|
|
499
499
|
return A.getUint32(g >>> 0, I !== 0);
|
|
500
500
|
},
|
|
501
501
|
__wbg_get_7efbcc3819719b0f: function() {
|
|
502
|
-
return
|
|
502
|
+
return y(function(A, g) {
|
|
503
503
|
return A.get(g >>> 0);
|
|
504
504
|
}, arguments);
|
|
505
505
|
},
|
|
@@ -507,7 +507,7 @@ function hA() {
|
|
|
507
507
|
return A[g >>> 0];
|
|
508
508
|
},
|
|
509
509
|
__wbg_get_b3ed3ad4be2bc8ac: function() {
|
|
510
|
-
return
|
|
510
|
+
return y(function(A, g) {
|
|
511
511
|
return Reflect.get(A, g);
|
|
512
512
|
}, arguments);
|
|
513
513
|
},
|
|
@@ -521,12 +521,12 @@ function hA() {
|
|
|
521
521
|
return A[g];
|
|
522
522
|
},
|
|
523
523
|
__wbg_grow_5d42bf28c2da22cb: function() {
|
|
524
|
-
return
|
|
524
|
+
return y(function(A, g) {
|
|
525
525
|
return A.grow(g >>> 0);
|
|
526
526
|
}, arguments);
|
|
527
527
|
},
|
|
528
528
|
__wbg_grow_d034989fce14cc8e: function() {
|
|
529
|
-
return
|
|
529
|
+
return y(function(A, g) {
|
|
530
530
|
return A.grow(g >>> 0);
|
|
531
531
|
}, arguments);
|
|
532
532
|
},
|
|
@@ -681,7 +681,7 @@ function hA() {
|
|
|
681
681
|
return A.length;
|
|
682
682
|
},
|
|
683
683
|
__wbg_load_eff64ff5e429a422: function() {
|
|
684
|
-
return
|
|
684
|
+
return y(function(A, g) {
|
|
685
685
|
return Atomics.load(A, g >>> 0);
|
|
686
686
|
}, arguments);
|
|
687
687
|
},
|
|
@@ -692,7 +692,7 @@ function hA() {
|
|
|
692
692
|
return A.msCrypto;
|
|
693
693
|
},
|
|
694
694
|
__wbg_new_0728bd2d4c5d41dd: function() {
|
|
695
|
-
return
|
|
695
|
+
return y(function(A) {
|
|
696
696
|
return new WebAssembly.Tag(A);
|
|
697
697
|
}, arguments);
|
|
698
698
|
},
|
|
@@ -712,17 +712,17 @@ function hA() {
|
|
|
712
712
|
return new Array();
|
|
713
713
|
},
|
|
714
714
|
__wbg_new_4a996a46a82782b6: function() {
|
|
715
|
-
return
|
|
715
|
+
return y(function(A, g) {
|
|
716
716
|
return new WebAssembly.Global(A, g);
|
|
717
717
|
}, arguments);
|
|
718
718
|
},
|
|
719
719
|
__wbg_new_57c27ff3ddf5b62c: function() {
|
|
720
|
-
return
|
|
720
|
+
return y(function(A) {
|
|
721
721
|
return new WebAssembly.Module(A);
|
|
722
722
|
}, arguments);
|
|
723
723
|
},
|
|
724
724
|
__wbg_new_67274f72d5abea37: function() {
|
|
725
|
-
return
|
|
725
|
+
return y(function(A) {
|
|
726
726
|
return new WebAssembly.Table(A);
|
|
727
727
|
}, arguments);
|
|
728
728
|
},
|
|
@@ -730,12 +730,12 @@ function hA() {
|
|
|
730
730
|
return new Error();
|
|
731
731
|
},
|
|
732
732
|
__wbg_new_a4e3cab1cdd635ba: function() {
|
|
733
|
-
return
|
|
733
|
+
return y(function(A, g) {
|
|
734
734
|
return new WebAssembly.Instance(A, g);
|
|
735
735
|
}, arguments);
|
|
736
736
|
},
|
|
737
737
|
__wbg_new_b061c0550d9f3281: function() {
|
|
738
|
-
return
|
|
738
|
+
return y(function(A) {
|
|
739
739
|
return new WebAssembly.Memory(A);
|
|
740
740
|
}, arguments);
|
|
741
741
|
},
|
|
@@ -789,7 +789,7 @@ function hA() {
|
|
|
789
789
|
return new Uint8Array(A >>> 0);
|
|
790
790
|
},
|
|
791
791
|
__wbg_next_3482f54c49e8af19: function() {
|
|
792
|
-
return
|
|
792
|
+
return y(function(A) {
|
|
793
793
|
return A.next();
|
|
794
794
|
}, arguments);
|
|
795
795
|
},
|
|
@@ -800,7 +800,7 @@ function hA() {
|
|
|
800
800
|
return A.node;
|
|
801
801
|
},
|
|
802
802
|
__wbg_notify_78a90977fab74963: function() {
|
|
803
|
-
return
|
|
803
|
+
return y(function(A, g) {
|
|
804
804
|
return Atomics.notify(A, g >>> 0);
|
|
805
805
|
}, arguments);
|
|
806
806
|
},
|
|
@@ -814,7 +814,7 @@ function hA() {
|
|
|
814
814
|
return A.ok;
|
|
815
815
|
},
|
|
816
816
|
__wbg_postMessage_2041f4e90af61318: function() {
|
|
817
|
-
return
|
|
817
|
+
return y(function(A, g) {
|
|
818
818
|
A.postMessage(g);
|
|
819
819
|
}, arguments);
|
|
820
820
|
},
|
|
@@ -834,17 +834,17 @@ function hA() {
|
|
|
834
834
|
queueMicrotask(A);
|
|
835
835
|
},
|
|
836
836
|
__wbg_randomFillSync_f8c153b79f285817: function() {
|
|
837
|
-
return
|
|
837
|
+
return y(function(A, g) {
|
|
838
838
|
A.randomFillSync(g);
|
|
839
839
|
}, arguments);
|
|
840
840
|
},
|
|
841
841
|
__wbg_removeEventListener_e63328781a5b9af9: function() {
|
|
842
|
-
return
|
|
842
|
+
return y(function(A, g, I, C) {
|
|
843
843
|
A.removeEventListener(c(g, I), C);
|
|
844
844
|
}, arguments);
|
|
845
845
|
},
|
|
846
846
|
__wbg_require_b74f47fc2d022fd6: function() {
|
|
847
|
-
return
|
|
847
|
+
return y(function() {
|
|
848
848
|
return module.require;
|
|
849
849
|
}, arguments);
|
|
850
850
|
},
|
|
@@ -852,7 +852,7 @@ function hA() {
|
|
|
852
852
|
return Promise.resolve(A);
|
|
853
853
|
},
|
|
854
854
|
__wbg_setTimeout_e0aacd5a637418a6: function() {
|
|
855
|
-
return
|
|
855
|
+
return y(function(A, g, I) {
|
|
856
856
|
return A.setTimeout(g, I);
|
|
857
857
|
}, arguments);
|
|
858
858
|
},
|
|
@@ -860,7 +860,7 @@ function hA() {
|
|
|
860
860
|
A.setUint32(g >>> 0, I >>> 0, C !== 0);
|
|
861
861
|
},
|
|
862
862
|
__wbg_set_0af2522656c2a71b: function() {
|
|
863
|
-
return
|
|
863
|
+
return y(function(A, g, I) {
|
|
864
864
|
A.set(g >>> 0, I);
|
|
865
865
|
}, arguments);
|
|
866
866
|
},
|
|
@@ -874,7 +874,7 @@ function hA() {
|
|
|
874
874
|
A[g] = I;
|
|
875
875
|
},
|
|
876
876
|
__wbg_set_6cb8631f80447a67: function() {
|
|
877
|
-
return
|
|
877
|
+
return y(function(A, g, I) {
|
|
878
878
|
return Reflect.set(A, g, I);
|
|
879
879
|
}, arguments);
|
|
880
880
|
},
|
|
@@ -900,27 +900,27 @@ function hA() {
|
|
|
900
900
|
return A.slice(g >>> 0, I >>> 0);
|
|
901
901
|
},
|
|
902
902
|
__wbg_stack_0ed75d68575b0f3c: function(A, g) {
|
|
903
|
-
const I = g.stack, C =
|
|
903
|
+
const I = g.stack, C = O(I, k.__wbindgen_malloc, k.__wbindgen_realloc), B = d;
|
|
904
904
|
s().setInt32(A + 4, B, !0), s().setInt32(A + 0, C, !0);
|
|
905
905
|
},
|
|
906
906
|
__wbg_static_accessor_GLOBAL_12837167ad935116: function() {
|
|
907
907
|
const A = typeof global > "u" ? null : global;
|
|
908
|
-
return q(A) ? 0 :
|
|
908
|
+
return q(A) ? 0 : j(A);
|
|
909
909
|
},
|
|
910
910
|
__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
|
|
911
911
|
const A = typeof globalThis > "u" ? null : globalThis;
|
|
912
|
-
return q(A) ? 0 :
|
|
912
|
+
return q(A) ? 0 : j(A);
|
|
913
913
|
},
|
|
914
914
|
__wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
|
|
915
915
|
const A = typeof self > "u" ? null : self;
|
|
916
|
-
return q(A) ? 0 :
|
|
916
|
+
return q(A) ? 0 : j(A);
|
|
917
917
|
},
|
|
918
918
|
__wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
|
|
919
919
|
const A = typeof window > "u" ? null : window;
|
|
920
|
-
return q(A) ? 0 :
|
|
920
|
+
return q(A) ? 0 : j(A);
|
|
921
921
|
},
|
|
922
922
|
__wbg_store_d1d951c98d9bed41: function() {
|
|
923
|
-
return
|
|
923
|
+
return y(function(A, g, I) {
|
|
924
924
|
return Atomics.store(A, g >>> 0, I);
|
|
925
925
|
}, arguments);
|
|
926
926
|
},
|
|
@@ -934,17 +934,17 @@ function hA() {
|
|
|
934
934
|
return A.then(g);
|
|
935
935
|
},
|
|
936
936
|
__wbg_toString_56d946daff83867b: function(A, g, I) {
|
|
937
|
-
const C = g.toString(I), B =
|
|
937
|
+
const C = g.toString(I), B = O(C, k.__wbindgen_malloc, k.__wbindgen_realloc), i = d;
|
|
938
938
|
s().setInt32(A + 4, i, !0), s().setInt32(A + 0, B, !0);
|
|
939
939
|
},
|
|
940
940
|
__wbg_toString_964ff7fe6eca8362: function(A) {
|
|
941
941
|
return A.toString();
|
|
942
942
|
},
|
|
943
943
|
__wbg_trap_new: function(A) {
|
|
944
|
-
return
|
|
944
|
+
return X.__wrap(A);
|
|
945
945
|
},
|
|
946
946
|
__wbg_validate_71c2d02a71bda62f: function() {
|
|
947
|
-
return
|
|
947
|
+
return y(function(A) {
|
|
948
948
|
return WebAssembly.validate(A);
|
|
949
949
|
}, arguments);
|
|
950
950
|
},
|
|
@@ -958,7 +958,7 @@ function hA() {
|
|
|
958
958
|
return A.versions;
|
|
959
959
|
},
|
|
960
960
|
__wbg_wait_be5dae1e53f590f1: function() {
|
|
961
|
-
return
|
|
961
|
+
return y(function(A, g, I) {
|
|
962
962
|
return Atomics.wait(A, g >>> 0, I);
|
|
963
963
|
}, arguments);
|
|
964
964
|
},
|
|
@@ -966,22 +966,22 @@ function hA() {
|
|
|
966
966
|
console.warn(A, g, I);
|
|
967
967
|
},
|
|
968
968
|
__wbindgen_cast_0000000000000001: function(A, g) {
|
|
969
|
-
return
|
|
969
|
+
return W(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, BA);
|
|
970
970
|
},
|
|
971
971
|
__wbindgen_cast_0000000000000002: function(A, g) {
|
|
972
|
-
return
|
|
972
|
+
return W(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, BA);
|
|
973
973
|
},
|
|
974
974
|
__wbindgen_cast_0000000000000003: function(A, g) {
|
|
975
|
-
return
|
|
975
|
+
return W(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, aA);
|
|
976
976
|
},
|
|
977
977
|
__wbindgen_cast_0000000000000004: function(A, g) {
|
|
978
|
-
return
|
|
978
|
+
return W(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut__wasm_bindgen_36932265c58943ab___JsValue____Output_______, sA);
|
|
979
979
|
},
|
|
980
980
|
__wbindgen_cast_0000000000000005: function(A, g) {
|
|
981
|
-
return pA(A, g,
|
|
981
|
+
return pA(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, cA);
|
|
982
982
|
},
|
|
983
983
|
__wbindgen_cast_0000000000000006: function(A, g) {
|
|
984
|
-
return
|
|
984
|
+
return W(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, HA);
|
|
985
985
|
},
|
|
986
986
|
__wbindgen_cast_0000000000000007: function(A) {
|
|
987
987
|
return A;
|
|
@@ -1002,49 +1002,49 @@ function hA() {
|
|
|
1002
1002
|
return BigInt.asUintN(64, A);
|
|
1003
1003
|
},
|
|
1004
1004
|
__wbindgen_cast_000000000000000d: function(A, g) {
|
|
1005
|
-
var I =
|
|
1006
|
-
return
|
|
1005
|
+
var I = FA(A, g).slice();
|
|
1006
|
+
return k.__wbindgen_free(A, g * 4, 4), I;
|
|
1007
1007
|
},
|
|
1008
1008
|
__wbindgen_init_externref_table: function() {
|
|
1009
|
-
const A =
|
|
1009
|
+
const A = k.__wbindgen_externrefs, g = A.grow(4);
|
|
1010
1010
|
A.set(0, void 0), A.set(g + 0, void 0), A.set(g + 1, null), A.set(g + 2, !0), A.set(g + 3, !1);
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
1013
|
};
|
|
1014
1014
|
}
|
|
1015
1015
|
function sA(Q, A, g) {
|
|
1016
|
-
|
|
1016
|
+
k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, g);
|
|
1017
1017
|
}
|
|
1018
1018
|
function cA(Q, A, g) {
|
|
1019
|
-
|
|
1020
|
-
}
|
|
1021
|
-
function aA(Q, A, g) {
|
|
1022
|
-
G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent______1_(Q, A, g);
|
|
1019
|
+
k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent_____(Q, A, g);
|
|
1023
1020
|
}
|
|
1024
1021
|
function HA(Q, A, g) {
|
|
1025
|
-
|
|
1022
|
+
k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent______1_(Q, A, g);
|
|
1023
|
+
}
|
|
1024
|
+
function aA(Q, A, g) {
|
|
1025
|
+
const I = k.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_36932265c58943ab___JsValue__(Q, A, g);
|
|
1026
1026
|
if (I[1])
|
|
1027
1027
|
throw $(I[0]);
|
|
1028
1028
|
}
|
|
1029
1029
|
function BA(Q, A, g) {
|
|
1030
|
-
const I =
|
|
1030
|
+
const I = k.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue__(Q, A, g);
|
|
1031
1031
|
if (I[2])
|
|
1032
1032
|
throw $(I[1]);
|
|
1033
1033
|
return $(I[0]);
|
|
1034
1034
|
}
|
|
1035
1035
|
function qA(Q, A, g, I) {
|
|
1036
|
-
|
|
1036
|
+
k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue__wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, g, I);
|
|
1037
1037
|
}
|
|
1038
1038
|
const EA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1039
1039
|
}, unregister: () => {
|
|
1040
|
-
} } : new FinalizationRegistry((Q) =>
|
|
1040
|
+
} } : new FinalizationRegistry((Q) => k.__wbg_dapadapter_free(Q >>> 0, 1)), DA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1041
1041
|
}, unregister: () => {
|
|
1042
|
-
} } : new FinalizationRegistry((Q) =>
|
|
1043
|
-
function
|
|
1044
|
-
const A =
|
|
1045
|
-
return
|
|
1042
|
+
} } : new FinalizationRegistry((Q) => k.__wbg_trap_free(Q >>> 0, 1));
|
|
1043
|
+
function j(Q) {
|
|
1044
|
+
const A = k.__externref_table_alloc();
|
|
1045
|
+
return k.__wbindgen_externrefs.set(A, Q), A;
|
|
1046
1046
|
}
|
|
1047
|
-
const
|
|
1047
|
+
const n = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1048
1048
|
}, unregister: () => {
|
|
1049
1049
|
} } : new FinalizationRegistry((Q) => Q.dtor(Q.a, Q.b));
|
|
1050
1050
|
function _(Q) {
|
|
@@ -1084,33 +1084,33 @@ function _(Q) {
|
|
|
1084
1084
|
return Q instanceof Error ? `${Q.name}: ${Q.message}
|
|
1085
1085
|
${Q.stack}` : I;
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function FA(Q, A) {
|
|
1088
1088
|
Q = Q >>> 0;
|
|
1089
1089
|
const g = s(), I = [];
|
|
1090
1090
|
for (let C = Q; C < Q + 4 * A; C += 4)
|
|
1091
|
-
I.push(
|
|
1092
|
-
return
|
|
1091
|
+
I.push(k.__wbindgen_externrefs.get(g.getUint32(C, !0)));
|
|
1092
|
+
return k.__externref_drop_slice(Q, A), I;
|
|
1093
1093
|
}
|
|
1094
1094
|
function b(Q, A) {
|
|
1095
1095
|
return Q = Q >>> 0, T().subarray(Q / 1, Q / 1 + A);
|
|
1096
1096
|
}
|
|
1097
|
-
let
|
|
1097
|
+
let x = null;
|
|
1098
1098
|
function s() {
|
|
1099
|
-
return (
|
|
1099
|
+
return (x === null || x.buffer.detached === !0 || x.buffer.detached === void 0 && x.buffer !== k.memory.buffer) && (x = new DataView(k.memory.buffer)), x;
|
|
1100
1100
|
}
|
|
1101
1101
|
function c(Q, A) {
|
|
1102
|
-
return Q = Q >>> 0,
|
|
1102
|
+
return Q = Q >>> 0, xA(Q, A);
|
|
1103
1103
|
}
|
|
1104
|
-
let
|
|
1104
|
+
let t = null;
|
|
1105
1105
|
function T() {
|
|
1106
|
-
return (
|
|
1106
|
+
return (t === null || t.byteLength === 0) && (t = new Uint8Array(k.memory.buffer)), t;
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1108
|
+
function y(Q, A) {
|
|
1109
1109
|
try {
|
|
1110
1110
|
return Q.apply(this, A);
|
|
1111
1111
|
} catch (g) {
|
|
1112
|
-
const I =
|
|
1113
|
-
|
|
1112
|
+
const I = j(g);
|
|
1113
|
+
k.__wbindgen_exn_store(I);
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
1116
1116
|
function q(Q) {
|
|
@@ -1126,10 +1126,10 @@ function pA(Q, A, g, I) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
};
|
|
1128
1128
|
return B._wbg_cb_unref = () => {
|
|
1129
|
-
--C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0,
|
|
1130
|
-
},
|
|
1129
|
+
--C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, n.unregister(C));
|
|
1130
|
+
}, n.register(B, C, C), B;
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function W(Q, A, g, I) {
|
|
1133
1133
|
const C = { a: Q, b: A, cnt: 1, dtor: g }, B = (...i) => {
|
|
1134
1134
|
C.cnt++;
|
|
1135
1135
|
const D = C.a;
|
|
@@ -1141,10 +1141,10 @@ function Z(Q, A, g, I) {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
};
|
|
1143
1143
|
return B._wbg_cb_unref = () => {
|
|
1144
|
-
--C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0,
|
|
1145
|
-
},
|
|
1144
|
+
--C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, n.unregister(C));
|
|
1145
|
+
}, n.register(B, C, C), B;
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1147
|
+
function O(Q, A, g) {
|
|
1148
1148
|
if (g === void 0) {
|
|
1149
1149
|
const D = z.encode(Q), N = A(D.length, 1) >>> 0;
|
|
1150
1150
|
return T().subarray(N, N + D.length).set(D), d = D.length, N;
|
|
@@ -1165,14 +1165,14 @@ function V(Q, A, g) {
|
|
|
1165
1165
|
return d = i, C;
|
|
1166
1166
|
}
|
|
1167
1167
|
function $(Q) {
|
|
1168
|
-
const A =
|
|
1169
|
-
return
|
|
1168
|
+
const A = k.__wbindgen_externrefs.get(Q);
|
|
1169
|
+
return k.__externref_table_dealloc(Q), A;
|
|
1170
1170
|
}
|
|
1171
1171
|
let P = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
1172
1172
|
P.decode();
|
|
1173
1173
|
const dA = 2146435072;
|
|
1174
1174
|
let u = 0;
|
|
1175
|
-
function
|
|
1175
|
+
function xA(Q, A) {
|
|
1176
1176
|
return u += A, u >= dA && (P = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), P.decode(), u = A), P.decode(T().subarray(Q, Q + A));
|
|
1177
1177
|
}
|
|
1178
1178
|
const z = new TextEncoder();
|
|
@@ -1183,11 +1183,11 @@ const z = new TextEncoder();
|
|
|
1183
1183
|
written: g.length
|
|
1184
1184
|
};
|
|
1185
1185
|
});
|
|
1186
|
-
let d = 0,
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
1186
|
+
let d = 0, k;
|
|
1187
|
+
function ZA(Q, A) {
|
|
1188
|
+
return k = Q.exports, x = null, t = null, k.__wbindgen_start(), k;
|
|
1189
1189
|
}
|
|
1190
|
-
async function
|
|
1190
|
+
async function OA(Q, A) {
|
|
1191
1191
|
if (typeof Response == "function" && Q instanceof Response) {
|
|
1192
1192
|
if (typeof WebAssembly.instantiateStreaming == "function")
|
|
1193
1193
|
try {
|
|
@@ -1214,21 +1214,21 @@ async function VA(Q, A) {
|
|
|
1214
1214
|
return !1;
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
|
-
async function
|
|
1218
|
-
if (
|
|
1217
|
+
async function VA(Q) {
|
|
1218
|
+
if (k !== void 0) return k;
|
|
1219
1219
|
Q !== void 0 && (Object.getPrototypeOf(Q) === Object.prototype ? { module_or_path: Q } = Q : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), Q === void 0 && (Q = new URL("", import.meta.url));
|
|
1220
|
-
const A =
|
|
1220
|
+
const A = LA();
|
|
1221
1221
|
(typeof Q == "string" || typeof Request == "function" && Q instanceof Request || typeof URL == "function" && Q instanceof URL) && (Q = fetch(Q));
|
|
1222
|
-
const { instance: g, module: I } = await
|
|
1223
|
-
return
|
|
1222
|
+
const { instance: g, module: I } = await OA(await Q, A);
|
|
1223
|
+
return ZA(g);
|
|
1224
1224
|
}
|
|
1225
|
-
const
|
|
1225
|
+
const WA = new URL("https://cdn.jsdelivr.net/npm/glassjar@0.4.0/dist/engine_bg.wasm"), jA = Object.freeze({
|
|
1226
1226
|
maxObjectBytes: 128 * 1024 * 1024,
|
|
1227
1227
|
maxEntries: 256,
|
|
1228
1228
|
maxMetadataBytes: 8 * 1024 * 1024,
|
|
1229
1229
|
maxEntryMetadataBytes: 1024 * 1024
|
|
1230
1230
|
});
|
|
1231
|
-
class
|
|
1231
|
+
class tA {
|
|
1232
1232
|
records = /* @__PURE__ */ new Map();
|
|
1233
1233
|
staged = /* @__PURE__ */ new Map();
|
|
1234
1234
|
stagingFailed = !1;
|
|
@@ -1238,7 +1238,7 @@ class OA {
|
|
|
1238
1238
|
oversized = 0;
|
|
1239
1239
|
limits;
|
|
1240
1240
|
constructor(A = {}) {
|
|
1241
|
-
this.limits = Object.freeze({ ...
|
|
1241
|
+
this.limits = Object.freeze({ ...jA, ...A });
|
|
1242
1242
|
for (const g of Object.values(this.limits))
|
|
1243
1243
|
if (!Number.isSafeInteger(g) || g < 0)
|
|
1244
1244
|
throw new RangeError("C++ cache limits must be nonnegative safe integers");
|
|
@@ -1396,8 +1396,8 @@ function TA(Q) {
|
|
|
1396
1396
|
return !1;
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
|
-
const
|
|
1400
|
-
function
|
|
1399
|
+
const J = /* @__PURE__ */ Symbol();
|
|
1400
|
+
function L(Q) {
|
|
1401
1401
|
return Q instanceof Error ? {
|
|
1402
1402
|
type: "error",
|
|
1403
1403
|
error: { type: Q.constructor.name, message: Q.message }
|
|
@@ -1417,13 +1417,13 @@ class zA {
|
|
|
1417
1417
|
C.href = I, C.download = this.name, document.body.appendChild(C), C.click(), document.body.removeChild(C), URL.revokeObjectURL(I);
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
|
-
class fA extends
|
|
1420
|
+
class fA extends kA {
|
|
1421
1421
|
/**
|
|
1422
1422
|
* Access to internal properties of the debugger.
|
|
1423
1423
|
* These are put under a special symbol so that they cannot be accessed by
|
|
1424
1424
|
* clients of the library.
|
|
1425
1425
|
*/
|
|
1426
|
-
[
|
|
1426
|
+
[J];
|
|
1427
1427
|
dap;
|
|
1428
1428
|
/**
|
|
1429
1429
|
* Whether or not debugging is enabled.
|
|
@@ -1440,7 +1440,7 @@ class fA extends GA {
|
|
|
1440
1440
|
this.dap.setFilterInternals(A);
|
|
1441
1441
|
}
|
|
1442
1442
|
constructor() {
|
|
1443
|
-
super(), this[
|
|
1443
|
+
super(), this[J] = {
|
|
1444
1444
|
attach: this.attach.bind(this),
|
|
1445
1445
|
detach: this.detach.bind(this),
|
|
1446
1446
|
beginRun: () => this.dap.resetRun()
|
|
@@ -1464,8 +1464,8 @@ class fA extends GA {
|
|
|
1464
1464
|
this.emit("event", A);
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
|
-
const
|
|
1468
|
-
function
|
|
1467
|
+
const XA = "glassjar-wasm:";
|
|
1468
|
+
function lA(Q, A) {
|
|
1469
1469
|
const g = new URL(String(Q), A);
|
|
1470
1470
|
if (g.protocol !== "https:" && g.protocol !== "http:")
|
|
1471
1471
|
throw new TypeError(`Engine Wasm must be served over http(s), not ${g.protocol}`);
|
|
@@ -1473,17 +1473,17 @@ function mA(Q, A) {
|
|
|
1473
1473
|
}
|
|
1474
1474
|
function bA(Q) {
|
|
1475
1475
|
return new Worker(
|
|
1476
|
-
"" + new URL("assets/worker-
|
|
1476
|
+
"" + new URL("assets/worker-KgNayWZL.js", import.meta.url).href,
|
|
1477
1477
|
{
|
|
1478
1478
|
type: "module",
|
|
1479
1479
|
name: Q?.name
|
|
1480
1480
|
}
|
|
1481
1481
|
);
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return new bA(Q ? { name:
|
|
1483
|
+
function mA(Q) {
|
|
1484
|
+
return new bA(Q ? { name: XA + Q } : void 0);
|
|
1485
1485
|
}
|
|
1486
|
-
const
|
|
1486
|
+
const rA = "/dev/debugger-sh-host";
|
|
1487
1487
|
class wA {
|
|
1488
1488
|
buffer = new SharedArrayBuffer(4 + 64 * 1024);
|
|
1489
1489
|
length = new Int32Array(this.buffer, 0, 1);
|
|
@@ -1605,17 +1605,17 @@ class PA {
|
|
|
1605
1605
|
return this.cleanup = void 0, iA(A);
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
|
-
const
|
|
1608
|
+
const nA = [
|
|
1609
1609
|
"4847c7cda81eb51b1cec18fe40b396605579fe84e17eca2760702b8a9666e4e1"
|
|
1610
|
-
],
|
|
1610
|
+
], r = Object.freeze({
|
|
1611
1611
|
compiler: "24fbed474c7b5b4968fd73fc4827440b93fb351c1b6264516130300eff3e7bf5",
|
|
1612
1612
|
sysroot: "8745c6af23fd841fa507d0c73f6b6b8e8da1b4ec216a6339739a28b38ff7227b",
|
|
1613
1613
|
exceptions: "20986166552953de0e3ca5c1e9f341e7aec8b9ba54dcb244d0d2b2f9ca843ab4"
|
|
1614
1614
|
});
|
|
1615
1615
|
function MA(Q = "legacy") {
|
|
1616
|
-
if (Q === "legacy") return { profile: Q, digests:
|
|
1617
|
-
if (Q === "stock-certified-v1" &&
|
|
1618
|
-
return { profile: Q, digests:
|
|
1616
|
+
if (Q === "legacy") return { profile: Q, digests: r };
|
|
1617
|
+
if (Q === "stock-certified-v1" && nA.length > 0)
|
|
1618
|
+
return { profile: Q, digests: r };
|
|
1619
1619
|
throw new Error(`The ${Q} toolchain is not available in this build`);
|
|
1620
1620
|
}
|
|
1621
1621
|
class f {
|
|
@@ -1625,14 +1625,14 @@ class f {
|
|
|
1625
1625
|
constructor(A, g) {
|
|
1626
1626
|
this.#A = A, this.hashMs = g;
|
|
1627
1627
|
}
|
|
1628
|
-
static async load(A, g, I, C =
|
|
1628
|
+
static async load(A, g, I, C = r.exceptions, B = "legacy") {
|
|
1629
1629
|
const i = MA(B);
|
|
1630
1630
|
if (A.length !== 2) throw new Error("Missing C++ toolchain assets");
|
|
1631
1631
|
let D;
|
|
1632
1632
|
const N = await Promise.allSettled(
|
|
1633
|
-
A.map(async (
|
|
1633
|
+
A.map(async (Z) => {
|
|
1634
1634
|
try {
|
|
1635
|
-
const p = await fetch(
|
|
1635
|
+
const p = await fetch(Z, { cache: "force-cache", signal: I });
|
|
1636
1636
|
if (!p.ok) throw new Error(`Cannot load C++ toolchain (${p.status})`);
|
|
1637
1637
|
return new Uint8Array(await p.arrayBuffer());
|
|
1638
1638
|
} catch (p) {
|
|
@@ -1642,17 +1642,17 @@ class f {
|
|
|
1642
1642
|
);
|
|
1643
1643
|
if (N[0].status === "rejected" || N[1].status === "rejected")
|
|
1644
1644
|
throw D?.error;
|
|
1645
|
-
const [
|
|
1646
|
-
f.ingestOwned(
|
|
1647
|
-
g ? Promise.resolve().then(() => WebAssembly.compile(
|
|
1645
|
+
const [K, U] = [N[0].value, N[1].value], [h, Y] = await Promise.allSettled([
|
|
1646
|
+
f.ingestOwned(K, U, !1, C),
|
|
1647
|
+
g ? Promise.resolve().then(() => WebAssembly.compile(K)) : Promise.resolve(void 0)
|
|
1648
1648
|
]);
|
|
1649
|
-
if (
|
|
1650
|
-
const
|
|
1651
|
-
if (
|
|
1649
|
+
if (h.status === "rejected") throw h.reason;
|
|
1650
|
+
const S = h.value;
|
|
1651
|
+
if (S.#A.compilerHash !== i.digests.compiler || S.#A.sysrootHash !== i.digests.sysroot || S.#A.exceptionsHash !== i.digests.exceptions)
|
|
1652
1652
|
throw new Error("C++ toolchain integrity mismatch");
|
|
1653
1653
|
if (I?.aborted) throw new DOMException("Toolchain loading aborted", "AbortError");
|
|
1654
1654
|
if (Y.status === "rejected") throw Y.reason;
|
|
1655
|
-
return
|
|
1655
|
+
return S.#A.stockProfile = i.profile === "stock-certified-v1", S.#A.module = Y.value, S;
|
|
1656
1656
|
}
|
|
1657
1657
|
/** Captures even Buffer/subclass inputs before the first asynchronous boundary. */
|
|
1658
1658
|
static async fromBytes(A, g, I) {
|
|
@@ -1661,16 +1661,16 @@ class f {
|
|
|
1661
1661
|
C,
|
|
1662
1662
|
B,
|
|
1663
1663
|
I,
|
|
1664
|
-
|
|
1664
|
+
r.exceptions
|
|
1665
1665
|
);
|
|
1666
1666
|
}
|
|
1667
1667
|
static async ingestOwned(A, g, I, C) {
|
|
1668
1668
|
const B = performance.now(), i = await Promise.allSettled([oA(A), oA(g)]);
|
|
1669
1669
|
if (i[0].status === "rejected") throw i[0].reason;
|
|
1670
1670
|
if (i[1].status === "rejected") throw i[1].reason;
|
|
1671
|
-
const [D, N] = [i[0].value, i[1].value],
|
|
1671
|
+
const [D, N] = [i[0].value, i[1].value], K = I ? await WebAssembly.compile(A) : void 0;
|
|
1672
1672
|
return new f(
|
|
1673
|
-
{ compiler: A, sysroot: g, compilerHash: D, sysrootHash: N, exceptionsHash: C, module:
|
|
1673
|
+
{ compiler: A, sysroot: g, compilerHash: D, sysrootHash: N, exceptionsHash: C, module: K },
|
|
1674
1674
|
performance.now() - B
|
|
1675
1675
|
);
|
|
1676
1676
|
}
|
|
@@ -1701,11 +1701,11 @@ async function oA(Q) {
|
|
|
1701
1701
|
const A = await crypto.subtle.digest("SHA-256", Q);
|
|
1702
1702
|
return Array.from(new Uint8Array(A), (g) => g.toString(16).padStart(2, "0")).join("");
|
|
1703
1703
|
}
|
|
1704
|
-
let v,
|
|
1705
|
-
class
|
|
1704
|
+
let v, m;
|
|
1705
|
+
class GA {
|
|
1706
1706
|
stdout = new NA(1);
|
|
1707
1707
|
stderr = new NA(2);
|
|
1708
|
-
stdin = new
|
|
1708
|
+
stdin = new a();
|
|
1709
1709
|
debugger;
|
|
1710
1710
|
lang;
|
|
1711
1711
|
scope;
|
|
@@ -1744,16 +1744,16 @@ class FA {
|
|
|
1744
1744
|
latest;
|
|
1745
1745
|
cacheValidation;
|
|
1746
1746
|
static async create(A, g = {}) {
|
|
1747
|
-
const { wasmUrl: I, ...C } = g, B = I === void 0 ? void 0 :
|
|
1748
|
-
if (
|
|
1747
|
+
const { wasmUrl: I, ...C } = g, B = I === void 0 ? void 0 : lA(I, globalThis.location?.href), i = structuredClone(C), D = B ?? null;
|
|
1748
|
+
if (m !== void 0 && m !== D)
|
|
1749
1749
|
throw new Error("The engine Wasm is already loaded from a different wasmUrl");
|
|
1750
|
-
|
|
1751
|
-
throw v = void 0,
|
|
1750
|
+
m = D, v ??= VA({ module_or_path: B ?? WA }).catch((K) => {
|
|
1751
|
+
throw v = void 0, m = void 0, K;
|
|
1752
1752
|
}), await v;
|
|
1753
|
-
const N = new
|
|
1753
|
+
const N = new GA(A, i);
|
|
1754
1754
|
if (N.wasmUrl = B, A !== "c" && typeof window < "u" && typeof fetch < "u")
|
|
1755
|
-
for (const
|
|
1756
|
-
fetch(
|
|
1755
|
+
for (const K of QA(A))
|
|
1756
|
+
fetch(K, { cache: "force-cache" }).then((U) => U.arrayBuffer()).catch(() => {
|
|
1757
1757
|
});
|
|
1758
1758
|
return N;
|
|
1759
1759
|
}
|
|
@@ -1771,7 +1771,7 @@ class FA {
|
|
|
1771
1771
|
throw new TypeError("Invalid compiler lifetime");
|
|
1772
1772
|
MA(I.toolchainProfile), this.scope = Object.freeze({ ...I.scope }), this.options = Object.freeze({ ...I, scope: this.scope, idleTimeoutMs: C });
|
|
1773
1773
|
}
|
|
1774
|
-
this.objects = new
|
|
1774
|
+
this.objects = new tA(typeof I?.objectCache == "object" ? I.objectCache : {}), this.debugger = new fA(), this.lang = A;
|
|
1775
1775
|
}
|
|
1776
1776
|
/** A retained worker reuses clang, compiled once on this thread and cloned to it. */
|
|
1777
1777
|
get cacheCompilerModule() {
|
|
@@ -1857,7 +1857,7 @@ class FA {
|
|
|
1857
1857
|
/** Load compiler resources. Optional input validation never invokes Clang, links, or runs a guest. */
|
|
1858
1858
|
prepareCompiler(A) {
|
|
1859
1859
|
if (A?.validateCacheInputs !== void 0 && typeof A.validateCacheInputs != "boolean")
|
|
1860
|
-
return Promise.resolve(
|
|
1860
|
+
return Promise.resolve(L(new TypeError("Invalid compiler preparation options")));
|
|
1861
1861
|
const g = A?.validateCacheInputs === !0 && this.options?.toolchainProfile === "stock-certified-v1" && !!this.options?.objectCache && this.objects.limits.maxEntries > 0 && this.objects.limits.maxObjectBytes > 0 && this.objects.limits.maxMetadataBytes > 0 && this.objects.limits.maxEntryMetadataBytes > 0;
|
|
1862
1862
|
return this.submit(!0, !0, g);
|
|
1863
1863
|
}
|
|
@@ -1870,44 +1870,44 @@ class FA {
|
|
|
1870
1870
|
return this.submit(!0);
|
|
1871
1871
|
}
|
|
1872
1872
|
submit(A, g = !1, I = !1) {
|
|
1873
|
-
if (this.disposed) return Promise.resolve(
|
|
1873
|
+
if (this.disposed) return Promise.resolve(L(new Error("Engine is disposed")));
|
|
1874
1874
|
if (this.active || this.cancellationDraining)
|
|
1875
|
-
return Promise.resolve(
|
|
1875
|
+
return Promise.resolve(L(new Error("An engine job is already active")));
|
|
1876
1876
|
if (A && this.lang !== "c")
|
|
1877
|
-
return Promise.resolve(
|
|
1877
|
+
return Promise.resolve(L(new Error("Compile-only is supported for C/C++")));
|
|
1878
1878
|
this.cacheValidation = void 0;
|
|
1879
1879
|
const C = g && !I;
|
|
1880
1880
|
let B;
|
|
1881
1881
|
try {
|
|
1882
1882
|
const Y = C || !this.cppArtifacts ? null : { ...this.cppArtifacts };
|
|
1883
1883
|
if (Y?.cacheCertificate !== void 0) {
|
|
1884
|
-
const
|
|
1885
|
-
(typeof
|
|
1884
|
+
const S = Y.cacheCertificate;
|
|
1885
|
+
(typeof S != "string" || S.length > 1024 * 1024 || new TextEncoder().encode(S).byteLength > 1024 * 1024) && delete Y.cacheCertificate;
|
|
1886
1886
|
}
|
|
1887
1887
|
B = {
|
|
1888
1888
|
fs: C ? {} : structuredClone(this.fs),
|
|
1889
1889
|
binary_files: Object.fromEntries(
|
|
1890
|
-
Object.entries(C ? {} : this.binaryFiles).map(([
|
|
1891
|
-
|
|
1892
|
-
new Uint8Array(
|
|
1890
|
+
Object.entries(C ? {} : this.binaryFiles).map(([S, Z]) => [
|
|
1891
|
+
S,
|
|
1892
|
+
new Uint8Array(Z)
|
|
1893
1893
|
])
|
|
1894
1894
|
),
|
|
1895
1895
|
cpp_artifacts: structuredClone(Y)
|
|
1896
1896
|
};
|
|
1897
1897
|
} catch (Y) {
|
|
1898
|
-
return Promise.resolve(
|
|
1898
|
+
return Promise.resolve(L(Y));
|
|
1899
1899
|
}
|
|
1900
1900
|
const i = !A && this.debugger.enabled, D = A ? void 0 : this.hostDevice;
|
|
1901
1901
|
if (D !== void 0 && (typeof D != "function" || !["c", "python"].includes(this.lang)))
|
|
1902
|
-
return Promise.resolve(
|
|
1903
|
-
clearTimeout(this.idleTimer),
|
|
1902
|
+
return Promise.resolve(L(new TypeError("Invalid host device configuration")));
|
|
1903
|
+
clearTimeout(this.idleTimer), this.stdin[J].clear();
|
|
1904
1904
|
const N = !!this.slot;
|
|
1905
|
-
let
|
|
1906
|
-
const
|
|
1907
|
-
|
|
1905
|
+
let K;
|
|
1906
|
+
const U = new Promise((Y) => {
|
|
1907
|
+
K = Y;
|
|
1908
1908
|
});
|
|
1909
|
-
this.promise =
|
|
1910
|
-
const
|
|
1909
|
+
this.promise = U;
|
|
1910
|
+
const h = {
|
|
1911
1911
|
generation: this.generation,
|
|
1912
1912
|
scopeEpoch: this.scopeEpoch,
|
|
1913
1913
|
operationId: ++this.operationId,
|
|
@@ -1919,7 +1919,7 @@ class FA {
|
|
|
1919
1919
|
debug: i,
|
|
1920
1920
|
opener: D,
|
|
1921
1921
|
startedAt: performance.now(),
|
|
1922
|
-
resolve:
|
|
1922
|
+
resolve: K,
|
|
1923
1923
|
stats: {
|
|
1924
1924
|
operation: g ? "prepare_compiler" : A ? "compile" : "run",
|
|
1925
1925
|
workerReadyMs: 0,
|
|
@@ -1935,7 +1935,7 @@ class FA {
|
|
|
1935
1935
|
cache_epoch: this.generation,
|
|
1936
1936
|
is_debug: i,
|
|
1937
1937
|
build_only: A,
|
|
1938
|
-
stdin_buffer: this.stdin[
|
|
1938
|
+
stdin_buffer: this.stdin[J].buffer,
|
|
1939
1939
|
cpp_cache: this.options?.objectCache && !i && !g ? {
|
|
1940
1940
|
generation: this.generation,
|
|
1941
1941
|
entries: this.objects.snapshot(),
|
|
@@ -1947,23 +1947,23 @@ class FA {
|
|
|
1947
1947
|
} : null
|
|
1948
1948
|
}
|
|
1949
1949
|
};
|
|
1950
|
-
this.objects.beginBatch(), this.active =
|
|
1950
|
+
this.objects.beginBatch(), this.active = h;
|
|
1951
1951
|
try {
|
|
1952
|
-
if (this.slot || this.makeWorker(), !this.current(
|
|
1952
|
+
if (this.slot || this.makeWorker(), !this.current(h)) return U;
|
|
1953
1953
|
const Y = this.slot;
|
|
1954
|
-
this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((
|
|
1955
|
-
this.current(
|
|
1956
|
-
}), this.slot.ready && this.dispatch(
|
|
1954
|
+
this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((S) => {
|
|
1955
|
+
this.current(h) && this.slot === Y && this.finish(h, L(S));
|
|
1956
|
+
}), this.slot.ready && this.dispatch(h);
|
|
1957
1957
|
} catch (Y) {
|
|
1958
|
-
this.finish(
|
|
1958
|
+
this.finish(h, L(Y));
|
|
1959
1959
|
}
|
|
1960
|
-
return
|
|
1960
|
+
return U;
|
|
1961
1961
|
}
|
|
1962
1962
|
current(A) {
|
|
1963
1963
|
return this.active === A && !A.settled;
|
|
1964
1964
|
}
|
|
1965
1965
|
makeWorker() {
|
|
1966
|
-
const A =
|
|
1966
|
+
const A = mA(this.wasmUrl), g = { worker: A, ready: !1, remove: () => {
|
|
1967
1967
|
} };
|
|
1968
1968
|
this.slot = g;
|
|
1969
1969
|
const I = (i) => {
|
|
@@ -1976,7 +1976,7 @@ class FA {
|
|
|
1976
1976
|
}
|
|
1977
1977
|
if (!(!N || !this.current(N))) {
|
|
1978
1978
|
if (!g.ready && D.type === "error") {
|
|
1979
|
-
this.finish(N,
|
|
1979
|
+
this.finish(N, L(new Error(D.message)));
|
|
1980
1980
|
return;
|
|
1981
1981
|
}
|
|
1982
1982
|
if (!(D.operationId !== N.operationId || D.scopeEpoch !== N.scopeEpoch))
|
|
@@ -1984,13 +1984,13 @@ class FA {
|
|
|
1984
1984
|
if (D.type === "cpp_cache_eligibility") {
|
|
1985
1985
|
if (this.options?.toolchainProfile !== "stock-certified-v1" || N.prepareOnly && !N.validateCacheInputs)
|
|
1986
1986
|
return;
|
|
1987
|
-
const
|
|
1987
|
+
const K = (h) => typeof h == "string" && /^[0-9a-f]{64}$/.test(h), U = D.eligible === !0 && K(D.certificate_sha256) && K(D.snapshot);
|
|
1988
1988
|
this.cacheValidation = {
|
|
1989
|
-
eligible:
|
|
1990
|
-
certificate:
|
|
1991
|
-
snapshot:
|
|
1989
|
+
eligible: U,
|
|
1990
|
+
certificate: K(D.certificate_sha256) ? D.certificate_sha256 : void 0,
|
|
1991
|
+
snapshot: U ? D.snapshot : void 0,
|
|
1992
1992
|
operationId: N.operationId,
|
|
1993
|
-
reason:
|
|
1993
|
+
reason: U ? void 0 : typeof D.reason == "string" ? D.reason.slice(0, 128) : "stock-input-validation"
|
|
1994
1994
|
};
|
|
1995
1995
|
} else if (D.type === "stop")
|
|
1996
1996
|
this.finish(N, {
|
|
@@ -2003,7 +2003,7 @@ class FA {
|
|
|
2003
2003
|
}
|
|
2004
2004
|
});
|
|
2005
2005
|
else if (D.type === "error")
|
|
2006
|
-
this.finish(N,
|
|
2006
|
+
this.finish(N, L(new Error(D.message)));
|
|
2007
2007
|
else if (D.type === "cpp_cache_object" && D.generation === this.generation && N.generation === this.generation)
|
|
2008
2008
|
try {
|
|
2009
2009
|
this.objects.stage(D);
|
|
@@ -2011,15 +2011,15 @@ class FA {
|
|
|
2011
2011
|
this.objects.abandonBatch();
|
|
2012
2012
|
}
|
|
2013
2013
|
else D.type === "cpp_cache_stats" && D.generation === N.generation ? N.stats.cache = D.stats : D.type === "cpp_cache_abandon" ? this.objects.abandonBatch() : D.type === "object_build_complete" ? N.publication ??= this.publishObjects(N, g) : D.type === "compiler_module_stats" && (N.stats.compilerModule = D);
|
|
2014
|
-
} catch (
|
|
2015
|
-
this.finish(N,
|
|
2014
|
+
} catch (K) {
|
|
2015
|
+
this.finish(N, L(K));
|
|
2016
2016
|
}
|
|
2017
2017
|
}
|
|
2018
2018
|
}, C = (i) => {
|
|
2019
|
-
this.slot === g && (this.clearCaches(), this.active ? this.finish(this.active,
|
|
2019
|
+
this.slot === g && (this.clearCaches(), this.active ? this.finish(this.active, L(i.error ?? new Error(i.message))) : this.retireWorker());
|
|
2020
2020
|
}, B = () => C({ message: "Unreadable execution worker message" });
|
|
2021
|
-
this.debugger[
|
|
2022
|
-
A.removeEventListener("message", I), A.removeEventListener("error", C), A.removeEventListener("messageerror", B), this.debugger[
|
|
2021
|
+
this.debugger[J].attach(A), A.addEventListener("message", I), A.addEventListener("error", C), A.addEventListener("messageerror", B), g.remove = () => {
|
|
2022
|
+
A.removeEventListener("message", I), A.removeEventListener("error", C), A.removeEventListener("messageerror", B), this.debugger[J].detach(A);
|
|
2023
2023
|
};
|
|
2024
2024
|
}
|
|
2025
2025
|
async publishObjects(A, g) {
|
|
@@ -2060,7 +2060,7 @@ class FA {
|
|
|
2060
2060
|
QA("c"),
|
|
2061
2061
|
this.cacheCompilerModule,
|
|
2062
2062
|
this.toolchainController.signal,
|
|
2063
|
-
|
|
2063
|
+
hA(),
|
|
2064
2064
|
this.options?.toolchainProfile
|
|
2065
2065
|
);
|
|
2066
2066
|
return this.toolchainLoading = A, this.initializing.add(A), A.then(
|
|
@@ -2077,8 +2077,8 @@ class FA {
|
|
|
2077
2077
|
if (this.lang === "c") {
|
|
2078
2078
|
const B = this.scopeEpoch, i = this.generation, D = this.ensureToolchain(), N = this.toolchain ?? await D;
|
|
2079
2079
|
if (!this.current(A) || this.slot !== g || B !== this.scopeEpoch) return;
|
|
2080
|
-
const
|
|
2081
|
-
if (
|
|
2080
|
+
const K = A.start.cpp_artifacts?.requiredToolchain;
|
|
2081
|
+
if (K && !N.matchesExpectation(K)) {
|
|
2082
2082
|
this.finish(A, {
|
|
2083
2083
|
type: "error",
|
|
2084
2084
|
error: {
|
|
@@ -2097,52 +2097,52 @@ class FA {
|
|
|
2097
2097
|
const I = g.worker;
|
|
2098
2098
|
A.stats.workerReadyMs = performance.now() - A.startedAt;
|
|
2099
2099
|
const C = (B) => this.current(A) && B.scopeEpoch === A.scopeEpoch && B.operationId === A.operationId;
|
|
2100
|
-
if (this.stdout[
|
|
2101
|
-
if (A.device = new PA((B) => this.finish(A,
|
|
2100
|
+
if (this.stdout[J].attach(I, C), this.stderr[J].attach(I, C), A.prepareOnly || this.debugger[J].beginRun(), A.opener) {
|
|
2101
|
+
if (A.device = new PA((B) => this.finish(A, L(B))), A.device.attach(I), A.device.open(A.opener), !this.current(A)) return;
|
|
2102
2102
|
A.start.host_device = A.device.workerStart;
|
|
2103
2103
|
}
|
|
2104
2104
|
this.current(A) && (I.postMessage(A.start), A.start.fs = {}, A.start.binary_files = {}, A.start.cpp_artifacts = null, A.start.cpp_cache = null);
|
|
2105
2105
|
} catch (I) {
|
|
2106
|
-
this.current(A) && (this.toolchainLoading = void 0, this.finish(A,
|
|
2106
|
+
this.current(A) && (this.toolchainLoading = void 0, this.finish(A, L(I)));
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
2109
|
finish(A, g) {
|
|
2110
2110
|
if (!this.current(A)) return;
|
|
2111
2111
|
(g.type !== "completed" || g.exitCode !== 0) && (this.cacheValidation = void 0), A.settled = !0;
|
|
2112
2112
|
const I = this.slot?.worker;
|
|
2113
|
-
I && (this.stdout[
|
|
2113
|
+
I && (this.stdout[J].detach(I), this.stderr[J].detach(I));
|
|
2114
2114
|
const C = A.device?.close();
|
|
2115
|
-
C && (g =
|
|
2116
|
-
const B = g.type === "completed" &&
|
|
2115
|
+
C && (g = L(C));
|
|
2116
|
+
const B = g.type === "completed" && A.generation === this.generation && !this.disposed, i = B && g.type === "completed" && g.exitCode === 0;
|
|
2117
2117
|
if (A.generation === this.generation)
|
|
2118
|
-
for (const
|
|
2119
|
-
if (
|
|
2120
|
-
for (const
|
|
2121
|
-
this.objects.discardBatch(), this.latest = A.stats, this.stdin[
|
|
2118
|
+
for (const D of A.stats.cache?.invalid_sources ?? []) this.objects.delete(D);
|
|
2119
|
+
if (i)
|
|
2120
|
+
for (const D of A.stats.cache?.hit_sources ?? []) this.objects.touch(D);
|
|
2121
|
+
this.objects.discardBatch(), this.latest = A.stats, this.stdin[J].clear(), (!B || !this.retain) && this.retireWorker(), !this.disposed && A.cacheEpoch === this.generation && (this.slot || this.toolchain && this.cacheCompilerModule) && this.options?.compilerLifetime !== "project" && (this.idleTimer = setTimeout(() => {
|
|
2122
2122
|
this.retireWorker(), this.toolchain = void 0, this.toolchainLoading = void 0;
|
|
2123
2123
|
}, this.idleTimeoutMs)), !this.retain && !this.cacheCompilerModule && (this.toolchain = void 0), A.cacheEpoch !== this.generation && (this.toolchainController?.abort(), this.toolchainLoading = void 0), this.active = void 0, this.promise = void 0, this.flushReleases(), A.resolve(g);
|
|
2124
2124
|
}
|
|
2125
2125
|
retireWorker() {
|
|
2126
2126
|
clearTimeout(this.idleTimer);
|
|
2127
2127
|
const A = this.slot;
|
|
2128
|
-
A && (this.slot = void 0, A.remove(), this.stdout[
|
|
2128
|
+
A && (this.slot = void 0, A.remove(), this.stdout[J].detach(A.worker), this.stderr[J].detach(A.worker), A.worker.onerror = (g) => g.preventDefault(), A.worker.terminate(), this.retirements++);
|
|
2129
2129
|
}
|
|
2130
2130
|
}
|
|
2131
|
-
class NA extends
|
|
2131
|
+
class NA extends kA {
|
|
2132
2132
|
constructor(A) {
|
|
2133
2133
|
super(), this.mode = A, this.callback = ((g) => {
|
|
2134
2134
|
const I = g.data;
|
|
2135
2135
|
if (this.accepts && !this.accepts(I) || I.type !== "stdout" || I.mode !== this.mode) return;
|
|
2136
2136
|
const C = I.data;
|
|
2137
2137
|
this.emit("data", C);
|
|
2138
|
-
}).bind(this), this[
|
|
2138
|
+
}).bind(this), this[J] = {
|
|
2139
2139
|
attach: this.attach.bind(this),
|
|
2140
2140
|
detach: this.detach.bind(this)
|
|
2141
2141
|
};
|
|
2142
2142
|
}
|
|
2143
2143
|
callback;
|
|
2144
2144
|
accepts;
|
|
2145
|
-
[
|
|
2145
|
+
[J];
|
|
2146
2146
|
attach(A, g) {
|
|
2147
2147
|
this.accepts = g, A.addEventListener("message", this.callback);
|
|
2148
2148
|
}
|
|
@@ -2150,7 +2150,7 @@ class NA extends GA {
|
|
|
2150
2150
|
A.removeEventListener("message", this.callback);
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
2153
|
-
class
|
|
2153
|
+
class a {
|
|
2154
2154
|
/**
|
|
2155
2155
|
* Ring buffer to store stdin data.
|
|
2156
2156
|
*
|
|
@@ -2160,19 +2160,19 @@ class H {
|
|
|
2160
2160
|
static BUFFER_SIZE = 2048;
|
|
2161
2161
|
static HEADER_SIZE = 8;
|
|
2162
2162
|
// 2 x i32
|
|
2163
|
-
static DATA_SIZE =
|
|
2163
|
+
static DATA_SIZE = a.BUFFER_SIZE - a.HEADER_SIZE;
|
|
2164
2164
|
static READ_IDX = 0;
|
|
2165
2165
|
static WRITE_IDX = 1;
|
|
2166
2166
|
static encoder = new TextEncoder();
|
|
2167
|
-
buffer = new SharedArrayBuffer(
|
|
2167
|
+
buffer = new SharedArrayBuffer(a.BUFFER_SIZE);
|
|
2168
2168
|
generation = 0;
|
|
2169
2169
|
indices;
|
|
2170
2170
|
data;
|
|
2171
|
-
[
|
|
2171
|
+
[J];
|
|
2172
2172
|
constructor() {
|
|
2173
|
-
this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer,
|
|
2173
|
+
this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, a.HEADER_SIZE);
|
|
2174
2174
|
const A = () => this.buffer;
|
|
2175
|
-
this[
|
|
2175
|
+
this[J] = {
|
|
2176
2176
|
clear: this.clear.bind(this),
|
|
2177
2177
|
get buffer() {
|
|
2178
2178
|
return A();
|
|
@@ -2180,35 +2180,35 @@ class H {
|
|
|
2180
2180
|
};
|
|
2181
2181
|
}
|
|
2182
2182
|
clear() {
|
|
2183
|
-
this.generation++, Atomics.notify(this.indices,
|
|
2183
|
+
this.generation++, Atomics.notify(this.indices, a.READ_IDX), this.buffer = new SharedArrayBuffer(a.BUFFER_SIZE), this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, a.HEADER_SIZE);
|
|
2184
2184
|
}
|
|
2185
2185
|
async write(A) {
|
|
2186
|
-
const g = typeof A == "string" ?
|
|
2186
|
+
const g = typeof A == "string" ? a.encoder.encode(A) : A;
|
|
2187
2187
|
return this.writeBytes(g);
|
|
2188
2188
|
}
|
|
2189
2189
|
async writeBytes(A) {
|
|
2190
|
-
const { DATA_SIZE: g, READ_IDX: I, WRITE_IDX: C } =
|
|
2190
|
+
const { DATA_SIZE: g, READ_IDX: I, WRITE_IDX: C } = a;
|
|
2191
2191
|
let B = 0;
|
|
2192
2192
|
const i = this.generation;
|
|
2193
2193
|
for (; B < A.length && i === this.generation; ) {
|
|
2194
2194
|
const D = Atomics.load(this.indices, I);
|
|
2195
2195
|
let N = Atomics.load(this.indices, C);
|
|
2196
2196
|
N === g - 1 && D > 0 && (N = 0);
|
|
2197
|
-
const
|
|
2198
|
-
if (
|
|
2197
|
+
const K = D <= N ? g - N - 1 : D - N - 1;
|
|
2198
|
+
if (K === 0) {
|
|
2199
2199
|
await Atomics.waitAsync(this.indices, I, D).value;
|
|
2200
2200
|
continue;
|
|
2201
2201
|
}
|
|
2202
|
-
const
|
|
2203
|
-
this.data.set(A.subarray(B, B +
|
|
2202
|
+
const U = Math.min(A.length - B, K);
|
|
2203
|
+
this.data.set(A.subarray(B, B + U), N), Atomics.store(this.indices, C, (N + U) % g), Atomics.notify(this.indices, C), B += U;
|
|
2204
2204
|
}
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
2207
2207
|
export {
|
|
2208
2208
|
zA as Artifact,
|
|
2209
2209
|
fA as Debugger,
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2210
|
+
GA as Engine,
|
|
2211
|
+
rA as HOST_DEVICE_PATH,
|
|
2212
|
+
a as Stdin,
|
|
2213
2213
|
NA as Stdout
|
|
2214
2214
|
};
|