tabby-rdp 0.5.3 → 0.5.6

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.
@@ -1,14 +1,14 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- class Z {
4
+ class d {
5
5
  static __wrap(A) {
6
- const I = Object.create(Z.prototype);
7
- return I.__wbg_ptr = A, u.register(I, I.__wbg_ptr, I), I;
6
+ const I = Object.create(d.prototype);
7
+ return I.__wbg_ptr = A, $.register(I, I.__wbg_ptr, I), I;
8
8
  }
9
9
  __destroy_into_raw() {
10
10
  const A = this.__wbg_ptr;
11
- return this.__wbg_ptr = 0, u.unregister(this), A;
11
+ return this.__wbg_ptr = 0, $.unregister(this), A;
12
12
  }
13
13
  free() {
14
14
  const A = this.__destroy_into_raw();
@@ -19,7 +19,7 @@ class Z {
19
19
  * @param {Uint8Array} binary
20
20
  */
21
21
  addBinary(A, I) {
22
- const g = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), B = k, E = lA(I, C.__wbindgen_malloc), D = k;
22
+ const g = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), B = R, E = mA(I, C.__wbindgen_malloc), D = R;
23
23
  C.clipboarddata_addBinary(this.__wbg_ptr, g, B, E, D);
24
24
  }
25
25
  /**
@@ -27,12 +27,12 @@ class Z {
27
27
  * @param {string} text
28
28
  */
29
29
  addText(A, I) {
30
- const g = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), B = k, E = R(I, C.__wbindgen_malloc, C.__wbindgen_realloc), D = k;
30
+ const g = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), B = R, E = F(I, C.__wbindgen_malloc, C.__wbindgen_realloc), D = R;
31
31
  C.clipboarddata_addText(this.__wbg_ptr, g, B, E, D);
32
32
  }
33
33
  constructor() {
34
34
  const A = C.clipboarddata_create();
35
- return this.__wbg_ptr = A, u.register(this, this.__wbg_ptr, this), this;
35
+ return this.__wbg_ptr = A, $.register(this, this.__wbg_ptr, this), this;
36
36
  }
37
37
  /**
38
38
  * @returns {boolean}
@@ -45,19 +45,19 @@ class Z {
45
45
  */
46
46
  items() {
47
47
  const A = C.clipboarddata_items(this.__wbg_ptr);
48
- var I = pA(A[0], A[1]).slice();
48
+ var I = OA(A[0], A[1]).slice();
49
49
  return C.__wbindgen_free(A[0], A[1] * 4, 4), I;
50
50
  }
51
51
  }
52
- Symbol.dispose && (Z.prototype[Symbol.dispose] = Z.prototype.free);
53
- class f {
52
+ Symbol.dispose && (d.prototype[Symbol.dispose] = d.prototype.free);
53
+ class r {
54
54
  static __wrap(A) {
55
- const I = Object.create(f.prototype);
56
- return I.__wbg_ptr = A, CA.register(I, I.__wbg_ptr, I), I;
55
+ const I = Object.create(r.prototype);
56
+ return I.__wbg_ptr = A, wA.register(I, I.__wbg_ptr, I), I;
57
57
  }
58
58
  __destroy_into_raw() {
59
59
  const A = this.__wbg_ptr;
60
- return this.__wbg_ptr = 0, CA.unregister(this), A;
60
+ return this.__wbg_ptr = 0, wA.unregister(this), A;
61
61
  }
62
62
  free() {
63
63
  const A = this.__destroy_into_raw();
@@ -82,15 +82,15 @@ class f {
82
82
  return C.clipboarditem_value(this.__wbg_ptr);
83
83
  }
84
84
  }
85
- Symbol.dispose && (f.prototype[Symbol.dispose] = f.prototype.free);
86
- class p {
85
+ Symbol.dispose && (r.prototype[Symbol.dispose] = r.prototype.free);
86
+ class V {
87
87
  static __wrap(A) {
88
- const I = Object.create(p.prototype);
89
- return I.__wbg_ptr = A, _.register(I, I.__wbg_ptr, I), I;
88
+ const I = Object.create(V.prototype);
89
+ return I.__wbg_ptr = A, AA.register(I, I.__wbg_ptr, I), I;
90
90
  }
91
91
  __destroy_into_raw() {
92
92
  const A = this.__wbg_ptr;
93
- return this.__wbg_ptr = 0, _.unregister(this), A;
93
+ return this.__wbg_ptr = 0, AA.unregister(this), A;
94
94
  }
95
95
  free() {
96
96
  const A = this.__destroy_into_raw();
@@ -102,7 +102,7 @@ class p {
102
102
  */
103
103
  constructor(A, I) {
104
104
  const g = C.desktopsize_create(A, I);
105
- return this.__wbg_ptr = g, _.register(this, this.__wbg_ptr, this), this;
105
+ return this.__wbg_ptr = g, AA.register(this, this.__wbg_ptr, this), this;
106
106
  }
107
107
  /**
108
108
  * @returns {number}
@@ -129,15 +129,15 @@ class p {
129
129
  C.__wbg_set_desktopsize_width(this.__wbg_ptr, A);
130
130
  }
131
131
  }
132
- Symbol.dispose && (p.prototype[Symbol.dispose] = p.prototype.free);
133
- class K {
132
+ Symbol.dispose && (V.prototype[Symbol.dispose] = V.prototype.free);
133
+ class h {
134
134
  static __wrap(A) {
135
- const I = Object.create(K.prototype);
136
- return I.__wbg_ptr = A, EA.register(I, I.__wbg_ptr, I), I;
135
+ const I = Object.create(h.prototype);
136
+ return I.__wbg_ptr = A, GA.register(I, I.__wbg_ptr, I), I;
137
137
  }
138
138
  __destroy_into_raw() {
139
139
  const A = this.__wbg_ptr;
140
- return this.__wbg_ptr = 0, EA.unregister(this), A;
140
+ return this.__wbg_ptr = 0, GA.unregister(this), A;
141
141
  }
142
142
  free() {
143
143
  const A = this.__destroy_into_raw();
@@ -149,7 +149,7 @@ class K {
149
149
  */
150
150
  static keyPressed(A) {
151
151
  const I = C.deviceevent_keyPressed(A);
152
- return K.__wrap(I);
152
+ return h.__wrap(I);
153
153
  }
154
154
  /**
155
155
  * @param {number} scancode
@@ -157,7 +157,7 @@ class K {
157
157
  */
158
158
  static keyReleased(A) {
159
159
  const I = C.deviceevent_keyReleased(A);
160
- return K.__wrap(I);
160
+ return h.__wrap(I);
161
161
  }
162
162
  /**
163
163
  * @param {number} button
@@ -165,7 +165,7 @@ class K {
165
165
  */
166
166
  static mouseButtonPressed(A) {
167
167
  const I = C.deviceevent_mouseButtonPressed(A);
168
- return K.__wrap(I);
168
+ return h.__wrap(I);
169
169
  }
170
170
  /**
171
171
  * @param {number} button
@@ -173,7 +173,7 @@ class K {
173
173
  */
174
174
  static mouseButtonReleased(A) {
175
175
  const I = C.deviceevent_mouseButtonReleased(A);
176
- return K.__wrap(I);
176
+ return h.__wrap(I);
177
177
  }
178
178
  /**
179
179
  * @param {number} x
@@ -182,7 +182,7 @@ class K {
182
182
  */
183
183
  static mouseMove(A, I) {
184
184
  const g = C.deviceevent_mouseMove(A, I);
185
- return K.__wrap(g);
185
+ return h.__wrap(g);
186
186
  }
187
187
  /**
188
188
  * @param {string} unicode
@@ -190,9 +190,9 @@ class K {
190
190
  */
191
191
  static unicodePressed(A) {
192
192
  const I = A.codePointAt(0);
193
- FA(I);
193
+ MA(I);
194
194
  const g = C.deviceevent_unicodePressed(I);
195
- return K.__wrap(g);
195
+ return h.__wrap(g);
196
196
  }
197
197
  /**
198
198
  * @param {string} unicode
@@ -200,9 +200,9 @@ class K {
200
200
  */
201
201
  static unicodeReleased(A) {
202
202
  const I = A.codePointAt(0);
203
- FA(I);
203
+ MA(I);
204
204
  const g = C.deviceevent_unicodeReleased(I);
205
- return K.__wrap(g);
205
+ return h.__wrap(g);
206
206
  }
207
207
  /**
208
208
  * @param {boolean} vertical
@@ -212,14 +212,14 @@ class K {
212
212
  */
213
213
  static wheelRotations(A, I, g) {
214
214
  const B = C.deviceevent_wheelRotations(A, I, g);
215
- return K.__wrap(B);
215
+ return h.__wrap(B);
216
216
  }
217
217
  }
218
- Symbol.dispose && (K.prototype[Symbol.dispose] = K.prototype.free);
219
- class N {
218
+ Symbol.dispose && (h.prototype[Symbol.dispose] = h.prototype.free);
219
+ class k {
220
220
  __destroy_into_raw() {
221
221
  const A = this.__wbg_ptr;
222
- return this.__wbg_ptr = 0, DA.unregister(this), A;
222
+ return this.__wbg_ptr = 0, oA.unregister(this), A;
223
223
  }
224
224
  free() {
225
225
  const A = this.__destroy_into_raw();
@@ -230,15 +230,15 @@ class N {
230
230
  * @param {any} value
231
231
  */
232
232
  constructor(A, I) {
233
- const g = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), B = k, E = C.extension_create(g, B, I);
234
- return this.__wbg_ptr = E, DA.register(this, this.__wbg_ptr, this), this;
233
+ const g = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), B = R, E = C.extension_create(g, B, I);
234
+ return this.__wbg_ptr = E, oA.register(this, this.__wbg_ptr, this), this;
235
235
  }
236
236
  }
237
- Symbol.dispose && (N.prototype[Symbol.dispose] = N.prototype.free);
238
- class e {
237
+ Symbol.dispose && (k.prototype[Symbol.dispose] = k.prototype.free);
238
+ class _ {
239
239
  __destroy_into_raw() {
240
240
  const A = this.__wbg_ptr;
241
- return this.__wbg_ptr = 0, iA.unregister(this), A;
241
+ return this.__wbg_ptr = 0, NA.unregister(this), A;
242
242
  }
243
243
  free() {
244
244
  const A = this.__destroy_into_raw();
@@ -248,24 +248,24 @@ class e {
248
248
  * @param {DeviceEvent} event
249
249
  */
250
250
  addEvent(A) {
251
- V(A, K);
251
+ x(A, h);
252
252
  var I = A.__destroy_into_raw();
253
253
  C.inputtransaction_addEvent(this.__wbg_ptr, I);
254
254
  }
255
255
  constructor() {
256
256
  const A = C.inputtransaction_create();
257
- return this.__wbg_ptr = A, iA.register(this, this.__wbg_ptr, this), this;
257
+ return this.__wbg_ptr = A, NA.register(this, this.__wbg_ptr, this), this;
258
258
  }
259
259
  }
260
- Symbol.dispose && (e.prototype[Symbol.dispose] = e.prototype.free);
261
- class T {
260
+ Symbol.dispose && (_.prototype[Symbol.dispose] = _.prototype.free);
261
+ class n {
262
262
  static __wrap(A) {
263
- const I = Object.create(T.prototype);
264
- return I.__wbg_ptr = A, wA.register(I, I.__wbg_ptr, I), I;
263
+ const I = Object.create(n.prototype);
264
+ return I.__wbg_ptr = A, kA.register(I, I.__wbg_ptr, I), I;
265
265
  }
266
266
  __destroy_into_raw() {
267
267
  const A = this.__wbg_ptr;
268
- return this.__wbg_ptr = 0, wA.unregister(this), A;
268
+ return this.__wbg_ptr = 0, kA.unregister(this), A;
269
269
  }
270
270
  free() {
271
271
  const A = this.__destroy_into_raw();
@@ -294,18 +294,18 @@ class T {
294
294
  */
295
295
  rdcleanpathDetails() {
296
296
  const A = C.ironerror_rdcleanpathDetails(this.__wbg_ptr);
297
- return A === 0 ? void 0 : n.__wrap(A);
297
+ return A === 0 ? void 0 : z.__wrap(A);
298
298
  }
299
299
  }
300
- Symbol.dispose && (T.prototype[Symbol.dispose] = T.prototype.free);
301
- class n {
300
+ Symbol.dispose && (n.prototype[Symbol.dispose] = n.prototype.free);
301
+ class z {
302
302
  static __wrap(A) {
303
- const I = Object.create(n.prototype);
304
- return I.__wbg_ptr = A, GA.register(I, I.__wbg_ptr, I), I;
303
+ const I = Object.create(z.prototype);
304
+ return I.__wbg_ptr = A, RA.register(I, I.__wbg_ptr, I), I;
305
305
  }
306
306
  __destroy_into_raw() {
307
307
  const A = this.__wbg_ptr;
308
- return this.__wbg_ptr = 0, GA.unregister(this), A;
308
+ return this.__wbg_ptr = 0, RA.unregister(this), A;
309
309
  }
310
310
  free() {
311
311
  const A = this.__destroy_into_raw();
@@ -357,11 +357,11 @@ class n {
357
357
  return A === 16777215 ? void 0 : A;
358
358
  }
359
359
  }
360
- Symbol.dispose && (n.prototype[Symbol.dispose] = n.prototype.free);
361
- class QA {
360
+ Symbol.dispose && (z.prototype[Symbol.dispose] = z.prototype.free);
361
+ class iA {
362
362
  __destroy_into_raw() {
363
363
  const A = this.__wbg_ptr;
364
- return this.__wbg_ptr = 0, oA.unregister(this), A;
364
+ return this.__wbg_ptr = 0, FA.unregister(this), A;
365
365
  }
366
366
  free() {
367
367
  const A = this.__destroy_into_raw();
@@ -369,14 +369,14 @@ class QA {
369
369
  }
370
370
  constructor() {
371
371
  const A = C.rdpfile_create();
372
- return this.__wbg_ptr = A, oA.register(this, this.__wbg_ptr, this), this;
372
+ return this.__wbg_ptr = A, FA.register(this, this.__wbg_ptr, this), this;
373
373
  }
374
374
  /**
375
375
  * @param {string} key
376
376
  * @returns {number | undefined}
377
377
  */
378
378
  getInt(A) {
379
- const I = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = k, B = C.rdpfile_getInt(this.__wbg_ptr, I, g);
379
+ const I = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = R, B = C.rdpfile_getInt(this.__wbg_ptr, I, g);
380
380
  return B === Number.MAX_SAFE_INTEGER ? void 0 : B;
381
381
  }
382
382
  /**
@@ -384,7 +384,7 @@ class QA {
384
384
  * @returns {string | undefined}
385
385
  */
386
386
  getStr(A) {
387
- const I = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = k, B = C.rdpfile_getStr(this.__wbg_ptr, I, g);
387
+ const I = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = R, B = C.rdpfile_getStr(this.__wbg_ptr, I, g);
388
388
  let E;
389
389
  return B[0] !== 0 && (E = y(B[0], B[1]).slice(), C.__wbindgen_free(B[0], B[1] * 1, 1)), E;
390
390
  }
@@ -393,7 +393,7 @@ class QA {
393
393
  * @param {number} value
394
394
  */
395
395
  insertInt(A, I) {
396
- const g = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), B = k;
396
+ const g = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), B = R;
397
397
  C.rdpfile_insertInt(this.__wbg_ptr, g, B, I);
398
398
  }
399
399
  /**
@@ -401,14 +401,14 @@ class QA {
401
401
  * @param {string} value
402
402
  */
403
403
  insertStr(A, I) {
404
- const g = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), B = k, E = R(I, C.__wbindgen_malloc, C.__wbindgen_realloc), D = k;
404
+ const g = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), B = R, E = F(I, C.__wbindgen_malloc, C.__wbindgen_realloc), D = R;
405
405
  C.rdpfile_insertStr(this.__wbg_ptr, g, B, E, D);
406
406
  }
407
407
  /**
408
408
  * @param {string} config
409
409
  */
410
410
  parse(A) {
411
- const I = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = k;
411
+ const I = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = R;
412
412
  C.rdpfile_parse(this.__wbg_ptr, I, g);
413
413
  }
414
414
  /**
@@ -424,15 +424,15 @@ class QA {
424
424
  }
425
425
  }
426
426
  }
427
- Symbol.dispose && (QA.prototype[Symbol.dispose] = QA.prototype.free);
428
- class r {
427
+ Symbol.dispose && (iA.prototype[Symbol.dispose] = iA.prototype.free);
428
+ class P {
429
429
  static __wrap(A) {
430
- const I = Object.create(r.prototype);
431
- return I.__wbg_ptr = A, NA.register(I, I.__wbg_ptr, I), I;
430
+ const I = Object.create(P.prototype);
431
+ return I.__wbg_ptr = A, yA.register(I, I.__wbg_ptr, I), I;
432
432
  }
433
433
  __destroy_into_raw() {
434
434
  const A = this.__wbg_ptr;
435
- return this.__wbg_ptr = 0, NA.unregister(this), A;
435
+ return this.__wbg_ptr = 0, yA.unregister(this), A;
436
436
  }
437
437
  free() {
438
438
  const A = this.__destroy_into_raw();
@@ -442,42 +442,42 @@ class r {
442
442
  * @param {InputTransaction} transaction
443
443
  */
444
444
  applyInputs(A) {
445
- V(A, e);
445
+ x(A, _);
446
446
  var I = A.__destroy_into_raw();
447
447
  const g = C.session_applyInputs(this.__wbg_ptr, I);
448
448
  if (g[1])
449
- throw q(g[0]);
449
+ throw p(g[0]);
450
450
  }
451
451
  /**
452
452
  * @returns {DesktopSize}
453
453
  */
454
454
  desktopSize() {
455
455
  const A = C.session_desktopSize(this.__wbg_ptr);
456
- return p.__wrap(A);
456
+ return V.__wrap(A);
457
457
  }
458
458
  /**
459
459
  * @param {Extension} ext
460
460
  * @returns {any}
461
461
  */
462
462
  invokeExtension(A) {
463
- V(A, N);
463
+ x(A, k);
464
464
  var I = A.__destroy_into_raw();
465
465
  const g = C.session_invokeExtension(this.__wbg_ptr, I);
466
466
  if (g[2])
467
- throw q(g[1]);
468
- return q(g[0]);
467
+ throw p(g[1]);
468
+ return p(g[0]);
469
469
  }
470
470
  /**
471
471
  * @param {ClipboardData} content
472
472
  * @returns {Promise<void>}
473
473
  */
474
474
  onClipboardPaste(A) {
475
- return V(A, Z), C.session_onClipboardPaste(this.__wbg_ptr, A.__wbg_ptr);
475
+ return x(A, d), C.session_onClipboardPaste(this.__wbg_ptr, A.__wbg_ptr);
476
476
  }
477
477
  releaseAllInputs() {
478
478
  const A = C.session_releaseAllInputs(this.__wbg_ptr);
479
479
  if (A[1])
480
- throw q(A[0]);
480
+ throw p(A[0]);
481
481
  }
482
482
  /**
483
483
  * @param {number} width
@@ -487,7 +487,7 @@ class r {
487
487
  * @param {number | null} [physical_height]
488
488
  */
489
489
  resize(A, I, g, B, E) {
490
- C.session_resize(this.__wbg_ptr, A, I, h(g) ? Number.MAX_SAFE_INTEGER : g >>> 0, h(B) ? Number.MAX_SAFE_INTEGER : B >>> 0, h(E) ? Number.MAX_SAFE_INTEGER : E >>> 0);
490
+ C.session_resize(this.__wbg_ptr, A, I, H(g) ? Number.MAX_SAFE_INTEGER : g >>> 0, H(B) ? Number.MAX_SAFE_INTEGER : B >>> 0, H(E) ? Number.MAX_SAFE_INTEGER : E >>> 0);
491
491
  }
492
492
  /**
493
493
  * @returns {Promise<SessionTerminationInfo>}
@@ -498,7 +498,7 @@ class r {
498
498
  shutdown() {
499
499
  const A = C.session_shutdown(this.__wbg_ptr);
500
500
  if (A[1])
501
- throw q(A[0]);
501
+ throw p(A[0]);
502
502
  }
503
503
  /**
504
504
  * @returns {boolean}
@@ -515,18 +515,18 @@ class r {
515
515
  synchronizeLockKeys(A, I, g, B) {
516
516
  const E = C.session_synchronizeLockKeys(this.__wbg_ptr, A, I, g, B);
517
517
  if (E[1])
518
- throw q(E[0]);
518
+ throw p(E[0]);
519
519
  }
520
520
  }
521
- Symbol.dispose && (r.prototype[Symbol.dispose] = r.prototype.free);
522
- class c {
521
+ Symbol.dispose && (P.prototype[Symbol.dispose] = P.prototype.free);
522
+ class J {
523
523
  static __wrap(A) {
524
- const I = Object.create(c.prototype);
525
- return I.__wbg_ptr = A, $.register(I, I.__wbg_ptr, I), I;
524
+ const I = Object.create(J.prototype);
525
+ return I.__wbg_ptr = A, IA.register(I, I.__wbg_ptr, I), I;
526
526
  }
527
527
  __destroy_into_raw() {
528
528
  const A = this.__wbg_ptr;
529
- return this.__wbg_ptr = 0, $.unregister(this), A;
529
+ return this.__wbg_ptr = 0, IA.unregister(this), A;
530
530
  }
531
531
  free() {
532
532
  const A = this.__destroy_into_raw();
@@ -537,8 +537,8 @@ class c {
537
537
  * @returns {SessionBuilder}
538
538
  */
539
539
  authToken(A) {
540
- const I = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = k, B = C.sessionbuilder_authToken(this.__wbg_ptr, I, g);
541
- return c.__wrap(B);
540
+ const I = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = R, B = C.sessionbuilder_authToken(this.__wbg_ptr, I, g);
541
+ return J.__wrap(B);
542
542
  }
543
543
  /**
544
544
  * @param {Function} callback
@@ -546,7 +546,7 @@ class c {
546
546
  */
547
547
  canvasResizedCallback(A) {
548
548
  const I = C.sessionbuilder_canvasResizedCallback(this.__wbg_ptr, A);
549
- return c.__wrap(I);
549
+ return J.__wrap(I);
550
550
  }
551
551
  /**
552
552
  * @returns {Promise<Session>}
@@ -556,35 +556,35 @@ class c {
556
556
  }
557
557
  constructor() {
558
558
  const A = C.sessionbuilder_create();
559
- return this.__wbg_ptr = A, $.register(this, this.__wbg_ptr, this), this;
559
+ return this.__wbg_ptr = A, IA.register(this, this.__wbg_ptr, this), this;
560
560
  }
561
561
  /**
562
562
  * @param {DesktopSize} desktop_size
563
563
  * @returns {SessionBuilder}
564
564
  */
565
565
  desktopSize(A) {
566
- V(A, p);
566
+ x(A, V);
567
567
  var I = A.__destroy_into_raw();
568
568
  const g = C.sessionbuilder_desktopSize(this.__wbg_ptr, I);
569
- return c.__wrap(g);
569
+ return J.__wrap(g);
570
570
  }
571
571
  /**
572
572
  * @param {string} destination
573
573
  * @returns {SessionBuilder}
574
574
  */
575
575
  destination(A) {
576
- const I = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = k, B = C.sessionbuilder_destination(this.__wbg_ptr, I, g);
577
- return c.__wrap(B);
576
+ const I = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = R, B = C.sessionbuilder_destination(this.__wbg_ptr, I, g);
577
+ return J.__wrap(B);
578
578
  }
579
579
  /**
580
580
  * @param {Extension} ext
581
581
  * @returns {SessionBuilder}
582
582
  */
583
583
  extension(A) {
584
- V(A, N);
584
+ x(A, k);
585
585
  var I = A.__destroy_into_raw();
586
586
  const g = C.sessionbuilder_extension(this.__wbg_ptr, I);
587
- return c.__wrap(g);
587
+ return J.__wrap(g);
588
588
  }
589
589
  /**
590
590
  * @param {Function} callback
@@ -592,23 +592,23 @@ class c {
592
592
  */
593
593
  forceClipboardUpdateCallback(A) {
594
594
  const I = C.sessionbuilder_forceClipboardUpdateCallback(this.__wbg_ptr, A);
595
- return c.__wrap(I);
595
+ return J.__wrap(I);
596
596
  }
597
597
  /**
598
598
  * @param {string} password
599
599
  * @returns {SessionBuilder}
600
600
  */
601
601
  password(A) {
602
- const I = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = k, B = C.sessionbuilder_password(this.__wbg_ptr, I, g);
603
- return c.__wrap(B);
602
+ const I = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = R, B = C.sessionbuilder_password(this.__wbg_ptr, I, g);
603
+ return J.__wrap(B);
604
604
  }
605
605
  /**
606
606
  * @param {string} address
607
607
  * @returns {SessionBuilder}
608
608
  */
609
609
  proxyAddress(A) {
610
- const I = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = k, B = C.sessionbuilder_proxyAddress(this.__wbg_ptr, I, g);
611
- return c.__wrap(B);
610
+ const I = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = R, B = C.sessionbuilder_proxyAddress(this.__wbg_ptr, I, g);
611
+ return J.__wrap(B);
612
612
  }
613
613
  /**
614
614
  * @param {Function} callback
@@ -616,7 +616,7 @@ class c {
616
616
  */
617
617
  remoteClipboardChangedCallback(A) {
618
618
  const I = C.sessionbuilder_remoteClipboardChangedCallback(this.__wbg_ptr, A);
619
- return c.__wrap(I);
619
+ return J.__wrap(I);
620
620
  }
621
621
  /**
622
622
  * @param {HTMLCanvasElement} canvas
@@ -624,15 +624,15 @@ class c {
624
624
  */
625
625
  renderCanvas(A) {
626
626
  const I = C.sessionbuilder_renderCanvas(this.__wbg_ptr, A);
627
- return c.__wrap(I);
627
+ return J.__wrap(I);
628
628
  }
629
629
  /**
630
630
  * @param {string} server_domain
631
631
  * @returns {SessionBuilder}
632
632
  */
633
633
  serverDomain(A) {
634
- const I = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = k, B = C.sessionbuilder_serverDomain(this.__wbg_ptr, I, g);
635
- return c.__wrap(B);
634
+ const I = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = R, B = C.sessionbuilder_serverDomain(this.__wbg_ptr, I, g);
635
+ return J.__wrap(B);
636
636
  }
637
637
  /**
638
638
  * @param {Function} callback
@@ -640,7 +640,7 @@ class c {
640
640
  */
641
641
  setCursorStyleCallback(A) {
642
642
  const I = C.sessionbuilder_setCursorStyleCallback(this.__wbg_ptr, A);
643
- return c.__wrap(I);
643
+ return J.__wrap(I);
644
644
  }
645
645
  /**
646
646
  * @param {any} context
@@ -648,26 +648,26 @@ class c {
648
648
  */
649
649
  setCursorStyleCallbackContext(A) {
650
650
  const I = C.sessionbuilder_setCursorStyleCallbackContext(this.__wbg_ptr, A);
651
- return c.__wrap(I);
651
+ return J.__wrap(I);
652
652
  }
653
653
  /**
654
654
  * @param {string} username
655
655
  * @returns {SessionBuilder}
656
656
  */
657
657
  username(A) {
658
- const I = R(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = k, B = C.sessionbuilder_username(this.__wbg_ptr, I, g);
659
- return c.__wrap(B);
658
+ const I = F(A, C.__wbindgen_malloc, C.__wbindgen_realloc), g = R, B = C.sessionbuilder_username(this.__wbg_ptr, I, g);
659
+ return J.__wrap(B);
660
660
  }
661
661
  }
662
- Symbol.dispose && (c.prototype[Symbol.dispose] = c.prototype.free);
663
- class P {
662
+ Symbol.dispose && (J.prototype[Symbol.dispose] = J.prototype.free);
663
+ class v {
664
664
  static __wrap(A) {
665
- const I = Object.create(P.prototype);
666
- return I.__wbg_ptr = A, kA.register(I, I.__wbg_ptr, I), I;
665
+ const I = Object.create(v.prototype);
666
+ return I.__wbg_ptr = A, YA.register(I, I.__wbg_ptr, I), I;
667
667
  }
668
668
  __destroy_into_raw() {
669
669
  const A = this.__wbg_ptr;
670
- return this.__wbg_ptr = 0, kA.unregister(this), A;
670
+ return this.__wbg_ptr = 0, YA.unregister(this), A;
671
671
  }
672
672
  free() {
673
673
  const A = this.__destroy_into_raw();
@@ -686,23 +686,23 @@ class P {
686
686
  }
687
687
  }
688
688
  }
689
- Symbol.dispose && (P.prototype[Symbol.dispose] = P.prototype.free);
690
- function JA(Q) {
691
- const A = R(Q, C.__wbindgen_malloc, C.__wbindgen_realloc), I = k;
689
+ Symbol.dispose && (v.prototype[Symbol.dispose] = v.prototype.free);
690
+ function hA(Q) {
691
+ const A = F(Q, C.__wbindgen_malloc, C.__wbindgen_realloc), I = R;
692
692
  C.setup(A, I);
693
693
  }
694
- function UA() {
694
+ function aA() {
695
695
  return {
696
696
  __proto__: null,
697
697
  "./ironrdp_web_bg.js": {
698
698
  __proto__: null,
699
699
  __wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(A) {
700
700
  const I = A, g = typeof I == "boolean" ? I : void 0;
701
- return h(g) ? 16777215 : g ? 1 : 0;
701
+ return H(g) ? 16777215 : g ? 1 : 0;
702
702
  },
703
703
  __wbg___wbindgen_debug_string_c25d447a39f5578f: function(A, I) {
704
- const g = gA(I), B = R(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = k;
705
- M().setInt32(A + 4, E, true), M().setInt32(A + 0, B, true);
704
+ const g = QA(I), B = F(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = R;
705
+ Y().setInt32(A + 4, E, true), Y().setInt32(A + 0, B, true);
706
706
  },
707
707
  __wbg___wbindgen_is_function_1ff95bcc5517c252: function(A) {
708
708
  return typeof A == "function";
@@ -722,12 +722,12 @@ function UA() {
722
722
  },
723
723
  __wbg___wbindgen_number_get_394265ed1e1b84ee: function(A, I) {
724
724
  const g = I, B = typeof g == "number" ? g : void 0;
725
- M().setFloat64(A + 8, h(B) ? 0 : B, true), M().setInt32(A + 0, !h(B), true);
725
+ Y().setFloat64(A + 8, H(B) ? 0 : B, true), Y().setInt32(A + 0, !H(B), true);
726
726
  },
727
727
  __wbg___wbindgen_string_get_b0ca35b86a603356: function(A, I) {
728
728
  const g = I, B = typeof g == "string" ? g : void 0;
729
- var E = h(B) ? 0 : R(B, C.__wbindgen_malloc, C.__wbindgen_realloc), D = k;
730
- M().setInt32(A + 4, D, true), M().setInt32(A + 0, E, true);
729
+ var E = H(B) ? 0 : F(B, C.__wbindgen_malloc, C.__wbindgen_realloc), D = R;
730
+ Y().setInt32(A + 4, D, true), Y().setInt32(A + 0, E, true);
731
731
  },
732
732
  __wbg___wbindgen_throw_344f42d3211c4765: function(A, I) {
733
733
  throw new Error(y(A, I));
@@ -782,10 +782,10 @@ function UA() {
782
782
  return clearTimeout(A);
783
783
  },
784
784
  __wbg_clipboarddata_new: function(A) {
785
- return Z.__wrap(A);
785
+ return d.__wrap(A);
786
786
  },
787
787
  __wbg_clipboarditem_new: function(A) {
788
- return f.__wrap(A);
788
+ return r.__wrap(A);
789
789
  },
790
790
  __wbg_close_c65ca0257e895318: function() {
791
791
  return o(function(A) {
@@ -826,22 +826,22 @@ function UA() {
826
826
  __wbg_getContext_e79ddf6a9cb3cc76: function() {
827
827
  return o(function(A, I, g) {
828
828
  const B = A.getContext(y(I, g));
829
- return h(B) ? 0 : L(B);
829
+ return H(B) ? 0 : q(B);
830
830
  }, arguments);
831
831
  },
832
832
  __wbg_getRandomValues_3f44b700395062e5: function() {
833
833
  return o(function(A, I) {
834
- globalThis.crypto.getRandomValues(t(A, I));
834
+ globalThis.crypto.getRandomValues(m(A, I));
835
835
  }, arguments);
836
836
  },
837
837
  __wbg_getRandomValues_bf16787eede473f5: function() {
838
838
  return o(function(A, I) {
839
- globalThis.crypto.getRandomValues(t(A, I));
839
+ globalThis.crypto.getRandomValues(m(A, I));
840
840
  }, arguments);
841
841
  },
842
842
  __wbg_getRandomValues_cc7f052a444bb2ce: function() {
843
843
  return o(function(A, I) {
844
- globalThis.crypto.getRandomValues(t(A, I));
844
+ globalThis.crypto.getRandomValues(m(A, I));
845
845
  }, arguments);
846
846
  },
847
847
  __wbg_getTime_d6f070c088c9b5ed: function(A) {
@@ -928,7 +928,7 @@ function UA() {
928
928
  return I;
929
929
  },
930
930
  __wbg_ironerror_new: function(A) {
931
- return T.__wrap(A);
931
+ return n.__wrap(A);
932
932
  },
933
933
  __wbg_isArray_0677c962b281d01a: function(A) {
934
934
  return Array.isArray(A);
@@ -984,10 +984,10 @@ function UA() {
984
984
  }, arguments);
985
985
  },
986
986
  __wbg_new_from_slice_7568ba55b4a7e81f: function(A, I) {
987
- return new Uint32Array(dA(A, I));
987
+ return new Uint32Array(WA(A, I));
988
988
  },
989
989
  __wbg_new_from_slice_77cdfb7977362f3c: function(A, I) {
990
- return new Uint8Array(t(A, I));
990
+ return new Uint8Array(m(A, I));
991
991
  },
992
992
  __wbg_new_typed_1824d93f294193e5: function(A, I) {
993
993
  try {
@@ -995,7 +995,7 @@ function UA() {
995
995
  const w = g.a;
996
996
  g.a = 0;
997
997
  try {
998
- return sA(w, g.b, D, i);
998
+ return pA(w, g.b, D, i);
999
999
  } finally {
1000
1000
  g.a = w;
1001
1001
  }
@@ -1027,7 +1027,7 @@ function UA() {
1027
1027
  },
1028
1028
  __wbg_new_with_u8_clamped_array_and_sh_2767e4741c267d25: function() {
1029
1029
  return o(function(A, I, g, B) {
1030
- return new ImageData(VA(A, I), g >>> 0, B >>> 0);
1030
+ return new ImageData(xA(A, I), g >>> 0, B >>> 0);
1031
1031
  }, arguments);
1032
1032
  },
1033
1033
  __wbg_now_390768da5ee9e776: function(A) {
@@ -1047,13 +1047,13 @@ function UA() {
1047
1047
  },
1048
1048
  __wbg_performance_3ef602e13d6c3b56: function(A) {
1049
1049
  const I = A.performance;
1050
- return h(I) ? 0 : L(I);
1050
+ return H(I) ? 0 : q(I);
1051
1051
  },
1052
1052
  __wbg_performance_3fcf6e32a7e1ed0a: function(A) {
1053
1053
  return A.performance;
1054
1054
  },
1055
1055
  __wbg_prototypesetcall_4770620bbe4688a0: function(A, I, g) {
1056
- Uint8Array.prototype.set.call(t(A, I), g);
1056
+ Uint8Array.prototype.set.call(m(A, I), g);
1057
1057
  },
1058
1058
  __wbg_push_d2ae3af0c1217ae6: function(A, I) {
1059
1059
  return A.push(I);
@@ -1073,8 +1073,8 @@ function UA() {
1073
1073
  return A.readyState;
1074
1074
  },
1075
1075
  __wbg_reason_5dc8e429d537d6a9: function(A, I) {
1076
- const g = I.reason, B = R(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = k;
1077
- M().setInt32(A + 4, E, true), M().setInt32(A + 0, B, true);
1076
+ const g = I.reason, B = F(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = R;
1077
+ Y().setInt32(A + 4, E, true), Y().setInt32(A + 0, B, true);
1078
1078
  },
1079
1079
  __wbg_removeEventListener_a3f23c70077bdcc1: function() {
1080
1080
  return o(function(A, I, g, B) {
@@ -1085,8 +1085,8 @@ function UA() {
1085
1085
  return Promise.resolve(A);
1086
1086
  },
1087
1087
  __wbg_search_c905fb82fd20bc6b: function(A, I) {
1088
- const g = I.search, B = R(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = k;
1089
- M().setInt32(A + 4, E, true), M().setInt32(A + 0, B, true);
1088
+ const g = I.search, B = F(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = R;
1089
+ Y().setInt32(A + 4, E, true), Y().setInt32(A + 0, B, true);
1090
1090
  },
1091
1091
  __wbg_send_1733c45567a373ff: function() {
1092
1092
  return o(function(A, I) {
@@ -1099,10 +1099,10 @@ function UA() {
1099
1099
  }, arguments);
1100
1100
  },
1101
1101
  __wbg_session_new: function(A) {
1102
- return r.__wrap(A);
1102
+ return P.__wrap(A);
1103
1103
  },
1104
1104
  __wbg_sessionterminationinfo_new: function(A) {
1105
- return P.__wrap(A);
1105
+ return v.__wrap(A);
1106
1106
  },
1107
1107
  __wbg_setInterval_cbf1c35c6a692d37: function() {
1108
1108
  return o(function(A, I) {
@@ -1125,7 +1125,7 @@ function UA() {
1125
1125
  }, arguments);
1126
1126
  },
1127
1127
  __wbg_set_binaryType_a37b086c78ca7c29: function(A, I) {
1128
- A.binaryType = ZA[I];
1128
+ A.binaryType = VA[I];
1129
1129
  },
1130
1130
  __wbg_set_body_029f2d171e0a005f: function(A, I) {
1131
1131
  A.body = I;
@@ -1155,28 +1155,28 @@ function UA() {
1155
1155
  A.width = I >>> 0;
1156
1156
  },
1157
1157
  __wbg_stack_3b0d974bbf31e44f: function(A, I) {
1158
- const g = I.stack, B = R(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = k;
1159
- M().setInt32(A + 4, E, true), M().setInt32(A + 0, B, true);
1158
+ const g = I.stack, B = F(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = R;
1159
+ Y().setInt32(A + 4, E, true), Y().setInt32(A + 0, B, true);
1160
1160
  },
1161
1161
  __wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
1162
1162
  const A = typeof global > "u" ? null : global;
1163
- return h(A) ? 0 : L(A);
1163
+ return H(A) ? 0 : q(A);
1164
1164
  },
1165
1165
  __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
1166
1166
  const A = typeof globalThis > "u" ? null : globalThis;
1167
- return h(A) ? 0 : L(A);
1167
+ return H(A) ? 0 : q(A);
1168
1168
  },
1169
1169
  __wbg_static_accessor_SELF_146583524fe1469b: function() {
1170
1170
  const A = typeof self > "u" ? null : self;
1171
- return h(A) ? 0 : L(A);
1171
+ return H(A) ? 0 : q(A);
1172
1172
  },
1173
1173
  __wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
1174
1174
  const A = typeof window > "u" ? null : window;
1175
- return h(A) ? 0 : L(A);
1175
+ return H(A) ? 0 : q(A);
1176
1176
  },
1177
1177
  __wbg_statusText_9f08c32741a99815: function(A, I) {
1178
- const g = I.statusText, B = R(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = k;
1179
- M().setInt32(A + 4, E, true), M().setInt32(A + 0, B, true);
1178
+ const g = I.statusText, B = F(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = R;
1179
+ Y().setInt32(A + 4, E, true), Y().setInt32(A + 0, B, true);
1180
1180
  },
1181
1181
  __wbg_status_c45b3b9b3033184a: function(A) {
1182
1182
  return A.status;
@@ -1194,13 +1194,13 @@ function UA() {
1194
1194
  return A.toString();
1195
1195
  },
1196
1196
  __wbg_url_f6cd241d61f89b82: function(A, I) {
1197
- const g = I.url, B = R(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = k;
1198
- M().setInt32(A + 4, E, true), M().setInt32(A + 0, B, true);
1197
+ const g = I.url, B = F(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = R;
1198
+ Y().setInt32(A + 4, E, true), Y().setInt32(A + 0, B, true);
1199
1199
  },
1200
1200
  __wbg_userAgent_0558f0ac642f7771: function() {
1201
1201
  return o(function(A, I) {
1202
- const g = I.userAgent, B = R(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = k;
1203
- M().setInt32(A + 4, E, true), M().setInt32(A + 0, B, true);
1202
+ const g = I.userAgent, B = F(g, C.__wbindgen_malloc, C.__wbindgen_realloc), E = R;
1203
+ Y().setInt32(A + 4, E, true), Y().setInt32(A + 0, B, true);
1204
1204
  }, arguments);
1205
1205
  },
1206
1206
  __wbg_warn_b1370d804fa3e259: function(A) {
@@ -1213,25 +1213,25 @@ function UA() {
1213
1213
  return A.width;
1214
1214
  },
1215
1215
  __wbindgen_cast_0000000000000001: function(A, I) {
1216
- return S(A, I, LA);
1216
+ return s(A, I, ZA);
1217
1217
  },
1218
1218
  __wbindgen_cast_0000000000000002: function(A, I) {
1219
- return S(A, I, aA);
1219
+ return s(A, I, LA);
1220
1220
  },
1221
1221
  __wbindgen_cast_0000000000000003: function(A, I) {
1222
- return S(A, I, HA);
1222
+ return s(A, I, sA);
1223
1223
  },
1224
1224
  __wbindgen_cast_0000000000000004: function(A, I) {
1225
- return S(A, I, SA);
1225
+ return s(A, I, qA);
1226
1226
  },
1227
1227
  __wbindgen_cast_0000000000000005: function(A, I) {
1228
- return S(A, I, qA);
1228
+ return s(A, I, dA);
1229
1229
  },
1230
1230
  __wbindgen_cast_0000000000000006: function(A, I) {
1231
- return S(A, I, KA);
1231
+ return s(A, I, HA);
1232
1232
  },
1233
1233
  __wbindgen_cast_0000000000000007: function(A, I) {
1234
- return S(A, I, hA);
1234
+ return s(A, I, SA);
1235
1235
  },
1236
1236
  __wbindgen_cast_0000000000000008: function(A) {
1237
1237
  return A;
@@ -1246,72 +1246,72 @@ function UA() {
1246
1246
  }
1247
1247
  };
1248
1248
  }
1249
- function KA(Q, A) {
1249
+ function HA(Q, A) {
1250
1250
  C.wasm_bindgen__convert__closures_____invoke__h38edb88495230029(Q, A);
1251
1251
  }
1252
- function hA(Q, A) {
1252
+ function SA(Q, A) {
1253
1253
  C.wasm_bindgen__convert__closures_____invoke__h59fff34e32ed8cec(Q, A);
1254
1254
  }
1255
- function aA(Q, A, I) {
1255
+ function LA(Q, A, I) {
1256
1256
  C.wasm_bindgen__convert__closures_____invoke__h64a57be2ca3e0d69(Q, A, I);
1257
1257
  }
1258
- function HA(Q, A, I) {
1258
+ function sA(Q, A, I) {
1259
1259
  C.wasm_bindgen__convert__closures_____invoke__h64a57be2ca3e0d69_2(Q, A, I);
1260
1260
  }
1261
- function SA(Q, A, I) {
1261
+ function qA(Q, A, I) {
1262
1262
  C.wasm_bindgen__convert__closures_____invoke__h64a57be2ca3e0d69_3(Q, A, I);
1263
1263
  }
1264
- function LA(Q, A, I) {
1264
+ function ZA(Q, A, I) {
1265
1265
  const g = C.wasm_bindgen__convert__closures_____invoke__hfbb046a5343bcac9(Q, A, I);
1266
1266
  if (g[1])
1267
- throw q(g[0]);
1267
+ throw p(g[0]);
1268
1268
  }
1269
- function sA(Q, A, I, g) {
1269
+ function pA(Q, A, I, g) {
1270
1270
  C.wasm_bindgen__convert__closures_____invoke__h4cc111f3c9bb2945(Q, A, I, g);
1271
1271
  }
1272
- function qA(Q, A, I, g, B) {
1272
+ function dA(Q, A, I, g, B) {
1273
1273
  C.wasm_bindgen__convert__closures_____invoke__h777de2c1fe9da8ab(Q, A, I, g, B);
1274
1274
  }
1275
- const ZA = ["blob", "arraybuffer"], u = typeof FinalizationRegistry > "u" ? { register: () => {
1275
+ const VA = ["blob", "arraybuffer"], $ = typeof FinalizationRegistry > "u" ? { register: () => {
1276
1276
  }, unregister: () => {
1277
- } } : new FinalizationRegistry((Q) => C.__wbg_clipboarddata_free(Q, 1)), CA = typeof FinalizationRegistry > "u" ? { register: () => {
1277
+ } } : new FinalizationRegistry((Q) => C.__wbg_clipboarddata_free(Q, 1)), wA = typeof FinalizationRegistry > "u" ? { register: () => {
1278
1278
  }, unregister: () => {
1279
- } } : new FinalizationRegistry((Q) => C.__wbg_clipboarditem_free(Q, 1)), _ = typeof FinalizationRegistry > "u" ? { register: () => {
1279
+ } } : new FinalizationRegistry((Q) => C.__wbg_clipboarditem_free(Q, 1)), AA = typeof FinalizationRegistry > "u" ? { register: () => {
1280
1280
  }, unregister: () => {
1281
- } } : new FinalizationRegistry((Q) => C.__wbg_desktopsize_free(Q, 1)), EA = typeof FinalizationRegistry > "u" ? { register: () => {
1281
+ } } : new FinalizationRegistry((Q) => C.__wbg_desktopsize_free(Q, 1)), GA = typeof FinalizationRegistry > "u" ? { register: () => {
1282
1282
  }, unregister: () => {
1283
- } } : new FinalizationRegistry((Q) => C.__wbg_deviceevent_free(Q, 1)), DA = typeof FinalizationRegistry > "u" ? { register: () => {
1283
+ } } : new FinalizationRegistry((Q) => C.__wbg_deviceevent_free(Q, 1)), oA = typeof FinalizationRegistry > "u" ? { register: () => {
1284
1284
  }, unregister: () => {
1285
- } } : new FinalizationRegistry((Q) => C.__wbg_extension_free(Q, 1)), iA = typeof FinalizationRegistry > "u" ? { register: () => {
1285
+ } } : new FinalizationRegistry((Q) => C.__wbg_extension_free(Q, 1)), NA = typeof FinalizationRegistry > "u" ? { register: () => {
1286
1286
  }, unregister: () => {
1287
- } } : new FinalizationRegistry((Q) => C.__wbg_inputtransaction_free(Q, 1)), wA = typeof FinalizationRegistry > "u" ? { register: () => {
1287
+ } } : new FinalizationRegistry((Q) => C.__wbg_inputtransaction_free(Q, 1)), kA = typeof FinalizationRegistry > "u" ? { register: () => {
1288
1288
  }, unregister: () => {
1289
- } } : new FinalizationRegistry((Q) => C.__wbg_ironerror_free(Q, 1)), GA = typeof FinalizationRegistry > "u" ? { register: () => {
1289
+ } } : new FinalizationRegistry((Q) => C.__wbg_ironerror_free(Q, 1)), RA = typeof FinalizationRegistry > "u" ? { register: () => {
1290
1290
  }, unregister: () => {
1291
- } } : new FinalizationRegistry((Q) => C.__wbg_rdcleanpathdetails_free(Q, 1)), oA = typeof FinalizationRegistry > "u" ? { register: () => {
1291
+ } } : new FinalizationRegistry((Q) => C.__wbg_rdcleanpathdetails_free(Q, 1)), FA = typeof FinalizationRegistry > "u" ? { register: () => {
1292
1292
  }, unregister: () => {
1293
- } } : new FinalizationRegistry((Q) => C.__wbg_rdpfile_free(Q, 1)), NA = typeof FinalizationRegistry > "u" ? { register: () => {
1293
+ } } : new FinalizationRegistry((Q) => C.__wbg_rdpfile_free(Q, 1)), yA = typeof FinalizationRegistry > "u" ? { register: () => {
1294
1294
  }, unregister: () => {
1295
- } } : new FinalizationRegistry((Q) => C.__wbg_session_free(Q, 1)), $ = typeof FinalizationRegistry > "u" ? { register: () => {
1295
+ } } : new FinalizationRegistry((Q) => C.__wbg_session_free(Q, 1)), IA = typeof FinalizationRegistry > "u" ? { register: () => {
1296
1296
  }, unregister: () => {
1297
- } } : new FinalizationRegistry((Q) => C.__wbg_sessionbuilder_free(Q, 1)), kA = typeof FinalizationRegistry > "u" ? { register: () => {
1297
+ } } : new FinalizationRegistry((Q) => C.__wbg_sessionbuilder_free(Q, 1)), YA = typeof FinalizationRegistry > "u" ? { register: () => {
1298
1298
  }, unregister: () => {
1299
1299
  } } : new FinalizationRegistry((Q) => C.__wbg_sessionterminationinfo_free(Q, 1));
1300
- function L(Q) {
1300
+ function q(Q) {
1301
1301
  const A = C.__externref_table_alloc();
1302
1302
  return C.__wbindgen_externrefs.set(A, Q), A;
1303
1303
  }
1304
- function FA(Q) {
1304
+ function MA(Q) {
1305
1305
  if (typeof Q == "number" && (Q >= 1114112 || Q >= 55296 && Q < 57344)) throw new Error(`expected a valid Unicode scalar value, found ${Q}`);
1306
1306
  }
1307
- function V(Q, A) {
1307
+ function x(Q, A) {
1308
1308
  if (!(Q instanceof A))
1309
1309
  throw new Error(`expected instance of ${A.name}`);
1310
1310
  }
1311
- const RA = typeof FinalizationRegistry > "u" ? { register: () => {
1311
+ const JA = typeof FinalizationRegistry > "u" ? { register: () => {
1312
1312
  }, unregister: () => {
1313
1313
  } } : new FinalizationRegistry((Q) => C.__wbindgen_destroy_closure(Q.a, Q.b));
1314
- function gA(Q) {
1314
+ function QA(Q) {
1315
1315
  const A = typeof Q;
1316
1316
  if (A == "number" || A == "boolean" || Q == null)
1317
1317
  return `${Q}`;
@@ -1328,9 +1328,9 @@ function gA(Q) {
1328
1328
  if (Array.isArray(Q)) {
1329
1329
  const B = Q.length;
1330
1330
  let E = "[";
1331
- B > 0 && (E += gA(Q[0]));
1331
+ B > 0 && (E += QA(Q[0]));
1332
1332
  for (let D = 1; D < B; D++)
1333
- E += ", " + gA(Q[D]);
1333
+ E += ", " + QA(Q[D]);
1334
1334
  return E += "]", E;
1335
1335
  }
1336
1336
  const I = /\[object ([^\]]+)\]/.exec(toString.call(Q));
@@ -1348,53 +1348,53 @@ function gA(Q) {
1348
1348
  return Q instanceof Error ? `${Q.name}: ${Q.message}
1349
1349
  ${Q.stack}` : g;
1350
1350
  }
1351
- function pA(Q, A) {
1351
+ function OA(Q, A) {
1352
1352
  Q = Q >>> 0;
1353
- const I = M(), g = [];
1353
+ const I = Y(), g = [];
1354
1354
  for (let B = Q; B < Q + 4 * A; B += 4)
1355
1355
  g.push(C.__wbindgen_externrefs.get(I.getUint32(B, true)));
1356
1356
  return C.__externref_drop_slice(Q, A), g;
1357
1357
  }
1358
- function dA(Q, A) {
1359
- return Q = Q >>> 0, WA().subarray(Q / 4, Q / 4 + A);
1358
+ function WA(Q, A) {
1359
+ return Q = Q >>> 0, tA().subarray(Q / 4, Q / 4 + A);
1360
1360
  }
1361
- function t(Q, A) {
1362
- return Q = Q >>> 0, W().subarray(Q / 1, Q / 1 + A);
1361
+ function m(Q, A) {
1362
+ return Q = Q >>> 0, t().subarray(Q / 1, Q / 1 + A);
1363
1363
  }
1364
- function VA(Q, A) {
1365
- return Q = Q >>> 0, xA().subarray(Q / 1, Q / 1 + A);
1364
+ function xA(Q, A) {
1365
+ return Q = Q >>> 0, lA().subarray(Q / 1, Q / 1 + A);
1366
1366
  }
1367
- let s = null;
1368
- function M() {
1369
- return (s === null || s.buffer.detached === true || s.buffer.detached === void 0 && s.buffer !== C.memory.buffer) && (s = new DataView(C.memory.buffer)), s;
1367
+ let Z = null;
1368
+ function Y() {
1369
+ return (Z === null || Z.buffer.detached === true || Z.buffer.detached === void 0 && Z.buffer !== C.memory.buffer) && (Z = new DataView(C.memory.buffer)), Z;
1370
1370
  }
1371
1371
  function y(Q, A) {
1372
- return jA(Q >>> 0, A);
1372
+ return bA(Q >>> 0, A);
1373
1373
  }
1374
1374
  let b = null;
1375
- function WA() {
1375
+ function tA() {
1376
1376
  return (b === null || b.byteLength === 0) && (b = new Uint32Array(C.memory.buffer)), b;
1377
1377
  }
1378
- let m = null;
1379
- function W() {
1380
- return (m === null || m.byteLength === 0) && (m = new Uint8Array(C.memory.buffer)), m;
1378
+ let T = null;
1379
+ function t() {
1380
+ return (T === null || T.byteLength === 0) && (T = new Uint8Array(C.memory.buffer)), T;
1381
1381
  }
1382
- let O = null;
1383
- function xA() {
1384
- return (O === null || O.byteLength === 0) && (O = new Uint8ClampedArray(C.memory.buffer)), O;
1382
+ let X = null;
1383
+ function lA() {
1384
+ return (X === null || X.byteLength === 0) && (X = new Uint8ClampedArray(C.memory.buffer)), X;
1385
1385
  }
1386
1386
  function o(Q, A) {
1387
1387
  try {
1388
1388
  return Q.apply(this, A);
1389
1389
  } catch (I) {
1390
- const g = L(I);
1390
+ const g = q(I);
1391
1391
  C.__wbindgen_exn_store(g);
1392
1392
  }
1393
1393
  }
1394
- function h(Q) {
1394
+ function H(Q) {
1395
1395
  return Q == null;
1396
1396
  }
1397
- function S(Q, A, I) {
1397
+ function s(Q, A, I) {
1398
1398
  const g = { a: Q, b: A, cnt: 1 }, B = (...E) => {
1399
1399
  g.cnt++;
1400
1400
  const D = g.a;
@@ -1406,20 +1406,20 @@ function S(Q, A, I) {
1406
1406
  }
1407
1407
  };
1408
1408
  return B._wbg_cb_unref = () => {
1409
- --g.cnt === 0 && (C.__wbindgen_destroy_closure(g.a, g.b), g.a = 0, RA.unregister(g));
1410
- }, RA.register(B, g, g), B;
1409
+ --g.cnt === 0 && (C.__wbindgen_destroy_closure(g.a, g.b), g.a = 0, JA.unregister(g));
1410
+ }, JA.register(B, g, g), B;
1411
1411
  }
1412
- function lA(Q, A) {
1412
+ function mA(Q, A) {
1413
1413
  const I = A(Q.length * 1, 1) >>> 0;
1414
- return W().set(Q, I / 1), k = Q.length, I;
1414
+ return t().set(Q, I / 1), R = Q.length, I;
1415
1415
  }
1416
- function R(Q, A, I) {
1416
+ function F(Q, A, I) {
1417
1417
  if (I === void 0) {
1418
- const i = X.encode(Q), w = A(i.length, 1) >>> 0;
1419
- return W().subarray(w, w + i.length).set(i), k = i.length, w;
1418
+ const i = f.encode(Q), w = A(i.length, 1) >>> 0;
1419
+ return t().subarray(w, w + i.length).set(i), R = i.length, w;
1420
1420
  }
1421
1421
  let g = Q.length, B = A(g, 1) >>> 0;
1422
- const E = W();
1422
+ const E = t();
1423
1423
  let D = 0;
1424
1424
  for (; D < g; D++) {
1425
1425
  const i = Q.charCodeAt(D);
@@ -1428,35 +1428,35 @@ function R(Q, A, I) {
1428
1428
  }
1429
1429
  if (D !== g) {
1430
1430
  D !== 0 && (Q = Q.slice(D)), B = I(B, g, g = D + Q.length * 3, 1) >>> 0;
1431
- const i = W().subarray(B + D, B + g), w = X.encodeInto(Q, i);
1431
+ const i = t().subarray(B + D, B + g), w = f.encodeInto(Q, i);
1432
1432
  D += w.written, B = I(B, g, D, 1) >>> 0;
1433
1433
  }
1434
- return k = D, B;
1434
+ return R = D, B;
1435
1435
  }
1436
- function q(Q) {
1436
+ function p(Q) {
1437
1437
  const A = C.__wbindgen_externrefs.get(Q);
1438
1438
  return C.__externref_table_dealloc(Q), A;
1439
1439
  }
1440
- let z = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
1441
- z.decode();
1442
- const tA = 2146435072;
1443
- let AA = 0;
1444
- function jA(Q, A) {
1445
- return AA += A, AA >= tA && (z = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }), z.decode(), AA = A), z.decode(W().subarray(Q, Q + A));
1440
+ let u = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
1441
+ u.decode();
1442
+ const jA = 2146435072;
1443
+ let gA = 0;
1444
+ function bA(Q, A) {
1445
+ return gA += A, gA >= jA && (u = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }), u.decode(), gA = A), u.decode(t().subarray(Q, Q + A));
1446
1446
  }
1447
- const X = new TextEncoder();
1448
- "encodeInto" in X || (X.encodeInto = function(Q, A) {
1449
- const I = X.encode(Q);
1447
+ const f = new TextEncoder();
1448
+ "encodeInto" in f || (f.encodeInto = function(Q, A) {
1449
+ const I = f.encode(Q);
1450
1450
  return A.set(I), {
1451
1451
  read: Q.length,
1452
1452
  written: I.length
1453
1453
  };
1454
1454
  });
1455
- let k = 0, C;
1456
- function bA(Q, A) {
1457
- return C = Q.exports, s = null, b = null, m = null, O = null, C.__wbindgen_start(), C;
1455
+ let R = 0, C;
1456
+ function TA(Q, A) {
1457
+ return C = Q.exports, Z = null, b = null, T = null, X = null, C.__wbindgen_start(), C;
1458
1458
  }
1459
- async function mA(Q, A) {
1459
+ async function XA(Q, A) {
1460
1460
  if (typeof Response == "function" && Q instanceof Response) {
1461
1461
  if (typeof WebAssembly.instantiateStreaming == "function")
1462
1462
  try {
@@ -1483,33 +1483,33 @@ async function mA(Q, A) {
1483
1483
  return false;
1484
1484
  }
1485
1485
  }
1486
- async function OA(Q) {
1486
+ async function fA(Q) {
1487
1487
  if (C !== void 0) return C;
1488
1488
  Q !== void 0 && (Object.getPrototypeOf(Q) === Object.prototype ? { module_or_path: Q } = Q : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), Q === void 0 && (Q = new URL("ironrdp_web_bg.wasm", import.meta.url));
1489
- const A = UA();
1489
+ const A = aA();
1490
1490
  (typeof Q == "string" || typeof Request == "function" && Q instanceof Request || typeof URL == "function" && Q instanceof URL) && (Q = fetch(Q));
1491
- const { instance: I, module: g } = await mA(await Q, A);
1492
- return bA(I);
1491
+ const { instance: I, module: g } = await XA(await Q, A);
1492
+ return TA(I);
1493
1493
  }
1494
- const XA = "avc1.640033";
1495
- function MA() {
1494
+ const rA = "avc1.640033";
1495
+ function KA() {
1496
1496
  return {
1497
- codec: XA,
1497
+ codec: rA,
1498
1498
  optimizeForLatency: true,
1499
1499
  hardwareAcceleration: "no-preference",
1500
1500
  colorSpace: { primaries: "bt709", transfer: "bt709", matrix: "bt709", fullRange: true }
1501
1501
  };
1502
1502
  }
1503
- async function BI() {
1503
+ async function EI() {
1504
1504
  if (typeof VideoDecoder > "u" || typeof EncodedVideoChunk > "u")
1505
1505
  return false;
1506
1506
  try {
1507
- return (await VideoDecoder.isConfigSupported(MA())).supported === true;
1507
+ return (await VideoDecoder.isConfigSupported(KA())).supported === true;
1508
1508
  } catch {
1509
1509
  return false;
1510
1510
  }
1511
1511
  }
1512
- const _cA = class _cA {
1512
+ const _M = class _M {
1513
1513
  constructor(A = {}) {
1514
1514
  __publicField(this, "stats", {
1515
1515
  frames: 0,
@@ -1530,25 +1530,68 @@ const _cA = class _cA {
1530
1530
  */
1531
1531
  __publicField(this, "reclaimed", false);
1532
1532
  __publicField(this, "surfaces", /* @__PURE__ */ new Map());
1533
+ /** Decoders of surfaces whose streams ended, bringing out the frames given to them before they close. */
1534
+ __publicField(this, "retiring", /* @__PURE__ */ new Set());
1535
+ /** Surfaces waiting for their first key frame; bounded independently of browser decoders. */
1536
+ __publicField(this, "waitingForKey", /* @__PURE__ */ new Map());
1537
+ __publicField(this, "maxDecoders");
1538
+ /** The bytes of H.264 in the decoders: the access units of the pending frames. */
1539
+ __publicField(this, "pendingBytes", 0);
1540
+ /** The bytes the pictures being read back are read into: the RGBA of their frames' regions. */
1541
+ __publicField(this, "readbackBytes", 0);
1542
+ /** Full decoded pictures retained by async copies, independently of their dirty regions' size. */
1543
+ __publicField(this, "readbackPictures", /* @__PURE__ */ new Set());
1544
+ __publicField(this, "readbackPixels", 0);
1545
+ /** How fast decoders open, for all surfaces together (see `SESSION_OPENS`). */
1546
+ __publicField(this, "opens");
1547
+ /** How fast decoders open for each surface (see `SURFACE_OPENS`), kept while a surface's count matters. */
1548
+ __publicField(this, "surfaceOpens", /* @__PURE__ */ new Map());
1533
1549
  __publicField(this, "stallMs");
1534
1550
  __publicField(this, "now");
1535
1551
  __publicField(this, "watchdog", null);
1536
1552
  __publicField(this, "canvas", null);
1537
1553
  __publicField(this, "closed", false);
1538
- this.options = A, this.stallMs = A.stallMs ?? 3e3, this.now = A.now ?? (() => performance.now());
1554
+ if (this.options = A, this.maxDecoders = A.maxDecoders ?? _M.MAX_DECODERS, !Number.isInteger(this.maxDecoders) || this.maxDecoders < 1 || this.maxDecoders > _M.MAX_DECODERS)
1555
+ throw new RangeError("maxDecoders must be an integer from 1 to 32");
1556
+ this.stallMs = A.stallMs ?? 3e3, this.now = A.now ?? (() => performance.now()), this.opens = new UA(_M.SESSION_OPENS, this.now());
1539
1557
  }
1540
1558
  decode(A, I) {
1541
1559
  if (this.failed !== null || this.closed) {
1542
1560
  I(A.id, null, this.failed ?? "the H.264 decoder is closed");
1543
1561
  return;
1544
1562
  }
1545
- this.watchdog ?? (this.watchdog = setInterval(() => this.checkStalls(), Math.min(250, this.stallMs)));
1546
- const g = this.surfaces.get(A.surfaceId) ?? this.open(A.surfaceId);
1547
- if (g.needKey && !A.keyFrame) {
1548
- this.stats.skipped++, g.waitingSince === null && (g.waitingSince = this.now()), I(A.id, null);
1563
+ this.watchdog ?? (this.watchdog = setInterval(() => this.checkStalls(), Math.min(250, this.stallMs))), this.endSurfaces(A.endedSurfaces ?? []);
1564
+ let g = this.surfaces.get(A.surfaceId);
1565
+ if (g === void 0) {
1566
+ if (!A.keyFrame) {
1567
+ !this.waitingForKey.has(A.surfaceId) && this.waitingForKey.size < this.maxDecoders && this.waitingForKey.set(A.surfaceId, this.now()), this.stats.skipped++, I(A.id, null);
1568
+ return;
1569
+ }
1570
+ if (this.waitingForKey.delete(A.surfaceId), this.surfaces.size + this.retiring.size >= this.maxDecoders) {
1571
+ this.fail(`H.264 for more than ${this.maxDecoders} surfaces at once`), I(A.id, null, this.failed ?? void 0);
1572
+ return;
1573
+ }
1574
+ const w = this.countOpen(A.surfaceId);
1575
+ if (w !== null) {
1576
+ this.fail(w), I(A.id, null, this.failed ?? void 0);
1577
+ return;
1578
+ }
1579
+ g = this.open(A.surfaceId);
1580
+ }
1581
+ const B = A.data.byteLength;
1582
+ if (g.pending.size >= _M.MAX_PENDING_FRAMES) {
1583
+ this.fail(`more than ${_M.MAX_PENDING_FRAMES} frames in a decoder`), I(A.id, null, this.failed ?? void 0);
1584
+ return;
1585
+ }
1586
+ if (this.pendingBytes + B > _M.MAX_PENDING_BYTES) {
1587
+ this.fail(
1588
+ `more than ${_M.MAX_PENDING_BYTES / (1024 * 1024)} MiB of H.264 in the decoders`
1589
+ ), I(A.id, null, this.failed ?? void 0);
1549
1590
  return;
1550
1591
  }
1551
- g.needKey = false, g.waitingSince = null, A.keyFrame && this.stats.keyFrames++, g.pending.set(A.id, { frame: A, done: I, since: this.now() }), this.stats.pending++;
1592
+ A.keyFrame && this.stats.keyFrames++;
1593
+ const { id: E, destination: D, regions: i } = A;
1594
+ g.pending.set(E, { frame: { id: E, destination: D, regions: i }, done: I, since: this.now(), bytes: B }), this.stats.pending++, this.pendingBytes += B;
1552
1595
  try {
1553
1596
  g.decoder.decode(
1554
1597
  new EncodedVideoChunk({
@@ -1557,29 +1600,78 @@ const _cA = class _cA {
1557
1600
  data: A.data
1558
1601
  })
1559
1602
  );
1560
- } catch (B) {
1561
- this.fail(`decode: ${IA(B)}`);
1603
+ } catch (w) {
1604
+ this.fail(`decode: ${BA(w)}`);
1562
1605
  }
1563
1606
  }
1564
1607
  close() {
1565
1608
  this.closed = true, this.stopWatchdog();
1566
- for (const A of this.surfaces.values())
1567
- yA(A.decoder);
1568
- this.surfaces.clear(), this.stats.pending = 0;
1609
+ for (const A of [...this.surfaces.values(), ...this.retiring])
1610
+ e(A.decoder);
1611
+ this.surfaces.clear(), this.retiring.clear(), this.waitingForKey.clear(), this.stats.pending = 0, this.pendingBytes = 0, this.clearReadbacks(), this.canvas = null;
1612
+ }
1613
+ /** Releases streams as soon as their surfaces end, including when no later H.264 frame arrives. */
1614
+ endSurfaces(A) {
1615
+ for (const I of A)
1616
+ this.waitingForKey.delete(I), this.retire(I);
1617
+ }
1618
+ /**
1619
+ * Counts a decoder opening for the surface; says why it may not instead, when that is faster than `SURFACE_OPENS`
1620
+ * or `SESSION_OPENS` allow.
1621
+ */
1622
+ countOpen(A) {
1623
+ const I = this.now();
1624
+ let g = this.surfaceOpens.get(A);
1625
+ if (g === void 0) {
1626
+ if (this.surfaceOpens.size >= _M.MAX_DECODERS)
1627
+ for (const [B, E] of this.surfaceOpens)
1628
+ E.rested(I) && this.surfaceOpens.delete(B);
1629
+ g = new UA(_M.SURFACE_OPENS, I), this.surfaceOpens.set(A, g);
1630
+ }
1631
+ if (!g.take(I)) {
1632
+ const { inARow: B, perSecond: E } = _M.SURFACE_OPENS;
1633
+ return `H.264 decoders opened for surface ${A} faster than ${B} in a row and ${E} a second`;
1634
+ }
1635
+ if (!this.opens.take(I)) {
1636
+ const { inARow: B, perSecond: E } = _M.SESSION_OPENS;
1637
+ return `H.264 decoders opened faster than ${B} in a row and ${E} a second`;
1638
+ }
1639
+ return null;
1569
1640
  }
1570
1641
  open(A) {
1571
1642
  const I = {
1572
1643
  decoder: new VideoDecoder({
1573
1644
  output: (g) => this.output(I, g),
1574
1645
  error: (g) => {
1575
- this.reclaimed = g.name === "QuotaExceededError", this.fail(IA(g));
1646
+ this.reclaimed = g.name === "QuotaExceededError", this.fail(BA(g));
1576
1647
  }
1577
1648
  }),
1578
- needKey: true,
1579
- waitingSince: null,
1580
1649
  pending: /* @__PURE__ */ new Map()
1581
1650
  };
1582
- return I.decoder.configure(MA()), this.surfaces.set(A, I), I;
1651
+ return I.decoder.configure(KA()), this.surfaces.set(A, I), I;
1652
+ }
1653
+ /** The server is done with a surface: its decoder closes once the frames given to it are out. */
1654
+ retire(A) {
1655
+ const I = this.surfaces.get(A);
1656
+ if (I === void 0)
1657
+ return;
1658
+ if (this.surfaces.delete(A), I.pending.size === 0) {
1659
+ e(I.decoder);
1660
+ return;
1661
+ }
1662
+ this.retiring.add(I);
1663
+ const g = () => {
1664
+ if (this.retiring.delete(I)) {
1665
+ for (const B of [...I.pending.values()])
1666
+ this.settle(I, B), this.stats.dropped++, B.done(B.frame.id, null);
1667
+ e(I.decoder);
1668
+ }
1669
+ };
1670
+ try {
1671
+ I.decoder.flush().then(g, g);
1672
+ } catch {
1673
+ g();
1674
+ }
1583
1675
  }
1584
1676
  output(A, I) {
1585
1677
  const g = I.timestamp, B = A.pending.get(g);
@@ -1587,69 +1679,97 @@ const _cA = class _cA {
1587
1679
  I.close();
1588
1680
  return;
1589
1681
  }
1590
- for (const [E, D] of A.pending) {
1591
- if (E >= g)
1682
+ const E = I.codedWidth * I.codedHeight;
1683
+ if (!Number.isSafeInteger(E) || E <= 0 || E > _M.MAX_PICTURE_PIXELS) {
1684
+ I.close(), this.fail("decoded H.264 picture exceeds the pixel budget");
1685
+ return;
1686
+ }
1687
+ for (const [w, G] of A.pending) {
1688
+ if (w >= g)
1592
1689
  break;
1593
- A.pending.delete(E), this.stats.pending--, this.stats.dropped++, D.done(E, null);
1690
+ this.settle(A, G), this.stats.dropped++, G.done(w, null);
1691
+ }
1692
+ this.settle(A, B);
1693
+ const D = B.frame.regions.reduce((w, G) => w + (G.right - G.left) * (G.bottom - G.top) * 4, 0);
1694
+ if (this.readbackPictures.size >= _M.MAX_READBACKS) {
1695
+ I.close(), this.fail(`more than ${_M.MAX_READBACKS} pictures being read back`), B.done(g, null, this.failed ?? void 0);
1696
+ return;
1594
1697
  }
1595
- A.pending.delete(g), this.stats.pending--, this.readRegions(I, B.frame).then(
1596
- (E) => {
1597
- if (I.close(), this.failed !== null || this.closed)
1698
+ if (this.readbackBytes + D > _M.MAX_READBACK_BYTES) {
1699
+ I.close(), this.fail(
1700
+ `more than ${_M.MAX_READBACK_BYTES / (1024 * 1024)} MiB of pictures being read back`
1701
+ ), B.done(g, null, this.failed ?? void 0);
1702
+ return;
1703
+ }
1704
+ if (this.readbackPixels + E > _M.MAX_READBACK_PIXELS) {
1705
+ I.close(), this.fail("more than 128 Mi pixels of decoded pictures being read back"), B.done(g, null, this.failed ?? void 0);
1706
+ return;
1707
+ }
1708
+ this.readbackBytes += D, this.readbackPixels += E, this.readbackPictures.add(I);
1709
+ const i = () => {
1710
+ this.readbackPictures.delete(I) && (this.readbackBytes -= D, this.readbackPixels -= E);
1711
+ };
1712
+ this.readRegions(I, B.frame).then(
1713
+ (w) => {
1714
+ if (I.close(), i(), this.failed !== null || this.closed)
1598
1715
  return;
1599
- const D = this.now() - B.since;
1600
- this.stats.frames++, B.frame.regions.length === 0 && this.stats.auxiliary++, this.stats.lastLatencyMs = D, this.stats.maxLatencyMs = Math.max(this.stats.maxLatencyMs, D), B.done(g, E);
1716
+ const G = this.now() - B.since;
1717
+ this.stats.frames++, B.frame.regions.length === 0 && this.stats.auxiliary++, this.stats.lastLatencyMs = G, this.stats.maxLatencyMs = Math.max(this.stats.maxLatencyMs, G), B.done(g, w);
1601
1718
  },
1602
- (E) => {
1603
- I.close(), this.fail(`reading the picture: ${IA(E)}`), B.done(g, null, this.failed ?? void 0);
1719
+ (w) => {
1720
+ I.close(), i(), !(this.failed !== null || this.closed) && (this.fail(`reading the picture: ${BA(w)}`), B.done(g, null, this.failed ?? void 0));
1604
1721
  }
1605
1722
  );
1606
1723
  }
1724
+ /** Takes a frame out of the pending ones. */
1725
+ settle(A, I) {
1726
+ A.pending.delete(I.frame.id), this.stats.pending--, this.pendingBytes -= I.bytes;
1727
+ }
1607
1728
  /** The RGBA of the frame's regions, in turn. */
1608
1729
  async readRegions(A, I) {
1609
- const g = A.visibleRect ?? { x: 0, y: 0, width: A.codedWidth, height: A.codedHeight }, B = I.destination, [E, D] = g.width >= B.right && g.height >= B.bottom ? [0, 0] : [B.left, B.top], i = I.regions.map((G) => ({
1610
- x: G.left - E,
1611
- y: G.top - D,
1612
- width: G.right - G.left,
1613
- height: G.bottom - G.top
1730
+ const g = A.visibleRect ?? { x: 0, y: 0, width: A.codedWidth, height: A.codedHeight }, B = I.destination, [E, D] = g.width >= B.right && g.height >= B.bottom ? [0, 0] : [B.left, B.top], i = I.regions.map((N) => ({
1731
+ x: N.left - E,
1732
+ y: N.top - D,
1733
+ width: N.right - N.left,
1734
+ height: N.bottom - N.top
1614
1735
  }));
1615
- for (const G of i)
1616
- if (G.x < 0 || G.y < 0 || G.x + G.width > g.width || G.y + G.height > g.height)
1736
+ for (const N of i)
1737
+ if (N.x < 0 || N.y < 0 || N.x + N.width > g.width || N.y + N.height > g.height)
1617
1738
  throw new Error(
1618
- `region ${JSON.stringify(G)} is outside the ${g.width}x${g.height} picture`
1739
+ `region ${JSON.stringify(N)} is outside the ${g.width}x${g.height} picture`
1619
1740
  );
1620
- const w = i.reduce((G, H) => G + H.width * H.height * 4, 0), F = new Uint8Array(w);
1741
+ const w = i.reduce((N, L) => N + L.width * L.height * 4, 0), G = new Uint8Array(w);
1621
1742
  if (i.length === 0)
1622
- return F;
1623
- const a = Math.min(...i.map((G) => G.x)), J = Math.min(...i.map((G) => G.y)), Y = {
1624
- x: a,
1625
- y: J,
1626
- width: Math.max(...i.map((G) => G.x + G.width)) - a,
1627
- height: Math.max(...i.map((G) => G.y + G.height)) - J
1628
- };
1743
+ return G;
1744
+ let [a, U, c, O] = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
1745
+ for (const N of i)
1746
+ a = Math.min(a, N.x), U = Math.min(U, N.y), c = Math.max(c, N.x + N.width), O = Math.max(O, N.y + N.height);
1747
+ const S = { x: a, y: U, width: c - a, height: O - U };
1629
1748
  if (i.length === 1)
1630
- return await this.readBox(A, g, Y, F), F;
1631
- if (Y.width * Y.height * 4 > w * _cA.BOX_WASTE) {
1632
- let G = 0;
1633
- for (const H of i) {
1634
- const d = H.width * H.height * 4;
1635
- await this.readBox(A, g, H, F.subarray(G, G + d)), G += d;
1749
+ return await this.readBox(A, g, S, G), G;
1750
+ if (S.width * S.height * 4 > w * _M.BOX_WASTE) {
1751
+ let N = 0;
1752
+ for (const L of i) {
1753
+ const W = L.width * L.height * 4;
1754
+ await this.readBox(A, g, L, G.subarray(N, N + W)), N += W;
1636
1755
  }
1637
- return F;
1756
+ return G;
1638
1757
  }
1639
- const l = new Uint8Array(Y.width * Y.height * 4);
1640
- await this.readBox(A, g, Y, l);
1641
- let v = 0;
1642
- for (const G of i) {
1643
- const H = G.width * 4;
1644
- for (let d = 0; d < G.height; d++) {
1645
- const BA = ((G.y - Y.y + d) * Y.width + (G.x - Y.x)) * 4;
1646
- F.set(l.subarray(BA, BA + H), v), v += H;
1758
+ const CA = new Uint8Array(S.width * S.height * 4);
1759
+ await this.readBox(A, g, S, CA);
1760
+ let EA = 0;
1761
+ for (const N of i) {
1762
+ const L = N.width * 4;
1763
+ for (let W = 0; W < N.height; W++) {
1764
+ const DA = ((N.y - S.y + W) * S.width + (N.x - S.x)) * 4;
1765
+ G.set(CA.subarray(DA, DA + L), EA), EA += L;
1647
1766
  }
1648
1767
  }
1649
- return F;
1768
+ return G;
1650
1769
  }
1651
1770
  async readBox(A, I, g, B) {
1652
- var _a, _b;
1771
+ if (this.failed !== null || this.closed)
1772
+ throw new Error("the H.264 decoder is closed");
1653
1773
  if (this.stats.readback === "copyTo") {
1654
1774
  const D = { x: I.x + g.x, y: I.y + g.y, width: g.width, height: g.height };
1655
1775
  try {
@@ -1664,15 +1784,19 @@ const _cA = class _cA {
1664
1784
  this.stats.readback = "canvas";
1665
1785
  }
1666
1786
  }
1667
- (this.canvas === null || this.canvas.width < g.width || this.canvas.height < g.height) && (this.canvas = new OffscreenCanvas(
1668
- Math.max(g.width, ((_a = this.canvas) == null ? void 0 : _a.width) ?? 0),
1669
- Math.max(g.height, ((_b = this.canvas) == null ? void 0 : _b.height) ?? 0)
1670
- ));
1787
+ if (this.failed !== null || this.closed)
1788
+ throw new Error("the H.264 decoder is closed");
1789
+ (this.canvas === null || this.canvas.width < g.width || this.canvas.height < g.height) && (this.canvas = new OffscreenCanvas(g.width, g.height));
1671
1790
  const E = this.canvas.getContext("2d", { willReadFrequently: true, colorSpace: "srgb" });
1672
1791
  if (E === null)
1673
1792
  throw new Error("no 2D canvas context");
1674
1793
  E.drawImage(A, -g.x, -g.y, I.width, I.height), B.set(E.getImageData(0, 0, g.width, g.height).data);
1675
1794
  }
1795
+ clearReadbacks() {
1796
+ for (const A of this.readbackPictures)
1797
+ A.close();
1798
+ this.readbackPictures.clear(), this.readbackBytes = 0, this.readbackPixels = 0;
1799
+ }
1676
1800
  stopWatchdog() {
1677
1801
  this.watchdog !== null && (clearInterval(this.watchdog), this.watchdog = null);
1678
1802
  }
@@ -1680,17 +1804,17 @@ const _cA = class _cA {
1680
1804
  if (this.failed !== null || this.closed)
1681
1805
  return;
1682
1806
  const A = this.now();
1683
- for (const I of this.surfaces.values()) {
1684
- if (I.waitingSince !== null && A - I.waitingSince > this.stallMs) {
1685
- this.fail(`no key frame for ${Math.round(A - I.waitingSince)} ms`);
1807
+ for (const I of this.waitingForKey.values())
1808
+ if (A - I > this.stallMs) {
1809
+ this.fail(`no key frame for ${Math.round(A - I)} ms`);
1686
1810
  return;
1687
1811
  }
1812
+ for (const I of [...this.surfaces.values(), ...this.retiring])
1688
1813
  for (const g of I.pending.values())
1689
1814
  if (A - g.since > this.stallMs) {
1690
1815
  this.fail(`no picture from the decoder for ${Math.round(A - g.since)} ms`);
1691
1816
  return;
1692
1817
  }
1693
- }
1694
1818
  }
1695
1819
  /** Fails for good: every frame in flight completes with the error, which ends the session. */
1696
1820
  fail(A) {
@@ -1698,25 +1822,91 @@ const _cA = class _cA {
1698
1822
  if (this.failed !== null || this.closed)
1699
1823
  return;
1700
1824
  this.failed = A, this.stopWatchdog();
1701
- const I = [...this.surfaces.values()].flatMap((g) => [...g.pending.values()]);
1702
- for (const g of this.surfaces.values())
1703
- yA(g.decoder);
1704
- this.surfaces.clear(), this.stats.pending = 0, (_b = (_a = this.options).onFailure) == null ? void 0 : _b.call(_a, A);
1705
- for (const { frame: g, done: B } of I)
1706
- B(g.id, null, A);
1825
+ const I = [...this.surfaces.values(), ...this.retiring], g = I.flatMap((B) => [...B.pending.values()]);
1826
+ for (const B of I)
1827
+ e(B.decoder);
1828
+ this.surfaces.clear(), this.retiring.clear(), this.waitingForKey.clear(), this.stats.pending = 0, this.pendingBytes = 0, this.clearReadbacks(), this.canvas = null, (_b = (_a = this.options).onFailure) == null ? void 0 : _b.call(_a, A);
1829
+ for (const { frame: B, done: E } of g)
1830
+ E(B.id, null, A);
1707
1831
  }
1708
1832
  };
1833
+ /**
1834
+ * The most decoders at once. Servers stream H.264 to a surface per monitor, and a session has 16 monitors at most
1835
+ * (MS-RDPBCGR 2.2.1.3.6); after a reset, the decoders of the surfaces it destroyed may still be finishing their
1836
+ * frames while those of the new ones start.
1837
+ */
1838
+ __publicField(_M, "MAX_DECODERS", 32);
1839
+ /**
1840
+ * How fast one surface's decoders may open: 16 in a row, then 4 a second. A decoder opens for a surface's first
1841
+ * frame, and again for its first frame after its stream ended (the surface deleted, created again or destroyed by
1842
+ * a reset), which servers do when they resize its monitor: a few times in a row at most, and not several times a
1843
+ * second for long. Opening a `VideoDecoder` and closing the one before takes the page's thread about 44
1844
+ * microseconds (Chrome, software decoding), so a server that created a surface again before each of its frames
1845
+ * had that done for every frame: 32,768 times for one message of 90 KB on the wire, which froze the page, and
1846
+ * every session in it, for 1.4 s, message after message.
1847
+ */
1848
+ __publicField(_M, "SURFACE_OPENS", { inARow: 16, perSecond: 4 });
1849
+ /**
1850
+ * How fast decoders may open for all surfaces together: 128 in a row, then 32 a second. That is each of 16
1851
+ * monitors (MS-RDPBCGR 2.2.1.3.6) resized eight times in a row, then twice a second, and opening that many takes
1852
+ * the page's thread under 6 ms, then under 1.5 ms a second.
1853
+ */
1854
+ __publicField(_M, "SESSION_OPENS", { inARow: 128, perSecond: 32 });
1855
+ /**
1856
+ * The most frames one decoder may hold. A decoder keeps up with its stream, so frames wait in it about as long as
1857
+ * one takes to decode, and the server stops at its unacknowledged frames: 256 is over two seconds of 60 Hz AVC444
1858
+ * (two access units a frame), and a frame that waits longer than `stallMs` (3 s) fails the decoder anyway.
1859
+ */
1860
+ __publicField(_M, "MAX_PENDING_FRAMES", 256);
1861
+ /**
1862
+ * The most bytes of H.264 the decoders may hold at once: over a second at the highest bitrate any H.264 level
1863
+ * allows (level 6.2, High profile: 1,000 Mbit/s), where servers send a few to tens of Mbit/s.
1864
+ */
1865
+ __publicField(_M, "MAX_PENDING_BYTES", 128 * 1024 * 1024);
1866
+ /**
1867
+ * The most bytes the pictures being read back may be read into at once: the RGBA of their frames' regions. A
1868
+ * picture is read back as it comes out, while its decoder goes on, so readbacks overlap when pictures come out
1869
+ * faster than they are read. This is two of the largest frames ironrdp-egfx reads back (256 MiB, what its
1870
+ * compositor holds), or four whole 8K pictures (7680x4320, 127 MiB each). Regions read back as their bounding box
1871
+ * take the box as well while it is read, at most twice what they hold.
1872
+ */
1873
+ __publicField(_M, "MAX_READBACK_BYTES", 512 * 1024 * 1024);
1874
+ __publicField(_M, "MAX_READBACKS", 64);
1875
+ __publicField(_M, "MAX_PICTURE_PIXELS", 64 * 1024 * 1024);
1876
+ /** Four whole 8K pictures, or 512 MiB at four bytes per coded pixel, regardless of dirty-region size. */
1877
+ __publicField(_M, "MAX_READBACK_PIXELS", 128 * 1024 * 1024);
1709
1878
  /** A bounding box may be this many times what its regions hold before they are read one by one instead. */
1710
- __publicField(_cA, "BOX_WASTE", 2);
1711
- let cA = _cA;
1712
- function yA(Q) {
1879
+ __publicField(_M, "BOX_WASTE", 2);
1880
+ let M = _M;
1881
+ class UA {
1882
+ constructor(A, I) {
1883
+ __publicField(this, "allowance");
1884
+ __publicField(this, "at");
1885
+ this.limit = A, this.allowance = A.inARow, this.at = I;
1886
+ }
1887
+ /** Counts one more time, unless the limit allows none now. */
1888
+ take(A) {
1889
+ return this.catchUp(A), this.allowance < 1 ? false : (this.allowance -= 1, true);
1890
+ }
1891
+ /** Whether all of the allowance is back, as if nothing had been counted. */
1892
+ rested(A) {
1893
+ return this.catchUp(A), this.allowance >= this.limit.inARow;
1894
+ }
1895
+ catchUp(A) {
1896
+ if (A > this.at) {
1897
+ const I = (A - this.at) * this.limit.perSecond / 1e3;
1898
+ this.allowance = Math.min(this.limit.inARow, this.allowance + I), this.at = A;
1899
+ }
1900
+ }
1901
+ }
1902
+ function e(Q) {
1713
1903
  if (Q.state !== "closed")
1714
1904
  try {
1715
1905
  Q.close();
1716
1906
  } catch {
1717
1907
  }
1718
1908
  }
1719
- function IA(Q) {
1909
+ function BA(Q) {
1720
1910
  return Q instanceof Error || Q instanceof DOMException ? `${Q.name}: ${Q.message}` : String(Q);
1721
1911
  }
1722
1912
  const j = {
@@ -1731,53 +1921,53 @@ const j = {
1731
1921
  */
1732
1922
  RANGE: 2
1733
1923
  };
1734
- function fA(Q) {
1735
- return new N("files_available_callback", Q);
1736
- }
1737
- function TA(Q) {
1738
- return new N("file_contents_request_callback", Q);
1739
- }
1740
1924
  function nA(Q) {
1741
- return new N("file_contents_response_callback", Q);
1925
+ return new k("files_available_callback", Q);
1742
1926
  }
1743
- function rA(Q) {
1744
- return new N("lock_callback", Q);
1927
+ function zA(Q) {
1928
+ return new k("file_contents_request_callback", Q);
1745
1929
  }
1746
1930
  function PA(Q) {
1747
- return new N("unlock_callback", Q);
1931
+ return new k("file_contents_response_callback", Q);
1748
1932
  }
1749
1933
  function vA(Q) {
1750
- return new N("locks_expired_callback", Q);
1934
+ return new k("lock_callback", Q);
1751
1935
  }
1752
- function zA(Q) {
1753
- return new N("format_list_response_callback", Q);
1936
+ function eA(Q) {
1937
+ return new k("unlock_callback", Q);
1938
+ }
1939
+ function uA(Q) {
1940
+ return new k("locks_expired_callback", Q);
1754
1941
  }
1755
- const QI = {
1942
+ function _A(Q) {
1943
+ return new k("format_list_response_callback", Q);
1944
+ }
1945
+ const DI = {
1756
1946
  PostScript: "MS Publisher Imagesetter",
1757
1947
  MicrosoftPrintToPdf: "Microsoft Print to PDF"
1758
1948
  };
1759
- function CI(Q) {
1760
- return new N("print_job_stream_callbacks", Q);
1949
+ function iI(Q) {
1950
+ return new k("print_job_stream_callbacks", Q);
1761
1951
  }
1762
- function EI(Q) {
1763
- return new N("printer_name", Q);
1952
+ function wI(Q) {
1953
+ return new k("printer_name", Q);
1764
1954
  }
1765
- function DI(Q) {
1766
- return new N("printer_device_id", Q);
1955
+ function GI(Q) {
1956
+ return new k("printer_device_id", Q);
1767
1957
  }
1768
- function iI(Q) {
1769
- return new N("printer_driver_name", Q);
1958
+ function oI(Q) {
1959
+ return new k("printer_driver_name", Q);
1770
1960
  }
1771
- function eA(Q) {
1772
- return new N("request_file_contents", Q);
1961
+ function $A(Q) {
1962
+ return new k("request_file_contents", Q);
1773
1963
  }
1774
- function uA(Q) {
1775
- return new N("submit_file_contents", Q);
1964
+ function AI(Q) {
1965
+ return new k("submit_file_contents", Q);
1776
1966
  }
1777
- function _A(Q) {
1778
- return new N("initiate_file_copy", Q);
1967
+ function II(Q) {
1968
+ return new k("initiate_file_copy", Q);
1779
1969
  }
1780
- class $A {
1970
+ class gI {
1781
1971
  constructor() {
1782
1972
  __publicField(this, "chunks", []);
1783
1973
  __publicField(this, "_bytesWritten", 0);
@@ -1802,17 +1992,17 @@ class $A {
1802
1992
  this.finalized || (this.finalized = true, this.chunks = []);
1803
1993
  }
1804
1994
  }
1805
- class YA {
1995
+ class cA {
1806
1996
  constructor() {
1807
1997
  __publicField(this, "name", "blob");
1808
1998
  }
1809
1999
  async createWriteHandle(A, I) {
1810
- return new $A();
2000
+ return new gI();
1811
2001
  }
1812
2002
  async dispose() {
1813
2003
  }
1814
2004
  }
1815
- class AI {
2005
+ class BI {
1816
2006
  constructor(A, I, g, B) {
1817
2007
  __publicField(this, "writable");
1818
2008
  __publicField(this, "_bytesWritten", 0);
@@ -1848,7 +2038,7 @@ class AI {
1848
2038
  }
1849
2039
  }
1850
2040
  }
1851
- const _x = class _x {
2041
+ const _l = class _l {
1852
2042
  constructor(A, I, g) {
1853
2043
  __publicField(this, "name", "opfs");
1854
2044
  /** Sequence counter for generating unique temp file names. */
@@ -1863,7 +2053,7 @@ const _x = class _x {
1863
2053
  */
1864
2054
  static async create(A, I) {
1865
2055
  const g = I ?? `s-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`, B = await A.getDirectoryHandle("ironrdp-transfers", { create: true }), E = await B.getDirectoryHandle(g, { create: true });
1866
- return _x.cleanupStale(B, g), new _x(A, E, g);
2056
+ return _l.cleanupStale(B, g), new _l(A, E, g);
1867
2057
  }
1868
2058
  // 24 hours
1869
2059
  /**
@@ -1884,7 +2074,7 @@ const _x = class _x {
1884
2074
  if (!E)
1885
2075
  continue;
1886
2076
  const D = Number(E[1]);
1887
- if (g - D > _x.STALE_SESSION_THRESHOLD_MS)
2077
+ if (g - D > _l.STALE_SESSION_THRESHOLD_MS)
1888
2078
  try {
1889
2079
  await A.removeEntry(B, { recursive: true });
1890
2080
  } catch {
@@ -1910,8 +2100,8 @@ const _x = class _x {
1910
2100
  async createWriteHandle(A, I) {
1911
2101
  if (!this.sessionDir)
1912
2102
  throw new Error("OpfsStorageBackend: backend has been disposed");
1913
- const B = `${this.sequence++}-${II(A)}`, E = await this.sessionDir.getFileHandle(B, { create: true }), D = await E.createWritable();
1914
- return new AI(E, this.sessionDir, B, D);
2103
+ const B = `${this.sequence++}-${QI(A)}`, E = await this.sessionDir.getFileHandle(B, { create: true }), D = await E.createWritable();
2104
+ return new BI(E, this.sessionDir, B, D);
1915
2105
  }
1916
2106
  async dispose() {
1917
2107
  if (!this.sessionDir)
@@ -1941,9 +2131,9 @@ const _x = class _x {
1941
2131
  }
1942
2132
  };
1943
2133
  /** Maximum age (in milliseconds) before a session directory is considered stale. */
1944
- __publicField(_x, "STALE_SESSION_THRESHOLD_MS", 1440 * 60 * 1e3);
1945
- let x = _x;
1946
- function II(Q) {
2134
+ __publicField(_l, "STALE_SESSION_THRESHOLD_MS", 1440 * 60 * 1e3);
2135
+ let l = _l;
2136
+ function QI(Q) {
1947
2137
  let A = Q.replace(/[\u0000-\u001f]/g, "");
1948
2138
  A = A.replace(/[/\\]/g, "_"), A = A.replace(/^\.+/, ""), A.length === 0 && (A = "unnamed");
1949
2139
  const I = new TextEncoder();
@@ -1954,22 +2144,22 @@ function II(Q) {
1954
2144
  }
1955
2145
  return A;
1956
2146
  }
1957
- async function gI(Q = "auto", A) {
2147
+ async function CI(Q = "auto", A) {
1958
2148
  var _a, _b;
1959
2149
  if (Q === "blob")
1960
- return new YA();
2150
+ return new cA();
1961
2151
  if (typeof ((_b = (_a = globalThis.navigator) == null ? void 0 : _a.storage) == null ? void 0 : _b.getDirectory) == "function")
1962
2152
  try {
1963
2153
  const I = await navigator.storage.getDirectory();
1964
- if (await x.probe(I))
1965
- return x.create(I, A);
2154
+ if (await l.probe(I))
2155
+ return l.create(I, A);
1966
2156
  console.debug("OPFS probe failed (createWritable not functional), falling back to blob storage");
1967
2157
  } catch (I) {
1968
2158
  console.debug("OPFS unavailable, falling back to blob storage:", I);
1969
2159
  }
1970
- return new YA();
2160
+ return new cA();
1971
2161
  }
1972
- const _U = class _U {
2162
+ const _K = class _K {
1973
2163
  constructor(A) {
1974
2164
  __publicField(this, "session");
1975
2165
  __publicField(this, "chunkSize");
@@ -2048,7 +2238,7 @@ const _U = class _U {
2048
2238
  * downloads can retry.
2049
2239
  */
2050
2240
  async ensureStorageBackend() {
2051
- return this.storageBackend ? this.storageBackend : (this.storageBackendReady || (this.storageBackendReady = gI(this.storagePreference).then((A) => (this.storageBackend = A, console.debug(`File transfer storage: ${A.name}`), A)).catch((A) => {
2241
+ return this.storageBackend ? this.storageBackend : (this.storageBackendReady || (this.storageBackendReady = CI(this.storagePreference).then((A) => (this.storageBackend = A, console.debug(`File transfer storage: ${A.name}`), A)).catch((A) => {
2052
2242
  throw this.storageBackendReady = void 0, A;
2053
2243
  })), this.storageBackendReady);
2054
2244
  }
@@ -2057,7 +2247,7 @@ const _U = class _U {
2057
2247
  // with invokeExtension() to keep the Session interface protocol-agnostic.
2058
2248
  sendRequestFileContents(A, I, g, B, E, D) {
2059
2249
  this.ensureSession().invokeExtension(
2060
- eA({
2250
+ $A({
2061
2251
  stream_id: A,
2062
2252
  file_index: I,
2063
2253
  flags: g,
@@ -2069,10 +2259,10 @@ const _U = class _U {
2069
2259
  }
2070
2260
  sendSubmitFileContents(A, I, g) {
2071
2261
  var _a;
2072
- (_a = this.session) == null ? void 0 : _a.invokeExtension(uA({ stream_id: A, is_error: I, data: g }));
2262
+ (_a = this.session) == null ? void 0 : _a.invokeExtension(AI({ stream_id: A, is_error: I, data: g }));
2073
2263
  }
2074
2264
  sendInitiateFileCopy(A) {
2075
- this.ensureSession().invokeExtension(_A(A));
2265
+ this.ensureSession().invokeExtension(II(A));
2076
2266
  }
2077
2267
  /**
2078
2268
  * Returns the extension objects to register on the SessionBuilder before connect().
@@ -2080,15 +2270,15 @@ const _U = class _U {
2080
2270
  */
2081
2271
  getBuilderExtensions() {
2082
2272
  return [
2083
- fA(
2273
+ nA(
2084
2274
  (A, I) => this.handleFilesAvailable(A, I)
2085
2275
  ),
2086
- TA((A) => this.handleFileContentsRequest(A)),
2087
- nA((A) => this.handleFileContentsResponse(A)),
2088
- rA((A) => this.handleLock(A)),
2089
- PA((A) => this.handleUnlock(A)),
2090
- vA((A) => this.handleLocksExpired(A)),
2091
- zA((A) => this.handleFormatListResponse(A))
2276
+ zA((A) => this.handleFileContentsRequest(A)),
2277
+ PA((A) => this.handleFileContentsResponse(A)),
2278
+ vA((A) => this.handleLock(A)),
2279
+ eA((A) => this.handleUnlock(A)),
2280
+ uA((A) => this.handleLocksExpired(A)),
2281
+ _A((A) => this.handleFormatListResponse(A))
2092
2282
  ];
2093
2283
  }
2094
2284
  /**
@@ -2223,19 +2413,19 @@ const _U = class _U {
2223
2413
  * ```
2224
2414
  */
2225
2415
  async downloadFilesConcurrent(A, I = {}) {
2226
- const g = I.maxConcurrent ?? 3, B = /* @__PURE__ */ new Map(), E = [], D = A.map((w, F) => async () => {
2416
+ const g = I.maxConcurrent ?? 3, B = /* @__PURE__ */ new Map(), E = [], D = A.map((w, G) => async () => {
2227
2417
  try {
2228
- const { completion: a } = this.downloadFile(w, F), J = await a;
2229
- B.set(F, J);
2418
+ const { completion: a } = this.downloadFile(w, G), U = await a;
2419
+ B.set(G, U);
2230
2420
  } catch (a) {
2231
- E.push({ index: F, error: a });
2421
+ E.push({ index: G, error: a });
2232
2422
  }
2233
2423
  }), i = [];
2234
2424
  for (const w of D) {
2235
- const F = w().finally(() => {
2236
- i.splice(i.indexOf(F), 1);
2425
+ const G = w().finally(() => {
2426
+ i.splice(i.indexOf(G), 1);
2237
2427
  });
2238
- i.push(F), i.length >= g && await Promise.race(i);
2428
+ i.push(G), i.length >= g && await Promise.race(i);
2239
2429
  }
2240
2430
  if (await Promise.all(i), E.length > 0)
2241
2431
  throw new Error(
@@ -2263,7 +2453,7 @@ const _U = class _U {
2263
2453
  */
2264
2454
  uploadFiles(A) {
2265
2455
  this.uploadState !== void 0 && this.supersedeUpload(), this.retainedFiles = void 0;
2266
- const I = _U.normalizeToDroppedFiles(A), g = /* @__PURE__ */ new Map();
2456
+ const I = _K.normalizeToDroppedFiles(A), g = /* @__PURE__ */ new Map();
2267
2457
  for (let w = 0; w < I.length; w++)
2268
2458
  g.set(w, this.generateStreamId());
2269
2459
  const B = I.map((w) => ({
@@ -2272,7 +2462,7 @@ const _U = class _U {
2272
2462
  lastModified: w.lastModified,
2273
2463
  path: w.path,
2274
2464
  isDirectory: w.isDirectory
2275
- })), E = I.filter((w) => w.isDirectory !== true).length, D = I.map((w) => w.file), i = new Promise((w, F) => {
2465
+ })), E = I.filter((w) => w.isDirectory !== true).length, D = I.map((w) => w.file), i = new Promise((w, G) => {
2276
2466
  this.uploadState = {
2277
2467
  files: D,
2278
2468
  droppedFiles: I,
@@ -2284,18 +2474,18 @@ const _U = class _U {
2284
2474
  readerTimeouts: /* @__PURE__ */ new Map(),
2285
2475
  transferIds: g,
2286
2476
  resolve: w,
2287
- reject: F
2477
+ reject: G
2288
2478
  }, this.suppressUploadMonitoring();
2289
2479
  try {
2290
2480
  this.sendInitiateFileCopy(B), this.emit("upload-batch-started", g, I);
2291
2481
  } catch (a) {
2292
2482
  this.uploadState = void 0, this.resumeUploadMonitoring();
2293
- const J = {
2483
+ const U = {
2294
2484
  message: "Failed to initiate file upload",
2295
2485
  direction: "upload",
2296
2486
  cause: a
2297
2487
  };
2298
- this.emit("error", J), F(new Error(J.message, { cause: a }));
2488
+ this.emit("error", U), G(new Error(U.message, { cause: a }));
2299
2489
  return;
2300
2490
  }
2301
2491
  this.armPasteAckWatchdog();
@@ -2339,7 +2529,7 @@ const _U = class _U {
2339
2529
  this.pasteAckTimeout = void 0;
2340
2530
  const A = this.uploadState;
2341
2531
  A !== void 0 && A.isRePaste !== true ? this.failPendingUpload("The remote did not request the files in time, so the paste was not completed") : this.resumeUploadMonitoring();
2342
- }, _U.PASTE_ACK_TIMEOUT_MS);
2532
+ }, _K.PASTE_ACK_TIMEOUT_MS);
2343
2533
  }
2344
2534
  /** Disarm the paste-acknowledgment watchdog, if armed. */
2345
2535
  clearPasteAckWatchdog() {
@@ -2357,7 +2547,7 @@ const _U = class _U {
2357
2547
  this.uploadInactivityTimeout = void 0;
2358
2548
  const A = this.uploadState;
2359
2549
  A !== void 0 && A.isRePaste !== true && this.failPendingUpload("The remote stopped requesting the files, so the paste did not complete");
2360
- }, _U.UPLOAD_INACTIVITY_TIMEOUT_MS);
2550
+ }, _K.UPLOAD_INACTIVITY_TIMEOUT_MS);
2361
2551
  }
2362
2552
  /** Disarm the upload inactivity watchdog, if armed. */
2363
2553
  clearUploadInactivityWatchdog() {
@@ -2545,10 +2735,10 @@ const _U = class _U {
2545
2735
  * entries into `results`.
2546
2736
  */
2547
2737
  async traverseEntry(A, I, g, B) {
2548
- if (!(g.length >= _U.MAX_DIRECTORY_ENTRIES)) {
2549
- if (B > _U.MAX_DIRECTORY_DEPTH) {
2738
+ if (!(g.length >= _K.MAX_DIRECTORY_ENTRIES)) {
2739
+ if (B > _K.MAX_DIRECTORY_DEPTH) {
2550
2740
  console.warn(
2551
- `Skipping "${A.name}": directory depth exceeds ${_U.MAX_DIRECTORY_DEPTH}`
2741
+ `Skipping "${A.name}": directory depth exceeds ${_K.MAX_DIRECTORY_DEPTH}`
2552
2742
  );
2553
2743
  return;
2554
2744
  }
@@ -2573,7 +2763,7 @@ const _U = class _U {
2573
2763
  path: I,
2574
2764
  isDirectory: true
2575
2765
  });
2576
- const D = A.createReader(), i = await _U.readAllDirectoryEntries(D);
2766
+ const D = A.createReader(), i = await _K.readAllDirectoryEntries(D);
2577
2767
  for (const w of i)
2578
2768
  await this.traverseEntry(w, E, g, B + 1);
2579
2769
  }
@@ -2625,8 +2815,8 @@ const _U = class _U {
2625
2815
  this.failPendingUpload("Upload interrupted: the remote clipboard changed");
2626
2816
  const g = A.map((B) => ({
2627
2817
  ...B,
2628
- name: _U.sanitizeFileName(B.name),
2629
- path: B.path !== void 0 ? _U.sanitizePath(B.path) : void 0
2818
+ name: _K.sanitizeFileName(B.name),
2819
+ path: B.path !== void 0 ? _K.sanitizePath(B.path) : void 0
2630
2820
  }));
2631
2821
  this.availableFiles = g, this.clipDataId = I, this.emit("files-available", g);
2632
2822
  }
@@ -2689,60 +2879,60 @@ const _U = class _U {
2689
2879
  const w = new Uint8Array(8);
2690
2880
  new DataView(w.buffer).setBigUint64(0, BigInt(i.size), true), this.sendSubmitFileContents(A.streamId, false, w), i.size === 0 && this.markUploadFileComplete(A.index, i, I.transferIds.get(A.index) ?? -1);
2691
2881
  } else if ((A.flags & j.RANGE) !== 0) {
2692
- const w = i.slice(A.position, A.position + A.size), F = new FileReader();
2693
- I.activeReaders.set(A.streamId, F);
2882
+ const w = i.slice(A.position, A.position + A.size), G = new FileReader();
2883
+ I.activeReaders.set(A.streamId, G);
2694
2884
  const a = setTimeout(() => {
2695
2885
  var _a;
2696
- F.abort(), this.uploadState !== void 0 && (this.uploadState.activeReaders.delete(A.streamId), this.uploadState.readerTimeouts.delete(A.streamId)), this.sendSubmitFileContents(A.streamId, true, new Uint8Array());
2697
- const J = {
2698
- message: `File read timeout after ${_U.FILE_READER_TIMEOUT_MS / 1e3}s`,
2886
+ G.abort(), this.uploadState !== void 0 && (this.uploadState.activeReaders.delete(A.streamId), this.uploadState.readerTimeouts.delete(A.streamId)), this.sendSubmitFileContents(A.streamId, true, new Uint8Array());
2887
+ const U = {
2888
+ message: `File read timeout after ${_K.FILE_READER_TIMEOUT_MS / 1e3}s`,
2699
2889
  transferId: (_a = this.uploadState) == null ? void 0 : _a.transferIds.get(A.index),
2700
2890
  fileIndex: A.index,
2701
2891
  fileName: D.name,
2702
2892
  direction: "upload"
2703
2893
  };
2704
- this.emit("error", J), this.uploadState !== void 0 && (this.uploadState.failedFiles.add(A.index), this.uploadState.completedFiles.add(A.index), this.uploadState.completedFiles.size >= this.uploadState.expectedFileCount && this.finishUploadBatch(this.uploadState));
2705
- }, _U.FILE_READER_TIMEOUT_MS);
2706
- I.readerTimeouts.set(A.streamId, a), F.onload = () => {
2894
+ this.emit("error", U), this.uploadState !== void 0 && (this.uploadState.failedFiles.add(A.index), this.uploadState.completedFiles.add(A.index), this.uploadState.completedFiles.size >= this.uploadState.expectedFileCount && this.finishUploadBatch(this.uploadState));
2895
+ }, _K.FILE_READER_TIMEOUT_MS);
2896
+ I.readerTimeouts.set(A.streamId, a), G.onload = () => {
2707
2897
  if (this.uploadState !== void 0) {
2708
2898
  this.uploadState.activeReaders.delete(A.streamId);
2709
- const Y = this.uploadState.readerTimeouts.get(A.streamId);
2710
- Y !== void 0 && (clearTimeout(Y), this.uploadState.readerTimeouts.delete(A.streamId));
2899
+ const c = this.uploadState.readerTimeouts.get(A.streamId);
2900
+ c !== void 0 && (clearTimeout(c), this.uploadState.readerTimeouts.delete(A.streamId));
2711
2901
  }
2712
- const J = new Uint8Array(F.result);
2713
- if (this.sendSubmitFileContents(A.streamId, false, J), this.uploadState !== void 0) {
2714
- const Y = (this.uploadState.bytesServed.get(A.index) ?? 0) + J.length;
2715
- this.uploadState.bytesServed.set(A.index, Y);
2716
- const l = this.uploadState.transferIds.get(A.index) ?? -1, v = {
2717
- transferId: l,
2902
+ const U = new Uint8Array(G.result);
2903
+ if (this.sendSubmitFileContents(A.streamId, false, U), this.uploadState !== void 0) {
2904
+ const c = (this.uploadState.bytesServed.get(A.index) ?? 0) + U.length;
2905
+ this.uploadState.bytesServed.set(A.index, c);
2906
+ const O = this.uploadState.transferIds.get(A.index) ?? -1, S = {
2907
+ transferId: O,
2718
2908
  fileIndex: A.index,
2719
2909
  fileName: D.name,
2720
- bytesTransferred: Y,
2910
+ bytesTransferred: c,
2721
2911
  totalBytes: i.size,
2722
- percentage: i.size === 0 ? 100 : Math.min(Y / i.size * 100, 100)
2912
+ percentage: i.size === 0 ? 100 : Math.min(c / i.size * 100, 100)
2723
2913
  };
2724
- this.emit("upload-progress", v), Y >= i.size && this.markUploadFileComplete(A.index, i, l);
2914
+ this.emit("upload-progress", S), c >= i.size && this.markUploadFileComplete(A.index, i, O);
2725
2915
  }
2726
- }, F.onerror = () => {
2916
+ }, G.onerror = () => {
2727
2917
  var _a, _b;
2728
2918
  if (this.uploadState !== void 0) {
2729
2919
  this.uploadState.activeReaders.delete(A.streamId);
2730
- const Y = this.uploadState.readerTimeouts.get(A.streamId);
2731
- Y !== void 0 && (clearTimeout(Y), this.uploadState.readerTimeouts.delete(A.streamId));
2920
+ const c = this.uploadState.readerTimeouts.get(A.streamId);
2921
+ c !== void 0 && (clearTimeout(c), this.uploadState.readerTimeouts.delete(A.streamId));
2732
2922
  }
2733
2923
  if (((_a = this.uploadState) == null ? void 0 : _a.failedFiles.has(A.index)) === true)
2734
2924
  return;
2735
2925
  this.sendSubmitFileContents(A.streamId, true, new Uint8Array());
2736
- const J = {
2926
+ const U = {
2737
2927
  message: "Failed to read file chunk",
2738
2928
  transferId: (_b = this.uploadState) == null ? void 0 : _b.transferIds.get(A.index),
2739
2929
  fileIndex: A.index,
2740
2930
  fileName: D.name,
2741
2931
  direction: "upload",
2742
- cause: F.error
2932
+ cause: G.error
2743
2933
  };
2744
- this.emit("error", J), this.uploadState !== void 0 && (this.uploadState.failedFiles.add(A.index), this.uploadState.completedFiles.add(A.index), this.uploadState.completedFiles.size >= this.uploadState.expectedFileCount && this.finishUploadBatch(this.uploadState));
2745
- }, F.readAsArrayBuffer(w);
2934
+ this.emit("error", U), this.uploadState !== void 0 && (this.uploadState.failedFiles.add(A.index), this.uploadState.completedFiles.add(A.index), this.uploadState.completedFiles.size >= this.uploadState.expectedFileCount && this.finishUploadBatch(this.uploadState));
2935
+ }, G.readAsArrayBuffer(w);
2746
2936
  }
2747
2937
  }
2748
2938
  /**
@@ -2814,7 +3004,7 @@ const _U = class _U {
2814
3004
  return;
2815
3005
  }
2816
3006
  const g = new DataView(A.data.buffer, A.data.byteOffset, A.data.byteLength), B = Number(g.getBigUint64(0, true));
2817
- if (B > _U.MAX_FILE_SIZE) {
3007
+ if (B > _K.MAX_FILE_SIZE) {
2818
3008
  this.activeDownloads.delete(A.streamId), this.abortWriteHandle(I);
2819
3009
  const E = {
2820
3010
  message: `File size ${(B / (1024 * 1024 * 1024)).toFixed(2)}GB exceeds maximum download limit of 2GB`,
@@ -2847,7 +3037,7 @@ const _U = class _U {
2847
3037
  initWriteHandleAndRequestFirstChunk(A) {
2848
3038
  A.writeHandleReady = (async () => {
2849
3039
  try {
2850
- const I = (async () => (await this.ensureStorageBackend()).createWriteHandle(A.fileInfo.name, A.expectedSize ?? 0))(), g = _U.WRITE_HANDLE_INIT_TIMEOUT_MS, B = await Promise.race([
3040
+ const I = (async () => (await this.ensureStorageBackend()).createWriteHandle(A.fileInfo.name, A.expectedSize ?? 0))(), g = _K.WRITE_HANDLE_INIT_TIMEOUT_MS, B = await Promise.race([
2851
3041
  I,
2852
3042
  new Promise(
2853
3043
  (E, D) => setTimeout(() => D(new Error(`Storage init timed out after ${g / 1e3}s`)), g)
@@ -3033,9 +3223,9 @@ const _U = class _U {
3033
3223
  }
3034
3224
  };
3035
3225
  /** Maximum file size for downloads (2GB) to prevent browser out-of-memory errors */
3036
- __publicField(_U, "MAX_FILE_SIZE", 2 * 1024 * 1024 * 1024);
3226
+ __publicField(_K, "MAX_FILE_SIZE", 2 * 1024 * 1024 * 1024);
3037
3227
  /** Timeout for FileReader operations (60 seconds) to prevent stalled uploads */
3038
- __publicField(_U, "FILE_READER_TIMEOUT_MS", 60 * 1e3);
3228
+ __publicField(_K, "FILE_READER_TIMEOUT_MS", 60 * 1e3);
3039
3229
  /**
3040
3230
  * How long to keep clipboard monitoring suppressed after advertising an upload
3041
3231
  * while waiting for the remote to pull the files (first FileContentsRequest),
@@ -3045,7 +3235,7 @@ __publicField(_U, "FILE_READER_TIMEOUT_MS", 60 * 1e3);
3045
3235
  * clobbered), the watchdog resumes monitoring and fails the upload so its state
3046
3236
  * cannot wedge later uploads.
3047
3237
  */
3048
- __publicField(_U, "PASTE_ACK_TIMEOUT_MS", 60 * 1e3);
3238
+ __publicField(_K, "PASTE_ACK_TIMEOUT_MS", 60 * 1e3);
3049
3239
  /**
3050
3240
  * Upload inactivity window. After the remote starts pulling, each FileContentsRequest
3051
3241
  * resets this; if pulls then stop for this long -- e.g. the remote grabbed the
@@ -3053,107 +3243,107 @@ __publicField(_U, "PASTE_ACK_TIMEOUT_MS", 60 * 1e3);
3053
3243
  * upload is failed so `uploadState` is released and later uploads aren't wedged. A
3054
3244
  * slow-but-progressing transfer keeps resetting it, so it is never killed.
3055
3245
  */
3056
- __publicField(_U, "UPLOAD_INACTIVITY_TIMEOUT_MS", 60 * 1e3);
3246
+ __publicField(_K, "UPLOAD_INACTIVITY_TIMEOUT_MS", 60 * 1e3);
3057
3247
  /** Timeout for storage backend write handle initialization (30 seconds). */
3058
- __publicField(_U, "WRITE_HANDLE_INIT_TIMEOUT_MS", 30 * 1e3);
3248
+ __publicField(_K, "WRITE_HANDLE_INIT_TIMEOUT_MS", 30 * 1e3);
3059
3249
  /** Maximum recursion depth when traversing dropped directories. */
3060
- __publicField(_U, "MAX_DIRECTORY_DEPTH", 32);
3250
+ __publicField(_K, "MAX_DIRECTORY_DEPTH", 32);
3061
3251
  /** Maximum total entries (files + directories) collected from a single drop. */
3062
- __publicField(_U, "MAX_DIRECTORY_ENTRIES", 1e3);
3063
- let U = _U;
3064
- async function wI(Q, A) {
3065
- await OA(A === void 0 ? void 0 : { module_or_path: A }), JA(Q);
3066
- }
3067
- const GI = {
3068
- DesktopSize: p,
3069
- InputTransaction: e,
3070
- SessionBuilder: c,
3071
- ClipboardData: Z,
3072
- DeviceEvent: K
3252
+ __publicField(_K, "MAX_DIRECTORY_ENTRIES", 1e3);
3253
+ let K = _K;
3254
+ async function NI(Q, A) {
3255
+ await fA(A === void 0 ? void 0 : { module_or_path: A }), hA(Q);
3256
+ }
3257
+ const kI = {
3258
+ DesktopSize: V,
3259
+ InputTransaction: _,
3260
+ SessionBuilder: J,
3261
+ ClipboardData: d,
3262
+ DeviceEvent: h
3073
3263
  };
3074
- function oI(Q) {
3075
- return new N("pcb", Q);
3264
+ function RI(Q) {
3265
+ return new k("pcb", Q);
3076
3266
  }
3077
- function NI(Q, A = "enhanced") {
3267
+ function FI(Q, A = "enhanced") {
3078
3268
  if (Q.trim() === "")
3079
3269
  throw new Error("vmconnect requires a VM ID");
3080
3270
  const I = A === "enhanced" ? `${Q};EnhancedMode=1` : Q;
3081
- return new N("vmconnect", I);
3082
- }
3083
- function kI(Q) {
3084
- return new N("display_control", Q);
3085
- }
3086
- function FI(Q) {
3087
- return new N("graphics_pipeline", Q);
3088
- }
3089
- function RI(Q) {
3090
- return new N("h264_decoder", Q);
3271
+ return new k("vmconnect", I);
3091
3272
  }
3092
3273
  function yI(Q) {
3093
- return new N("audio_playback", Q);
3274
+ return new k("display_control", Q);
3094
3275
  }
3095
3276
  function YI(Q) {
3096
- return new N("drive_redirection", Q);
3277
+ return new k("graphics_pipeline", Q);
3097
3278
  }
3098
3279
  function MI(Q) {
3099
- return new N("audio_input", Q);
3100
- }
3101
- function cI(Q) {
3102
- const A = Q instanceof Uint8Array ? Q : new Uint8Array(Q.buffer, Q.byteOffset, Q.byteLength);
3103
- return new N("audio_input_data", A);
3280
+ return new k("h264_decoder", Q);
3104
3281
  }
3105
3282
  function JI(Q) {
3106
- return new N("kdc_proxy_url", Q);
3283
+ return new k("audio_playback", Q);
3107
3284
  }
3108
3285
  function UI(Q) {
3109
- return new N("outbound_message_size_limit", Q);
3286
+ return new k("drive_redirection", Q);
3287
+ }
3288
+ function cI(Q) {
3289
+ return new k("audio_input", Q);
3110
3290
  }
3111
3291
  function KI(Q) {
3112
- return new N("enable_credssp", Q);
3292
+ const A = Q instanceof Uint8Array ? Q : new Uint8Array(Q.buffer, Q.byteOffset, Q.byteLength);
3293
+ return new k("audio_input_data", A);
3113
3294
  }
3114
3295
  function hI(Q) {
3115
- return new N("enable_server_pointer", Q);
3296
+ return new k("kdc_proxy_url", Q);
3116
3297
  }
3117
3298
  function aI(Q) {
3118
- return new N("legacy_graphics", Q);
3299
+ return new k("outbound_message_size_limit", Q);
3300
+ }
3301
+ function HI(Q) {
3302
+ return new k("enable_credssp", Q);
3303
+ }
3304
+ function SI(Q) {
3305
+ return new k("enable_server_pointer", Q);
3306
+ }
3307
+ function LI(Q) {
3308
+ return new k("legacy_graphics", Q);
3119
3309
  }
3120
3310
  export {
3121
- GI as Backend,
3122
- YA as BlobStorageBackend,
3311
+ kI as Backend,
3312
+ cA as BlobStorageBackend,
3123
3313
  j as FileContentsFlags,
3124
- x as OpfsStorageBackend,
3125
- QI as PrinterDriverName,
3126
- QA as RdpFile,
3127
- U as RdpFileTransferProvider,
3128
- cA as WebCodecsH264Decoder,
3129
- MI as audioInput,
3130
- cI as audioInputData,
3131
- yI as audioPlayback,
3132
- gI as detectStorageBackend,
3133
- kI as displayControl,
3134
- YI as driveRedirection,
3135
- KI as enableCredssp,
3136
- hI as enableServerPointer,
3137
- TA as fileContentsRequestCallback,
3138
- nA as fileContentsResponseCallback,
3139
- fA as filesAvailableCallback,
3140
- FI as graphicsPipeline,
3141
- RI as h264Decoder,
3142
- BI as h264Supported,
3143
- wI as init,
3144
- _A as initiateFileCopy,
3145
- JI as kdcProxyUrl,
3146
- aI as legacyGraphics,
3147
- rA as lockCallback,
3148
- vA as locksExpiredCallback,
3149
- UI as outboundMessageSizeLimit,
3150
- oI as preConnectionBlob,
3151
- CI as printJobStreamCallbacks,
3152
- DI as printerDeviceId,
3153
- iI as printerDriverName,
3154
- EI as printerName,
3155
- eA as requestFileContents,
3156
- uA as submitFileContents,
3157
- PA as unlockCallback,
3158
- NI as vmConnect
3314
+ l as OpfsStorageBackend,
3315
+ DI as PrinterDriverName,
3316
+ iA as RdpFile,
3317
+ K as RdpFileTransferProvider,
3318
+ M as WebCodecsH264Decoder,
3319
+ cI as audioInput,
3320
+ KI as audioInputData,
3321
+ JI as audioPlayback,
3322
+ CI as detectStorageBackend,
3323
+ yI as displayControl,
3324
+ UI as driveRedirection,
3325
+ HI as enableCredssp,
3326
+ SI as enableServerPointer,
3327
+ zA as fileContentsRequestCallback,
3328
+ PA as fileContentsResponseCallback,
3329
+ nA as filesAvailableCallback,
3330
+ YI as graphicsPipeline,
3331
+ MI as h264Decoder,
3332
+ EI as h264Supported,
3333
+ NI as init,
3334
+ II as initiateFileCopy,
3335
+ hI as kdcProxyUrl,
3336
+ LI as legacyGraphics,
3337
+ vA as lockCallback,
3338
+ uA as locksExpiredCallback,
3339
+ aI as outboundMessageSizeLimit,
3340
+ RI as preConnectionBlob,
3341
+ iI as printJobStreamCallbacks,
3342
+ GI as printerDeviceId,
3343
+ oI as printerDriverName,
3344
+ wI as printerName,
3345
+ $A as requestFileContents,
3346
+ AI as submitFileContents,
3347
+ eA as unlockCallback,
3348
+ FI as vmConnect
3159
3349
  };