brs-js 3.2.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist.js +5 -5
- package/dist/dist.js.map +1 -1
- package/dist/dist.mjs +954 -858
- package/dist/dist.mjs.map +1 -1
- package/dist/dist.node.js +5 -5
- package/dist/dist.node.js.map +1 -1
- package/dist/dist.web.js +5 -5
- package/dist/dist.web.js.map +1 -1
- package/dist/src/brdb/catalog.d.ts +2 -0
- package/dist/src/brdb/catalog.d.ts.map +1 -1
- package/dist/src/brdb/componentDb.d.ts +19 -0
- package/dist/src/brdb/componentDb.d.ts.map +1 -1
- package/dist/src/brdb/componentTypes.d.ts +11 -0
- package/dist/src/brdb/componentTypes.d.ts.map +1 -1
- package/dist/src/brdb/fs.d.ts +2 -0
- package/dist/src/brdb/fs.d.ts.map +1 -1
- package/dist/src/brdb/index.d.ts +1 -1
- package/dist/src/brdb/index.d.ts.map +1 -1
- package/dist/src/brdb/reader.d.ts +12 -0
- package/dist/src/brdb/reader.d.ts.map +1 -1
- package/dist/src/brdb/schemas.d.ts.map +1 -1
- package/dist/src/brdb/world.d.ts +25 -1
- package/dist/src/brdb/world.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/dist.mjs
CHANGED
|
@@ -162,41 +162,41 @@ var h = 0, g = 1, _ = 2, v = 29, y = 256, b = 286, x = 30, S = 19, C = 573, w =
|
|
|
162
162
|
14,
|
|
163
163
|
1,
|
|
164
164
|
15
|
|
165
|
-
]), ne = 512,
|
|
165
|
+
]), ne = 512, N = Array(288 * 2);
|
|
166
|
+
m(N);
|
|
167
|
+
var re = Array(x * 2);
|
|
166
168
|
m(re);
|
|
167
|
-
var ie = Array(
|
|
169
|
+
var ie = Array(ne);
|
|
168
170
|
m(ie);
|
|
169
|
-
var ae = Array(
|
|
171
|
+
var ae = Array(256);
|
|
170
172
|
m(ae);
|
|
171
|
-
var oe = Array(
|
|
173
|
+
var oe = Array(v);
|
|
172
174
|
m(oe);
|
|
173
|
-
var se = Array(
|
|
175
|
+
var se = Array(x);
|
|
174
176
|
m(se);
|
|
175
|
-
var ce =
|
|
176
|
-
m(ce);
|
|
177
|
-
var le = class {
|
|
177
|
+
var ce = class {
|
|
178
178
|
constructor(e, t, n, r, i) {
|
|
179
179
|
this.static_tree = e, this.extra_bits = t, this.extra_base = n, this.elems = r, this.max_length = i, this.has_stree = e && e.length;
|
|
180
180
|
}
|
|
181
|
-
}, ue, de, fe
|
|
181
|
+
}, le, ue, de, fe = class {
|
|
182
182
|
constructor(e, t) {
|
|
183
183
|
this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
|
|
184
184
|
}
|
|
185
|
-
},
|
|
185
|
+
}, pe = (e) => e < 256 ? ie[e] : ie[256 + (e >>> 7)], me = (e, t) => {
|
|
186
186
|
e.pending_buf[e.pending++] = t & 255, e.pending_buf[e.pending++] = t >>> 8 & 255;
|
|
187
|
-
},
|
|
188
|
-
e.bi_valid > T - n ? (e.bi_buf |= t << e.bi_valid & 65535,
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
},
|
|
187
|
+
}, P = (e, t, n) => {
|
|
188
|
+
e.bi_valid > T - n ? (e.bi_buf |= t << e.bi_valid & 65535, me(e, e.bi_buf), e.bi_buf = t >> T - e.bi_valid, e.bi_valid += n - T) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += n);
|
|
189
|
+
}, he = (e, t, n) => {
|
|
190
|
+
P(e, n[t * 2], n[t * 2 + 1]);
|
|
191
|
+
}, ge = (e, t) => {
|
|
192
192
|
let n = 0;
|
|
193
193
|
do
|
|
194
194
|
n |= e & 1, e >>>= 1, n <<= 1;
|
|
195
195
|
while (--t > 0);
|
|
196
196
|
return n >>> 1;
|
|
197
|
-
},
|
|
198
|
-
e.bi_valid === 16 ? (
|
|
199
|
-
},
|
|
197
|
+
}, _e = (e) => {
|
|
198
|
+
e.bi_valid === 16 ? (me(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = e.bi_buf & 255, e.bi_buf >>= 8, e.bi_valid -= 8);
|
|
199
|
+
}, ve = (e, t) => {
|
|
200
200
|
let n = t.dyn_tree, r = t.max_code, i = t.stat_desc.static_tree, a = t.stat_desc.has_stree, o = t.stat_desc.extra_bits, s = t.stat_desc.extra_base, c = t.stat_desc.max_length, l, u, d, f, p, m, h = 0;
|
|
201
201
|
for (f = 0; f <= w; f++) e.bl_count[f] = 0;
|
|
202
202
|
for (n[e.heap[e.heap_max] * 2 + 1] = 0, l = e.heap_max + 1; l < C; l++) u = e.heap[l], f = n[n[u * 2 + 1] * 2 + 1] + 1, f > c && (f = c, h++), n[u * 2 + 1] = f, !(u > r) && (e.bl_count[f]++, p = 0, u >= s && (p = o[u - s]), m = n[u * 2], e.opt_len += m * (f + p), a && (e.static_len += m * (i[u * 2 + 1] + p)));
|
|
@@ -207,92 +207,92 @@ var le = class {
|
|
|
207
207
|
} while (h > 0);
|
|
208
208
|
for (f = c; f !== 0; f--) for (u = e.bl_count[f]; u !== 0;) d = e.heap[--l], !(d > r) && (n[d * 2 + 1] !== f && (e.opt_len += (f - n[d * 2 + 1]) * n[d * 2], n[d * 2 + 1] = f), u--);
|
|
209
209
|
}
|
|
210
|
-
},
|
|
210
|
+
}, ye = (e, t, n) => {
|
|
211
211
|
let r = Array(16), i = 0, a, o;
|
|
212
212
|
for (a = 1; a <= w; a++) i = i + n[a - 1] << 1, r[a] = i;
|
|
213
213
|
for (o = 0; o <= t; o++) {
|
|
214
214
|
let t = e[o * 2 + 1];
|
|
215
|
-
t !== 0 && (e[o * 2] =
|
|
215
|
+
t !== 0 && (e[o * 2] = ge(r[t]++, t));
|
|
216
216
|
}
|
|
217
|
-
},
|
|
217
|
+
}, be = () => {
|
|
218
218
|
let e, t, n, r, i, a = Array(16);
|
|
219
|
-
for (n = 0, r = 0; r < v - 1; r++) for (
|
|
220
|
-
for (
|
|
221
|
-
for (i >>= 7; r < x; r++) for (
|
|
219
|
+
for (n = 0, r = 0; r < v - 1; r++) for (oe[r] = n, e = 0; e < 1 << j[r]; e++) ae[n++] = r;
|
|
220
|
+
for (ae[n - 1] = r, i = 0, r = 0; r < 16; r++) for (se[r] = i, e = 0; e < 1 << M[r]; e++) ie[i++] = r;
|
|
221
|
+
for (i >>= 7; r < x; r++) for (se[r] = i << 7, e = 0; e < 1 << M[r] - 7; e++) ie[256 + i++] = r;
|
|
222
222
|
for (t = 0; t <= w; t++) a[t] = 0;
|
|
223
|
-
for (e = 0; e <= 143;)
|
|
224
|
-
for (; e <= 255;)
|
|
225
|
-
for (; e <= 279;)
|
|
226
|
-
for (; e <= 287;)
|
|
227
|
-
for (
|
|
228
|
-
|
|
229
|
-
},
|
|
223
|
+
for (e = 0; e <= 143;) N[e * 2 + 1] = 8, e++, a[8]++;
|
|
224
|
+
for (; e <= 255;) N[e * 2 + 1] = 9, e++, a[9]++;
|
|
225
|
+
for (; e <= 279;) N[e * 2 + 1] = 7, e++, a[7]++;
|
|
226
|
+
for (; e <= 287;) N[e * 2 + 1] = 8, e++, a[8]++;
|
|
227
|
+
for (ye(N, 287, a), e = 0; e < x; e++) re[e * 2 + 1] = 5, re[e * 2] = ge(e, 5);
|
|
228
|
+
le = new ce(N, j, 257, b, w), ue = new ce(re, M, 0, x, w), de = new ce([], ee, 0, S, E);
|
|
229
|
+
}, xe = (e) => {
|
|
230
230
|
let t;
|
|
231
231
|
for (t = 0; t < b; t++) e.dyn_ltree[t * 2] = 0;
|
|
232
232
|
for (t = 0; t < x; t++) e.dyn_dtree[t * 2] = 0;
|
|
233
233
|
for (t = 0; t < S; t++) e.bl_tree[t * 2] = 0;
|
|
234
234
|
e.dyn_ltree[D * 2] = 1, e.opt_len = e.static_len = 0, e.sym_next = e.matches = 0;
|
|
235
|
-
},
|
|
236
|
-
e.bi_valid > 8 ?
|
|
237
|
-
},
|
|
235
|
+
}, Se = (e) => {
|
|
236
|
+
e.bi_valid > 8 ? me(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
|
|
237
|
+
}, Ce = (e, t, n, r) => {
|
|
238
238
|
let i = t * 2, a = n * 2;
|
|
239
239
|
return e[i] < e[a] || e[i] === e[a] && r[t] <= r[n];
|
|
240
|
-
},
|
|
240
|
+
}, we = (e, t, n) => {
|
|
241
241
|
let r = e.heap[n], i = n << 1;
|
|
242
|
-
for (; i <= e.heap_len && (i < e.heap_len &&
|
|
242
|
+
for (; i <= e.heap_len && (i < e.heap_len && Ce(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !Ce(t, r, e.heap[i], e.depth));) e.heap[n] = e.heap[i], n = i, i <<= 1;
|
|
243
243
|
e.heap[n] = r;
|
|
244
|
-
},
|
|
244
|
+
}, Te = (e, t, n) => {
|
|
245
245
|
let r, i, a = 0, o, s;
|
|
246
246
|
if (e.sym_next !== 0) do
|
|
247
|
-
r = e.pending_buf[e.sym_buf + a++] & 255, r += (e.pending_buf[e.sym_buf + a++] & 255) << 8, i = e.pending_buf[e.sym_buf + a++], r === 0 ?
|
|
247
|
+
r = e.pending_buf[e.sym_buf + a++] & 255, r += (e.pending_buf[e.sym_buf + a++] & 255) << 8, i = e.pending_buf[e.sym_buf + a++], r === 0 ? he(e, i, t) : (o = ae[i], he(e, o + y + 1, t), s = j[o], s !== 0 && (i -= oe[o], P(e, i, s)), r--, o = pe(r), he(e, o, n), s = M[o], s !== 0 && (r -= se[o], P(e, r, s)));
|
|
248
248
|
while (a < e.sym_next);
|
|
249
|
-
|
|
250
|
-
},
|
|
249
|
+
he(e, D, t);
|
|
250
|
+
}, Ee = (e, t) => {
|
|
251
251
|
let n = t.dyn_tree, r = t.stat_desc.static_tree, i = t.stat_desc.has_stree, a = t.stat_desc.elems, o, s, c = -1, l;
|
|
252
252
|
for (e.heap_len = 0, e.heap_max = C, o = 0; o < a; o++) n[o * 2] === 0 ? n[o * 2 + 1] = 0 : (e.heap[++e.heap_len] = c = o, e.depth[o] = 0);
|
|
253
253
|
for (; e.heap_len < 2;) l = e.heap[++e.heap_len] = c < 2 ? ++c : 0, n[l * 2] = 1, e.depth[l] = 0, e.opt_len--, i && (e.static_len -= r[l * 2 + 1]);
|
|
254
|
-
for (t.max_code = c, o = e.heap_len >> 1; o >= 1; o--)
|
|
254
|
+
for (t.max_code = c, o = e.heap_len >> 1; o >= 1; o--) we(e, n, o);
|
|
255
255
|
l = a;
|
|
256
256
|
do
|
|
257
|
-
o = e.heap[1], e.heap[1] = e.heap[e.heap_len--],
|
|
257
|
+
o = e.heap[1], e.heap[1] = e.heap[e.heap_len--], we(e, n, 1), s = e.heap[1], e.heap[--e.heap_max] = o, e.heap[--e.heap_max] = s, n[l * 2] = n[o * 2] + n[s * 2], e.depth[l] = (e.depth[o] >= e.depth[s] ? e.depth[o] : e.depth[s]) + 1, n[o * 2 + 1] = n[s * 2 + 1] = l, e.heap[1] = l++, we(e, n, 1);
|
|
258
258
|
while (e.heap_len >= 2);
|
|
259
|
-
e.heap[--e.heap_max] = e.heap[1],
|
|
260
|
-
},
|
|
259
|
+
e.heap[--e.heap_max] = e.heap[1], ve(e, t), ye(n, c, e.bl_count);
|
|
260
|
+
}, De = (e, t, n) => {
|
|
261
261
|
let r, i = -1, a, o = t[1], s = 0, c = 7, l = 4;
|
|
262
262
|
for (o === 0 && (c = 138, l = 3), t[(n + 1) * 2 + 1] = 65535, r = 0; r <= n; r++) a = o, o = t[(r + 1) * 2 + 1], !(++s < c && a === o) && (s < l ? e.bl_tree[a * 2] += s : a === 0 ? s <= 10 ? e.bl_tree[k * 2]++ : e.bl_tree[A * 2]++ : (a !== i && e.bl_tree[a * 2]++, e.bl_tree[O * 2]++), s = 0, i = a, o === 0 ? (c = 138, l = 3) : a === o ? (c = 6, l = 3) : (c = 7, l = 4));
|
|
263
|
-
},
|
|
263
|
+
}, Oe = (e, t, n) => {
|
|
264
264
|
let r, i = -1, a, o = t[1], s = 0, c = 7, l = 4;
|
|
265
265
|
for (o === 0 && (c = 138, l = 3), r = 0; r <= n; r++) if (a = o, o = t[(r + 1) * 2 + 1], !(++s < c && a === o)) {
|
|
266
266
|
if (s < l) do
|
|
267
|
-
|
|
267
|
+
he(e, a, e.bl_tree);
|
|
268
268
|
while (--s !== 0);
|
|
269
|
-
else a === 0 ? s <= 10 ? (
|
|
269
|
+
else a === 0 ? s <= 10 ? (he(e, k, e.bl_tree), P(e, s - 3, 3)) : (he(e, A, e.bl_tree), P(e, s - 11, 7)) : (a !== i && (he(e, a, e.bl_tree), s--), he(e, O, e.bl_tree), P(e, s - 3, 2));
|
|
270
270
|
s = 0, i = a, o === 0 ? (c = 138, l = 3) : a === o ? (c = 6, l = 3) : (c = 7, l = 4);
|
|
271
271
|
}
|
|
272
|
-
},
|
|
272
|
+
}, ke = (e) => {
|
|
273
273
|
let t;
|
|
274
|
-
for (
|
|
274
|
+
for (De(e, e.dyn_ltree, e.l_desc.max_code), De(e, e.dyn_dtree, e.d_desc.max_code), Ee(e, e.bl_desc), t = S - 1; t >= 3 && e.bl_tree[te[t] * 2 + 1] === 0; t--);
|
|
275
275
|
return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
|
|
276
|
-
},
|
|
276
|
+
}, Ae = (e, t, n, r) => {
|
|
277
277
|
let i;
|
|
278
|
-
for (
|
|
279
|
-
|
|
280
|
-
},
|
|
278
|
+
for (P(e, t - 257, 5), P(e, n - 1, 5), P(e, r - 4, 4), i = 0; i < r; i++) P(e, e.bl_tree[te[i] * 2 + 1], 3);
|
|
279
|
+
Oe(e, e.dyn_ltree, t - 1), Oe(e, e.dyn_dtree, n - 1);
|
|
280
|
+
}, je = (e) => {
|
|
281
281
|
let t = 4093624447, n;
|
|
282
282
|
for (n = 0; n <= 31; n++, t >>>= 1) if (t & 1 && e.dyn_ltree[n * 2] !== 0) return d;
|
|
283
283
|
if (e.dyn_ltree[18] !== 0 || e.dyn_ltree[20] !== 0 || e.dyn_ltree[26] !== 0) return f;
|
|
284
284
|
for (n = 32; n < y; n++) if (e.dyn_ltree[n * 2] !== 0) return f;
|
|
285
285
|
return d;
|
|
286
|
-
},
|
|
287
|
-
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
},
|
|
291
|
-
|
|
292
|
-
},
|
|
286
|
+
}, Me = !1, Ne = (e) => {
|
|
287
|
+
Me || (be(), Me = !0), e.l_desc = new fe(e.dyn_ltree, le), e.d_desc = new fe(e.dyn_dtree, ue), e.bl_desc = new fe(e.bl_tree, de), e.bi_buf = 0, e.bi_valid = 0, xe(e);
|
|
288
|
+
}, Pe = (e, t, n, r) => {
|
|
289
|
+
P(e, (h << 1) + +!!r, 3), Se(e), me(e, n), me(e, ~n), n && e.pending_buf.set(e.window.subarray(t, t + n), e.pending), e.pending += n;
|
|
290
|
+
}, Fe = (e) => {
|
|
291
|
+
P(e, g << 1, 3), he(e, D, N), _e(e);
|
|
292
|
+
}, Ie = (e, t, n, r) => {
|
|
293
293
|
let i, a, o = 0;
|
|
294
|
-
e.level > 0 ? (e.strm.data_type === p && (e.strm.data_type =
|
|
295
|
-
},
|
|
294
|
+
e.level > 0 ? (e.strm.data_type === p && (e.strm.data_type = je(e)), Ee(e, e.l_desc), Ee(e, e.d_desc), o = ke(e), i = e.opt_len + 3 + 7 >>> 3, a = e.static_len + 3 + 7 >>> 3, a <= i && (i = a)) : i = a = n + 5, n + 4 <= i && t !== -1 ? Pe(e, t, n, r) : e.strategy === u || a === i ? (P(e, (g << 1) + +!!r, 3), Te(e, N, re)) : (P(e, (_ << 1) + +!!r, 3), Ae(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, o + 1), Te(e, e.dyn_ltree, e.dyn_dtree)), xe(e), r && Se(e);
|
|
295
|
+
}, Le = (e, t, n) => (e.pending_buf[e.sym_buf + e.sym_next++] = t, e.pending_buf[e.sym_buf + e.sym_next++] = t >> 8, e.pending_buf[e.sym_buf + e.sym_next++] = n, t === 0 ? e.dyn_ltree[n * 2]++ : (e.matches++, t--, e.dyn_ltree[(ae[n] + y + 1) * 2]++, e.dyn_dtree[pe(t) * 2]++), e.sym_next === e.sym_end), Re = (e, t, n, r) => {
|
|
296
296
|
let i = e & 65535 | 0, a = e >>> 16 & 65535 | 0, o = 0;
|
|
297
297
|
for (; n !== 0;) {
|
|
298
298
|
o = n > 2e3 ? 2e3 : n, n -= o;
|
|
@@ -302,7 +302,7 @@ var le = class {
|
|
|
302
302
|
i %= 65521, a %= 65521;
|
|
303
303
|
}
|
|
304
304
|
return i | a << 16 | 0;
|
|
305
|
-
},
|
|
305
|
+
}, ze = new Uint32Array((() => {
|
|
306
306
|
let e, t = [];
|
|
307
307
|
for (var n = 0; n < 256; n++) {
|
|
308
308
|
e = n;
|
|
@@ -310,12 +310,12 @@ var le = class {
|
|
|
310
310
|
t[n] = e;
|
|
311
311
|
}
|
|
312
312
|
return t;
|
|
313
|
-
})()),
|
|
314
|
-
let i =
|
|
313
|
+
})()), F = (e, t, n, r) => {
|
|
314
|
+
let i = ze, a = r + n;
|
|
315
315
|
e ^= -1;
|
|
316
316
|
for (let n = r; n < a; n++) e = e >>> 8 ^ i[(e ^ t[n]) & 255];
|
|
317
317
|
return e ^ -1;
|
|
318
|
-
},
|
|
318
|
+
}, Be = {
|
|
319
319
|
2: "need dictionary",
|
|
320
320
|
1: "stream end",
|
|
321
321
|
0: "",
|
|
@@ -325,10 +325,10 @@ var le = class {
|
|
|
325
325
|
"-4": "insufficient memory",
|
|
326
326
|
"-5": "buffer error",
|
|
327
327
|
"-6": "incompatible version"
|
|
328
|
-
},
|
|
328
|
+
}, Ve = 9, He = 573, I = 3, Ue = 258, We = 262, Ge = 32, Ke = 42, qe = 57, Je = 69, Ye = 73, Xe = 91, Ze = 103, Qe = 113, $e = 666, L = 1, et = 2, tt = 3, nt = 4, rt = 3, it = (e, t) => (e.msg = Be[t], t), at = (e) => e * 2 - (e > 4 ? 9 : 0), ot = (e) => {
|
|
329
329
|
let t = e.length;
|
|
330
330
|
for (; --t >= 0;) e[t] = 0;
|
|
331
|
-
},
|
|
331
|
+
}, st = (e) => {
|
|
332
332
|
let t, n, r, i = e.w_size;
|
|
333
333
|
t = e.hash_size, r = t;
|
|
334
334
|
do
|
|
@@ -338,254 +338,254 @@ var le = class {
|
|
|
338
338
|
do
|
|
339
339
|
n = e.prev[--r], e.prev[r] = n >= i ? n - i : 0;
|
|
340
340
|
while (--t);
|
|
341
|
-
},
|
|
341
|
+
}, ct = (e, t, n) => (t << e.hash_shift ^ n) & e.hash_mask, lt = (e, t) => {
|
|
342
342
|
let n;
|
|
343
|
-
if (e.legacy_hash) n = e.ins_h =
|
|
343
|
+
if (e.legacy_hash) n = e.ins_h = ct(e, e.ins_h, e.window[t + I - 1]);
|
|
344
344
|
else {
|
|
345
345
|
let r = e.window, i = r[t] | r[t + 1] << 8 | r[t + 2] << 16 | r[t + 3] << 24;
|
|
346
346
|
n = e.ins_h = Math.imul(i, 66521) + 66521 >>> 16 & e.hash_mask;
|
|
347
347
|
}
|
|
348
348
|
let r = e.prev[t & e.w_mask] = e.head[n];
|
|
349
349
|
return e.head[n] = t, r;
|
|
350
|
-
},
|
|
350
|
+
}, R = (e) => {
|
|
351
351
|
let t = e.state, n = t.pending;
|
|
352
352
|
n > e.avail_out && (n = e.avail_out), n !== 0 && (e.output.set(t.pending_buf.subarray(t.pending_out, t.pending_out + n), e.next_out), e.next_out += n, t.pending_out += n, e.total_out += n, e.avail_out -= n, t.pending -= n, t.pending === 0 && (t.pending_out = 0));
|
|
353
|
-
}, R = (e, t) => {
|
|
354
|
-
Le(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, L(e.strm);
|
|
355
353
|
}, z = (e, t) => {
|
|
354
|
+
Ie(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, R(e.strm);
|
|
355
|
+
}, B = (e, t) => {
|
|
356
356
|
e.pending_buf[e.pending++] = t;
|
|
357
|
-
},
|
|
357
|
+
}, ut = (e, t) => {
|
|
358
358
|
e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = t & 255;
|
|
359
|
-
},
|
|
359
|
+
}, dt = (e, t, n, r) => {
|
|
360
360
|
let i = e.avail_in;
|
|
361
|
-
return i > r && (i = r), i === 0 ? 0 : (e.avail_in -= i, t.set(e.input.subarray(e.next_in, e.next_in + i), n), e.state.wrap === 1 ? e.adler =
|
|
362
|
-
},
|
|
363
|
-
let n = e.max_chain_length, r = e.strstart, i, a, o = e.prev_length, s = e.nice_match, c = e.strstart > e.w_size -
|
|
361
|
+
return i > r && (i = r), i === 0 ? 0 : (e.avail_in -= i, t.set(e.input.subarray(e.next_in, e.next_in + i), n), e.state.wrap === 1 ? e.adler = Re(e.adler, t, i, n) : e.state.wrap === 2 && (e.adler = F(e.adler, t, i, n)), e.next_in += i, e.total_in += i, i);
|
|
362
|
+
}, ft = (e, t) => {
|
|
363
|
+
let n = e.max_chain_length, r = e.strstart, i, a, o = e.prev_length, s = e.nice_match, c = e.strstart > e.w_size - We ? e.strstart - (e.w_size - We) : 0, l = e.window, u = e.w_mask, d = e.prev, f = e.strstart + Ue, p = l[r + o - 1], m = l[r + o];
|
|
364
364
|
e.prev_length >= e.good_match && (n >>= 2), s > e.lookahead && (s = e.lookahead);
|
|
365
365
|
do {
|
|
366
366
|
if (i = t, l[i + o] !== m || l[i + o - 1] !== p || l[i] !== l[r] || l[++i] !== l[r + 1]) continue;
|
|
367
367
|
r += 2, i++;
|
|
368
368
|
do ;
|
|
369
369
|
while (l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && r < f);
|
|
370
|
-
if (a =
|
|
370
|
+
if (a = Ue - (f - r), r = f - Ue, a > o) {
|
|
371
371
|
if (e.match_start = t, o = a, a >= s) break;
|
|
372
372
|
p = l[r + o - 1], m = l[r + o];
|
|
373
373
|
}
|
|
374
374
|
} while ((t = d[t & u]) > c && --n !== 0);
|
|
375
375
|
return o <= e.lookahead ? o : e.lookahead;
|
|
376
|
-
},
|
|
376
|
+
}, pt = (e) => {
|
|
377
377
|
let t = e.w_size, n, r, i;
|
|
378
378
|
do {
|
|
379
|
-
if (r = e.window_size - e.lookahead - e.strstart, e.strstart >= t + (t -
|
|
380
|
-
if (n =
|
|
381
|
-
if (e.lookahead + e.insert >
|
|
382
|
-
} else if (e.lookahead + e.insert >=
|
|
383
|
-
} while (e.lookahead <
|
|
384
|
-
},
|
|
379
|
+
if (r = e.window_size - e.lookahead - e.strstart, e.strstart >= t + (t - We) && (e.window.set(e.window.subarray(t, t + t - r), 0), e.match_start -= t, e.strstart -= t, e.block_start -= t, e.insert > e.strstart && (e.insert = e.strstart), st(e), r += t), e.strm.avail_in === 0) break;
|
|
380
|
+
if (n = dt(e.strm, e.window, e.strstart + e.lookahead, r), e.lookahead += n, !e.legacy_hash) {
|
|
381
|
+
if (e.lookahead + e.insert > I) for (i = e.strstart - e.insert; e.insert && (lt(e, i), i++, e.insert--, !(e.lookahead + e.insert <= I)););
|
|
382
|
+
} else if (e.lookahead + e.insert >= I) for (i = e.strstart - e.insert, e.ins_h = e.window[i], e.ins_h = ct(e, e.ins_h, e.window[i + 1]); e.insert && (lt(e, i), i++, e.insert--, !(e.lookahead + e.insert < I)););
|
|
383
|
+
} while (e.lookahead < We && e.strm.avail_in !== 0);
|
|
384
|
+
}, mt = (e, t) => {
|
|
385
385
|
let n = e.pending_buf_size - 5 > e.w_size ? e.w_size : e.pending_buf_size - 5, r, i, a, o = 0, s = e.strm.avail_in;
|
|
386
386
|
do {
|
|
387
387
|
if (r = 65535, a = e.bi_valid + 42 >> 3, e.strm.avail_out < a || (a = e.strm.avail_out - a, i = e.strstart - e.block_start, r > i + e.strm.avail_in && (r = i + e.strm.avail_in), r > a && (r = a), r < n && (r === 0 && t !== 4 || t === 0 || r !== i + e.strm.avail_in))) break;
|
|
388
|
-
o = +(t === 4 && r === i + e.strm.avail_in),
|
|
388
|
+
o = +(t === 4 && r === i + e.strm.avail_in), Pe(e, 0, 0, o), e.pending_buf[e.pending - 4] = r, e.pending_buf[e.pending - 3] = r >> 8, e.pending_buf[e.pending - 2] = ~r, e.pending_buf[e.pending - 1] = ~r >> 8, R(e.strm), i && (i > r && (i = r), e.strm.output.set(e.window.subarray(e.block_start, e.block_start + i), e.strm.next_out), e.strm.next_out += i, e.strm.avail_out -= i, e.strm.total_out += i, e.block_start += i, r -= i), r && (dt(e.strm, e.strm.output, e.strm.next_out, r), e.strm.next_out += r, e.strm.avail_out -= r, e.strm.total_out += r);
|
|
389
389
|
} while (o === 0);
|
|
390
|
-
return s -= e.strm.avail_in, s && (s >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= s && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - s, e.strm.next_in), e.strstart), e.strstart += s, e.insert += s > e.w_size - e.insert ? e.w_size - e.insert : s), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), o ?
|
|
391
|
-
},
|
|
390
|
+
return s -= e.strm.avail_in, s && (s >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= s && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - s, e.strm.next_in), e.strstart), e.strstart += s, e.insert += s > e.w_size - e.insert ? e.w_size - e.insert : s), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), o ? nt : t !== 0 && t !== 4 && e.strm.avail_in === 0 && e.strstart === e.block_start ? et : (a = e.window_size - e.strstart, e.strm.avail_in > a && e.block_start >= e.w_size && (e.block_start -= e.w_size, e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, a += e.w_size, e.insert > e.strstart && (e.insert = e.strstart)), a > e.strm.avail_in && (a = e.strm.avail_in), a && (dt(e.strm, e.window, e.strstart, a), e.strstart += a, e.insert += a > e.w_size - e.insert ? e.w_size - e.insert : a), e.high_water < e.strstart && (e.high_water = e.strstart), a = e.bi_valid + 42 >> 3, a = e.pending_buf_size - a > 65535 ? 65535 : e.pending_buf_size - a, n = a > e.w_size ? e.w_size : a, i = e.strstart - e.block_start, (i >= n || (i || t === 4) && t !== 0 && e.strm.avail_in === 0 && i <= a) && (r = i > a ? a : i, o = +(t === 4 && e.strm.avail_in === 0 && r === i), Pe(e, e.block_start, r, o), e.block_start += r, R(e.strm)), o ? tt : L);
|
|
391
|
+
}, ht = (e, t) => {
|
|
392
392
|
let n, r;
|
|
393
393
|
for (;;) {
|
|
394
|
-
if (e.lookahead <
|
|
395
|
-
if (
|
|
394
|
+
if (e.lookahead < We) {
|
|
395
|
+
if (pt(e), e.lookahead < We && t === 0) return L;
|
|
396
396
|
if (e.lookahead === 0) break;
|
|
397
397
|
}
|
|
398
|
-
if (n = 0, e.lookahead >=
|
|
398
|
+
if (n = 0, e.lookahead >= I && (n = lt(e, e.strstart)), n !== 0 && e.strstart - n <= e.w_size - We && (e.match_length = ft(e, n)), e.match_length >= I) if (r = Le(e, e.strstart - e.match_start, e.match_length - I), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= I) {
|
|
399
399
|
e.match_length--;
|
|
400
400
|
do
|
|
401
|
-
e.strstart++, n =
|
|
401
|
+
e.strstart++, n = lt(e, e.strstart);
|
|
402
402
|
while (--e.match_length !== 0);
|
|
403
403
|
e.strstart++;
|
|
404
|
-
} else e.strstart += e.match_length, e.match_length = 0, e.legacy_hash && (e.ins_h = e.window[e.strstart], e.ins_h =
|
|
405
|
-
else r =
|
|
406
|
-
if (r && (
|
|
404
|
+
} else e.strstart += e.match_length, e.match_length = 0, e.legacy_hash && (e.ins_h = e.window[e.strstart], e.ins_h = ct(e, e.ins_h, e.window[e.strstart + 1]));
|
|
405
|
+
else r = Le(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
|
|
406
|
+
if (r && (z(e, !1), e.strm.avail_out === 0)) return L;
|
|
407
407
|
}
|
|
408
|
-
return e.insert = e.strstart <
|
|
409
|
-
},
|
|
408
|
+
return e.insert = e.strstart < I - 1 ? e.strstart : I - 1, t === 4 ? (z(e, !0), e.strm.avail_out === 0 ? tt : nt) : e.sym_next && (z(e, !1), e.strm.avail_out === 0) ? L : et;
|
|
409
|
+
}, gt = (e, t) => {
|
|
410
410
|
let n, r, i;
|
|
411
411
|
for (;;) {
|
|
412
|
-
if (e.lookahead <
|
|
413
|
-
if (
|
|
412
|
+
if (e.lookahead < We) {
|
|
413
|
+
if (pt(e), e.lookahead < We && t === 0) return L;
|
|
414
414
|
if (e.lookahead === 0) break;
|
|
415
415
|
}
|
|
416
|
-
if (n = 0, e.lookahead >=
|
|
417
|
-
i = e.strstart + e.lookahead -
|
|
416
|
+
if (n = 0, e.lookahead >= I && (n = lt(e, e.strstart)), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = I - 1, n !== 0 && e.prev_length < e.max_lazy_match && e.strstart - n <= e.w_size - We && (e.match_length = ft(e, n), e.match_length <= 5 && (e.strategy === 1 || e.match_length === I && e.strstart - e.match_start > 4096) && (e.match_length = I - 1)), e.prev_length >= I && e.match_length <= e.prev_length) {
|
|
417
|
+
i = e.strstart + e.lookahead - I, r = Le(e, e.strstart - 1 - e.prev_match, e.prev_length - I), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
|
|
418
418
|
do
|
|
419
|
-
++e.strstart <= i && (n =
|
|
419
|
+
++e.strstart <= i && (n = lt(e, e.strstart));
|
|
420
420
|
while (--e.prev_length !== 0);
|
|
421
|
-
if (e.match_available = 0, e.match_length =
|
|
421
|
+
if (e.match_available = 0, e.match_length = I - 1, e.strstart++, r && (z(e, !1), e.strm.avail_out === 0)) return L;
|
|
422
422
|
} else if (e.match_available) {
|
|
423
|
-
if (r =
|
|
423
|
+
if (r = Le(e, 0, e.window[e.strstart - 1]), r && z(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0) return L;
|
|
424
424
|
} else e.match_available = 1, e.strstart++, e.lookahead--;
|
|
425
425
|
}
|
|
426
|
-
return e.match_available && (r =
|
|
427
|
-
},
|
|
426
|
+
return e.match_available && (r = Le(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < I - 1 ? e.strstart : I - 1, t === 4 ? (z(e, !0), e.strm.avail_out === 0 ? tt : nt) : e.sym_next && (z(e, !1), e.strm.avail_out === 0) ? L : et;
|
|
427
|
+
}, _t = (e, t) => {
|
|
428
428
|
let n, r, i, a, o = e.window;
|
|
429
429
|
for (;;) {
|
|
430
|
-
if (e.lookahead <=
|
|
431
|
-
if (
|
|
430
|
+
if (e.lookahead <= Ue) {
|
|
431
|
+
if (pt(e), e.lookahead <= Ue && t === 0) return L;
|
|
432
432
|
if (e.lookahead === 0) break;
|
|
433
433
|
}
|
|
434
|
-
if (e.match_length = 0, e.lookahead >=
|
|
435
|
-
a = e.strstart +
|
|
434
|
+
if (e.match_length = 0, e.lookahead >= I && e.strstart > 0 && (i = e.strstart - 1, r = o[i], r === o[++i] && r === o[++i] && r === o[++i])) {
|
|
435
|
+
a = e.strstart + Ue;
|
|
436
436
|
do ;
|
|
437
437
|
while (r === o[++i] && r === o[++i] && r === o[++i] && r === o[++i] && r === o[++i] && r === o[++i] && r === o[++i] && r === o[++i] && i < a);
|
|
438
|
-
e.match_length =
|
|
438
|
+
e.match_length = Ue - (a - i), e.match_length > e.lookahead && (e.match_length = e.lookahead);
|
|
439
439
|
}
|
|
440
|
-
if (e.match_length >=
|
|
440
|
+
if (e.match_length >= I ? (n = Le(e, 1, e.match_length - I), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (n = Le(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), n && (z(e, !1), e.strm.avail_out === 0)) return L;
|
|
441
441
|
}
|
|
442
|
-
return e.insert = 0, t === 4 ? (
|
|
443
|
-
},
|
|
442
|
+
return e.insert = 0, t === 4 ? (z(e, !0), e.strm.avail_out === 0 ? tt : nt) : e.sym_next && (z(e, !1), e.strm.avail_out === 0) ? L : et;
|
|
443
|
+
}, vt = (e, t) => {
|
|
444
444
|
let n;
|
|
445
445
|
for (;;) {
|
|
446
|
-
if (e.lookahead === 0 && (
|
|
447
|
-
if (t === 0) return
|
|
446
|
+
if (e.lookahead === 0 && (pt(e), e.lookahead === 0)) {
|
|
447
|
+
if (t === 0) return L;
|
|
448
448
|
break;
|
|
449
449
|
}
|
|
450
|
-
if (e.match_length = 0, n =
|
|
450
|
+
if (e.match_length = 0, n = Le(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (z(e, !1), e.strm.avail_out === 0)) return L;
|
|
451
451
|
}
|
|
452
|
-
return e.insert = 0, t === 4 ? (
|
|
453
|
-
},
|
|
452
|
+
return e.insert = 0, t === 4 ? (z(e, !0), e.strm.avail_out === 0 ? tt : nt) : e.sym_next && (z(e, !1), e.strm.avail_out === 0) ? L : et;
|
|
453
|
+
}, yt = class {
|
|
454
454
|
constructor(e, t, n, r, i) {
|
|
455
455
|
this.good_length = e, this.max_lazy = t, this.nice_length = n, this.max_chain = r, this.func = i;
|
|
456
456
|
}
|
|
457
|
-
},
|
|
458
|
-
new
|
|
459
|
-
new
|
|
460
|
-
new
|
|
461
|
-
new
|
|
462
|
-
new
|
|
463
|
-
new
|
|
464
|
-
new
|
|
465
|
-
new
|
|
466
|
-
new
|
|
467
|
-
new
|
|
468
|
-
],
|
|
469
|
-
e.window_size = 2 * e.w_size,
|
|
470
|
-
},
|
|
457
|
+
}, bt = [
|
|
458
|
+
new yt(0, 0, 0, 0, mt),
|
|
459
|
+
new yt(4, 4, 8, 4, ht),
|
|
460
|
+
new yt(4, 5, 16, 8, ht),
|
|
461
|
+
new yt(4, 6, 32, 32, ht),
|
|
462
|
+
new yt(4, 4, 16, 16, gt),
|
|
463
|
+
new yt(8, 16, 32, 32, gt),
|
|
464
|
+
new yt(8, 16, 128, 128, gt),
|
|
465
|
+
new yt(8, 32, 128, 256, gt),
|
|
466
|
+
new yt(32, 128, 258, 1024, gt),
|
|
467
|
+
new yt(32, 258, 258, 4096, gt)
|
|
468
|
+
], xt = (e) => {
|
|
469
|
+
e.window_size = 2 * e.w_size, ot(e.head), e.max_lazy_match = bt[e.level].max_lazy, e.good_match = bt[e.level].good_length, e.nice_match = bt[e.level].nice_length, e.max_chain_length = bt[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = I - 1, e.match_available = 0, e.ins_h = 0;
|
|
470
|
+
}, St = class {
|
|
471
471
|
constructor() {
|
|
472
|
-
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = 8, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.legacy_hash = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(
|
|
472
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = 8, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.legacy_hash = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(He * 2), this.dyn_dtree = /* @__PURE__ */ new Uint16Array(122), this.bl_tree = /* @__PURE__ */ new Uint16Array(78), ot(this.dyn_ltree), ot(this.dyn_dtree), ot(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = /* @__PURE__ */ new Uint16Array(16), this.heap = /* @__PURE__ */ new Uint16Array(573), ot(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = /* @__PURE__ */ new Uint16Array(573), ot(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
473
473
|
}
|
|
474
|
-
},
|
|
474
|
+
}, Ct = (e) => {
|
|
475
475
|
if (!e) return 1;
|
|
476
476
|
let t = e.state;
|
|
477
|
-
return +(!t || t.strm !== e || t.status !==
|
|
478
|
-
},
|
|
479
|
-
if (
|
|
477
|
+
return +(!t || t.strm !== e || t.status !== Ke && t.status !== qe && t.status !== Je && t.status !== Ye && t.status !== Xe && t.status !== Ze && t.status !== Qe && t.status !== $e);
|
|
478
|
+
}, wt = (e) => {
|
|
479
|
+
if (Ct(e)) return it(e, -2);
|
|
480
480
|
e.total_in = e.total_out = 0, e.data_type = 2;
|
|
481
481
|
let t = e.state;
|
|
482
|
-
return t.pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap === 2 ?
|
|
483
|
-
},
|
|
484
|
-
let t =
|
|
485
|
-
return t === 0 &&
|
|
486
|
-
},
|
|
482
|
+
return t.pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap === 2 ? qe : t.wrap ? Ke : Qe, e.adler = t.wrap === 2 ? 0 : 1, t.last_flush = -2, Ne(t), 0;
|
|
483
|
+
}, Tt = (e) => {
|
|
484
|
+
let t = wt(e);
|
|
485
|
+
return t === 0 && xt(e.state), t;
|
|
486
|
+
}, Et = (e, t, n, r, i, a, o) => {
|
|
487
487
|
if (!e) return -2;
|
|
488
488
|
let s = 1;
|
|
489
|
-
if (t === -1 && (t = 6), r < 0 ? (s = 0, r = -r) : r > 15 && (s = 2, r -= 16), i < 1 || i >
|
|
489
|
+
if (t === -1 && (t = 6), r < 0 ? (s = 0, r = -r) : r > 15 && (s = 2, r -= 16), i < 1 || i > Ve || n !== 8 || r < 8 || r > 15 || t < 0 || t > 9 || a < 0 || a > 4 || r === 8 && s !== 1) return it(e, -2);
|
|
490
490
|
r === 8 && (r = 9);
|
|
491
|
-
let c = new
|
|
492
|
-
return e.state = c, c.strm = e, c.status =
|
|
493
|
-
},
|
|
494
|
-
if (
|
|
491
|
+
let c = new St();
|
|
492
|
+
return e.state = c, c.strm = e, c.status = Ke, c.wrap = s, c.gzhead = null, c.w_bits = r, c.w_size = 1 << c.w_bits, c.w_mask = c.w_size - 1, c.legacy_hash = +!!o, c.hash_bits = i + 7, !c.legacy_hash && c.hash_bits < 15 && (c.hash_bits = 15), c.hash_size = 1 << c.hash_bits, c.hash_mask = c.hash_size - 1, c.hash_shift = ~~((c.hash_bits + I - 1) / I), c.window = new Uint8Array(c.w_size * 2), c.head = new Uint16Array(c.hash_size), c.prev = new Uint16Array(c.w_size), c.lit_bufsize = 1 << i + 6, c.pending_buf_size = c.lit_bufsize * 4, c.pending_buf = new Uint8Array(c.pending_buf_size), c.sym_buf = c.lit_bufsize, c.sym_end = (c.lit_bufsize - 1) * 3, c.level = t, c.strategy = a, c.method = n, Tt(e);
|
|
493
|
+
}, Dt = (e, t) => {
|
|
494
|
+
if (Ct(e) || t > 5 || t < 0) return e ? it(e, -2) : -2;
|
|
495
495
|
let n = e.state;
|
|
496
|
-
if (!e.output || e.avail_in !== 0 && !e.input || n.status ===
|
|
496
|
+
if (!e.output || e.avail_in !== 0 && !e.input || n.status === $e && t !== 4) return it(e, e.avail_out === 0 ? -5 : -2);
|
|
497
497
|
let r = n.last_flush;
|
|
498
498
|
if (n.last_flush = t, n.pending !== 0) {
|
|
499
|
-
if (
|
|
500
|
-
} else if (e.avail_in === 0 &&
|
|
501
|
-
if (n.status ===
|
|
502
|
-
if (n.status ===
|
|
499
|
+
if (R(e), e.avail_out === 0) return n.last_flush = -1, 0;
|
|
500
|
+
} else if (e.avail_in === 0 && at(t) <= at(r) && t !== 4) return it(e, -5);
|
|
501
|
+
if (n.status === $e && e.avail_in !== 0) return it(e, -5);
|
|
502
|
+
if (n.status === Ke && n.wrap === 0 && (n.status = Qe), n.status === Ke) {
|
|
503
503
|
let t = 8 + (n.w_bits - 8 << 4) << 8, r = -1;
|
|
504
|
-
if (r = n.strategy >= 2 || n.level < 2 ? 0 : n.level < 6 ? 1 : n.level === 6 ? 2 : 3, t |= r << 6, n.strstart !== 0 && (t |=
|
|
504
|
+
if (r = n.strategy >= 2 || n.level < 2 ? 0 : n.level < 6 ? 1 : n.level === 6 ? 2 : 3, t |= r << 6, n.strstart !== 0 && (t |= Ge), t += 31 - t % 31, ut(n, t), n.strstart !== 0 && (ut(n, e.adler >>> 16), ut(n, e.adler & 65535)), e.adler = 1, n.status = Qe, R(e), n.pending !== 0) return n.last_flush = -1, 0;
|
|
505
505
|
}
|
|
506
|
-
if (n.status ===
|
|
507
|
-
if (e.adler = 0,
|
|
508
|
-
else if (
|
|
506
|
+
if (n.status === qe) {
|
|
507
|
+
if (e.adler = 0, B(n, 31), B(n, 139), B(n, 8), n.gzhead) B(n, +!!n.gzhead.text + (n.gzhead.hcrc ? 2 : 0) + (n.gzhead.extra ? 4 : 0) + (n.gzhead.name ? 8 : 0) + (n.gzhead.comment ? 16 : 0)), B(n, n.gzhead.time & 255), B(n, n.gzhead.time >> 8 & 255), B(n, n.gzhead.time >> 16 & 255), B(n, n.gzhead.time >> 24 & 255), B(n, n.level === 9 ? 2 : n.strategy >= 2 || n.level < 2 ? 4 : 0), B(n, n.gzhead.os & 255), n.gzhead.extra && n.gzhead.extra.length && (B(n, n.gzhead.extra.length & 255), B(n, n.gzhead.extra.length >> 8 & 255)), n.gzhead.hcrc && (e.adler = F(e.adler, n.pending_buf, n.pending, 0)), n.gzindex = 0, n.status = Je;
|
|
508
|
+
else if (B(n, 0), B(n, 0), B(n, 0), B(n, 0), B(n, 0), B(n, n.level === 9 ? 2 : n.strategy >= 2 || n.level < 2 ? 4 : 0), B(n, rt), n.status = Qe, R(e), n.pending !== 0) return n.last_flush = -1, 0;
|
|
509
509
|
}
|
|
510
|
-
if (n.status ===
|
|
510
|
+
if (n.status === Je) {
|
|
511
511
|
if (n.gzhead.extra) {
|
|
512
512
|
let t = n.pending, r = (n.gzhead.extra.length & 65535) - n.gzindex;
|
|
513
513
|
for (; n.pending + r > n.pending_buf_size;) {
|
|
514
514
|
let i = n.pending_buf_size - n.pending;
|
|
515
|
-
if (n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex, n.gzindex + i), n.pending), n.pending = n.pending_buf_size, n.gzhead.hcrc && n.pending > t && (e.adler =
|
|
515
|
+
if (n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex, n.gzindex + i), n.pending), n.pending = n.pending_buf_size, n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t)), n.gzindex += i, R(e), n.pending !== 0) return n.last_flush = -1, 0;
|
|
516
516
|
t = 0, r -= i;
|
|
517
517
|
}
|
|
518
518
|
let i = new Uint8Array(n.gzhead.extra);
|
|
519
|
-
n.pending_buf.set(i.subarray(n.gzindex, n.gzindex + r), n.pending), n.pending += r, n.gzhead.hcrc && n.pending > t && (e.adler =
|
|
519
|
+
n.pending_buf.set(i.subarray(n.gzindex, n.gzindex + r), n.pending), n.pending += r, n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t)), n.gzindex = 0;
|
|
520
520
|
}
|
|
521
|
-
n.status =
|
|
521
|
+
n.status = Ye;
|
|
522
522
|
}
|
|
523
|
-
if (n.status ===
|
|
523
|
+
if (n.status === Ye) {
|
|
524
524
|
if (n.gzhead.name) {
|
|
525
525
|
let t = n.pending, r;
|
|
526
526
|
do {
|
|
527
527
|
if (n.pending === n.pending_buf_size) {
|
|
528
|
-
if (n.gzhead.hcrc && n.pending > t && (e.adler =
|
|
528
|
+
if (n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t)), R(e), n.pending !== 0) return n.last_flush = -1, 0;
|
|
529
529
|
t = 0;
|
|
530
530
|
}
|
|
531
|
-
r = n.gzindex < n.gzhead.name.length ? n.gzhead.name.charCodeAt(n.gzindex++) & 255 : 0,
|
|
531
|
+
r = n.gzindex < n.gzhead.name.length ? n.gzhead.name.charCodeAt(n.gzindex++) & 255 : 0, B(n, r);
|
|
532
532
|
} while (r !== 0);
|
|
533
|
-
n.gzhead.hcrc && n.pending > t && (e.adler =
|
|
533
|
+
n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t)), n.gzindex = 0;
|
|
534
534
|
}
|
|
535
|
-
n.status =
|
|
535
|
+
n.status = Xe;
|
|
536
536
|
}
|
|
537
|
-
if (n.status ===
|
|
537
|
+
if (n.status === Xe) {
|
|
538
538
|
if (n.gzhead.comment) {
|
|
539
539
|
let t = n.pending, r;
|
|
540
540
|
do {
|
|
541
541
|
if (n.pending === n.pending_buf_size) {
|
|
542
|
-
if (n.gzhead.hcrc && n.pending > t && (e.adler =
|
|
542
|
+
if (n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t)), R(e), n.pending !== 0) return n.last_flush = -1, 0;
|
|
543
543
|
t = 0;
|
|
544
544
|
}
|
|
545
|
-
r = n.gzindex < n.gzhead.comment.length ? n.gzhead.comment.charCodeAt(n.gzindex++) & 255 : 0,
|
|
545
|
+
r = n.gzindex < n.gzhead.comment.length ? n.gzhead.comment.charCodeAt(n.gzindex++) & 255 : 0, B(n, r);
|
|
546
546
|
} while (r !== 0);
|
|
547
|
-
n.gzhead.hcrc && n.pending > t && (e.adler =
|
|
547
|
+
n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t));
|
|
548
548
|
}
|
|
549
|
-
n.status =
|
|
549
|
+
n.status = Ze;
|
|
550
550
|
}
|
|
551
|
-
if (n.status ===
|
|
551
|
+
if (n.status === Ze) {
|
|
552
552
|
if (n.gzhead.hcrc) {
|
|
553
|
-
if (n.pending + 2 > n.pending_buf_size && (
|
|
554
|
-
|
|
553
|
+
if (n.pending + 2 > n.pending_buf_size && (R(e), n.pending !== 0)) return n.last_flush = -1, 0;
|
|
554
|
+
B(n, e.adler & 255), B(n, e.adler >> 8 & 255), e.adler = 0;
|
|
555
555
|
}
|
|
556
|
-
if (n.status =
|
|
556
|
+
if (n.status = Qe, R(e), n.pending !== 0) return n.last_flush = -1, 0;
|
|
557
557
|
}
|
|
558
|
-
if (e.avail_in !== 0 || n.lookahead !== 0 || t !== 0 && n.status !==
|
|
559
|
-
let r = n.level === 0 ?
|
|
560
|
-
if ((r ===
|
|
561
|
-
if (r ===
|
|
558
|
+
if (e.avail_in !== 0 || n.lookahead !== 0 || t !== 0 && n.status !== $e) {
|
|
559
|
+
let r = n.level === 0 ? mt(n, t) : n.strategy === 2 ? vt(n, t) : n.strategy === 3 ? _t(n, t) : bt[n.level].func(n, t);
|
|
560
|
+
if ((r === tt || r === nt) && (n.status = $e), r === L || r === tt) return e.avail_out === 0 && (n.last_flush = -1), 0;
|
|
561
|
+
if (r === et && (t === 1 ? Fe(n) : t !== 5 && (Pe(n, 0, 0, !1), t === 3 && (ot(n.head), n.lookahead === 0 && (n.strstart = 0, n.block_start = 0, n.insert = 0))), R(e), e.avail_out === 0)) return n.last_flush = -1, 0;
|
|
562
562
|
}
|
|
563
|
-
return t === 4 ? n.wrap <= 0 ? 1 : (n.wrap === 2 ? (
|
|
564
|
-
},
|
|
565
|
-
if (
|
|
563
|
+
return t === 4 ? n.wrap <= 0 ? 1 : (n.wrap === 2 ? (B(n, e.adler & 255), B(n, e.adler >> 8 & 255), B(n, e.adler >> 16 & 255), B(n, e.adler >> 24 & 255), B(n, e.total_in & 255), B(n, e.total_in >> 8 & 255), B(n, e.total_in >> 16 & 255), B(n, e.total_in >> 24 & 255)) : (ut(n, e.adler >>> 16), ut(n, e.adler & 65535)), R(e), n.wrap > 0 && (n.wrap = -n.wrap), +(n.pending === 0)) : 0;
|
|
564
|
+
}, Ot = (e) => {
|
|
565
|
+
if (Ct(e)) return -2;
|
|
566
566
|
let t = e.state.status;
|
|
567
|
-
return e.state = null, t ===
|
|
568
|
-
},
|
|
567
|
+
return e.state = null, t === Qe ? it(e, -3) : 0;
|
|
568
|
+
}, kt = (e, t) => {
|
|
569
569
|
let n = t.length;
|
|
570
|
-
if (
|
|
570
|
+
if (Ct(e)) return -2;
|
|
571
571
|
let r = e.state, i = r.wrap;
|
|
572
|
-
if (i === 2 || i === 1 && r.status !==
|
|
573
|
-
if (i === 1 && (e.adler =
|
|
574
|
-
i === 0 && (
|
|
572
|
+
if (i === 2 || i === 1 && r.status !== Ke || r.lookahead) return -2;
|
|
573
|
+
if (i === 1 && (e.adler = Re(e.adler, t, n, 0)), r.wrap = 0, n >= r.w_size) {
|
|
574
|
+
i === 0 && (ot(r.head), r.strstart = 0, r.block_start = 0, r.insert = 0);
|
|
575
575
|
let e = new Uint8Array(r.w_size);
|
|
576
576
|
e.set(t.subarray(n - r.w_size, n), 0), t = e, n = r.w_size;
|
|
577
577
|
}
|
|
578
578
|
let a = e.avail_in, o = e.next_in, s = e.input;
|
|
579
|
-
for (e.avail_in = n, e.next_in = 0, e.input = t,
|
|
580
|
-
let e = r.strstart, t = r.lookahead - (
|
|
579
|
+
for (e.avail_in = n, e.next_in = 0, e.input = t, pt(r); r.lookahead >= I;) {
|
|
580
|
+
let e = r.strstart, t = r.lookahead - (I - 1);
|
|
581
581
|
do
|
|
582
|
-
|
|
582
|
+
lt(r, e), e++;
|
|
583
583
|
while (--t);
|
|
584
|
-
r.strstart = e, r.lookahead =
|
|
584
|
+
r.strstart = e, r.lookahead = I - 1, pt(r);
|
|
585
585
|
}
|
|
586
|
-
return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length =
|
|
587
|
-
},
|
|
588
|
-
function
|
|
586
|
+
return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = I - 1, r.match_available = 0, e.next_in = o, e.input = s, e.avail_in = a, r.wrap = i, 0;
|
|
587
|
+
}, At = 16209, jt = 16191;
|
|
588
|
+
function Mt(e, t) {
|
|
589
589
|
let n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T, E = e.state;
|
|
590
590
|
n = e.next_in, w = e.input, r = n + (e.avail_in - 5), i = e.next_out, T = e.output, a = i - (t - e.avail_out), o = i + (e.avail_out - 257), s = E.dmax, c = E.wsize, l = E.whave, u = E.wnext, d = E.window, f = E.hold, p = E.bits, m = E.lencode, h = E.distcode, g = (1 << E.lenbits) - 1, _ = (1 << E.distbits) - 1;
|
|
591
591
|
top: do {
|
|
@@ -597,12 +597,12 @@ function Nt(e, t) {
|
|
|
597
597
|
dodist: for (;;) {
|
|
598
598
|
if (y = v >>> 24, f >>>= y, p -= y, y = v >>> 16 & 255, y & 16) {
|
|
599
599
|
if (x = v & 65535, y &= 15, p < y && (f += w[n++] << p, p += 8, p < y && (f += w[n++] << p, p += 8)), x += f & (1 << y) - 1, x > s) {
|
|
600
|
-
e.msg = "invalid distance too far back", E.mode =
|
|
600
|
+
e.msg = "invalid distance too far back", E.mode = At;
|
|
601
601
|
break top;
|
|
602
602
|
}
|
|
603
603
|
if (f >>>= y, p -= y, y = i - a, x > y) {
|
|
604
604
|
if (y = x - y, y > l && E.sane) {
|
|
605
|
-
e.msg = "invalid distance too far back", E.mode =
|
|
605
|
+
e.msg = "invalid distance too far back", E.mode = At;
|
|
606
606
|
break top;
|
|
607
607
|
}
|
|
608
608
|
if (S = 0, C = d, u === 0) {
|
|
@@ -644,7 +644,7 @@ function Nt(e, t) {
|
|
|
644
644
|
b && (T[i++] = T[S++], b > 1 && (T[i++] = T[S++]));
|
|
645
645
|
}
|
|
646
646
|
} else if (y & 64) {
|
|
647
|
-
e.msg = "invalid distance code", E.mode =
|
|
647
|
+
e.msg = "invalid distance code", E.mode = At;
|
|
648
648
|
break top;
|
|
649
649
|
} else {
|
|
650
650
|
v = h[(v & 65535) + (f & (1 << y) - 1)];
|
|
@@ -656,10 +656,10 @@ function Nt(e, t) {
|
|
|
656
656
|
v = m[(v & 65535) + (f & (1 << y) - 1)];
|
|
657
657
|
continue dolen;
|
|
658
658
|
} else if (y & 32) {
|
|
659
|
-
E.mode =
|
|
659
|
+
E.mode = jt;
|
|
660
660
|
break top;
|
|
661
661
|
} else {
|
|
662
|
-
e.msg = "invalid literal/length code", E.mode =
|
|
662
|
+
e.msg = "invalid literal/length code", E.mode = At;
|
|
663
663
|
break top;
|
|
664
664
|
}
|
|
665
665
|
break;
|
|
@@ -667,7 +667,7 @@ function Nt(e, t) {
|
|
|
667
667
|
} while (n < r && i < o);
|
|
668
668
|
b = p >> 3, n -= b, p -= b << 3, f &= (1 << p) - 1, e.next_in = n, e.next_out = i, e.avail_in = n < r ? 5 + (r - n) : 5 - (n - r), e.avail_out = i < o ? 257 + (o - i) : 257 - (i - o), E.hold = f, E.bits = p;
|
|
669
669
|
}
|
|
670
|
-
var
|
|
670
|
+
var Nt = 15, Pt = 852, Ft = 592, It = 0, Lt = 1, Rt = 2, zt = new Uint16Array([
|
|
671
671
|
3,
|
|
672
672
|
4,
|
|
673
673
|
5,
|
|
@@ -699,7 +699,7 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
699
699
|
258,
|
|
700
700
|
0,
|
|
701
701
|
0
|
|
702
|
-
]),
|
|
702
|
+
]), Bt = new Uint8Array([
|
|
703
703
|
16,
|
|
704
704
|
16,
|
|
705
705
|
16,
|
|
@@ -731,7 +731,7 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
731
731
|
16,
|
|
732
732
|
199,
|
|
733
733
|
75
|
|
734
|
-
]),
|
|
734
|
+
]), Vt = new Uint16Array([
|
|
735
735
|
1,
|
|
736
736
|
2,
|
|
737
737
|
3,
|
|
@@ -764,7 +764,7 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
764
764
|
24577,
|
|
765
765
|
0,
|
|
766
766
|
0
|
|
767
|
-
]),
|
|
767
|
+
]), Ht = new Uint8Array([
|
|
768
768
|
16,
|
|
769
769
|
16,
|
|
770
770
|
16,
|
|
@@ -797,18 +797,18 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
797
797
|
29,
|
|
798
798
|
64,
|
|
799
799
|
64
|
|
800
|
-
]),
|
|
800
|
+
]), Ut = (e, t, n, r, i, a, o, s) => {
|
|
801
801
|
let c = s.bits, l = 0, u = 0, d = 0, f = 0, p = 0, m = 0, h = 0, g = 0, _ = 0, v = 0, y, b, x, S, C, w = null, T, E = /* @__PURE__ */ new Uint16Array(16), D = /* @__PURE__ */ new Uint16Array(16), O = null, k, A, j;
|
|
802
|
-
for (l = 0; l <=
|
|
802
|
+
for (l = 0; l <= Nt; l++) E[l] = 0;
|
|
803
803
|
for (u = 0; u < r; u++) E[t[n + u]]++;
|
|
804
|
-
for (p = c, f =
|
|
804
|
+
for (p = c, f = Nt; f >= 1 && E[f] === 0; f--);
|
|
805
805
|
if (p > f && (p = f), f === 0) return i[a++] = 20971520, i[a++] = 20971520, s.bits = 1, 0;
|
|
806
806
|
for (d = 1; d < f && E[d] === 0; d++);
|
|
807
|
-
for (p < d && (p = d), g = 1, l = 1; l <=
|
|
808
|
-
if (g > 0 && (e ===
|
|
809
|
-
for (D[1] = 0, l = 1; l <
|
|
807
|
+
for (p < d && (p = d), g = 1, l = 1; l <= Nt; l++) if (g <<= 1, g -= E[l], g < 0) return -1;
|
|
808
|
+
if (g > 0 && (e === It || f !== 1)) return -1;
|
|
809
|
+
for (D[1] = 0, l = 1; l < Nt; l++) D[l + 1] = D[l] + E[l];
|
|
810
810
|
for (u = 0; u < r; u++) t[n + u] !== 0 && (o[D[t[n + u]]++] = u);
|
|
811
|
-
if (e ===
|
|
811
|
+
if (e === It ? (w = O = o, T = 20) : e === Lt ? (w = zt, O = Bt, T = 257) : (w = Vt, O = Ht, T = 0), v = 0, u = 0, l = d, C = a, m = p, h = 0, x = -1, _ = 1 << p, S = _ - 1, e === Lt && _ > Pt || e === Rt && _ > Ft) return 1;
|
|
812
812
|
for (;;) {
|
|
813
813
|
k = l - h, o[u] + 1 < T ? (A = 0, j = o[u]) : o[u] >= T ? (A = O[o[u] - T], j = w[o[u] - T]) : (A = 96, j = 0), y = 1 << l - h, b = 1 << m, d = b;
|
|
814
814
|
do
|
|
@@ -821,54 +821,54 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
821
821
|
}
|
|
822
822
|
if (l > p && (v & S) !== x) {
|
|
823
823
|
for (h === 0 && (h = p), C += d, m = l - h, g = 1 << m; m + h < f && (g -= E[m + h], !(g <= 0));) m++, g <<= 1;
|
|
824
|
-
if (_ += 1 << m, e ===
|
|
824
|
+
if (_ += 1 << m, e === Lt && _ > Pt || e === Rt && _ > Ft) return 1;
|
|
825
825
|
x = v & S, i[x] = p << 24 | m << 16 | C - a | 0;
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
return v !== 0 && (i[C + v] = l - h << 24 | 4194304), s.bits = p, 0;
|
|
829
|
-
},
|
|
829
|
+
}, Wt = 0, Gt = 1, Kt = 2, qt = 16180, Jt = 16181, Yt = 16182, Xt = 16183, Zt = 16184, Qt = 16185, $t = 16186, en = 16187, tn = 16188, nn = 16189, rn = 16190, an = 16191, on = 16192, sn = 16193, cn = 16194, ln = 16195, un = 16196, dn = 16197, fn = 16198, pn = 16199, mn = 16200, hn = 16201, gn = 16202, _n = 16203, vn = 16204, yn = 16205, bn = 16206, xn = 16207, Sn = 16208, V = 16209, Cn = 16210, wn = 16211, Tn = 852, En = 592, Dn = (e) => (e >>> 24 & 255) + (e >>> 8 & 65280) + ((e & 65280) << 8) + ((e & 255) << 24), On = class {
|
|
830
830
|
constructor() {
|
|
831
831
|
this.strm = null, this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = /* @__PURE__ */ new Uint16Array(320), this.work = /* @__PURE__ */ new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
832
832
|
}
|
|
833
|
-
},
|
|
833
|
+
}, kn = (e) => {
|
|
834
834
|
if (!e) return 1;
|
|
835
835
|
let t = e.state;
|
|
836
|
-
return +(!t || t.strm !== e || t.mode <
|
|
837
|
-
},
|
|
838
|
-
if (
|
|
836
|
+
return +(!t || t.strm !== e || t.mode < qt || t.mode > wn);
|
|
837
|
+
}, An = (e) => {
|
|
838
|
+
if (kn(e)) return -2;
|
|
839
839
|
let t = e.state;
|
|
840
|
-
return e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = t.wrap & 1), t.mode =
|
|
841
|
-
},
|
|
842
|
-
if (
|
|
840
|
+
return e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = t.wrap & 1), t.mode = qt, t.last = 0, t.havedict = 0, t.flags = -1, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new Int32Array(Tn), t.distcode = t.distdyn = new Int32Array(En), t.sane = 1, t.back = -1, 0;
|
|
841
|
+
}, jn = (e) => {
|
|
842
|
+
if (kn(e)) return -2;
|
|
843
843
|
let t = e.state;
|
|
844
|
-
return t.wsize = 0, t.whave = 0, t.wnext = 0,
|
|
845
|
-
},
|
|
844
|
+
return t.wsize = 0, t.whave = 0, t.wnext = 0, An(e);
|
|
845
|
+
}, Mn = (e, t) => {
|
|
846
846
|
let n;
|
|
847
|
-
if (
|
|
847
|
+
if (kn(e)) return -2;
|
|
848
848
|
let r = e.state;
|
|
849
|
-
return t < 0 ? (n = 0, t = -t) : (n = (t >> 4) + 5, t < 48 && (t &= 15)), t && (t < 8 || t > 15) ? -2 : (r.window !== null && r.wbits !== t && (r.window = null), r.wrap = n, r.wbits = t,
|
|
850
|
-
},
|
|
849
|
+
return t < 0 ? (n = 0, t = -t) : (n = (t >> 4) + 5, t < 48 && (t &= 15)), t && (t < 8 || t > 15) ? -2 : (r.window !== null && r.wbits !== t && (r.window = null), r.wrap = n, r.wbits = t, jn(e));
|
|
850
|
+
}, Nn = (e, t) => {
|
|
851
851
|
if (!e) return -2;
|
|
852
|
-
let n = new
|
|
853
|
-
e.state = n, n.strm = e, n.window = null, n.mode =
|
|
854
|
-
let r =
|
|
852
|
+
let n = new On();
|
|
853
|
+
e.state = n, n.strm = e, n.window = null, n.mode = qt;
|
|
854
|
+
let r = Mn(e, t);
|
|
855
855
|
return r !== 0 && (e.state = null), r;
|
|
856
|
-
},
|
|
857
|
-
if (
|
|
858
|
-
|
|
856
|
+
}, Pn = !0, Fn, In, Ln = (e) => {
|
|
857
|
+
if (Pn) {
|
|
858
|
+
Fn = /* @__PURE__ */ new Int32Array(512), In = /* @__PURE__ */ new Int32Array(32);
|
|
859
859
|
let t = 0;
|
|
860
860
|
for (; t < 144;) e.lens[t++] = 8;
|
|
861
861
|
for (; t < 256;) e.lens[t++] = 9;
|
|
862
862
|
for (; t < 280;) e.lens[t++] = 7;
|
|
863
863
|
for (; t < 288;) e.lens[t++] = 8;
|
|
864
|
-
for (
|
|
865
|
-
|
|
864
|
+
for (Ut(Gt, e.lens, 0, 288, Fn, 0, e.work, { bits: 9 }), t = 0; t < 32;) e.lens[t++] = 5;
|
|
865
|
+
Ut(Kt, e.lens, 0, 32, In, 0, e.work, { bits: 5 }), Pn = !1;
|
|
866
866
|
}
|
|
867
|
-
e.lencode =
|
|
868
|
-
},
|
|
867
|
+
e.lencode = Fn, e.lenbits = 9, e.distcode = In, e.distbits = 5;
|
|
868
|
+
}, Rn = (e, t, n, r) => {
|
|
869
869
|
let i, a = e.state;
|
|
870
870
|
return a.window === null && (a.window = new Uint8Array(1 << a.wbits)), a.wsize === 0 && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0), r >= a.wsize ? (a.window.set(t.subarray(n - a.wsize, n), 0), a.wnext = 0, a.whave = a.wsize) : (i = a.wsize - a.wnext, i > r && (i = r), a.window.set(t.subarray(n - r, n - r + i), a.wnext), r -= i, r ? (a.window.set(t.subarray(n - r, n), 0), a.wnext = r, a.whave = a.wsize) : (a.wnext += i, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += i))), 0;
|
|
871
|
-
},
|
|
871
|
+
}, zn = (e, t) => {
|
|
872
872
|
let n, r, i, a, o, s, c, l, u, d, f, p, m, h, g = 0, _, v, y, b, x, S, C, w, T = /* @__PURE__ */ new Uint8Array(4), E, D, O = new Uint8Array([
|
|
873
873
|
16,
|
|
874
874
|
17,
|
|
@@ -890,12 +890,12 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
890
890
|
1,
|
|
891
891
|
15
|
|
892
892
|
]);
|
|
893
|
-
if (
|
|
894
|
-
n = e.state, n.mode ===
|
|
893
|
+
if (kn(e) || !e.output || !e.input && e.avail_in !== 0) return -2;
|
|
894
|
+
n = e.state, n.mode === an && (n.mode = on), o = e.next_out, i = e.output, c = e.avail_out, a = e.next_in, r = e.input, s = e.avail_in, l = n.hold, u = n.bits, d = s, f = c, w = 0;
|
|
895
895
|
inf_leave: for (;;) switch (n.mode) {
|
|
896
|
-
case
|
|
896
|
+
case qt:
|
|
897
897
|
if (n.wrap === 0) {
|
|
898
|
-
n.mode =
|
|
898
|
+
n.mode = on;
|
|
899
899
|
break;
|
|
900
900
|
}
|
|
901
901
|
for (; u < 16;) {
|
|
@@ -903,108 +903,108 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
903
903
|
s--, l += r[a++] << u, u += 8;
|
|
904
904
|
}
|
|
905
905
|
if (n.wrap & 2 && l === 35615) {
|
|
906
|
-
n.wbits === 0 && (n.wbits = 15), n.check = 0, T[0] = l & 255, T[1] = l >>> 8 & 255, n.check =
|
|
906
|
+
n.wbits === 0 && (n.wbits = 15), n.check = 0, T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = F(n.check, T, 2, 0), l = 0, u = 0, n.mode = Jt;
|
|
907
907
|
break;
|
|
908
908
|
}
|
|
909
909
|
if (n.head && (n.head.done = !1), !(n.wrap & 1) || (((l & 255) << 8) + (l >> 8)) % 31) {
|
|
910
|
-
e.msg = "incorrect header check", n.mode =
|
|
910
|
+
e.msg = "incorrect header check", n.mode = V;
|
|
911
911
|
break;
|
|
912
912
|
}
|
|
913
913
|
if ((l & 15) != 8) {
|
|
914
|
-
e.msg = "unknown compression method", n.mode =
|
|
914
|
+
e.msg = "unknown compression method", n.mode = V;
|
|
915
915
|
break;
|
|
916
916
|
}
|
|
917
917
|
if (l >>>= 4, u -= 4, C = (l & 15) + 8, n.wbits === 0 && (n.wbits = C), C > 15 || C > n.wbits) {
|
|
918
|
-
e.msg = "invalid window size", n.mode =
|
|
918
|
+
e.msg = "invalid window size", n.mode = V;
|
|
919
919
|
break;
|
|
920
920
|
}
|
|
921
|
-
n.dmax = 1 << n.wbits, n.flags = 0, e.adler = n.check = 1, n.mode = l & 512 ?
|
|
921
|
+
n.dmax = 1 << n.wbits, n.flags = 0, e.adler = n.check = 1, n.mode = l & 512 ? nn : an, l = 0, u = 0;
|
|
922
922
|
break;
|
|
923
|
-
case
|
|
923
|
+
case Jt:
|
|
924
924
|
for (; u < 16;) {
|
|
925
925
|
if (s === 0) break inf_leave;
|
|
926
926
|
s--, l += r[a++] << u, u += 8;
|
|
927
927
|
}
|
|
928
928
|
if (n.flags = l, (n.flags & 255) != 8) {
|
|
929
|
-
e.msg = "unknown compression method", n.mode =
|
|
929
|
+
e.msg = "unknown compression method", n.mode = V;
|
|
930
930
|
break;
|
|
931
931
|
}
|
|
932
932
|
if (n.flags & 57344) {
|
|
933
|
-
e.msg = "unknown header flags set", n.mode =
|
|
933
|
+
e.msg = "unknown header flags set", n.mode = V;
|
|
934
934
|
break;
|
|
935
935
|
}
|
|
936
|
-
n.head && (n.head.text = l >> 8 & 1), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check =
|
|
937
|
-
case
|
|
936
|
+
n.head && (n.head.text = l >> 8 & 1), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = F(n.check, T, 2, 0)), l = 0, u = 0, n.mode = Yt;
|
|
937
|
+
case Yt:
|
|
938
938
|
for (; u < 32;) {
|
|
939
939
|
if (s === 0) break inf_leave;
|
|
940
940
|
s--, l += r[a++] << u, u += 8;
|
|
941
941
|
}
|
|
942
|
-
n.head && (n.head.time = l), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, T[2] = l >>> 16 & 255, T[3] = l >>> 24 & 255, n.check =
|
|
943
|
-
case
|
|
942
|
+
n.head && (n.head.time = l), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, T[2] = l >>> 16 & 255, T[3] = l >>> 24 & 255, n.check = F(n.check, T, 4, 0)), l = 0, u = 0, n.mode = Xt;
|
|
943
|
+
case Xt:
|
|
944
944
|
for (; u < 16;) {
|
|
945
945
|
if (s === 0) break inf_leave;
|
|
946
946
|
s--, l += r[a++] << u, u += 8;
|
|
947
947
|
}
|
|
948
|
-
n.head && (n.head.xflags = l & 255, n.head.os = l >> 8), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check =
|
|
949
|
-
case
|
|
948
|
+
n.head && (n.head.xflags = l & 255, n.head.os = l >> 8), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = F(n.check, T, 2, 0)), l = 0, u = 0, n.mode = Zt;
|
|
949
|
+
case Zt:
|
|
950
950
|
if (n.flags & 1024) {
|
|
951
951
|
for (; u < 16;) {
|
|
952
952
|
if (s === 0) break inf_leave;
|
|
953
953
|
s--, l += r[a++] << u, u += 8;
|
|
954
954
|
}
|
|
955
|
-
n.length = l, n.head && (n.head.extra_len = l), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check =
|
|
955
|
+
n.length = l, n.head && (n.head.extra_len = l), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = F(n.check, T, 2, 0)), l = 0, u = 0;
|
|
956
956
|
} else n.head && (n.head.extra = null);
|
|
957
|
-
n.mode =
|
|
957
|
+
n.mode = Qt;
|
|
958
|
+
case Qt:
|
|
959
|
+
if (n.flags & 1024 && (p = n.length, p > s && (p = s), p && (n.head && (C = n.head.extra_len - n.length, n.head.extra || (n.head.extra = new Uint8Array(n.head.extra_len)), n.head.extra.set(r.subarray(a, a + p), C)), n.flags & 512 && n.wrap & 4 && (n.check = F(n.check, r, p, a)), s -= p, a += p, n.length -= p), n.length)) break inf_leave;
|
|
960
|
+
n.length = 0, n.mode = $t;
|
|
958
961
|
case $t:
|
|
959
|
-
if (n.flags & 1024 && (p = n.length, p > s && (p = s), p && (n.head && (C = n.head.extra_len - n.length, n.head.extra || (n.head.extra = new Uint8Array(n.head.extra_len)), n.head.extra.set(r.subarray(a, a + p), C)), n.flags & 512 && n.wrap & 4 && (n.check = P(n.check, r, p, a)), s -= p, a += p, n.length -= p), n.length)) break inf_leave;
|
|
960
|
-
n.length = 0, n.mode = en;
|
|
961
|
-
case en:
|
|
962
962
|
if (n.flags & 2048) {
|
|
963
963
|
if (s === 0) break inf_leave;
|
|
964
964
|
p = 0;
|
|
965
965
|
do
|
|
966
966
|
C = r[a + p++], n.head && C && n.length < 65536 && (n.head.name += String.fromCharCode(C));
|
|
967
967
|
while (C && p < s);
|
|
968
|
-
if (n.flags & 512 && n.wrap & 4 && (n.check =
|
|
968
|
+
if (n.flags & 512 && n.wrap & 4 && (n.check = F(n.check, r, p, a)), s -= p, a += p, C) break inf_leave;
|
|
969
969
|
} else n.head && (n.head.name = null);
|
|
970
|
-
n.length = 0, n.mode =
|
|
971
|
-
case
|
|
970
|
+
n.length = 0, n.mode = en;
|
|
971
|
+
case en:
|
|
972
972
|
if (n.flags & 4096) {
|
|
973
973
|
if (s === 0) break inf_leave;
|
|
974
974
|
p = 0;
|
|
975
975
|
do
|
|
976
976
|
C = r[a + p++], n.head && C && n.length < 65536 && (n.head.comment += String.fromCharCode(C));
|
|
977
977
|
while (C && p < s);
|
|
978
|
-
if (n.flags & 512 && n.wrap & 4 && (n.check =
|
|
978
|
+
if (n.flags & 512 && n.wrap & 4 && (n.check = F(n.check, r, p, a)), s -= p, a += p, C) break inf_leave;
|
|
979
979
|
} else n.head && (n.head.comment = null);
|
|
980
|
-
n.mode =
|
|
981
|
-
case
|
|
980
|
+
n.mode = tn;
|
|
981
|
+
case tn:
|
|
982
982
|
if (n.flags & 512) {
|
|
983
983
|
for (; u < 16;) {
|
|
984
984
|
if (s === 0) break inf_leave;
|
|
985
985
|
s--, l += r[a++] << u, u += 8;
|
|
986
986
|
}
|
|
987
987
|
if (n.wrap & 4 && l !== (n.check & 65535)) {
|
|
988
|
-
e.msg = "header crc mismatch", n.mode =
|
|
988
|
+
e.msg = "header crc mismatch", n.mode = V;
|
|
989
989
|
break;
|
|
990
990
|
}
|
|
991
991
|
l = 0, u = 0;
|
|
992
992
|
}
|
|
993
|
-
n.head && (n.head.hcrc = n.flags >> 9 & 1, n.head.done = !0), e.adler = n.check = 0, n.mode =
|
|
993
|
+
n.head && (n.head.hcrc = n.flags >> 9 & 1, n.head.done = !0), e.adler = n.check = 0, n.mode = an;
|
|
994
994
|
break;
|
|
995
|
-
case
|
|
995
|
+
case nn:
|
|
996
996
|
for (; u < 32;) {
|
|
997
997
|
if (s === 0) break inf_leave;
|
|
998
998
|
s--, l += r[a++] << u, u += 8;
|
|
999
999
|
}
|
|
1000
|
-
e.adler = n.check =
|
|
1001
|
-
case
|
|
1000
|
+
e.adler = n.check = Dn(l), l = 0, u = 0, n.mode = rn;
|
|
1001
|
+
case rn:
|
|
1002
1002
|
if (n.havedict === 0) return e.next_out = o, e.avail_out = c, e.next_in = a, e.avail_in = s, n.hold = l, n.bits = u, 2;
|
|
1003
|
-
e.adler = n.check = 1, n.mode =
|
|
1004
|
-
case
|
|
1005
|
-
case
|
|
1003
|
+
e.adler = n.check = 1, n.mode = an;
|
|
1004
|
+
case an: if (t === 5 || t === 6) break inf_leave;
|
|
1005
|
+
case on:
|
|
1006
1006
|
if (n.last) {
|
|
1007
|
-
l >>>= u & 7, u -= u & 7, n.mode =
|
|
1007
|
+
l >>>= u & 7, u -= u & 7, n.mode = bn;
|
|
1008
1008
|
break;
|
|
1009
1009
|
}
|
|
1010
1010
|
for (; u < 3;) {
|
|
@@ -1013,51 +1013,51 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1013
1013
|
}
|
|
1014
1014
|
switch (n.last = l & 1, l >>>= 1, --u, l & 3) {
|
|
1015
1015
|
case 0:
|
|
1016
|
-
n.mode =
|
|
1016
|
+
n.mode = sn;
|
|
1017
1017
|
break;
|
|
1018
1018
|
case 1:
|
|
1019
|
-
if (
|
|
1019
|
+
if (Ln(n), n.mode = pn, t === 6) {
|
|
1020
1020
|
l >>>= 2, u -= 2;
|
|
1021
1021
|
break inf_leave;
|
|
1022
1022
|
}
|
|
1023
1023
|
break;
|
|
1024
1024
|
case 2:
|
|
1025
|
-
n.mode =
|
|
1025
|
+
n.mode = un;
|
|
1026
1026
|
break;
|
|
1027
|
-
case 3: e.msg = "invalid block type", n.mode =
|
|
1027
|
+
case 3: e.msg = "invalid block type", n.mode = V;
|
|
1028
1028
|
}
|
|
1029
1029
|
l >>>= 2, u -= 2;
|
|
1030
1030
|
break;
|
|
1031
|
-
case
|
|
1031
|
+
case sn:
|
|
1032
1032
|
for (l >>>= u & 7, u -= u & 7; u < 32;) {
|
|
1033
1033
|
if (s === 0) break inf_leave;
|
|
1034
1034
|
s--, l += r[a++] << u, u += 8;
|
|
1035
1035
|
}
|
|
1036
1036
|
if ((l & 65535) != (l >>> 16 ^ 65535)) {
|
|
1037
|
-
e.msg = "invalid stored block lengths", n.mode =
|
|
1037
|
+
e.msg = "invalid stored block lengths", n.mode = V;
|
|
1038
1038
|
break;
|
|
1039
1039
|
}
|
|
1040
|
-
if (n.length = l & 65535, l = 0, u = 0, n.mode =
|
|
1041
|
-
case
|
|
1042
|
-
case
|
|
1040
|
+
if (n.length = l & 65535, l = 0, u = 0, n.mode = cn, t === 6) break inf_leave;
|
|
1041
|
+
case cn: n.mode = ln;
|
|
1042
|
+
case ln:
|
|
1043
1043
|
if (p = n.length, p) {
|
|
1044
1044
|
if (p > s && (p = s), p > c && (p = c), p === 0) break inf_leave;
|
|
1045
1045
|
i.set(r.subarray(a, a + p), o), s -= p, a += p, c -= p, o += p, n.length -= p;
|
|
1046
1046
|
break;
|
|
1047
1047
|
}
|
|
1048
|
-
n.mode =
|
|
1048
|
+
n.mode = an;
|
|
1049
1049
|
break;
|
|
1050
|
-
case
|
|
1050
|
+
case un:
|
|
1051
1051
|
for (; u < 14;) {
|
|
1052
1052
|
if (s === 0) break inf_leave;
|
|
1053
1053
|
s--, l += r[a++] << u, u += 8;
|
|
1054
1054
|
}
|
|
1055
1055
|
if (n.nlen = (l & 31) + 257, l >>>= 5, u -= 5, n.ndist = (l & 31) + 1, l >>>= 5, u -= 5, n.ncode = (l & 15) + 4, l >>>= 4, u -= 4, n.nlen > 286 || n.ndist > 30) {
|
|
1056
|
-
e.msg = "too many length or distance symbols", n.mode =
|
|
1056
|
+
e.msg = "too many length or distance symbols", n.mode = V;
|
|
1057
1057
|
break;
|
|
1058
1058
|
}
|
|
1059
|
-
n.have = 0, n.mode =
|
|
1060
|
-
case
|
|
1059
|
+
n.have = 0, n.mode = dn;
|
|
1060
|
+
case dn:
|
|
1061
1061
|
for (; n.have < n.ncode;) {
|
|
1062
1062
|
for (; u < 3;) {
|
|
1063
1063
|
if (s === 0) break inf_leave;
|
|
@@ -1066,12 +1066,12 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1066
1066
|
n.lens[O[n.have++]] = l & 7, l >>>= 3, u -= 3;
|
|
1067
1067
|
}
|
|
1068
1068
|
for (; n.have < 19;) n.lens[O[n.have++]] = 0;
|
|
1069
|
-
if (n.lencode = n.lendyn, n.lenbits = 7, E = { bits: n.lenbits }, w = Wt
|
|
1070
|
-
e.msg = "invalid code lengths set", n.mode =
|
|
1069
|
+
if (n.lencode = n.lendyn, n.lenbits = 7, E = { bits: n.lenbits }, w = Ut(Wt, n.lens, 0, 19, n.lencode, 0, n.work, E), n.lenbits = E.bits, w) {
|
|
1070
|
+
e.msg = "invalid code lengths set", n.mode = V;
|
|
1071
1071
|
break;
|
|
1072
1072
|
}
|
|
1073
|
-
n.have = 0, n.mode =
|
|
1074
|
-
case
|
|
1073
|
+
n.have = 0, n.mode = fn;
|
|
1074
|
+
case fn:
|
|
1075
1075
|
for (; n.have < n.nlen + n.ndist;) {
|
|
1076
1076
|
for (; g = n.lencode[l & (1 << n.lenbits) - 1], _ = g >>> 24, v = g >>> 16 & 255, y = g & 65535, !(_ <= u);) {
|
|
1077
1077
|
if (s === 0) break inf_leave;
|
|
@@ -1085,7 +1085,7 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1085
1085
|
s--, l += r[a++] << u, u += 8;
|
|
1086
1086
|
}
|
|
1087
1087
|
if (l >>>= _, u -= _, n.have === 0) {
|
|
1088
|
-
e.msg = "invalid bit length repeat", n.mode =
|
|
1088
|
+
e.msg = "invalid bit length repeat", n.mode = V;
|
|
1089
1089
|
break;
|
|
1090
1090
|
}
|
|
1091
1091
|
C = n.lens[n.have - 1], p = 3 + (l & 3), l >>>= 2, u -= 2;
|
|
@@ -1103,30 +1103,30 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1103
1103
|
l >>>= _, u -= _, C = 0, p = 11 + (l & 127), l >>>= 7, u -= 7;
|
|
1104
1104
|
}
|
|
1105
1105
|
if (n.have + p > n.nlen + n.ndist) {
|
|
1106
|
-
e.msg = "invalid bit length repeat", n.mode =
|
|
1106
|
+
e.msg = "invalid bit length repeat", n.mode = V;
|
|
1107
1107
|
break;
|
|
1108
1108
|
}
|
|
1109
1109
|
for (; p--;) n.lens[n.have++] = C;
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
|
-
if (n.mode ===
|
|
1112
|
+
if (n.mode === V) break;
|
|
1113
1113
|
if (n.lens[256] === 0) {
|
|
1114
|
-
e.msg = "invalid code -- missing end-of-block", n.mode =
|
|
1114
|
+
e.msg = "invalid code -- missing end-of-block", n.mode = V;
|
|
1115
1115
|
break;
|
|
1116
1116
|
}
|
|
1117
|
-
if (n.lenbits = 9, E = { bits: n.lenbits }, w =
|
|
1118
|
-
e.msg = "invalid literal/lengths set", n.mode =
|
|
1117
|
+
if (n.lenbits = 9, E = { bits: n.lenbits }, w = Ut(Gt, n.lens, 0, n.nlen, n.lencode, 0, n.work, E), n.lenbits = E.bits, w) {
|
|
1118
|
+
e.msg = "invalid literal/lengths set", n.mode = V;
|
|
1119
1119
|
break;
|
|
1120
1120
|
}
|
|
1121
|
-
if (n.distbits = 6, n.distcode = n.distdyn, E = { bits: n.distbits }, w =
|
|
1122
|
-
e.msg = "invalid distances set", n.mode =
|
|
1121
|
+
if (n.distbits = 6, n.distcode = n.distdyn, E = { bits: n.distbits }, w = Ut(Kt, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, E), n.distbits = E.bits, w) {
|
|
1122
|
+
e.msg = "invalid distances set", n.mode = V;
|
|
1123
1123
|
break;
|
|
1124
1124
|
}
|
|
1125
|
-
if (n.mode =
|
|
1126
|
-
case
|
|
1127
|
-
case
|
|
1125
|
+
if (n.mode = pn, t === 6) break inf_leave;
|
|
1126
|
+
case pn: n.mode = mn;
|
|
1127
|
+
case mn:
|
|
1128
1128
|
if (s >= 6 && c >= 258) {
|
|
1129
|
-
e.next_out = o, e.avail_out = c, e.next_in = a, e.avail_in = s, n.hold = l, n.bits = u,
|
|
1129
|
+
e.next_out = o, e.avail_out = c, e.next_in = a, e.avail_in = s, n.hold = l, n.bits = u, Mt(e, f), o = e.next_out, i = e.output, c = e.avail_out, a = e.next_in, r = e.input, s = e.avail_in, l = n.hold, u = n.bits, n.mode === an && (n.back = -1);
|
|
1130
1130
|
break;
|
|
1131
1131
|
}
|
|
1132
1132
|
for (n.back = 0; g = n.lencode[l & (1 << n.lenbits) - 1], _ = g >>> 24, v = g >>> 16 & 255, y = g & 65535, !(_ <= u);) {
|
|
@@ -1141,19 +1141,19 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1141
1141
|
l >>>= b, u -= b, n.back += b;
|
|
1142
1142
|
}
|
|
1143
1143
|
if (l >>>= _, u -= _, n.back += _, n.length = y, v === 0) {
|
|
1144
|
-
n.mode =
|
|
1144
|
+
n.mode = yn;
|
|
1145
1145
|
break;
|
|
1146
1146
|
}
|
|
1147
1147
|
if (v & 32) {
|
|
1148
|
-
n.back = -1, n.mode =
|
|
1148
|
+
n.back = -1, n.mode = an;
|
|
1149
1149
|
break;
|
|
1150
1150
|
}
|
|
1151
1151
|
if (v & 64) {
|
|
1152
|
-
e.msg = "invalid literal/length code", n.mode =
|
|
1152
|
+
e.msg = "invalid literal/length code", n.mode = V;
|
|
1153
1153
|
break;
|
|
1154
1154
|
}
|
|
1155
|
-
n.extra = v & 15, n.mode =
|
|
1156
|
-
case
|
|
1155
|
+
n.extra = v & 15, n.mode = hn;
|
|
1156
|
+
case hn:
|
|
1157
1157
|
if (n.extra) {
|
|
1158
1158
|
for (D = n.extra; u < D;) {
|
|
1159
1159
|
if (s === 0) break inf_leave;
|
|
@@ -1161,8 +1161,8 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1161
1161
|
}
|
|
1162
1162
|
n.length += l & (1 << n.extra) - 1, l >>>= n.extra, u -= n.extra, n.back += n.extra;
|
|
1163
1163
|
}
|
|
1164
|
-
n.was = n.length, n.mode =
|
|
1165
|
-
case
|
|
1164
|
+
n.was = n.length, n.mode = gn;
|
|
1165
|
+
case gn:
|
|
1166
1166
|
for (; g = n.distcode[l & (1 << n.distbits) - 1], _ = g >>> 24, v = g >>> 16 & 255, y = g & 65535, !(_ <= u);) {
|
|
1167
1167
|
if (s === 0) break inf_leave;
|
|
1168
1168
|
s--, l += r[a++] << u, u += 8;
|
|
@@ -1175,11 +1175,11 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1175
1175
|
l >>>= b, u -= b, n.back += b;
|
|
1176
1176
|
}
|
|
1177
1177
|
if (l >>>= _, u -= _, n.back += _, v & 64) {
|
|
1178
|
-
e.msg = "invalid distance code", n.mode =
|
|
1178
|
+
e.msg = "invalid distance code", n.mode = V;
|
|
1179
1179
|
break;
|
|
1180
1180
|
}
|
|
1181
|
-
n.offset = y, n.extra = v & 15, n.mode =
|
|
1182
|
-
case
|
|
1181
|
+
n.offset = y, n.extra = v & 15, n.mode = _n;
|
|
1182
|
+
case _n:
|
|
1183
1183
|
if (n.extra) {
|
|
1184
1184
|
for (D = n.extra; u < D;) {
|
|
1185
1185
|
if (s === 0) break inf_leave;
|
|
@@ -1188,15 +1188,15 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1188
1188
|
n.offset += l & (1 << n.extra) - 1, l >>>= n.extra, u -= n.extra, n.back += n.extra;
|
|
1189
1189
|
}
|
|
1190
1190
|
if (n.offset > n.dmax) {
|
|
1191
|
-
e.msg = "invalid distance too far back", n.mode =
|
|
1191
|
+
e.msg = "invalid distance too far back", n.mode = V;
|
|
1192
1192
|
break;
|
|
1193
1193
|
}
|
|
1194
|
-
n.mode =
|
|
1195
|
-
case
|
|
1194
|
+
n.mode = vn;
|
|
1195
|
+
case vn:
|
|
1196
1196
|
if (c === 0) break inf_leave;
|
|
1197
1197
|
if (p = f - c, n.offset > p) {
|
|
1198
1198
|
if (p = n.offset - p, p > n.whave && n.sane) {
|
|
1199
|
-
e.msg = "invalid distance too far back", n.mode =
|
|
1199
|
+
e.msg = "invalid distance too far back", n.mode = V;
|
|
1200
1200
|
break;
|
|
1201
1201
|
}
|
|
1202
1202
|
p > n.wnext ? (p -= n.wnext, m = n.wsize - p) : m = n.wnext - p, p > n.length && (p = n.length), h = n.window;
|
|
@@ -1205,65 +1205,65 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1205
1205
|
do
|
|
1206
1206
|
i[o++] = h[m++];
|
|
1207
1207
|
while (--p);
|
|
1208
|
-
n.length === 0 && (n.mode =
|
|
1208
|
+
n.length === 0 && (n.mode = mn);
|
|
1209
1209
|
break;
|
|
1210
|
-
case
|
|
1210
|
+
case yn:
|
|
1211
1211
|
if (c === 0) break inf_leave;
|
|
1212
|
-
i[o++] = n.length, c--, n.mode =
|
|
1212
|
+
i[o++] = n.length, c--, n.mode = mn;
|
|
1213
1213
|
break;
|
|
1214
|
-
case
|
|
1214
|
+
case bn:
|
|
1215
1215
|
if (n.wrap) {
|
|
1216
1216
|
for (; u < 32;) {
|
|
1217
1217
|
if (s === 0) break inf_leave;
|
|
1218
1218
|
s--, l |= r[a++] << u, u += 8;
|
|
1219
1219
|
}
|
|
1220
|
-
if (f -= c, e.total_out += f, n.total += f, n.wrap & 4 && f && (e.adler = n.check = n.flags ?
|
|
1221
|
-
e.msg = "incorrect data check", n.mode =
|
|
1220
|
+
if (f -= c, e.total_out += f, n.total += f, n.wrap & 4 && f && (e.adler = n.check = n.flags ? F(n.check, i, f, o - f) : Re(n.check, i, f, o - f)), f = c, n.wrap & 4 && (n.flags ? l : Dn(l)) !== n.check) {
|
|
1221
|
+
e.msg = "incorrect data check", n.mode = V;
|
|
1222
1222
|
break;
|
|
1223
1223
|
}
|
|
1224
1224
|
l = 0, u = 0;
|
|
1225
1225
|
}
|
|
1226
|
-
n.mode =
|
|
1227
|
-
case
|
|
1226
|
+
n.mode = xn;
|
|
1227
|
+
case xn:
|
|
1228
1228
|
if (n.wrap && n.flags) {
|
|
1229
1229
|
for (; u < 32;) {
|
|
1230
1230
|
if (s === 0) break inf_leave;
|
|
1231
1231
|
s--, l += r[a++] << u, u += 8;
|
|
1232
1232
|
}
|
|
1233
1233
|
if (n.wrap & 4 && l !== (n.total & 4294967295)) {
|
|
1234
|
-
e.msg = "incorrect length check", n.mode =
|
|
1234
|
+
e.msg = "incorrect length check", n.mode = V;
|
|
1235
1235
|
break;
|
|
1236
1236
|
}
|
|
1237
1237
|
l = 0, u = 0;
|
|
1238
1238
|
}
|
|
1239
|
-
n.mode =
|
|
1240
|
-
case
|
|
1239
|
+
n.mode = Sn;
|
|
1240
|
+
case Sn:
|
|
1241
1241
|
w = 1;
|
|
1242
1242
|
break inf_leave;
|
|
1243
|
-
case
|
|
1243
|
+
case V:
|
|
1244
1244
|
w = -3;
|
|
1245
1245
|
break inf_leave;
|
|
1246
|
-
case
|
|
1247
|
-
case
|
|
1246
|
+
case Cn: return -4;
|
|
1247
|
+
case wn:
|
|
1248
1248
|
default: return -2;
|
|
1249
1249
|
}
|
|
1250
|
-
return e.next_out = o, e.avail_out = c, e.next_in = a, e.avail_in = s, n.hold = l, n.bits = u, (n.wsize || f !== e.avail_out && n.mode <
|
|
1251
|
-
},
|
|
1252
|
-
if (
|
|
1250
|
+
return e.next_out = o, e.avail_out = c, e.next_in = a, e.avail_in = s, n.hold = l, n.bits = u, (n.wsize || f !== e.avail_out && n.mode < V && (n.mode < bn || t !== 4)) && Rn(e, e.output, e.next_out, f - e.avail_out) ? (n.mode = Cn, -4) : (d -= e.avail_in, f -= e.avail_out, e.total_in += d, e.total_out += f, n.total += f, n.wrap & 4 && f && (e.adler = n.check = n.flags ? F(n.check, i, f, e.next_out - f) : Re(n.check, i, f, e.next_out - f)), e.data_type = n.bits + (n.last ? 64 : 0) + (n.mode === an ? 128 : 0) + (n.mode === pn || n.mode === cn ? 256 : 0), (d === 0 && f === 0 || t === 4) && w === 0 && (w = -5), w);
|
|
1251
|
+
}, Bn = (e) => {
|
|
1252
|
+
if (kn(e)) return -2;
|
|
1253
1253
|
let t = e.state;
|
|
1254
1254
|
return t.window && (t.window = null), e.state = null, 0;
|
|
1255
|
-
},
|
|
1255
|
+
}, Vn = (e, t) => {
|
|
1256
1256
|
let n = t.length, r, i, a;
|
|
1257
|
-
return
|
|
1258
|
-
},
|
|
1257
|
+
return kn(e) || (r = e.state, r.wrap !== 0 && r.mode !== rn) ? -2 : r.mode === rn && (i = 1, i = Re(i, t, n, 0), i !== r.check) ? -3 : (a = Rn(e, t, n, n), a ? (r.mode = Cn, -4) : (r.havedict = 1, 0));
|
|
1258
|
+
}, Hn = class {
|
|
1259
1259
|
constructor() {
|
|
1260
1260
|
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
|
|
1261
1261
|
}
|
|
1262
|
-
},
|
|
1262
|
+
}, Un = (e) => {
|
|
1263
1263
|
let t = new Uint8Array(e.reduce((e, t) => e + t.length, 0)), n = 0;
|
|
1264
1264
|
for (let r of e) t.set(r, n), n += r.length;
|
|
1265
1265
|
return t;
|
|
1266
|
-
},
|
|
1266
|
+
}, Wn = Object.prototype.toString, Gn = {
|
|
1267
1267
|
level: -1,
|
|
1268
1268
|
chunkSize: 16384,
|
|
1269
1269
|
windowBits: 15,
|
|
@@ -1273,30 +1273,30 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1273
1273
|
gzip: !1,
|
|
1274
1274
|
legacyHash: !1,
|
|
1275
1275
|
dictionary: /* @__PURE__ */ new Uint8Array()
|
|
1276
|
-
},
|
|
1276
|
+
}, Kn = class {
|
|
1277
1277
|
constructor(e = {}) {
|
|
1278
|
-
l(this, "options", void 0), l(this, "err", void 0), l(this, "msg", void 0), l(this, "ended", void 0), l(this, "started", void 0), l(this, "chunks", void 0), l(this, "strm", void 0), l(this, "result", void 0), this.options = Object.assign({},
|
|
1278
|
+
l(this, "options", void 0), l(this, "err", void 0), l(this, "msg", void 0), l(this, "ended", void 0), l(this, "started", void 0), l(this, "chunks", void 0), l(this, "strm", void 0), l(this, "result", void 0), this.options = Object.assign({}, Gn, e);
|
|
1279
1279
|
let t = this.options;
|
|
1280
|
-
t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.started = !1, this.chunks = [], this.result = /* @__PURE__ */ new Uint8Array(), this.strm = new
|
|
1281
|
-
let n =
|
|
1282
|
-
if (n !== 0) throw Error(
|
|
1283
|
-
|
|
1280
|
+
t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.started = !1, this.chunks = [], this.result = /* @__PURE__ */ new Uint8Array(), this.strm = new Hn(), this.strm.avail_out = 0;
|
|
1281
|
+
let n = Et(this.strm, t.level, 8, t.windowBits, t.memLevel, t.strategy, t.legacyHash);
|
|
1282
|
+
if (n !== 0) throw Error(Be[n]);
|
|
1283
|
+
Wn.call(t.dictionary) === "[object ArrayBuffer]" && (t.dictionary = new Uint8Array(t.dictionary));
|
|
1284
1284
|
let r = t.dictionary;
|
|
1285
1285
|
if (r.length) {
|
|
1286
1286
|
if (t.gzip) throw Error("dictionary is not supported with gzip");
|
|
1287
|
-
if (n =
|
|
1287
|
+
if (n = kt(this.strm, r), n !== 0) throw Error(Be[n]);
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
push(e, t = !1) {
|
|
1291
1291
|
let n = this.strm, r = this.options.chunkSize, i, a;
|
|
1292
1292
|
if (this.ended) return !1;
|
|
1293
|
-
for (a = typeof t == "number" ? t : t === !0 ? 4 : 0, typeof e == "string" ? n.input = new TextEncoder().encode(e) :
|
|
1293
|
+
for (a = typeof t == "number" ? t : t === !0 ? 4 : 0, typeof e == "string" ? n.input = new TextEncoder().encode(e) : Wn.call(e) === "[object ArrayBuffer]" ? n.input = new Uint8Array(e) : n.input = e, n.next_in = 0, n.avail_in = n.input.length, this.started || (this.started = !0, this.onStart(n));;) {
|
|
1294
1294
|
if (n.avail_out === 0 && (n.output = new Uint8Array(r), n.next_out = 0, n.avail_out = r), (a === 2 || a === 3) && n.avail_out <= 6) {
|
|
1295
1295
|
this.onData(n.output.subarray(0, n.next_out)), n.avail_out = 0;
|
|
1296
1296
|
continue;
|
|
1297
1297
|
}
|
|
1298
|
-
if (i =
|
|
1299
|
-
n.next_out > 0 && this.onData(n.output.subarray(0, n.next_out)), i =
|
|
1298
|
+
if (i = Dt(n, a), i === 1) {
|
|
1299
|
+
n.next_out > 0 && this.onData(n.output.subarray(0, n.next_out)), i = Ot(this.strm);
|
|
1300
1300
|
break;
|
|
1301
1301
|
}
|
|
1302
1302
|
if (n.avail_out === 0) {
|
|
@@ -1309,140 +1309,140 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
|
|
|
1309
1309
|
}
|
|
1310
1310
|
if (n.avail_in === 0) return !0;
|
|
1311
1311
|
}
|
|
1312
|
-
return this.err = i, this.msg = n.msg ||
|
|
1312
|
+
return this.err = i, this.msg = n.msg || Be[i], this.ended = !0, this.onEnd(i), i === 0;
|
|
1313
1313
|
}
|
|
1314
1314
|
onStart(e) {}
|
|
1315
1315
|
onData(e) {
|
|
1316
1316
|
this.chunks.push(e);
|
|
1317
1317
|
}
|
|
1318
1318
|
onEnd(e) {
|
|
1319
|
-
e === 0 && (this.result =
|
|
1319
|
+
e === 0 && (this.result = Un(this.chunks)), this.chunks = [];
|
|
1320
1320
|
}
|
|
1321
1321
|
};
|
|
1322
|
-
function
|
|
1323
|
-
let n = new
|
|
1322
|
+
function qn(e, t = {}) {
|
|
1323
|
+
let n = new Kn(t);
|
|
1324
1324
|
if (n.push(e, !0), n.err) throw Error(n.msg);
|
|
1325
1325
|
return n.result;
|
|
1326
1326
|
}
|
|
1327
|
-
var
|
|
1327
|
+
var Jn = Object.prototype.toString, Yn = {
|
|
1328
1328
|
chunkSize: 1024 * 64,
|
|
1329
1329
|
windowBits: 15,
|
|
1330
1330
|
raw: !1,
|
|
1331
1331
|
dictionary: /* @__PURE__ */ new Uint8Array()
|
|
1332
|
-
},
|
|
1332
|
+
}, Xn = class {
|
|
1333
1333
|
constructor(e = {}) {
|
|
1334
|
-
l(this, "options", void 0), l(this, "err", void 0), l(this, "msg", void 0), l(this, "ended", void 0), l(this, "started", void 0), l(this, "chunks", void 0), l(this, "strm", void 0), l(this, "result", void 0), this.options = Object.assign({},
|
|
1334
|
+
l(this, "options", void 0), l(this, "err", void 0), l(this, "msg", void 0), l(this, "ended", void 0), l(this, "started", void 0), l(this, "chunks", void 0), l(this, "strm", void 0), l(this, "result", void 0), this.options = Object.assign({}, Yn, e);
|
|
1335
1335
|
let t = this.options;
|
|
1336
|
-
t.raw && t.windowBits >= 0 && t.windowBits < 16 && (t.windowBits = -t.windowBits, t.windowBits === 0 && (t.windowBits = -15)), t.windowBits >= 0 && t.windowBits < 16 && !e.windowBits && (t.windowBits += 32), t.windowBits > 15 && t.windowBits < 48 && (t.windowBits & 15 || (t.windowBits |= 15)), this.err = 0, this.msg = "", this.ended = !1, this.started = !1, this.chunks = [], this.result = /* @__PURE__ */ new Uint8Array(), this.strm = new
|
|
1337
|
-
let n =
|
|
1338
|
-
if (n !== 0) throw Error(
|
|
1339
|
-
|
|
1336
|
+
t.raw && t.windowBits >= 0 && t.windowBits < 16 && (t.windowBits = -t.windowBits, t.windowBits === 0 && (t.windowBits = -15)), t.windowBits >= 0 && t.windowBits < 16 && !e.windowBits && (t.windowBits += 32), t.windowBits > 15 && t.windowBits < 48 && (t.windowBits & 15 || (t.windowBits |= 15)), this.err = 0, this.msg = "", this.ended = !1, this.started = !1, this.chunks = [], this.result = /* @__PURE__ */ new Uint8Array(), this.strm = new Hn(), this.strm.avail_out = 0;
|
|
1337
|
+
let n = Nn(this.strm, t.windowBits);
|
|
1338
|
+
if (n !== 0) throw Error(Be[n]);
|
|
1339
|
+
Jn.call(t.dictionary) === "[object ArrayBuffer]" && (t.dictionary = new Uint8Array(t.dictionary));
|
|
1340
1340
|
let r = t.dictionary;
|
|
1341
|
-
if (t.raw && r.length && (n =
|
|
1341
|
+
if (t.raw && r.length && (n = Vn(this.strm, r), n !== 0)) throw Error(Be[n]);
|
|
1342
1342
|
}
|
|
1343
1343
|
push(e, t = !1) {
|
|
1344
1344
|
let n = this.strm, r = this.options.chunkSize, i, a, o;
|
|
1345
1345
|
if (this.ended) return this.err === 0;
|
|
1346
|
-
for (a = typeof t == "number" ? t : t === !0 ? 4 : 0,
|
|
1347
|
-
if (n.avail_out === 0 && (n.output = new Uint8Array(r), n.next_out = 0, n.avail_out = r), i =
|
|
1346
|
+
for (a = typeof t == "number" ? t : t === !0 ? 4 : 0, Jn.call(e) === "[object ArrayBuffer]" ? n.input = new Uint8Array(e) : n.input = e, n.next_in = 0, n.avail_in = n.input.length, this.started || (this.started = !0, this.onStart(n));;) {
|
|
1347
|
+
if (n.avail_out === 0 && (n.output = new Uint8Array(r), n.next_out = 0, n.avail_out = r), i = zn(n, a), i === 2) {
|
|
1348
1348
|
let e = this.options.dictionary;
|
|
1349
|
-
e.length && (i =
|
|
1349
|
+
e.length && (i = Vn(n, e), i === 0 ? i = zn(n, a) : i === -3 && (i = 2));
|
|
1350
1350
|
}
|
|
1351
|
-
for (; n.avail_in > 0 && i === 1 && n.state.wrap & 2 && n.state.flags !== 0 && n.input[n.next_in] !== 0;)
|
|
1351
|
+
for (; n.avail_in > 0 && i === 1 && n.state.wrap & 2 && n.state.flags !== 0 && n.input[n.next_in] !== 0;) jn(n), i = zn(n, a);
|
|
1352
1352
|
if (i === -2 || i === -3 || i === 2 || i === -4) break;
|
|
1353
1353
|
if (o = n.avail_out, n.next_out && (n.avail_out === 0 || i === 1 || a > 0) && (this.onData(n.output.length === n.next_out ? n.output : n.output.subarray(0, n.next_out)), n.avail_out = 0, n.next_out = 0), !((i === 0 || i === -5) && o === 0)) {
|
|
1354
1354
|
if (i === 1) {
|
|
1355
|
-
i =
|
|
1355
|
+
i = Bn(this.strm);
|
|
1356
1356
|
break;
|
|
1357
1357
|
}
|
|
1358
1358
|
if (n.avail_in === 0) {
|
|
1359
1359
|
if (a === 4) {
|
|
1360
|
-
i =
|
|
1360
|
+
i = Bn(this.strm), i === 0 && (i = -5);
|
|
1361
1361
|
break;
|
|
1362
1362
|
}
|
|
1363
1363
|
return !0;
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
1367
|
-
return this.err = i, this.msg = n.msg ||
|
|
1367
|
+
return this.err = i, this.msg = n.msg || Be[i], this.ended = !0, this.onEnd(i), i === 0;
|
|
1368
1368
|
}
|
|
1369
1369
|
onStart(e) {}
|
|
1370
1370
|
onData(e) {
|
|
1371
1371
|
this.chunks.push(e);
|
|
1372
1372
|
}
|
|
1373
1373
|
onEnd(e) {
|
|
1374
|
-
e === 0 && (this.result =
|
|
1374
|
+
e === 0 && (this.result = Un(this.chunks)), this.chunks = [];
|
|
1375
1375
|
}
|
|
1376
1376
|
};
|
|
1377
|
-
function
|
|
1378
|
-
let n = new
|
|
1377
|
+
function Zn(e, t = {}) {
|
|
1378
|
+
let n = new Xn(t);
|
|
1379
1379
|
if (n.push(e, !0), n.err) throw Error(n.msg);
|
|
1380
1380
|
let r = n.result;
|
|
1381
1381
|
return t.toText ? new TextDecoder().decode(r) : r;
|
|
1382
1382
|
}
|
|
1383
1383
|
//#endregion
|
|
1384
1384
|
//#region src/uuid.ts
|
|
1385
|
-
var
|
|
1386
|
-
function
|
|
1387
|
-
return (
|
|
1385
|
+
var H = Array.from({ length: 256 }).map((e, t) => (t + 256).toString(16).substr(1));
|
|
1386
|
+
function Qn(e) {
|
|
1387
|
+
return (H[e[0]] + H[e[1]] + H[e[2]] + H[e[3]] + "-" + H[e[4]] + H[e[5]] + "-" + H[e[6]] + H[e[7]] + "-" + H[e[8]] + H[e[9]] + "-" + H[e[10]] + H[e[11]] + H[e[12]] + H[e[13]] + H[e[14]] + H[e[15]]).toLowerCase();
|
|
1388
1388
|
}
|
|
1389
|
-
function
|
|
1389
|
+
function $n(e) {
|
|
1390
1390
|
let t, n = /* @__PURE__ */ new Uint8Array(16);
|
|
1391
1391
|
return n[0] = (t = parseInt(e.slice(0, 8), 16)) >>> 24, n[1] = t >>> 16 & 255, n[2] = t >>> 8 & 255, n[3] = t & 255, n[4] = (t = parseInt(e.slice(9, 13), 16)) >>> 8, n[5] = t & 255, n[6] = (t = parseInt(e.slice(14, 18), 16)) >>> 8, n[7] = t & 255, n[8] = (t = parseInt(e.slice(19, 23), 16)) >>> 8, n[9] = t & 255, n[10] = (t = parseInt(e.slice(24, 36), 16)) / 1099511627776 & 255, n[11] = t / 4294967296 & 255, n[12] = t >>> 24 & 255, n[13] = t >>> 16 & 255, n[14] = t >>> 8 & 255, n[15] = t & 255, n;
|
|
1392
1392
|
}
|
|
1393
1393
|
//#endregion
|
|
1394
1394
|
//#region src/brs/utils.ts
|
|
1395
|
-
var
|
|
1396
|
-
BitReader: () =>
|
|
1397
|
-
BitWriter: () =>
|
|
1398
|
-
bgra: () =>
|
|
1399
|
-
chunk: () =>
|
|
1400
|
-
concat: () =>
|
|
1401
|
-
isEqual: () =>
|
|
1402
|
-
read: () =>
|
|
1403
|
-
subarray: () =>
|
|
1404
|
-
write: () =>
|
|
1395
|
+
var er = /* @__PURE__ */ t({
|
|
1396
|
+
BitReader: () => yr,
|
|
1397
|
+
BitWriter: () => br,
|
|
1398
|
+
bgra: () => U,
|
|
1399
|
+
chunk: () => ar,
|
|
1400
|
+
concat: () => G,
|
|
1401
|
+
isEqual: () => nr,
|
|
1402
|
+
read: () => K,
|
|
1403
|
+
subarray: () => ir,
|
|
1404
|
+
write: () => q
|
|
1405
1405
|
});
|
|
1406
|
-
function
|
|
1406
|
+
function tr(e) {
|
|
1407
1407
|
return /^[\x00-\x7F]*$/.test(e);
|
|
1408
1408
|
}
|
|
1409
|
-
var
|
|
1409
|
+
var U = ([e, t, n, r]) => [
|
|
1410
1410
|
n,
|
|
1411
1411
|
t,
|
|
1412
1412
|
e,
|
|
1413
1413
|
r
|
|
1414
1414
|
];
|
|
1415
|
-
function
|
|
1415
|
+
function nr(e, t) {
|
|
1416
1416
|
return e.length === t.length && e.every((e, n) => t[n] === e);
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function rr(e) {
|
|
1419
1419
|
return e.brsOffset !== void 0;
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1421
|
+
function ir(e, t, n = !1) {
|
|
1422
1422
|
if (!(e instanceof Uint8Array)) throw Error(`Invalid data type in bytes reader (${typeof e})`);
|
|
1423
1423
|
let r;
|
|
1424
|
-
|
|
1424
|
+
rr(e) ? r = e : (r = e, r.brsOffset = 0);
|
|
1425
1425
|
let i = r[n ? "slice" : "subarray"](r.brsOffset, r.brsOffset + t);
|
|
1426
1426
|
return r.brsOffset += t, i;
|
|
1427
1427
|
}
|
|
1428
|
-
function
|
|
1429
|
-
let n = e.length - (
|
|
1430
|
-
for (let i = 0; i < n / t; i++) r[i] =
|
|
1428
|
+
function ar(e, t) {
|
|
1429
|
+
let n = e.length - (rr(e) ? e.brsOffset : 0), r = Array(Math.floor(n / t));
|
|
1430
|
+
for (let i = 0; i < n / t; i++) r[i] = ir(e, t, !0);
|
|
1431
1431
|
return r;
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1434
|
-
let [n, r] =
|
|
1433
|
+
function W(e, t = !0) {
|
|
1434
|
+
let [n, r] = ir(e, 2);
|
|
1435
1435
|
return t ? r << 8 | n : n << 8 | r;
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1437
|
+
function or(e, t = !0) {
|
|
1438
1438
|
let n = [e & 255, e >> 8 & 255];
|
|
1439
1439
|
return new Uint8Array(t ? n : n.reverse());
|
|
1440
1440
|
}
|
|
1441
|
-
function
|
|
1442
|
-
let [n, r, i, a] =
|
|
1441
|
+
function sr(e, t = !0) {
|
|
1442
|
+
let [n, r, i, a] = ir(e, 4);
|
|
1443
1443
|
return t ? a << 24 | i << 16 | r << 8 | n : n << 24 | r << 16 | i << 8 | a;
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function cr(e, t = !0) {
|
|
1446
1446
|
let n = new Uint8Array([
|
|
1447
1447
|
e & 255,
|
|
1448
1448
|
e >> 8 & 255,
|
|
@@ -1451,64 +1451,64 @@ function lr(e, t = !0) {
|
|
|
1451
1451
|
]);
|
|
1452
1452
|
return t ? n : n.reverse();
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1455
|
-
let t =
|
|
1454
|
+
function lr(e) {
|
|
1455
|
+
let t = sr(e), n = sr(e);
|
|
1456
1456
|
if (n < 0 || t < 0 || n >= t) throw Error(`Invalid compressed section size (comp: ${n}, uncomp: ${t})`);
|
|
1457
|
-
return n === 0 ?
|
|
1457
|
+
return n === 0 ? ir(e, t) : Zn(ir(e, n));
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1460
|
-
let t =
|
|
1461
|
-
return
|
|
1459
|
+
function ur(...e) {
|
|
1460
|
+
let t = G(...e);
|
|
1461
|
+
return G(cr(t.length), cr(0), t);
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1464
|
-
let t =
|
|
1463
|
+
function dr(...e) {
|
|
1464
|
+
let t = G(...e), n = qn(t), r = t.length, i = n.length;
|
|
1465
1465
|
if (r > 2147483647) throw Error(`uncompressedSize (${r}) out of range`);
|
|
1466
1466
|
if (i > 2147483647) throw Error(`compressedSize (${i}) out of range`);
|
|
1467
1467
|
let a = i >= r;
|
|
1468
|
-
return
|
|
1468
|
+
return G(cr(r), cr(a ? 0 : i), a ? t : n);
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1471
|
-
let t =
|
|
1470
|
+
function fr(e) {
|
|
1471
|
+
let t = sr(e), n = t < 0, r = n ? -t * 2 : t;
|
|
1472
1472
|
if (n) {
|
|
1473
1473
|
if (r % 2 != 0) throw Error("Invalid UCS-2 data size");
|
|
1474
|
-
return String.fromCodePoint(...
|
|
1474
|
+
return String.fromCodePoint(...ar(ir(e, r), 2).map((e) => W(e)));
|
|
1475
1475
|
} else {
|
|
1476
|
-
let t =
|
|
1476
|
+
let t = ir(e, r).subarray(0, -1);
|
|
1477
1477
|
return String.fromCharCode.apply(null, t);
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1481
|
-
return
|
|
1480
|
+
function pr(e) {
|
|
1481
|
+
return tr(e) ? G(cr(e.length + 1), new Uint8Array(e.split("").map((e) => e.charCodeAt(0))), new Uint8Array([0])) : G(cr(-e.length), new Uint8Array(e.split("").flatMap((e) => [e.charCodeAt(0) & 255, e.charCodeAt(0) >> 8])));
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return
|
|
1483
|
+
function mr(e) {
|
|
1484
|
+
return Qn(ar(ir(e, 16), 4).flatMap(([e, t, n, r]) => [
|
|
1485
1485
|
r,
|
|
1486
1486
|
n,
|
|
1487
1487
|
t,
|
|
1488
1488
|
e
|
|
1489
1489
|
]));
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1492
|
-
return
|
|
1491
|
+
function hr(e) {
|
|
1492
|
+
return G(...ar($n(e), 4).map(([e, t, n, r]) => new Uint8Array([
|
|
1493
1493
|
r,
|
|
1494
1494
|
n,
|
|
1495
1495
|
t,
|
|
1496
1496
|
e
|
|
1497
1497
|
])));
|
|
1498
1498
|
}
|
|
1499
|
-
function
|
|
1500
|
-
let n =
|
|
1499
|
+
function gr(e, t) {
|
|
1500
|
+
let n = sr(e), r = Array(n);
|
|
1501
1501
|
for (let i = 0; i < n; i++) r[i] = t(e);
|
|
1502
1502
|
return r;
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1505
|
-
let n =
|
|
1504
|
+
function _r(e, t) {
|
|
1505
|
+
let n = sr(e);
|
|
1506
1506
|
for (let r = 0; r < n; r++) t(e);
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1509
|
-
return
|
|
1508
|
+
function vr(e, t) {
|
|
1509
|
+
return G(cr(e.length), ...e.map((e) => t(e)));
|
|
1510
1510
|
}
|
|
1511
|
-
var
|
|
1511
|
+
var yr = class {
|
|
1512
1512
|
constructor(e) {
|
|
1513
1513
|
this.pos = 0, this.buffer = e;
|
|
1514
1514
|
}
|
|
@@ -1555,36 +1555,36 @@ var br = class {
|
|
|
1555
1555
|
return this.bits(e * 8);
|
|
1556
1556
|
}
|
|
1557
1557
|
array(e) {
|
|
1558
|
-
let t =
|
|
1558
|
+
let t = sr(this.bytes(4)), n = Array(t);
|
|
1559
1559
|
for (let r = 0; r < t; r++) n[r] = e(this);
|
|
1560
1560
|
return n;
|
|
1561
1561
|
}
|
|
1562
1562
|
each(e) {
|
|
1563
|
-
let t =
|
|
1563
|
+
let t = sr(this.bytes(4));
|
|
1564
1564
|
for (let n = 0; n < t; n++) e(this);
|
|
1565
1565
|
}
|
|
1566
1566
|
string() {
|
|
1567
|
-
let e = this.bytesArr(4), t =
|
|
1568
|
-
return t < 0 && (t = -t * 2),
|
|
1567
|
+
let e = this.bytesArr(4), t = sr(new Uint8Array(e));
|
|
1568
|
+
return t < 0 && (t = -t * 2), fr(new Uint8Array(e.concat(this.bytesArr(t))));
|
|
1569
1569
|
}
|
|
1570
1570
|
float() {
|
|
1571
1571
|
let e = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(4));
|
|
1572
|
-
return e.setUint16(2,
|
|
1572
|
+
return e.setUint16(2, W(this.bytes(2))), e.setUint16(0, W(this.bytes(2))), e.getFloat32(0);
|
|
1573
1573
|
}
|
|
1574
1574
|
integer() {
|
|
1575
1575
|
let e = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(4));
|
|
1576
|
-
return e.setUint16(2,
|
|
1576
|
+
return e.setUint16(2, W(this.bytes(2))), e.setUint16(0, W(this.bytes(2))), e.getInt32(0);
|
|
1577
1577
|
}
|
|
1578
1578
|
int64() {
|
|
1579
1579
|
let e = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8));
|
|
1580
|
-
e.setUint16(6,
|
|
1580
|
+
e.setUint16(6, W(this.bytes(2))), e.setUint16(4, W(this.bytes(2))), e.setUint16(2, W(this.bytes(2))), e.setUint16(0, W(this.bytes(2)));
|
|
1581
1581
|
let t = e.getBigInt64(0);
|
|
1582
1582
|
if (t <= 1n << 64n) return Number(t);
|
|
1583
1583
|
throw Error(`Cannot read 64-bit integer ${t} as a JavaScript number...`);
|
|
1584
1584
|
}
|
|
1585
1585
|
double() {
|
|
1586
1586
|
let e = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8));
|
|
1587
|
-
return e.setUint16(6,
|
|
1587
|
+
return e.setUint16(6, W(this.bytes(2))), e.setUint16(4, W(this.bytes(2))), e.setUint16(2, W(this.bytes(2))), e.setUint16(0, W(this.bytes(2))), e.getFloat64(0);
|
|
1588
1588
|
}
|
|
1589
1589
|
wireGraphVariant() {
|
|
1590
1590
|
let e = this.bytes(1)[0];
|
|
@@ -1602,12 +1602,12 @@ var br = class {
|
|
|
1602
1602
|
case "String":
|
|
1603
1603
|
case "Class":
|
|
1604
1604
|
case "Object": return this.string();
|
|
1605
|
-
case "Boolean": return !!
|
|
1605
|
+
case "Boolean": return !!sr(this.bytes(4));
|
|
1606
1606
|
case "Integer": return this.integer();
|
|
1607
1607
|
case "Integer64": return this.int64();
|
|
1608
1608
|
case "Float": return this.float();
|
|
1609
1609
|
case "Double": return this.double();
|
|
1610
|
-
case "Color": return
|
|
1610
|
+
case "Color": return U(this.bytesArr(4));
|
|
1611
1611
|
case "Byte": return this.bytes(1)[0];
|
|
1612
1612
|
case "Rotator":
|
|
1613
1613
|
case "Rotator3d": return [
|
|
@@ -1631,7 +1631,7 @@ var br = class {
|
|
|
1631
1631
|
}
|
|
1632
1632
|
throw Error("Unknown unreal type " + e);
|
|
1633
1633
|
}
|
|
1634
|
-
},
|
|
1634
|
+
}, br = class {
|
|
1635
1635
|
constructor() {
|
|
1636
1636
|
this.buffer = [], this.cur = 0, this.bitNum = 0;
|
|
1637
1637
|
}
|
|
@@ -1666,10 +1666,10 @@ var br = class {
|
|
|
1666
1666
|
return this.align(), new Uint8Array(this.buffer);
|
|
1667
1667
|
}
|
|
1668
1668
|
finishSection() {
|
|
1669
|
-
return this.align(),
|
|
1669
|
+
return this.align(), G(cr(this.buffer.length), new Uint8Array(this.buffer));
|
|
1670
1670
|
}
|
|
1671
1671
|
string(e) {
|
|
1672
|
-
this.bytes(
|
|
1672
|
+
this.bytes(pr(e));
|
|
1673
1673
|
}
|
|
1674
1674
|
float(e) {
|
|
1675
1675
|
let t = /* @__PURE__ */ new Float32Array(1);
|
|
@@ -1724,7 +1724,7 @@ var br = class {
|
|
|
1724
1724
|
return e.bind(this)(), this;
|
|
1725
1725
|
}
|
|
1726
1726
|
array(e, t) {
|
|
1727
|
-
return this.bytes(
|
|
1727
|
+
return this.bytes(cr(e.length)), e.forEach(t.bind(this)), this;
|
|
1728
1728
|
}
|
|
1729
1729
|
each(e, t) {
|
|
1730
1730
|
return e.forEach(t.bind(this)), this;
|
|
@@ -1745,7 +1745,7 @@ var br = class {
|
|
|
1745
1745
|
return;
|
|
1746
1746
|
case "Boolean":
|
|
1747
1747
|
if (typeof t != "boolean") throw Error(`writing unreal type Boolean, did not receive boolean (${t})`);
|
|
1748
|
-
this.bytes(
|
|
1748
|
+
this.bytes(cr(+!!t));
|
|
1749
1749
|
return;
|
|
1750
1750
|
case "Float":
|
|
1751
1751
|
if (typeof t != "number") throw Error(`writing unreal type Float, did not receive float (${t})`);
|
|
@@ -1757,7 +1757,7 @@ var br = class {
|
|
|
1757
1757
|
return;
|
|
1758
1758
|
case "Color":
|
|
1759
1759
|
if (!Array.isArray(t) || t.length !== 4) throw Error(`writing unreal type Color, did not receive Array (${t})`);
|
|
1760
|
-
this.bytes(
|
|
1760
|
+
this.bytes(U(t));
|
|
1761
1761
|
return;
|
|
1762
1762
|
case "Rotator":
|
|
1763
1763
|
case "Rotator3d":
|
|
@@ -1800,38 +1800,38 @@ var br = class {
|
|
|
1800
1800
|
throw Error("Unknown unreal type " + e);
|
|
1801
1801
|
}
|
|
1802
1802
|
};
|
|
1803
|
-
function
|
|
1803
|
+
function G(...e) {
|
|
1804
1804
|
let t = e.reduce((e, t) => e + t.length, 0), n = new Uint8Array(t), r = 0;
|
|
1805
1805
|
for (let t of e) n.set(t, r), r += t.length;
|
|
1806
1806
|
return n;
|
|
1807
1807
|
}
|
|
1808
|
-
var
|
|
1809
|
-
bytes:
|
|
1810
|
-
u16:
|
|
1808
|
+
var K = {
|
|
1809
|
+
bytes: ir,
|
|
1810
|
+
u16: W,
|
|
1811
|
+
i32: sr,
|
|
1812
|
+
compressed: lr,
|
|
1813
|
+
string: fr,
|
|
1814
|
+
uuid: mr,
|
|
1815
|
+
array: gr,
|
|
1816
|
+
each: _r,
|
|
1817
|
+
bits: (e) => new yr(e)
|
|
1818
|
+
}, q = {
|
|
1819
|
+
u16: or,
|
|
1811
1820
|
i32: cr,
|
|
1812
|
-
compressed:
|
|
1821
|
+
compressed: dr,
|
|
1822
|
+
uncompressed: ur,
|
|
1813
1823
|
string: pr,
|
|
1814
1824
|
uuid: hr,
|
|
1815
|
-
array:
|
|
1816
|
-
|
|
1817
|
-
bits: (e) => new br(e)
|
|
1818
|
-
}, K = {
|
|
1819
|
-
u16: sr,
|
|
1820
|
-
i32: lr,
|
|
1821
|
-
compressed: fr,
|
|
1822
|
-
uncompressed: dr,
|
|
1823
|
-
string: mr,
|
|
1824
|
-
uuid: gr,
|
|
1825
|
-
array: yr,
|
|
1826
|
-
bits: () => new xr()
|
|
1825
|
+
array: vr,
|
|
1826
|
+
bits: () => new br()
|
|
1827
1827
|
};
|
|
1828
1828
|
//#endregion
|
|
1829
1829
|
//#region src/brs/read.v1.ts
|
|
1830
|
-
function
|
|
1831
|
-
let n =
|
|
1830
|
+
function xr(e, t = {}) {
|
|
1831
|
+
let n = K.compressed(e), r = K.compressed(e), i = K.string(n), a = K.string(n), o = K.string(n), s = K.uuid(n), c = K.i32(n), l = K.array(r, K.string), u = K.array(r, K.string), d = K.array(r, (e) => U(Array.from(K.bytes(e, 4)))), f = [], p = Math.max(u.length, 2);
|
|
1832
1832
|
if (t.bricks) {
|
|
1833
1833
|
f = Array(c);
|
|
1834
|
-
let t =
|
|
1834
|
+
let t = K.compressed(e), n = K.bits(t);
|
|
1835
1835
|
for (let e = 0; !n.empty() && e < c; e++) {
|
|
1836
1836
|
n.align();
|
|
1837
1837
|
let t = n.int(p), r = n.bit() ? [
|
|
@@ -1846,7 +1846,7 @@ function Sr(e, t = {}) {
|
|
|
1846
1846
|
n.int_packed(),
|
|
1847
1847
|
n.int_packed(),
|
|
1848
1848
|
n.int_packed()
|
|
1849
|
-
], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ?
|
|
1849
|
+
], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? U(n.bytesArr(4)) : n.int(d.length);
|
|
1850
1850
|
f[e] = {
|
|
1851
1851
|
asset_name_index: t,
|
|
1852
1852
|
size: r,
|
|
@@ -1876,23 +1876,23 @@ function Sr(e, t = {}) {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
//#endregion
|
|
1878
1878
|
//#region src/brs/read.v10.ts
|
|
1879
|
-
function
|
|
1880
|
-
let n =
|
|
1881
|
-
name:
|
|
1882
|
-
id:
|
|
1883
|
-
}, u =
|
|
1884
|
-
id:
|
|
1885
|
-
name:
|
|
1886
|
-
bricks:
|
|
1887
|
-
})), _ =
|
|
1888
|
-
if (
|
|
1889
|
-
let n =
|
|
1890
|
-
t.preview ? v =
|
|
1879
|
+
function Sr(e, t = {}) {
|
|
1880
|
+
let n = K.i32(e), r = K.compressed(e), i = K.compressed(e), a = K.string(r), o = K.string(r), s = K.string(r), c = K.uuid(r), l = {
|
|
1881
|
+
name: K.string(r),
|
|
1882
|
+
id: K.uuid(r)
|
|
1883
|
+
}, u = K.bytes(r, 8), d = K.i32(r), f = K.array(i, K.string), p = K.array(i, K.string), m = K.array(i, (e) => U(Array.from(K.bytes(e, 4)))), h = K.array(i, K.string), g = K.array(i, (e) => ({
|
|
1884
|
+
id: K.uuid(e),
|
|
1885
|
+
name: K.string(e),
|
|
1886
|
+
bricks: K.i32(e)
|
|
1887
|
+
})), _ = K.array(i, K.string), v = null;
|
|
1888
|
+
if (K.bytes(e, 1)[0]) {
|
|
1889
|
+
let n = K.i32(e);
|
|
1890
|
+
t.preview ? v = K.bytes(e, n) : e.brsOffset += n;
|
|
1891
1891
|
}
|
|
1892
1892
|
let y = [], b = {}, x = Math.max(_.length, 2), S = Math.max(h.length, 2), C = Math.max(p.length, 2);
|
|
1893
1893
|
if (t.bricks) {
|
|
1894
1894
|
y = Array(d);
|
|
1895
|
-
let t =
|
|
1895
|
+
let t = K.compressed(e), n = K.bits(t);
|
|
1896
1896
|
for (let e = 0; !n.empty() && e < d; e++) {
|
|
1897
1897
|
n.align();
|
|
1898
1898
|
let t = n.int(C), r = n.bit() ? [
|
|
@@ -1930,9 +1930,9 @@ function Cr(e, t = {}) {
|
|
|
1930
1930
|
components: {}
|
|
1931
1931
|
};
|
|
1932
1932
|
}
|
|
1933
|
-
let r =
|
|
1934
|
-
|
|
1935
|
-
let t =
|
|
1933
|
+
let r = K.compressed(e), i = Math.max(y.length, 2);
|
|
1934
|
+
K.each(r, (e) => {
|
|
1935
|
+
let t = K.string(e), n = K.bits(K.bytes(e, K.i32(e))), r = K.i32(n.bytes(4)), a = n.array(() => n.int(i)), o = n.array(() => [n.string(), n.string()]);
|
|
1936
1936
|
for (let e of a) {
|
|
1937
1937
|
let r = {};
|
|
1938
1938
|
for (let [e, t] of o) r[e] = n.unreal(t);
|
|
@@ -1970,24 +1970,24 @@ function Cr(e, t = {}) {
|
|
|
1970
1970
|
}
|
|
1971
1971
|
//#endregion
|
|
1972
1972
|
//#region src/brs/read.v14.ts
|
|
1973
|
-
function
|
|
1974
|
-
let n =
|
|
1975
|
-
name:
|
|
1976
|
-
id:
|
|
1977
|
-
}, u =
|
|
1978
|
-
id:
|
|
1979
|
-
name:
|
|
1980
|
-
display_name:
|
|
1981
|
-
bricks:
|
|
1982
|
-
})), _ =
|
|
1983
|
-
if (
|
|
1984
|
-
let n =
|
|
1985
|
-
t.preview ? v =
|
|
1973
|
+
function Cr(e, t = {}) {
|
|
1974
|
+
let n = K.i32(e), r = K.compressed(e), i = K.compressed(e), a = K.string(r), o = K.string(r), s = K.string(r), c = K.uuid(r), l = {
|
|
1975
|
+
name: K.string(r),
|
|
1976
|
+
id: K.uuid(r)
|
|
1977
|
+
}, u = K.bytes(r, 8), d = K.i32(r), f = K.array(i, K.string), p = K.array(i, K.string), m = K.array(i, (e) => U(Array.from(K.bytes(e, 4)))), h = K.array(i, K.string), g = K.array(i, (e) => ({
|
|
1978
|
+
id: K.uuid(e),
|
|
1979
|
+
name: K.string(e),
|
|
1980
|
+
display_name: K.string(e),
|
|
1981
|
+
bricks: K.i32(e)
|
|
1982
|
+
})), _ = K.array(i, K.string), v = null;
|
|
1983
|
+
if (K.bytes(e, 1)[0]) {
|
|
1984
|
+
let n = K.i32(e);
|
|
1985
|
+
t.preview ? v = K.bytes(e, n) : e.brsOffset += n;
|
|
1986
1986
|
}
|
|
1987
1987
|
let y = [], b = {}, x = [], S = Math.max(_.length, 2), C = Math.max(h.length, 2), w = Math.max(p.length, 2);
|
|
1988
1988
|
if (t.bricks) {
|
|
1989
1989
|
y = Array(d);
|
|
1990
|
-
let t =
|
|
1990
|
+
let t = K.compressed(e), n = K.bits(t);
|
|
1991
1991
|
for (let e = 0; !n.empty() && e < d; e++) {
|
|
1992
1992
|
n.align();
|
|
1993
1993
|
let t = n.int(w), r = n.bit() ? [
|
|
@@ -2025,9 +2025,9 @@ function wr(e, t = {}) {
|
|
|
2025
2025
|
components: {}
|
|
2026
2026
|
};
|
|
2027
2027
|
}
|
|
2028
|
-
let r =
|
|
2029
|
-
|
|
2030
|
-
let t =
|
|
2028
|
+
let r = K.compressed(e), i = K.compressed(e), a = Math.max(y.length, 2), o = [];
|
|
2029
|
+
K.each(r, (e) => {
|
|
2030
|
+
let t = K.string(e), n = K.bits(K.bytes(e, K.i32(e))), r = K.i32(n.bytes(4)), i = n.array(() => n.int(a)), s = n.array(() => [n.string(), n.string()]);
|
|
2031
2031
|
for (let e of i) {
|
|
2032
2032
|
let r = {};
|
|
2033
2033
|
for (let [e, t] of s) r[e] = n.unreal(t);
|
|
@@ -2041,7 +2041,7 @@ function wr(e, t = {}) {
|
|
|
2041
2041
|
});
|
|
2042
2042
|
let s = Math.max(o.length, 2);
|
|
2043
2043
|
{
|
|
2044
|
-
let e =
|
|
2044
|
+
let e = K.bits(i), t = e.int(4294967295);
|
|
2045
2045
|
for (let n = 0; n < t; n++) {
|
|
2046
2046
|
let t = e.int(a), n = e.int(s), r = e.string(), i = e.int(a), c = e.int(s), l = e.string();
|
|
2047
2047
|
e.bit(), e.align(), x.push({
|
|
@@ -2085,11 +2085,11 @@ function wr(e, t = {}) {
|
|
|
2085
2085
|
}
|
|
2086
2086
|
//#endregion
|
|
2087
2087
|
//#region src/brs/read.v2.ts
|
|
2088
|
-
function
|
|
2089
|
-
let n =
|
|
2088
|
+
function wr(e, t = {}) {
|
|
2089
|
+
let n = K.compressed(e), r = K.compressed(e), i = K.string(n), a = K.string(n), o = K.string(n), s = K.uuid(n), c = K.i32(n), l = K.array(r, K.string), u = K.array(r, K.string), d = K.array(r, (e) => U(Array.from(K.bytes(e, 4)))), f = K.array(r, K.string), p = [], m = Math.max(u.length, 2);
|
|
2090
2090
|
if (t.bricks) {
|
|
2091
2091
|
p = Array(c);
|
|
2092
|
-
let t =
|
|
2092
|
+
let t = K.compressed(e), n = K.bits(t);
|
|
2093
2093
|
for (let e = 0; !n.empty() && e < c; e++) {
|
|
2094
2094
|
n.align();
|
|
2095
2095
|
let t = n.int(m), r = n.bit() ? [
|
|
@@ -2104,7 +2104,7 @@ function Tr(e, t = {}) {
|
|
|
2104
2104
|
n.int_packed(),
|
|
2105
2105
|
n.int_packed(),
|
|
2106
2106
|
n.int_packed()
|
|
2107
|
-
], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, f = n.bit() ?
|
|
2107
|
+
], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, f = n.bit() ? U(n.bytesArr(4)) : n.int(d.length);
|
|
2108
2108
|
p[e] = {
|
|
2109
2109
|
asset_name_index: t,
|
|
2110
2110
|
size: r,
|
|
@@ -2136,14 +2136,14 @@ function Tr(e, t = {}) {
|
|
|
2136
2136
|
}
|
|
2137
2137
|
//#endregion
|
|
2138
2138
|
//#region src/brs/read.v3.ts
|
|
2139
|
-
function
|
|
2140
|
-
let n =
|
|
2141
|
-
id:
|
|
2142
|
-
name:
|
|
2139
|
+
function Tr(e, t = {}) {
|
|
2140
|
+
let n = K.compressed(e), r = K.compressed(e), i = K.string(n), a = K.string(n), o = K.string(n), s = K.uuid(n), c = K.i32(n), l = K.array(r, K.string), u = K.array(r, K.string), d = K.array(r, (e) => U(Array.from(K.bytes(e, 4)))), f = K.array(r, K.string), p = K.array(r, (e) => ({
|
|
2141
|
+
id: K.uuid(e),
|
|
2142
|
+
name: K.string(e)
|
|
2143
2143
|
})), m = [], h = Math.max(u.length, 2);
|
|
2144
2144
|
if (t.bricks) {
|
|
2145
2145
|
m = Array(c);
|
|
2146
|
-
let t =
|
|
2146
|
+
let t = K.compressed(e), n = K.bits(t);
|
|
2147
2147
|
for (let e = 0; !n.empty() && e < c; e++) {
|
|
2148
2148
|
n.align();
|
|
2149
2149
|
let t = n.int(h), r = n.bit() ? [
|
|
@@ -2158,7 +2158,7 @@ function Er(e, t = {}) {
|
|
|
2158
2158
|
n.int_packed(),
|
|
2159
2159
|
n.int_packed(),
|
|
2160
2160
|
n.int_packed()
|
|
2161
|
-
], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, f = n.bit() ?
|
|
2161
|
+
], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, f = n.bit() ? U(n.bytesArr(4)) : n.int(d.length), p = n.uint_packed();
|
|
2162
2162
|
m[e] = {
|
|
2163
2163
|
asset_name_index: t,
|
|
2164
2164
|
size: r,
|
|
@@ -2192,14 +2192,14 @@ function Er(e, t = {}) {
|
|
|
2192
2192
|
}
|
|
2193
2193
|
//#endregion
|
|
2194
2194
|
//#region src/brs/read.v4.ts
|
|
2195
|
-
function
|
|
2196
|
-
let n =
|
|
2197
|
-
id:
|
|
2198
|
-
name:
|
|
2195
|
+
function Er(e, t = {}) {
|
|
2196
|
+
let n = K.compressed(e), r = K.compressed(e), i = K.string(n), a = K.string(n), o = K.string(n), s = K.uuid(n), c = K.bytes(n, 8), l = K.i32(n), u = K.array(r, K.string), d = K.array(r, K.string), f = K.array(r, (e) => U(Array.from(K.bytes(e, 4)))), p = K.array(r, K.string), m = K.array(r, (e) => ({
|
|
2197
|
+
id: K.uuid(e),
|
|
2198
|
+
name: K.string(e)
|
|
2199
2199
|
})), h = [], g = Math.max(d.length, 2);
|
|
2200
2200
|
if (t.bricks) {
|
|
2201
2201
|
h = Array(l);
|
|
2202
|
-
let t =
|
|
2202
|
+
let t = K.compressed(e), n = K.bits(t);
|
|
2203
2203
|
for (let e = 0; !n.empty() && e < l; e++) {
|
|
2204
2204
|
n.align();
|
|
2205
2205
|
let t = n.int(g), r = n.bit() ? [
|
|
@@ -2214,7 +2214,7 @@ function Dr(e, t = {}) {
|
|
|
2214
2214
|
n.int_packed(),
|
|
2215
2215
|
n.int_packed(),
|
|
2216
2216
|
n.int_packed()
|
|
2217
|
-
], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, d = n.bit() ?
|
|
2217
|
+
], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, d = n.bit() ? U(n.bytesArr(4)) : n.int(f.length), p = n.uint_packed();
|
|
2218
2218
|
h[e] = {
|
|
2219
2219
|
asset_name_index: t,
|
|
2220
2220
|
size: r,
|
|
@@ -2249,23 +2249,23 @@ function Dr(e, t = {}) {
|
|
|
2249
2249
|
}
|
|
2250
2250
|
//#endregion
|
|
2251
2251
|
//#region src/brs/read.v8.ts
|
|
2252
|
-
function
|
|
2253
|
-
let n =
|
|
2254
|
-
name:
|
|
2255
|
-
id:
|
|
2256
|
-
}, u =
|
|
2257
|
-
id:
|
|
2258
|
-
name:
|
|
2259
|
-
bricks:
|
|
2252
|
+
function Dr(e, t = {}) {
|
|
2253
|
+
let n = K.i32(e), r = K.compressed(e), i = K.compressed(e), a = K.string(r), o = K.string(r), s = K.string(r), c = K.uuid(r), l = {
|
|
2254
|
+
name: K.string(r),
|
|
2255
|
+
id: K.uuid(r)
|
|
2256
|
+
}, u = K.bytes(r, 8), d = K.i32(r), f = K.array(i, K.string), p = K.array(i, K.string), m = K.array(i, (e) => U(Array.from(K.bytes(e, 4)))), h = K.array(i, K.string), g = K.array(i, (e) => ({
|
|
2257
|
+
id: K.uuid(e),
|
|
2258
|
+
name: K.string(e),
|
|
2259
|
+
bricks: K.i32(e)
|
|
2260
2260
|
})), _ = null;
|
|
2261
|
-
if (
|
|
2262
|
-
let n =
|
|
2263
|
-
t.preview ? _ =
|
|
2261
|
+
if (K.bytes(e, 1)[0]) {
|
|
2262
|
+
let n = K.i32(e);
|
|
2263
|
+
t.preview ? _ = K.bytes(e, n) : e.brsOffset += n;
|
|
2264
2264
|
}
|
|
2265
2265
|
let v = [], y = {}, b = Math.max(h.length, 2), x = Math.max(p.length, 2);
|
|
2266
2266
|
if (t.bricks) {
|
|
2267
2267
|
v = Array(d);
|
|
2268
|
-
let t =
|
|
2268
|
+
let t = K.compressed(e), n = K.bits(t);
|
|
2269
2269
|
for (let e = 0; !n.empty() && e < d; e++) {
|
|
2270
2270
|
n.align();
|
|
2271
2271
|
let t = n.int(x), r = n.bit() ? [
|
|
@@ -2280,7 +2280,7 @@ function Or(e, t = {}) {
|
|
|
2280
2280
|
n.int_packed(),
|
|
2281
2281
|
n.int_packed(),
|
|
2282
2282
|
n.int_packed()
|
|
2283
|
-
], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.int(b), d = n.bit() ?
|
|
2283
|
+
], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.int(b), d = n.bit() ? U(n.bytesArr(4)) : n.int(m.length), f = n.uint_packed();
|
|
2284
2284
|
v[e] = {
|
|
2285
2285
|
asset_name_index: t,
|
|
2286
2286
|
size: r,
|
|
@@ -2295,9 +2295,9 @@ function Or(e, t = {}) {
|
|
|
2295
2295
|
components: {}
|
|
2296
2296
|
};
|
|
2297
2297
|
}
|
|
2298
|
-
let r =
|
|
2299
|
-
|
|
2300
|
-
let t =
|
|
2298
|
+
let r = K.compressed(e), i = Math.max(v.length, 2);
|
|
2299
|
+
K.each(r, (e) => {
|
|
2300
|
+
let t = K.string(e), n = K.bits(K.bytes(e, K.i32(e))), r = K.i32(n.bytes(4)), a = n.array(() => n.int(i)), o = n.array(() => [n.string(), n.string()]);
|
|
2301
2301
|
for (let e of a) {
|
|
2302
2302
|
let r = {};
|
|
2303
2303
|
for (let [e, t] of o) r[e] = n.unreal(t);
|
|
@@ -2334,23 +2334,23 @@ function Or(e, t = {}) {
|
|
|
2334
2334
|
}
|
|
2335
2335
|
//#endregion
|
|
2336
2336
|
//#region src/brs/read.v9.ts
|
|
2337
|
-
function
|
|
2338
|
-
let n =
|
|
2339
|
-
name:
|
|
2340
|
-
id:
|
|
2341
|
-
}, u =
|
|
2342
|
-
id:
|
|
2343
|
-
name:
|
|
2344
|
-
bricks:
|
|
2345
|
-
})), _ =
|
|
2346
|
-
if (
|
|
2347
|
-
let n =
|
|
2348
|
-
t.preview ? v =
|
|
2337
|
+
function Or(e, t = {}) {
|
|
2338
|
+
let n = K.i32(e), r = K.compressed(e), i = K.compressed(e), a = K.string(r), o = K.string(r), s = K.string(r), c = K.uuid(r), l = {
|
|
2339
|
+
name: K.string(r),
|
|
2340
|
+
id: K.uuid(r)
|
|
2341
|
+
}, u = K.bytes(r, 8), d = K.i32(r), f = K.array(i, K.string), p = K.array(i, K.string), m = K.array(i, (e) => U(Array.from(K.bytes(e, 4)))), h = K.array(i, K.string), g = K.array(i, (e) => ({
|
|
2342
|
+
id: K.uuid(e),
|
|
2343
|
+
name: K.string(e),
|
|
2344
|
+
bricks: K.i32(e)
|
|
2345
|
+
})), _ = K.array(i, K.string), v = null;
|
|
2346
|
+
if (K.bytes(e, 1)[0]) {
|
|
2347
|
+
let n = K.i32(e);
|
|
2348
|
+
t.preview ? v = K.bytes(e, n) : e.brsOffset += n;
|
|
2349
2349
|
}
|
|
2350
2350
|
let y = [], b = {}, x = Math.max(_.length, 2), S = Math.max(h.length, 2), C = Math.max(p.length, 2);
|
|
2351
2351
|
if (t.bricks) {
|
|
2352
2352
|
y = Array(d);
|
|
2353
|
-
let t =
|
|
2353
|
+
let t = K.compressed(e), n = K.bits(t);
|
|
2354
2354
|
for (let e = 0; !n.empty() && e < d; e++) {
|
|
2355
2355
|
n.align();
|
|
2356
2356
|
let t = n.int(C), r = n.bit() ? [
|
|
@@ -2382,9 +2382,9 @@ function kr(e, t = {}) {
|
|
|
2382
2382
|
components: {}
|
|
2383
2383
|
};
|
|
2384
2384
|
}
|
|
2385
|
-
let r =
|
|
2386
|
-
|
|
2387
|
-
let t =
|
|
2385
|
+
let r = K.compressed(e), i = Math.max(y.length, 2);
|
|
2386
|
+
K.each(r, (e) => {
|
|
2387
|
+
let t = K.string(e), n = K.bits(K.bytes(e, K.i32(e))), r = K.i32(n.bytes(4)), a = n.array(() => n.int(i)), o = n.array(() => [n.string(), n.string()]);
|
|
2388
2388
|
for (let e of a) {
|
|
2389
2389
|
let r = {};
|
|
2390
2390
|
for (let [e, t] of o) r[e] = n.unreal(t);
|
|
@@ -2422,27 +2422,27 @@ function kr(e, t = {}) {
|
|
|
2422
2422
|
}
|
|
2423
2423
|
//#endregion
|
|
2424
2424
|
//#region src/brs/read.ts
|
|
2425
|
-
function
|
|
2425
|
+
function kr(e, t = {}) {
|
|
2426
2426
|
if (typeof t != "object") throw Error("Invalid options");
|
|
2427
2427
|
if (typeof t.bricks != "boolean" && (t.bricks = !0), typeof t.preview != "boolean" && (t.preview = !1), e[0] !== r[0] || e[1] !== r[1] || e[2] !== r[2]) throw Error("Invalid starting bytes");
|
|
2428
2428
|
let n = e;
|
|
2429
2429
|
n.brsOffset = 3;
|
|
2430
|
-
let i =
|
|
2430
|
+
let i = K.u16(n);
|
|
2431
2431
|
switch (i) {
|
|
2432
|
-
case 1: return
|
|
2433
|
-
case 2: return
|
|
2434
|
-
case 3: return
|
|
2435
|
-
case 4: return
|
|
2436
|
-
case 8: return
|
|
2437
|
-
case 9: return
|
|
2438
|
-
case 10: return
|
|
2439
|
-
case 14: return
|
|
2432
|
+
case 1: return xr(n, t);
|
|
2433
|
+
case 2: return wr(n, t);
|
|
2434
|
+
case 3: return Tr(n, t);
|
|
2435
|
+
case 4: return Er(n, t);
|
|
2436
|
+
case 8: return Dr(n, t);
|
|
2437
|
+
case 9: return Or(n, t);
|
|
2438
|
+
case 10: return Sr(n, t);
|
|
2439
|
+
case 14: return Cr(n, t);
|
|
2440
2440
|
default: throw Error("Unsupported version " + i);
|
|
2441
2441
|
}
|
|
2442
2442
|
}
|
|
2443
2443
|
//#endregion
|
|
2444
2444
|
//#region src/brs/write.ts
|
|
2445
|
-
var
|
|
2445
|
+
var Ar = new Uint8Array([]), jr = {
|
|
2446
2446
|
BCD_SpotLight: {
|
|
2447
2447
|
version: 1,
|
|
2448
2448
|
properties: {
|
|
@@ -2747,11 +2747,11 @@ var jr = new Uint8Array([]), Mr = {
|
|
|
2747
2747
|
}
|
|
2748
2748
|
}
|
|
2749
2749
|
};
|
|
2750
|
-
function
|
|
2750
|
+
function Mr(e, t = {}) {
|
|
2751
2751
|
if (typeof e != "object") throw Error("Expected save to be an object");
|
|
2752
2752
|
if (!Array.isArray(e.bricks) || e.bricks.length === 0) throw Error("Expected save to have bricks field");
|
|
2753
2753
|
if (e.bricks.length > 2147483647) throw Error("Brick count out of range");
|
|
2754
|
-
let n = t.compress ?
|
|
2754
|
+
let n = t.compress ? q.compressed : q.uncompressed, i = ([e, t, n, r]) => new Uint8Array([
|
|
2755
2755
|
n,
|
|
2756
2756
|
t,
|
|
2757
2757
|
e,
|
|
@@ -2759,7 +2759,7 @@ function Nr(e, t = {}) {
|
|
|
2759
2759
|
]), o = {}, s = Math.max(e.colors?.length ?? 0, 2), c = Math.max(e.brick_assets?.length ?? 0, 2), l = Math.max(e.materials?.length ?? 0, 2), u = Math.max(e.physical_materials?.length ?? 0, 2);
|
|
2760
2760
|
if (e.preview && !Array.isArray(e.preview)) throw Error("Expected preview to be an array");
|
|
2761
2761
|
let d = {}, f = 0;
|
|
2762
|
-
return
|
|
2762
|
+
return G(r, q.u16(14), q.i32(e.game_version ?? 0), n(q.string(e.map ?? "Unknown"), q.string(e.author?.name ?? "Unknown"), q.string(e.description ?? ""), q.uuid(e.author?.id ?? "00000000-0000-0000-0000-000000000000"), G(q.string(e.host?.name ?? "Unknown"), q.uuid(e.host?.id ?? "00000000-0000-0000-0000-000000000000")), new Uint8Array(e.save_time && (Array.isArray(e.save_time) || e.save_time instanceof Uint8Array) && e.save_time.length === 8 ? e.save_time : [
|
|
2763
2763
|
0,
|
|
2764
2764
|
0,
|
|
2765
2765
|
0,
|
|
@@ -2768,12 +2768,12 @@ function Nr(e, t = {}) {
|
|
|
2768
2768
|
0,
|
|
2769
2769
|
0,
|
|
2770
2770
|
0
|
|
2771
|
-
]),
|
|
2771
|
+
]), q.i32(e.bricks.length)), n(q.array(e.mods ?? [], q.string), q.array(e.brick_assets ?? ["PB_DefaultBrick"], q.string), q.array(e.colors ?? [], i), q.array(e.materials ?? ["BMC_Plastic"], q.string), q.array(e.brick_owners ?? [], ({ id: e = a, name: t = "Unknown", display_name: n = "Unknown", bricks: r = 0 }) => G(q.uuid(e), q.string(t), q.string(n), q.i32(r))), q.array(e.physical_materials ?? ["BPMC_Default"], q.string)), G(new Uint8Array([+!!e.preview]), e.preview ? q.i32(e.preview.length) : Ar, e.preview ?? Ar), n(q.bits().each(e.bricks, function(e, t) {
|
|
2772
2772
|
if (typeof e != "object") throw Error(`Expected save.bricks[${t}] to be an object`);
|
|
2773
2773
|
if (!Array.isArray(e.size) || e.size.length !== 3) throw Error(`Expected save.bricks[${t}].size to be an array of length 3`);
|
|
2774
2774
|
if (!Array.isArray(e.position) || e.position.length !== 3) throw Error(`Expected save.bricks[${t}].position to be an array of length 3`);
|
|
2775
2775
|
this.align(), this.int(e.asset_name_index ?? 0, c);
|
|
2776
|
-
let n = e.size === null ||
|
|
2776
|
+
let n = e.size === null || nr(e.size, [
|
|
2777
2777
|
0,
|
|
2778
2778
|
0,
|
|
2779
2779
|
0
|
|
@@ -2789,9 +2789,9 @@ function Nr(e, t = {}) {
|
|
|
2789
2789
|
}
|
|
2790
2790
|
this.uint_packed(e.owner_index >= 0 ? e.owner_index : 0);
|
|
2791
2791
|
for (let n in e.components ?? {}) o[n] ?? (o[n] = []), o[n].push(t);
|
|
2792
|
-
}).finish()), n(
|
|
2793
|
-
let n = e.components?.[t] ??
|
|
2794
|
-
t in d || (d[t] = f, f++), this.bytes(
|
|
2792
|
+
}).finish()), n(q.array(Object.keys(e.components ?? jr).filter((e) => o[e]), (t) => G(q.string(t), q.bits().self(function() {
|
|
2793
|
+
let n = e.components?.[t] ?? jr[t], r = o[t], i = Object.entries(n.properties);
|
|
2794
|
+
t in d || (d[t] = f, f++), this.bytes(q.i32(n.version)), this.array(r, (t) => {
|
|
2795
2795
|
this.int(t, Math.max(e.bricks.length, 2));
|
|
2796
2796
|
}), this.array(i, ([e, t]) => {
|
|
2797
2797
|
this.string(e), this.string(t);
|
|
@@ -2801,7 +2801,7 @@ function Nr(e, t = {}) {
|
|
|
2801
2801
|
this.unreal(a, e.bricks[n].components[t][r]);
|
|
2802
2802
|
}
|
|
2803
2803
|
this.align();
|
|
2804
|
-
}).finishSection()))), n(
|
|
2804
|
+
}).finishSection()))), n(q.bits().self(function() {
|
|
2805
2805
|
let t = 4294967295;
|
|
2806
2806
|
if (!e.wires || !Array.isArray(e.wires) || e.wires.length === 0) {
|
|
2807
2807
|
this.int(0, t);
|
|
@@ -2820,30 +2820,20 @@ function Nr(e, t = {}) {
|
|
|
2820
2820
|
}
|
|
2821
2821
|
//#endregion
|
|
2822
2822
|
//#region src/brs/types.ts
|
|
2823
|
-
var
|
|
2824
|
-
Direction: () =>
|
|
2825
|
-
Rotation: () =>
|
|
2826
|
-
}),
|
|
2823
|
+
var Nr = /* @__PURE__ */ t({
|
|
2824
|
+
Direction: () => Pr,
|
|
2825
|
+
Rotation: () => Fr
|
|
2826
|
+
}), Pr = /* @__PURE__ */ function(e) {
|
|
2827
2827
|
return e[e.XPositive = 0] = "XPositive", e[e.XNegative = 1] = "XNegative", e[e.YPositive = 2] = "YPositive", e[e.YNegative = 3] = "YNegative", e[e.ZPositive = 4] = "ZPositive", e[e.ZNegative = 5] = "ZNegative", e;
|
|
2828
|
-
}({}),
|
|
2828
|
+
}({}), Fr = /* @__PURE__ */ function(e) {
|
|
2829
2829
|
return e[e.Deg0 = 0] = "Deg0", e[e.Deg90 = 1] = "Deg90", e[e.Deg180 = 2] = "Deg180", e[e.Deg270 = 3] = "Deg270", e;
|
|
2830
|
-
}({})
|
|
2831
|
-
constructor() {
|
|
2832
|
-
this.bytes = [], this.bits = 0;
|
|
2833
|
-
}
|
|
2834
|
-
push(e) {
|
|
2835
|
-
this.bits >= this.bytes.length * 8 && this.bytes.push(0), e && (this.bytes[this.bits >> 3] |= 1 << (this.bits & 7)), this.bits += 1;
|
|
2836
|
-
}
|
|
2837
|
-
toValue() {
|
|
2838
|
-
return { Flags: this.bytes };
|
|
2839
|
-
}
|
|
2840
|
-
};
|
|
2830
|
+
}({});
|
|
2841
2831
|
//#endregion
|
|
2842
2832
|
//#region node_modules/@noble/hashes/utils.js
|
|
2843
|
-
function
|
|
2833
|
+
function Ir(e) {
|
|
2844
2834
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in e && e.BYTES_PER_ELEMENT === 1;
|
|
2845
2835
|
}
|
|
2846
|
-
function
|
|
2836
|
+
function Lr(e, t = "") {
|
|
2847
2837
|
if (typeof e != "number") {
|
|
2848
2838
|
let n = t && `"${t}" `;
|
|
2849
2839
|
throw TypeError(`${n}expected number, got ${typeof e}`);
|
|
@@ -2853,61 +2843,61 @@ function Br(e, t = "") {
|
|
|
2853
2843
|
throw RangeError(`${n}expected integer >= 0, got ${e}`);
|
|
2854
2844
|
}
|
|
2855
2845
|
}
|
|
2856
|
-
function
|
|
2857
|
-
let r =
|
|
2846
|
+
function Rr(e, t, n = "") {
|
|
2847
|
+
let r = Ir(e), i = e?.length, a = t !== void 0;
|
|
2858
2848
|
if (!r || a && i !== t) {
|
|
2859
2849
|
let o = n && `"${n}" `, s = a ? ` of length ${t}` : "", c = r ? `length=${i}` : `type=${typeof e}`, l = o + "expected Uint8Array" + s + ", got " + c;
|
|
2860
2850
|
throw r ? RangeError(l) : TypeError(l);
|
|
2861
2851
|
}
|
|
2862
2852
|
return e;
|
|
2863
2853
|
}
|
|
2864
|
-
function
|
|
2865
|
-
return Uint8Array.from(
|
|
2854
|
+
function zr(e) {
|
|
2855
|
+
return Uint8Array.from(Rr(e));
|
|
2866
2856
|
}
|
|
2867
|
-
function
|
|
2857
|
+
function Br(e, t = !0) {
|
|
2868
2858
|
if (e.destroyed) throw Error("Hash instance has been destroyed");
|
|
2869
2859
|
if (t && e.finished) throw Error("Hash#digest() has already been called");
|
|
2870
2860
|
}
|
|
2871
|
-
function
|
|
2872
|
-
|
|
2861
|
+
function Vr(e, t) {
|
|
2862
|
+
Rr(e, void 0, "digestInto() output");
|
|
2873
2863
|
let n = t.outputLen;
|
|
2874
2864
|
if (e.length < n) throw RangeError("\"digestInto() output\" expected to be of length >=" + n);
|
|
2875
2865
|
}
|
|
2876
|
-
function
|
|
2866
|
+
function Hr(e) {
|
|
2877
2867
|
return new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
|
|
2878
2868
|
}
|
|
2879
|
-
function
|
|
2869
|
+
function Ur(e) {
|
|
2880
2870
|
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
2881
2871
|
}
|
|
2882
|
-
function
|
|
2872
|
+
function Wr(...e) {
|
|
2883
2873
|
for (let t = 0; t < e.length; t++) e[t].fill(0);
|
|
2884
2874
|
}
|
|
2885
|
-
function
|
|
2875
|
+
function Gr(e, t) {
|
|
2886
2876
|
return e << 32 - t | e >>> t;
|
|
2887
2877
|
}
|
|
2888
|
-
var
|
|
2889
|
-
function
|
|
2878
|
+
var Kr = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
2879
|
+
function qr(e) {
|
|
2890
2880
|
return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
2891
2881
|
}
|
|
2892
|
-
var
|
|
2893
|
-
function
|
|
2894
|
-
for (let t = 0; t < e.length; t++) e[t] =
|
|
2882
|
+
var Jr = Kr ? (e) => e : (e) => qr(e) >>> 0;
|
|
2883
|
+
function Yr(e) {
|
|
2884
|
+
for (let t = 0; t < e.length; t++) e[t] = qr(e[t]);
|
|
2895
2885
|
return e;
|
|
2896
2886
|
}
|
|
2897
|
-
var
|
|
2898
|
-
function
|
|
2899
|
-
if (
|
|
2887
|
+
var Xr = Kr ? (e) => e : Yr, Zr = typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", Qr = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
2888
|
+
function $r(e) {
|
|
2889
|
+
if (Rr(e), Zr) return e.toHex();
|
|
2900
2890
|
let t = "";
|
|
2901
|
-
for (let n = 0; n < e.length; n++) t +=
|
|
2891
|
+
for (let n = 0; n < e.length; n++) t += Qr[e[n]];
|
|
2902
2892
|
return t;
|
|
2903
2893
|
}
|
|
2904
|
-
function
|
|
2894
|
+
function ei(e, t = {}) {
|
|
2905
2895
|
let n = (t, n) => e(n).update(t).digest(), r = e(void 0);
|
|
2906
2896
|
return n.outputLen = r.outputLen, n.blockLen = r.blockLen, n.canXOF = r.canXOF, n.create = (t) => e(t), Object.assign(n, t), Object.freeze(n);
|
|
2907
2897
|
}
|
|
2908
2898
|
//#endregion
|
|
2909
2899
|
//#region node_modules/@noble/hashes/_md.js
|
|
2910
|
-
var
|
|
2900
|
+
var ti = /* @__PURE__ */ Uint32Array.from([
|
|
2911
2901
|
1779033703,
|
|
2912
2902
|
3144134277,
|
|
2913
2903
|
1013904242,
|
|
@@ -2916,28 +2906,28 @@ var ri = /* @__PURE__ */ Uint32Array.from([
|
|
|
2916
2906
|
2600822924,
|
|
2917
2907
|
528734635,
|
|
2918
2908
|
1541459225
|
|
2919
|
-
]),
|
|
2920
|
-
function
|
|
2909
|
+
]), ni = /* @__PURE__ */ BigInt(2 ** 32 - 1), ri = /* @__PURE__ */ BigInt(32);
|
|
2910
|
+
function ii(e, t = !1) {
|
|
2921
2911
|
return t ? {
|
|
2922
|
-
h: Number(e &
|
|
2923
|
-
l: Number(e >>
|
|
2912
|
+
h: Number(e & ni),
|
|
2913
|
+
l: Number(e >> ri & ni)
|
|
2924
2914
|
} : {
|
|
2925
|
-
h: Number(e >>
|
|
2926
|
-
l: Number(e &
|
|
2915
|
+
h: Number(e >> ri & ni) | 0,
|
|
2916
|
+
l: Number(e & ni) | 0
|
|
2927
2917
|
};
|
|
2928
2918
|
}
|
|
2929
2919
|
//#endregion
|
|
2930
2920
|
//#region node_modules/@noble/hashes/_blake.js
|
|
2931
|
-
function
|
|
2932
|
-
return e = e + t + i | 0, r =
|
|
2921
|
+
function ai(e, t, n, r, i) {
|
|
2922
|
+
return e = e + t + i | 0, r = Gr(r ^ e, 16), n = n + r | 0, t = Gr(t ^ n, 12), {
|
|
2933
2923
|
a: e,
|
|
2934
2924
|
b: t,
|
|
2935
2925
|
c: n,
|
|
2936
2926
|
d: r
|
|
2937
2927
|
};
|
|
2938
2928
|
}
|
|
2939
|
-
function
|
|
2940
|
-
return e = e + t + i | 0, r =
|
|
2929
|
+
function oi(e, t, n, r, i) {
|
|
2930
|
+
return e = e + t + i | 0, r = Gr(r ^ e, 8), n = n + r | 0, t = Gr(t ^ n, 7), {
|
|
2941
2931
|
a: e,
|
|
2942
2932
|
b: t,
|
|
2943
2933
|
c: n,
|
|
@@ -2946,21 +2936,21 @@ function ci(e, t, n, r, i) {
|
|
|
2946
2936
|
}
|
|
2947
2937
|
//#endregion
|
|
2948
2938
|
//#region node_modules/@noble/hashes/blake2.js
|
|
2949
|
-
var
|
|
2939
|
+
var si = class {
|
|
2950
2940
|
constructor(e, t) {
|
|
2951
|
-
l(this, "buffer", void 0), l(this, "buffer32", void 0), l(this, "finished", !1), l(this, "destroyed", !1), l(this, "length", 0), l(this, "pos", 0), l(this, "blockLen", void 0), l(this, "outputLen", void 0), l(this, "canXOF", !1),
|
|
2941
|
+
l(this, "buffer", void 0), l(this, "buffer32", void 0), l(this, "finished", !1), l(this, "destroyed", !1), l(this, "length", 0), l(this, "pos", 0), l(this, "blockLen", void 0), l(this, "outputLen", void 0), l(this, "canXOF", !1), Lr(e), Lr(t), this.blockLen = e, this.outputLen = t, this.buffer = new Uint8Array(e), this.buffer32 = Ur(this.buffer);
|
|
2952
2942
|
}
|
|
2953
2943
|
update(e) {
|
|
2954
|
-
|
|
2944
|
+
Br(this), Rr(e);
|
|
2955
2945
|
let { blockLen: t, buffer: n, buffer32: r } = this, i = e.length, a = e.byteOffset, o = e.buffer;
|
|
2956
2946
|
for (let s = 0; s < i;) {
|
|
2957
|
-
this.pos === t && (
|
|
2947
|
+
this.pos === t && (Xr(r), this.compress(r, 0, !1), Xr(r), this.pos = 0);
|
|
2958
2948
|
let c = Math.min(t - this.pos, i - s), l = a + s;
|
|
2959
2949
|
if (c === t && !(l % 4) && s + c < i) {
|
|
2960
2950
|
let e = new Uint32Array(o, l, Math.floor((i - s) / 4));
|
|
2961
|
-
|
|
2951
|
+
Xr(e);
|
|
2962
2952
|
for (let n = 0; s + t < i; n += r.length, s += t) this.length += t, this.compress(e, n, !1);
|
|
2963
|
-
|
|
2953
|
+
Xr(e);
|
|
2964
2954
|
continue;
|
|
2965
2955
|
}
|
|
2966
2956
|
n.set(e.subarray(s, s + c), this.pos), this.pos += c, this.length += c, s += c;
|
|
@@ -2968,11 +2958,11 @@ var li = class {
|
|
|
2968
2958
|
return this;
|
|
2969
2959
|
}
|
|
2970
2960
|
digestInto(e) {
|
|
2971
|
-
|
|
2961
|
+
Br(this), Vr(e, this);
|
|
2972
2962
|
let { pos: t, buffer32: n } = this;
|
|
2973
|
-
if (this.finished = !0,
|
|
2974
|
-
let r = this.get(), i =
|
|
2975
|
-
for (let e = 0; e < a; e++) i[e] =
|
|
2963
|
+
if (this.finished = !0, Wr(this.buffer.subarray(t)), Xr(n), this.compress(n, 0, !0), Xr(n), e.byteOffset & 3) throw RangeError("\"digestInto() output\" expected 4-byte aligned byteOffset, got " + e.byteOffset);
|
|
2964
|
+
let r = this.get(), i = Ur(e), a = Math.floor(this.outputLen / 4);
|
|
2965
|
+
for (let e = 0; e < a; e++) i[e] = Jr(r[e]);
|
|
2976
2966
|
let o = this.outputLen % 4;
|
|
2977
2967
|
if (!o) return;
|
|
2978
2968
|
let s = a * 4, c = r[a];
|
|
@@ -2992,9 +2982,9 @@ var li = class {
|
|
|
2992
2982
|
return this._cloneInto();
|
|
2993
2983
|
}
|
|
2994
2984
|
};
|
|
2995
|
-
function
|
|
2985
|
+
function ci(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y) {
|
|
2996
2986
|
let b = 0;
|
|
2997
|
-
for (let x = 0; x < r; x++) ({a: i, b: c, c: f, d: g} =
|
|
2987
|
+
for (let x = 0; x < r; x++) ({a: i, b: c, c: f, d: g} = ai(i, c, f, g, n[t + e[b++]])), {a: i, b: c, c: f, d: g} = oi(i, c, f, g, n[t + e[b++]]), {a: a, b: l, c: p, d: _} = ai(a, l, p, _, n[t + e[b++]]), {a: a, b: l, c: p, d: _} = oi(a, l, p, _, n[t + e[b++]]), {a: o, b: u, c: m, d: v} = ai(o, u, m, v, n[t + e[b++]]), {a: o, b: u, c: m, d: v} = oi(o, u, m, v, n[t + e[b++]]), {a: s, b: d, c: h, d: y} = ai(s, d, h, y, n[t + e[b++]]), {a: s, b: d, c: h, d: y} = oi(s, d, h, y, n[t + e[b++]]), {a: i, b: l, c: m, d: y} = ai(i, l, m, y, n[t + e[b++]]), {a: i, b: l, c: m, d: y} = oi(i, l, m, y, n[t + e[b++]]), {a: a, b: u, c: h, d: g} = ai(a, u, h, g, n[t + e[b++]]), {a: a, b: u, c: h, d: g} = oi(a, u, h, g, n[t + e[b++]]), {a: o, b: d, c: f, d: _} = ai(o, d, f, _, n[t + e[b++]]), {a: o, b: d, c: f, d: _} = oi(o, d, f, _, n[t + e[b++]]), {a: s, b: c, c: p, d: v} = ai(s, c, p, v, n[t + e[b++]]), {a: s, b: c, c: p, d: v} = oi(s, c, p, v, n[t + e[b++]]);
|
|
2998
2988
|
return {
|
|
2999
2989
|
v0: i,
|
|
3000
2990
|
v1: a,
|
|
@@ -3016,7 +3006,7 @@ function ui(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y) {
|
|
|
3016
3006
|
}
|
|
3017
3007
|
//#endregion
|
|
3018
3008
|
//#region node_modules/@noble/hashes/blake3.js
|
|
3019
|
-
var
|
|
3009
|
+
var li = {
|
|
3020
3010
|
CHUNK_START: 1,
|
|
3021
3011
|
CHUNK_END: 2,
|
|
3022
3012
|
PARENT: 4,
|
|
@@ -3024,7 +3014,7 @@ var di = {
|
|
|
3024
3014
|
KEYED_HASH: 16,
|
|
3025
3015
|
DERIVE_KEY_CONTEXT: 32,
|
|
3026
3016
|
DERIVE_KEY_MATERIAL: 64
|
|
3027
|
-
},
|
|
3017
|
+
}, ui = /* @__PURE__ */ ti.slice(), di = /* @__PURE__ */ (() => {
|
|
3028
3018
|
let e = Array.from({ length: 16 }, (e, t) => t), t = (e) => [
|
|
3029
3019
|
2,
|
|
3030
3020
|
6,
|
|
@@ -3045,36 +3035,36 @@ var di = {
|
|
|
3045
3035
|
].map((t) => e[t]), n = [];
|
|
3046
3036
|
for (let r = 0, i = e; r < 7; r++, i = t(i)) n.push(...i);
|
|
3047
3037
|
return Uint8Array.from(n);
|
|
3048
|
-
})(),
|
|
3038
|
+
})(), fi = class e extends si {
|
|
3049
3039
|
constructor(t = {}, n = 0) {
|
|
3050
3040
|
super(64, t.dkLen === void 0 ? 32 : t.dkLen), l(this, "canXOF", !0), l(this, "chunkPos", 0), l(this, "chunksDone", 0), l(this, "flags", 0), l(this, "IV", void 0), l(this, "state", void 0), l(this, "stack", []), l(this, "posOut", 0), l(this, "bufferOut32", /* @__PURE__ */ new Uint32Array(16)), l(this, "bufferOut", void 0), l(this, "chunkOut", 0), l(this, "enableXOF", !0);
|
|
3051
3041
|
let { key: r, context: i } = t, a = i !== void 0;
|
|
3052
3042
|
if (r !== void 0) {
|
|
3053
3043
|
if (a) throw Error("Only \"key\" or \"context\" can be specified at same time");
|
|
3054
|
-
|
|
3055
|
-
let e =
|
|
3056
|
-
this.IV =
|
|
3044
|
+
Rr(r, 32, "key");
|
|
3045
|
+
let e = zr(r);
|
|
3046
|
+
this.IV = Ur(e), Xr(this.IV), this.flags = n | li.KEYED_HASH;
|
|
3057
3047
|
} else if (a) {
|
|
3058
|
-
|
|
3059
|
-
let t = i, r = new e({ dkLen: 32 },
|
|
3060
|
-
this.IV =
|
|
3061
|
-
} else this.IV =
|
|
3062
|
-
this.state = this.IV.slice(), this.bufferOut =
|
|
3048
|
+
Rr(i, void 0, "context");
|
|
3049
|
+
let t = i, r = new e({ dkLen: 32 }, li.DERIVE_KEY_CONTEXT).update(t).digest();
|
|
3050
|
+
this.IV = Ur(r), Xr(this.IV), this.flags = n | li.DERIVE_KEY_MATERIAL;
|
|
3051
|
+
} else this.IV = ui.slice(), this.flags = n;
|
|
3052
|
+
this.state = this.IV.slice(), this.bufferOut = Hr(this.bufferOut32);
|
|
3063
3053
|
}
|
|
3064
3054
|
get() {
|
|
3065
3055
|
return [];
|
|
3066
3056
|
}
|
|
3067
3057
|
set() {}
|
|
3068
3058
|
b2Compress(e, t, n, r = 0) {
|
|
3069
|
-
let { state: i, pos: a } = this, { h: o, l: s } =
|
|
3059
|
+
let { state: i, pos: a } = this, { h: o, l: s } = ii(BigInt(e), !0), { v0: c, v1: l, v2: u, v3: d, v4: f, v5: p, v6: m, v7: h, v8: g, v9: _, v10: v, v11: y, v12: b, v13: x, v14: S, v15: C } = ci(di, r, n, 7, i[0], i[1], i[2], i[3], i[4], i[5], i[6], i[7], ui[0], ui[1], ui[2], ui[3], o, s, a, t);
|
|
3070
3060
|
i[0] = c ^ g, i[1] = l ^ _, i[2] = u ^ v, i[3] = d ^ y, i[4] = f ^ b, i[5] = p ^ x, i[6] = m ^ S, i[7] = h ^ C;
|
|
3071
3061
|
}
|
|
3072
3062
|
compress(e, t = 0, n = !1) {
|
|
3073
3063
|
let r = this.flags;
|
|
3074
|
-
if (this.chunkPos || (r |=
|
|
3064
|
+
if (this.chunkPos || (r |= li.CHUNK_START), (this.chunkPos === 15 || n) && (r |= li.CHUNK_END), n || (this.pos = this.blockLen), this.b2Compress(this.chunksDone, r, e, t), this.chunkPos += 1, this.chunkPos === 16 || n) {
|
|
3075
3065
|
let e = this.state;
|
|
3076
3066
|
this.state = this.IV.slice();
|
|
3077
|
-
for (let t, r = this.chunksDone + 1; (n || !(r & 1)) && (t = this.stack.pop()); r >>= 1) this.buffer32.set(t, 0), this.buffer32.set(e, 8), this.pos = this.blockLen, this.b2Compress(0, this.flags |
|
|
3067
|
+
for (let t, r = this.chunksDone + 1; (n || !(r & 1)) && (t = this.stack.pop()); r >>= 1) this.buffer32.set(t, 0), this.buffer32.set(e, 8), this.pos = this.blockLen, this.b2Compress(0, this.flags | li.PARENT, this.buffer32, 0), e = this.state, this.state = this.IV.slice();
|
|
3078
3068
|
this.chunksDone++, this.chunkPos = 0, this.stack.push(e);
|
|
3079
3069
|
}
|
|
3080
3070
|
this.pos = 0;
|
|
@@ -3085,22 +3075,22 @@ var di = {
|
|
|
3085
3075
|
return e.state.set(r.slice()), e.stack = s.map((e) => Uint32Array.from(e)), e.IV.set(t), e.flags = n, e.chunkPos = i, e.chunksDone = c, e.posOut = a, e.chunkOut = o, e.enableXOF = this.enableXOF, e.bufferOut32.set(this.bufferOut32), e;
|
|
3086
3076
|
}
|
|
3087
3077
|
destroy() {
|
|
3088
|
-
this.destroyed = !0,
|
|
3078
|
+
this.destroyed = !0, Wr(this.state, this.buffer32, this.IV, this.bufferOut32), Wr(...this.stack);
|
|
3089
3079
|
}
|
|
3090
3080
|
b2CompressOut() {
|
|
3091
|
-
let { state: e, pos: t, flags: n, buffer32: r, bufferOut32: i } = this, { h: a, l: o } =
|
|
3092
|
-
|
|
3093
|
-
let { v0: s, v1: c, v2: l, v3: u, v4: d, v5: f, v6: p, v7: m, v8: h, v9: g, v10: _, v11: v, v12: y, v13: b, v14: x, v15: S } =
|
|
3094
|
-
i[0] = s ^ h, i[1] = c ^ g, i[2] = l ^ _, i[3] = u ^ v, i[4] = d ^ y, i[5] = f ^ b, i[6] = p ^ x, i[7] = m ^ S, i[8] = e[0] ^ h, i[9] = e[1] ^ g, i[10] = e[2] ^ _, i[11] = e[3] ^ v, i[12] = e[4] ^ y, i[13] = e[5] ^ b, i[14] = e[6] ^ x, i[15] = e[7] ^ S,
|
|
3081
|
+
let { state: e, pos: t, flags: n, buffer32: r, bufferOut32: i } = this, { h: a, l: o } = ii(BigInt(this.chunkOut++));
|
|
3082
|
+
Xr(r);
|
|
3083
|
+
let { v0: s, v1: c, v2: l, v3: u, v4: d, v5: f, v6: p, v7: m, v8: h, v9: g, v10: _, v11: v, v12: y, v13: b, v14: x, v15: S } = ci(di, 0, r, 7, e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], ui[0], ui[1], ui[2], ui[3], o, a, t, n);
|
|
3084
|
+
i[0] = s ^ h, i[1] = c ^ g, i[2] = l ^ _, i[3] = u ^ v, i[4] = d ^ y, i[5] = f ^ b, i[6] = p ^ x, i[7] = m ^ S, i[8] = e[0] ^ h, i[9] = e[1] ^ g, i[10] = e[2] ^ _, i[11] = e[3] ^ v, i[12] = e[4] ^ y, i[13] = e[5] ^ b, i[14] = e[6] ^ x, i[15] = e[7] ^ S, Xr(r), Xr(i), this.posOut = 0;
|
|
3095
3085
|
}
|
|
3096
3086
|
finish() {
|
|
3097
3087
|
if (this.finished) return;
|
|
3098
|
-
this.finished = !0,
|
|
3099
|
-
let e = this.flags |
|
|
3100
|
-
this.stack.length ? (e |=
|
|
3088
|
+
this.finished = !0, Wr(this.buffer.subarray(this.pos));
|
|
3089
|
+
let e = this.flags | li.ROOT;
|
|
3090
|
+
this.stack.length ? (e |= li.PARENT, Xr(this.buffer32), this.compress(this.buffer32, 0, !0), Xr(this.buffer32), this.chunksDone = 0, this.pos = this.blockLen) : e |= (this.chunkPos ? 0 : li.CHUNK_START) | li.CHUNK_END, this.flags = e, this.b2CompressOut();
|
|
3101
3091
|
}
|
|
3102
3092
|
writeInto(e) {
|
|
3103
|
-
|
|
3093
|
+
Br(this, !1), Rr(e), this.finish();
|
|
3104
3094
|
let { blockLen: t, bufferOut: n } = this;
|
|
3105
3095
|
for (let r = 0, i = e.length; r < i;) {
|
|
3106
3096
|
this.posOut >= t && this.b2CompressOut();
|
|
@@ -3114,17 +3104,27 @@ var di = {
|
|
|
3114
3104
|
return this.writeInto(e);
|
|
3115
3105
|
}
|
|
3116
3106
|
xof(e) {
|
|
3117
|
-
return
|
|
3107
|
+
return Lr(e), this.xofInto(new Uint8Array(e));
|
|
3118
3108
|
}
|
|
3119
3109
|
digestInto(e) {
|
|
3120
|
-
if (
|
|
3110
|
+
if (Vr(e, this), this.finished) throw Error("digest() was already called");
|
|
3121
3111
|
this.enableXOF = !1, this.writeInto(e.subarray(0, this.outputLen)), this.destroy();
|
|
3122
3112
|
}
|
|
3123
3113
|
digest() {
|
|
3124
3114
|
let e = new Uint8Array(this.outputLen);
|
|
3125
3115
|
return this.digestInto(e), e;
|
|
3126
3116
|
}
|
|
3127
|
-
},
|
|
3117
|
+
}, pi = /* @__PURE__ */ ei((e = {}) => new fi(e)), mi = (e, t) => ((e.Flags[t >> 3] ?? 0) >> (t & 7) & 1) == 1, hi = class {
|
|
3118
|
+
constructor() {
|
|
3119
|
+
this.bytes = [], this.bits = 0;
|
|
3120
|
+
}
|
|
3121
|
+
push(e) {
|
|
3122
|
+
this.bits >= this.bytes.length * 8 && this.bytes.push(0), e && (this.bytes[this.bits >> 3] |= 1 << (this.bits & 7)), this.bits += 1;
|
|
3123
|
+
}
|
|
3124
|
+
toValue() {
|
|
3125
|
+
return { Flags: this.bytes };
|
|
3126
|
+
}
|
|
3127
|
+
}, gi = ArrayBuffer, J = Uint8Array, _i = Uint16Array, vi = Int16Array, yi = Int32Array, bi = function(e, t, n) {
|
|
3128
3128
|
if (J.prototype.slice) return J.prototype.slice.call(e, t, n);
|
|
3129
3129
|
(t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length);
|
|
3130
3130
|
var r = new J(n - t);
|
|
@@ -3419,29 +3419,29 @@ var di = {
|
|
|
3419
3419
|
j = (A -= E.b) >> 3;
|
|
3420
3420
|
var ne = (e[j] | e[j + 1] << 8) >> (A & 7) & (1 << E.b) - 1;
|
|
3421
3421
|
for (++y; --y;) {
|
|
3422
|
-
var
|
|
3423
|
-
j = (A -=
|
|
3424
|
-
var
|
|
3425
|
-
j = (A -= Ii[
|
|
3426
|
-
var
|
|
3427
|
-
j = (A -= Pi[
|
|
3428
|
-
var
|
|
3429
|
-
if (j = (A -=
|
|
3422
|
+
var N = O.s[ee], re = O.n[ee], ie = E.s[ne], ae = E.n[ne], oe = D.s[te], se = D.n[te];
|
|
3423
|
+
j = (A -= oe) >> 3;
|
|
3424
|
+
var ce = 1 << oe, le = ce + ((e[j] | e[j + 1] << 8 | e[j + 2] << 16 | e[j + 3] << 24) >>> (A & 7) & ce - 1);
|
|
3425
|
+
j = (A -= Ii[ie]) >> 3;
|
|
3426
|
+
var ue = Li[ie] + ((e[j] | e[j + 1] << 8 | e[j + 2] << 16) >> (A & 7) & (1 << Ii[ie]) - 1);
|
|
3427
|
+
j = (A -= Pi[N]) >> 3;
|
|
3428
|
+
var de = Fi[N] + ((e[j] | e[j + 1] << 8 | e[j + 2] << 16) >> (A & 7) & (1 << Pi[N]) - 1);
|
|
3429
|
+
if (j = (A -= re) >> 3, ee = O.t[ee] + ((e[j] | e[j + 1] << 8) >> (A & 7) & (1 << re) - 1), j = (A -= ae) >> 3, ne = E.t[ne] + ((e[j] | e[j + 1] << 8) >> (A & 7) & (1 << ae) - 1), j = (A -= se) >> 3, te = D.t[te] + ((e[j] | e[j + 1] << 8) >> (A & 7) & (1 << se) - 1), le > 3) t.o[2] = t.o[1], t.o[1] = t.o[0], t.o[0] = le -= 3;
|
|
3430
3430
|
else {
|
|
3431
|
-
var
|
|
3432
|
-
|
|
3431
|
+
var fe = le - (de != 0);
|
|
3432
|
+
fe ? (le = fe == 3 ? t.o[0] - 1 : t.o[fe], fe > 1 && (t.o[2] = t.o[1]), t.o[1] = t.o[0], t.o[0] = le) : le = t.o[0];
|
|
3433
3433
|
}
|
|
3434
|
-
for (var S = 0; S <
|
|
3435
|
-
M +=
|
|
3436
|
-
var
|
|
3437
|
-
if (
|
|
3438
|
-
var
|
|
3439
|
-
|
|
3440
|
-
for (var S = 0; S <
|
|
3441
|
-
M +=
|
|
3434
|
+
for (var S = 0; S < de; ++S) h[M + S] = h[g + S];
|
|
3435
|
+
M += de, g += de;
|
|
3436
|
+
var pe = M - le;
|
|
3437
|
+
if (pe < 0) {
|
|
3438
|
+
var me = -pe, P = t.e + pe;
|
|
3439
|
+
me > ue && (me = ue);
|
|
3440
|
+
for (var S = 0; S < me; ++S) h[M + S] = t.w[P + S];
|
|
3441
|
+
M += me, ue -= me, pe = 0;
|
|
3442
3442
|
}
|
|
3443
|
-
for (var S = 0; S <
|
|
3444
|
-
M +=
|
|
3443
|
+
for (var S = 0; S < ue; ++S) h[M + S] = h[pe + S];
|
|
3444
|
+
M += ue;
|
|
3445
3445
|
}
|
|
3446
3446
|
if (M != g) for (; g < h.length;) h[M++] = h[g++];
|
|
3447
3447
|
else M = h.length;
|
|
@@ -3680,7 +3680,7 @@ function Gi(e, t = {}) {
|
|
|
3680
3680
|
let e = g.content, n;
|
|
3681
3681
|
if (e.length === 0) n = -1;
|
|
3682
3682
|
else {
|
|
3683
|
-
let r =
|
|
3683
|
+
let r = pi(e), i = $r(r), a = p.get(i);
|
|
3684
3684
|
if (a !== void 0) n = a;
|
|
3685
3685
|
else {
|
|
3686
3686
|
n = d.length, p.set(i, n), d.push(r), l.push(e.length);
|
|
@@ -3711,7 +3711,7 @@ function Gi(e, t = {}) {
|
|
|
3711
3711
|
66,
|
|
3712
3712
|
82,
|
|
3713
3713
|
90
|
|
3714
|
-
]), y.u8(0), y.u8(0), y.i32le(v.length), y.i32le(v.length), y.bytes(
|
|
3714
|
+
]), y.u8(0), y.u8(0), y.i32le(v.length), y.i32le(v.length), y.bytes(pi(v)), y.bytes(v);
|
|
3715
3715
|
for (let e of f) y.bytes(e);
|
|
3716
3716
|
return y.toBytes();
|
|
3717
3717
|
}
|
|
@@ -3733,7 +3733,7 @@ var Ki = class e {
|
|
|
3733
3733
|
let c = n.bytes(32), l;
|
|
3734
3734
|
if (a === 0) l = n.bytes(o);
|
|
3735
3735
|
else if (l = Hi(n.bytes(s), new Uint8Array(o)), l.length !== o) throw Error("brdb: index decompressed to the wrong size");
|
|
3736
|
-
if (
|
|
3736
|
+
if ($r(pi(l)) !== $r(c)) throw Error("brdb: index hash mismatch");
|
|
3737
3737
|
let u = n.bytes(n.remaining), d = new Wi(l), f = d.i32le(), p = d.i32le(), m = d.i32le();
|
|
3738
3738
|
if (f < 0 || p < 0 || m < 0) throw Error("brdb: negative index count");
|
|
3739
3739
|
let h = (e, t) => Array.from({ length: e }, t), g = h(f, () => d.i32le()), _ = h(f, () => d.u16le()), v = new TextDecoder("utf-8", { fatal: !0 }), y = _.map((e) => v.decode(d.bytes(e))), b = h(p, () => d.i32le()), x = h(p, () => d.i32le()), S = h(p, () => d.u16le()).map((e) => v.decode(d.bytes(e))), C = h(m, () => d.u8()), w = h(m, () => d.i32le()), T = h(m, () => d.i32le()), E = h(m, () => d.bytes(32).slice());
|
|
@@ -3799,7 +3799,7 @@ var Ki = class e {
|
|
|
3799
3799
|
r = Hi(n, new Uint8Array(t.sizeUncompressed));
|
|
3800
3800
|
}
|
|
3801
3801
|
if (r.length !== t.sizeUncompressed) throw Error("brdb: blob uncompressed size mismatch");
|
|
3802
|
-
if (
|
|
3802
|
+
if ($r(pi(r)) !== $r(t.hash)) throw Error("brdb: blob hash mismatch");
|
|
3803
3803
|
return r;
|
|
3804
3804
|
}
|
|
3805
3805
|
readFile(e) {
|
|
@@ -3839,7 +3839,7 @@ var Ki = class e {
|
|
|
3839
3839
|
return r === -1 ? t : `${e[r]}/${t}`;
|
|
3840
3840
|
}), this.pathCache;
|
|
3841
3841
|
}
|
|
3842
|
-
}, qi = /* @__PURE__ */ "B_1x1_Reroute_Node.B_1x1_Gate_AND.B_1x1_Gate_OR.B_1x1_Gate_XOR.B_1x1_Gate_NAND.B_1x1_Gate_NOR.B_1x1_NOT_Gate.B_1x1_Gate_AND_Bitwise.B_1x1_Gate_OR_Bitwise.B_1x1_Gate_XOR_Bitwise.B_1x1_Gate_NAND_Bitwise.B_1x1_Gate_NOR_Bitwise.B_1x1_Gate_NOT_Bitwise.B_1x1_Gate_ShiftLeft_Bitwise.B_1x1_Gate_ShiftRight_Bitwise.B_1x1_Gate_Add.B_1x1_Gate_Subtract.B_1x1_Gate_Multiply.B_1x1_Gate_ModFloored.B_1x1_Gate_Mod.B_1x1_Gate_Divide.B_1x1_Gate_Equal.B_1x1_Gate_NotEqual.B_1x1_Gate_LessThan.B_1x1_Gate_LessThanEqual.B_1x1_Gate_GreaterThan.B_1x1_Gate_GreaterThanEqual.B_1x1_Gate_Ceiling.B_1x1_Gate_Floor.B_1x1_Gate_Constant.B_1x1_Gate_Blend.B_1x1_Gate_EdgeDetector.B_1x1_Gate_Timer.B_1x1_Gate_Timer_Tick.B_1x1_Microchip.B_1x1_Gate_MicrochipInput.B_1x1_Gate_MicrochipOutput.B_2x2_Overhang.B_1x4_Brick_Side.B_1x2_Overhang.B_1x1_Brick_Side_Lip.B_1x1_Brick_Side.B_Jar.B_Chalice.B_Cauldron.B_Small_Flower.B_Pine_Tree.B_Leaf_Bush.B_Hedge_1x4.B_Hedge_1x2.B_Hedge_1x1_Corner.B_Hedge_1x1.B_Flower.B_Fern.B_Branch.B_2x4_Door_Frame.B_Turkey_Leg.B_Turkey_Body.B_Swirl_Plate.B_Sausage.B_Pumpkin_Carved.B_Pumpkin.B_Ladder.B_Inverted_Cone.B_Handle.B_Gravestone.B_Frog_Small.B_Frog.B_Flame.B_Coffin_Lid.B_Coffin.B_BoneStraight.B_Bone.B_1x1_Coin_Diagonal.B_1x1_Coin.B_Spoon.B_Fork.B_2x2_Corner.B_2x2f_Plate_Center_Inv.B_2x2f_Plate_Center.B_1x2f_Plate_Center_Inv.B_4x4_Round.B_2x2_Round.B_2x2F_Round.B_2x_Octo_T_Inv.B_2x_Octo_T.B_2x2F_Octo_Converter_Inv.B_2x2F_Octo_Converter.B_2x2F_Octo.B_8x8_Lattice_Plate.B_1x2_MetalIngot.B_1x1f_Tile_Corner.B_1x1f_Inverse_Tile_Corner.B_Rook.B_Queen.B_Pawn.B_Knight.B_King.B_Bishop.B_1x2f_Plate_Center.B_2x2_Cone.B_1x1_Round.B_1x1_Cone.B_1x1F_Round.B_2x_Octo_Cone.B_2x_Octo_90Deg_Inv.B_2x_Octo_90Deg.B_2x_Octo.B_1x_Octo_T_Inv.B_1x_Octo_T.B_1x_Octo_90Deg_Inv.B_1x_Octo_90Deg.B_1x_Octo.B_1x1F_Octo.B_2x2_Slipper.B_2x1_Slipper.B_Joint_Wheel_Micro.B_Joint_Wheel.B_Joint_Socket_Micro.B_Joint_Servo_Micro.B_Joint_Servo.B_Joint_Motor_Micro.B_Joint_Motor.B_Joint_Coupler.B_Joint_Bearing_Micro.B_Joint_Bearing.B_1x1_SoundEmitter.B_1x1_Gate_Teleport.B_1x1_Gate_RelativeTeleport.B_1x1_EntityGate_SetVelocity.B_1x1_EntityGate_SetLocationAndRotation.B_1x1_EntityGate_SetLocation.B_1x1_EntityGate_ReadBrickGrid.B_1x1_EntityGate_PlayAudioAt.B_1x1_EntityGate_AddVelocity.B_1x1_EntityGate_AddLocationAndRotation.B_1x1_CharacterGate_SetGravityDirection.B_Vehicle_Engine.B_Switch_Test.B_SpawnPoint.B_Seat.B_GoalPoint.B_DestinationPoint.B_CheckPoint.B_Button_Square.B_Button.B_Bot_Spawn_Point.B_2x2F_Target.B_2x2F_Speaker.B_1x1_Gate_WheelEngineSlim.B_1x1F_Speaker.B_1x1_Gate_AudioReference.B_1x1_Gate_BrickAssetReference.B_1x1_Gate_Clock.B_1x1_Gate_DeltaTime.B_1x1_Gate_EntityTypeReference.B_1x1_Gate_Exec_ArrayVar_Append.B_1x1_Gate_Exec_ArrayVar_Average.B_1x1_Gate_Exec_ArrayVar_Clear.B_1x1_Gate_Exec_ArrayVar_CopyFrom.B_1x1_Gate_Exec_ArrayVar_Fill.B_1x1_Gate_Exec_ArrayVar_Find.B_1x1_Gate_Exec_ArrayVar_Get.B_1x1_Gate_Exec_ArrayVar_GetLength.B_1x1_Gate_Exec_ArrayVar_Insert.B_1x1_Gate_Exec_ArrayVar_Max.B_1x1_Gate_Exec_ArrayVar_Min.B_1x1_Gate_Exec_ArrayVar_Pop.B_1x1_Gate_Exec_ArrayVar_Push.B_1x1_Gate_Exec_ArrayVar_RemoveAtIndex.B_1x1_Gate_Exec_ArrayVar_Resize.B_1x1_Gate_Exec_ArrayVar_Reverse.B_1x1_Gate_Exec_ArrayVar_SetAtIndex.B_1x1_Gate_Exec_ArrayVar_Shuffle.B_1x1_Gate_Exec_ArrayVar_Slice.B_1x1_Gate_Exec_ArrayVar_Sort.B_1x1_Gate_Exec_ArrayVar_Sum.B_1x1_Gate_Exec_ArrayVar_Swap.B_1x1_Gate_Exec_Branch.B_1x1_Gate_Exec_Character_AddInventoryBrick.B_1x1_Gate_Exec_Character_AddInventoryEntity.B_1x1_Gate_Exec_Character_AddInventoryEntry.B_1x1_Gate_Exec_Character_AddInventoryItem.B_1x1_Gate_Exec_Character_AddInventoryItemAdv.B_1x1_Gate_Exec_Character_GetAim.B_1x1_Gate_Exec_Character_GetDamage.B_1x1_Gate_Exec_Character_GetFromController.B_1x1_Gate_Exec_Character_IncDamage.B_1x1_Gate_Exec_Character_SetDamage.B_1x1_Gate_Exec_Character_SetInventoryBrick.B_1x1_Gate_Exec_Character_SetInventoryEntity.B_1x1_Gate_Exec_Character_SetInventoryEntry.B_1x1_Gate_Exec_Character_SetInventoryItem.B_1x1_Gate_Exec_Character_SetInventoryItemAdv.B_1x1_Gate_Exec_Character_SetTempPermission.B_1x1_Gate_Exec_Character_ShowHint.B_1x1_Gate_Exec_ChatCommand.B_1x1_Gate_Exec_Controller_DisplayText.B_1x1_Gate_Exec_Controller_GetDisplayName.B_1x1_Gate_Exec_Controller_GetFromEntity.B_1x1_Gate_Exec_Controller_GetUserId.B_1x1_Gate_Exec_Controller_GetUserName.B_1x1_Gate_Exec_Controller_HasPermission.B_1x1_Gate_Exec_Controller_HasRole.B_1x1_Gate_Exec_Controller_IsTrustedByBrickOwner.B_1x1_Gate_Exec_Controller_SetCanRespawn.B_1x1_Gate_Exec_Controller_ShowChatMessage.B_1x1_Gate_Exec_Controller_ShowMessageBox.B_1x1_Gate_Exec_Controller_ShowStatusMessage.B_1x1_Gate_Exec_Cycle.B_1x1_Gate_Exec_Entity_AddLocationRotation.B_1x1_Gate_Exec_Entity_AddVelocity.B_1x1_Gate_Exec_Entity_GetAngularVelocity.B_1x1_Gate_Exec_Entity_GetLinearVelocity.B_1x1_Gate_Exec_Entity_GetLocation.B_1x1_Gate_Exec_Entity_GetLocationRotation.B_1x1_Gate_Exec_Entity_GetRotation.B_1x1_Gate_Exec_Entity_GetTag.B_1x1_Gate_Exec_Entity_GetVelocity.B_1x1_Gate_Exec_Entity_PlayAudioAt.B_1x1_Gate_Exec_Entity_RelativeTeleport.B_1x1_Gate_Exec_Entity_SetAngularVelocity.B_1x1_Gate_Exec_Entity_SetFrozen.B_1x1_Gate_Exec_Entity_SetGravityDirection.B_1x1_Gate_Exec_Entity_SetLinearVelocity.B_1x1_Gate_Exec_Entity_SetLocation.B_1x1_Gate_Exec_Entity_SetLocationRotation.B_1x1_Gate_Exec_Entity_SetRotation.B_1x1_Gate_Exec_Entity_SetTag.B_1x1_Gate_Exec_Entity_SetVelocity.B_1x1_Gate_Exec_Entity_Teleport.B_1x1_Gate_Exec_Gamemode_BroadcastChatMessage.B_1x1_Gate_Exec_Gamemode_BroadcastStatusMessage.B_1x1_Gate_Exec_Gamemode_FillArrayFromPlayers.B_1x1_Gate_Exec_Gamemode_FillArrayFromTeamMembers.B_1x1_Gate_Exec_Gamemode_GetCurrentRound.B_1x1_Gate_Exec_Gamemode_GetLeaderboardValue.B_1x1_Gate_Exec_Gamemode_GetTeam.B_1x1_Gate_Exec_Gamemode_GetTeamByName.B_1x1_Gate_Exec_Gamemode_GetTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_GetTeamName.B_1x1_Gate_Exec_Gamemode_IncrementLeaderboardValue.B_1x1_Gate_Exec_Gamemode_IncrementTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_PlayerWins.B_1x1_Gate_Exec_Gamemode_SetLeaderboardValue.B_1x1_Gate_Exec_Gamemode_SetTeam.B_1x1_Gate_Exec_Gamemode_SetTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_SetTeamPinned.B_1x1_Gate_Exec_Gamemode_TeamWins.B_1x1_Gate_Exec_PlayGlobalAudio.B_1x1_Gate_Exec_PrefabSpawner.B_1x1_Gate_Exec_PrintToConsole.B_1x1_Gate_Exec_Random.B_1x1_Gate_Exec_Sweep.B_1x1_Gate_Exec_Toggle.B_1x1_Gate_Exec_Union.B_1x1_Gate_Exec_Var_Get.B_1x1_Gate_Exec_Var_Increment.B_1x1_Gate_Exec_Var_Set.B_1x1_Gate_Expr_BitwiseAND.B_1x1_Gate_Expr_BitwiseBitCount.B_1x1_Gate_Expr_BitwiseNAND.B_1x1_Gate_Expr_BitwiseNOR.B_1x1_Gate_Expr_BitwiseNOT.B_1x1_Gate_Expr_BitwiseOR.B_1x1_Gate_Expr_BitwiseShiftLeft.B_1x1_Gate_Expr_BitwiseShiftRight.B_1x1_Gate_Expr_BitwiseXOR.B_1x1_Gate_Expr_Ceil.B_1x1_Gate_Expr_ChangeDetector.B_1x1_Gate_Expr_ColorBlend.B_1x1_Gate_Expr_ColorConvert.B_1x1_Gate_Expr_ColorToHex.B_1x1_Gate_Expr_CompareEqual.B_1x1_Gate_Expr_CompareGreater.B_1x1_Gate_Expr_CompareGreaterOrEqual.B_1x1_Gate_Expr_CompareLess.B_1x1_Gate_Expr_CompareLessOrEqual.B_1x1_Gate_Expr_CompareNotEqual.B_1x1_Gate_Expr_Convert.B_1x1_Gate_Expr_DirectionToRotation.B_1x1_Gate_Expr_EdgeDetector.B_1x1_Gate_Expr_Floor.B_1x1_Gate_Expr_InvertRotation.B_1x1_Gate_Expr_LogicalAND.B_1x1_Gate_Expr_LogicalNAND.B_1x1_Gate_Expr_LogicalNOR.B_1x1_Gate_Expr_LogicalNOT.B_1x1_Gate_Expr_LogicalOR.B_1x1_Gate_Expr_LogicalXOR.B_1x1_Gate_Expr_MakeColor.B_1x1_Gate_Expr_MakeColorHex.B_1x1_Gate_Expr_MakeColorSRGB.B_1x1_Gate_Expr_MakeQuaternion.B_1x1_Gate_Expr_MakeRotation.B_1x1_Gate_Expr_MakeVector.B_1x1_Gate_Expr_MathAbs.B_1x1_Gate_Expr_MathAcos.B_1x1_Gate_Expr_MathAcosh.B_1x1_Gate_Expr_MathAdd.B_1x1_Gate_Expr_MathAsin.B_1x1_Gate_Expr_MathAsinh.B_1x1_Gate_Expr_MathAtan.B_1x1_Gate_Expr_MathAtan2.B_1x1_Gate_Expr_MathAtanh.B_1x1_Gate_Expr_MathBlend.B_1x1_Gate_Expr_MathClamp.B_1x1_Gate_Expr_MathCos.B_1x1_Gate_Expr_MathCosh.B_1x1_Gate_Expr_MathDegreesToRadians.B_1x1_Gate_Expr_MathDivide.B_1x1_Gate_Expr_MathEasing.B_1x1_Gate_Expr_MathExp.B_1x1_Gate_Expr_MathLn.B_1x1_Gate_Expr_MathLogBase.B_1x1_Gate_Expr_MathMax.B_1x1_Gate_Expr_MathMin.B_1x1_Gate_Expr_MathModulo.B_1x1_Gate_Expr_MathModuloFloored.B_1x1_Gate_Expr_MathMultiply.B_1x1_Gate_Expr_MathNegate.B_1x1_Gate_Expr_MathPow.B_1x1_Gate_Expr_MathRadiansToDegrees.B_1x1_Gate_Expr_MathSign.B_1x1_Gate_Expr_MathSin.B_1x1_Gate_Expr_MathSinh.B_1x1_Gate_Expr_MathSqrt.B_1x1_Gate_Expr_MathSubtract.B_1x1_Gate_Expr_MathTan.B_1x1_Gate_Expr_MathTanh.B_1x1_Gate_Expr_NearlyEqual.B_1x1_Gate_Expr_QuatAngleBetween.B_1x1_Gate_Expr_QuatBetween.B_1x1_Gate_Expr_QuatDotProduct.B_1x1_Gate_Expr_QuatFromAxisAngle.B_1x1_Gate_Expr_QuatSlerp.B_1x1_Gate_Expr_QuatToAxisAngle.B_1x1_Gate_Expr_RotateVector.B_1x1_Gate_Expr_RotationToDirection.B_1x1_Gate_Expr_Round.B_1x1_Gate_Expr_Select.B_1x1_Gate_Expr_SplitColor.B_1x1_Gate_Expr_SplitColorSRGB.B_1x1_Gate_Expr_SplitQuaternion.B_1x1_Gate_Expr_SplitRotation.B_1x1_Gate_Expr_SplitVector.B_1x1_Gate_Expr_String_Concatenate.B_1x1_Gate_Expr_String_Contains.B_1x1_Gate_Expr_String_EndsWith.B_1x1_Gate_Expr_String_Find.B_1x1_Gate_Expr_String_FormatText.B_1x1_Gate_Expr_String_Length.B_1x1_Gate_Expr_String_ParseInt.B_1x1_Gate_Expr_String_ParseNumber.B_1x1_Gate_Expr_String_Replace.B_1x1_Gate_Expr_String_Split.B_1x1_Gate_Expr_String_StartsWith.B_1x1_Gate_Expr_String_Substring.B_1x1_Gate_Expr_String_ToLower.B_1x1_Gate_Expr_String_ToUpper.B_1x1_Gate_Expr_String_Trim.B_1x1_Gate_Expr_Swap.B_1x1_Gate_Expr_VecCrossProduct.B_1x1_Gate_Expr_VecDistance.B_1x1_Gate_Expr_VecDistanceSquared.B_1x1_Gate_Expr_VecDotProduct.B_1x1_Gate_Expr_VecMagnitude.B_1x1_Gate_Expr_VecMagnitudeSquared.B_1x1_Gate_Expr_VecNormalize.B_1x1_Gate_Expr_VecScale.B_1x1_Gate_Fake_Gamemode_CharacterDamagedEvent.B_1x1_Gate_Fake_Gamemode_CharacterDiedEvent.B_1x1_Gate_Fake_Gamemode_CharacterSpawnedEvent.B_1x1_Gate_Fake_Gamemode_ControllerJoinedEvent.B_1x1_Gate_Fake_Gamemode_ControllerLeftEvent.B_1x1_Gate_Fake_Gamemode_RoundEndEvent.B_1x1_Gate_Fake_Gamemode_RoundStartEvent.B_1x1_Gate_FindPlayer.B_1x1_Gate_FontReference.B_1x1_Gate_Internal_CharacterZoneEvent_Entered.B_1x1_Gate_Internal_CharacterZoneEvent_Left.B_1x1_Gate_Internal_EntityZoneEvent_Entered.B_1x1_Gate_Internal_EntityZoneEvent_Left.B_1x1_Gate_Internal_ProjectileZoneEvent_Entered.B_1x1_Gate_Internal_ProjectileZoneEvent_Left.B_1x1_Gate_Internal_ReadBrickGrid.B_1x1_Gate_Internal_ZoneEvent_BrickChanged.B_1x1_Gate_Internal_ZoneEvent_BrickRemoved.B_1x1_Gate_ItemReference.B_1x1_Gate_OneShotAudioReference.B_1x1_Gate_PickupReference.B_1x1_Gate_ProjectileReference.B_1x1_Gate_Pseudo_BufferSeconds.B_1x1_Gate_Pseudo_BufferTicks.B_1x1_Gate_Pseudo_Dampen.B_1x1_Gate_Pseudo_QueueSeconds.B_1x1_Gate_Pseudo_QueueTicks.B_1x1_Gate_Pseudo_Timer.B_1x1_Gate_Pseudo_Tween.B_1x1_Gate_SeatControlSplitter.B_1x1_Gate_ServerUptime.B_1x1_Gate_Variable.B_1x1_Gate_Variable_Array.B_1x1_Gate_WeightBrick.B_1x1_Gate_WheelEngineAudioReference.B_2x2_Cannon.B_2x2_Thruster.B_Bush.B_Button_Pressed.B_Button_Square_Pressed.B_Gyroscope.B_Joint_RigidBearing.B_Joint_RigidBearing_Micro.B_Joint_Socket.B_Joint_Wheel_Micro_Suspension.B_Joint_Wheel_Suspension.B_Switch_Flipped".split("."), Ji = /* @__PURE__ */ "PB_DefaultBrick.PB_DefaultStudded.PB_DefaultRampInnerCornerInverted.PB_DefaultRampCrestEnd.PB_DefaultRampCrestCorner.PB_DefaultRampCrest.PB_DefaultRamp.PB_PicketFence.BP_LatticeThin.PB_DefaultWedge.PB_DefaultTile.PB_DefaultSmoothTile.PB_DefaultSideWedge.PB_DefaultRampInverted.PB_DefaultRampInnerCorner.PB_DefaultRampCornerInverted.PB_DefaultRampCorner.PB_DefaultPole.PB_DefaultMicroWedgeTriangleCorner.PB_DefaultMicroWedgeOuterCorner.PB_DefaultMicroWedgeInnerCorner.PB_DefaultMicroWedgeHalfOuterCorner.PB_DefaultMicroWedgeHalfInnerCornerInverted.PB_DefaultMicroWedgeHalfInnerCorner.PB_DefaultMicroWedgeCorner.PB_DefaultMicroWedge.PB_DefaultMicroRamp.PB_DefaultMicroBrick.PB_DefaultArch.BP_SquarePlate.BP_SpikePlate.PB_Spike.PB_SliderJoint.PB_ServoSliderJoint.PB_MotorSliderJoint.BP_RoundPlate.PB_RoundedCap.PB_Baguette".split("."), Yi = {
|
|
3842
|
+
}, qi = /* @__PURE__ */ "B_1x1_Reroute_Node.B_1x1_Gate_AND.B_1x1_Gate_OR.B_1x1_Gate_XOR.B_1x1_Gate_NAND.B_1x1_Gate_NOR.B_1x1_NOT_Gate.B_1x1_Gate_AND_Bitwise.B_1x1_Gate_OR_Bitwise.B_1x1_Gate_XOR_Bitwise.B_1x1_Gate_NAND_Bitwise.B_1x1_Gate_NOR_Bitwise.B_1x1_Gate_NOT_Bitwise.B_1x1_Gate_ShiftLeft_Bitwise.B_1x1_Gate_ShiftRight_Bitwise.B_1x1_Gate_Add.B_1x1_Gate_Subtract.B_1x1_Gate_Multiply.B_1x1_Gate_ModFloored.B_1x1_Gate_Mod.B_1x1_Gate_Divide.B_1x1_Gate_Equal.B_1x1_Gate_NotEqual.B_1x1_Gate_LessThan.B_1x1_Gate_LessThanEqual.B_1x1_Gate_GreaterThan.B_1x1_Gate_GreaterThanEqual.B_1x1_Gate_Ceiling.B_1x1_Gate_Floor.B_1x1_Gate_Constant.B_1x1_Gate_Blend.B_1x1_Gate_EdgeDetector.B_1x1_Gate_Timer.B_1x1_Gate_Timer_Tick.B_1x1_Microchip.B_1x1_Gate_MicrochipInput.B_1x1_Gate_MicrochipOutput.B_2x2_Overhang.B_1x4_Brick_Side.B_1x2_Overhang.B_1x1_Brick_Side_Lip.B_1x1_Brick_Side.B_Jar.B_Chalice.B_Cauldron.B_Small_Flower.B_Pine_Tree.B_Leaf_Bush.B_Hedge_1x4.B_Hedge_1x2.B_Hedge_1x1_Corner.B_Hedge_1x1.B_Flower.B_Fern.B_Branch.B_2x4_Door_Frame.B_Turkey_Leg.B_Turkey_Body.B_Swirl_Plate.B_Sausage.B_Pumpkin_Carved.B_Pumpkin.B_Ladder.B_Inverted_Cone.B_Handle.B_Gravestone.B_Frog_Small.B_Frog.B_Flame.B_Coffin_Lid.B_Coffin.B_BoneStraight.B_Bone.B_1x1_Coin_Diagonal.B_1x1_Coin.B_Spoon.B_Fork.B_2x2_Corner.B_2x2f_Plate_Center_Inv.B_2x2f_Plate_Center.B_1x2f_Plate_Center_Inv.B_4x4_Round.B_2x2_Round.B_2x2F_Round.B_2x_Octo_T_Inv.B_2x_Octo_T.B_2x2F_Octo_Converter_Inv.B_2x2F_Octo_Converter.B_2x2F_Octo.B_8x8_Lattice_Plate.B_1x2_MetalIngot.B_1x1f_Tile_Corner.B_1x1f_Inverse_Tile_Corner.B_Rook.B_Queen.B_Pawn.B_Knight.B_King.B_Bishop.B_1x2f_Plate_Center.B_2x2_Cone.B_1x1_Round.B_1x1_Cone.B_1x1F_Round.B_2x_Octo_Cone.B_2x_Octo_90Deg_Inv.B_2x_Octo_90Deg.B_2x_Octo.B_1x_Octo_T_Inv.B_1x_Octo_T.B_1x_Octo_90Deg_Inv.B_1x_Octo_90Deg.B_1x_Octo.B_1x1F_Octo.B_2x2_Slipper.B_2x1_Slipper.B_Joint_Wheel_Micro.B_Joint_Wheel.B_Joint_Socket_Micro.B_Joint_Servo_Micro.B_Joint_Servo.B_Joint_Motor_Micro.B_Joint_Motor.B_Joint_Coupler.B_Joint_Bearing_Micro.B_Joint_Bearing.B_1x1_SoundEmitter.B_1x1_Gate_Teleport.B_1x1_Gate_RelativeTeleport.B_1x1_EntityGate_SetVelocity.B_1x1_EntityGate_SetLocationAndRotation.B_1x1_EntityGate_SetLocation.B_1x1_EntityGate_ReadBrickGrid.B_1x1_EntityGate_PlayAudioAt.B_1x1_EntityGate_AddVelocity.B_1x1_EntityGate_AddLocationAndRotation.B_1x1_CharacterGate_SetGravityDirection.B_Vehicle_Engine.B_Switch_Test.B_SpawnPoint.B_Seat.B_GoalPoint.B_DestinationPoint.B_CheckPoint.B_Button_Square.B_Button.B_Bot_Spawn_Point.B_2x2F_Target.B_2x2F_Speaker.B_1x1_Gate_WheelEngineSlim.B_1x1F_Speaker.B_1x1_Gate_AudioReference.B_1x1_Gate_BrickAssetReference.B_1x1_Gate_Clock.B_1x1_Gate_DeltaTime.B_1x1_Gate_EntityTypeReference.B_1x1_Gate_Exec_ArrayVar_Append.B_1x1_Gate_Exec_ArrayVar_Average.B_1x1_Gate_Exec_ArrayVar_Clear.B_1x1_Gate_Exec_ArrayVar_CopyFrom.B_1x1_Gate_Exec_ArrayVar_Fill.B_1x1_Gate_Exec_ArrayVar_Find.B_1x1_Gate_Exec_ArrayVar_Get.B_1x1_Gate_Exec_ArrayVar_GetLength.B_1x1_Gate_Exec_ArrayVar_Insert.B_1x1_Gate_Exec_ArrayVar_Max.B_1x1_Gate_Exec_ArrayVar_Min.B_1x1_Gate_Exec_ArrayVar_Pop.B_1x1_Gate_Exec_ArrayVar_Push.B_1x1_Gate_Exec_ArrayVar_RemoveAtIndex.B_1x1_Gate_Exec_ArrayVar_Resize.B_1x1_Gate_Exec_ArrayVar_Reverse.B_1x1_Gate_Exec_ArrayVar_SetAtIndex.B_1x1_Gate_Exec_ArrayVar_Shuffle.B_1x1_Gate_Exec_ArrayVar_Slice.B_1x1_Gate_Exec_ArrayVar_Sort.B_1x1_Gate_Exec_ArrayVar_Sum.B_1x1_Gate_Exec_ArrayVar_Swap.B_1x1_Gate_Exec_Branch.B_1x1_Gate_Exec_Character_AddInventoryBrick.B_1x1_Gate_Exec_Character_AddInventoryEntity.B_1x1_Gate_Exec_Character_AddInventoryEntry.B_1x1_Gate_Exec_Character_AddInventoryItem.B_1x1_Gate_Exec_Character_AddInventoryItemAdv.B_1x1_Gate_Exec_Character_GetAim.B_1x1_Gate_Exec_Character_GetDamage.B_1x1_Gate_Exec_Character_GetFromController.B_1x1_Gate_Exec_Character_IncDamage.B_1x1_Gate_Exec_Character_SetDamage.B_1x1_Gate_Exec_Character_SetInventoryBrick.B_1x1_Gate_Exec_Character_SetInventoryEntity.B_1x1_Gate_Exec_Character_SetInventoryEntry.B_1x1_Gate_Exec_Character_SetInventoryItem.B_1x1_Gate_Exec_Character_SetInventoryItemAdv.B_1x1_Gate_Exec_Character_SetTempPermission.B_1x1_Gate_Exec_Character_ShowHint.B_1x1_Gate_Exec_ChatCommand.B_1x1_Gate_Exec_Controller_DisplayText.B_1x1_Gate_Exec_Controller_GetDisplayName.B_1x1_Gate_Exec_Controller_GetFromEntity.B_1x1_Gate_Exec_Controller_GetUserId.B_1x1_Gate_Exec_Controller_GetUserName.B_1x1_Gate_Exec_Controller_HasPermission.B_1x1_Gate_Exec_Controller_HasRole.B_1x1_Gate_Exec_Controller_IsTrustedByBrickOwner.B_1x1_Gate_Exec_Controller_SetCanRespawn.B_1x1_Gate_Exec_Controller_ShowChatMessage.B_1x1_Gate_Exec_Controller_ShowMessageBox.B_1x1_Gate_Exec_Controller_ShowStatusMessage.B_1x1_Gate_Exec_Cycle.B_1x1_Gate_Exec_Entity_AddLocationRotation.B_1x1_Gate_Exec_Entity_AddVelocity.B_1x1_Gate_Exec_Entity_GetAngularVelocity.B_1x1_Gate_Exec_Entity_GetLinearVelocity.B_1x1_Gate_Exec_Entity_GetLocation.B_1x1_Gate_Exec_Entity_GetLocationRotation.B_1x1_Gate_Exec_Entity_GetRotation.B_1x1_Gate_Exec_Entity_GetTag.B_1x1_Gate_Exec_Entity_GetVelocity.B_1x1_Gate_Exec_Entity_PlayAudioAt.B_1x1_Gate_Exec_Entity_RelativeTeleport.B_1x1_Gate_Exec_Entity_SetAngularVelocity.B_1x1_Gate_Exec_Entity_SetFrozen.B_1x1_Gate_Exec_Entity_SetGravityDirection.B_1x1_Gate_Exec_Entity_SetLinearVelocity.B_1x1_Gate_Exec_Entity_SetLocation.B_1x1_Gate_Exec_Entity_SetLocationRotation.B_1x1_Gate_Exec_Entity_SetRotation.B_1x1_Gate_Exec_Entity_SetTag.B_1x1_Gate_Exec_Entity_SetVelocity.B_1x1_Gate_Exec_Entity_Teleport.B_1x1_Gate_Exec_Gamemode_BroadcastChatMessage.B_1x1_Gate_Exec_Gamemode_BroadcastStatusMessage.B_1x1_Gate_Exec_Gamemode_FillArrayFromPlayers.B_1x1_Gate_Exec_Gamemode_FillArrayFromTeamMembers.B_1x1_Gate_Exec_Gamemode_GetCurrentRound.B_1x1_Gate_Exec_Gamemode_GetLeaderboardValue.B_1x1_Gate_Exec_Gamemode_GetTeam.B_1x1_Gate_Exec_Gamemode_GetTeamByName.B_1x1_Gate_Exec_Gamemode_GetTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_GetTeamName.B_1x1_Gate_Exec_Gamemode_IncrementLeaderboardValue.B_1x1_Gate_Exec_Gamemode_IncrementTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_PlayerWins.B_1x1_Gate_Exec_Gamemode_SetLeaderboardValue.B_1x1_Gate_Exec_Gamemode_SetTeam.B_1x1_Gate_Exec_Gamemode_SetTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_SetTeamPinned.B_1x1_Gate_Exec_Gamemode_TeamWins.B_1x1_Gate_Exec_PlayGlobalAudio.B_1x1_Gate_Exec_PrefabSpawner.B_1x1_Gate_Exec_PrintToConsole.B_1x1_Gate_Exec_Random.B_1x1_Gate_Exec_Sweep.B_1x1_Gate_Exec_Toggle.B_1x1_Gate_Exec_Union.B_1x1_Gate_Exec_Var_Get.B_1x1_Gate_Exec_Var_Increment.B_1x1_Gate_Exec_Var_Set.B_1x1_Gate_Expr_BitwiseAND.B_1x1_Gate_Expr_BitwiseBitCount.B_1x1_Gate_Expr_BitwiseNAND.B_1x1_Gate_Expr_BitwiseNOR.B_1x1_Gate_Expr_BitwiseNOT.B_1x1_Gate_Expr_BitwiseOR.B_1x1_Gate_Expr_BitwiseShiftLeft.B_1x1_Gate_Expr_BitwiseShiftRight.B_1x1_Gate_Expr_BitwiseXOR.B_1x1_Gate_Expr_Ceil.B_1x1_Gate_Expr_ChangeDetector.B_1x1_Gate_Expr_ChangeDetectorExec.B_1x1_Gate_Expr_ColorBlend.B_1x1_Gate_Expr_ColorConvert.B_1x1_Gate_Expr_ColorToHex.B_1x1_Gate_Expr_CompareEqual.B_1x1_Gate_Expr_CompareGreater.B_1x1_Gate_Expr_CompareGreaterOrEqual.B_1x1_Gate_Expr_CompareLess.B_1x1_Gate_Expr_CompareLessOrEqual.B_1x1_Gate_Expr_CompareNotEqual.B_1x1_Gate_Expr_Convert.B_1x1_Gate_Expr_DirectionToRotation.B_1x1_Gate_Expr_EdgeDetector.B_1x1_Gate_Expr_EdgeDetectorExec.B_1x1_Gate_Expr_Floor.B_1x1_Gate_Expr_InvertRotation.B_1x1_Gate_Expr_LogicalAND.B_1x1_Gate_Expr_LogicalNAND.B_1x1_Gate_Expr_LogicalNOR.B_1x1_Gate_Expr_LogicalNOT.B_1x1_Gate_Expr_LogicalOR.B_1x1_Gate_Expr_LogicalXOR.B_1x1_Gate_Expr_MakeColor.B_1x1_Gate_Expr_MakeColorHex.B_1x1_Gate_Expr_MakeColorSRGB.B_1x1_Gate_Expr_MakeQuaternion.B_1x1_Gate_Expr_MakeRotation.B_1x1_Gate_Expr_MakeVector.B_1x1_Gate_Expr_MathAbs.B_1x1_Gate_Expr_MathAcos.B_1x1_Gate_Expr_MathAcosh.B_1x1_Gate_Expr_MathAdd.B_1x1_Gate_Expr_MathAsin.B_1x1_Gate_Expr_MathAsinh.B_1x1_Gate_Expr_MathAtan.B_1x1_Gate_Expr_MathAtan2.B_1x1_Gate_Expr_MathAtanh.B_1x1_Gate_Expr_MathBlend.B_1x1_Gate_Expr_MathClamp.B_1x1_Gate_Expr_MathCos.B_1x1_Gate_Expr_MathCosh.B_1x1_Gate_Expr_MathDegreesToRadians.B_1x1_Gate_Expr_MathDivide.B_1x1_Gate_Expr_MathEasing.B_1x1_Gate_Expr_MathExp.B_1x1_Gate_Expr_MathLn.B_1x1_Gate_Expr_MathLogBase.B_1x1_Gate_Expr_MathMax.B_1x1_Gate_Expr_MathMin.B_1x1_Gate_Expr_MathModulo.B_1x1_Gate_Expr_MathModuloFloored.B_1x1_Gate_Expr_MathMultiply.B_1x1_Gate_Expr_MathNegate.B_1x1_Gate_Expr_MathPow.B_1x1_Gate_Expr_MathRadiansToDegrees.B_1x1_Gate_Expr_MathSign.B_1x1_Gate_Expr_MathSin.B_1x1_Gate_Expr_MathSinh.B_1x1_Gate_Expr_MathSqrt.B_1x1_Gate_Expr_MathSubtract.B_1x1_Gate_Expr_MathTan.B_1x1_Gate_Expr_MathTanh.B_1x1_Gate_Expr_NearlyEqual.B_1x1_Gate_Expr_QuatAngleBetween.B_1x1_Gate_Expr_QuatBetween.B_1x1_Gate_Expr_QuatDotProduct.B_1x1_Gate_Expr_QuatFromAxisAngle.B_1x1_Gate_Expr_QuatSlerp.B_1x1_Gate_Expr_QuatToAxisAngle.B_1x1_Gate_Expr_RotateVector.B_1x1_Gate_Expr_RotationToDirection.B_1x1_Gate_Expr_Round.B_1x1_Gate_Expr_Select.B_1x1_Gate_Expr_SplitColor.B_1x1_Gate_Expr_SplitColorSRGB.B_1x1_Gate_Expr_SplitQuaternion.B_1x1_Gate_Expr_SplitRotation.B_1x1_Gate_Expr_SplitVector.B_1x1_Gate_Expr_String_Concatenate.B_1x1_Gate_Expr_String_Contains.B_1x1_Gate_Expr_String_EndsWith.B_1x1_Gate_Expr_String_Find.B_1x1_Gate_Expr_String_FormatText.B_1x1_Gate_Expr_String_Length.B_1x1_Gate_Expr_String_ParseInt.B_1x1_Gate_Expr_String_ParseNumber.B_1x1_Gate_Expr_String_Replace.B_1x1_Gate_Expr_String_Split.B_1x1_Gate_Expr_String_StartsWith.B_1x1_Gate_Expr_String_Substring.B_1x1_Gate_Expr_String_ToLower.B_1x1_Gate_Expr_String_ToUpper.B_1x1_Gate_Expr_String_Trim.B_1x1_Gate_Expr_Swap.B_1x1_Gate_Expr_VecCrossProduct.B_1x1_Gate_Expr_VecDistance.B_1x1_Gate_Expr_VecDistanceSquared.B_1x1_Gate_Expr_VecDotProduct.B_1x1_Gate_Expr_VecMagnitude.B_1x1_Gate_Expr_VecMagnitudeSquared.B_1x1_Gate_Expr_VecNormalize.B_1x1_Gate_Expr_VecScale.B_1x1_Gate_Fake_Gamemode_CharacterDamagedEvent.B_1x1_Gate_Fake_Gamemode_CharacterDiedEvent.B_1x1_Gate_Fake_Gamemode_CharacterSpawnedEvent.B_1x1_Gate_Fake_Gamemode_ControllerJoinedEvent.B_1x1_Gate_Fake_Gamemode_ControllerLeftEvent.B_1x1_Gate_Fake_Gamemode_RoundEndEvent.B_1x1_Gate_Fake_Gamemode_RoundStartEvent.B_1x1_Gate_FindPlayer.B_1x1_Gate_FontReference.B_1x1_Gate_Internal_CharacterZoneEvent_Entered.B_1x1_Gate_Internal_CharacterZoneEvent_Left.B_1x1_Gate_Internal_EntityZoneEvent_Entered.B_1x1_Gate_Internal_EntityZoneEvent_Left.B_1x1_Gate_Internal_ProjectileZoneEvent_Entered.B_1x1_Gate_Internal_ProjectileZoneEvent_Left.B_1x1_Gate_Internal_ReadBrickGrid.B_1x1_Gate_Internal_ZoneEvent_BrickChanged.B_1x1_Gate_Internal_ZoneEvent_BrickRemoved.B_1x1_Gate_ItemReference.B_1x1_Gate_OneShotAudioReference.B_1x1_Gate_PickupReference.B_1x1_Gate_ProjectileReference.B_1x1_Gate_Pseudo_BufferSeconds.B_1x1_Gate_Pseudo_BufferTicks.B_1x1_Gate_Pseudo_Dampen.B_1x1_Gate_Pseudo_QueueSeconds.B_1x1_Gate_Pseudo_QueueTicks.B_1x1_Gate_Pseudo_Timer.B_1x1_Gate_Pseudo_Tween.B_1x1_Gate_SeatControlSplitter.B_1x1_Gate_ServerUptime.B_1x1_Gate_Variable.B_1x1_Gate_Variable_Array.B_1x1_Gate_WeightBrick.B_1x1_Gate_WheelEngineAudioReference.B_2x2_Cannon.B_2x2_Thruster.B_Bush.B_Button_Pressed.B_Button_Square_Pressed.B_Gyroscope.B_Joint_RigidBearing.B_Joint_RigidBearing_Micro.B_Joint_Socket.B_Joint_Wheel_Micro_Suspension.B_Joint_Wheel_Suspension.B_Switch_Flipped".split("."), Ji = /* @__PURE__ */ "PB_DefaultBrick.PB_DefaultStudded.PB_DefaultRampInnerCornerInverted.PB_DefaultRampCrestEnd.PB_DefaultRampCrestCorner.PB_DefaultRampCrest.PB_DefaultRamp.PB_PicketFence.BP_LatticeThin.PB_DefaultWedge.PB_DefaultTile.PB_DefaultSmoothTile.PB_DefaultSideWedge.PB_DefaultRampInverted.PB_DefaultRampInnerCorner.PB_DefaultRampCornerInverted.PB_DefaultRampCorner.PB_DefaultPole.PB_DefaultMicroWedgeTriangleCorner.PB_DefaultMicroWedgeOuterCorner.PB_DefaultMicroWedgeInnerCorner.PB_DefaultMicroWedgeHalfOuterCorner.PB_DefaultMicroWedgeHalfInnerCornerInverted.PB_DefaultMicroWedgeHalfInnerCorner.PB_DefaultMicroWedgeCorner.PB_DefaultMicroWedge.PB_DefaultMicroRamp.PB_DefaultMicroBrick.PB_DefaultArch.BP_SquarePlate.BP_SpikePlate.PB_Spike.PB_SliderJoint.PB_ServoSliderJoint.PB_MotorSliderJoint.BP_RoundPlate.PB_RoundedCap.PB_Baguette".split("."), Yi = {
|
|
3843
3843
|
BP_LatticeThin: "BP_LatticeThin",
|
|
3844
3844
|
BP_RoundPlate: "BP_RoundPlate",
|
|
3845
3845
|
BP_SpikePlate: "BP_SpikePlate",
|
|
@@ -3988,6 +3988,7 @@ var Ki = class e {
|
|
|
3988
3988
|
B_1x1_Gate_Expr_BitwiseXOR: "B_1x1_Gate_Expr_BitwiseXOR",
|
|
3989
3989
|
B_1x1_Gate_Expr_Ceil: "B_1x1_Gate_Expr_Ceil",
|
|
3990
3990
|
B_1x1_Gate_Expr_ChangeDetector: "B_1x1_Gate_Expr_ChangeDetector",
|
|
3991
|
+
B_1x1_Gate_Expr_ChangeDetectorExec: "B_1x1_Gate_Expr_ChangeDetectorExec",
|
|
3991
3992
|
B_1x1_Gate_Expr_ColorBlend: "B_1x1_Gate_Expr_ColorBlend",
|
|
3992
3993
|
B_1x1_Gate_Expr_ColorConvert: "B_1x1_Gate_Expr_ColorConvert",
|
|
3993
3994
|
B_1x1_Gate_Expr_ColorToHex: "B_1x1_Gate_Expr_ColorToHex",
|
|
@@ -4000,6 +4001,7 @@ var Ki = class e {
|
|
|
4000
4001
|
B_1x1_Gate_Expr_Convert: "B_1x1_Gate_Expr_Convert",
|
|
4001
4002
|
B_1x1_Gate_Expr_DirectionToRotation: "B_1x1_Gate_Expr_DirectionToRotation",
|
|
4002
4003
|
B_1x1_Gate_Expr_EdgeDetector: "B_1x1_Gate_Expr_EdgeDetector",
|
|
4004
|
+
B_1x1_Gate_Expr_EdgeDetectorExec: "B_1x1_Gate_Expr_EdgeDetectorExec",
|
|
4003
4005
|
B_1x1_Gate_Expr_Floor: "B_1x1_Gate_Expr_Floor",
|
|
4004
4006
|
B_1x1_Gate_Expr_InvertRotation: "B_1x1_Gate_Expr_InvertRotation",
|
|
4005
4007
|
B_1x1_Gate_Expr_LogicalAND: "B_1x1_Gate_Expr_LogicalAND",
|
|
@@ -4441,6 +4443,7 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
4441
4443
|
["BrickComponentType_WireGraph_Expr_BitwiseXOR", "BrickComponentData_WireGraph_Expr_IntInt_Int"],
|
|
4442
4444
|
["BrickComponentType_WireGraph_Expr_Ceil", "BrickComponentData_WireGraph_Expr_Float_Float"],
|
|
4443
4445
|
["BrickComponentType_WireGraph_Expr_ChangeDetector", "BrickComponentData_WireGraph_Expr_ChangeDetector"],
|
|
4446
|
+
["BrickComponentType_WireGraph_Expr_ChangeDetectorExec", "BrickComponentData_WireGraph_Expr_ChangeDetectorExec"],
|
|
4444
4447
|
["BrickComponentType_WireGraph_Expr_ColorBlend", "BrickComponentData_WireGraph_Expr_ColorBlend"],
|
|
4445
4448
|
["BrickComponentType_WireGraph_Expr_ColorConvert", "BrickComponentData_WireGraph_Expr_ColorConvert"],
|
|
4446
4449
|
["BrickComponentType_WireGraph_Expr_ColorToHex", "BrickComponentData_WireGraph_Expr_ColorToHex"],
|
|
@@ -4453,6 +4456,7 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
4453
4456
|
["BrickComponentType_WireGraph_Expr_Convert", "BrickComponentData_WireGraph_Expr_Convert"],
|
|
4454
4457
|
["BrickComponentType_WireGraph_Expr_DirectionToRotation", "BrickComponentData_WireGraph_Expr_DirectionToRotation"],
|
|
4455
4458
|
["BrickComponentType_WireGraph_Expr_EdgeDetector", "BrickComponentData_WireGraph_Expr_EdgeDetector"],
|
|
4459
|
+
["BrickComponentType_WireGraph_Expr_EdgeDetectorExec", "BrickComponentData_WireGraph_Expr_EdgeDetectorExec"],
|
|
4456
4460
|
["BrickComponentType_WireGraph_Expr_Floor", "BrickComponentData_WireGraph_Expr_Float_Float"],
|
|
4457
4461
|
["BrickComponentType_WireGraph_Expr_InvertRotation", "BrickComponentData_WireGraph_Expr_InvertRotation"],
|
|
4458
4462
|
["BrickComponentType_WireGraph_Expr_LogicalAND", "BrickComponentData_WireGraph_Expr_BoolBool_Bool"],
|
|
@@ -4734,7 +4738,7 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
4734
4738
|
PickupSpinSpeed: .2,
|
|
4735
4739
|
PickupBobSpeed: .1,
|
|
4736
4740
|
PickupBobHeight: 4,
|
|
4737
|
-
PickupAnimationPhase: .
|
|
4741
|
+
PickupAnimationPhase: .6645405
|
|
4738
4742
|
},
|
|
4739
4743
|
BrickComponentData_Joint_Wheel: {
|
|
4740
4744
|
bEnabled: !0,
|
|
@@ -5192,6 +5196,7 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
5192
5196
|
bInputB: !1
|
|
5193
5197
|
},
|
|
5194
5198
|
BrickComponentData_WireGraph_Expr_Bool_Bool: { bInput: !1 },
|
|
5199
|
+
BrickComponentData_WireGraph_Expr_ChangeDetector: { bPulseOnChange: !1 },
|
|
5195
5200
|
BrickComponentData_WireGraph_Expr_ColorBlend: {
|
|
5196
5201
|
Alpha: .5,
|
|
5197
5202
|
BlendSpace: 0,
|
|
@@ -5201,7 +5206,12 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
5201
5206
|
FromSpace: 0,
|
|
5202
5207
|
ToSpace: 0
|
|
5203
5208
|
},
|
|
5204
|
-
BrickComponentData_WireGraph_Expr_EdgeDetector: {
|
|
5209
|
+
BrickComponentData_WireGraph_Expr_EdgeDetector: {
|
|
5210
|
+
Input: 0,
|
|
5211
|
+
bPulseOnRisingEdge: !1,
|
|
5212
|
+
bPulseOnFallingEdge: !1
|
|
5213
|
+
},
|
|
5214
|
+
BrickComponentData_WireGraph_Expr_EdgeDetectorExec: { Input: 0 },
|
|
5205
5215
|
BrickComponentData_WireGraph_Expr_Float_Float: { Input: 0 },
|
|
5206
5216
|
BrickComponentData_WireGraph_Expr_IntInt_Int: {
|
|
5207
5217
|
InputA: 0,
|
|
@@ -5318,7 +5328,7 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
5318
5328
|
BrickComponentData_WireGraph_Expr_VecFloat_Vec: { Scalar: 0 },
|
|
5319
5329
|
BrickComponentData_WireGraph_Fake_RoundEvent: { RoundNumber: 0 },
|
|
5320
5330
|
BrickComponentData_WireGraph_FindPlayer: { Query: "" }
|
|
5321
|
-
})), ta = /* @__PURE__ */ "A,ActiveDamping,AdditionalIgnoredEntities,AggroRange,Agression,Alpha,Amount,Anchor,Anchor.X,Anchor.Y,AnchorX,AnchorY,Angle,AngularVelocity,AngularVelocity.X,AngularVelocity.Y,AngularVelocity.Z,Arguments,ArrayVarRef,Arrived,AttackDamageMultiplier,AttackMovementAmount,Attacker,AttackerWeapon,AttackerWeaponName,AudioDescriptor,Axis,Axis.X,Axis.Y,Axis.Z,B,Base,BeginTouchSound,Billboard,Blend,BotName,BotWeapon,BrickAsset,BrickGrid,Brightness,CenterOfSteering,Character,CharacterThatJustHit,Color,Color.A,Color.B,Color.G,Color.R,ColorA,ColorA.A,ColorA.B,ColorA.G,ColorA.R,ColorB,ColorB.A,ColorB.B,ColorB.G,ColorB.R,ConsoleTag,Control_DriveAndSteer,Controller,CorpseTimeout,Count,CurrentAngle,CurrentPosition,CustomMass,CustomMassVerticalOffset,Damage,DamageLimit,DamageMultiplier,Damping,DataIn1,DataIn2,DataIn3,DataIn4,DataIn5,DataIn6,DataIn7,DataIn8,DataOut1,DataOut2,DataOut3,DataOut4,DataOut5,DataOut6,DataOut7,DataOut8,Delimiter,DeltaTime,Destination,DestroyAll,Direction,Direction.X,Direction.Y,Direction.Z,DisplayName,Distance,DistanceToTarget,DriveAcceleratingPowerMultiplier,DriveBrakingPowerMultiplier,DriveDampingMultiplier,DriveInterpSpeed,DrivePower,DriveSpeed,Duration,EndTouchSound,Entity,EntityType,Exec,ExecA,ExecB,ExecDown,ExecIn,ExecOut,ExecOutA,ExecOutB,ExecOutDown,ExitOffset,ExitOffset.X,ExitOffset.Y,ExitOffset.Z,Expired,Exponent,Face,FireRate,FireSound,FocusAzimuth,FocusCharacter,Font,FontColor,FontColor.A,FontColor.B,FontColor.G,FontColor.R,Force,ForceLimit,FormatString,From,From.X,From.Y,From.Z,Function,G,GraffitiAngleLimit,GraffitiDepthLimit,GraffitiLayer,GunSkill,HealthMultiplier,Hex,Hit,HitDistance,HitEntity,HitLocation,HitNormal,IgnoreEntity,Index,IndexA,IndexB,InnerConeAngle,InnerRadius,Input,Input.A,Input.B,Input.G,Input.Pitch,Input.R,Input.Roll,Input.W,Input.X,Input.Y,Input.Yaw,Input.Z,InputA,InputA.W,InputA.X,InputA.Y,InputA.Z,InputB,InputB.W,InputB.X,InputB.Y,InputB.Z,InputC,InputD,InputE,InputF,InputForward,InputG,InputRight,Instigator,InteractSound,InterpMode,Item,ItemNameOverride,ItemScale,ItemType,JointDistance,Jumpyness,Kerning,Key,Killer,KillerWeapon,KillerWeaponName,Left,Length,Lifetime,Limit,LimitAngle,LineHeight,LineOffset,LinearVelocity,LinearVelocity.X,LinearVelocity.Y,LinearVelocity.Z,ManualInput_Drive,ManualInput_Steer,Mass,MassOffset,MassOffset.X,MassOffset.Y,MassOffset.Z,MassSize,MassSize.X,MassSize.Y,MassSize.Z,Material,MaterialAlpha,MaterialSlider,Max,MaxDistance,MaxForce,Message,Min,Miss,MoveTarget,MoveTarget.X,MoveTarget.Y,MoveTarget.Z,MovementAmount,MovementGoalDummy,MovementRandomness,Name,NonFocusAzimuth,NonFocusVolumeAttenuation,NumberOfShots,OccupantCount,Offset,Offset.X,Offset.Y,Offset.Z,OnChanged,OnFallingEdge,OnFired,OnRisingEdge,OnTime,Origin,Origin.X,Origin.Y,Origin.Z,OuterConeAngle,Outline,OutlineColor,OutlineColor.A,OutlineColor.B,OutlineColor.G,OutlineColor.R,OutlineSize,OutlineWidth,Output,OutputB,Pause,PickupAnimationAxis,PickupAnimationPhase,PickupBobHeight,PickupBobSpeed,PickupClass,PickupMeshColors,PickupMinigameResetRespawnDelay,PickupOffsetDirection,PickupOffsetDistance,PickupRespawnTime,PickupRotation,PickupRotation.Pitch,PickupRotation.Roll,PickupRotation.Yaw,PickupScale,PickupSpinSpeed,Pitch,PitchMultiplier,Play,Player,PositionX,PositionY,Power,Prefix,PressCount,PressSound,ProceduralSize,ProceduralSize.X,ProceduralSize.Y,ProceduralSize.Z,Projectile,ProjectileClass,ProjectileOverride,PromptCustomLabel,Query,R,RER_Input,RER_Output,Radius,ReactionTime,ReleaseSound,RepeatCount,RepeatDelay,RepeatTime,RepeatVariance,Replacement,RespawnTime,Restart,Resume,Right,Roll,Rotation,Rotation.Pitch,Rotation.Roll,Rotation.W,Rotation.X,Rotation.Y,Rotation.Yaw,Rotation.Z,RoundNumber,RunSpeed,Scalar,ScaleMultiplier,ScaleX,ScaleY,ScuffWidth,Search,SecondsToWait,Separator,Shading,ShadingWidth,SittingCharacter,Size,Skew,Skin,Skin.Parts,Slot,SmoothTime,Source,SourceRef,SpawnLocation,SpawnMargin,SpawnOffset,SpawnOffset.X,SpawnOffset.Y,SpawnOffset.Z,SpawnOffsetRotation,SpawnOffsetRotation.Pitch,SpawnOffsetRotation.Roll,SpawnOffsetRotation.Yaw,SpawnVelocity,SpawnVelocity.X,SpawnVelocity.Y,SpawnVelocity.Z,SpawnedCharacter,SpawnedEntity,Speed,SpeedMultiplier,SpreadConeAngle,Start,Steer,SteerInterpSpeed,SteerLimitDegree,SteerLimitSpeedFalloff,SteerPower,SteerPowerMultiplier,Stop,Strength,Suffix,SuspensionDamping,SuspensionLength,SuspensionOffset,SuspensionStiffness,Tag,TagFilter,TankSteerSpeedMultiplier,Target,TargetAngle,TargetAxis,TargetAxis.X,TargetAxis.Y,TargetAxis.Z,TargetPosition,Team,TeamCollisionChannel,TeamName,Text,TextId,TextIdOut,ThisDestination,Throttle,TicksToWait,Time,Title,To,To.X,To.Y,To.Z,Tolerance,TopSpeed,TouchCount,Transition,Typeface,Uptime,UserId,UserName,Value,VarRef,Vector,Vector.X,Vector.Y,Vector.Z,VolumeMultiplier,W,WaterDriveForce,WaterSteeringForce,Weapon,WeaponName,WeaponNameThatJustHit,WeaponSpeedMultiplier,WeaponThatJustHit,WheelFrictionMultiplier,X,Y,Yaw,Z,ZeroSecondsToWait,ZeroTicksToWait,Zone,ZoneEndDistance,ZoneRef,ZoneStartDistance,bActiveBot,bAlignToWedge,bAllowEngineSteerCorrect,bAllowNearbyInteraction,bAnglesArePercentages,bAutoRight,bBackVision,bCanBrake,bCanJump,bCanRespawn,bCanTargetBots,bCanTargetPlayers,bCaseSensitive,bCastShadows,bCollisionEnabled,bCollisionEnabled_Interaction,bCollisionEnabled_Physics,bCollisionEnabled_Player,bCollisionEnabled_Player1,bCollisionEnabled_Player2,bCollisionEnabled_Player3,bCollisionEnabled_Weapon,bCond,bDeleteBot,bDescending,bDetectBricks,bDetectEntities,bDetectMap,bDetectPhysics,bDetectPlayers,bDetectPlayers1,bDetectPlayers2,bDetectPlayers3,bDetectPlayers4,bDetectProjectiles,bDriveWhenNotAttachedToEngine,bEnable,bEnableManualControl,bEnableRepeat,bEnabled,bFlashIfUnchanged,bFlipShading,bForeground,bFound,bFrozen,bHasPermission,bHasRole,bHeld,bHiddenInteraction,bIgnoreOwningGrid,bInput,bInputA,bInputB,bIsBuildingZone,bIsEmpty,bIsLooseZone,bIsOccupied,bIsShareZone,bIsTrusted,bJustHit,bLimitAngle,bManualInput_Brake,bMatchBrickShape,bOccupied,bOutOfBounds,bOutput,bOverrideColor,bOverrideOutlineColor,bOverridePickupColors,bPermissionEnable,bPickupAnimationAxisLocal,bPickupAnimationEnabled,bPickupAutoDisableOnPickup,bPickupEnabled,bPickupRespawnOnMinigameReset,bPinPlayerToTeam,bPinned,bPositionsArePercentages,bPressedJump,bRelative,bRenderTranslucentWhenDisabled,bReversed,bRollCameraInThirdPerson,bRotatePlayerGravityOnSpawn,bSelectB,bSharpCorners,bSharpOutlines,bShowPickupEnabled,bSpatialization,bSpawnEnable,bSpawnLight,bSpreadBiasedTowardsCenter,bSteerEnabled,bStopped,bSuccess,bSuspensionEnabled,bSwap,bTankSteering,bTeamCollision,bTeamCollision1,bTeamCollision2,bTeamCollision3,bTeamWinsInstead,bTouching,bUseBrickColor,bVisibility,bVisionRaycasting,bWelded".split(","), na = /* @__PURE__ */ new Map([["Entity_DynamicBrickGrid", "BrickGridDynamicActor"], ["Entity_MicrochipDynamicBrickGrid", "BP_MicrochipBrickGridDynamicActor_C"]]), ra = new Map(Object.entries({
|
|
5331
|
+
})), ta = /* @__PURE__ */ "A,ActiveDamping,AdditionalIgnoredEntities,AggroRange,Agression,Alpha,Amount,Anchor,Anchor.X,Anchor.Y,AnchorX,AnchorY,Angle,AngularVelocity,AngularVelocity.X,AngularVelocity.Y,AngularVelocity.Z,Arguments,ArrayVarRef,Arrived,AttackDamageMultiplier,AttackMovementAmount,Attacker,AttackerWeapon,AttackerWeaponName,AudioDescriptor,Axis,Axis.X,Axis.Y,Axis.Z,B,Base,BeginTouchSound,Billboard,Blend,BotName,BotWeapon,BrickAsset,BrickGrid,Brightness,CenterOfSteering,Character,CharacterThatJustHit,Color,Color.A,Color.B,Color.G,Color.R,ColorA,ColorA.A,ColorA.B,ColorA.G,ColorA.R,ColorB,ColorB.A,ColorB.B,ColorB.G,ColorB.R,ConsoleTag,Control_DriveAndSteer,Controller,CorpseTimeout,Count,CurrentAngle,CurrentPosition,CustomMass,CustomMassVerticalOffset,Damage,DamageLimit,DamageMultiplier,Damping,DataIn1,DataIn2,DataIn3,DataIn4,DataIn5,DataIn6,DataIn7,DataIn8,DataOut1,DataOut2,DataOut3,DataOut4,DataOut5,DataOut6,DataOut7,DataOut8,Delimiter,DeltaTime,Destination,DestroyAll,Direction,Direction.X,Direction.Y,Direction.Z,DisplayName,Distance,DistanceToTarget,DriveAcceleratingPowerMultiplier,DriveBrakingPowerMultiplier,DriveDampingMultiplier,DriveInterpSpeed,DrivePower,DriveSpeed,Duration,EndTouchSound,Entity,EntityType,Exec,ExecA,ExecB,ExecDown,ExecIn,ExecOut,ExecOutA,ExecOutB,ExecOutDown,ExitOffset,ExitOffset.X,ExitOffset.Y,ExitOffset.Z,Expired,Exponent,Face,FireRate,FireSound,FocusAzimuth,FocusCharacter,Font,FontColor,FontColor.A,FontColor.B,FontColor.G,FontColor.R,Force,ForceLimit,FormatString,From,From.X,From.Y,From.Z,Function,G,GraffitiAngleLimit,GraffitiDepthLimit,GraffitiLayer,GunSkill,HealthMultiplier,Hex,Hit,HitDistance,HitEntity,HitLocation,HitNormal,IgnoreEntity,Index,IndexA,IndexB,InnerConeAngle,InnerRadius,Input,Input.A,Input.B,Input.G,Input.Pitch,Input.R,Input.Roll,Input.W,Input.X,Input.Y,Input.Yaw,Input.Z,InputA,InputA.W,InputA.X,InputA.Y,InputA.Z,InputB,InputB.W,InputB.X,InputB.Y,InputB.Z,InputC,InputD,InputE,InputF,InputForward,InputG,InputRight,Instigator,InteractSound,InterpMode,Item,ItemNameOverride,ItemScale,ItemType,JointDistance,Jumpyness,Kerning,Key,Killer,KillerWeapon,KillerWeaponName,Left,Length,Lifetime,Limit,LimitAngle,LineHeight,LineOffset,LinearVelocity,LinearVelocity.X,LinearVelocity.Y,LinearVelocity.Z,ManualInput_Drive,ManualInput_Steer,Mass,MassOffset,MassOffset.X,MassOffset.Y,MassOffset.Z,MassSize,MassSize.X,MassSize.Y,MassSize.Z,Material,MaterialAlpha,MaterialSlider,Max,MaxDistance,MaxForce,Message,Min,Miss,MoveTarget,MoveTarget.X,MoveTarget.Y,MoveTarget.Z,MovementAmount,MovementGoalDummy,MovementRandomness,Name,NonFocusAzimuth,NonFocusVolumeAttenuation,NumberOfShots,OccupantCount,Offset,Offset.X,Offset.Y,Offset.Z,OnChanged,OnFallingEdge,OnFired,OnRisingEdge,OnTime,Origin,Origin.X,Origin.Y,Origin.Z,OuterConeAngle,Outline,OutlineColor,OutlineColor.A,OutlineColor.B,OutlineColor.G,OutlineColor.R,OutlineSize,OutlineWidth,Output,OutputB,Pause,PickupAnimationAxis,PickupAnimationPhase,PickupBobHeight,PickupBobSpeed,PickupClass,PickupMeshColors,PickupMinigameResetRespawnDelay,PickupOffsetDirection,PickupOffsetDistance,PickupRespawnTime,PickupRotation,PickupRotation.Pitch,PickupRotation.Roll,PickupRotation.Yaw,PickupScale,PickupSpinSpeed,Pitch,PitchMultiplier,Play,Player,PositionX,PositionY,Power,Prefix,PressCount,PressSound,ProceduralSize,ProceduralSize.X,ProceduralSize.Y,ProceduralSize.Z,Projectile,ProjectileClass,ProjectileOverride,PromptCustomLabel,Query,R,RER_Input,RER_Output,Radius,ReactionTime,ReleaseSound,RepeatCount,RepeatDelay,RepeatTime,RepeatVariance,Replacement,RespawnTime,Restart,Resume,Right,Roll,Rotation,Rotation.Pitch,Rotation.Roll,Rotation.W,Rotation.X,Rotation.Y,Rotation.Yaw,Rotation.Z,RoundNumber,RunSpeed,Scalar,ScaleMultiplier,ScaleX,ScaleY,ScuffWidth,Search,SecondsToWait,Separator,Shading,ShadingWidth,SittingCharacter,Size,Skew,Skin,Skin.Parts,Slot,SmoothTime,Source,SourceRef,SpawnLocation,SpawnMargin,SpawnOffset,SpawnOffset.X,SpawnOffset.Y,SpawnOffset.Z,SpawnOffsetRotation,SpawnOffsetRotation.Pitch,SpawnOffsetRotation.Roll,SpawnOffsetRotation.Yaw,SpawnVelocity,SpawnVelocity.X,SpawnVelocity.Y,SpawnVelocity.Z,SpawnedCharacter,SpawnedEntity,Speed,SpeedMultiplier,SpreadConeAngle,Start,Steer,SteerInterpSpeed,SteerLimitDegree,SteerLimitSpeedFalloff,SteerPower,SteerPowerMultiplier,Stop,Strength,Suffix,SuspensionDamping,SuspensionLength,SuspensionOffset,SuspensionStiffness,Tag,TagFilter,TankSteerSpeedMultiplier,Target,TargetAngle,TargetAxis,TargetAxis.X,TargetAxis.Y,TargetAxis.Z,TargetPosition,Team,TeamCollisionChannel,TeamName,Text,TextId,TextIdOut,ThisDestination,Throttle,TicksToWait,Time,Title,To,To.X,To.Y,To.Z,Tolerance,TopSpeed,TouchCount,Transition,Typeface,Uptime,UserId,UserName,Value,VarRef,Vector,Vector.X,Vector.Y,Vector.Z,VolumeMultiplier,W,WaterDriveForce,WaterSteeringForce,Weapon,WeaponName,WeaponNameThatJustHit,WeaponSpeedMultiplier,WeaponThatJustHit,WheelFrictionMultiplier,X,Y,Yaw,Z,ZeroSecondsToWait,ZeroTicksToWait,Zone,ZoneEndDistance,ZoneRef,ZoneStartDistance,bActiveBot,bAlignToWedge,bAllowEngineSteerCorrect,bAllowNearbyInteraction,bAnglesArePercentages,bAutoRight,bBackVision,bCanBrake,bCanJump,bCanRespawn,bCanTargetBots,bCanTargetPlayers,bCaseSensitive,bCastShadows,bCollisionEnabled,bCollisionEnabled_Interaction,bCollisionEnabled_Physics,bCollisionEnabled_Player,bCollisionEnabled_Player1,bCollisionEnabled_Player2,bCollisionEnabled_Player3,bCollisionEnabled_Weapon,bCond,bDeleteBot,bDescending,bDetectBricks,bDetectEntities,bDetectMap,bDetectPhysics,bDetectPlayers,bDetectPlayers1,bDetectPlayers2,bDetectPlayers3,bDetectPlayers4,bDetectProjectiles,bDriveWhenNotAttachedToEngine,bEnable,bEnableManualControl,bEnableRepeat,bEnabled,bFlashIfUnchanged,bFlipShading,bForeground,bFound,bFrozen,bHasPermission,bHasRole,bHeld,bHiddenInteraction,bIgnoreOwningGrid,bInput,bInputA,bInputB,bIsBuildingZone,bIsEmpty,bIsLooseZone,bIsOccupied,bIsShareZone,bIsTrusted,bJustHit,bLimitAngle,bManualInput_Brake,bMatchBrickShape,bOccupied,bOutOfBounds,bOutput,bOverrideColor,bOverrideOutlineColor,bOverridePickupColors,bPermissionEnable,bPickupAnimationAxisLocal,bPickupAnimationEnabled,bPickupAutoDisableOnPickup,bPickupEnabled,bPickupRespawnOnMinigameReset,bPinPlayerToTeam,bPinned,bPositionsArePercentages,bPressedJump,bPulseOnChange,bPulseOnFallingEdge,bPulseOnRisingEdge,bRelative,bRenderTranslucentWhenDisabled,bReversed,bRollCameraInThirdPerson,bRotatePlayerGravityOnSpawn,bSelectB,bSharpCorners,bSharpOutlines,bShowPickupEnabled,bSpatialization,bSpawnEnable,bSpawnLight,bSpreadBiasedTowardsCenter,bSteerEnabled,bStopped,bSuccess,bSuspensionEnabled,bSwap,bTankSteering,bTeamCollision,bTeamCollision1,bTeamCollision2,bTeamCollision3,bTeamWinsInstead,bTouching,bUseBrickColor,bVisibility,bVisionRaycasting,bWelded".split(","), na = /* @__PURE__ */ new Map([["Entity_DynamicBrickGrid", "BrickGridDynamicActor"], ["Entity_MicrochipDynamicBrickGrid", "BP_MicrochipBrickGridDynamicActor_C"]]), ra = new Map(Object.entries({
|
|
5322
5332
|
BrickComponentType_Internal_CharacterZoneEvent_Entered: {
|
|
5323
5333
|
bricks: ["B_1x1_Gate_Internal_CharacterZoneEvent_Entered"],
|
|
5324
5334
|
inputs: [
|
|
@@ -6437,6 +6447,11 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
6437
6447
|
BrickComponentType_WireGraph_Expr_ChangeDetector: {
|
|
6438
6448
|
bricks: ["B_1x1_Gate_Expr_ChangeDetector"],
|
|
6439
6449
|
inputs: ["Input"],
|
|
6450
|
+
outputs: ["bPulseOnChange"]
|
|
6451
|
+
},
|
|
6452
|
+
BrickComponentType_WireGraph_Expr_ChangeDetectorExec: {
|
|
6453
|
+
bricks: ["B_1x1_Gate_Expr_ChangeDetectorExec"],
|
|
6454
|
+
inputs: ["Input"],
|
|
6440
6455
|
outputs: ["OnChanged"]
|
|
6441
6456
|
},
|
|
6442
6457
|
BrickComponentType_WireGraph_Expr_ColorBlend: {
|
|
@@ -6526,6 +6541,11 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
6526
6541
|
BrickComponentType_WireGraph_Expr_EdgeDetector: {
|
|
6527
6542
|
bricks: ["B_1x1_Gate_Expr_EdgeDetector"],
|
|
6528
6543
|
inputs: ["Input"],
|
|
6544
|
+
outputs: ["bPulseOnFallingEdge", "bPulseOnRisingEdge"]
|
|
6545
|
+
},
|
|
6546
|
+
BrickComponentType_WireGraph_Expr_EdgeDetectorExec: {
|
|
6547
|
+
bricks: ["B_1x1_Gate_Expr_EdgeDetectorExec"],
|
|
6548
|
+
inputs: ["Input"],
|
|
6529
6549
|
outputs: ["OnFallingEdge", "OnRisingEdge"]
|
|
6530
6550
|
},
|
|
6531
6551
|
BrickComponentType_WireGraph_Expr_Floor: {
|
|
@@ -9570,6 +9590,15 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
9570
9590
|
NAME: "BrickComponentType_WireGraph_Expr_ChangeDetector",
|
|
9571
9591
|
BRICK: "B_1x1_Gate_Expr_ChangeDetector",
|
|
9572
9592
|
BRICKS: ["B_1x1_Gate_Expr_ChangeDetector"],
|
|
9593
|
+
PORTS: {
|
|
9594
|
+
Input: "Input",
|
|
9595
|
+
bPulseOnChange: "bPulseOnChange"
|
|
9596
|
+
}
|
|
9597
|
+
},
|
|
9598
|
+
Expr_ChangeDetectorExec: {
|
|
9599
|
+
NAME: "BrickComponentType_WireGraph_Expr_ChangeDetectorExec",
|
|
9600
|
+
BRICK: "B_1x1_Gate_Expr_ChangeDetectorExec",
|
|
9601
|
+
BRICKS: ["B_1x1_Gate_Expr_ChangeDetectorExec"],
|
|
9573
9602
|
PORTS: {
|
|
9574
9603
|
Input: "Input",
|
|
9575
9604
|
OnChanged: "OnChanged"
|
|
@@ -9705,6 +9734,16 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
9705
9734
|
NAME: "BrickComponentType_WireGraph_Expr_EdgeDetector",
|
|
9706
9735
|
BRICK: "B_1x1_Gate_Expr_EdgeDetector",
|
|
9707
9736
|
BRICKS: ["B_1x1_Gate_Expr_EdgeDetector"],
|
|
9737
|
+
PORTS: {
|
|
9738
|
+
Input: "Input",
|
|
9739
|
+
bPulseOnFallingEdge: "bPulseOnFallingEdge",
|
|
9740
|
+
bPulseOnRisingEdge: "bPulseOnRisingEdge"
|
|
9741
|
+
}
|
|
9742
|
+
},
|
|
9743
|
+
Expr_EdgeDetectorExec: {
|
|
9744
|
+
NAME: "BrickComponentType_WireGraph_Expr_EdgeDetectorExec",
|
|
9745
|
+
BRICK: "B_1x1_Gate_Expr_EdgeDetectorExec",
|
|
9746
|
+
BRICKS: ["B_1x1_Gate_Expr_EdgeDetectorExec"],
|
|
9708
9747
|
PORTS: {
|
|
9709
9748
|
Input: "Input",
|
|
9710
9749
|
OnFallingEdge: "OnFallingEdge",
|
|
@@ -11722,7 +11761,7 @@ var $i = /* @__PURE__ */ new Map([
|
|
|
11722
11761
|
D: 4294967295
|
|
11723
11762
|
};
|
|
11724
11763
|
function oa(e) {
|
|
11725
|
-
let t =
|
|
11764
|
+
let t = $n(e), n = new DataView(t.buffer, t.byteOffset, 16);
|
|
11726
11765
|
return {
|
|
11727
11766
|
A: n.getUint32(0, !1),
|
|
11728
11767
|
B: n.getUint32(4, !1),
|
|
@@ -11732,7 +11771,7 @@ function oa(e) {
|
|
|
11732
11771
|
}
|
|
11733
11772
|
function sa(e) {
|
|
11734
11773
|
let t = /* @__PURE__ */ new Uint8Array(16), n = new DataView(t.buffer);
|
|
11735
|
-
return n.setUint32(0, e.A, !1), n.setUint32(4, e.B, !1), n.setUint32(8, e.C, !1), n.setUint32(12, e.D, !1),
|
|
11774
|
+
return n.setUint32(0, e.A, !1), n.setUint32(4, e.B, !1), n.setUint32(8, e.C, !1), n.setUint32(12, e.D, !1), Qn(Array.from(t));
|
|
11736
11775
|
}
|
|
11737
11776
|
//#endregion
|
|
11738
11777
|
//#region src/brdb/pending.ts
|
|
@@ -12687,7 +12726,11 @@ var Ba = {
|
|
|
12687
12726
|
bInputA: "bool",
|
|
12688
12727
|
bInputB: "bool"
|
|
12689
12728
|
},
|
|
12690
|
-
BrickComponentData_WireGraph_Expr_ChangeDetector: {
|
|
12729
|
+
BrickComponentData_WireGraph_Expr_ChangeDetector: {
|
|
12730
|
+
Input: "WireGraphVariant",
|
|
12731
|
+
bPulseOnChange: "bool"
|
|
12732
|
+
},
|
|
12733
|
+
BrickComponentData_WireGraph_Expr_ChangeDetectorExec: { Input: "WireGraphVariant" },
|
|
12691
12734
|
BrickComponentData_WireGraph_Expr_Compare: {
|
|
12692
12735
|
InputA: "WireGraphVariant",
|
|
12693
12736
|
InputB: "WireGraphVariant"
|
|
@@ -12697,7 +12740,12 @@ var Ba = {
|
|
|
12697
12740
|
Output: "WireGraphVariant",
|
|
12698
12741
|
TargetType: "WireGraphVariant"
|
|
12699
12742
|
},
|
|
12700
|
-
BrickComponentData_WireGraph_Expr_EdgeDetector: {
|
|
12743
|
+
BrickComponentData_WireGraph_Expr_EdgeDetector: {
|
|
12744
|
+
Input: "f64",
|
|
12745
|
+
bPulseOnRisingEdge: "bool",
|
|
12746
|
+
bPulseOnFallingEdge: "bool"
|
|
12747
|
+
},
|
|
12748
|
+
BrickComponentData_WireGraph_Expr_EdgeDetectorExec: { Input: "f64" },
|
|
12701
12749
|
BrickComponentData_WireGraph_Expr_Float_Float: { Input: "f64" },
|
|
12702
12750
|
BrickComponentData_WireGraph_Expr_Int_Int: { Input: "i64" },
|
|
12703
12751
|
BrickComponentData_WireGraph_Expr_IntInt_Int: {
|
|
@@ -14195,7 +14243,7 @@ var ro = class {
|
|
|
14195
14243
|
}
|
|
14196
14244
|
}, io = class {
|
|
14197
14245
|
constructor() {
|
|
14198
|
-
this.sizeCounters = [], this.sizes = [], this.typeIndices = [], this.ownerIndices = [], this.originalOwnerIndices = [], this.relPositions = [], this.orientations = [], this.colPlayer = new
|
|
14246
|
+
this.sizeCounters = [], this.sizes = [], this.typeIndices = [], this.ownerIndices = [], this.originalOwnerIndices = [], this.relPositions = [], this.orientations = [], this.colPlayer = new hi(), this.colPlayer1 = new hi(), this.colPlayer2 = new hi(), this.colPlayer3 = new hi(), this.colWeapon = new hi(), this.colInteraction = new hi(), this.colPhysics = new hi(), this.visibility = new hi(), this.materialIndices = [], this.colors = [], this.sizeIndexMap = /* @__PURE__ */ new Map(), this.numBrickSizes = 0, this.numBricks = 0;
|
|
14199
14247
|
}
|
|
14200
14248
|
addBrick(e, t, n, r) {
|
|
14201
14249
|
let i;
|
|
@@ -14300,7 +14348,11 @@ function so(e, t = {}) {
|
|
|
14300
14348
|
let n = no(e), r = (e.wires ?? []).filter((e) => "component_type" in e.source);
|
|
14301
14349
|
return co({
|
|
14302
14350
|
description: e.description,
|
|
14303
|
-
|
|
14351
|
+
author: e.author?.name ? {
|
|
14352
|
+
id: e.author.id,
|
|
14353
|
+
name: e.author.name
|
|
14354
|
+
} : void 0,
|
|
14355
|
+
prefabs: [],
|
|
14304
14356
|
ownerRows: oo(e.brick_owners),
|
|
14305
14357
|
grids: [n],
|
|
14306
14358
|
gridIds: [1],
|
|
@@ -14324,41 +14376,41 @@ function so(e, t = {}) {
|
|
|
14324
14376
|
}, t);
|
|
14325
14377
|
}
|
|
14326
14378
|
function co(e, t = {}) {
|
|
14327
|
-
let n = e.grids.flat(), r = new ro(), i = new ro(),
|
|
14328
|
-
for (let e of n) r.add(e.materialName), (e.procedural ?
|
|
14379
|
+
let n = e.grids.flat(), r = new ro(), i = new ro(), o = new ro();
|
|
14380
|
+
for (let e of n) r.add(e.materialName), (e.procedural ? o : i).add(e.assetName);
|
|
14329
14381
|
if (r.size > 256) throw Error(`brdb: too many distinct materials (${r.size}); MaterialIndices is u8 (max 256)`);
|
|
14330
|
-
let
|
|
14382
|
+
let s = {
|
|
14331
14383
|
materials: r,
|
|
14332
14384
|
basic: i,
|
|
14333
|
-
procedural:
|
|
14334
|
-
},
|
|
14385
|
+
procedural: o
|
|
14386
|
+
}, c = i.size, l = new ro(), u = [];
|
|
14335
14387
|
for (let e of n) for (let t of e.components) {
|
|
14336
|
-
let e =
|
|
14337
|
-
|
|
14388
|
+
let e = l.size;
|
|
14389
|
+
l.add(t.type) === e && u.push($i.get(t.type));
|
|
14338
14390
|
}
|
|
14339
|
-
let
|
|
14391
|
+
let d = new ro();
|
|
14340
14392
|
e.wires.forEach((t, n) => {
|
|
14341
14393
|
for (let [r, i] of [["source", t.source], ["target", t.target]]) {
|
|
14342
14394
|
let t = e.grids[i.gridSlot]?.length ?? 0;
|
|
14343
14395
|
if (!Number.isInteger(i.brickIndex) || i.brickIndex < 0 || i.brickIndex >= t) throw Error(`brdb: wires[${n}].${r}: brick_index ${i.brickIndex} out of range`);
|
|
14344
|
-
if (!
|
|
14345
|
-
|
|
14396
|
+
if (!l.has(i.componentType)) throw Error(`brdb: wires[${n}].${r}: component type '${i.componentType}' is not used by any brick`);
|
|
14397
|
+
d.add(i.port);
|
|
14346
14398
|
}
|
|
14347
14399
|
});
|
|
14348
|
-
let
|
|
14400
|
+
let f = new ro(), p = [];
|
|
14349
14401
|
for (let t of e.entities) {
|
|
14350
|
-
let e =
|
|
14351
|
-
|
|
14402
|
+
let e = f.size;
|
|
14403
|
+
f.add(t.type) === e && p.push(t.className);
|
|
14352
14404
|
}
|
|
14353
|
-
let
|
|
14354
|
-
if (
|
|
14405
|
+
let m = Ja.fromData(Ba.BRSavedComponentChunkSoA);
|
|
14406
|
+
if (l.size > 0) {
|
|
14355
14407
|
let e = [];
|
|
14356
|
-
for (let t of
|
|
14357
|
-
|
|
14408
|
+
for (let t of u) t !== "None" && !e.includes(t) && e.push(t);
|
|
14409
|
+
m.merge(Xa("BRSavedComponentChunkSoA_max").extractStructsTransitive(e));
|
|
14358
14410
|
}
|
|
14359
|
-
let
|
|
14360
|
-
for (let t of e.entities)
|
|
14361
|
-
let
|
|
14411
|
+
let h = e.ownerRows, g = h.map(() => 0), _ = h.map(() => 0), v = h.map(() => 0);
|
|
14412
|
+
for (let t of e.entities) v[t.ownerIndex] += 1;
|
|
14413
|
+
let y = e.grids.map((e) => {
|
|
14362
14414
|
let t = {
|
|
14363
14415
|
chunkOrder: [],
|
|
14364
14416
|
chunks: /* @__PURE__ */ new Map(),
|
|
@@ -14373,34 +14425,34 @@ function co(e, t = {}) {
|
|
|
14373
14425
|
index: e,
|
|
14374
14426
|
builder: new io()
|
|
14375
14427
|
}, t.chunks.set(i, a), t.chunkOrder.push(i));
|
|
14376
|
-
let
|
|
14377
|
-
if (a.builder.addBrick(n, r,
|
|
14428
|
+
let o = a.builder.numBricks;
|
|
14429
|
+
if (a.builder.addBrick(n, r, s, c), t.brickLocations.push({
|
|
14378
14430
|
key: i,
|
|
14379
14431
|
chunk: e,
|
|
14380
|
-
localIndex:
|
|
14381
|
-
}),
|
|
14382
|
-
|
|
14432
|
+
localIndex: o
|
|
14433
|
+
}), g[n.ownerIndex] += 1, n.components.length > 0) {
|
|
14434
|
+
_[n.ownerIndex] += n.components.length;
|
|
14383
14435
|
let e = t.componentChunks.get(i);
|
|
14384
14436
|
e || t.componentChunks.set(i, e = new ao());
|
|
14385
14437
|
for (let t of n.components) {
|
|
14386
|
-
let n =
|
|
14387
|
-
e.add(n,
|
|
14438
|
+
let n = l.indexOf(t.type);
|
|
14439
|
+
e.add(n, o, u[n], t.data ?? {});
|
|
14388
14440
|
}
|
|
14389
14441
|
}
|
|
14390
14442
|
}
|
|
14391
14443
|
return t;
|
|
14392
14444
|
});
|
|
14393
14445
|
for (let t of e.microchipLinks) {
|
|
14394
|
-
let e =
|
|
14446
|
+
let e = y[t.gridSlot], n = e?.brickLocations[t.brickIndex];
|
|
14395
14447
|
if (!n) throw Error(`brdb: microchip link brick index ${t.brickIndex} out of range`);
|
|
14396
14448
|
let r = e.componentChunks.get(n.key);
|
|
14397
14449
|
r || e.componentChunks.set(n.key, r = new ao()), r.addMicrochipLink(n.localIndex, t.gridReference);
|
|
14398
14450
|
}
|
|
14399
14451
|
for (let t of e.wires) {
|
|
14400
|
-
let n =
|
|
14452
|
+
let n = y[t.source.gridSlot].brickLocations[t.source.brickIndex], r = y[t.target.gridSlot], i = r.brickLocations[t.target.brickIndex], a = {
|
|
14401
14453
|
BrickIndexInChunk: i.localIndex,
|
|
14402
|
-
ComponentTypeIndex:
|
|
14403
|
-
PortIndex:
|
|
14454
|
+
ComponentTypeIndex: l.indexOf(t.target.componentType),
|
|
14455
|
+
PortIndex: d.indexOf(t.target.port)
|
|
14404
14456
|
}, o = r.wireChunks.get(i.key);
|
|
14405
14457
|
o || r.wireChunks.set(i.key, o = {
|
|
14406
14458
|
remoteSources: [],
|
|
@@ -14409,8 +14461,8 @@ function co(e, t = {}) {
|
|
|
14409
14461
|
localTargets: []
|
|
14410
14462
|
}), r.chunkWireCounts.set(i.key, (r.chunkWireCounts.get(i.key) ?? 0) + 1), t.source.gridSlot === t.target.gridSlot && n.key === i.key ? (o.localSources.push({
|
|
14411
14463
|
BrickIndexInChunk: n.localIndex,
|
|
14412
|
-
ComponentTypeIndex:
|
|
14413
|
-
PortIndex:
|
|
14464
|
+
ComponentTypeIndex: l.indexOf(t.source.componentType),
|
|
14465
|
+
PortIndex: d.indexOf(t.source.port)
|
|
14414
14466
|
}), o.localTargets.push(a)) : (o.remoteSources.push({
|
|
14415
14467
|
GridPersistentIndex: e.gridIds[t.source.gridSlot],
|
|
14416
14468
|
ChunkIndex: {
|
|
@@ -14419,54 +14471,54 @@ function co(e, t = {}) {
|
|
|
14419
14471
|
Z: n.chunk[2]
|
|
14420
14472
|
},
|
|
14421
14473
|
BrickIndexInChunk: n.localIndex,
|
|
14422
|
-
ComponentTypeIndex:
|
|
14423
|
-
PortIndex:
|
|
14474
|
+
ComponentTypeIndex: l.indexOf(t.source.componentType),
|
|
14475
|
+
PortIndex: d.indexOf(t.source.port)
|
|
14424
14476
|
}), o.remoteTargets.push(a));
|
|
14425
14477
|
}
|
|
14426
|
-
let
|
|
14427
|
-
EntityTypeNames:
|
|
14428
|
-
EntityDataClassNames:
|
|
14478
|
+
let b = Xa("BRSavedGlobalDataSoA"), x = Xa("BRSavedOwnerTableSoA"), S = Xa("BRSavedBrickChunkIndexSoA"), C = Xa("BRSavedBrickChunkSoA"), w = Xa("BRSavedWireChunkSoA"), T = Xa("BRSavedEntityChunkIndexSoA"), E = Xa("BRSavedEntityChunkSoA"), D = b.encode("BRSavedGlobalDataSoA", {
|
|
14479
|
+
EntityTypeNames: f.names,
|
|
14480
|
+
EntityDataClassNames: p,
|
|
14429
14481
|
BasicBrickAssetNames: i.names,
|
|
14430
|
-
ProceduralBrickAssetNames:
|
|
14482
|
+
ProceduralBrickAssetNames: o.names,
|
|
14431
14483
|
MaterialAssetNames: r.names,
|
|
14432
|
-
ComponentTypeNames:
|
|
14433
|
-
ComponentDataStructNames:
|
|
14434
|
-
ComponentWirePortNames:
|
|
14484
|
+
ComponentTypeNames: l.names,
|
|
14485
|
+
ComponentDataStructNames: u,
|
|
14486
|
+
ComponentWirePortNames: d.names,
|
|
14435
14487
|
ExternalAssetReferences: [],
|
|
14436
14488
|
GlobalGridEntityTypeIndex: -1
|
|
14437
|
-
}),
|
|
14438
|
-
UserIds:
|
|
14489
|
+
}), O = x.encode("BRSavedOwnerTableSoA", {
|
|
14490
|
+
UserIds: h.map((e) => ({
|
|
14439
14491
|
A: e.guid.A,
|
|
14440
14492
|
B: e.guid.B,
|
|
14441
14493
|
C: e.guid.C,
|
|
14442
14494
|
D: e.guid.D
|
|
14443
14495
|
})),
|
|
14444
|
-
UserNames:
|
|
14445
|
-
DisplayNames:
|
|
14446
|
-
EntityCounts:
|
|
14447
|
-
BrickCounts:
|
|
14448
|
-
ComponentCounts:
|
|
14449
|
-
WireCounts:
|
|
14450
|
-
}),
|
|
14451
|
-
NextPersistentIndex: 2 +
|
|
14452
|
-
Chunk3DIndices:
|
|
14496
|
+
UserNames: h.map((e) => e.name),
|
|
14497
|
+
DisplayNames: h.map((e) => e.display),
|
|
14498
|
+
EntityCounts: v,
|
|
14499
|
+
BrickCounts: g,
|
|
14500
|
+
ComponentCounts: _,
|
|
14501
|
+
WireCounts: h.map(() => 0)
|
|
14502
|
+
}), k = e.entities.length, A = T.encode("BRSavedEntityChunkIndexSoA", {
|
|
14503
|
+
NextPersistentIndex: 2 + k,
|
|
14504
|
+
Chunk3DIndices: k ? [{
|
|
14453
14505
|
X: 0,
|
|
14454
14506
|
Y: 0,
|
|
14455
14507
|
Z: 0
|
|
14456
14508
|
}] : [],
|
|
14457
|
-
NumEntities:
|
|
14458
|
-
}),
|
|
14459
|
-
if (
|
|
14460
|
-
let t = [], n = new
|
|
14509
|
+
NumEntities: k ? [k] : []
|
|
14510
|
+
}), j = null;
|
|
14511
|
+
if (k > 0) {
|
|
14512
|
+
let t = [], n = new hi(), r = new hi();
|
|
14461
14513
|
for (let i of e.entities) {
|
|
14462
|
-
let e =
|
|
14514
|
+
let e = f.indexOf(i.type), a = t[t.length - 1];
|
|
14463
14515
|
a && a.TypeIndex === e ? a.NumEntities += 1 : t.push({
|
|
14464
14516
|
TypeIndex: e,
|
|
14465
14517
|
NumEntities: 1
|
|
14466
14518
|
}), n.push(i.frozen), r.push(i.sleeping);
|
|
14467
14519
|
}
|
|
14468
14520
|
let i = new Ui();
|
|
14469
|
-
|
|
14521
|
+
E.writeValue(i, "BRSavedEntityChunkSoA", {
|
|
14470
14522
|
TypeCounters: t,
|
|
14471
14523
|
PersistentIndices: e.entities.map((e, t) => 2 + t),
|
|
14472
14524
|
OwnerIndices: e.entities.map((e) => e.ownerIndex),
|
|
@@ -14484,27 +14536,30 @@ function co(e, t = {}) {
|
|
|
14484
14536
|
bColorsAreLinear: !1
|
|
14485
14537
|
}), e.entities.forEach((e, t) => {
|
|
14486
14538
|
if (e.className !== "None") try {
|
|
14487
|
-
|
|
14539
|
+
E.writeValue(i, e.className, E.fillStruct(e.className, e.data));
|
|
14488
14540
|
} catch (n) {
|
|
14489
14541
|
throw Error(`brdb: entities[${t}] (${e.type}) data: ${n.message}`);
|
|
14490
14542
|
}
|
|
14491
|
-
}),
|
|
14543
|
+
}), j = i.toBytes();
|
|
14492
14544
|
}
|
|
14493
|
-
let
|
|
14545
|
+
let M = new TextEncoder(), ee = {
|
|
14494
14546
|
type: e.prefab ? "Prefab" : "World",
|
|
14495
|
-
iD:
|
|
14547
|
+
iD: a,
|
|
14496
14548
|
name: "",
|
|
14497
14549
|
version: "",
|
|
14498
14550
|
tags: [],
|
|
14499
|
-
authors: e.
|
|
14551
|
+
authors: e.author ? [{
|
|
14552
|
+
iD: e.author.id ?? "00000000-0000-0000-0000-000000000000",
|
|
14553
|
+
name: e.author.name
|
|
14554
|
+
}] : [],
|
|
14500
14555
|
createdAt: "0001.01.01-00.00.00",
|
|
14501
14556
|
updatedAt: "0001.01.01-00.00.00",
|
|
14502
14557
|
description: e.description ?? "A Generated World",
|
|
14503
14558
|
dependencies: [],
|
|
14504
14559
|
gameVersion: "CL0",
|
|
14505
14560
|
...t.bundle
|
|
14506
|
-
},
|
|
14507
|
-
let n = t ? 0 : Qa, r = [["ChunkIndex.mps", X(
|
|
14561
|
+
}, te = (e, t) => {
|
|
14562
|
+
let n = t ? 0 : Qa, r = [["ChunkIndex.mps", X(S.encode("BRSavedBrickChunkIndexSoA", {
|
|
14508
14563
|
Chunk3DIndices: e.chunkOrder.map((t) => {
|
|
14509
14564
|
let [n, r, i] = e.chunks.get(t).index;
|
|
14510
14565
|
return {
|
|
@@ -14523,9 +14578,9 @@ function co(e, t = {}) {
|
|
|
14523
14578
|
NumComponents: e.chunkOrder.map((t) => e.componentChunks.get(t)?.numComponents ?? 0),
|
|
14524
14579
|
NumWires: e.chunkOrder.map((t) => e.chunkWireCounts.get(t) ?? 0)
|
|
14525
14580
|
}))]];
|
|
14526
|
-
return e.chunkOrder.length > 0 && r.push(["Chunks", ca(e.chunkOrder.map((t) => [`${t}.mps`, X(
|
|
14581
|
+
return e.chunkOrder.length > 0 && r.push(["Chunks", ca(e.chunkOrder.map((t) => [`${t}.mps`, X(C.encode("BRSavedBrickChunkSoA", e.chunks.get(t).builder.toValue(c)))]))]), e.componentChunks.size > 0 && r.push(["Components", ca(e.chunkOrder.filter((t) => e.componentChunks.has(t)).map((t) => [`${t}.mps`, X(e.componentChunks.get(t).toBytes(m))]))]), e.wireChunks.size > 0 && r.push(["Wires", ca(e.chunkOrder.filter((t) => e.wireChunks.has(t)).map((t) => {
|
|
14527
14582
|
let n = e.wireChunks.get(t);
|
|
14528
|
-
return [`${t}.mps`, X(
|
|
14583
|
+
return [`${t}.mps`, X(w.encode("BRSavedWireChunkSoA", {
|
|
14529
14584
|
RemoteWireSources: n.remoteSources,
|
|
14530
14585
|
LocalWireSources: n.localSources,
|
|
14531
14586
|
RemoteWireTargets: n.remoteTargets,
|
|
@@ -14533,27 +14588,37 @@ function co(e, t = {}) {
|
|
|
14533
14588
|
PendingPropagationFlags: { Flags: [] }
|
|
14534
14589
|
}))];
|
|
14535
14590
|
}))]), r;
|
|
14536
|
-
},
|
|
14537
|
-
e.prefab ?
|
|
14538
|
-
let
|
|
14539
|
-
["ChunkIndex.schema", X(
|
|
14540
|
-
["ChunkIndex.mps", X(
|
|
14541
|
-
["ChunksShared.schema", X(
|
|
14591
|
+
}, ne = [["Bundle.json", X(M.encode(JSON.stringify(ee)))]];
|
|
14592
|
+
e.prefab ? (ne.push(["Prefab.json", X(M.encode(mo(e.prefab)))]), t.thumbnail && ne.push(["Thumbnail.png", X(t.thumbnail)])) : (t.thumbnail && ne.push(["Thumbnail.png", X(t.thumbnail)]), ne.push(["World.json", X(M.encode(JSON.stringify({ environment: t.environment ?? "Plate" })))]));
|
|
14593
|
+
let N = [
|
|
14594
|
+
["ChunkIndex.schema", X(T.toBinary())],
|
|
14595
|
+
["ChunkIndex.mps", X(A)],
|
|
14596
|
+
["ChunksShared.schema", X(E.toBinary())]
|
|
14542
14597
|
];
|
|
14543
|
-
|
|
14544
|
-
|
|
14545
|
-
["GlobalData.
|
|
14546
|
-
["
|
|
14547
|
-
["Owners.
|
|
14598
|
+
j && N.push(["Chunks", ca([["0_0_0.mps", X(j)]])]);
|
|
14599
|
+
let re = [["Meta", ca(ne)], ["World", ca([["0", ca([
|
|
14600
|
+
["GlobalData.schema", X(b.toBinary())],
|
|
14601
|
+
["GlobalData.mps", X(D)],
|
|
14602
|
+
["Owners.schema", X(x.toBinary())],
|
|
14603
|
+
["Owners.mps", X(O)],
|
|
14548
14604
|
["Bricks", ca([
|
|
14549
|
-
["ChunkIndexShared.schema", X(
|
|
14550
|
-
["ChunksShared.schema", X(
|
|
14551
|
-
["WiresShared.schema", X(
|
|
14552
|
-
["ComponentsShared.schema", X(
|
|
14553
|
-
["Grids", ca(
|
|
14605
|
+
["ChunkIndexShared.schema", X(S.toBinary())],
|
|
14606
|
+
["ChunksShared.schema", X(C.toBinary())],
|
|
14607
|
+
["WiresShared.schema", X(w.toBinary())],
|
|
14608
|
+
["ComponentsShared.schema", X(m.toBinary())],
|
|
14609
|
+
["Grids", ca(y.map((t, n) => [String(e.gridIds[n]), ca(te(t, e.gridIds[n] === 1))]))]
|
|
14554
14610
|
])],
|
|
14555
|
-
["Entities", ca(
|
|
14611
|
+
["Entities", ca(N)]
|
|
14556
14612
|
])]])]];
|
|
14613
|
+
if (e.prefabs.length > 0) for (let [t, n] of e.prefabs) {
|
|
14614
|
+
let e = t.split("/"), r = re;
|
|
14615
|
+
for (let t = 0; t < e.length - 1; t++) {
|
|
14616
|
+
let n = r.find(([n, r]) => n === e[t] && r.type === "folder");
|
|
14617
|
+
n || (n = [e[t], ca([])], r.push(n)), r = n[1].children;
|
|
14618
|
+
}
|
|
14619
|
+
r.push([e[e.length - 1], X(n)]);
|
|
14620
|
+
}
|
|
14621
|
+
return re;
|
|
14557
14622
|
}
|
|
14558
14623
|
function lo(e, t, n) {
|
|
14559
14624
|
let r = e.type ?? "Entity_DynamicBrickGrid", i = na.get(r);
|
|
@@ -14599,7 +14664,22 @@ function lo(e, t, n) {
|
|
|
14599
14664
|
data: e.data ?? {}
|
|
14600
14665
|
};
|
|
14601
14666
|
}
|
|
14602
|
-
|
|
14667
|
+
var uo = "@@f64:", fo = class {
|
|
14668
|
+
constructor(e) {
|
|
14669
|
+
this.value = e;
|
|
14670
|
+
}
|
|
14671
|
+
toJSON() {
|
|
14672
|
+
return `${uo}${this.value}`;
|
|
14673
|
+
}
|
|
14674
|
+
}, po = (e, t, n) => ({
|
|
14675
|
+
x: new fo(e),
|
|
14676
|
+
y: new fo(t),
|
|
14677
|
+
z: new fo(n)
|
|
14678
|
+
});
|
|
14679
|
+
function mo(e) {
|
|
14680
|
+
return JSON.stringify(e).replace(RegExp(`"${uo}(-?[\\d.eE+-]+)"`, "g"), (e, t) => Number.isInteger(Number(t)) ? `${t}.0` : t);
|
|
14681
|
+
}
|
|
14682
|
+
function ho(e, t) {
|
|
14603
14683
|
let n = [
|
|
14604
14684
|
0,
|
|
14605
14685
|
0,
|
|
@@ -14625,16 +14705,8 @@ function uo(e, t) {
|
|
|
14625
14705
|
}
|
|
14626
14706
|
});
|
|
14627
14707
|
let i = {
|
|
14628
|
-
center:
|
|
14629
|
-
|
|
14630
|
-
y: (n[1] + r[1]) / 2,
|
|
14631
|
-
z: (n[2] + r[2]) / 2
|
|
14632
|
-
},
|
|
14633
|
-
halfExtent: {
|
|
14634
|
-
x: (r[0] - n[0]) / 2,
|
|
14635
|
-
y: (r[1] - n[1]) / 2,
|
|
14636
|
-
z: (r[2] - n[2]) / 2
|
|
14637
|
-
}
|
|
14708
|
+
center: po((n[0] + r[0]) / 2, (n[1] + r[1]) / 2, (n[2] + r[2]) / 2),
|
|
14709
|
+
halfExtent: po((r[0] - n[0]) / 2, (r[1] - n[1]) / 2, (r[2] - n[2]) / 2)
|
|
14638
14710
|
};
|
|
14639
14711
|
return {
|
|
14640
14712
|
pivots: {
|
|
@@ -14658,9 +14730,9 @@ function uo(e, t) {
|
|
|
14658
14730
|
bIsMicrochipPrefab: t.isMicrochipPrefab ?? !1
|
|
14659
14731
|
};
|
|
14660
14732
|
}
|
|
14661
|
-
var
|
|
14733
|
+
var go = class {
|
|
14662
14734
|
constructor() {
|
|
14663
|
-
this.gridBrickInputs = [[]], this.gridEntityOrders = [], this.entityInputs = [], this.wireList = [], this.chipLinks = [], this.ownerList = [], this.prefabOptions = null;
|
|
14735
|
+
this.gridBrickInputs = [[]], this.gridEntityOrders = [], this.entityInputs = [], this.wireList = [], this.chipLinks = [], this.ownerList = [], this.prefabOptions = null, this.prefabList = [];
|
|
14664
14736
|
}
|
|
14665
14737
|
addOwner(e) {
|
|
14666
14738
|
return this.ownerList.push(e), this.ownerList.length;
|
|
@@ -14737,6 +14809,10 @@ var fo = class {
|
|
|
14737
14809
|
makePrefab(e = {}) {
|
|
14738
14810
|
this.prefabOptions = e;
|
|
14739
14811
|
}
|
|
14812
|
+
addPrefab(e) {
|
|
14813
|
+
let t = `Prefabs/Uploads/${$r(pi(e)).toUpperCase()}.brz`;
|
|
14814
|
+
return this.prefabList.some(([e]) => e === t) || this.prefabList.push([t, e]), t;
|
|
14815
|
+
}
|
|
14740
14816
|
toPendingFs(e = {}) {
|
|
14741
14817
|
let t = new ro(), n = new ro();
|
|
14742
14818
|
for (let e of this.gridBrickInputs) for (let r of e) t.add(r.asset ?? "PB_DefaultBrick"), n.add(r.material ?? "BMC_Plastic");
|
|
@@ -14785,35 +14861,36 @@ var fo = class {
|
|
|
14785
14861
|
brickIndex: e.brick.index,
|
|
14786
14862
|
gridReference: 2 + e.grid.entityOrder
|
|
14787
14863
|
})),
|
|
14788
|
-
prefab: this.prefabOptions ?
|
|
14864
|
+
prefab: this.prefabOptions ? ho(r[0], this.prefabOptions) : null,
|
|
14865
|
+
prefabs: this.prefabList
|
|
14789
14866
|
}, e);
|
|
14790
14867
|
}
|
|
14791
14868
|
toBrz(e = {}) {
|
|
14792
14869
|
return Gi(this.toPendingFs(e), { compress: e.compress });
|
|
14793
14870
|
}
|
|
14794
14871
|
};
|
|
14795
|
-
function
|
|
14872
|
+
function _o(e, t = {}) {
|
|
14796
14873
|
let n = { compress: t.compress };
|
|
14797
14874
|
return Gi(so(e, t), n);
|
|
14798
14875
|
}
|
|
14799
|
-
function
|
|
14876
|
+
function vo(e) {
|
|
14800
14877
|
let t = e <= 15 ? 15 : 255;
|
|
14801
14878
|
return Math.trunc((e / 255) ** (1 / 2.2) * t);
|
|
14802
14879
|
}
|
|
14803
|
-
function
|
|
14880
|
+
function yo(e) {
|
|
14804
14881
|
return {
|
|
14805
14882
|
...e,
|
|
14806
|
-
R:
|
|
14807
|
-
G:
|
|
14808
|
-
B:
|
|
14883
|
+
R: vo(e.R),
|
|
14884
|
+
G: vo(e.G),
|
|
14885
|
+
B: vo(e.B)
|
|
14809
14886
|
};
|
|
14810
14887
|
}
|
|
14811
|
-
function
|
|
14888
|
+
function bo(e) {
|
|
14812
14889
|
let t = {};
|
|
14813
|
-
for (let [n, r] of Object.entries(e)) t[n] =
|
|
14890
|
+
for (let [n, r] of Object.entries(e)) t[n] = yo(r);
|
|
14814
14891
|
return t;
|
|
14815
14892
|
}
|
|
14816
|
-
function
|
|
14893
|
+
function xo(e, t, n) {
|
|
14817
14894
|
let r = 0;
|
|
14818
14895
|
for (let t of e.BrickSizeCounters) r += t.NumSizes;
|
|
14819
14896
|
if (r < 0 || r > e.BrickSizes.length) throw Error("brdb: brick size counters exceed size table");
|
|
@@ -14836,7 +14913,7 @@ function _o(e, t, n) {
|
|
|
14836
14913
|
r.Z
|
|
14837
14914
|
];
|
|
14838
14915
|
}
|
|
14839
|
-
let d = e.RelativePositions[r], f = e.Orientations[r], p = e.ColorsAndAlphas[r], m = o ?
|
|
14916
|
+
let d = e.RelativePositions[r], f = e.Orientations[r], p = e.ColorsAndAlphas[r], m = o ? yo(p) : p;
|
|
14840
14917
|
s.push({
|
|
14841
14918
|
asset_name_index: l,
|
|
14842
14919
|
size: u,
|
|
@@ -14848,13 +14925,13 @@ function _o(e, t, n) {
|
|
|
14848
14925
|
direction: f >> 2 & 7,
|
|
14849
14926
|
rotation: f & 3,
|
|
14850
14927
|
collision: {
|
|
14851
|
-
player:
|
|
14852
|
-
weapon:
|
|
14853
|
-
interaction:
|
|
14928
|
+
player: mi(e.CollisionFlags_Player, r),
|
|
14929
|
+
weapon: mi(e.CollisionFlags_Weapon, r),
|
|
14930
|
+
interaction: mi(e.CollisionFlags_Interaction, r),
|
|
14854
14931
|
tool: !0,
|
|
14855
|
-
physics:
|
|
14932
|
+
physics: mi(e.CollisionFlags_Physics, r)
|
|
14856
14933
|
},
|
|
14857
|
-
visibility:
|
|
14934
|
+
visibility: mi(e.VisibilityFlags, r),
|
|
14858
14935
|
material_index: e.MaterialIndices[r],
|
|
14859
14936
|
material_intensity: m.A,
|
|
14860
14937
|
color: [
|
|
@@ -14867,7 +14944,7 @@ function _o(e, t, n) {
|
|
|
14867
14944
|
}
|
|
14868
14945
|
return s;
|
|
14869
14946
|
}
|
|
14870
|
-
var
|
|
14947
|
+
var So = class e {
|
|
14871
14948
|
constructor(e, t = 0) {
|
|
14872
14949
|
this.fs = e, this.worldId = t, this.schemas = /* @__PURE__ */ new Map(), this.values = /* @__PURE__ */ new Map();
|
|
14873
14950
|
}
|
|
@@ -14905,6 +14982,25 @@ var vo = class e {
|
|
|
14905
14982
|
environment() {
|
|
14906
14983
|
return this.cached("Meta/World.json", () => JSON.parse(new TextDecoder().decode(this.fs.readFile("Meta/World.json"))));
|
|
14907
14984
|
}
|
|
14985
|
+
prefabJson() {
|
|
14986
|
+
return this.cached("Meta/Prefab.json", () => this.fs.findFileByPath("Meta/Prefab.json") ? JSON.parse(new TextDecoder().decode(this.fs.readFile("Meta/Prefab.json"))) : null);
|
|
14987
|
+
}
|
|
14988
|
+
thumbnail() {
|
|
14989
|
+
return this.fs.findFileByPath("Meta/Thumbnail.png") ? this.fs.readFile("Meta/Thumbnail.png") : null;
|
|
14990
|
+
}
|
|
14991
|
+
prefabPaths() {
|
|
14992
|
+
let e = [], t = (n) => {
|
|
14993
|
+
for (let t of this.fs.childFiles(n)) e.push(`${n}/${t}`);
|
|
14994
|
+
for (let e of this.fs.childFolders(n)) t(`${n}/${e}`);
|
|
14995
|
+
};
|
|
14996
|
+
return this.fs.childFolders("").includes("Prefabs") && t("Prefabs"), e;
|
|
14997
|
+
}
|
|
14998
|
+
readPrefab(e) {
|
|
14999
|
+
return this.fs.readFile(e);
|
|
15000
|
+
}
|
|
15001
|
+
prefabReader(t) {
|
|
15002
|
+
return e.from(this.readPrefab(t));
|
|
15003
|
+
}
|
|
14908
15004
|
globalData() {
|
|
14909
15005
|
return this.cached(this.path("GlobalData.mps"), () => this.decode(this.path("GlobalData.mps"), this.path("GlobalData.schema"), "BRSavedGlobalDataSoA"));
|
|
14910
15006
|
}
|
|
@@ -14962,7 +15058,7 @@ var vo = class e {
|
|
|
14962
15058
|
}
|
|
14963
15059
|
*bricks(e = 1) {
|
|
14964
15060
|
let t = this.globalData().BasicBrickAssetNames.length;
|
|
14965
|
-
for (let n of this.brickChunkIndex(e)) yield*
|
|
15061
|
+
for (let n of this.brickChunkIndex(e)) yield* xo(this.brickChunkSoa(e, n.index), n.index, t);
|
|
14966
15062
|
}
|
|
14967
15063
|
entityChunkIndex() {
|
|
14968
15064
|
let e = this.decode(this.path("Entities/ChunkIndex.mps"), this.path("Entities/ChunkIndex.schema"), "BRSavedEntityChunkIndexSoA");
|
|
@@ -15044,11 +15140,11 @@ var vo = class e {
|
|
|
15044
15140
|
originalOwnerIndex: s.OriginalOwnerIndices?.[f] ?? s.OwnerIndices[f],
|
|
15045
15141
|
location: s.Locations[f],
|
|
15046
15142
|
rotation: s.Rotations[f],
|
|
15047
|
-
frozen:
|
|
15048
|
-
sleeping:
|
|
15143
|
+
frozen: mi(s.PhysicsLockedFlags, f),
|
|
15144
|
+
sleeping: mi(s.PhysicsSleepingFlags, f),
|
|
15049
15145
|
linearVelocity: s.LinearVelocities[f],
|
|
15050
15146
|
angularVelocity: s.AngularVelocities[f],
|
|
15051
|
-
colors: u ?
|
|
15147
|
+
colors: u ? bo(e) : e,
|
|
15052
15148
|
remainingLifeSpan: s.RemainingLifeSpans?.[f] ?? 0,
|
|
15053
15149
|
data: r ? i.readValue(o, r) : null
|
|
15054
15150
|
}), f += 1;
|
|
@@ -15060,74 +15156,74 @@ var vo = class e {
|
|
|
15060
15156
|
*entities() {
|
|
15061
15157
|
for (let e of this.entityChunkIndex().chunks) yield* this.entityChunk(e.index);
|
|
15062
15158
|
}
|
|
15063
|
-
},
|
|
15159
|
+
}, Co, $ = "\n ", wo = "\n ", To = `CREATE TABLE blobs (${$}blob_id INTEGER PRIMARY KEY,${$}compression INTEGER,${$}size_uncompressed INTEGER,${$}size_compressed INTEGER,${$}delta_base_id INTEGER REFERENCES blobs(blob_id),${$}hash BLOB,${$}content BLOB${wo});\nCREATE TABLE revisions (${$}revision_id INTEGER PRIMARY KEY,${$}description TEXT,${$}created_at INTEGER${wo});\nCREATE TABLE folders (${$}folder_id INTEGER PRIMARY KEY,${$}parent_id INTEGER REFERENCES folders(folder_id),${$}name TEXT,${$}created_at INTEGER,${$}deleted_at INTEGER${wo});\nCREATE TABLE files (${$}file_id INTEGER PRIMARY KEY,${$}parent_id INTEGER REFERENCES folders(folder_id),${$}name TEXT,${$}content_id INTEGER REFERENCES blobs(blob_id),${$}created_at INTEGER,${$}deleted_at INTEGER${wo});\nCREATE INDEX blobs_size_hash ON blobs(size_uncompressed, hash);
|
|
15064
15160
|
CREATE INDEX folders_parent_name_deleted ON folders(parent_id, name, deleted_at);
|
|
15065
|
-
CREATE INDEX files_parent_name_deleted ON files(parent_id, name, deleted_at);`,
|
|
15161
|
+
CREATE INDEX files_parent_name_deleted ON files(parent_id, name, deleted_at);`, Eo = [
|
|
15066
15162
|
"blobs",
|
|
15067
15163
|
"revisions",
|
|
15068
15164
|
"folders",
|
|
15069
15165
|
"files"
|
|
15070
|
-
],
|
|
15166
|
+
], Do = () => Math.floor(Date.now() / 1e3), Oo = (e) => typeof Buffer > "u" ? e : Buffer.from(e.buffer, e.byteOffset, e.byteLength), ko = (e) => {
|
|
15071
15167
|
try {
|
|
15072
15168
|
return typeof process < "u" ? process?.getBuiltinModule?.(e) ?? null : null;
|
|
15073
15169
|
} catch {
|
|
15074
15170
|
return null;
|
|
15075
15171
|
}
|
|
15076
|
-
},
|
|
15077
|
-
async function
|
|
15172
|
+
}, Ao = null, jo = (e) => (Ao ?? (Ao = Function("specifier", "return import(specifier)")), Ao(e));
|
|
15173
|
+
async function Mo() {
|
|
15078
15174
|
try {
|
|
15079
|
-
let e = await (
|
|
15175
|
+
let e = await (Po.engineLoader ?? (() => jo("better-sqlite3")))();
|
|
15080
15176
|
return e.default ?? e;
|
|
15081
15177
|
} catch {
|
|
15082
15178
|
throw Error("brdb: the Brdb openers require better-sqlite3 (npm install better-sqlite3), or wrap your own handle with new Brdb(db)");
|
|
15083
15179
|
}
|
|
15084
15180
|
}
|
|
15085
|
-
function
|
|
15086
|
-
let e =
|
|
15181
|
+
function No() {
|
|
15182
|
+
let e = ko("node:zlib");
|
|
15087
15183
|
if (typeof e?.zstdCompressSync != "function") return null;
|
|
15088
15184
|
let t = e.constants.ZSTD_c_compressionLevel;
|
|
15089
15185
|
return (n) => new Uint8Array(e.zstdCompressSync(n, { params: { [t]: 14 } }));
|
|
15090
15186
|
}
|
|
15091
|
-
var
|
|
15187
|
+
var Po = class e {
|
|
15092
15188
|
constructor(e) {
|
|
15093
15189
|
this.db = e, this.defaultCompress = null;
|
|
15094
|
-
for (let e of
|
|
15190
|
+
for (let e of Eo) if (!this.db.prepare("SELECT name FROM sqlite_schema WHERE type = 'table' AND name = ?").get(e)) throw Error(`brdb: missing required table '${e}'`);
|
|
15095
15191
|
}
|
|
15096
|
-
static init(t, n =
|
|
15097
|
-
t.exec(
|
|
15192
|
+
static init(t, n = Do()) {
|
|
15193
|
+
t.exec(To);
|
|
15098
15194
|
let r = new e(t);
|
|
15099
15195
|
return r.createRevision("Initial Revision", n), r;
|
|
15100
15196
|
}
|
|
15101
15197
|
static async wrap(t, n) {
|
|
15102
15198
|
try {
|
|
15103
15199
|
let r = n ? e.init(t) : new e(t);
|
|
15104
|
-
return r.defaultCompress =
|
|
15200
|
+
return r.defaultCompress = No(), r;
|
|
15105
15201
|
} catch (e) {
|
|
15106
15202
|
throw t.close(), e;
|
|
15107
15203
|
}
|
|
15108
15204
|
}
|
|
15109
15205
|
static async open(t) {
|
|
15110
|
-
return e.wrap(new (await (
|
|
15206
|
+
return e.wrap(new (await (Mo()))(t, { fileMustExist: !0 }), !1);
|
|
15111
15207
|
}
|
|
15112
15208
|
static async openReadonly(t) {
|
|
15113
|
-
return e.wrap(new (await (
|
|
15209
|
+
return e.wrap(new (await (Mo()))(t, {
|
|
15114
15210
|
readonly: !0,
|
|
15115
15211
|
fileMustExist: !0
|
|
15116
15212
|
}), !1);
|
|
15117
15213
|
}
|
|
15118
15214
|
static async create(t) {
|
|
15119
|
-
return e.wrap(new (await (
|
|
15215
|
+
return e.wrap(new (await (Mo()))(t), !0);
|
|
15120
15216
|
}
|
|
15121
15217
|
static async openOrCreate(t) {
|
|
15122
|
-
let n =
|
|
15218
|
+
let n = ko("node:fs");
|
|
15123
15219
|
if (!n) throw Error("brdb: openOrCreate requires node 22.3 or newer; call open or create explicitly");
|
|
15124
15220
|
return n.existsSync(t) ? e.open(t) : e.create(t);
|
|
15125
15221
|
}
|
|
15126
15222
|
static async memory() {
|
|
15127
|
-
return e.wrap(new (await (
|
|
15223
|
+
return e.wrap(new (await (Mo()))(":memory:"), !0);
|
|
15128
15224
|
}
|
|
15129
15225
|
static async fromBytes(t) {
|
|
15130
|
-
return e.wrap(new (await (
|
|
15226
|
+
return e.wrap(new (await (Mo()))(Buffer.from(t)), !1);
|
|
15131
15227
|
}
|
|
15132
15228
|
toBytes() {
|
|
15133
15229
|
let e = this.db.serialize;
|
|
@@ -15135,15 +15231,15 @@ var Ao = class e {
|
|
|
15135
15231
|
return new Uint8Array(e.call(this.db));
|
|
15136
15232
|
}
|
|
15137
15233
|
save(e, t, n = {}) {
|
|
15138
|
-
this.writePending(e, t instanceof
|
|
15234
|
+
this.writePending(e, t instanceof go ? t.toPendingFs(n) : so(t, n), n);
|
|
15139
15235
|
}
|
|
15140
15236
|
worldReader() {
|
|
15141
|
-
return new
|
|
15237
|
+
return new So(this);
|
|
15142
15238
|
}
|
|
15143
15239
|
sqliteSchema() {
|
|
15144
15240
|
return this.db.prepare("SELECT sql FROM sqlite_schema").all().map((e) => e.sql).join("\n");
|
|
15145
15241
|
}
|
|
15146
|
-
createRevision(e, t =
|
|
15242
|
+
createRevision(e, t = Do()) {
|
|
15147
15243
|
return Number(this.db.prepare("INSERT INTO revisions (description, created_at) VALUES (?, ?);").run(e, t).lastInsertRowid);
|
|
15148
15244
|
}
|
|
15149
15245
|
revisions() {
|
|
@@ -15163,16 +15259,16 @@ var Ao = class e {
|
|
|
15163
15259
|
let r = this.findBlobByHash(e.length, t);
|
|
15164
15260
|
if (r) return r.blobId;
|
|
15165
15261
|
let i = e.length, a = i, o = 0, s = e, c = n ? n(e) : null;
|
|
15166
|
-
return c && c.length < i && (a = c.length, o = 1, s = c), Number(this.db.prepare("INSERT INTO blobs (compression, size_uncompressed, size_compressed, delta_base_id, hash, content) VALUES (?, ?, ?, ?, ?, ?);").run(o, i, a, null,
|
|
15262
|
+
return c && c.length < i && (a = c.length, o = 1, s = c), Number(this.db.prepare("INSERT INTO blobs (compression, size_uncompressed, size_compressed, delta_base_id, hash, content) VALUES (?, ?, ?, ?, ?, ?);").run(o, i, a, null, Oo(t), Oo(s)).lastInsertRowid);
|
|
15167
15263
|
}
|
|
15168
15264
|
findBlobByHash(e, t) {
|
|
15169
|
-
let n = this.db.prepare("SELECT blob_id, compression, size_uncompressed, size_compressed, delta_base_id, hash, content FROM blobs WHERE hash = ? AND size_uncompressed = ? LIMIT 1;").get(
|
|
15170
|
-
return n ?
|
|
15265
|
+
let n = this.db.prepare("SELECT blob_id, compression, size_uncompressed, size_compressed, delta_base_id, hash, content FROM blobs WHERE hash = ? AND size_uncompressed = ? LIMIT 1;").get(Oo(t), e);
|
|
15266
|
+
return n ? Fo(n) : null;
|
|
15171
15267
|
}
|
|
15172
15268
|
findBlob(e) {
|
|
15173
15269
|
let t = this.db.prepare("SELECT blob_id, compression, size_uncompressed, size_compressed, delta_base_id, hash, content FROM blobs WHERE blob_id = ?;").get(e);
|
|
15174
15270
|
if (!t) throw Error(`brdb: blob ${e} not found`);
|
|
15175
|
-
return
|
|
15271
|
+
return Fo(t);
|
|
15176
15272
|
}
|
|
15177
15273
|
deleteFile(e, t) {
|
|
15178
15274
|
this.db.prepare("UPDATE files SET deleted_at = ? WHERE file_id = ?;").run(t, e);
|
|
@@ -15199,7 +15295,7 @@ var Ao = class e {
|
|
|
15199
15295
|
}
|
|
15200
15296
|
findFile(e, t) {
|
|
15201
15297
|
let n = this.db.prepare(`SELECT content_id, created_at FROM files WHERE parent_id ${e === null ? "IS NULL" : "= ?"} AND name = ? AND deleted_at IS NULL;`).get(...e === null ? [t] : [e, t]);
|
|
15202
|
-
return n ?
|
|
15298
|
+
return n ? Io(n) : null;
|
|
15203
15299
|
}
|
|
15204
15300
|
findFileAtRevision(e, t, n) {
|
|
15205
15301
|
let r = this.db.prepare(`SELECT content_id, created_at FROM files WHERE parent_id ${e === null ? "IS NULL" : "= ?"} AND name = ? AND created_at <= ? AND (deleted_at IS NULL OR deleted_at > ?) ORDER BY created_at ASC LIMIT 1;`).get(...e === null ? [
|
|
@@ -15212,13 +15308,13 @@ var Ao = class e {
|
|
|
15212
15308
|
n,
|
|
15213
15309
|
n
|
|
15214
15310
|
]);
|
|
15215
|
-
return r ?
|
|
15311
|
+
return r ? Io(r) : null;
|
|
15216
15312
|
}
|
|
15217
15313
|
close() {
|
|
15218
15314
|
this.db.close();
|
|
15219
15315
|
}
|
|
15220
15316
|
writePending(e, t, n = {}) {
|
|
15221
|
-
let r = n.createdAt ??
|
|
15317
|
+
let r = n.createdAt ?? Do(), i = n.compress === void 0 ? this.defaultCompress : n.compress;
|
|
15222
15318
|
this.db.exec("BEGIN");
|
|
15223
15319
|
try {
|
|
15224
15320
|
this.createRevision(e, r), this.mergeFolder(null, t, r, i), this.db.exec("COMMIT");
|
|
@@ -15259,7 +15355,7 @@ var Ao = class e {
|
|
|
15259
15355
|
this.insertPending(s, e, c, n, r);
|
|
15260
15356
|
continue;
|
|
15261
15357
|
}
|
|
15262
|
-
let o =
|
|
15358
|
+
let o = pi(c.content), l = this.findBlobByHash(c.content.length, o);
|
|
15263
15359
|
if (l && t.contentId === l.blobId) continue;
|
|
15264
15360
|
this.deleteFile(t.fileId, n);
|
|
15265
15361
|
let u = this.insertBlob(c.content, o, r);
|
|
@@ -15277,7 +15373,7 @@ var Ao = class e {
|
|
|
15277
15373
|
o.add(e), this.insertPending(e, a, t, r, i);
|
|
15278
15374
|
}
|
|
15279
15375
|
} else {
|
|
15280
|
-
let a = this.insertBlob(n.content,
|
|
15376
|
+
let a = this.insertBlob(n.content, pi(n.content), i);
|
|
15281
15377
|
this.insertFile(e, t, a, r);
|
|
15282
15378
|
}
|
|
15283
15379
|
}
|
|
@@ -15345,8 +15441,8 @@ var Ao = class e {
|
|
|
15345
15441
|
return e(null);
|
|
15346
15442
|
}
|
|
15347
15443
|
};
|
|
15348
|
-
|
|
15349
|
-
var
|
|
15444
|
+
Co = Po, Co.engineLoader = null;
|
|
15445
|
+
var Fo = (e) => ({
|
|
15350
15446
|
blobId: Number(e.blob_id),
|
|
15351
15447
|
compression: Number(e.compression),
|
|
15352
15448
|
sizeUncompressed: Number(e.size_uncompressed),
|
|
@@ -15354,15 +15450,15 @@ var jo = (e) => ({
|
|
|
15354
15450
|
deltaBaseId: e.delta_base_id === null ? null : Number(e.delta_base_id),
|
|
15355
15451
|
hash: new Uint8Array(e.hash),
|
|
15356
15452
|
content: new Uint8Array(e.content)
|
|
15357
|
-
}),
|
|
15453
|
+
}), Io = (e) => ({
|
|
15358
15454
|
contentId: e.content_id === null ? -1 : Number(e.content_id),
|
|
15359
15455
|
createdAt: Number(e.created_at)
|
|
15360
|
-
}),
|
|
15456
|
+
}), Lo = /* @__PURE__ */ t({
|
|
15361
15457
|
BASIC_BRICK_ASSETS: () => qi,
|
|
15362
|
-
BRDB_SQLITE_SCHEMA: () =>
|
|
15458
|
+
BRDB_SQLITE_SCHEMA: () => To,
|
|
15363
15459
|
BRICK_ASSETS: () => Yi,
|
|
15364
|
-
BitFlags: () =>
|
|
15365
|
-
Brdb: () =>
|
|
15460
|
+
BitFlags: () => hi,
|
|
15461
|
+
Brdb: () => Po,
|
|
15366
15462
|
BrdbSchema: () => Ja,
|
|
15367
15463
|
BrzReader: () => Ki,
|
|
15368
15464
|
ByteReader: () => Wi,
|
|
@@ -15378,9 +15474,9 @@ var jo = (e) => ({
|
|
|
15378
15474
|
PROCEDURAL_BRICK_ASSETS: () => Ji,
|
|
15379
15475
|
PUBLIC_GUID: () => aa,
|
|
15380
15476
|
WIRE_PORT_NAMES: () => ta,
|
|
15381
|
-
World: () =>
|
|
15382
|
-
WorldReader: () =>
|
|
15383
|
-
bit: () =>
|
|
15477
|
+
World: () => go,
|
|
15478
|
+
WorldReader: () => So,
|
|
15479
|
+
bit: () => mi,
|
|
15384
15480
|
embeddedSchema: () => Xa,
|
|
15385
15481
|
file: () => X,
|
|
15386
15482
|
folder: () => ca,
|
|
@@ -15391,17 +15487,17 @@ var jo = (e) => ({
|
|
|
15391
15487
|
toRelative: () => to,
|
|
15392
15488
|
uuidToGuid: () => oa,
|
|
15393
15489
|
writeBrzContainer: () => Gi,
|
|
15394
|
-
writeBrzLegacy: () =>
|
|
15395
|
-
}),
|
|
15396
|
-
read:
|
|
15397
|
-
write:
|
|
15398
|
-
utils:
|
|
15490
|
+
writeBrzLegacy: () => _o
|
|
15491
|
+
}), Ro = {
|
|
15492
|
+
read: kr,
|
|
15493
|
+
write: Mr,
|
|
15494
|
+
utils: er,
|
|
15399
15495
|
constants: n,
|
|
15400
|
-
types:
|
|
15401
|
-
brdb:
|
|
15496
|
+
types: Nr,
|
|
15497
|
+
brdb: Lo
|
|
15402
15498
|
};
|
|
15403
|
-
typeof window < "u" && (window.BRS =
|
|
15499
|
+
typeof window < "u" && (window.BRS = Ro);
|
|
15404
15500
|
//#endregion
|
|
15405
|
-
export {
|
|
15501
|
+
export { Po as Brdb, Pr as Direction, Fr as Rotation, go as World, So as WorldReader, Lo as brdb, n as constants, Ro as default, kr as read, Nr as types, er as utils, Mr as write, _o as writeBrzLegacy };
|
|
15406
15502
|
|
|
15407
15503
|
//# sourceMappingURL=dist.mjs.map
|