mqtt5-wasm 1.3.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/mqtt5_wasm.d.ts CHANGED
@@ -145,7 +145,9 @@ export class BrokerConfig {
145
145
  set changeOnlyDeliveryEnabled(value: boolean);
146
146
  set echoSuppressionEnabled(value: boolean);
147
147
  set echoSuppressionPropertyKey(value: string | null | undefined);
148
+ set maxBandwidthPerClient(value: bigint);
148
149
  set maxClients(value: number);
150
+ set maxMessageRatePerClient(value: number);
149
151
  set maxOutboundRatePerClient(value: number);
150
152
  set maxPacketSize(value: number);
151
153
  set maximumQos(value: number);
@@ -491,7 +493,9 @@ export interface InitOutput {
491
493
  readonly brokerconfig_set_changeOnlyDeliveryEnabled: (a: number, b: number) => void;
492
494
  readonly brokerconfig_set_echoSuppressionEnabled: (a: number, b: number) => void;
493
495
  readonly brokerconfig_set_echoSuppressionPropertyKey: (a: number, b: number, c: number) => void;
496
+ readonly brokerconfig_set_maxBandwidthPerClient: (a: number, b: bigint) => void;
494
497
  readonly brokerconfig_set_maxClients: (a: number, b: number) => void;
498
+ readonly brokerconfig_set_maxMessageRatePerClient: (a: number, b: number) => void;
495
499
  readonly brokerconfig_set_maxOutboundRatePerClient: (a: number, b: number) => void;
496
500
  readonly brokerconfig_set_maxPacketSize: (a: number, b: number) => void;
497
501
  readonly brokerconfig_set_maximumQos: (a: number, b: number) => void;
@@ -644,23 +648,24 @@ export interface InitOutput {
644
648
  readonly willmessage_topic: (a: number, b: number) => void;
645
649
  readonly willmessage_willDelayInterval: (a: number) => number;
646
650
  readonly createCodecRegistry: () => number;
647
- readonly gzipcodec_withMinSize: (a: number, b: number) => number;
648
- readonly gzipcodec_withMaxDecompressedSize: (a: number, b: number) => number;
649
651
  readonly gzipcodec_new: () => number;
650
652
  readonly createGzipCodec: (a: number, b: number) => number;
651
653
  readonly __wbg_gzipcodec_free: (a: number, b: number) => void;
654
+ readonly gzipcodec_withMinSize: (a: number, b: number) => number;
652
655
  readonly gzipcodec_withLevel: (a: number, b: number) => number;
653
- readonly __wasm_bindgen_func_elem_2552: (a: number, b: number) => void;
654
- readonly __wasm_bindgen_func_elem_2709: (a: number, b: number) => void;
655
- readonly __wasm_bindgen_func_elem_139: (a: number, b: number) => void;
656
- readonly __wasm_bindgen_func_elem_4189: (a: number, b: number, c: number, d: number) => void;
657
- readonly __wasm_bindgen_func_elem_2725: (a: number, b: number, c: number) => void;
658
- readonly __wasm_bindgen_func_elem_1018: (a: number, b: number, c: number) => void;
659
- readonly __wasm_bindgen_func_elem_2572: (a: number, b: number) => void;
656
+ readonly gzipcodec_withMaxDecompressedSize: (a: number, b: number) => number;
657
+ readonly __wasm_bindgen_func_elem_4201: (a: number, b: number, c: number, d: number) => void;
658
+ readonly __wasm_bindgen_func_elem_4211: (a: number, b: number, c: number, d: number) => void;
659
+ readonly __wasm_bindgen_func_elem_1078: (a: number, b: number, c: number) => void;
660
+ readonly __wasm_bindgen_func_elem_1078_2: (a: number, b: number, c: number) => void;
661
+ readonly __wasm_bindgen_func_elem_1078_3: (a: number, b: number, c: number) => void;
662
+ readonly __wasm_bindgen_func_elem_1078_4: (a: number, b: number, c: number) => void;
663
+ readonly __wasm_bindgen_func_elem_2645: (a: number, b: number) => void;
660
664
  readonly __wbindgen_export: (a: number, b: number) => number;
661
665
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
662
666
  readonly __wbindgen_export3: (a: number) => void;
663
667
  readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
668
+ readonly __wbindgen_export5: (a: number, b: number) => void;
664
669
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
665
670
  }
666
671
 
package/mqtt5_wasm.js CHANGED
@@ -26,7 +26,7 @@ export class BridgeConfig {
26
26
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
27
27
  const len0 = WASM_VECTOR_LEN;
28
28
  const ret = wasm.bridgeconfig_new(ptr0, len0);
29
- this.__wbg_ptr = ret >>> 0;
29
+ this.__wbg_ptr = ret;
30
30
  BridgeConfigFinalization.register(this, this.__wbg_ptr, this);
31
31
  return this;
32
32
  }
@@ -116,7 +116,6 @@ export const BridgeDirection = Object.freeze({
116
116
 
117
117
  export class Broker {
118
118
  static __wrap(ptr) {
119
- ptr = ptr >>> 0;
120
119
  const obj = Object.create(Broker.prototype);
121
120
  obj.__wbg_ptr = ptr;
122
121
  BrokerFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -415,7 +414,7 @@ export class Broker {
415
414
  if (r2) {
416
415
  throw takeObject(r1);
417
416
  }
418
- this.__wbg_ptr = r0 >>> 0;
417
+ this.__wbg_ptr = r0;
419
418
  BrokerFinalization.register(this, this.__wbg_ptr, this);
420
419
  return this;
421
420
  } finally {
@@ -637,7 +636,7 @@ export class BrokerConfig {
637
636
  }
638
637
  constructor() {
639
638
  const ret = wasm.brokerconfig_new();
640
- this.__wbg_ptr = ret >>> 0;
639
+ this.__wbg_ptr = ret;
641
640
  BrokerConfigFinalization.register(this, this.__wbg_ptr, this);
642
641
  return this;
643
642
  }
@@ -667,12 +666,24 @@ export class BrokerConfig {
667
666
  var len0 = WASM_VECTOR_LEN;
668
667
  wasm.brokerconfig_set_echoSuppressionPropertyKey(this.__wbg_ptr, ptr0, len0);
669
668
  }
669
+ /**
670
+ * @param {bigint} value
671
+ */
672
+ set maxBandwidthPerClient(value) {
673
+ wasm.brokerconfig_set_maxBandwidthPerClient(this.__wbg_ptr, value);
674
+ }
670
675
  /**
671
676
  * @param {number} value
672
677
  */
673
678
  set maxClients(value) {
674
679
  wasm.brokerconfig_set_maxClients(this.__wbg_ptr, value);
675
680
  }
681
+ /**
682
+ * @param {number} value
683
+ */
684
+ set maxMessageRatePerClient(value) {
685
+ wasm.brokerconfig_set_maxMessageRatePerClient(this.__wbg_ptr, value);
686
+ }
676
687
  /**
677
688
  * @param {number} value
678
689
  */
@@ -701,7 +712,7 @@ export class BrokerConfig {
701
712
  * @param {number | null} [value]
702
713
  */
703
714
  set serverKeepAliveSecs(value) {
704
- wasm.brokerconfig_set_serverKeepAliveSecs(this.__wbg_ptr, isLikeNone(value) ? 0x100000001 : (value) >>> 0);
715
+ wasm.brokerconfig_set_serverKeepAliveSecs(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0);
705
716
  }
706
717
  /**
707
718
  * @param {number} value
@@ -738,7 +749,6 @@ if (Symbol.dispose) BrokerConfig.prototype[Symbol.dispose] = BrokerConfig.protot
738
749
 
739
750
  export class CodecRegistry {
740
751
  static __wrap(ptr) {
741
- ptr = ptr >>> 0;
742
752
  const obj = Object.create(CodecRegistry.prototype);
743
753
  obj.__wbg_ptr = ptr;
744
754
  CodecRegistryFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -785,7 +795,7 @@ export class CodecRegistry {
785
795
  }
786
796
  constructor() {
787
797
  const ret = wasm.codecregistry_new();
788
- this.__wbg_ptr = ret >>> 0;
798
+ this.__wbg_ptr = ret;
789
799
  CodecRegistryFinalization.register(this, this.__wbg_ptr, this);
790
800
  return this;
791
801
  }
@@ -924,11 +934,11 @@ export class ConnectOptions {
924
934
  */
925
935
  get maximumPacketSize() {
926
936
  const ret = wasm.connectoptions_maximumPacketSize(this.__wbg_ptr);
927
- return ret === 0x100000001 ? undefined : ret;
937
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
928
938
  }
929
939
  constructor() {
930
940
  const ret = wasm.connectoptions_new();
931
- this.__wbg_ptr = ret >>> 0;
941
+ this.__wbg_ptr = ret;
932
942
  ConnectOptionsFinalization.register(this, this.__wbg_ptr, this);
933
943
  return this;
934
944
  }
@@ -965,7 +975,7 @@ export class ConnectOptions {
965
975
  */
966
976
  get sessionExpiryInterval() {
967
977
  const ret = wasm.connectoptions_sessionExpiryInterval(this.__wbg_ptr);
968
- return ret === 0x100000001 ? undefined : ret;
978
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
969
979
  }
970
980
  /**
971
981
  * @param {CodecRegistry} registry
@@ -1015,7 +1025,7 @@ export class ConnectOptions {
1015
1025
  * @param {number | null} [value]
1016
1026
  */
1017
1027
  set maximumPacketSize(value) {
1018
- wasm.connectoptions_set_maximumPacketSize(this.__wbg_ptr, isLikeNone(value) ? 0x100000001 : (value) >>> 0);
1028
+ wasm.connectoptions_set_maximumPacketSize(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0);
1019
1029
  }
1020
1030
  /**
1021
1031
  * @param {Uint8Array} value
@@ -1053,7 +1063,7 @@ export class ConnectOptions {
1053
1063
  * @param {number | null} [value]
1054
1064
  */
1055
1065
  set sessionExpiryInterval(value) {
1056
- wasm.connectoptions_set_sessionExpiryInterval(this.__wbg_ptr, isLikeNone(value) ? 0x100000001 : (value) >>> 0);
1066
+ wasm.connectoptions_set_sessionExpiryInterval(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0);
1057
1067
  }
1058
1068
  /**
1059
1069
  * @param {number | null} [value]
@@ -1100,7 +1110,6 @@ if (Symbol.dispose) ConnectOptions.prototype[Symbol.dispose] = ConnectOptions.pr
1100
1110
 
1101
1111
  export class DeflateCodec {
1102
1112
  static __wrap(ptr) {
1103
- ptr = ptr >>> 0;
1104
1113
  const obj = Object.create(DeflateCodec.prototype);
1105
1114
  obj.__wbg_ptr = ptr;
1106
1115
  DeflateCodecFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1118,7 +1127,7 @@ export class DeflateCodec {
1118
1127
  }
1119
1128
  constructor() {
1120
1129
  const ret = wasm.deflatecodec_new();
1121
- this.__wbg_ptr = ret >>> 0;
1130
+ this.__wbg_ptr = ret;
1122
1131
  DeflateCodecFinalization.register(this, this.__wbg_ptr, this);
1123
1132
  return this;
1124
1133
  }
@@ -1154,7 +1163,6 @@ if (Symbol.dispose) DeflateCodec.prototype[Symbol.dispose] = DeflateCodec.protot
1154
1163
 
1155
1164
  export class GzipCodec {
1156
1165
  static __wrap(ptr) {
1157
- ptr = ptr >>> 0;
1158
1166
  const obj = Object.create(GzipCodec.prototype);
1159
1167
  obj.__wbg_ptr = ptr;
1160
1168
  GzipCodecFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1171,8 +1179,8 @@ export class GzipCodec {
1171
1179
  wasm.__wbg_gzipcodec_free(ptr, 0);
1172
1180
  }
1173
1181
  constructor() {
1174
- const ret = wasm.deflatecodec_new();
1175
- this.__wbg_ptr = ret >>> 0;
1182
+ const ret = wasm.gzipcodec_new();
1183
+ this.__wbg_ptr = ret;
1176
1184
  GzipCodecFinalization.register(this, this.__wbg_ptr, this);
1177
1185
  return this;
1178
1186
  }
@@ -1182,7 +1190,7 @@ export class GzipCodec {
1182
1190
  */
1183
1191
  withLevel(level) {
1184
1192
  const ptr = this.__destroy_into_raw();
1185
- const ret = wasm.deflatecodec_withLevel(ptr, level);
1193
+ const ret = wasm.gzipcodec_withLevel(ptr, level);
1186
1194
  return GzipCodec.__wrap(ret);
1187
1195
  }
1188
1196
  /**
@@ -1191,7 +1199,7 @@ export class GzipCodec {
1191
1199
  */
1192
1200
  withMaxDecompressedSize(size) {
1193
1201
  const ptr = this.__destroy_into_raw();
1194
- const ret = wasm.deflatecodec_withMaxDecompressedSize(ptr, size);
1202
+ const ret = wasm.gzipcodec_withMaxDecompressedSize(ptr, size);
1195
1203
  return GzipCodec.__wrap(ret);
1196
1204
  }
1197
1205
  /**
@@ -1200,7 +1208,7 @@ export class GzipCodec {
1200
1208
  */
1201
1209
  withMinSize(size) {
1202
1210
  const ptr = this.__destroy_into_raw();
1203
- const ret = wasm.deflatecodec_withMinSize(ptr, size);
1211
+ const ret = wasm.gzipcodec_withMinSize(ptr, size);
1204
1212
  return GzipCodec.__wrap(ret);
1205
1213
  }
1206
1214
  }
@@ -1208,7 +1216,6 @@ if (Symbol.dispose) GzipCodec.prototype[Symbol.dispose] = GzipCodec.prototype.fr
1208
1216
 
1209
1217
  export class MessageProperties {
1210
1218
  static __wrap(ptr) {
1211
- ptr = ptr >>> 0;
1212
1219
  const obj = Object.create(MessageProperties.prototype);
1213
1220
  obj.__wbg_ptr = ptr;
1214
1221
  MessagePropertiesFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1274,7 +1281,7 @@ export class MessageProperties {
1274
1281
  */
1275
1282
  get messageExpiryInterval() {
1276
1283
  const ret = wasm.messageproperties_messageExpiryInterval(this.__wbg_ptr);
1277
- return ret === 0x100000001 ? undefined : ret;
1284
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
1278
1285
  }
1279
1286
  /**
1280
1287
  * @returns {boolean | undefined}
@@ -1438,7 +1445,7 @@ export class MqttClient {
1438
1445
  const ptr0 = passStringToWasm0(clientId, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1439
1446
  const len0 = WASM_VECTOR_LEN;
1440
1447
  const ret = wasm.mqttclient_new(ptr0, len0);
1441
- this.__wbg_ptr = ret >>> 0;
1448
+ this.__wbg_ptr = ret;
1442
1449
  MqttClientFinalization.register(this, this.__wbg_ptr, this);
1443
1450
  return this;
1444
1451
  }
@@ -1679,11 +1686,11 @@ export class PublishOptions {
1679
1686
  */
1680
1687
  get messageExpiryInterval() {
1681
1688
  const ret = wasm.publishoptions_messageExpiryInterval(this.__wbg_ptr);
1682
- return ret === 0x100000001 ? undefined : ret;
1689
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
1683
1690
  }
1684
1691
  constructor() {
1685
1692
  const ret = wasm.publishoptions_new();
1686
- this.__wbg_ptr = ret >>> 0;
1693
+ this.__wbg_ptr = ret;
1687
1694
  PublishOptionsFinalization.register(this, this.__wbg_ptr, this);
1688
1695
  return this;
1689
1696
  }
@@ -1747,7 +1754,7 @@ export class PublishOptions {
1747
1754
  * @param {number | null} [value]
1748
1755
  */
1749
1756
  set messageExpiryInterval(value) {
1750
- wasm.publishoptions_set_messageExpiryInterval(this.__wbg_ptr, isLikeNone(value) ? 0x100000001 : (value) >>> 0);
1757
+ wasm.publishoptions_set_messageExpiryInterval(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0);
1751
1758
  }
1752
1759
  /**
1753
1760
  * @param {boolean | null} [value]
@@ -1793,7 +1800,6 @@ if (Symbol.dispose) PublishOptions.prototype[Symbol.dispose] = PublishOptions.pr
1793
1800
 
1794
1801
  export class ReconnectOptions {
1795
1802
  static __wrap(ptr) {
1796
- ptr = ptr >>> 0;
1797
1803
  const obj = Object.create(ReconnectOptions.prototype);
1798
1804
  obj.__wbg_ptr = ptr;
1799
1805
  ReconnectOptionsFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1842,7 +1848,7 @@ export class ReconnectOptions {
1842
1848
  */
1843
1849
  get maxAttempts() {
1844
1850
  const ret = wasm.reconnectoptions_maxAttempts(this.__wbg_ptr);
1845
- return ret === 0x100000001 ? undefined : ret;
1851
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
1846
1852
  }
1847
1853
  /**
1848
1854
  * @returns {number}
@@ -1853,7 +1859,7 @@ export class ReconnectOptions {
1853
1859
  }
1854
1860
  constructor() {
1855
1861
  const ret = wasm.reconnectoptions_new();
1856
- this.__wbg_ptr = ret >>> 0;
1862
+ this.__wbg_ptr = ret;
1857
1863
  ReconnectOptionsFinalization.register(this, this.__wbg_ptr, this);
1858
1864
  return this;
1859
1865
  }
@@ -1879,7 +1885,7 @@ export class ReconnectOptions {
1879
1885
  * @param {number | null} [value]
1880
1886
  */
1881
1887
  set maxAttempts(value) {
1882
- wasm.reconnectoptions_set_maxAttempts(this.__wbg_ptr, isLikeNone(value) ? 0x100000001 : (value) >>> 0);
1888
+ wasm.reconnectoptions_set_maxAttempts(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0);
1883
1889
  }
1884
1890
  /**
1885
1891
  * @param {number} value
@@ -1903,7 +1909,7 @@ export class SubscribeOptions {
1903
1909
  }
1904
1910
  constructor() {
1905
1911
  const ret = wasm.subscribeoptions_new();
1906
- this.__wbg_ptr = ret >>> 0;
1912
+ this.__wbg_ptr = ret;
1907
1913
  SubscribeOptionsFinalization.register(this, this.__wbg_ptr, this);
1908
1914
  return this;
1909
1915
  }
@@ -1963,14 +1969,14 @@ export class SubscribeOptions {
1963
1969
  * @param {number | null} [value]
1964
1970
  */
1965
1971
  set subscriptionIdentifier(value) {
1966
- wasm.subscribeoptions_set_subscriptionIdentifier(this.__wbg_ptr, isLikeNone(value) ? 0x100000001 : (value) >>> 0);
1972
+ wasm.subscribeoptions_set_subscriptionIdentifier(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0);
1967
1973
  }
1968
1974
  /**
1969
1975
  * @returns {number | undefined}
1970
1976
  */
1971
1977
  get subscriptionIdentifier() {
1972
1978
  const ret = wasm.subscribeoptions_subscriptionIdentifier(this.__wbg_ptr);
1973
- return ret === 0x100000001 ? undefined : ret;
1979
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
1974
1980
  }
1975
1981
  }
1976
1982
  if (Symbol.dispose) SubscribeOptions.prototype[Symbol.dispose] = SubscribeOptions.prototype.free;
@@ -1994,7 +2000,7 @@ export class TopicMapping {
1994
2000
  const ptr0 = passStringToWasm0(pattern, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1995
2001
  const len0 = WASM_VECTOR_LEN;
1996
2002
  const ret = wasm.topicmapping_new(ptr0, len0, direction);
1997
- this.__wbg_ptr = ret >>> 0;
2003
+ this.__wbg_ptr = ret;
1998
2004
  TopicMappingFinalization.register(this, this.__wbg_ptr, this);
1999
2005
  return this;
2000
2006
  }
@@ -2058,7 +2064,7 @@ export class WillMessage {
2058
2064
  */
2059
2065
  get messageExpiryInterval() {
2060
2066
  const ret = wasm.willmessage_messageExpiryInterval(this.__wbg_ptr);
2061
- return ret === 0x100000001 ? undefined : ret;
2067
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
2062
2068
  }
2063
2069
  /**
2064
2070
  * @param {string} topic
@@ -2070,7 +2076,7 @@ export class WillMessage {
2070
2076
  const ptr1 = passArray8ToWasm0(payload, wasm.__wbindgen_export);
2071
2077
  const len1 = WASM_VECTOR_LEN;
2072
2078
  const ret = wasm.willmessage_new(ptr0, len0, ptr1, len1);
2073
- this.__wbg_ptr = ret >>> 0;
2079
+ this.__wbg_ptr = ret;
2074
2080
  WillMessageFinalization.register(this, this.__wbg_ptr, this);
2075
2081
  return this;
2076
2082
  }
@@ -2119,7 +2125,7 @@ export class WillMessage {
2119
2125
  * @param {number | null} [value]
2120
2126
  */
2121
2127
  set messageExpiryInterval(value) {
2122
- wasm.willmessage_set_messageExpiryInterval(this.__wbg_ptr, isLikeNone(value) ? 0x100000001 : (value) >>> 0);
2128
+ wasm.willmessage_set_messageExpiryInterval(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0);
2123
2129
  }
2124
2130
  /**
2125
2131
  * @param {number} value
@@ -2153,7 +2159,7 @@ export class WillMessage {
2153
2159
  * @param {number | null} [value]
2154
2160
  */
2155
2161
  set willDelayInterval(value) {
2156
- wasm.willmessage_set_willDelayInterval(this.__wbg_ptr, isLikeNone(value) ? 0x100000001 : (value) >>> 0);
2162
+ wasm.willmessage_set_willDelayInterval(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0);
2157
2163
  }
2158
2164
  /**
2159
2165
  * @returns {string}
@@ -2179,7 +2185,7 @@ export class WillMessage {
2179
2185
  */
2180
2186
  get willDelayInterval() {
2181
2187
  const ret = wasm.willmessage_willDelayInterval(this.__wbg_ptr);
2182
- return ret === 0x100000001 ? undefined : ret;
2188
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
2183
2189
  }
2184
2190
  }
2185
2191
  if (Symbol.dispose) WillMessage.prototype[Symbol.dispose] = WillMessage.prototype.free;
@@ -2188,7 +2194,7 @@ if (Symbol.dispose) WillMessage.prototype[Symbol.dispose] = WillMessage.prototyp
2188
2194
  * @returns {CodecRegistry}
2189
2195
  */
2190
2196
  export function createCodecRegistry() {
2191
- const ret = wasm.codecregistry_new();
2197
+ const ret = wasm.createCodecRegistry();
2192
2198
  return CodecRegistry.__wrap(ret);
2193
2199
  }
2194
2200
 
@@ -2198,7 +2204,7 @@ export function createCodecRegistry() {
2198
2204
  * @returns {DeflateCodec}
2199
2205
  */
2200
2206
  export function createDeflateCodec(level, minSize) {
2201
- const ret = wasm.createDeflateCodec(isLikeNone(level) ? 0xFFFFFF : level, isLikeNone(minSize) ? 0x100000001 : (minSize) >>> 0);
2207
+ const ret = wasm.createDeflateCodec(isLikeNone(level) ? 0xFFFFFF : level, isLikeNone(minSize) ? Number.MAX_SAFE_INTEGER : (minSize) >>> 0);
2202
2208
  return DeflateCodec.__wrap(ret);
2203
2209
  }
2204
2210
 
@@ -2208,84 +2214,86 @@ export function createDeflateCodec(level, minSize) {
2208
2214
  * @returns {GzipCodec}
2209
2215
  */
2210
2216
  export function createGzipCodec(level, minSize) {
2211
- const ret = wasm.createDeflateCodec(isLikeNone(level) ? 0xFFFFFF : level, isLikeNone(minSize) ? 0x100000001 : (minSize) >>> 0);
2217
+ const ret = wasm.createGzipCodec(isLikeNone(level) ? 0xFFFFFF : level, isLikeNone(minSize) ? Number.MAX_SAFE_INTEGER : (minSize) >>> 0);
2212
2218
  return GzipCodec.__wrap(ret);
2213
2219
  }
2214
-
2215
2220
  function __wbg_get_imports() {
2216
2221
  const import0 = {
2217
2222
  __proto__: null,
2218
- __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
2223
+ __wbg___wbindgen_debug_string_8a447059637473e2: function(arg0, arg1) {
2219
2224
  const ret = debugString(getObject(arg1));
2220
2225
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2221
2226
  const len1 = WASM_VECTOR_LEN;
2222
2227
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2223
2228
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2224
2229
  },
2225
- __wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
2230
+ __wbg___wbindgen_is_function_acc5528be2b923f2: function(arg0) {
2226
2231
  const ret = typeof(getObject(arg0)) === 'function';
2227
2232
  return ret;
2228
2233
  },
2229
- __wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
2234
+ __wbg___wbindgen_is_undefined_721f8decd50c87a3: function(arg0) {
2230
2235
  const ret = getObject(arg0) === undefined;
2231
2236
  return ret;
2232
2237
  },
2233
- __wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
2238
+ __wbg___wbindgen_number_get_1cc01dd708740256: function(arg0, arg1) {
2234
2239
  const obj = getObject(arg1);
2235
2240
  const ret = typeof(obj) === 'number' ? obj : undefined;
2236
2241
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
2237
2242
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2238
2243
  },
2239
- __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
2244
+ __wbg___wbindgen_throw_ea4887a5f8f9a9db: function(arg0, arg1) {
2240
2245
  throw new Error(getStringFromWasm0(arg0, arg1));
2241
2246
  },
2242
- __wbg__wbg_cb_unref_d9b87ff7982e3b21: function(arg0) {
2247
+ __wbg__wbg_cb_unref_33c39e13d73b25f6: function(arg0) {
2243
2248
  getObject(arg0)._wbg_cb_unref();
2244
2249
  },
2245
- __wbg_addEventListener_3acb0aad4483804c: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2246
- getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
2247
- }, arguments); },
2248
- __wbg_addEventListener_c917b5aafbcf493f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2250
+ __wbg_addEventListener_9f744a06d0879451: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2249
2251
  getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
2250
2252
  }, arguments); },
2251
- __wbg_buffer_26d0910f3a5bc899: function(arg0) {
2253
+ __wbg_addEventListener_ea90bc131475777e: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2254
+ getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
2255
+ }, arguments); },
2256
+ __wbg_buffer_9e4d98d0766fb908: function(arg0) {
2252
2257
  const ret = getObject(arg0).buffer;
2253
2258
  return addHeapObject(ret);
2254
2259
  },
2255
- __wbg_call_389efe28435a9388: function() { return handleError(function (arg0, arg1) {
2256
- const ret = getObject(arg0).call(getObject(arg1));
2260
+ __wbg_call_0e855b388e315e17: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2261
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2257
2262
  return addHeapObject(ret);
2258
2263
  }, arguments); },
2259
- __wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {
2264
+ __wbg_call_5575218572ead796: function() { return handleError(function (arg0, arg1, arg2) {
2260
2265
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2261
2266
  return addHeapObject(ret);
2262
2267
  }, arguments); },
2263
- __wbg_call_812d25f1510c13c8: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2264
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2268
+ __wbg_call_8e98ed2f3c86c4b5: function() { return handleError(function (arg0, arg1) {
2269
+ const ret = getObject(arg0).call(getObject(arg1));
2265
2270
  return addHeapObject(ret);
2266
2271
  }, arguments); },
2267
- __wbg_call_e8c868596c950cf6: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2272
+ __wbg_call_dd0f909cbc9405d0: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2268
2273
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2269
2274
  return addHeapObject(ret);
2270
2275
  }, arguments); },
2271
- __wbg_clearTimeout_5a54f8841c30079a: function(arg0) {
2276
+ __wbg_clearTimeout_3629d6209dfcc46e: function(arg0) {
2272
2277
  const ret = clearTimeout(takeObject(arg0));
2273
2278
  return addHeapObject(ret);
2274
2279
  },
2275
- __wbg_close_1d08eaf57ed325c0: function() { return handleError(function (arg0) {
2280
+ __wbg_close_26aa343c0d729303: function() { return handleError(function (arg0) {
2276
2281
  getObject(arg0).close();
2277
2282
  }, arguments); },
2278
- __wbg_close_36e3b6eed1f8c59d: function(arg0) {
2283
+ __wbg_close_38d22e2ee9732188: function(arg0) {
2279
2284
  getObject(arg0).close();
2280
2285
  },
2281
- __wbg_close_fad2f0ee451926ed: function(arg0) {
2286
+ __wbg_close_bb32784c2f019863: function(arg0) {
2282
2287
  getObject(arg0).close();
2283
2288
  },
2284
- __wbg_data_5330da50312d0bc1: function(arg0) {
2289
+ __wbg_data_4a7f1308dbd33a21: function(arg0) {
2285
2290
  const ret = getObject(arg0).data;
2286
2291
  return addHeapObject(ret);
2287
2292
  },
2288
- __wbg_error_7534b8e9a36f1ab4: function(arg0, arg1) {
2293
+ __wbg_error_933f449d72fef598: function(arg0) {
2294
+ console.error(getObject(arg0));
2295
+ },
2296
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
2289
2297
  let deferred0_0;
2290
2298
  let deferred0_1;
2291
2299
  try {
@@ -2296,21 +2304,18 @@ function __wbg_get_imports() {
2296
2304
  wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
2297
2305
  }
2298
2306
  },
2299
- __wbg_error_9a7fe3f932034cde: function(arg0) {
2300
- console.error(getObject(arg0));
2301
- },
2302
- __wbg_from_bddd64e7d5ff6941: function(arg0) {
2307
+ __wbg_from_50138b2ca136f50c: function(arg0) {
2303
2308
  const ret = Array.from(getObject(arg0));
2304
2309
  return addHeapObject(ret);
2305
2310
  },
2306
- __wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
2311
+ __wbg_getRandomValues_76dfc69825c9c552: function() { return handleError(function (arg0, arg1) {
2307
2312
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
2308
2313
  }, arguments); },
2309
- __wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
2314
+ __wbg_get_197a3fe98f169e38: function(arg0, arg1) {
2310
2315
  const ret = getObject(arg0)[arg1 >>> 0];
2311
2316
  return addHeapObject(ret);
2312
2317
  },
2313
- __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(arg0) {
2318
+ __wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
2314
2319
  let result;
2315
2320
  try {
2316
2321
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -2320,7 +2325,7 @@ function __wbg_get_imports() {
2320
2325
  const ret = result;
2321
2326
  return ret;
2322
2327
  },
2323
- __wbg_instanceof_Window_ed49b2db8df90359: function(arg0) {
2328
+ __wbg_instanceof_Window_0d356b88a2f77c42: function(arg0) {
2324
2329
  let result;
2325
2330
  try {
2326
2331
  result = getObject(arg0) instanceof Window;
@@ -2330,53 +2335,57 @@ function __wbg_get_imports() {
2330
2335
  const ret = result;
2331
2336
  return ret;
2332
2337
  },
2333
- __wbg_length_32ed9a279acd054c: function(arg0) {
2338
+ __wbg_length_589238bdcf171f0e: function(arg0) {
2334
2339
  const ret = getObject(arg0).length;
2335
2340
  return ret;
2336
2341
  },
2337
- __wbg_length_35a7bace40f36eac: function(arg0) {
2342
+ __wbg_length_c6054974c0a6cdb9: function(arg0) {
2338
2343
  const ret = getObject(arg0).length;
2339
2344
  return ret;
2340
2345
  },
2341
- __wbg_log_6b5ca2e6124b2808: function(arg0) {
2346
+ __wbg_log_6b5af08dd293697f: function(arg0) {
2342
2347
  console.log(getObject(arg0));
2343
2348
  },
2344
2349
  __wbg_messageproperties_new: function(arg0) {
2345
2350
  const ret = MessageProperties.__wrap(arg0);
2346
2351
  return addHeapObject(ret);
2347
2352
  },
2348
- __wbg_navigator_43be698ba96fc088: function(arg0) {
2353
+ __wbg_navigator_935098efd1dc7fe5: function(arg0) {
2349
2354
  const ret = getObject(arg0).navigator;
2350
2355
  return addHeapObject(ret);
2351
2356
  },
2352
- __wbg_new_361308b2356cecd0: function() {
2357
+ __wbg_new_227d7c05414eb861: function() {
2358
+ const ret = new Error();
2359
+ return addHeapObject(ret);
2360
+ },
2361
+ __wbg_new_2e117a478906f062: function() {
2353
2362
  const ret = new Object();
2354
2363
  return addHeapObject(ret);
2355
2364
  },
2356
- __wbg_new_3eb36ae241fe6f44: function() {
2365
+ __wbg_new_36e147a8ced3c6e0: function() {
2357
2366
  const ret = new Array();
2358
2367
  return addHeapObject(ret);
2359
2368
  },
2360
- __wbg_new_6f0524fbfa300c47: function() { return handleError(function () {
2369
+ __wbg_new_81880fb5002cb255: function(arg0) {
2370
+ const ret = new Uint8Array(getObject(arg0));
2371
+ return addHeapObject(ret);
2372
+ },
2373
+ __wbg_new_98e81f23cc202cc4: function() { return handleError(function () {
2361
2374
  const ret = new MessageChannel();
2362
2375
  return addHeapObject(ret);
2363
2376
  }, arguments); },
2364
- __wbg_new_8a6f238a6ece86ea: function() {
2365
- const ret = new Error();
2366
- return addHeapObject(ret);
2367
- },
2368
- __wbg_new_afb8dbb951819ab7: function() { return handleError(function (arg0, arg1) {
2377
+ __wbg_new_bf06861b1423f19e: function() { return handleError(function (arg0, arg1) {
2369
2378
  const ret = new BroadcastChannel(getStringFromWasm0(arg0, arg1));
2370
2379
  return addHeapObject(ret);
2371
2380
  }, arguments); },
2372
- __wbg_new_b5d9e2fb389fef91: function(arg0, arg1) {
2381
+ __wbg_new_f85beb941dc6d8aa: function(arg0, arg1) {
2373
2382
  try {
2374
2383
  var state0 = {a: arg0, b: arg1};
2375
2384
  var cb0 = (arg0, arg1) => {
2376
2385
  const a = state0.a;
2377
2386
  state0.a = 0;
2378
2387
  try {
2379
- return __wasm_bindgen_func_elem_4189(a, state0.b, arg0, arg1);
2388
+ return __wasm_bindgen_func_elem_4211(a, state0.b, arg0, arg1);
2380
2389
  } finally {
2381
2390
  state0.a = a;
2382
2391
  }
@@ -2384,192 +2393,211 @@ function __wbg_get_imports() {
2384
2393
  const ret = new Promise(cb0);
2385
2394
  return addHeapObject(ret);
2386
2395
  } finally {
2387
- state0.a = state0.b = 0;
2396
+ state0.a = 0;
2388
2397
  }
2389
2398
  },
2390
- __wbg_new_dd2b680c8bf6ae29: function(arg0) {
2391
- const ret = new Uint8Array(getObject(arg0));
2392
- return addHeapObject(ret);
2393
- },
2394
- __wbg_new_from_slice_a3d2629dc1826784: function(arg0, arg1) {
2399
+ __wbg_new_from_slice_543b875b27789a8f: function(arg0, arg1) {
2395
2400
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
2396
2401
  return addHeapObject(ret);
2397
2402
  },
2398
- __wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
2403
+ __wbg_new_no_args_2d7333de60de5ac7: function(arg0, arg1) {
2399
2404
  const ret = new Function(getStringFromWasm0(arg0, arg1));
2400
2405
  return addHeapObject(ret);
2401
2406
  },
2402
- __wbg_new_with_str_8406051fb31dddaa: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2407
+ __wbg_new_typed_00a409eb4ec4f2d9: function(arg0, arg1) {
2408
+ try {
2409
+ var state0 = {a: arg0, b: arg1};
2410
+ var cb0 = (arg0, arg1) => {
2411
+ const a = state0.a;
2412
+ state0.a = 0;
2413
+ try {
2414
+ return __wasm_bindgen_func_elem_4211(a, state0.b, arg0, arg1);
2415
+ } finally {
2416
+ state0.a = a;
2417
+ }
2418
+ };
2419
+ const ret = new Promise(cb0);
2420
+ return addHeapObject(ret);
2421
+ } finally {
2422
+ state0.a = 0;
2423
+ }
2424
+ },
2425
+ __wbg_new_with_str_df5b9855ce14dac6: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2403
2426
  const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
2404
2427
  return addHeapObject(ret);
2405
2428
  }, arguments); },
2406
- __wbg_now_2c95c9de01293173: function(arg0) {
2407
- const ret = getObject(arg0).now();
2429
+ __wbg_now_d2e0afbad4edbe82: function() {
2430
+ const ret = Date.now();
2408
2431
  return ret;
2409
2432
  },
2410
- __wbg_now_a3af9a2f4bbaa4d1: function() {
2411
- const ret = Date.now();
2433
+ __wbg_now_e7c6795a7f81e10f: function(arg0) {
2434
+ const ret = getObject(arg0).now();
2412
2435
  return ret;
2413
2436
  },
2414
- __wbg_onLine_a52496f5c9a569ec: function(arg0) {
2437
+ __wbg_onLine_b14b12d045df88e2: function(arg0) {
2415
2438
  const ret = getObject(arg0).onLine;
2416
2439
  return ret;
2417
2440
  },
2418
- __wbg_performance_7a3ffd0b17f663ad: function(arg0) {
2441
+ __wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
2419
2442
  const ret = getObject(arg0).performance;
2420
2443
  return addHeapObject(ret);
2421
2444
  },
2422
- __wbg_port1_6251ddc5cf5c9287: function(arg0) {
2445
+ __wbg_port1_aaca04ed552c16ef: function(arg0) {
2423
2446
  const ret = getObject(arg0).port1;
2424
2447
  return addHeapObject(ret);
2425
2448
  },
2426
- __wbg_port2_b2a294b0ede1e13c: function(arg0) {
2449
+ __wbg_port2_baea902d7925a544: function(arg0) {
2427
2450
  const ret = getObject(arg0).port2;
2428
2451
  return addHeapObject(ret);
2429
2452
  },
2430
- __wbg_postMessage_46eeeef39934b448: function() { return handleError(function (arg0, arg1) {
2453
+ __wbg_postMessage_5b1dc9f8de88488a: function() { return handleError(function (arg0, arg1) {
2431
2454
  getObject(arg0).postMessage(getObject(arg1));
2432
2455
  }, arguments); },
2433
- __wbg_postMessage_6962a8f13ab51b6a: function() { return handleError(function (arg0, arg1) {
2456
+ __wbg_postMessage_83e0053b2cd5b05e: function() { return handleError(function (arg0, arg1) {
2434
2457
  getObject(arg0).postMessage(getObject(arg1));
2435
2458
  }, arguments); },
2436
- __wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
2459
+ __wbg_prototypesetcall_d721637c7ca66eb8: function(arg0, arg1, arg2) {
2437
2460
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
2438
2461
  },
2439
- __wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
2462
+ __wbg_push_f724b5db8acf89d2: function(arg0, arg1) {
2440
2463
  const ret = getObject(arg0).push(getObject(arg1));
2441
2464
  return ret;
2442
2465
  },
2443
- __wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
2466
+ __wbg_queueMicrotask_1c9b3800e321a967: function(arg0) {
2444
2467
  const ret = getObject(arg0).queueMicrotask;
2445
2468
  return addHeapObject(ret);
2446
2469
  },
2447
- __wbg_queueMicrotask_5bb536982f78a56f: function(arg0) {
2470
+ __wbg_queueMicrotask_311744e534a929a3: function(arg0) {
2448
2471
  queueMicrotask(getObject(arg0));
2449
2472
  },
2450
- __wbg_random_912284dbf636f269: function() {
2473
+ __wbg_random_3182549db57fb083: function() {
2451
2474
  const ret = Math.random();
2452
2475
  return ret;
2453
2476
  },
2454
- __wbg_removeEventListener_e63328781a5b9af9: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2477
+ __wbg_removeEventListener_c6782a9c30557d31: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2455
2478
  getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
2456
2479
  }, arguments); },
2457
- __wbg_resolve_002c4b7d9d8f6b64: function(arg0) {
2480
+ __wbg_resolve_d82363d90af6928a: function(arg0) {
2458
2481
  const ret = Promise.resolve(getObject(arg0));
2459
2482
  return addHeapObject(ret);
2460
2483
  },
2461
- __wbg_send_542f95dea2df7994: function() { return handleError(function (arg0, arg1, arg2) {
2484
+ __wbg_send_982c819b9a1b34a5: function() { return handleError(function (arg0, arg1, arg2) {
2462
2485
  getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
2463
2486
  }, arguments); },
2464
- __wbg_setTimeout_b0ff8bfffa18bd8e: function(arg0, arg1) {
2465
- const ret = setTimeout(getObject(arg0), arg1);
2466
- return ret;
2467
- },
2468
- __wbg_setTimeout_db2dbaeefb6f39c7: function() { return handleError(function (arg0, arg1) {
2487
+ __wbg_setTimeout_56bcdccbad22fd44: function() { return handleError(function (arg0, arg1) {
2469
2488
  const ret = setTimeout(getObject(arg0), arg1);
2470
2489
  return addHeapObject(ret);
2471
2490
  }, arguments); },
2472
- __wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
2491
+ __wbg_setTimeout_d44093c28260532b: function(arg0, arg1) {
2492
+ const ret = setTimeout(getObject(arg0), arg1);
2493
+ return ret;
2494
+ },
2495
+ __wbg_set_4564f7dc44fcb0c9: function() { return handleError(function (arg0, arg1, arg2) {
2473
2496
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
2474
2497
  return ret;
2475
2498
  }, arguments); },
2476
- __wbg_set_binaryType_5bbf62e9f705dc1a: function(arg0, arg1) {
2499
+ __wbg_set_binaryType_148427b11a8e6551: function(arg0, arg1) {
2477
2500
  getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
2478
2501
  },
2479
- __wbg_set_once_56ba1b87a9884c15: function(arg0, arg1) {
2502
+ __wbg_set_once_0ff9e026e78fe912: function(arg0, arg1) {
2480
2503
  getObject(arg0).once = arg1 !== 0;
2481
2504
  },
2482
- __wbg_set_onclose_d382f3e2c2b850eb: function(arg0, arg1) {
2505
+ __wbg_set_onclose_8134952b2a9ec104: function(arg0, arg1) {
2483
2506
  getObject(arg0).onclose = getObject(arg1);
2484
2507
  },
2485
- __wbg_set_onerror_377f18bf4569bf85: function(arg0, arg1) {
2508
+ __wbg_set_onerror_3f68563f77d362f1: function(arg0, arg1) {
2486
2509
  getObject(arg0).onerror = getObject(arg1);
2487
2510
  },
2488
- __wbg_set_onmessage_0e1ffb1c0d91d2ad: function(arg0, arg1) {
2511
+ __wbg_set_onmessage_397a79f643011142: function(arg0, arg1) {
2489
2512
  getObject(arg0).onmessage = getObject(arg1);
2490
2513
  },
2491
- __wbg_set_onmessage_2114aa5f4f53051e: function(arg0, arg1) {
2514
+ __wbg_set_onmessage_8700520361fa9f48: function(arg0, arg1) {
2492
2515
  getObject(arg0).onmessage = getObject(arg1);
2493
2516
  },
2494
- __wbg_set_onmessage_41e84d56e3597e90: function(arg0, arg1) {
2517
+ __wbg_set_onmessage_a8bb5e3dd796cf0d: function(arg0, arg1) {
2495
2518
  getObject(arg0).onmessage = getObject(arg1);
2496
2519
  },
2497
- __wbg_set_onopen_b7b52d519d6c0f11: function(arg0, arg1) {
2520
+ __wbg_set_onopen_ca8d311fe5282041: function(arg0, arg1) {
2498
2521
  getObject(arg0).onopen = getObject(arg1);
2499
2522
  },
2500
- __wbg_stack_0ed75d68575b0f3c: function(arg0, arg1) {
2523
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
2501
2524
  const ret = getObject(arg1).stack;
2502
2525
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2503
2526
  const len1 = WASM_VECTOR_LEN;
2504
2527
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2505
2528
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2506
2529
  },
2507
- __wbg_start_ffb4b426b1e661bd: function(arg0) {
2530
+ __wbg_start_8ca2b69cfb7618b6: function(arg0) {
2508
2531
  getObject(arg0).start();
2509
2532
  },
2510
- __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
2511
- const ret = typeof global === 'undefined' ? null : global;
2533
+ __wbg_static_accessor_GLOBAL_THIS_2fee5048bcca5938: function() {
2534
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
2512
2535
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2513
2536
  },
2514
- __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
2515
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
2537
+ __wbg_static_accessor_GLOBAL_ce44e66a4935da8c: function() {
2538
+ const ret = typeof global === 'undefined' ? null : global;
2516
2539
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2517
2540
  },
2518
- __wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
2541
+ __wbg_static_accessor_SELF_44f6e0cb5e67cdad: function() {
2519
2542
  const ret = typeof self === 'undefined' ? null : self;
2520
2543
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2521
2544
  },
2522
- __wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
2545
+ __wbg_static_accessor_WINDOW_168f178805d978fe: function() {
2523
2546
  const ret = typeof window === 'undefined' ? null : window;
2524
2547
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2525
2548
  },
2526
- __wbg_then_0d9fe2c7b1857d32: function(arg0, arg1, arg2) {
2549
+ __wbg_then_05edfc8a4fea5106: function(arg0, arg1, arg2) {
2527
2550
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
2528
2551
  return addHeapObject(ret);
2529
2552
  },
2530
- __wbg_then_b9e7b3b5f1a9e1b5: function(arg0, arg1) {
2553
+ __wbg_then_591b6b3a75ee817a: function(arg0, arg1) {
2531
2554
  const ret = getObject(arg0).then(getObject(arg1));
2532
2555
  return addHeapObject(ret);
2533
2556
  },
2534
- __wbg_warn_f7ae1b2e66ccb930: function(arg0) {
2557
+ __wbg_warn_cd671287bc02594a: function(arg0) {
2535
2558
  console.warn(getObject(arg0));
2536
2559
  },
2537
2560
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2538
- // Cast intrinsic for `Closure(Closure { dtor_idx: 394, function: Function { arguments: [], shim_idx: 395, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2539
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2552, __wasm_bindgen_func_elem_2572);
2561
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 591, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2562
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_4201);
2540
2563
  return addHeapObject(ret);
2541
2564
  },
2542
2565
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2543
- // Cast intrinsic for `Closure(Closure { dtor_idx: 413, function: Function { arguments: [Externref], shim_idx: 414, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2544
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2709, __wasm_bindgen_func_elem_2725);
2566
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 9, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2567
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1078);
2545
2568
  return addHeapObject(ret);
2546
2569
  },
2547
2570
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2548
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 9, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2549
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_139, __wasm_bindgen_func_elem_1018);
2571
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 9, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2572
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1078_2);
2550
2573
  return addHeapObject(ret);
2551
2574
  },
2552
2575
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
2553
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 9, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2554
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_139, __wasm_bindgen_func_elem_1018);
2576
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 9, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2577
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1078_3);
2555
2578
  return addHeapObject(ret);
2556
2579
  },
2557
2580
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
2558
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 9, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2559
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_139, __wasm_bindgen_func_elem_1018);
2581
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 9, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2582
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1078_4);
2560
2583
  return addHeapObject(ret);
2561
2584
  },
2562
- __wbindgen_cast_0000000000000006: function(arg0) {
2585
+ __wbindgen_cast_0000000000000006: function(arg0, arg1) {
2586
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 424, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2587
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2645);
2588
+ return addHeapObject(ret);
2589
+ },
2590
+ __wbindgen_cast_0000000000000007: function(arg0) {
2563
2591
  // Cast intrinsic for `F64 -> Externref`.
2564
2592
  const ret = arg0;
2565
2593
  return addHeapObject(ret);
2566
2594
  },
2567
- __wbindgen_cast_0000000000000007: function(arg0, arg1) {
2595
+ __wbindgen_cast_0000000000000008: function(arg0, arg1) {
2568
2596
  // Cast intrinsic for `Ref(String) -> Externref`.
2569
2597
  const ret = getStringFromWasm0(arg0, arg1);
2570
2598
  return addHeapObject(ret);
2571
2599
  },
2572
- __wbindgen_cast_0000000000000008: function(arg0, arg1) {
2600
+ __wbindgen_cast_0000000000000009: function(arg0, arg1) {
2573
2601
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2574
2602
  wasm.__wbindgen_export4(arg0, arg1 * 4, 4);
2575
2603
  // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
@@ -2590,66 +2618,88 @@ function __wbg_get_imports() {
2590
2618
  };
2591
2619
  }
2592
2620
 
2593
- function __wasm_bindgen_func_elem_2572(arg0, arg1) {
2594
- wasm.__wasm_bindgen_func_elem_2572(arg0, arg1);
2621
+ function __wasm_bindgen_func_elem_2645(arg0, arg1) {
2622
+ wasm.__wasm_bindgen_func_elem_2645(arg0, arg1);
2595
2623
  }
2596
2624
 
2597
- function __wasm_bindgen_func_elem_2725(arg0, arg1, arg2) {
2598
- wasm.__wasm_bindgen_func_elem_2725(arg0, arg1, addHeapObject(arg2));
2625
+ function __wasm_bindgen_func_elem_1078(arg0, arg1, arg2) {
2626
+ wasm.__wasm_bindgen_func_elem_1078(arg0, arg1, addHeapObject(arg2));
2599
2627
  }
2600
2628
 
2601
- function __wasm_bindgen_func_elem_1018(arg0, arg1, arg2) {
2602
- wasm.__wasm_bindgen_func_elem_1018(arg0, arg1, addHeapObject(arg2));
2629
+ function __wasm_bindgen_func_elem_1078_2(arg0, arg1, arg2) {
2630
+ wasm.__wasm_bindgen_func_elem_1078_2(arg0, arg1, addHeapObject(arg2));
2603
2631
  }
2604
2632
 
2605
- function __wasm_bindgen_func_elem_4189(arg0, arg1, arg2, arg3) {
2606
- wasm.__wasm_bindgen_func_elem_4189(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2633
+ function __wasm_bindgen_func_elem_1078_3(arg0, arg1, arg2) {
2634
+ wasm.__wasm_bindgen_func_elem_1078_3(arg0, arg1, addHeapObject(arg2));
2635
+ }
2636
+
2637
+ function __wasm_bindgen_func_elem_1078_4(arg0, arg1, arg2) {
2638
+ wasm.__wasm_bindgen_func_elem_1078_4(arg0, arg1, addHeapObject(arg2));
2639
+ }
2640
+
2641
+ function __wasm_bindgen_func_elem_4201(arg0, arg1, arg2) {
2642
+ try {
2643
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2644
+ wasm.__wasm_bindgen_func_elem_4201(retptr, arg0, arg1, addHeapObject(arg2));
2645
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2646
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2647
+ if (r1) {
2648
+ throw takeObject(r0);
2649
+ }
2650
+ } finally {
2651
+ wasm.__wbindgen_add_to_stack_pointer(16);
2652
+ }
2653
+ }
2654
+
2655
+ function __wasm_bindgen_func_elem_4211(arg0, arg1, arg2, arg3) {
2656
+ wasm.__wasm_bindgen_func_elem_4211(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2607
2657
  }
2608
2658
 
2609
2659
 
2610
2660
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
2611
2661
  const BridgeConfigFinalization = (typeof FinalizationRegistry === 'undefined')
2612
2662
  ? { register: () => {}, unregister: () => {} }
2613
- : new FinalizationRegistry(ptr => wasm.__wbg_bridgeconfig_free(ptr >>> 0, 1));
2663
+ : new FinalizationRegistry(ptr => wasm.__wbg_bridgeconfig_free(ptr, 1));
2614
2664
  const BrokerFinalization = (typeof FinalizationRegistry === 'undefined')
2615
2665
  ? { register: () => {}, unregister: () => {} }
2616
- : new FinalizationRegistry(ptr => wasm.__wbg_broker_free(ptr >>> 0, 1));
2666
+ : new FinalizationRegistry(ptr => wasm.__wbg_broker_free(ptr, 1));
2617
2667
  const BrokerConfigFinalization = (typeof FinalizationRegistry === 'undefined')
2618
2668
  ? { register: () => {}, unregister: () => {} }
2619
- : new FinalizationRegistry(ptr => wasm.__wbg_brokerconfig_free(ptr >>> 0, 1));
2669
+ : new FinalizationRegistry(ptr => wasm.__wbg_brokerconfig_free(ptr, 1));
2620
2670
  const CodecRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
2621
2671
  ? { register: () => {}, unregister: () => {} }
2622
- : new FinalizationRegistry(ptr => wasm.__wbg_codecregistry_free(ptr >>> 0, 1));
2672
+ : new FinalizationRegistry(ptr => wasm.__wbg_codecregistry_free(ptr, 1));
2623
2673
  const ConnectOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
2624
2674
  ? { register: () => {}, unregister: () => {} }
2625
- : new FinalizationRegistry(ptr => wasm.__wbg_connectoptions_free(ptr >>> 0, 1));
2675
+ : new FinalizationRegistry(ptr => wasm.__wbg_connectoptions_free(ptr, 1));
2626
2676
  const DeflateCodecFinalization = (typeof FinalizationRegistry === 'undefined')
2627
2677
  ? { register: () => {}, unregister: () => {} }
2628
- : new FinalizationRegistry(ptr => wasm.__wbg_deflatecodec_free(ptr >>> 0, 1));
2678
+ : new FinalizationRegistry(ptr => wasm.__wbg_deflatecodec_free(ptr, 1));
2629
2679
  const GzipCodecFinalization = (typeof FinalizationRegistry === 'undefined')
2630
2680
  ? { register: () => {}, unregister: () => {} }
2631
- : new FinalizationRegistry(ptr => wasm.__wbg_gzipcodec_free(ptr >>> 0, 1));
2681
+ : new FinalizationRegistry(ptr => wasm.__wbg_gzipcodec_free(ptr, 1));
2632
2682
  const MessagePropertiesFinalization = (typeof FinalizationRegistry === 'undefined')
2633
2683
  ? { register: () => {}, unregister: () => {} }
2634
- : new FinalizationRegistry(ptr => wasm.__wbg_messageproperties_free(ptr >>> 0, 1));
2684
+ : new FinalizationRegistry(ptr => wasm.__wbg_messageproperties_free(ptr, 1));
2635
2685
  const MqttClientFinalization = (typeof FinalizationRegistry === 'undefined')
2636
2686
  ? { register: () => {}, unregister: () => {} }
2637
- : new FinalizationRegistry(ptr => wasm.__wbg_mqttclient_free(ptr >>> 0, 1));
2687
+ : new FinalizationRegistry(ptr => wasm.__wbg_mqttclient_free(ptr, 1));
2638
2688
  const PublishOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
2639
2689
  ? { register: () => {}, unregister: () => {} }
2640
- : new FinalizationRegistry(ptr => wasm.__wbg_publishoptions_free(ptr >>> 0, 1));
2690
+ : new FinalizationRegistry(ptr => wasm.__wbg_publishoptions_free(ptr, 1));
2641
2691
  const ReconnectOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
2642
2692
  ? { register: () => {}, unregister: () => {} }
2643
- : new FinalizationRegistry(ptr => wasm.__wbg_reconnectoptions_free(ptr >>> 0, 1));
2693
+ : new FinalizationRegistry(ptr => wasm.__wbg_reconnectoptions_free(ptr, 1));
2644
2694
  const SubscribeOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
2645
2695
  ? { register: () => {}, unregister: () => {} }
2646
- : new FinalizationRegistry(ptr => wasm.__wbg_subscribeoptions_free(ptr >>> 0, 1));
2696
+ : new FinalizationRegistry(ptr => wasm.__wbg_subscribeoptions_free(ptr, 1));
2647
2697
  const TopicMappingFinalization = (typeof FinalizationRegistry === 'undefined')
2648
2698
  ? { register: () => {}, unregister: () => {} }
2649
- : new FinalizationRegistry(ptr => wasm.__wbg_topicmapping_free(ptr >>> 0, 1));
2699
+ : new FinalizationRegistry(ptr => wasm.__wbg_topicmapping_free(ptr, 1));
2650
2700
  const WillMessageFinalization = (typeof FinalizationRegistry === 'undefined')
2651
2701
  ? { register: () => {}, unregister: () => {} }
2652
- : new FinalizationRegistry(ptr => wasm.__wbg_willmessage_free(ptr >>> 0, 1));
2702
+ : new FinalizationRegistry(ptr => wasm.__wbg_willmessage_free(ptr, 1));
2653
2703
 
2654
2704
  function addHeapObject(obj) {
2655
2705
  if (heap_next === heap.length) heap.push(heap.length + 1);
@@ -2668,7 +2718,7 @@ function _assertClass(instance, klass) {
2668
2718
 
2669
2719
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
2670
2720
  ? { register: () => {}, unregister: () => {} }
2671
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
2721
+ : new FinalizationRegistry(state => wasm.__wbindgen_export5(state.a, state.b));
2672
2722
 
2673
2723
  function debugString(val) {
2674
2724
  // primitive types
@@ -2736,7 +2786,7 @@ function debugString(val) {
2736
2786
  }
2737
2787
 
2738
2788
  function dropObject(idx) {
2739
- if (idx < 132) return;
2789
+ if (idx < 1028) return;
2740
2790
  heap[idx] = heap_next;
2741
2791
  heap_next = idx;
2742
2792
  }
@@ -2770,8 +2820,7 @@ function getDataViewMemory0() {
2770
2820
  }
2771
2821
 
2772
2822
  function getStringFromWasm0(ptr, len) {
2773
- ptr = ptr >>> 0;
2774
- return decodeText(ptr, len);
2823
+ return decodeText(ptr >>> 0, len);
2775
2824
  }
2776
2825
 
2777
2826
  let cachedUint32ArrayMemory0 = null;
@@ -2800,7 +2849,7 @@ function handleError(f, args) {
2800
2849
  }
2801
2850
  }
2802
2851
 
2803
- let heap = new Array(128).fill(undefined);
2852
+ let heap = new Array(1024).fill(undefined);
2804
2853
  heap.push(undefined, null, true, false);
2805
2854
 
2806
2855
  let heap_next = heap.length;
@@ -2809,8 +2858,8 @@ function isLikeNone(x) {
2809
2858
  return x === undefined || x === null;
2810
2859
  }
2811
2860
 
2812
- function makeMutClosure(arg0, arg1, dtor, f) {
2813
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
2861
+ function makeMutClosure(arg0, arg1, f) {
2862
+ const state = { a: arg0, b: arg1, cnt: 1 };
2814
2863
  const real = (...args) => {
2815
2864
 
2816
2865
  // First up with a closure we increment the internal reference
@@ -2828,7 +2877,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
2828
2877
  };
2829
2878
  real._wbg_cb_unref = () => {
2830
2879
  if (--state.cnt === 0) {
2831
- state.dtor(state.a, state.b);
2880
+ wasm.__wbindgen_export5(state.a, state.b);
2832
2881
  state.a = 0;
2833
2882
  CLOSURE_DTORS.unregister(state);
2834
2883
  }
@@ -2916,8 +2965,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
2916
2965
 
2917
2966
  let WASM_VECTOR_LEN = 0;
2918
2967
 
2919
- let wasmModule, wasm;
2968
+ let wasmModule, wasmInstance, wasm;
2920
2969
  function __wbg_finalize_init(instance, module) {
2970
+ wasmInstance = instance;
2921
2971
  wasm = instance.exports;
2922
2972
  wasmModule = module;
2923
2973
  cachedDataViewMemory0 = null;
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mqtt5-wasm",
3
3
  "type": "module",
4
- "version": "1.3.2",
4
+ "version": "1.4.0",
5
5
  "description": "MQTT v5.0 WebAssembly client and broker for browser environments",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {