phirepass-widgets 0.0.111 → 0.0.113

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.
Files changed (89) hide show
  1. package/README.md +33 -0
  2. package/dist/cjs/{index-B8w6l0VL.js → index-CurErEK7.js} +101 -30
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/phirepass-downloader_3.cjs.entry.js +3696 -0
  5. package/dist/cjs/phirepass-rdp.cjs.entry.js +18 -6
  6. package/dist/cjs/phirepass-terminal.cjs.entry.js +6 -5
  7. package/dist/cjs/phirepass-widgets.cjs.js +3 -3
  8. package/dist/cjs/{protocol-CCD7cbHu.js → protocol-DCBMfc2u.js} +557 -360
  9. package/dist/collection/collection-manifest.json +3 -1
  10. package/dist/collection/common/channel.js +21 -1
  11. package/dist/collection/common/fetch.js +40 -0
  12. package/dist/collection/components/phirepass-downloader/form.js +69 -0
  13. package/dist/collection/components/phirepass-downloader/format.js +105 -0
  14. package/dist/collection/components/phirepass-downloader/jobs.js +370 -0
  15. package/dist/collection/components/phirepass-downloader/phirepass-downloader.css +1109 -0
  16. package/dist/collection/components/phirepass-downloader/phirepass-downloader.js +1455 -0
  17. package/dist/collection/components/phirepass-downloader/source.js +106 -0
  18. package/dist/collection/components/phirepass-downloader/views/dialogs.js +34 -0
  19. package/dist/collection/components/phirepass-downloader/views/fetch-form.js +65 -0
  20. package/dist/collection/components/phirepass-downloader/views/icons.js +33 -0
  21. package/dist/collection/components/phirepass-downloader/views/job-row.js +91 -0
  22. package/dist/collection/components/phirepass-downloader/views/notices.js +15 -0
  23. package/dist/collection/components/phirepass-downloader/views/states.js +19 -0
  24. package/dist/collection/components/phirepass-media-player/phirepass-media-player.css +216 -0
  25. package/dist/collection/components/phirepass-media-player/phirepass-media-player.js +473 -0
  26. package/dist/collection/components/phirepass-media-player/player.js +94 -0
  27. package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +36 -13
  28. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +122 -0
  29. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.fetch.js +35 -0
  30. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +181 -31
  31. package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +2 -2
  32. package/dist/collection/phirepass-channel_bg.wasm +0 -0
  33. package/dist/collection/testing/fixtures.js +219 -0
  34. package/dist/collection/testing/mock-channel.js +410 -0
  35. package/dist/components/index.js +1 -1
  36. package/dist/components/p-C4cmk3bS.js +1 -0
  37. package/dist/components/p-CsYQJXY2.js +1 -0
  38. package/dist/components/p-D6Geq8Rn.js +1 -0
  39. package/dist/components/phirepass-downloader.d.ts +11 -0
  40. package/dist/components/phirepass-downloader.js +1 -0
  41. package/dist/components/phirepass-media-player.d.ts +11 -0
  42. package/dist/components/phirepass-media-player.js +1 -0
  43. package/dist/components/phirepass-rdp.js +1 -1
  44. package/dist/components/phirepass-sftp-client.js +1 -1
  45. package/dist/components/phirepass-terminal.js +2 -2
  46. package/dist/esm/{index-DGq2b7rM.js → index-B9qUl6FW.js} +101 -30
  47. package/dist/esm/loader.js +3 -3
  48. package/dist/esm/phirepass-downloader_3.entry.js +3692 -0
  49. package/dist/esm/phirepass-rdp.entry.js +18 -6
  50. package/dist/esm/phirepass-terminal.entry.js +6 -5
  51. package/dist/esm/phirepass-widgets.js +4 -4
  52. package/dist/esm/{protocol-D4JeTIHt.js → protocol-CsYQJXY2.js} +556 -359
  53. package/dist/phirepass-widgets/p-1b84c526.entry.js +1 -0
  54. package/dist/phirepass-widgets/{p-9eebbf05.entry.js → p-41dd1ac9.entry.js} +2 -2
  55. package/dist/phirepass-widgets/p-614ab3de.entry.js +1 -0
  56. package/dist/phirepass-widgets/p-B9qUl6FW.js +3 -0
  57. package/dist/phirepass-widgets/p-CsYQJXY2.js +1 -0
  58. package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
  59. package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
  60. package/dist/types/common/channel.d.ts +30 -0
  61. package/dist/types/common/fetch.d.ts +161 -0
  62. package/dist/types/components/phirepass-downloader/form.d.ts +54 -0
  63. package/dist/types/components/phirepass-downloader/format.d.ts +17 -0
  64. package/dist/types/components/phirepass-downloader/jobs.d.ts +115 -0
  65. package/dist/types/components/phirepass-downloader/phirepass-downloader.d.ts +231 -0
  66. package/dist/types/components/phirepass-downloader/source.d.ts +61 -0
  67. package/dist/types/components/phirepass-downloader/views/dialogs.d.ts +52 -0
  68. package/dist/types/components/phirepass-downloader/views/fetch-form.d.ts +31 -0
  69. package/dist/types/components/phirepass-downloader/views/icons.d.ts +5 -0
  70. package/dist/types/components/phirepass-downloader/views/job-row.d.ts +21 -0
  71. package/dist/types/components/phirepass-downloader/views/notices.d.ts +18 -0
  72. package/dist/types/components/phirepass-downloader/views/states.d.ts +38 -0
  73. package/dist/types/components/phirepass-media-player/phirepass-media-player.d.ts +67 -0
  74. package/dist/types/components/phirepass-media-player/player.d.ts +43 -0
  75. package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +10 -0
  76. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +30 -0
  77. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.fetch.d.ts +40 -0
  78. package/dist/types/components.d.ts +426 -34
  79. package/dist/types/stencil-public-runtime.d.ts +1 -1
  80. package/dist/types/testing/fixtures.d.ts +25 -0
  81. package/dist/types/testing/mock-channel.d.ts +132 -0
  82. package/package.json +26 -12
  83. package/dist/cjs/phirepass-sftp-client.cjs.entry.js +0 -1469
  84. package/dist/components/p-D4JeTIHt.js +0 -1
  85. package/dist/esm/phirepass-sftp-client.entry.js +0 -1467
  86. package/dist/phirepass-widgets/p-401631af.entry.js +0 -1
  87. package/dist/phirepass-widgets/p-5f27300b.entry.js +0 -1
  88. package/dist/phirepass-widgets/p-D4JeTIHt.js +0 -1
  89. package/dist/phirepass-widgets/p-DGq2b7rM.js +0 -3
@@ -17,11 +17,19 @@ class Channel {
17
17
  * @param {number | null} [msg_id]
18
18
  */
19
19
  authenticate(token, node_id, msg_id) {
20
- const ptr0 = passStringToWasm0(token, wasm.__wbindgen_export, wasm.__wbindgen_export2);
21
- const len0 = WASM_VECTOR_LEN;
22
- const ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
23
- const len1 = WASM_VECTOR_LEN;
24
- wasm.channel_authenticate(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
20
+ const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
21
+ let ptr0, len0, ptr1, len1;
22
+ try {
23
+ ptr0 = passStringToWasm0(token, wasm.__wbindgen_export, wasm.__wbindgen_export2);
24
+ len0 = WASM_VECTOR_LEN;
25
+ ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
26
+ len1 = WASM_VECTOR_LEN;
27
+ } catch (e) {
28
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
29
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
30
+ throw e;
31
+ }
32
+ wasm.channel_authenticate(this.__wbg_ptr, ptr0, len0, ptr1, len1, val3);
25
33
  }
26
34
  connect() {
27
35
  wasm.channel_connect(this.__wbg_ptr);
@@ -38,21 +46,35 @@ class Channel {
38
46
  * @param {number | null} [msg_id]
39
47
  */
40
48
  create_service(node_id, kind, name, host, port, username, password, scheme, msg_id) {
41
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
42
- const len0 = WASM_VECTOR_LEN;
43
- const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
44
- const len1 = WASM_VECTOR_LEN;
45
- var ptr2 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
46
- var len2 = WASM_VECTOR_LEN;
47
- const ptr3 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
48
- const len3 = WASM_VECTOR_LEN;
49
- var ptr4 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
50
- var len4 = WASM_VECTOR_LEN;
51
- var ptr5 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
52
- var len5 = WASM_VECTOR_LEN;
53
- var ptr6 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
54
- var len6 = WASM_VECTOR_LEN;
55
- wasm.channel_create_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, port, ptr4, len4, ptr5, len5, ptr6, len6, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
49
+ const val8 = +port;
50
+ const val9 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
51
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6;
52
+ try {
53
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
54
+ len0 = WASM_VECTOR_LEN;
55
+ ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
56
+ len1 = WASM_VECTOR_LEN;
57
+ ptr2 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
58
+ len2 = WASM_VECTOR_LEN;
59
+ ptr3 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
60
+ len3 = WASM_VECTOR_LEN;
61
+ ptr4 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
62
+ len4 = WASM_VECTOR_LEN;
63
+ ptr5 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
64
+ len5 = WASM_VECTOR_LEN;
65
+ ptr6 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
66
+ len6 = WASM_VECTOR_LEN;
67
+ } catch (e) {
68
+ if (ptr6) { wasm.__wbindgen_export3(ptr6, len6 * 1, 1); }
69
+ if (ptr5) { wasm.__wbindgen_export3(ptr5, len5 * 1, 1); }
70
+ if (ptr4) { wasm.__wbindgen_export3(ptr4, len4 * 1, 1); }
71
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
72
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
73
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
74
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
75
+ throw e;
76
+ }
77
+ wasm.channel_create_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val8, ptr4, len4, ptr5, len5, ptr6, len6, val9);
56
78
  }
57
79
  /**
58
80
  * @param {string} node_id
@@ -60,11 +82,19 @@ class Channel {
60
82
  * @param {number | null} [msg_id]
61
83
  */
62
84
  delete_service(node_id, id, msg_id) {
63
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
64
- const len0 = WASM_VECTOR_LEN;
65
- const ptr1 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
66
- const len1 = WASM_VECTOR_LEN;
67
- wasm.channel_delete_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
85
+ const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
86
+ let ptr0, len0, ptr1, len1;
87
+ try {
88
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
89
+ len0 = WASM_VECTOR_LEN;
90
+ ptr1 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
91
+ len1 = WASM_VECTOR_LEN;
92
+ } catch (e) {
93
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
94
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
95
+ throw e;
96
+ }
97
+ wasm.channel_delete_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, val3);
68
98
  }
69
99
  disconnect() {
70
100
  wasm.channel_disconnect(this.__wbg_ptr);
@@ -89,12 +119,20 @@ class Channel {
89
119
  * @param {string | null} [server_id]
90
120
  */
91
121
  constructor(endpoint, node_id, server_id) {
92
- const ptr0 = passStringToWasm0(endpoint, wasm.__wbindgen_export, wasm.__wbindgen_export2);
93
- const len0 = WASM_VECTOR_LEN;
94
- const ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
95
- const len1 = WASM_VECTOR_LEN;
96
- var ptr2 = isLikeNone(server_id) ? 0 : passStringToWasm0(server_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
97
- var len2 = WASM_VECTOR_LEN;
122
+ let ptr0, len0, ptr1, len1, ptr2, len2;
123
+ try {
124
+ ptr0 = passStringToWasm0(endpoint, wasm.__wbindgen_export, wasm.__wbindgen_export2);
125
+ len0 = WASM_VECTOR_LEN;
126
+ ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
127
+ len1 = WASM_VECTOR_LEN;
128
+ ptr2 = isLikeNone(server_id) ? 0 : passStringToWasm0(server_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
129
+ len2 = WASM_VECTOR_LEN;
130
+ } catch (e) {
131
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
132
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
133
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
134
+ throw e;
135
+ }
98
136
  const ret = wasm.channel_new(ptr0, len0, ptr1, len1, ptr2, len2);
99
137
  this.__wbg_ptr = ret;
100
138
  ChannelFinalization.register(this, this.__wbg_ptr, this);
@@ -104,31 +142,31 @@ class Channel {
104
142
  * @param {Function | null} [cb]
105
143
  */
106
144
  on_connection_close(cb) {
107
- wasm.channel_on_connection_close(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
145
+ wasm.channel_on_connection_close(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
108
146
  }
109
147
  /**
110
148
  * @param {Function | null} [cb]
111
149
  */
112
150
  on_connection_error(cb) {
113
- wasm.channel_on_connection_error(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
151
+ wasm.channel_on_connection_error(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
114
152
  }
115
153
  /**
116
154
  * @param {Function | null} [cb]
117
155
  */
118
156
  on_connection_message(cb) {
119
- wasm.channel_on_connection_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
157
+ wasm.channel_on_connection_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
120
158
  }
121
159
  /**
122
160
  * @param {Function | null} [cb]
123
161
  */
124
162
  on_connection_open(cb) {
125
- wasm.channel_on_connection_open(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
163
+ wasm.channel_on_connection_open(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
126
164
  }
127
165
  /**
128
166
  * @param {Function | null} [cb]
129
167
  */
130
168
  on_protocol_message(cb) {
131
- wasm.channel_on_protocol_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
169
+ wasm.channel_on_protocol_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
132
170
  }
133
171
  /**
134
172
  * @param {string} frame_type
@@ -137,7 +175,7 @@ class Channel {
137
175
  on_protocol_message_type(frame_type, cb) {
138
176
  const ptr0 = passStringToWasm0(frame_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
139
177
  const len0 = WASM_VECTOR_LEN;
140
- wasm.channel_on_protocol_message_type(this.__wbg_ptr, ptr0, len0, isLikeNone(cb) ? 0 : addHeapObject(cb));
178
+ wasm.channel_on_protocol_message_type(this.__wbg_ptr, ptr0, len0, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
141
179
  }
142
180
  /**
143
181
  * Requests an RDP tunnel. Credentials are validated by the agent but are
@@ -156,15 +194,25 @@ class Channel {
156
194
  * @param {number | null} [msg_id]
157
195
  */
158
196
  open_rdp_tunnel(node_id, service_id, username, password, msg_id) {
159
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
160
- const len0 = WASM_VECTOR_LEN;
161
- const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
162
- const len1 = WASM_VECTOR_LEN;
163
- var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
164
- var len2 = WASM_VECTOR_LEN;
165
- var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
166
- var len3 = WASM_VECTOR_LEN;
167
- wasm.channel_open_rdp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
197
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
198
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
199
+ try {
200
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
201
+ len0 = WASM_VECTOR_LEN;
202
+ ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
203
+ len1 = WASM_VECTOR_LEN;
204
+ ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
205
+ len2 = WASM_VECTOR_LEN;
206
+ ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
207
+ len3 = WASM_VECTOR_LEN;
208
+ } catch (e) {
209
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
210
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
211
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
212
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
213
+ throw e;
214
+ }
215
+ wasm.channel_open_rdp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
168
216
  }
169
217
  /**
170
218
  * @param {string} node_id
@@ -174,15 +222,25 @@ class Channel {
174
222
  * @param {number | null} [msg_id]
175
223
  */
176
224
  open_sftp_tunnel(node_id, service_id, username, password, msg_id) {
177
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
178
- const len0 = WASM_VECTOR_LEN;
179
- const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
180
- const len1 = WASM_VECTOR_LEN;
181
- var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
182
- var len2 = WASM_VECTOR_LEN;
183
- var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
184
- var len3 = WASM_VECTOR_LEN;
185
- wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
225
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
226
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
227
+ try {
228
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
229
+ len0 = WASM_VECTOR_LEN;
230
+ ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
231
+ len1 = WASM_VECTOR_LEN;
232
+ ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
233
+ len2 = WASM_VECTOR_LEN;
234
+ ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
235
+ len3 = WASM_VECTOR_LEN;
236
+ } catch (e) {
237
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
238
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
239
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
240
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
241
+ throw e;
242
+ }
243
+ wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
186
244
  }
187
245
  /**
188
246
  * @param {string} node_id
@@ -192,15 +250,25 @@ class Channel {
192
250
  * @param {number | null} [msg_id]
193
251
  */
194
252
  open_ssh_tunnel(node_id, service_id, username, password, msg_id) {
195
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
196
- const len0 = WASM_VECTOR_LEN;
197
- const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
198
- const len1 = WASM_VECTOR_LEN;
199
- var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
200
- var len2 = WASM_VECTOR_LEN;
201
- var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
202
- var len3 = WASM_VECTOR_LEN;
203
- wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
253
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
254
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
255
+ try {
256
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
257
+ len0 = WASM_VECTOR_LEN;
258
+ ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
259
+ len1 = WASM_VECTOR_LEN;
260
+ ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
261
+ len2 = WASM_VECTOR_LEN;
262
+ ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
263
+ len3 = WASM_VECTOR_LEN;
264
+ } catch (e) {
265
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
266
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
267
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
268
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
269
+ throw e;
270
+ }
271
+ wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
204
272
  }
205
273
  /**
206
274
  * Set permission bits. The agent masks these to `0o7777`.
@@ -211,11 +279,21 @@ class Channel {
211
279
  * @param {number | null} [msg_id]
212
280
  */
213
281
  send_sftp_chmod(node_id, sid, path, permissions, msg_id) {
214
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
215
- const len0 = WASM_VECTOR_LEN;
216
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
217
- const len1 = WASM_VECTOR_LEN;
218
- wasm.channel_send_sftp_chmod(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, permissions, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
282
+ const val3 = +sid;
283
+ const val4 = +permissions;
284
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
285
+ let ptr0, len0, ptr1, len1;
286
+ try {
287
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
288
+ len0 = WASM_VECTOR_LEN;
289
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
290
+ len1 = WASM_VECTOR_LEN;
291
+ } catch (e) {
292
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
293
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
294
+ throw e;
295
+ }
296
+ wasm.channel_send_sftp_chmod(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4, val5);
219
297
  }
220
298
  /**
221
299
  * @param {string} node_id
@@ -225,13 +303,23 @@ class Channel {
225
303
  * @param {number | null} [msg_id]
226
304
  */
227
305
  send_sftp_delete(node_id, sid, path, filename, msg_id) {
228
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
229
- const len0 = WASM_VECTOR_LEN;
230
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
231
- const len1 = WASM_VECTOR_LEN;
232
- const ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
233
- const len2 = WASM_VECTOR_LEN;
234
- wasm.channel_send_sftp_delete(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
306
+ const val4 = +sid;
307
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
308
+ let ptr0, len0, ptr1, len1, ptr2, len2;
309
+ try {
310
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
311
+ len0 = WASM_VECTOR_LEN;
312
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
313
+ len1 = WASM_VECTOR_LEN;
314
+ ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
315
+ len2 = WASM_VECTOR_LEN;
316
+ } catch (e) {
317
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
318
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
319
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
320
+ throw e;
321
+ }
322
+ wasm.channel_send_sftp_delete(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
235
323
  }
236
324
  /**
237
325
  * Send a pipelining ACK to the agent: acknowledges all chunks with index ≤ ack_up_to
@@ -243,9 +331,12 @@ class Channel {
243
331
  * @param {number} ack_up_to
244
332
  */
245
333
  send_sftp_download_ack(node_id, sid, download_id, ack_up_to) {
334
+ const val2 = +sid;
335
+ const val3 = +download_id;
336
+ const val4 = +ack_up_to;
246
337
  const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
247
338
  const len0 = WASM_VECTOR_LEN;
248
- wasm.channel_send_sftp_download_ack(this.__wbg_ptr, ptr0, len0, sid, download_id, ack_up_to);
339
+ wasm.channel_send_sftp_download_ack(this.__wbg_ptr, ptr0, len0, val2, val3, val4);
249
340
  }
250
341
  /**
251
342
  * @param {string} node_id
@@ -255,9 +346,13 @@ class Channel {
255
346
  * @param {number | null} [msg_id]
256
347
  */
257
348
  send_sftp_download_chunk(node_id, sid, download_id, chunk_index, msg_id) {
349
+ const val2 = +sid;
350
+ const val3 = +download_id;
351
+ const val4 = +chunk_index;
352
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
258
353
  const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
259
354
  const len0 = WASM_VECTOR_LEN;
260
- wasm.channel_send_sftp_download_chunk(this.__wbg_ptr, ptr0, len0, sid, download_id, chunk_index, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
355
+ wasm.channel_send_sftp_download_chunk(this.__wbg_ptr, ptr0, len0, val2, val3, val4, val5);
261
356
  }
262
357
  /**
263
358
  * @param {string} node_id
@@ -267,13 +362,23 @@ class Channel {
267
362
  * @param {number | null} [msg_id]
268
363
  */
269
364
  send_sftp_download_start(node_id, sid, path, filename, msg_id) {
270
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
271
- const len0 = WASM_VECTOR_LEN;
272
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
273
- const len1 = WASM_VECTOR_LEN;
274
- const ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
275
- const len2 = WASM_VECTOR_LEN;
276
- wasm.channel_send_sftp_download_start(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
365
+ const val4 = +sid;
366
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
367
+ let ptr0, len0, ptr1, len1, ptr2, len2;
368
+ try {
369
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
370
+ len0 = WASM_VECTOR_LEN;
371
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
372
+ len1 = WASM_VECTOR_LEN;
373
+ ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
374
+ len2 = WASM_VECTOR_LEN;
375
+ } catch (e) {
376
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
377
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
378
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
379
+ throw e;
380
+ }
381
+ wasm.channel_send_sftp_download_start(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
277
382
  }
278
383
  /**
279
384
  * @param {string} node_id
@@ -282,11 +387,20 @@ class Channel {
282
387
  * @param {number | null} [msg_id]
283
388
  */
284
389
  send_sftp_list_data(node_id, sid, path, msg_id) {
285
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
286
- const len0 = WASM_VECTOR_LEN;
287
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
288
- const len1 = WASM_VECTOR_LEN;
289
- wasm.channel_send_sftp_list_data(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
390
+ const val3 = +sid;
391
+ const val4 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
392
+ let ptr0, len0, ptr1, len1;
393
+ try {
394
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
395
+ len0 = WASM_VECTOR_LEN;
396
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
397
+ len1 = WASM_VECTOR_LEN;
398
+ } catch (e) {
399
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
400
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
401
+ throw e;
402
+ }
403
+ wasm.channel_send_sftp_list_data(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
290
404
  }
291
405
  /**
292
406
  * Create one directory. Parents must exist already, as with `mkdir`.
@@ -296,11 +410,20 @@ class Channel {
296
410
  * @param {number | null} [msg_id]
297
411
  */
298
412
  send_sftp_mkdir(node_id, sid, path, msg_id) {
299
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
300
- const len0 = WASM_VECTOR_LEN;
301
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
302
- const len1 = WASM_VECTOR_LEN;
303
- wasm.channel_send_sftp_mkdir(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
413
+ const val3 = +sid;
414
+ const val4 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
415
+ let ptr0, len0, ptr1, len1;
416
+ try {
417
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
418
+ len0 = WASM_VECTOR_LEN;
419
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
420
+ len1 = WASM_VECTOR_LEN;
421
+ } catch (e) {
422
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
423
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
424
+ throw e;
425
+ }
426
+ wasm.channel_send_sftp_mkdir(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
304
427
  }
305
428
  /**
306
429
  * Read a whole file for the in-page editor. Answered with an
@@ -312,11 +435,20 @@ class Channel {
312
435
  * @param {number | null} [msg_id]
313
436
  */
314
437
  send_sftp_read_file(node_id, sid, path, msg_id) {
315
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
316
- const len0 = WASM_VECTOR_LEN;
317
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
318
- const len1 = WASM_VECTOR_LEN;
319
- wasm.channel_send_sftp_read_file(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
438
+ const val3 = +sid;
439
+ const val4 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
440
+ let ptr0, len0, ptr1, len1;
441
+ try {
442
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
443
+ len0 = WASM_VECTOR_LEN;
444
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
445
+ len1 = WASM_VECTOR_LEN;
446
+ } catch (e) {
447
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
448
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
449
+ throw e;
450
+ }
451
+ wasm.channel_send_sftp_read_file(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
320
452
  }
321
453
  /**
322
454
  * Remove a file, a symlink, or a directory. Without `recursive` the remote
@@ -328,11 +460,21 @@ class Channel {
328
460
  * @param {number | null} [msg_id]
329
461
  */
330
462
  send_sftp_remove(node_id, sid, path, recursive, msg_id) {
331
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
332
- const len0 = WASM_VECTOR_LEN;
333
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
334
- const len1 = WASM_VECTOR_LEN;
335
- wasm.channel_send_sftp_remove(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, recursive, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
463
+ const val3 = +sid;
464
+ const val4 = +recursive;
465
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
466
+ let ptr0, len0, ptr1, len1;
467
+ try {
468
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
469
+ len0 = WASM_VECTOR_LEN;
470
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
471
+ len1 = WASM_VECTOR_LEN;
472
+ } catch (e) {
473
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
474
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
475
+ throw e;
476
+ }
477
+ wasm.channel_send_sftp_remove(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4, val5);
336
478
  }
337
479
  /**
338
480
  * Rename or move. `to` is a full path, so one call covers both.
@@ -343,13 +485,23 @@ class Channel {
343
485
  * @param {number | null} [msg_id]
344
486
  */
345
487
  send_sftp_rename(node_id, sid, from, to, msg_id) {
346
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
347
- const len0 = WASM_VECTOR_LEN;
348
- const ptr1 = passStringToWasm0(from, wasm.__wbindgen_export, wasm.__wbindgen_export2);
349
- const len1 = WASM_VECTOR_LEN;
350
- const ptr2 = passStringToWasm0(to, wasm.__wbindgen_export, wasm.__wbindgen_export2);
351
- const len2 = WASM_VECTOR_LEN;
352
- wasm.channel_send_sftp_rename(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
488
+ const val4 = +sid;
489
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
490
+ let ptr0, len0, ptr1, len1, ptr2, len2;
491
+ try {
492
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
493
+ len0 = WASM_VECTOR_LEN;
494
+ ptr1 = passStringToWasm0(from, wasm.__wbindgen_export, wasm.__wbindgen_export2);
495
+ len1 = WASM_VECTOR_LEN;
496
+ ptr2 = passStringToWasm0(to, wasm.__wbindgen_export, wasm.__wbindgen_export2);
497
+ len2 = WASM_VECTOR_LEN;
498
+ } catch (e) {
499
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
500
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
501
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
502
+ throw e;
503
+ }
504
+ wasm.channel_send_sftp_rename(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
353
505
  }
354
506
  /**
355
507
  * @param {string} node_id
@@ -357,15 +509,27 @@ class Channel {
357
509
  * @param {number} upload_id
358
510
  * @param {number} chunk_index
359
511
  * @param {number} chunk_size
360
- * @param {Uint8Array} data
512
+ * @param {Uint8Array | number[]} data
361
513
  * @param {number | null} [msg_id]
362
514
  */
363
515
  send_sftp_upload_chunk(node_id, sid, upload_id, chunk_index, chunk_size, data, msg_id) {
364
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
365
- const len0 = WASM_VECTOR_LEN;
366
- const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_export);
367
- const len1 = WASM_VECTOR_LEN;
368
- wasm.channel_send_sftp_upload_chunk(this.__wbg_ptr, ptr0, len0, sid, upload_id, chunk_index, chunk_size, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
516
+ const val3 = +sid;
517
+ const val4 = +upload_id;
518
+ const val5 = +chunk_index;
519
+ const val6 = +chunk_size;
520
+ const val7 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
521
+ let ptr0, len0, ptr1, len1;
522
+ try {
523
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
524
+ len0 = WASM_VECTOR_LEN;
525
+ ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_export);
526
+ len1 = WASM_VECTOR_LEN;
527
+ } catch (e) {
528
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
529
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
530
+ throw e;
531
+ }
532
+ wasm.channel_send_sftp_upload_chunk(this.__wbg_ptr, ptr0, len0, val3, val4, val5, val6, ptr1, len1, val7);
369
533
  }
370
534
  /**
371
535
  * @param {string} node_id
@@ -377,30 +541,52 @@ class Channel {
377
541
  * @param {number | null} [msg_id]
378
542
  */
379
543
  send_sftp_upload_start(node_id, sid, filename, remote_path, total_chunks, total_size, msg_id) {
380
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
381
- const len0 = WASM_VECTOR_LEN;
382
- const ptr1 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
383
- const len1 = WASM_VECTOR_LEN;
384
- const ptr2 = passStringToWasm0(remote_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
385
- const len2 = WASM_VECTOR_LEN;
386
- wasm.channel_send_sftp_upload_start(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, total_chunks, total_size, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
544
+ const val4 = +sid;
545
+ const val5 = +total_chunks;
546
+ const val6 = BigInt.asIntN(64, total_size);
547
+ const val7 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
548
+ let ptr0, len0, ptr1, len1, ptr2, len2;
549
+ try {
550
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
551
+ len0 = WASM_VECTOR_LEN;
552
+ ptr1 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
553
+ len1 = WASM_VECTOR_LEN;
554
+ ptr2 = passStringToWasm0(remote_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
555
+ len2 = WASM_VECTOR_LEN;
556
+ } catch (e) {
557
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
558
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
559
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
560
+ throw e;
561
+ }
562
+ wasm.channel_send_sftp_upload_start(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5, val6, val7);
387
563
  }
388
564
  /**
389
565
  * Write a whole file back, truncating whatever was there.
390
566
  * @param {string} node_id
391
567
  * @param {number} sid
392
568
  * @param {string} path
393
- * @param {Uint8Array} contents
569
+ * @param {Uint8Array | number[]} contents
394
570
  * @param {number | null} [msg_id]
395
571
  */
396
572
  send_sftp_write_file(node_id, sid, path, contents, msg_id) {
397
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
398
- const len0 = WASM_VECTOR_LEN;
399
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
400
- const len1 = WASM_VECTOR_LEN;
401
- const ptr2 = passArray8ToWasm0(contents, wasm.__wbindgen_export);
402
- const len2 = WASM_VECTOR_LEN;
403
- wasm.channel_send_sftp_write_file(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
573
+ const val4 = +sid;
574
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
575
+ let ptr0, len0, ptr1, len1, ptr2, len2;
576
+ try {
577
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
578
+ len0 = WASM_VECTOR_LEN;
579
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
580
+ len1 = WASM_VECTOR_LEN;
581
+ ptr2 = passArray8ToWasm0(contents, wasm.__wbindgen_export);
582
+ len2 = WASM_VECTOR_LEN;
583
+ } catch (e) {
584
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
585
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
586
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
587
+ throw e;
588
+ }
589
+ wasm.channel_send_sftp_write_file(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
404
590
  }
405
591
  /**
406
592
  * @param {string} node_id
@@ -411,9 +597,14 @@ class Channel {
411
597
  * @param {number} px_height
412
598
  */
413
599
  send_ssh_terminal_resize(node_id, sid, cols, rows, px_width, px_height) {
600
+ const val2 = +sid;
601
+ const val3 = +cols;
602
+ const val4 = +rows;
603
+ const val5 = +px_width;
604
+ const val6 = +px_height;
414
605
  const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
415
606
  const len0 = WASM_VECTOR_LEN;
416
- wasm.channel_send_ssh_terminal_resize(this.__wbg_ptr, ptr0, len0, sid, cols, rows, px_width, px_height);
607
+ wasm.channel_send_ssh_terminal_resize(this.__wbg_ptr, ptr0, len0, val2, val3, val4, val5, val6);
417
608
  }
418
609
  /**
419
610
  * @param {string} node_id
@@ -421,11 +612,19 @@ class Channel {
421
612
  * @param {string} data
422
613
  */
423
614
  send_ssh_tunnel_data(node_id, sid, data) {
424
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
425
- const len0 = WASM_VECTOR_LEN;
426
- const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
427
- const len1 = WASM_VECTOR_LEN;
428
- wasm.channel_send_ssh_tunnel_data(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1);
615
+ const val3 = +sid;
616
+ let ptr0, len0, ptr1, len1;
617
+ try {
618
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
619
+ len0 = WASM_VECTOR_LEN;
620
+ ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
621
+ len1 = WASM_VECTOR_LEN;
622
+ } catch (e) {
623
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
624
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
625
+ throw e;
626
+ }
627
+ wasm.channel_send_ssh_tunnel_data(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1);
429
628
  }
430
629
  /**
431
630
  * @param {number} interval_as_millis
@@ -449,23 +648,38 @@ class Channel {
449
648
  * @param {number | null} [msg_id]
450
649
  */
451
650
  update_service(node_id, service_id, kind, name, host, port, username, password, scheme, msg_id) {
452
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
453
- const len0 = WASM_VECTOR_LEN;
454
- const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
455
- const len1 = WASM_VECTOR_LEN;
456
- const ptr2 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
457
- const len2 = WASM_VECTOR_LEN;
458
- var ptr3 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
459
- var len3 = WASM_VECTOR_LEN;
460
- const ptr4 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
461
- const len4 = WASM_VECTOR_LEN;
462
- var ptr5 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
463
- var len5 = WASM_VECTOR_LEN;
464
- var ptr6 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
465
- var len6 = WASM_VECTOR_LEN;
466
- var ptr7 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
467
- var len7 = WASM_VECTOR_LEN;
468
- wasm.channel_update_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, port, ptr5, len5, ptr6, len6, ptr7, len7, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
651
+ const val9 = +port;
652
+ const val10 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
653
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7;
654
+ try {
655
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
656
+ len0 = WASM_VECTOR_LEN;
657
+ ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
658
+ len1 = WASM_VECTOR_LEN;
659
+ ptr2 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
660
+ len2 = WASM_VECTOR_LEN;
661
+ ptr3 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
662
+ len3 = WASM_VECTOR_LEN;
663
+ ptr4 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
664
+ len4 = WASM_VECTOR_LEN;
665
+ ptr5 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
666
+ len5 = WASM_VECTOR_LEN;
667
+ ptr6 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
668
+ len6 = WASM_VECTOR_LEN;
669
+ ptr7 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
670
+ len7 = WASM_VECTOR_LEN;
671
+ } catch (e) {
672
+ if (ptr7) { wasm.__wbindgen_export3(ptr7, len7 * 1, 1); }
673
+ if (ptr6) { wasm.__wbindgen_export3(ptr6, len6 * 1, 1); }
674
+ if (ptr5) { wasm.__wbindgen_export3(ptr5, len5 * 1, 1); }
675
+ if (ptr4) { wasm.__wbindgen_export3(ptr4, len4 * 1, 1); }
676
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
677
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
678
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
679
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
680
+ throw e;
681
+ }
682
+ wasm.channel_update_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, val9, ptr5, len5, ptr6, len6, ptr7, len7, val10);
469
683
  }
470
684
  }
471
685
  if (Symbol.dispose) Channel.prototype[Symbol.dispose] = Channel.prototype.free;
@@ -483,193 +697,194 @@ const ErrorType = Object.freeze({
483
697
  function __wbg_get_imports() {
484
698
  const import0 = {
485
699
  __proto__: null,
486
- __wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
700
+ __wbg_Error_208446807d0d1e30: function(arg0, arg1) {
487
701
  const ret = Error(getStringFromWasm0(arg0, arg1));
488
- return addHeapObject(ret);
702
+ return ret;
489
703
  },
490
704
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
491
- const ret = String(getObject(arg1));
705
+ const ret = String(arg1);
492
706
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
493
707
  const len1 = WASM_VECTOR_LEN;
494
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
495
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
708
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
709
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
496
710
  },
497
- __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
498
- const ret = debugString(getObject(arg1));
711
+ __wbg___wbindgen_debug_string_f249a2a76caa9a55: function(arg0, arg1) {
712
+ const ret = debugString(arg1);
499
713
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
500
714
  const len1 = WASM_VECTOR_LEN;
501
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
502
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
715
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
716
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
503
717
  },
504
- __wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
505
- const obj = getObject(arg1);
718
+ __wbg___wbindgen_string_get_7ce8eee7fd327545: function(arg0, arg1) {
719
+ const obj = arg1;
506
720
  const ret = typeof(obj) === 'string' ? obj : undefined;
507
721
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
508
722
  var len1 = WASM_VECTOR_LEN;
509
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
510
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
723
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
724
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
511
725
  },
512
- __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
726
+ __wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
513
727
  throw new Error(getStringFromWasm0(arg0, arg1));
514
728
  },
515
- __wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
516
- getObject(arg0)._wbg_cb_unref();
729
+ __wbg__wbg_cb_unref_09736879a3f67559: function(arg0) {
730
+ arg0._wbg_cb_unref();
517
731
  },
518
- __wbg_call_1875a20c43a36133: function() { return handleError(function (arg0, arg1, arg2, arg3) {
519
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
520
- return addHeapObject(ret);
732
+ __wbg_call_40b008ba32f73991: function() { return handleError(function (arg0, arg1) {
733
+ const ret = arg0.call(arg1);
734
+ return ret;
521
735
  }, arguments); },
522
- __wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
523
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
524
- return addHeapObject(ret);
736
+ __wbg_call_a410eb4b59ed5965: function() { return handleError(function (arg0, arg1, arg2) {
737
+ const ret = arg0.call(arg1, arg2);
738
+ return ret;
525
739
  }, arguments); },
526
- __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
527
- const ret = getObject(arg0).call(getObject(arg1));
528
- return addHeapObject(ret);
740
+ __wbg_call_fc92fee6137d452d: function() { return handleError(function (arg0, arg1, arg2, arg3) {
741
+ const ret = arg0.call(arg1, arg2, arg3);
742
+ return ret;
529
743
  }, arguments); },
530
744
  __wbg_clearInterval_26ba580547547579: function(arg0) {
531
- const ret = clearInterval(takeObject(arg0));
532
- return addHeapObject(ret);
745
+ const ret = clearInterval(arg0);
746
+ return ret;
533
747
  },
534
- __wbg_close_d3ed56b5763be5ae: function() { return handleError(function (arg0) {
535
- getObject(arg0).close();
748
+ __wbg_close_5ee9c5fe4e8754a4: function() { return handleError(function (arg0) {
749
+ arg0.close();
536
750
  }, arguments); },
537
- __wbg_data_522f7abc70721269: function(arg0) {
538
- const ret = getObject(arg0).data;
539
- return addHeapObject(ret);
751
+ __wbg_data_c7e5e8500f1bca2f: function(arg0) {
752
+ const ret = arg0.data;
753
+ return ret;
540
754
  },
541
- __wbg_from_296ca31f8d0f1c52: function(arg0) {
542
- const ret = Array.from(getObject(arg0));
543
- return addHeapObject(ret);
755
+ __wbg_from_eac91875c8a5ffa4: function(arg0) {
756
+ const ret = Array.from(arg0);
757
+ return ret;
544
758
  },
545
- __wbg_getRandomValues_a608c4436c19407a: function() { return handleError(function (arg0, arg1) {
759
+ __wbg_getRandomValues_5d8c030b527203a6: function() { return handleError(function (arg0, arg1) {
546
760
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
547
761
  }, arguments); },
548
- __wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
549
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
550
- return addHeapObject(ret);
762
+ __wbg_get_2080c49015e35254: function() { return handleError(function (arg0, arg1) {
763
+ const ret = Reflect.get(arg0, arg1);
764
+ return ret;
551
765
  }, arguments); },
552
- __wbg_info_c2e816d395f9b883: function(arg0, arg1) {
766
+ __wbg_info_2b8ee6588e4c6072: function(arg0, arg1) {
553
767
  console.info(getStringFromWasm0(arg0, arg1));
554
768
  },
555
- __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
769
+ __wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
556
770
  let result;
557
771
  try {
558
- result = getObject(arg0) instanceof ArrayBuffer;
772
+ result = arg0 instanceof ArrayBuffer;
559
773
  } catch (_) {
560
774
  result = false;
561
775
  }
562
776
  const ret = result;
563
777
  return ret;
564
778
  },
565
- __wbg_length_7f3c00c40364105e: function(arg0) {
566
- const ret = getObject(arg0).length;
779
+ __wbg_length_186163212ffe79c3: function(arg0) {
780
+ const ret = arg0.length;
567
781
  return ret;
568
782
  },
569
- __wbg_new_1dbf7428bba60a42: function(arg0) {
570
- const ret = new Uint8Array(getObject(arg0));
571
- return addHeapObject(ret);
572
- },
573
- __wbg_new_617a8cdb8bb1130e: function() {
574
- const ret = new Object();
575
- return addHeapObject(ret);
783
+ __wbg_new_13de428334042d26: function(arg0) {
784
+ const ret = new Uint8Array(arg0);
785
+ return ret;
576
786
  },
577
- __wbg_new_ee2291f50781bf1d: function() {
787
+ __wbg_new_37eb45aaf5eeb820: function() {
578
788
  const ret = new Array();
579
- return addHeapObject(ret);
789
+ return ret;
580
790
  },
581
- __wbg_new_with_str_sequence_f79e461d58fdeacc: function() { return handleError(function (arg0, arg1, arg2) {
582
- const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getObject(arg2));
583
- return addHeapObject(ret);
791
+ __wbg_new_cd4348290afae586: function() {
792
+ const ret = new Object();
793
+ return ret;
794
+ },
795
+ __wbg_new_with_str_sequence_75b26d88172889d0: function() { return handleError(function (arg0, arg1, arg2) {
796
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
797
+ return ret;
584
798
  }, arguments); },
585
- __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
586
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
799
+ __wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
800
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
587
801
  },
588
- __wbg_push_2baf45db356cf468: function(arg0, arg1) {
589
- const ret = getObject(arg0).push(getObject(arg1));
802
+ __wbg_push_c9f4893fc209f768: function(arg0, arg1) {
803
+ const ret = arg0.push(arg1);
590
804
  return ret;
591
805
  },
592
- __wbg_readyState_d8514376867e415b: function(arg0) {
593
- const ret = getObject(arg0).readyState;
806
+ __wbg_readyState_039bc047141a5f6d: function(arg0) {
807
+ const ret = arg0.readyState;
594
808
  return ret;
595
809
  },
596
- __wbg_send_c1dad0ec2e52defb: function() { return handleError(function (arg0, arg1, arg2) {
597
- getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
810
+ __wbg_send_d83d0891cf698779: function() { return handleError(function (arg0, arg1, arg2) {
811
+ arg0.send(getArrayU8FromWasm0(arg1, arg2));
598
812
  }, arguments); },
599
- __wbg_setInterval_cbf1c35c6a692d37: function() { return handleError(function (arg0, arg1) {
600
- const ret = setInterval(getObject(arg0), arg1);
601
- return addHeapObject(ret);
813
+ __wbg_setInterval_d933acbf2578adfa: function() { return handleError(function (arg0, arg1) {
814
+ const ret = setInterval(arg0, arg1);
815
+ return ret;
602
816
  }, arguments); },
603
- __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
604
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
817
+ __wbg_set_binaryType_d5b4dafd0f127fb2: function(arg0, arg1) {
818
+ arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
605
819
  },
606
- __wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
607
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
820
+ __wbg_set_d2d33b52458e984a: function(arg0, arg1, arg2) {
821
+ arg0[arg1 >>> 0] = arg2;
608
822
  },
609
- __wbg_set_binaryType_21835bf0df8f70aa: function(arg0, arg1) {
610
- getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
823
+ __wbg_set_e4b9a833d288759a: function(arg0, arg1, arg2) {
824
+ arg0[arg1] = arg2;
611
825
  },
612
- __wbg_set_onclose_a84370531f3d2948: function(arg0, arg1) {
613
- getObject(arg0).onclose = getObject(arg1);
826
+ __wbg_set_onclose_078935cf8d0fb024: function(arg0, arg1) {
827
+ arg0.onclose = arg1;
614
828
  },
615
- __wbg_set_onerror_94ee307653399172: function(arg0, arg1) {
616
- getObject(arg0).onerror = getObject(arg1);
829
+ __wbg_set_onerror_f7f089f7f059501c: function(arg0, arg1) {
830
+ arg0.onerror = arg1;
617
831
  },
618
- __wbg_set_onmessage_cb6f77d2d8e0402a: function(arg0, arg1) {
619
- getObject(arg0).onmessage = getObject(arg1);
832
+ __wbg_set_onmessage_26abc49cfa5f9ffc: function(arg0, arg1) {
833
+ arg0.onmessage = arg1;
620
834
  },
621
- __wbg_set_onopen_c914147e8a2db4b0: function(arg0, arg1) {
622
- getObject(arg0).onopen = getObject(arg1);
835
+ __wbg_set_onopen_757be120cc7b1ea6: function(arg0, arg1) {
836
+ arg0.onopen = arg1;
623
837
  },
624
- __wbg_warn_ce1d5c8a41cfe303: function(arg0, arg1) {
838
+ __wbg_warn_b0df9a9e7105e74b: function(arg0, arg1) {
625
839
  console.warn(getStringFromWasm0(arg0, arg1));
626
840
  },
627
841
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
628
842
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
629
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_60);
630
- return addHeapObject(ret);
843
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63);
844
+ return ret;
631
845
  },
632
846
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
633
847
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
634
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_60_37);
635
- return addHeapObject(ret);
848
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63_37);
849
+ return ret;
636
850
  },
637
851
  __wbindgen_generic_0000000000000003: function(arg0, arg1) {
638
852
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
639
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_60_38);
640
- return addHeapObject(ret);
853
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63_38);
854
+ return ret;
641
855
  },
642
856
  __wbindgen_generic_0000000000000004: function(arg0, arg1) {
643
857
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
644
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_64);
645
- return addHeapObject(ret);
858
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_67);
859
+ return ret;
646
860
  },
647
861
  __wbindgen_generic_0000000000000005: function(arg0) {
648
862
  // Cast intrinsic for `F64 -> Externref`.
649
863
  const ret = arg0;
650
- return addHeapObject(ret);
864
+ return ret;
651
865
  },
652
866
  __wbindgen_generic_0000000000000006: function(arg0, arg1) {
653
867
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
654
868
  const ret = getArrayU8FromWasm0(arg0, arg1);
655
- return addHeapObject(ret);
869
+ return ret;
656
870
  },
657
871
  __wbindgen_generic_0000000000000007: function(arg0, arg1) {
658
872
  // Cast intrinsic for `Ref(String) -> Externref`.
659
873
  const ret = getStringFromWasm0(arg0, arg1);
660
- return addHeapObject(ret);
874
+ return ret;
661
875
  },
662
876
  __wbindgen_generic_0000000000000008: function(arg0) {
663
877
  // Cast intrinsic for `U64 -> Externref`.
664
878
  const ret = BigInt.asUintN(64, arg0);
665
- return addHeapObject(ret);
666
- },
667
- __wbindgen_object_clone_ref: function(arg0) {
668
- const ret = getObject(arg0);
669
- return addHeapObject(ret);
879
+ return ret;
670
880
  },
671
- __wbindgen_object_drop_ref: function(arg0) {
672
- takeObject(arg0);
881
+ __wbindgen_init_externref_table: function() {
882
+ const table = wasm.__wbindgen_externrefs;
883
+ table.set(0, undefined);
884
+ table.set(1024, undefined);
885
+ table.set(1025, null);
886
+ table.set(1026, true);
887
+ table.set(1027, false);
673
888
  },
674
889
  };
675
890
  return {
@@ -678,20 +893,20 @@ function __wbg_get_imports() {
678
893
  };
679
894
  }
680
895
 
681
- function __wasm_bindgen_func_elem_64(arg0, arg1) {
682
- wasm.__wasm_bindgen_func_elem_64(arg0, arg1);
896
+ function __wasm_bindgen_func_elem_67(arg0, arg1) {
897
+ wasm.__wasm_bindgen_func_elem_67(arg0, arg1);
683
898
  }
684
899
 
685
- function __wasm_bindgen_func_elem_60(arg0, arg1, arg2) {
686
- wasm.__wasm_bindgen_func_elem_60(arg0, arg1, addHeapObject(arg2));
900
+ function __wasm_bindgen_func_elem_63(arg0, arg1, arg2) {
901
+ wasm.__wasm_bindgen_func_elem_63(arg0, arg1, arg2);
687
902
  }
688
903
 
689
- function __wasm_bindgen_func_elem_60_37(arg0, arg1, arg2) {
690
- wasm.__wasm_bindgen_func_elem_60_37(arg0, arg1, addHeapObject(arg2));
904
+ function __wasm_bindgen_func_elem_63_37(arg0, arg1, arg2) {
905
+ wasm.__wasm_bindgen_func_elem_63_37(arg0, arg1, arg2);
691
906
  }
692
907
 
693
- function __wasm_bindgen_func_elem_60_38(arg0, arg1, arg2) {
694
- wasm.__wasm_bindgen_func_elem_60_38(arg0, arg1, addHeapObject(arg2));
908
+ function __wasm_bindgen_func_elem_63_38(arg0, arg1, arg2) {
909
+ wasm.__wasm_bindgen_func_elem_63_38(arg0, arg1, arg2);
695
910
  }
696
911
 
697
912
 
@@ -700,88 +915,72 @@ const ChannelFinalization = (typeof FinalizationRegistry === 'undefined')
700
915
  ? { register: () => {}, unregister: () => {} }
701
916
  : new FinalizationRegistry(ptr => wasm.__wbg_channel_free(ptr, 1));
702
917
 
703
- function addHeapObject(obj) {
704
- if (heap_next === heap.length) heap.push(heap.length + 1);
705
- const idx = heap_next;
706
- heap_next = heap[idx];
707
-
708
- heap[idx] = obj;
918
+ function addToExternrefTable0(obj) {
919
+ const idx = wasm.__wbindgen_export5();
920
+ wasm.__wbindgen_externrefs.set(idx, obj);
709
921
  return idx;
710
922
  }
711
923
 
712
924
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
713
925
  ? { register: () => {}, unregister: () => {} }
714
- : new FinalizationRegistry(state => wasm.__wbindgen_export4(state.a, state.b));
926
+ : new FinalizationRegistry(state => wasm.__wbindgen_export6(state.a, state.b));
715
927
 
716
928
  function debugString(val) {
717
- // primitive types
718
- const type = typeof val;
719
- if (type == 'number' || type == 'boolean' || val == null) {
720
- return `${val}`;
721
- }
722
- if (type == 'string') {
723
- return `"${val}"`;
724
- }
725
- if (type == 'symbol') {
726
- const description = val.description;
727
- if (description == null) {
728
- return 'Symbol';
729
- } else {
730
- return `Symbol(${description})`;
731
- }
732
- }
733
- if (type == 'function') {
734
- const name = val.name;
735
- if (typeof name == 'string' && name.length > 0) {
736
- return `Function(${name})`;
737
- } else {
738
- return 'Function';
739
- }
740
- }
741
- // objects
742
- if (Array.isArray(val)) {
743
- const length = val.length;
744
- let debug = '[';
745
- if (length > 0) {
746
- debug += debugString(val[0]);
747
- }
748
- for(let i = 1; i < length; i++) {
749
- debug += ', ' + debugString(val[i]);
750
- }
751
- debug += ']';
752
- return debug;
753
- }
754
- // Test for built-in
755
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
756
- let className;
757
- if (builtInMatches && builtInMatches.length > 1) {
758
- className = builtInMatches[1];
759
- } else {
760
- // Failed to match the standard '[object ClassName]'
761
- return toString.call(val);
762
- }
763
- if (className == 'Object') {
764
- // we're a user defined class or Object
765
- // JSON.stringify avoids problems with cycles, and is generally much
766
- // easier than looping through ownProperties of `val`.
767
- try {
768
- return 'Object(' + JSON.stringify(val) + ')';
769
- } catch (_) {
770
- return 'Object';
929
+ switch (typeof val) {
930
+ // primitive types
931
+ case 'number':
932
+ case 'boolean':
933
+ case 'undefined':
934
+ return `${val}`;
935
+ case 'string':
936
+ return JSON.stringify(val);
937
+ case 'bigint':
938
+ return `${val}n`;
939
+ case 'symbol':
940
+ return val.description !== undefined
941
+ ? `Symbol(${val.description})`
942
+ : 'Symbol';
943
+ case 'function':
944
+ return typeof val.name === 'string' && val.name !== ''
945
+ ? `Function(${val.name})`
946
+ : 'Function';
947
+ case 'object': {
948
+ if (val === null) {
949
+ return 'null';
950
+ }
951
+ // objects
952
+ if (Array.isArray(val)) {
953
+ return '[' + Array.from(val, debugString).join(', ') + ']';
954
+ }
955
+ // errors
956
+ if (val instanceof Error) {
957
+ return `${val.name}: ${val.message}\n${val.stack}`;
958
+ }
959
+
960
+ const toStringOutput = toString.call(val);
961
+ // Test for built-in
962
+ const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
963
+
964
+ // Failed to match the standard '[object ClassName]'
965
+ if (className === undefined) {
966
+ return toStringOutput;
967
+ }
968
+ if (className === 'Object') {
969
+ // we're a user defined class or Object
970
+ // JSON.stringify avoids problems with cycles, and is generally much
971
+ // easier than looping through ownProperties of `val`.
972
+ try {
973
+ return 'Object(' + JSON.stringify(val) + ')';
974
+ } catch (_) {
975
+ return 'Object';
976
+ }
977
+ }
978
+ // TODO we could test for more things here, like `Set`s and `Map`s.
979
+ return className;
771
980
  }
981
+ // Per MDN: 'This list of values is exhaustive.'
982
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
772
983
  }
773
- // errors
774
- if (val instanceof Error) {
775
- return `${val.name}: ${val.message}\n${val.stack}`;
776
- }
777
- // TODO we could test for more things here, like `Set`s and `Map`s.
778
- return className;
779
- }
780
-
781
- function dropObject(idx) {
782
- if (idx < 1028) return;
783
- heap[idx] = heap_next;
784
- heap_next = idx;
785
984
  }
786
985
 
787
986
  function getArrayU8FromWasm0(ptr, len) {
@@ -798,7 +997,8 @@ function getDataViewMemory0() {
798
997
  }
799
998
 
800
999
  function getStringFromWasm0(ptr, len) {
801
- return decodeText(ptr >>> 0, len);
1000
+ ptr = ptr >>> 0;
1001
+ return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
802
1002
  }
803
1003
 
804
1004
  let cachedUint8ArrayMemory0 = null;
@@ -809,21 +1009,15 @@ function getUint8ArrayMemory0() {
809
1009
  return cachedUint8ArrayMemory0;
810
1010
  }
811
1011
 
812
- function getObject(idx) { return heap[idx]; }
813
-
814
1012
  function handleError(f, args) {
815
1013
  try {
816
1014
  return f.apply(this, args);
817
1015
  } catch (e) {
818
- wasm.__wbindgen_export3(addHeapObject(e));
1016
+ const idx = addToExternrefTable0(e);
1017
+ wasm.__wbindgen_export4(idx);
819
1018
  }
820
1019
  }
821
1020
 
822
- let heap = new Array(1024).fill(undefined);
823
- heap.push(undefined, null, true, false);
824
-
825
- let heap_next = heap.length;
826
-
827
1021
  function isLikeNone(x) {
828
1022
  return x === undefined || x === null;
829
1023
  }
@@ -847,7 +1041,7 @@ function makeMutClosure(arg0, arg1, f) {
847
1041
  };
848
1042
  real._wbg_cb_unref = () => {
849
1043
  if (--state.cnt === 0) {
850
- wasm.__wbindgen_export4(state.a, state.b);
1044
+ wasm.__wbindgen_export6(state.a, state.b);
851
1045
  state.a = 0;
852
1046
  CLOSURE_DTORS.unregister(state);
853
1047
  }
@@ -900,24 +1094,18 @@ function passStringToWasm0(arg, malloc, realloc) {
900
1094
  return ptr;
901
1095
  }
902
1096
 
903
- function takeObject(idx) {
904
- const ret = getObject(idx);
905
- dropObject(idx);
906
- return ret;
907
- }
908
-
909
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1097
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
910
1098
  cachedTextDecoder.decode();
911
1099
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
912
1100
  let numBytesDecoded = 0;
913
- function decodeText(ptr, len) {
914
- numBytesDecoded += len;
1101
+ function decodeText(bytes) {
1102
+ numBytesDecoded += bytes.length;
915
1103
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
916
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1104
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
917
1105
  cachedTextDecoder.decode();
918
- numBytesDecoded = len;
1106
+ numBytesDecoded = bytes.length;
919
1107
  }
920
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1108
+ return cachedTextDecoder.decode(bytes);
921
1109
  }
922
1110
 
923
1111
  const cachedTextEncoder = new TextEncoder();
@@ -940,6 +1128,7 @@ function __wbg_finalize_init(instance, module) {
940
1128
  wasm = instance.exports;
941
1129
  cachedDataViewMemory0 = null;
942
1130
  cachedUint8ArrayMemory0 = null;
1131
+ wasm.__wbindgen_start();
943
1132
  return wasm;
944
1133
  }
945
1134
 
@@ -982,9 +1171,17 @@ async function __wbg_load(module, imports) {
982
1171
  }
983
1172
  }
984
1173
 
1174
+ let __wbg_init_promise;
985
1175
  async function __wbg_init(module_or_path) {
986
1176
  if (wasm !== undefined) return wasm;
1177
+ if (__wbg_init_promise === undefined) {
1178
+ __wbg_init_promise = __wbg_init_once(module_or_path);
1179
+ __wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
1180
+ }
1181
+ return __wbg_init_promise;
1182
+ }
987
1183
 
1184
+ async function __wbg_init_once(module_or_path) {
988
1185
 
989
1186
  if (module_or_path !== undefined) {
990
1187
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {