fleethub-core 1.12.6 → 1.12.8

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.
@@ -19,12 +19,6 @@ function handleError(f, args) {
19
19
  }
20
20
  }
21
21
 
22
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
23
-
24
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
25
-
26
- cachedTextDecoder.decode();
27
-
28
22
  let cachedUint8ArrayMemory0 = null;
29
23
 
30
24
  function getUint8ArrayMemory0() {
@@ -34,29 +28,46 @@ function getUint8ArrayMemory0() {
34
28
  return cachedUint8ArrayMemory0;
35
29
  }
36
30
 
31
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
32
+
33
+ cachedTextDecoder.decode();
34
+
35
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
36
+ let numBytesDecoded = 0;
37
+ function decodeText(ptr, len) {
38
+ numBytesDecoded += len;
39
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
40
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
41
+ cachedTextDecoder.decode();
42
+ numBytesDecoded = len;
43
+ }
44
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
45
+ }
46
+
37
47
  function getStringFromWasm0(ptr, len) {
38
48
  ptr = ptr >>> 0;
39
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
49
+ return decodeText(ptr, len);
40
50
  }
41
51
 
42
- let WASM_VECTOR_LEN = 0;
52
+ function getArrayU8FromWasm0(ptr, len) {
53
+ ptr = ptr >>> 0;
54
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
55
+ }
43
56
 
44
- const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
57
+ let WASM_VECTOR_LEN = 0;
45
58
 
46
- let cachedTextEncoder = new lTextEncoder('utf-8');
59
+ const cachedTextEncoder = new TextEncoder();
47
60
 
48
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
49
- ? function (arg, view) {
50
- return cachedTextEncoder.encodeInto(arg, view);
61
+ if (!('encodeInto' in cachedTextEncoder)) {
62
+ cachedTextEncoder.encodeInto = function (arg, view) {
63
+ const buf = cachedTextEncoder.encode(arg);
64
+ view.set(buf);
65
+ return {
66
+ read: arg.length,
67
+ written: buf.length
68
+ };
69
+ }
51
70
  }
52
- : function (arg, view) {
53
- const buf = cachedTextEncoder.encode(arg);
54
- view.set(buf);
55
- return {
56
- read: arg.length,
57
- written: buf.length
58
- };
59
- });
60
71
 
61
72
  function passStringToWasm0(arg, malloc, realloc) {
62
73
 
@@ -87,7 +98,7 @@ function passStringToWasm0(arg, malloc, realloc) {
87
98
  }
88
99
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
89
100
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
90
- const ret = encodeString(arg, view);
101
+ const ret = cachedTextEncoder.encodeInto(arg, view);
91
102
 
92
103
  offset += ret.written;
93
104
  ptr = realloc(ptr, len, offset, 1) >>> 0;
@@ -110,15 +121,18 @@ function isLikeNone(x) {
110
121
  return x === undefined || x === null;
111
122
  }
112
123
 
113
- function getArrayJsValueFromWasm0(ptr, len) {
114
- ptr = ptr >>> 0;
115
- const mem = getDataViewMemory0();
116
- const result = [];
117
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
118
- result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
119
- }
120
- wasm.__externref_drop_slice(ptr, len);
121
- return result;
124
+ function takeFromExternrefTable0(idx) {
125
+ const value = wasm.__wbindgen_export_2.get(idx);
126
+ wasm.__externref_table_dealloc(idx);
127
+ return value;
128
+ }
129
+ /**
130
+ * @param {ShipConditions} value
131
+ * @returns {ShipConditions}
132
+ */
133
+ export function parse_ship_conditions(value) {
134
+ const ret = wasm.parse_ship_conditions(value);
135
+ return ret;
122
136
  }
123
137
 
124
138
  function _assertClass(instance, klass) {
@@ -127,15 +141,19 @@ function _assertClass(instance, klass) {
127
141
  }
128
142
  }
129
143
 
130
- function takeFromExternrefTable0(idx) {
131
- const value = wasm.__wbindgen_export_2.get(idx);
132
- wasm.__externref_table_dealloc(idx);
133
- return value;
144
+ export function set_panic_hook() {
145
+ wasm.set_panic_hook();
134
146
  }
135
147
 
136
- function getArrayU8FromWasm0(ptr, len) {
148
+ function getArrayJsValueFromWasm0(ptr, len) {
137
149
  ptr = ptr >>> 0;
138
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
150
+ const mem = getDataViewMemory0();
151
+ const result = [];
152
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
153
+ result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
154
+ }
155
+ wasm.__externref_drop_slice(ptr, len);
156
+ return result;
139
157
  }
140
158
 
141
159
  function passArray8ToWasm0(arg, malloc) {
@@ -154,29 +172,17 @@ function getUint16ArrayMemory0() {
154
172
  return cachedUint16ArrayMemory0;
155
173
  }
156
174
 
175
+ function getArrayU16FromWasm0(ptr, len) {
176
+ ptr = ptr >>> 0;
177
+ return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
178
+ }
179
+
157
180
  function passArray16ToWasm0(arg, malloc) {
158
181
  const ptr = malloc(arg.length * 2, 2) >>> 0;
159
182
  getUint16ArrayMemory0().set(arg, ptr / 2);
160
183
  WASM_VECTOR_LEN = arg.length;
161
184
  return ptr;
162
185
  }
163
- /**
164
- * @param {ShipConditions} value
165
- * @returns {ShipConditions}
166
- */
167
- export function parse_ship_conditions(value) {
168
- const ret = wasm.parse_ship_conditions(value);
169
- return ret;
170
- }
171
-
172
- export function set_panic_hook() {
173
- wasm.set_panic_hook();
174
- }
175
-
176
- function getArrayU16FromWasm0(ptr, len) {
177
- ptr = ptr >>> 0;
178
- return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
179
- }
180
186
 
181
187
  const AirSquadronFinalization = (typeof FinalizationRegistry === 'undefined')
182
188
  ? { register: () => {}, unregister: () => {} }
@@ -307,6 +313,7 @@ export class AirSquadron {
307
313
  return ret;
308
314
  }
309
315
  }
316
+ if (Symbol.dispose) AirSquadron.prototype[Symbol.dispose] = AirSquadron.prototype.free;
310
317
 
311
318
  const AnalyzerFinalization = (typeof FinalizationRegistry === 'undefined')
312
319
  ? { register: () => {}, unregister: () => {} }
@@ -389,6 +396,7 @@ export class Analyzer {
389
396
  return takeFromExternrefTable0(ret[0]);
390
397
  }
391
398
  }
399
+ if (Symbol.dispose) Analyzer.prototype[Symbol.dispose] = Analyzer.prototype.free;
392
400
 
393
401
  const CompFinalization = (typeof FinalizationRegistry === 'undefined')
394
402
  ? { register: () => {}, unregister: () => {} }
@@ -677,6 +685,7 @@ export class Comp {
677
685
  return ret >>> 0;
678
686
  }
679
687
  }
688
+ if (Symbol.dispose) Comp.prototype[Symbol.dispose] = Comp.prototype.free;
680
689
 
681
690
  const FhCoreFinalization = (typeof FinalizationRegistry === 'undefined')
682
691
  ? { register: () => {}, unregister: () => {} }
@@ -798,6 +807,7 @@ export class FhCore {
798
807
  return Analyzer.__wrap(ret);
799
808
  }
800
809
  }
810
+ if (Symbol.dispose) FhCore.prototype[Symbol.dispose] = FhCore.prototype.free;
801
811
 
802
812
  const FleetFinalization = (typeof FinalizationRegistry === 'undefined')
803
813
  ? { register: () => {}, unregister: () => {} }
@@ -1009,6 +1019,7 @@ export class Fleet {
1009
1019
  wasm.fleet_reset_battle_state(this.__wbg_ptr);
1010
1020
  }
1011
1021
  }
1022
+ if (Symbol.dispose) Fleet.prototype[Symbol.dispose] = Fleet.prototype.free;
1012
1023
 
1013
1024
  const GearFinalization = (typeof FinalizationRegistry === 'undefined')
1014
1025
  ? { register: () => {}, unregister: () => {} }
@@ -1355,7 +1366,7 @@ export class Gear {
1355
1366
  * @returns {boolean}
1356
1367
  */
1357
1368
  has_proficiency() {
1358
- const ret = wasm.gear_has_proficiency(this.__wbg_ptr);
1369
+ const ret = wasm.gear_can_be_deployed_to_land_base(this.__wbg_ptr);
1359
1370
  return ret !== 0;
1360
1371
  }
1361
1372
  /**
@@ -1499,6 +1510,7 @@ export class Gear {
1499
1510
  return ret !== 0;
1500
1511
  }
1501
1512
  }
1513
+ if (Symbol.dispose) Gear.prototype[Symbol.dispose] = Gear.prototype.free;
1502
1514
 
1503
1515
  const OrgFinalization = (typeof FinalizationRegistry === 'undefined')
1504
1516
  ? { register: () => {}, unregister: () => {} }
@@ -1552,7 +1564,7 @@ export class Org {
1552
1564
  * @returns {bigint}
1553
1565
  */
1554
1566
  get hash() {
1555
- const ret = wasm.__wbg_get_org_hash(this.__wbg_ptr);
1567
+ const ret = wasm.__wbg_get_gear_hash(this.__wbg_ptr);
1556
1568
  return BigInt.asUintN(64, ret);
1557
1569
  }
1558
1570
  /**
@@ -1823,6 +1835,7 @@ export class Org {
1823
1835
  return ret;
1824
1836
  }
1825
1837
  }
1838
+ if (Symbol.dispose) Org.prototype[Symbol.dispose] = Org.prototype.free;
1826
1839
 
1827
1840
  const ShipFinalization = (typeof FinalizationRegistry === 'undefined')
1828
1841
  ? { register: () => {}, unregister: () => {} }
@@ -2579,18 +2592,14 @@ export class Ship {
2579
2592
  return ret[0] === 0 ? undefined : ret[1];
2580
2593
  }
2581
2594
  }
2595
+ if (Symbol.dispose) Ship.prototype[Symbol.dispose] = Ship.prototype.free;
2582
2596
 
2583
- export function __wbg_buffer_609cc3eee51ed158(arg0) {
2584
- const ret = arg0.buffer;
2585
- return ret;
2586
- };
2587
-
2588
- export function __wbg_call_672a4d21634d4a24() { return handleError(function (arg0, arg1) {
2597
+ export function __wbg_call_13410aac570ffff7() { return handleError(function (arg0, arg1) {
2589
2598
  const ret = arg0.call(arg1);
2590
2599
  return ret;
2591
2600
  }, arguments) };
2592
2601
 
2593
- export function __wbg_call_7cccdd69e0791ae2() { return handleError(function (arg0, arg1, arg2) {
2602
+ export function __wbg_call_a5400b25a865cfd8() { return handleError(function (arg0, arg1, arg2) {
2594
2603
  const ret = arg0.call(arg1, arg2);
2595
2604
  return ret;
2596
2605
  }, arguments) };
@@ -2616,12 +2625,17 @@ export function __wbg_getRandomValues_bcb4912f16000dc4() { return handleError(fu
2616
2625
  arg0.getRandomValues(arg1);
2617
2626
  }, arguments) };
2618
2627
 
2628
+ export function __wbg_length_6bb7e81f9d7713e4(arg0) {
2629
+ const ret = arg0.length;
2630
+ return ret;
2631
+ };
2632
+
2619
2633
  export function __wbg_msCrypto_0a36e2ec3a343d26(arg0) {
2620
2634
  const ret = arg0.msCrypto;
2621
2635
  return ret;
2622
2636
  };
2623
2637
 
2624
- export function __wbg_new_78feb108b6472713() {
2638
+ export function __wbg_new_1f3a344cf3123716() {
2625
2639
  const ret = new Array();
2626
2640
  return ret;
2627
2641
  };
@@ -2631,22 +2645,12 @@ export function __wbg_new_8a6f238a6ece86ea() {
2631
2645
  return ret;
2632
2646
  };
2633
2647
 
2634
- export function __wbg_new_a12002a7f91c75be(arg0) {
2635
- const ret = new Uint8Array(arg0);
2636
- return ret;
2637
- };
2638
-
2639
- export function __wbg_newnoargs_105ed471475aaf50(arg0, arg1) {
2648
+ export function __wbg_newnoargs_254190557c45b4ec(arg0, arg1) {
2640
2649
  const ret = new Function(getStringFromWasm0(arg0, arg1));
2641
2650
  return ret;
2642
2651
  };
2643
2652
 
2644
- export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0, arg1, arg2) {
2645
- const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
2646
- return ret;
2647
- };
2648
-
2649
- export function __wbg_newwithlength_a381634e90c276d4(arg0) {
2653
+ export function __wbg_newwithlength_a167dcc7aaa3ba77(arg0) {
2650
2654
  const ret = new Uint8Array(arg0 >>> 0);
2651
2655
  return ret;
2652
2656
  };
@@ -2656,7 +2660,7 @@ export function __wbg_node_02999533c4ea02e3(arg0) {
2656
2660
  return ret;
2657
2661
  };
2658
2662
 
2659
- export function __wbg_parse_def2e24ef1252aff() { return handleError(function (arg0, arg1) {
2663
+ export function __wbg_parse_442f5ba02e5eaf8b() { return handleError(function (arg0, arg1) {
2660
2664
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
2661
2665
  return ret;
2662
2666
  }, arguments) };
@@ -2666,7 +2670,11 @@ export function __wbg_process_5c1d670bc53614b8(arg0) {
2666
2670
  return ret;
2667
2671
  };
2668
2672
 
2669
- export function __wbg_push_737cfc8c1432c2c6(arg0, arg1) {
2673
+ export function __wbg_prototypesetcall_3d4a26c1ed734349(arg0, arg1, arg2) {
2674
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
2675
+ };
2676
+
2677
+ export function __wbg_push_330b2eb93e4e1212(arg0, arg1) {
2670
2678
  const ret = arg0.push(arg1);
2671
2679
  return ret;
2672
2680
  };
@@ -2680,10 +2688,6 @@ export function __wbg_require_79b1e9274cde3c87() { return handleError(function (
2680
2688
  return ret;
2681
2689
  }, arguments) };
2682
2690
 
2683
- export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
2684
- arg0.set(arg1, arg2 >>> 0);
2685
- };
2686
-
2687
2691
  export function __wbg_ship_new(arg0) {
2688
2692
  const ret = Ship.__wrap(arg0);
2689
2693
  return ret;
@@ -2697,32 +2701,32 @@ export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
2697
2701
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2698
2702
  };
2699
2703
 
2700
- export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
2704
+ export function __wbg_static_accessor_GLOBAL_8921f820c2ce3f12() {
2701
2705
  const ret = typeof global === 'undefined' ? null : global;
2702
2706
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2703
2707
  };
2704
2708
 
2705
- export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() {
2709
+ export function __wbg_static_accessor_GLOBAL_THIS_f0a4409105898184() {
2706
2710
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
2707
2711
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2708
2712
  };
2709
2713
 
2710
- export function __wbg_static_accessor_SELF_37c5d418e4bf5819() {
2714
+ export function __wbg_static_accessor_SELF_995b214ae681ff99() {
2711
2715
  const ret = typeof self === 'undefined' ? null : self;
2712
2716
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2713
2717
  };
2714
2718
 
2715
- export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() {
2719
+ export function __wbg_static_accessor_WINDOW_cde3890479c675ea() {
2716
2720
  const ret = typeof window === 'undefined' ? null : window;
2717
2721
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2718
2722
  };
2719
2723
 
2720
- export function __wbg_stringify_f7ed6987935b4a24() { return handleError(function (arg0) {
2724
+ export function __wbg_stringify_b98c93d0a190446a() { return handleError(function (arg0) {
2721
2725
  const ret = JSON.stringify(arg0);
2722
2726
  return ret;
2723
2727
  }, arguments) };
2724
2728
 
2725
- export function __wbg_subarray_aa9065fa9dc5df96(arg0, arg1, arg2) {
2729
+ export function __wbg_subarray_70fd07feefe14294(arg0, arg1, arg2) {
2726
2730
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
2727
2731
  return ret;
2728
2732
  };
@@ -2732,44 +2736,28 @@ export function __wbg_versions_c71aa1626a93e0a1(arg0) {
2732
2736
  return ret;
2733
2737
  };
2734
2738
 
2735
- export function __wbindgen_init_externref_table() {
2736
- const table = wasm.__wbindgen_export_2;
2737
- const offset = table.grow(4);
2738
- table.set(0, undefined);
2739
- table.set(offset + 0, undefined);
2740
- table.set(offset + 1, null);
2741
- table.set(offset + 2, true);
2742
- table.set(offset + 3, false);
2743
- ;
2744
- };
2745
-
2746
- export function __wbindgen_is_function(arg0) {
2739
+ export function __wbg_wbindgenisfunction_8cee7dce3725ae74(arg0) {
2747
2740
  const ret = typeof(arg0) === 'function';
2748
2741
  return ret;
2749
2742
  };
2750
2743
 
2751
- export function __wbindgen_is_object(arg0) {
2744
+ export function __wbg_wbindgenisobject_307a53c6bd97fbf8(arg0) {
2752
2745
  const val = arg0;
2753
2746
  const ret = typeof(val) === 'object' && val !== null;
2754
2747
  return ret;
2755
2748
  };
2756
2749
 
2757
- export function __wbindgen_is_string(arg0) {
2750
+ export function __wbg_wbindgenisstring_d4fa939789f003b0(arg0) {
2758
2751
  const ret = typeof(arg0) === 'string';
2759
2752
  return ret;
2760
2753
  };
2761
2754
 
2762
- export function __wbindgen_is_undefined(arg0) {
2755
+ export function __wbg_wbindgenisundefined_c4b71d073b92f3c5(arg0) {
2763
2756
  const ret = arg0 === undefined;
2764
2757
  return ret;
2765
2758
  };
2766
2759
 
2767
- export function __wbindgen_memory() {
2768
- const ret = wasm.memory;
2769
- return ret;
2770
- };
2771
-
2772
- export function __wbindgen_string_get(arg0, arg1) {
2760
+ export function __wbg_wbindgenstringget_0f16a6ddddef376f(arg0, arg1) {
2773
2761
  const obj = arg1;
2774
2762
  const ret = typeof(obj) === 'string' ? obj : undefined;
2775
2763
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -2778,12 +2766,30 @@ export function __wbindgen_string_get(arg0, arg1) {
2778
2766
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2779
2767
  };
2780
2768
 
2781
- export function __wbindgen_string_new(arg0, arg1) {
2769
+ export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0, arg1) {
2770
+ throw new Error(getStringFromWasm0(arg0, arg1));
2771
+ };
2772
+
2773
+ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
2774
+ // Cast intrinsic for `Ref(String) -> Externref`.
2782
2775
  const ret = getStringFromWasm0(arg0, arg1);
2783
2776
  return ret;
2784
2777
  };
2785
2778
 
2786
- export function __wbindgen_throw(arg0, arg1) {
2787
- throw new Error(getStringFromWasm0(arg0, arg1));
2779
+ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
2780
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
2781
+ const ret = getArrayU8FromWasm0(arg0, arg1);
2782
+ return ret;
2783
+ };
2784
+
2785
+ export function __wbindgen_init_externref_table() {
2786
+ const table = wasm.__wbindgen_export_2;
2787
+ const offset = table.grow(4);
2788
+ table.set(0, undefined);
2789
+ table.set(offset + 0, undefined);
2790
+ table.set(offset + 1, null);
2791
+ table.set(offset + 2, true);
2792
+ table.set(offset + 3, false);
2793
+ ;
2788
2794
  };
2789
2795
 
Binary file