@reactoo/watchtogether-sdk-js 2.6.11 → 2.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/watchtogether-sdk.js +225 -325
- package/dist/watchtogether-sdk.min.js +2 -2
- package/package.json +1 -1
- package/src/models/iot.js +10 -4
- package/src/models/utils.js +32 -0
- package/src/modules/wt-iot.js +11 -1
- package/src/modules/wt-room.js +4 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @reactoo/watchtogether-sdk-js
|
|
3
|
-
* @version 2.6.
|
|
3
|
+
* @version 2.6.13
|
|
4
4
|
*/
|
|
5
5
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
6
6
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -287,237 +287,6 @@ eval("module.exports = __webpack_require__(/*! core-js-pure/stable/weak-map */ \
|
|
|
287
287
|
|
|
288
288
|
/***/ }),
|
|
289
289
|
|
|
290
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/array/from.js":
|
|
291
|
-
/*!*******************************************************************!*\
|
|
292
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/array/from.js ***!
|
|
293
|
-
\*******************************************************************/
|
|
294
|
-
/*! no static exports found */
|
|
295
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
296
|
-
|
|
297
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/array/from */ \"./node_modules/core-js-pure/features/array/from.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/array/from.js?");
|
|
298
|
-
|
|
299
|
-
/***/ }),
|
|
300
|
-
|
|
301
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/array/is-array.js":
|
|
302
|
-
/*!***********************************************************************!*\
|
|
303
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/array/is-array.js ***!
|
|
304
|
-
\***********************************************************************/
|
|
305
|
-
/*! no static exports found */
|
|
306
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
307
|
-
|
|
308
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/array/is-array */ \"./node_modules/core-js-pure/features/array/is-array.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/array/is-array.js?");
|
|
309
|
-
|
|
310
|
-
/***/ }),
|
|
311
|
-
|
|
312
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/get-iterator-method.js":
|
|
313
|
-
/*!****************************************************************************!*\
|
|
314
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/get-iterator-method.js ***!
|
|
315
|
-
\****************************************************************************/
|
|
316
|
-
/*! no static exports found */
|
|
317
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
318
|
-
|
|
319
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/get-iterator-method */ \"./node_modules/core-js-pure/features/get-iterator-method.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/get-iterator-method.js?");
|
|
320
|
-
|
|
321
|
-
/***/ }),
|
|
322
|
-
|
|
323
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/instance/filter.js":
|
|
324
|
-
/*!************************************************************************!*\
|
|
325
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/instance/filter.js ***!
|
|
326
|
-
\************************************************************************/
|
|
327
|
-
/*! no static exports found */
|
|
328
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
329
|
-
|
|
330
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/instance/filter */ \"./node_modules/core-js-pure/features/instance/filter.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/instance/filter.js?");
|
|
331
|
-
|
|
332
|
-
/***/ }),
|
|
333
|
-
|
|
334
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/instance/for-each.js":
|
|
335
|
-
/*!**************************************************************************!*\
|
|
336
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/instance/for-each.js ***!
|
|
337
|
-
\**************************************************************************/
|
|
338
|
-
/*! no static exports found */
|
|
339
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
340
|
-
|
|
341
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/instance/for-each */ \"./node_modules/core-js-pure/features/instance/for-each.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/instance/for-each.js?");
|
|
342
|
-
|
|
343
|
-
/***/ }),
|
|
344
|
-
|
|
345
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/instance/index-of.js":
|
|
346
|
-
/*!**************************************************************************!*\
|
|
347
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/instance/index-of.js ***!
|
|
348
|
-
\**************************************************************************/
|
|
349
|
-
/*! no static exports found */
|
|
350
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
351
|
-
|
|
352
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/instance/index-of */ \"./node_modules/core-js-pure/features/instance/index-of.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/instance/index-of.js?");
|
|
353
|
-
|
|
354
|
-
/***/ }),
|
|
355
|
-
|
|
356
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/instance/reverse.js":
|
|
357
|
-
/*!*************************************************************************!*\
|
|
358
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/instance/reverse.js ***!
|
|
359
|
-
\*************************************************************************/
|
|
360
|
-
/*! no static exports found */
|
|
361
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
362
|
-
|
|
363
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/instance/reverse */ \"./node_modules/core-js-pure/features/instance/reverse.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/instance/reverse.js?");
|
|
364
|
-
|
|
365
|
-
/***/ }),
|
|
366
|
-
|
|
367
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/instance/slice.js":
|
|
368
|
-
/*!***********************************************************************!*\
|
|
369
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/instance/slice.js ***!
|
|
370
|
-
\***********************************************************************/
|
|
371
|
-
/*! no static exports found */
|
|
372
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
373
|
-
|
|
374
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/instance/slice */ \"./node_modules/core-js-pure/features/instance/slice.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/instance/slice.js?");
|
|
375
|
-
|
|
376
|
-
/***/ }),
|
|
377
|
-
|
|
378
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/object/create.js":
|
|
379
|
-
/*!**********************************************************************!*\
|
|
380
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/object/create.js ***!
|
|
381
|
-
\**********************************************************************/
|
|
382
|
-
/*! no static exports found */
|
|
383
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
384
|
-
|
|
385
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/object/create */ \"./node_modules/core-js-pure/features/object/create.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/object/create.js?");
|
|
386
|
-
|
|
387
|
-
/***/ }),
|
|
388
|
-
|
|
389
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/object/define-properties.js":
|
|
390
|
-
/*!*********************************************************************************!*\
|
|
391
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/object/define-properties.js ***!
|
|
392
|
-
\*********************************************************************************/
|
|
393
|
-
/*! no static exports found */
|
|
394
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
395
|
-
|
|
396
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/object/define-properties */ \"./node_modules/core-js-pure/features/object/define-properties.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/object/define-properties.js?");
|
|
397
|
-
|
|
398
|
-
/***/ }),
|
|
399
|
-
|
|
400
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/object/define-property.js":
|
|
401
|
-
/*!*******************************************************************************!*\
|
|
402
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/object/define-property.js ***!
|
|
403
|
-
\*******************************************************************************/
|
|
404
|
-
/*! no static exports found */
|
|
405
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
406
|
-
|
|
407
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/object/define-property */ \"./node_modules/core-js-pure/features/object/define-property.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/object/define-property.js?");
|
|
408
|
-
|
|
409
|
-
/***/ }),
|
|
410
|
-
|
|
411
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-descriptor.js":
|
|
412
|
-
/*!*******************************************************************************************!*\
|
|
413
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-descriptor.js ***!
|
|
414
|
-
\*******************************************************************************************/
|
|
415
|
-
/*! no static exports found */
|
|
416
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
417
|
-
|
|
418
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/object/get-own-property-descriptor */ \"./node_modules/core-js-pure/features/object/get-own-property-descriptor.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-descriptor.js?");
|
|
419
|
-
|
|
420
|
-
/***/ }),
|
|
421
|
-
|
|
422
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-descriptors.js":
|
|
423
|
-
/*!********************************************************************************************!*\
|
|
424
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-descriptors.js ***!
|
|
425
|
-
\********************************************************************************************/
|
|
426
|
-
/*! no static exports found */
|
|
427
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
428
|
-
|
|
429
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/object/get-own-property-descriptors */ \"./node_modules/core-js-pure/features/object/get-own-property-descriptors.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-descriptors.js?");
|
|
430
|
-
|
|
431
|
-
/***/ }),
|
|
432
|
-
|
|
433
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-symbols.js":
|
|
434
|
-
/*!****************************************************************************************!*\
|
|
435
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-symbols.js ***!
|
|
436
|
-
\****************************************************************************************/
|
|
437
|
-
/*! no static exports found */
|
|
438
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
439
|
-
|
|
440
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/object/get-own-property-symbols */ \"./node_modules/core-js-pure/features/object/get-own-property-symbols.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-symbols.js?");
|
|
441
|
-
|
|
442
|
-
/***/ }),
|
|
443
|
-
|
|
444
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/object/get-prototype-of.js":
|
|
445
|
-
/*!********************************************************************************!*\
|
|
446
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/object/get-prototype-of.js ***!
|
|
447
|
-
\********************************************************************************/
|
|
448
|
-
/*! no static exports found */
|
|
449
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
450
|
-
|
|
451
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/object/get-prototype-of */ \"./node_modules/core-js-pure/features/object/get-prototype-of.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/object/get-prototype-of.js?");
|
|
452
|
-
|
|
453
|
-
/***/ }),
|
|
454
|
-
|
|
455
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/object/keys.js":
|
|
456
|
-
/*!********************************************************************!*\
|
|
457
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/object/keys.js ***!
|
|
458
|
-
\********************************************************************/
|
|
459
|
-
/*! no static exports found */
|
|
460
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
461
|
-
|
|
462
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/object/keys */ \"./node_modules/core-js-pure/features/object/keys.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/object/keys.js?");
|
|
463
|
-
|
|
464
|
-
/***/ }),
|
|
465
|
-
|
|
466
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/object/set-prototype-of.js":
|
|
467
|
-
/*!********************************************************************************!*\
|
|
468
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/object/set-prototype-of.js ***!
|
|
469
|
-
\********************************************************************************/
|
|
470
|
-
/*! no static exports found */
|
|
471
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
472
|
-
|
|
473
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/object/set-prototype-of */ \"./node_modules/core-js-pure/features/object/set-prototype-of.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/object/set-prototype-of.js?");
|
|
474
|
-
|
|
475
|
-
/***/ }),
|
|
476
|
-
|
|
477
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/promise.js":
|
|
478
|
-
/*!****************************************************************!*\
|
|
479
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/promise.js ***!
|
|
480
|
-
\****************************************************************/
|
|
481
|
-
/*! no static exports found */
|
|
482
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
483
|
-
|
|
484
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/promise */ \"./node_modules/core-js-pure/features/promise/index.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/promise.js?");
|
|
485
|
-
|
|
486
|
-
/***/ }),
|
|
487
|
-
|
|
488
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/symbol.js":
|
|
489
|
-
/*!***************************************************************!*\
|
|
490
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/symbol.js ***!
|
|
491
|
-
\***************************************************************/
|
|
492
|
-
/*! no static exports found */
|
|
493
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
494
|
-
|
|
495
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/symbol */ \"./node_modules/core-js-pure/features/symbol/index.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/symbol.js?");
|
|
496
|
-
|
|
497
|
-
/***/ }),
|
|
498
|
-
|
|
499
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/symbol/iterator.js":
|
|
500
|
-
/*!************************************************************************!*\
|
|
501
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/symbol/iterator.js ***!
|
|
502
|
-
\************************************************************************/
|
|
503
|
-
/*! no static exports found */
|
|
504
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
505
|
-
|
|
506
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/symbol/iterator */ \"./node_modules/core-js-pure/features/symbol/iterator.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/symbol/iterator.js?");
|
|
507
|
-
|
|
508
|
-
/***/ }),
|
|
509
|
-
|
|
510
|
-
/***/ "./node_modules/@babel/runtime-corejs3/core-js/symbol/to-primitive.js":
|
|
511
|
-
/*!****************************************************************************!*\
|
|
512
|
-
!*** ./node_modules/@babel/runtime-corejs3/core-js/symbol/to-primitive.js ***!
|
|
513
|
-
\****************************************************************************/
|
|
514
|
-
/*! no static exports found */
|
|
515
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
516
|
-
|
|
517
|
-
eval("module.exports = __webpack_require__(/*! core-js-pure/features/symbol/to-primitive */ \"./node_modules/core-js-pure/features/symbol/to-primitive.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/core-js/symbol/to-primitive.js?");
|
|
518
|
-
|
|
519
|
-
/***/ }),
|
|
520
|
-
|
|
521
290
|
/***/ "./node_modules/@babel/runtime-corejs3/helpers/arrayLikeToArray.js":
|
|
522
291
|
/*!*************************************************************************!*\
|
|
523
292
|
!*** ./node_modules/@babel/runtime-corejs3/helpers/arrayLikeToArray.js ***!
|
|
@@ -536,7 +305,7 @@ eval("function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.len
|
|
|
536
305
|
/*! no static exports found */
|
|
537
306
|
/***/ (function(module, exports, __webpack_require__) {
|
|
538
307
|
|
|
539
|
-
eval("var _Array$isArray = __webpack_require__(/*!
|
|
308
|
+
eval("var _Array$isArray = __webpack_require__(/*! core-js-pure/features/array/is-array.js */ \"./node_modules/core-js-pure/features/array/is-array.js\");\nfunction _arrayWithHoles(arr) {\n if (_Array$isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/arrayWithHoles.js?");
|
|
540
309
|
|
|
541
310
|
/***/ }),
|
|
542
311
|
|
|
@@ -547,7 +316,7 @@ eval("var _Array$isArray = __webpack_require__(/*! @babel/runtime-corejs3/core-j
|
|
|
547
316
|
/*! no static exports found */
|
|
548
317
|
/***/ (function(module, exports, __webpack_require__) {
|
|
549
318
|
|
|
550
|
-
eval("var _Array$isArray = __webpack_require__(/*!
|
|
319
|
+
eval("var _Array$isArray = __webpack_require__(/*! core-js-pure/features/array/is-array.js */ \"./node_modules/core-js-pure/features/array/is-array.js\");\nvar arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime-corejs3/helpers/arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(arr) {\n if (_Array$isArray(arr)) return arrayLikeToArray(arr);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/arrayWithoutHoles.js?");
|
|
551
320
|
|
|
552
321
|
/***/ }),
|
|
553
322
|
|
|
@@ -558,7 +327,7 @@ eval("var _Array$isArray = __webpack_require__(/*! @babel/runtime-corejs3/core-j
|
|
|
558
327
|
/*! no static exports found */
|
|
559
328
|
/***/ (function(module, exports, __webpack_require__) {
|
|
560
329
|
|
|
561
|
-
eval("var _Promise = __webpack_require__(/*!
|
|
330
|
+
eval("var _Promise = __webpack_require__(/*! core-js-pure/features/promise/index.js */ \"./node_modules/core-js-pure/features/promise/index.js\");\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n _Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new _Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js?");
|
|
562
331
|
|
|
563
332
|
/***/ }),
|
|
564
333
|
|
|
@@ -580,7 +349,7 @@ eval("function _classCallCheck(instance, Constructor) {\n if (!(instance instan
|
|
|
580
349
|
/*! no static exports found */
|
|
581
350
|
/***/ (function(module, exports, __webpack_require__) {
|
|
582
351
|
|
|
583
|
-
eval("var _Object$defineProperty = __webpack_require__(/*!
|
|
352
|
+
eval("var _Object$defineProperty = __webpack_require__(/*! core-js-pure/features/object/define-property.js */ \"./node_modules/core-js-pure/features/object/define-property.js\");\nvar toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"./node_modules/@babel/runtime-corejs3/helpers/toPropertyKey.js\");\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n _Object$defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n _Object$defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/createClass.js?");
|
|
584
353
|
|
|
585
354
|
/***/ }),
|
|
586
355
|
|
|
@@ -591,7 +360,7 @@ eval("var _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs
|
|
|
591
360
|
/*! no static exports found */
|
|
592
361
|
/***/ (function(module, exports, __webpack_require__) {
|
|
593
362
|
|
|
594
|
-
eval("var _Symbol = __webpack_require__(/*!
|
|
363
|
+
eval("var _Symbol = __webpack_require__(/*! core-js-pure/features/symbol/index.js */ \"./node_modules/core-js-pure/features/symbol/index.js\");\nvar _getIteratorMethod = __webpack_require__(/*! core-js-pure/features/get-iterator-method.js */ \"./node_modules/core-js-pure/features/get-iterator-method.js\");\nvar _Array$isArray = __webpack_require__(/*! core-js-pure/features/array/is-array.js */ \"./node_modules/core-js-pure/features/array/is-array.js\");\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/@babel/runtime-corejs3/helpers/unsupportedIterableToArray.js\");\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof _Symbol !== \"undefined\" && _getIteratorMethod(o) || o[\"@@iterator\"];\n if (!it) {\n if (_Array$isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function F() {};\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\nmodule.exports = _createForOfIteratorHelper, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/createForOfIteratorHelper.js?");
|
|
595
364
|
|
|
596
365
|
/***/ }),
|
|
597
366
|
|
|
@@ -602,7 +371,7 @@ eval("var _Symbol = __webpack_require__(/*! @babel/runtime-corejs3/core-js/symbo
|
|
|
602
371
|
/*! no static exports found */
|
|
603
372
|
/***/ (function(module, exports, __webpack_require__) {
|
|
604
373
|
|
|
605
|
-
eval("var _Object$defineProperty = __webpack_require__(/*!
|
|
374
|
+
eval("var _Object$defineProperty = __webpack_require__(/*! core-js-pure/features/object/define-property.js */ \"./node_modules/core-js-pure/features/object/define-property.js\");\nvar toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"./node_modules/@babel/runtime-corejs3/helpers/toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n _Object$defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js?");
|
|
606
375
|
|
|
607
376
|
/***/ }),
|
|
608
377
|
|
|
@@ -613,7 +382,7 @@ eval("var _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs
|
|
|
613
382
|
/*! no static exports found */
|
|
614
383
|
/***/ (function(module, exports, __webpack_require__) {
|
|
615
384
|
|
|
616
|
-
eval("var _Symbol = __webpack_require__(/*!
|
|
385
|
+
eval("var _Symbol = __webpack_require__(/*! core-js-pure/features/symbol/index.js */ \"./node_modules/core-js-pure/features/symbol/index.js\");\nvar _getIteratorMethod = __webpack_require__(/*! core-js-pure/features/get-iterator-method.js */ \"./node_modules/core-js-pure/features/get-iterator-method.js\");\nvar _Array$from = __webpack_require__(/*! core-js-pure/features/array/from.js */ \"./node_modules/core-js-pure/features/array/from.js\");\nfunction _iterableToArray(iter) {\n if (typeof _Symbol !== \"undefined\" && _getIteratorMethod(iter) != null || iter[\"@@iterator\"] != null) return _Array$from(iter);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/iterableToArray.js?");
|
|
617
386
|
|
|
618
387
|
/***/ }),
|
|
619
388
|
|
|
@@ -624,7 +393,7 @@ eval("var _Symbol = __webpack_require__(/*! @babel/runtime-corejs3/core-js/symbo
|
|
|
624
393
|
/*! no static exports found */
|
|
625
394
|
/***/ (function(module, exports, __webpack_require__) {
|
|
626
395
|
|
|
627
|
-
eval("var _Symbol = __webpack_require__(/*!
|
|
396
|
+
eval("var _Symbol = __webpack_require__(/*! core-js-pure/features/symbol/index.js */ \"./node_modules/core-js-pure/features/symbol/index.js\");\nvar _getIteratorMethod = __webpack_require__(/*! core-js-pure/features/get-iterator-method.js */ \"./node_modules/core-js-pure/features/get-iterator-method.js\");\nvar _pushInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/push.js */ \"./node_modules/core-js-pure/features/instance/push.js\");\nfunction _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof _Symbol && _getIteratorMethod(arr) || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_pushInstanceProperty(_arr).call(_arr, _s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/iterableToArrayLimit.js?");
|
|
628
397
|
|
|
629
398
|
/***/ }),
|
|
630
399
|
|
|
@@ -657,7 +426,7 @@ eval("function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt t
|
|
|
657
426
|
/*! no static exports found */
|
|
658
427
|
/***/ (function(module, exports, __webpack_require__) {
|
|
659
428
|
|
|
660
|
-
eval("var _Object$keys = __webpack_require__(/*!
|
|
429
|
+
eval("var _Object$keys = __webpack_require__(/*! core-js-pure/features/object/keys.js */ \"./node_modules/core-js-pure/features/object/keys.js\");\nvar _Object$getOwnPropertySymbols = __webpack_require__(/*! core-js-pure/features/object/get-own-property-symbols.js */ \"./node_modules/core-js-pure/features/object/get-own-property-symbols.js\");\nvar _filterInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/filter.js */ \"./node_modules/core-js-pure/features/instance/filter.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! core-js-pure/features/object/get-own-property-descriptor.js */ \"./node_modules/core-js-pure/features/object/get-own-property-descriptor.js\");\nvar _pushInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/push.js */ \"./node_modules/core-js-pure/features/instance/push.js\");\nvar _forEachInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/for-each.js */ \"./node_modules/core-js-pure/features/instance/for-each.js\");\nvar _Object$getOwnPropertyDescriptors = __webpack_require__(/*! core-js-pure/features/object/get-own-property-descriptors.js */ \"./node_modules/core-js-pure/features/object/get-own-property-descriptors.js\");\nvar _Object$defineProperties = __webpack_require__(/*! core-js-pure/features/object/define-properties.js */ \"./node_modules/core-js-pure/features/object/define-properties.js\");\nvar _Object$defineProperty = __webpack_require__(/*! core-js-pure/features/object/define-property.js */ \"./node_modules/core-js-pure/features/object/define-property.js\");\nvar defineProperty = __webpack_require__(/*! ./defineProperty.js */ \"./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js\");\nfunction ownKeys(object, enumerableOnly) {\n var keys = _Object$keys(object);\n if (_Object$getOwnPropertySymbols) {\n var symbols = _Object$getOwnPropertySymbols(object);\n enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) {\n return _Object$getOwnPropertyDescriptor(object, sym).enumerable;\n })), _pushInstanceProperty(keys).apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var _context, _context2;\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) {\n defineProperty(target, key, source[key]);\n }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) {\n _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/objectSpread2.js?");
|
|
661
430
|
|
|
662
431
|
/***/ }),
|
|
663
432
|
|
|
@@ -668,7 +437,7 @@ eval("var _Object$keys = __webpack_require__(/*! @babel/runtime-corejs3/core-js/
|
|
|
668
437
|
/*! no static exports found */
|
|
669
438
|
/***/ (function(module, exports, __webpack_require__) {
|
|
670
439
|
|
|
671
|
-
eval("var _Object$getOwnPropertySymbols = __webpack_require__(/*!
|
|
440
|
+
eval("var _Object$getOwnPropertySymbols = __webpack_require__(/*! core-js-pure/features/object/get-own-property-symbols.js */ \"./node_modules/core-js-pure/features/object/get-own-property-symbols.js\");\nvar _indexOfInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/index-of.js */ \"./node_modules/core-js-pure/features/instance/index-of.js\");\nvar objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ \"./node_modules/@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (_Object$getOwnPropertySymbols) {\n var sourceSymbolKeys = _Object$getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (_indexOfInstanceProperty(excluded).call(excluded, key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/objectWithoutProperties.js?");
|
|
672
441
|
|
|
673
442
|
/***/ }),
|
|
674
443
|
|
|
@@ -679,7 +448,7 @@ eval("var _Object$getOwnPropertySymbols = __webpack_require__(/*! @babel/runtime
|
|
|
679
448
|
/*! no static exports found */
|
|
680
449
|
/***/ (function(module, exports, __webpack_require__) {
|
|
681
450
|
|
|
682
|
-
eval("var _Object$keys = __webpack_require__(/*!
|
|
451
|
+
eval("var _Object$keys = __webpack_require__(/*! core-js-pure/features/object/keys.js */ \"./node_modules/core-js-pure/features/object/keys.js\");\nvar _indexOfInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/index-of.js */ \"./node_modules/core-js-pure/features/instance/index-of.js\");\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = _Object$keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (_indexOfInstanceProperty(excluded).call(excluded, key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose.js?");
|
|
683
452
|
|
|
684
453
|
/***/ }),
|
|
685
454
|
|
|
@@ -690,7 +459,7 @@ eval("var _Object$keys = __webpack_require__(/*! @babel/runtime-corejs3/core-js/
|
|
|
690
459
|
/*! no static exports found */
|
|
691
460
|
/***/ (function(module, exports, __webpack_require__) {
|
|
692
461
|
|
|
693
|
-
eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"./node_modules/@babel/runtime-corejs3/helpers/typeof.js\")[\"default\"];\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js/object/define-property */ \"./node_modules/@babel/runtime-corejs3/core-js/object/define-property.js\");\nvar _Symbol = __webpack_require__(/*! @babel/runtime-corejs3/core-js/symbol */ \"./node_modules/@babel/runtime-corejs3/core-js/symbol.js\");\nvar _Object$create = __webpack_require__(/*! @babel/runtime-corejs3/core-js/object/create */ \"./node_modules/@babel/runtime-corejs3/core-js/object/create.js\");\nvar _Object$getPrototypeOf = __webpack_require__(/*! @babel/runtime-corejs3/core-js/object/get-prototype-of */ \"./node_modules/@babel/runtime-corejs3/core-js/object/get-prototype-of.js\");\nvar _forEachInstanceProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js/instance/for-each */ \"./node_modules/@babel/runtime-corejs3/core-js/instance/for-each.js\");\nvar _Object$setPrototypeOf = __webpack_require__(/*! @babel/runtime-corejs3/core-js/object/set-prototype-of */ \"./node_modules/@babel/runtime-corejs3/core-js/object/set-prototype-of.js\");\nvar _Promise = __webpack_require__(/*! @babel/runtime-corejs3/core-js/promise */ \"./node_modules/@babel/runtime-corejs3/core-js/promise.js\");\nvar _reverseInstanceProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js/instance/reverse */ \"./node_modules/@babel/runtime-corejs3/core-js/instance/reverse.js\");\nvar _sliceInstanceProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js/instance/slice */ \"./node_modules/@babel/runtime-corejs3/core-js/instance/slice.js\");\nfunction _regeneratorRuntime() {\n \"use strict\";\n\n /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = _Object$defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof _Symbol ? _Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return _Object$defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = _Object$create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = _Object$getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n var _context;\n _forEachInstanceProperty(_context = [\"next\", \"throw\", \"return\"]).call(_context, function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = _Object$create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = _Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return _reverseInstanceProperty(keys).call(keys), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n var _context2;\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, _forEachInstanceProperty(_context2 = this.tryEntries).call(_context2, resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/regeneratorRuntime.js?");
|
|
462
|
+
eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"./node_modules/@babel/runtime-corejs3/helpers/typeof.js\")[\"default\"];\nvar _Object$defineProperty = __webpack_require__(/*! core-js-pure/features/object/define-property.js */ \"./node_modules/core-js-pure/features/object/define-property.js\");\nvar _Symbol = __webpack_require__(/*! core-js-pure/features/symbol/index.js */ \"./node_modules/core-js-pure/features/symbol/index.js\");\nvar _Object$create = __webpack_require__(/*! core-js-pure/features/object/create.js */ \"./node_modules/core-js-pure/features/object/create.js\");\nvar _Object$getPrototypeOf = __webpack_require__(/*! core-js-pure/features/object/get-prototype-of.js */ \"./node_modules/core-js-pure/features/object/get-prototype-of.js\");\nvar _forEachInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/for-each.js */ \"./node_modules/core-js-pure/features/instance/for-each.js\");\nvar _pushInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/push.js */ \"./node_modules/core-js-pure/features/instance/push.js\");\nvar _Object$setPrototypeOf = __webpack_require__(/*! core-js-pure/features/object/set-prototype-of.js */ \"./node_modules/core-js-pure/features/object/set-prototype-of.js\");\nvar _Promise = __webpack_require__(/*! core-js-pure/features/promise/index.js */ \"./node_modules/core-js-pure/features/promise/index.js\");\nvar _reverseInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/reverse.js */ \"./node_modules/core-js-pure/features/instance/reverse.js\");\nvar _sliceInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/slice.js */ \"./node_modules/core-js-pure/features/instance/slice.js\");\nfunction _regeneratorRuntime() {\n \"use strict\";\n\n /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = _Object$defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof _Symbol ? _Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return _Object$defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = _Object$create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = _Object$getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n var _context;\n _forEachInstanceProperty(_context = [\"next\", \"throw\", \"return\"]).call(_context, function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var _context2;\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), _pushInstanceProperty(_context2 = this.tryEntries).call(_context2, entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = _Object$create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = _Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) _pushInstanceProperty(keys).call(keys, key);\n return _reverseInstanceProperty(keys).call(keys), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n var _context3;\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, _forEachInstanceProperty(_context3 = this.tryEntries).call(_context3, resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/regeneratorRuntime.js?");
|
|
694
463
|
|
|
695
464
|
/***/ }),
|
|
696
465
|
|
|
@@ -723,7 +492,7 @@ eval("var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */
|
|
|
723
492
|
/*! no static exports found */
|
|
724
493
|
/***/ (function(module, exports, __webpack_require__) {
|
|
725
494
|
|
|
726
|
-
eval("var _Symbol$toPrimitive = __webpack_require__(/*!
|
|
495
|
+
eval("var _Symbol$toPrimitive = __webpack_require__(/*! core-js-pure/features/symbol/to-primitive.js */ \"./node_modules/core-js-pure/features/symbol/to-primitive.js\");\nvar _typeof = __webpack_require__(/*! ./typeof.js */ \"./node_modules/@babel/runtime-corejs3/helpers/typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[_Symbol$toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/toPrimitive.js?");
|
|
727
496
|
|
|
728
497
|
/***/ }),
|
|
729
498
|
|
|
@@ -745,7 +514,7 @@ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"./node_modules/@bab
|
|
|
745
514
|
/*! no static exports found */
|
|
746
515
|
/***/ (function(module, exports, __webpack_require__) {
|
|
747
516
|
|
|
748
|
-
eval("var _Symbol = __webpack_require__(/*!
|
|
517
|
+
eval("var _Symbol = __webpack_require__(/*! core-js-pure/features/symbol/index.js */ \"./node_modules/core-js-pure/features/symbol/index.js\");\nvar _Symbol$iterator = __webpack_require__(/*! core-js-pure/features/symbol/iterator.js */ \"./node_modules/core-js-pure/features/symbol/iterator.js\");\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof _Symbol && \"symbol\" == typeof _Symbol$iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof _Symbol && obj.constructor === _Symbol && obj !== _Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/typeof.js?");
|
|
749
518
|
|
|
750
519
|
/***/ }),
|
|
751
520
|
|
|
@@ -756,7 +525,7 @@ eval("var _Symbol = __webpack_require__(/*! @babel/runtime-corejs3/core-js/symbo
|
|
|
756
525
|
/*! no static exports found */
|
|
757
526
|
/***/ (function(module, exports, __webpack_require__) {
|
|
758
527
|
|
|
759
|
-
eval("var _sliceInstanceProperty = __webpack_require__(/*!
|
|
528
|
+
eval("var _sliceInstanceProperty = __webpack_require__(/*! core-js-pure/features/instance/slice.js */ \"./node_modules/core-js-pure/features/instance/slice.js\");\nvar _Array$from = __webpack_require__(/*! core-js-pure/features/array/from.js */ \"./node_modules/core-js-pure/features/array/from.js\");\nvar arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime-corejs3/helpers/arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n var _context;\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return _Array$from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@babel/runtime-corejs3/helpers/unsupportedIterableToArray.js?");
|
|
760
529
|
|
|
761
530
|
/***/ }),
|
|
762
531
|
|
|
@@ -775,11 +544,11 @@ eval("// TODO(Babel 8): Remove this file.\n\nvar runtime = __webpack_require__(/
|
|
|
775
544
|
/*!**************************************************************************!*\
|
|
776
545
|
!*** ./node_modules/@fingerprintjs/fingerprintjs-pro/dist/fp.esm.min.js ***!
|
|
777
546
|
\**************************************************************************/
|
|
778
|
-
/*! exports provided: ERROR_API_KEY_EXPIRED, ERROR_API_KEY_INVALID, ERROR_API_KEY_MISSING, ERROR_BAD_REQUEST_FORMAT, ERROR_BAD_RESPONSE_FORMAT, ERROR_CLIENT_TIMEOUT, ERROR_CSP_BLOCK, ERROR_FORBIDDEN_ENDPOINT, ERROR_FORBIDDEN_HEADER, ERROR_FORBIDDEN_ORIGIN, ERROR_GENERAL_SERVER_FAILURE, ERROR_INSTALLATION_METHOD_RESTRICTED, ERROR_INTEGRATION_FAILURE, ERROR_NETWORK_ABORT, ERROR_NETWORK_CONNECTION, ERROR_RATE_LIMIT, ERROR_SCRIPT_LOAD_FAIL, ERROR_SERVER_TIMEOUT, ERROR_SUBSCRIPTION_NOT_ACTIVE, ERROR_TOKEN_EXPIRED, ERROR_TOKEN_INVALID, ERROR_TOKEN_MISSING, ERROR_UNSUPPORTED_VERSION, ERROR_WRONG_REGION, default, defaultEndpoint, defaultScriptUrlPattern, defaultTlsEndpoint, load */
|
|
547
|
+
/*! exports provided: ERROR_API_KEY_EXPIRED, ERROR_API_KEY_INVALID, ERROR_API_KEY_MISSING, ERROR_BAD_REQUEST_FORMAT, ERROR_BAD_RESPONSE_FORMAT, ERROR_CLIENT_TIMEOUT, ERROR_CSP_BLOCK, ERROR_FORBIDDEN_ENDPOINT, ERROR_FORBIDDEN_HEADER, ERROR_FORBIDDEN_ORIGIN, ERROR_GENERAL_SERVER_FAILURE, ERROR_INSTALLATION_METHOD_RESTRICTED, ERROR_INTEGRATION_FAILURE, ERROR_INVALID_ENDPOINT, ERROR_NETWORK_ABORT, ERROR_NETWORK_CONNECTION, ERROR_RATE_LIMIT, ERROR_SCRIPT_LOAD_FAIL, ERROR_SERVER_TIMEOUT, ERROR_SUBSCRIPTION_NOT_ACTIVE, ERROR_TOKEN_EXPIRED, ERROR_TOKEN_INVALID, ERROR_TOKEN_MISSING, ERROR_UNSUPPORTED_VERSION, ERROR_WRONG_REGION, default, defaultEndpoint, defaultScriptUrlPattern, defaultTlsEndpoint, load */
|
|
779
548
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
780
549
|
|
|
781
550
|
"use strict";
|
|
782
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_API_KEY_EXPIRED\", function() { return h; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_API_KEY_INVALID\", function() { return I; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_API_KEY_MISSING\", function() { return v; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_BAD_REQUEST_FORMAT\", function() { return N; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_BAD_RESPONSE_FORMAT\", function() { return E; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_CLIENT_TIMEOUT\", function() { return R; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_CSP_BLOCK\", function() { return s; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_FORBIDDEN_ENDPOINT\", function() { return p; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_FORBIDDEN_HEADER\", function() { return P; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_FORBIDDEN_ORIGIN\", function() { return A; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_GENERAL_SERVER_FAILURE\", function() { return T; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_INSTALLATION_METHOD_RESTRICTED\", function() { return _; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_INTEGRATION_FAILURE\", function() { return O; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_NETWORK_ABORT\", function() { return c; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_NETWORK_CONNECTION\", function() { return a; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_RATE_LIMIT\", function() { return w; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_SCRIPT_LOAD_FAIL\", function() { return K; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_SERVER_TIMEOUT\", function() { return m; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_SUBSCRIPTION_NOT_ACTIVE\", function() { return l; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_TOKEN_EXPIRED\", function() { return D; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_TOKEN_INVALID\", function() { return S; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_TOKEN_MISSING\", function() { return y; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_UNSUPPORTED_VERSION\", function() { return d; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_WRONG_REGION\", function() { return f; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultEndpoint\", function() { return i; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultScriptUrlPattern\", function() { return b; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultTlsEndpoint\", function() { return u; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"load\", function() { return M; });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.js\");\n/**\n * FingerprintJS Pro v3.8.2 - Copyright (c) FingerprintJS, Inc, 2023 (https://fingerprint.com)\n *\n * This software contains code from open-source projects:\n * MurmurHash3 by Karan Lyons (https://github.com/karanlyons/murmurHash3.js)\n */\n\n\nfunction r(e, t) {\n return function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }(e, t) ? e[t] : void 0;\n}\nfunction o(e) {\n for (var t = \"\", n = 0; n < e.length; ++n) if (n > 0) {\n var r = e[n].toLowerCase();\n r !== e[n] ? t += \" \".concat(r) : t += e[n];\n } else t += e[n].toUpperCase();\n return t;\n}\nvar i = {\n default: \"endpoint\"\n },\n u = {\n default: \"tlsEndpoint\"\n },\n R = \"Client timeout\",\n a = \"Network connection error\",\n c = \"Network request aborted\",\n E = \"Response cannot be parsed\",\n s = \"Blocked by CSP\",\n f = /*#__PURE__*/o(\"WrongRegion\"),\n l = /*#__PURE__*/o(\"SubscriptionNotActive\"),\n d = /*#__PURE__*/o(\"UnsupportedVersion\"),\n _ = /*#__PURE__*/o(\"InstallationMethodRestricted\"),\n p = /*#__PURE__*/o(\"HostnameRestricted\"),\n O = /*#__PURE__*/o(\"IntegrationFailed\"),\n v = \"API key required\",\n I = \"API key not found\",\n h = \"API key expired\",\n N = \"Request cannot be parsed\",\n T = \"Request failed\",\n m = \"Request failed to process\",\n w = \"Too many requests, rate limit exceeded\",\n A = \"Not available for this origin\",\n P = \"Not available with restricted header\",\n y = v,\n S = I,\n D = h,\n U = \"3.8.2\",\n L = \"9319\";\nfunction g(t, n) {\n var r = [];\n return function (t, n) {\n var r = 5,\n o = (E = t, f = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spreadArray\"])([], E, !0), {\n current: function () {\n return f[0];\n },\n postpone: function () {\n var e = f.shift();\n void 0 !== e && f.push(e);\n },\n exclude: function () {\n f.shift();\n }\n }),\n i = (R = 100, a = 3e3, c = 0, function () {\n return Math.random() * Math.min(a, R * Math.pow(2, c++));\n }),\n u = o.current();\n var R, a, c;\n var E, f;\n if (void 0 === u) return Promise.reject(new TypeError(\"The list of script URL patterns is empty\"));\n var l = function (e, t) {\n return n(e).catch(function (e) {\n if (t + 1 >= r) throw e;\n !function (e) {\n if (!(e instanceof Error)) return !1;\n var t = e.message;\n return t === s || t === L;\n }(e) ? o.postpone() : o.exclude();\n var n,\n u = o.current();\n if (void 0 === u) throw e;\n return (n = i(), new Promise(function (e) {\n return setTimeout(e, n);\n })).then(function () {\n return l(u, t + 1);\n });\n });\n };\n return l(u, 0);\n }(t, function (e) {\n var t = new Date(),\n o = function () {\n return r.push({\n url: e,\n startedAt: t,\n finishedAt: new Date()\n });\n },\n i = n(e);\n return i.then(o, o), i;\n }).then(function (e) {\n return [e, {\n attempts: r\n }];\n });\n}\nvar C = \"https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js\",\n b = C,\n K = \"Failed to load the JS script of the agent\";\nfunction M(e) {\n var o;\n e.scriptUrlPattern;\n var i = e.token,\n u = e.apiKey,\n R = void 0 === u ? i : u,\n a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__rest\"])(e, [\"scriptUrlPattern\", \"token\", \"apiKey\"]),\n c = null !== (o = r(e, \"scriptUrlPattern\")) && void 0 !== o ? o : C;\n return Promise.resolve().then(function () {\n if (!R || \"string\" != typeof R) throw new Error(v);\n var e = function (e, t) {\n return (Array.isArray(e) ? e : [e]).map(function (e) {\n return function (e, t) {\n var n = encodeURIComponent;\n return e.replace(/<[^<>]+>/g, function (e) {\n return \"<version>\" === e ? \"3\" : \"<apiKey>\" === e ? n(t) : \"<loaderVersion>\" === e ? n(U) : e;\n });\n }(String(e), t);\n });\n }(c, R);\n return g(e, B).catch(k);\n }).then(function (e) {\n var t = e[0],\n r = e[1];\n return t.load(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({}, a), {\n ldi: r\n }));\n });\n}\nfunction B(e) {\n return function (e, t, n, r) {\n var o,\n i = document,\n u = \"securitypolicyviolation\",\n R = function (t) {\n var n = new URL(e, location.href),\n r = t.blockedURI;\n r !== n.href && r !== n.protocol.slice(0, -1) && r !== n.origin || (o = t, a());\n };\n i.addEventListener(u, R);\n var a = function () {\n return i.removeEventListener(u, R);\n };\n return null == r || r.then(a, a), Promise.resolve().then(t).then(function (e) {\n return a(), e;\n }, function (e) {\n return new Promise(function (e) {\n return setTimeout(e);\n }).then(function () {\n if (a(), o) return n(o);\n throw e;\n });\n });\n }(e, function () {\n return function (e) {\n return new Promise(function (t, n) {\n var r = document.createElement(\"script\"),\n o = function () {\n var e;\n return null === (e = r.parentNode) || void 0 === e ? void 0 : e.removeChild(r);\n },\n i = document.head || document.getElementsByTagName(\"head\")[0];\n r.onload = function () {\n o(), t();\n }, r.onerror = function () {\n o(), n(new Error(K));\n }, r.async = !0, r.src = e, i.appendChild(r);\n });\n }(e);\n }, function () {\n throw new Error(s);\n }).then(F);\n}\nfunction F() {\n var e = window,\n t = \"__fpjs_p_l_b\",\n n = e[t];\n if (function (e, t) {\n var n,\n r = null === (n = Object.getOwnPropertyDescriptor) || void 0 === n ? void 0 : n.call(Object, e, t);\n (null == r ? void 0 : r.configurable) ? delete e[t] : r && !r.writable || (e[t] = void 0);\n }(e, t), \"function\" != typeof (null == n ? void 0 : n.load)) throw new Error(L);\n return n;\n}\nfunction k(e) {\n throw e instanceof Error && e.message === L ? new Error(K) : e;\n}\nvar V = {\n load: M,\n defaultScriptUrlPattern: b,\n ERROR_SCRIPT_LOAD_FAIL: K,\n ERROR_API_KEY_EXPIRED: h,\n ERROR_API_KEY_INVALID: I,\n ERROR_API_KEY_MISSING: v,\n ERROR_BAD_REQUEST_FORMAT: N,\n ERROR_BAD_RESPONSE_FORMAT: E,\n ERROR_CLIENT_TIMEOUT: R,\n ERROR_CSP_BLOCK: s,\n ERROR_FORBIDDEN_ENDPOINT: p,\n ERROR_FORBIDDEN_HEADER: P,\n ERROR_FORBIDDEN_ORIGIN: A,\n ERROR_GENERAL_SERVER_FAILURE: T,\n ERROR_INSTALLATION_METHOD_RESTRICTED: _,\n ERROR_INTEGRATION_FAILURE: O,\n ERROR_NETWORK_ABORT: c,\n ERROR_NETWORK_CONNECTION: a,\n ERROR_RATE_LIMIT: w,\n ERROR_SERVER_TIMEOUT: m,\n ERROR_SUBSCRIPTION_NOT_ACTIVE: l,\n ERROR_TOKEN_EXPIRED: D,\n ERROR_TOKEN_INVALID: S,\n ERROR_TOKEN_MISSING: y,\n ERROR_UNSUPPORTED_VERSION: d,\n ERROR_WRONG_REGION: f,\n defaultEndpoint: i,\n defaultTlsEndpoint: u\n};\n\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@fingerprintjs/fingerprintjs-pro/dist/fp.esm.min.js?");
|
|
551
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_API_KEY_EXPIRED\", function() { return N; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_API_KEY_INVALID\", function() { return h; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_API_KEY_MISSING\", function() { return I; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_BAD_REQUEST_FORMAT\", function() { return T; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_BAD_RESPONSE_FORMAT\", function() { return E; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_CLIENT_TIMEOUT\", function() { return R; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_CSP_BLOCK\", function() { return s; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_FORBIDDEN_ENDPOINT\", function() { return O; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_FORBIDDEN_HEADER\", function() { return D; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_FORBIDDEN_ORIGIN\", function() { return P; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_GENERAL_SERVER_FAILURE\", function() { return m; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_INSTALLATION_METHOD_RESTRICTED\", function() { return p; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_INTEGRATION_FAILURE\", function() { return v; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_INVALID_ENDPOINT\", function() { return f; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_NETWORK_ABORT\", function() { return c; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_NETWORK_CONNECTION\", function() { return a; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_RATE_LIMIT\", function() { return w; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_SCRIPT_LOAD_FAIL\", function() { return M; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_SERVER_TIMEOUT\", function() { return A; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_SUBSCRIPTION_NOT_ACTIVE\", function() { return l; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_TOKEN_EXPIRED\", function() { return L; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_TOKEN_INVALID\", function() { return S; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_TOKEN_MISSING\", function() { return y; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_UNSUPPORTED_VERSION\", function() { return _; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ERROR_WRONG_REGION\", function() { return d; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return G; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultEndpoint\", function() { return i; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultScriptUrlPattern\", function() { return K; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultTlsEndpoint\", function() { return u; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"load\", function() { return B; });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.js\");\n/**\n * FingerprintJS Pro v3.8.5 - Copyright (c) FingerprintJS, Inc, 2023 (https://fingerprint.com)\n *\n * This software contains code from open-source projects:\n * MurmurHash3 by Karan Lyons (https://github.com/karanlyons/murmurHash3.js)\n */\n\n\nfunction r(e) {\n for (var t = \"\", n = 0; n < e.length; ++n) if (n > 0) {\n var r = e[n].toLowerCase();\n r !== e[n] ? t += \" \".concat(r) : t += e[n];\n } else t += e[n].toUpperCase();\n return t;\n}\nfunction o(e, t) {\n return function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }(e, t) ? e[t] : void 0;\n}\nvar i = {\n default: \"endpoint\"\n },\n u = {\n default: \"tlsEndpoint\"\n },\n R = \"Client timeout\",\n a = \"Network connection error\",\n c = \"Network request aborted\",\n E = \"Response cannot be parsed\",\n s = \"Blocked by CSP\",\n f = \"The endpoint parameter is not a valid URL\",\n d = /*#__PURE__*/r(\"WrongRegion\"),\n l = /*#__PURE__*/r(\"SubscriptionNotActive\"),\n _ = /*#__PURE__*/r(\"UnsupportedVersion\"),\n p = /*#__PURE__*/r(\"InstallationMethodRestricted\"),\n O = /*#__PURE__*/r(\"HostnameRestricted\"),\n v = /*#__PURE__*/r(\"IntegrationFailed\"),\n I = \"API key required\",\n h = \"API key not found\",\n N = \"API key expired\",\n T = \"Request cannot be parsed\",\n m = \"Request failed\",\n A = \"Request failed to process\",\n w = \"Too many requests, rate limit exceeded\",\n P = \"Not available for this origin\",\n D = \"Not available with restricted header\",\n y = I,\n S = h,\n L = N,\n U = \"3.8.5\",\n g = \"9319\";\nfunction C(t, n) {\n var r = [];\n return function (t, n) {\n var r = 5,\n o = (E = t, f = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spreadArray\"])([], E, !0), {\n current: function () {\n return f[0];\n },\n postpone: function () {\n var e = f.shift();\n void 0 !== e && f.push(e);\n },\n exclude: function () {\n f.shift();\n }\n }),\n i = (R = 100, a = 3e3, c = 0, function () {\n return Math.random() * Math.min(a, R * Math.pow(2, c++));\n }),\n u = o.current();\n var R, a, c;\n var E, f;\n if (void 0 === u) return Promise.reject(new TypeError(\"The list of script URL patterns is empty\"));\n var d = function (e, t) {\n return n(e).catch(function (e) {\n if (t + 1 >= r) throw e;\n !function (e) {\n if (!(e instanceof Error)) return !1;\n var t = e.message;\n return t === s || t === g;\n }(e) ? o.postpone() : o.exclude();\n var n,\n u = o.current();\n if (void 0 === u) throw e;\n return (n = i(), new Promise(function (e) {\n return setTimeout(e, n);\n })).then(function () {\n return d(u, t + 1);\n });\n });\n };\n return d(u, 0);\n }(t, function (e) {\n var t = new Date(),\n o = function (n) {\n return r.push({\n url: e,\n startedAt: t,\n finishedAt: new Date(),\n error: n\n });\n },\n i = n(e);\n return i.then(function () {\n return o();\n }, o), i;\n }).then(function (e) {\n return [e, {\n attempts: r\n }];\n });\n}\nvar b = \"https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js\",\n K = b,\n M = \"Failed to load the JS script of the agent\";\nfunction B(e) {\n var r;\n e.scriptUrlPattern;\n var i = e.token,\n u = e.apiKey,\n R = void 0 === u ? i : u,\n a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__rest\"])(e, [\"scriptUrlPattern\", \"token\", \"apiKey\"]),\n c = null !== (r = o(e, \"scriptUrlPattern\")) && void 0 !== r ? r : b;\n return Promise.resolve().then(function () {\n if (!R || \"string\" != typeof R) throw new Error(I);\n var e = function (e, t) {\n return (Array.isArray(e) ? e : [e]).map(function (e) {\n return function (e, t) {\n var n = encodeURIComponent;\n return e.replace(/<[^<>]+>/g, function (e) {\n return \"<version>\" === e ? \"3\" : \"<apiKey>\" === e ? n(t) : \"<loaderVersion>\" === e ? n(U) : e;\n });\n }(String(e), t);\n });\n }(c, R);\n return C(e, F).catch(k);\n }).then(function (e) {\n var t = e[0],\n r = e[1];\n return t.load(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({}, a), {\n ldi: r\n }));\n });\n}\nfunction F(e) {\n return function (e, t, n, r) {\n var o,\n i = document,\n u = \"securitypolicyviolation\",\n R = function (t) {\n var n = new URL(e, location.href),\n r = t.blockedURI;\n r !== n.href && r !== n.protocol.slice(0, -1) && r !== n.origin || (o = t, a());\n };\n i.addEventListener(u, R);\n var a = function () {\n return i.removeEventListener(u, R);\n };\n return null == r || r.then(a, a), Promise.resolve().then(t).then(function (e) {\n return a(), e;\n }, function (e) {\n return new Promise(function (e) {\n return setTimeout(e);\n }).then(function () {\n if (a(), o) return n(o);\n throw e;\n });\n });\n }(e, function () {\n return function (e) {\n return new Promise(function (t, n) {\n var r = document.createElement(\"script\"),\n o = function () {\n var e;\n return null === (e = r.parentNode) || void 0 === e ? void 0 : e.removeChild(r);\n },\n i = document.head || document.getElementsByTagName(\"head\")[0];\n r.onload = function () {\n o(), t();\n }, r.onerror = function () {\n o(), n(new Error(M));\n }, r.async = !0, r.src = e, i.appendChild(r);\n });\n }(e);\n }, function () {\n throw new Error(s);\n }).then(V);\n}\nfunction V() {\n var e = window,\n t = \"__fpjs_p_l_b\",\n n = e[t];\n if (function (e, t) {\n var n,\n r = null === (n = Object.getOwnPropertyDescriptor) || void 0 === n ? void 0 : n.call(Object, e, t);\n (null == r ? void 0 : r.configurable) ? delete e[t] : r && !r.writable || (e[t] = void 0);\n }(e, t), \"function\" != typeof (null == n ? void 0 : n.load)) throw new Error(g);\n return n;\n}\nfunction k(e) {\n throw e instanceof Error && e.message === g ? new Error(M) : e;\n}\nvar G = {\n load: B,\n defaultScriptUrlPattern: K,\n ERROR_SCRIPT_LOAD_FAIL: M,\n ERROR_API_KEY_EXPIRED: N,\n ERROR_API_KEY_INVALID: h,\n ERROR_API_KEY_MISSING: I,\n ERROR_BAD_REQUEST_FORMAT: T,\n ERROR_BAD_RESPONSE_FORMAT: E,\n ERROR_CLIENT_TIMEOUT: R,\n ERROR_CSP_BLOCK: s,\n ERROR_FORBIDDEN_ENDPOINT: O,\n ERROR_FORBIDDEN_HEADER: D,\n ERROR_FORBIDDEN_ORIGIN: P,\n ERROR_GENERAL_SERVER_FAILURE: m,\n ERROR_INSTALLATION_METHOD_RESTRICTED: p,\n ERROR_INTEGRATION_FAILURE: v,\n ERROR_INVALID_ENDPOINT: f,\n ERROR_NETWORK_ABORT: c,\n ERROR_NETWORK_CONNECTION: a,\n ERROR_RATE_LIMIT: w,\n ERROR_SERVER_TIMEOUT: A,\n ERROR_SUBSCRIPTION_NOT_ACTIVE: l,\n ERROR_TOKEN_EXPIRED: L,\n ERROR_TOKEN_INVALID: S,\n ERROR_TOKEN_MISSING: y,\n ERROR_UNSUPPORTED_VERSION: _,\n ERROR_WRONG_REGION: d,\n defaultEndpoint: i,\n defaultTlsEndpoint: u\n};\n\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@fingerprintjs/fingerprintjs-pro/dist/fp.esm.min.js?");
|
|
783
552
|
|
|
784
553
|
/***/ }),
|
|
785
554
|
|
|
@@ -787,11 +556,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
787
556
|
/*!******************************************************************!*\
|
|
788
557
|
!*** ./node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.js ***!
|
|
789
558
|
\******************************************************************/
|
|
790
|
-
/*! exports provided: componentsToDebugString, default, getFullscreenElement, getScreenFrame, hashComponents, isAndroid, isChromium, isDesktopSafari, isEdgeHTML, isGecko, isTrident, isWebKit, load, loadSources, murmurX64Hash128, prepareForSources, sources, transformSource */
|
|
559
|
+
/*! exports provided: componentsToDebugString, default, getFullscreenElement, getScreenFrame, hashComponents, isAndroid, isChromium, isDesktopSafari, isEdgeHTML, isGecko, isTrident, isWebKit, load, loadSources, murmurX64Hash128, prepareForSources, sources, transformSource, withIframe */
|
|
791
560
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
792
561
|
|
|
793
562
|
"use strict";
|
|
794
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"componentsToDebugString\", function() { return componentsToDebugString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return index; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFullscreenElement\", function() { return getFullscreenElement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getScreenFrame\", function() { return getScreenFrame; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hashComponents\", function() { return hashComponents; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isAndroid\", function() { return isAndroid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isChromium\", function() { return isChromium; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDesktopSafari\", function() { return isDesktopSafari; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isEdgeHTML\", function() { return isEdgeHTML; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isGecko\", function() { return isGecko; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isTrident\", function() { return isTrident; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isWebKit\", function() { return isWebKit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"load\", function() { return load; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadSources\", function() { return loadSources; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"murmurX64Hash128\", function() { return murmurX64Hash128; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prepareForSources\", function() { return prepareForSources; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sources\", function() { return sources; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformSource\", function() { return transformSource; });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.js\");\n/**\n * FingerprintJS v3.4.0 - Copyright (c) FingerprintJS, Inc, 2023 (https://fingerprint.com)\n * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.\n *\n * This software contains code from open-source projects:\n * MurmurHash3 by Karan Lyons (https://github.com/karanlyons/murmurHash3.js)\n */\n\n\nvar version = \"3.4.0\";\nfunction wait(durationMs, resolveWith) {\n return new Promise(function (resolve) {\n return setTimeout(resolve, durationMs, resolveWith);\n });\n}\nfunction requestIdleCallbackIfAvailable(fallbackTimeout, deadlineTimeout) {\n if (deadlineTimeout === void 0) {\n deadlineTimeout = Infinity;\n }\n var requestIdleCallback = window.requestIdleCallback;\n if (requestIdleCallback) {\n // The function `requestIdleCallback` loses the binding to `window` here.\n // `globalThis` isn't always equal `window` (see https://github.com/fingerprintjs/fingerprintjs/issues/683).\n // Therefore, an error can occur. `call(window,` prevents the error.\n return new Promise(function (resolve) {\n return requestIdleCallback.call(window, function () {\n return resolve();\n }, {\n timeout: deadlineTimeout\n });\n });\n } else {\n return wait(Math.min(fallbackTimeout, deadlineTimeout));\n }\n}\nfunction isPromise(value) {\n return !!value && typeof value.then === 'function';\n}\n/**\n * Calls a maybe asynchronous function without creating microtasks when the function is synchronous.\n * Catches errors in both cases.\n *\n * If just you run a code like this:\n * ```\n * console.time('Action duration')\n * await action()\n * console.timeEnd('Action duration')\n * ```\n * The synchronous function time can be measured incorrectly because another microtask may run before the `await`\n * returns the control back to the code.\n */\nfunction awaitIfAsync(action, callback) {\n try {\n var returnedValue = action();\n if (isPromise(returnedValue)) {\n returnedValue.then(function (result) {\n return callback(true, result);\n }, function (error) {\n return callback(false, error);\n });\n } else {\n callback(true, returnedValue);\n }\n } catch (error) {\n callback(false, error);\n }\n}\n/**\n * If you run many synchronous tasks without using this function, the JS main loop will be busy and asynchronous tasks\n * (e.g. completing a network request, rendering the page) won't be able to happen.\n * This function allows running many synchronous tasks such way that asynchronous tasks can run too in background.\n */\nfunction forEachWithBreaks(items, callback, loopReleaseInterval) {\n if (loopReleaseInterval === void 0) {\n loopReleaseInterval = 16;\n }\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var lastLoopReleaseTime, i, now;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n lastLoopReleaseTime = Date.now();\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < items.length)) return [3 /*break*/, 4];\n callback(items[i], i);\n now = Date.now();\n if (!(now >= lastLoopReleaseTime + loopReleaseInterval)) return [3 /*break*/, 3];\n lastLoopReleaseTime = now;\n // Allows asynchronous actions and microtasks to happen\n return [4 /*yield*/, wait(0)];\n case 2:\n // Allows asynchronous actions and microtasks to happen\n _a.sent();\n _a.label = 3;\n case 3:\n ++i;\n return [3 /*break*/, 1];\n case 4:\n return [2 /*return*/];\n }\n });\n });\n}\n/**\n * Makes the given promise never emit an unhandled promise rejection console warning.\n * The promise will still pass errors to the next promises.\n *\n * Otherwise, promise emits a console warning unless it has a `catch` listener.\n */\nfunction suppressUnhandledRejectionWarning(promise) {\n promise.then(undefined, function () {\n return undefined;\n });\n}\n\n/*\n * Taken from https://github.com/karanlyons/murmurHash3.js/blob/a33d0723127e2e5415056c455f8aed2451ace208/murmurHash3.js\n */\n//\n// Given two 64bit ints (as an array of two 32bit ints) returns the two\n// added together as a 64bit int (as an array of two 32bit ints).\n//\nfunction x64Add(m, n) {\n m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff];\n n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff];\n var o = [0, 0, 0, 0];\n o[3] += m[3] + n[3];\n o[2] += o[3] >>> 16;\n o[3] &= 0xffff;\n o[2] += m[2] + n[2];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n o[1] += m[1] + n[1];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n o[0] += m[0] + n[0];\n o[0] &= 0xffff;\n return [o[0] << 16 | o[1], o[2] << 16 | o[3]];\n}\n//\n// Given two 64bit ints (as an array of two 32bit ints) returns the two\n// multiplied together as a 64bit int (as an array of two 32bit ints).\n//\nfunction x64Multiply(m, n) {\n m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff];\n n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff];\n var o = [0, 0, 0, 0];\n o[3] += m[3] * n[3];\n o[2] += o[3] >>> 16;\n o[3] &= 0xffff;\n o[2] += m[2] * n[3];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n o[2] += m[3] * n[2];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n o[1] += m[1] * n[3];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n o[1] += m[2] * n[2];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n o[1] += m[3] * n[1];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n o[0] += m[0] * n[3] + m[1] * n[2] + m[2] * n[1] + m[3] * n[0];\n o[0] &= 0xffff;\n return [o[0] << 16 | o[1], o[2] << 16 | o[3]];\n}\n//\n// Given a 64bit int (as an array of two 32bit ints) and an int\n// representing a number of bit positions, returns the 64bit int (as an\n// array of two 32bit ints) rotated left by that number of positions.\n//\nfunction x64Rotl(m, n) {\n n %= 64;\n if (n === 32) {\n return [m[1], m[0]];\n } else if (n < 32) {\n return [m[0] << n | m[1] >>> 32 - n, m[1] << n | m[0] >>> 32 - n];\n } else {\n n -= 32;\n return [m[1] << n | m[0] >>> 32 - n, m[0] << n | m[1] >>> 32 - n];\n }\n}\n//\n// Given a 64bit int (as an array of two 32bit ints) and an int\n// representing a number of bit positions, returns the 64bit int (as an\n// array of two 32bit ints) shifted left by that number of positions.\n//\nfunction x64LeftShift(m, n) {\n n %= 64;\n if (n === 0) {\n return m;\n } else if (n < 32) {\n return [m[0] << n | m[1] >>> 32 - n, m[1] << n];\n } else {\n return [m[1] << n - 32, 0];\n }\n}\n//\n// Given two 64bit ints (as an array of two 32bit ints) returns the two\n// xored together as a 64bit int (as an array of two 32bit ints).\n//\nfunction x64Xor(m, n) {\n return [m[0] ^ n[0], m[1] ^ n[1]];\n}\n//\n// Given a block, returns murmurHash3's final x64 mix of that block.\n// (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the\n// only place where we need to right shift 64bit ints.)\n//\nfunction x64Fmix(h) {\n h = x64Xor(h, [0, h[0] >>> 1]);\n h = x64Multiply(h, [0xff51afd7, 0xed558ccd]);\n h = x64Xor(h, [0, h[0] >>> 1]);\n h = x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53]);\n h = x64Xor(h, [0, h[0] >>> 1]);\n return h;\n}\n//\n// Given a string and an optional seed as an int, returns a 128 bit\n// hash using the x64 flavor of MurmurHash3, as an unsigned hex.\n//\nfunction x64hash128(key, seed) {\n key = key || '';\n seed = seed || 0;\n var remainder = key.length % 16;\n var bytes = key.length - remainder;\n var h1 = [0, seed];\n var h2 = [0, seed];\n var k1 = [0, 0];\n var k2 = [0, 0];\n var c1 = [0x87c37b91, 0x114253d5];\n var c2 = [0x4cf5ad43, 0x2745937f];\n var i;\n for (i = 0; i < bytes; i = i + 16) {\n k1 = [key.charCodeAt(i + 4) & 0xff | (key.charCodeAt(i + 5) & 0xff) << 8 | (key.charCodeAt(i + 6) & 0xff) << 16 | (key.charCodeAt(i + 7) & 0xff) << 24, key.charCodeAt(i) & 0xff | (key.charCodeAt(i + 1) & 0xff) << 8 | (key.charCodeAt(i + 2) & 0xff) << 16 | (key.charCodeAt(i + 3) & 0xff) << 24];\n k2 = [key.charCodeAt(i + 12) & 0xff | (key.charCodeAt(i + 13) & 0xff) << 8 | (key.charCodeAt(i + 14) & 0xff) << 16 | (key.charCodeAt(i + 15) & 0xff) << 24, key.charCodeAt(i + 8) & 0xff | (key.charCodeAt(i + 9) & 0xff) << 8 | (key.charCodeAt(i + 10) & 0xff) << 16 | (key.charCodeAt(i + 11) & 0xff) << 24];\n k1 = x64Multiply(k1, c1);\n k1 = x64Rotl(k1, 31);\n k1 = x64Multiply(k1, c2);\n h1 = x64Xor(h1, k1);\n h1 = x64Rotl(h1, 27);\n h1 = x64Add(h1, h2);\n h1 = x64Add(x64Multiply(h1, [0, 5]), [0, 0x52dce729]);\n k2 = x64Multiply(k2, c2);\n k2 = x64Rotl(k2, 33);\n k2 = x64Multiply(k2, c1);\n h2 = x64Xor(h2, k2);\n h2 = x64Rotl(h2, 31);\n h2 = x64Add(h2, h1);\n h2 = x64Add(x64Multiply(h2, [0, 5]), [0, 0x38495ab5]);\n }\n k1 = [0, 0];\n k2 = [0, 0];\n switch (remainder) {\n case 15:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 14)], 48));\n // fallthrough\n case 14:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 13)], 40));\n // fallthrough\n case 13:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 12)], 32));\n // fallthrough\n case 12:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 11)], 24));\n // fallthrough\n case 11:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 10)], 16));\n // fallthrough\n case 10:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 9)], 8));\n // fallthrough\n case 9:\n k2 = x64Xor(k2, [0, key.charCodeAt(i + 8)]);\n k2 = x64Multiply(k2, c2);\n k2 = x64Rotl(k2, 33);\n k2 = x64Multiply(k2, c1);\n h2 = x64Xor(h2, k2);\n // fallthrough\n case 8:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 7)], 56));\n // fallthrough\n case 7:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 6)], 48));\n // fallthrough\n case 6:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 5)], 40));\n // fallthrough\n case 5:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 4)], 32));\n // fallthrough\n case 4:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 3)], 24));\n // fallthrough\n case 3:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 2)], 16));\n // fallthrough\n case 2:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 1)], 8));\n // fallthrough\n case 1:\n k1 = x64Xor(k1, [0, key.charCodeAt(i)]);\n k1 = x64Multiply(k1, c1);\n k1 = x64Rotl(k1, 31);\n k1 = x64Multiply(k1, c2);\n h1 = x64Xor(h1, k1);\n // fallthrough\n }\n\n h1 = x64Xor(h1, [0, key.length]);\n h2 = x64Xor(h2, [0, key.length]);\n h1 = x64Add(h1, h2);\n h2 = x64Add(h2, h1);\n h1 = x64Fmix(h1);\n h2 = x64Fmix(h2);\n h1 = x64Add(h1, h2);\n h2 = x64Add(h2, h1);\n return ('00000000' + (h1[0] >>> 0).toString(16)).slice(-8) + ('00000000' + (h1[1] >>> 0).toString(16)).slice(-8) + ('00000000' + (h2[0] >>> 0).toString(16)).slice(-8) + ('00000000' + (h2[1] >>> 0).toString(16)).slice(-8);\n}\n\n/**\n * Converts an error object to a plain object that can be used with `JSON.stringify`.\n * If you just run `JSON.stringify(error)`, you'll get `'{}'`.\n */\nfunction errorToObject(error) {\n var _a;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({\n name: error.name,\n message: error.message,\n stack: (_a = error.stack) === null || _a === void 0 ? void 0 : _a.split('\\n')\n }, error);\n}\n\n/*\n * This file contains functions to work with pure data only (no browser features, DOM, side effects, etc).\n */\n/**\n * Does the same as Array.prototype.includes but has better typing\n */\nfunction includes(haystack, needle) {\n for (var i = 0, l = haystack.length; i < l; ++i) {\n if (haystack[i] === needle) {\n return true;\n }\n }\n return false;\n}\n/**\n * Like `!includes()` but with proper typing\n */\nfunction excludes(haystack, needle) {\n return !includes(haystack, needle);\n}\n/**\n * Be careful, NaN can return\n */\nfunction toInt(value) {\n return parseInt(value);\n}\n/**\n * Be careful, NaN can return\n */\nfunction toFloat(value) {\n return parseFloat(value);\n}\nfunction replaceNaN(value, replacement) {\n return typeof value === 'number' && isNaN(value) ? replacement : value;\n}\nfunction countTruthy(values) {\n return values.reduce(function (sum, value) {\n return sum + (value ? 1 : 0);\n }, 0);\n}\nfunction round(value, base) {\n if (base === void 0) {\n base = 1;\n }\n if (Math.abs(base) >= 1) {\n return Math.round(value / base) * base;\n } else {\n // Sometimes when a number is multiplied by a small number, precision is lost,\n // for example 1234 * 0.0001 === 0.12340000000000001, and it's more precise divide: 1234 / (1 / 0.0001) === 0.1234.\n var counterBase = 1 / base;\n return Math.round(value * counterBase) / counterBase;\n }\n}\n/**\n * Parses a CSS selector into tag name with HTML attributes.\n * Only single element selector are supported (without operators like space, +, >, etc).\n *\n * Multiple values can be returned for each attribute. You decide how to handle them.\n */\nfunction parseSimpleCssSelector(selector) {\n var _a, _b;\n var errorMessage = \"Unexpected syntax '\".concat(selector, \"'\");\n var tagMatch = /^\\s*([a-z-]*)(.*)$/i.exec(selector);\n var tag = tagMatch[1] || undefined;\n var attributes = {};\n var partsRegex = /([.:#][\\w-]+|\\[.+?\\])/gi;\n var addAttribute = function (name, value) {\n attributes[name] = attributes[name] || [];\n attributes[name].push(value);\n };\n for (;;) {\n var match = partsRegex.exec(tagMatch[2]);\n if (!match) {\n break;\n }\n var part = match[0];\n switch (part[0]) {\n case '.':\n addAttribute('class', part.slice(1));\n break;\n case '#':\n addAttribute('id', part.slice(1));\n break;\n case '[':\n {\n var attributeMatch = /^\\[([\\w-]+)([~|^$*]?=(\"(.*?)\"|([\\w-]+)))?(\\s+[is])?\\]$/.exec(part);\n if (attributeMatch) {\n addAttribute(attributeMatch[1], (_b = (_a = attributeMatch[4]) !== null && _a !== void 0 ? _a : attributeMatch[5]) !== null && _b !== void 0 ? _b : '');\n } else {\n throw new Error(errorMessage);\n }\n break;\n }\n default:\n throw new Error(errorMessage);\n }\n }\n return [tag, attributes];\n}\nfunction ensureErrorWithMessage(error) {\n return error && typeof error === 'object' && 'message' in error ? error : {\n message: error\n };\n}\nfunction isFinalResultLoaded(loadResult) {\n return typeof loadResult !== 'function';\n}\n/**\n * Loads the given entropy source. Returns a function that gets an entropy component from the source.\n *\n * The result is returned synchronously to prevent `loadSources` from\n * waiting for one source to load before getting the components from the other sources.\n */\nfunction loadSource(source, sourceOptions) {\n var sourceLoadPromise = new Promise(function (resolveLoad) {\n var loadStartTime = Date.now();\n // `awaitIfAsync` is used instead of just `await` in order to measure the duration of synchronous sources\n // correctly (other microtasks won't affect the duration).\n awaitIfAsync(source.bind(null, sourceOptions), function () {\n var loadArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n loadArgs[_i] = arguments[_i];\n }\n var loadDuration = Date.now() - loadStartTime;\n // Source loading failed\n if (!loadArgs[0]) {\n return resolveLoad(function () {\n return {\n error: ensureErrorWithMessage(loadArgs[1]),\n duration: loadDuration\n };\n });\n }\n var loadResult = loadArgs[1];\n // Source loaded with the final result\n if (isFinalResultLoaded(loadResult)) {\n return resolveLoad(function () {\n return {\n value: loadResult,\n duration: loadDuration\n };\n });\n }\n // Source loaded with \"get\" stage\n resolveLoad(function () {\n return new Promise(function (resolveGet) {\n var getStartTime = Date.now();\n awaitIfAsync(loadResult, function () {\n var getArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n getArgs[_i] = arguments[_i];\n }\n var duration = loadDuration + Date.now() - getStartTime;\n // Source getting failed\n if (!getArgs[0]) {\n return resolveGet({\n error: ensureErrorWithMessage(getArgs[1]),\n duration: duration\n });\n }\n // Source getting succeeded\n resolveGet({\n value: getArgs[1],\n duration: duration\n });\n });\n });\n });\n });\n });\n suppressUnhandledRejectionWarning(sourceLoadPromise);\n return function getComponent() {\n return sourceLoadPromise.then(function (finalizeSource) {\n return finalizeSource();\n });\n };\n}\n/**\n * Loads the given entropy sources. Returns a function that collects the entropy components.\n *\n * The result is returned synchronously in order to allow start getting the components\n * before the sources are loaded completely.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction loadSources(sources, sourceOptions, excludeSources) {\n var includedSources = Object.keys(sources).filter(function (sourceKey) {\n return excludes(excludeSources, sourceKey);\n });\n var sourceGetters = Array(includedSources.length);\n // Using `forEachWithBreaks` allows asynchronous sources to complete between synchronous sources\n // and measure the duration correctly\n forEachWithBreaks(includedSources, function (sourceKey, index) {\n sourceGetters[index] = loadSource(sources[sourceKey], sourceOptions);\n });\n return function getComponents() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var components, _i, includedSources_1, sourceKey, componentPromises, _loop_1, state_1;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n components = {};\n for (_i = 0, includedSources_1 = includedSources; _i < includedSources_1.length; _i++) {\n sourceKey = includedSources_1[_i];\n components[sourceKey] = undefined;\n }\n componentPromises = Array(includedSources.length);\n _loop_1 = function () {\n var hasAllComponentPromises;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_b) {\n switch (_b.label) {\n case 0:\n hasAllComponentPromises = true;\n return [4 /*yield*/, forEachWithBreaks(includedSources, function (sourceKey, index) {\n if (!componentPromises[index]) {\n // `sourceGetters` may be incomplete at this point of execution because `forEachWithBreaks` is asynchronous\n if (sourceGetters[index]) {\n var componentPromise = sourceGetters[index]().then(function (component) {\n return components[sourceKey] = component;\n });\n suppressUnhandledRejectionWarning(componentPromise);\n componentPromises[index] = componentPromise;\n } else {\n hasAllComponentPromises = false;\n }\n }\n })];\n case 1:\n _b.sent();\n if (hasAllComponentPromises) {\n return [2 /*return*/, \"break\"];\n }\n return [4 /*yield*/, wait(1)];\n // Lets the source load loop continue\n case 2:\n _b.sent(); // Lets the source load loop continue\n return [2 /*return*/];\n }\n });\n };\n\n _a.label = 1;\n case 1:\n return [5 /*yield**/, _loop_1()];\n case 2:\n state_1 = _a.sent();\n if (state_1 === \"break\") return [3 /*break*/, 4];\n _a.label = 3;\n case 3:\n return [3 /*break*/, 1];\n case 4:\n return [4 /*yield*/, Promise.all(componentPromises)];\n case 5:\n _a.sent();\n return [2 /*return*/, components];\n }\n });\n });\n };\n}\n/**\n * Modifies an entropy source by transforming its returned value with the given function.\n * Keeps the source properties: sync/async, 1/2 stages.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction transformSource(source, transformValue) {\n var transformLoadResult = function (loadResult) {\n if (isFinalResultLoaded(loadResult)) {\n return transformValue(loadResult);\n }\n return function () {\n var getResult = loadResult();\n if (isPromise(getResult)) {\n return getResult.then(transformValue);\n }\n return transformValue(getResult);\n };\n };\n return function (options) {\n var loadResult = source(options);\n if (isPromise(loadResult)) {\n return loadResult.then(transformLoadResult);\n }\n return transformLoadResult(loadResult);\n };\n}\n\n/*\n * Functions to help with features that vary through browsers\n */\n/**\n * Checks whether the browser is based on Trident (the Internet Explorer engine) without using user-agent.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isTrident() {\n var w = window;\n var n = navigator;\n // The properties are checked to be in IE 10, IE 11 and not to be in other browsers in October 2020\n return countTruthy(['MSCSSMatrix' in w, 'msSetImmediate' in w, 'msIndexedDB' in w, 'msMaxTouchPoints' in n, 'msPointerEnabled' in n]) >= 4;\n}\n/**\n * Checks whether the browser is based on EdgeHTML (the pre-Chromium Edge engine) without using user-agent.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isEdgeHTML() {\n // Based on research in October 2020\n var w = window;\n var n = navigator;\n return countTruthy(['msWriteProfilerMark' in w, 'MSStream' in w, 'msLaunchUri' in n, 'msSaveBlob' in n]) >= 3 && !isTrident();\n}\n/**\n * Checks whether the browser is based on Chromium without using user-agent.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isChromium() {\n // Based on research in October 2020. Tested to detect Chromium 42-86.\n var w = window;\n var n = navigator;\n return countTruthy(['webkitPersistentStorage' in n, 'webkitTemporaryStorage' in n, n.vendor.indexOf('Google') === 0, 'webkitResolveLocalFileSystemURL' in w, 'BatteryManager' in w, 'webkitMediaStream' in w, 'webkitSpeechGrammar' in w]) >= 5;\n}\n/**\n * Checks whether the browser is based on mobile or desktop Safari without using user-agent.\n * All iOS browsers use WebKit (the Safari engine).\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isWebKit() {\n // Based on research in September 2020\n var w = window;\n var n = navigator;\n return countTruthy(['ApplePayError' in w, 'CSSPrimitiveValue' in w, 'Counter' in w, n.vendor.indexOf('Apple') === 0, 'getStorageUpdates' in n, 'WebKitMediaKeys' in w]) >= 4;\n}\n/**\n * Checks whether the WebKit browser is a desktop Safari.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isDesktopSafari() {\n var w = window;\n return countTruthy(['safari' in w, !('DeviceMotionEvent' in w), !('ongestureend' in w), !('standalone' in navigator)]) >= 3;\n}\n/**\n * Checks whether the browser is based on Gecko (Firefox engine) without using user-agent.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isGecko() {\n var _a, _b;\n var w = window;\n // Based on research in September 2020\n return countTruthy(['buildID' in navigator, 'MozAppearance' in ((_b = (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {}), 'onmozfullscreenchange' in w, 'mozInnerScreenX' in w, 'CSSMozDocumentRule' in w, 'CanvasCaptureMediaStream' in w]) >= 4;\n}\n/**\n * Checks whether the browser is based on Chromium version ≥86 without using user-agent.\n * It doesn't check that the browser is based on Chromium, there is a separate function for this.\n */\nfunction isChromium86OrNewer() {\n // Checked in Chrome 85 vs Chrome 86 both on desktop and Android\n var w = window;\n return countTruthy([!('MediaSettingsRange' in w), 'RTCEncodedAudioFrame' in w, '' + w.Intl === '[object Intl]', '' + w.Reflect === '[object Reflect]']) >= 3;\n}\n/**\n * Checks whether the browser is based on WebKit version ≥606 (Safari ≥12) without using user-agent.\n * It doesn't check that the browser is based on WebKit, there is a separate function for this.\n *\n * @link https://en.wikipedia.org/wiki/Safari_version_history#Release_history Safari-WebKit versions map\n */\nfunction isWebKit606OrNewer() {\n // Checked in Safari 9–14\n var w = window;\n return countTruthy(['DOMRectList' in w, 'RTCPeerConnectionIceEvent' in w, 'SVGGeometryElement' in w, 'ontransitioncancel' in w]) >= 3;\n}\n/**\n * Checks whether the device is an iPad.\n * It doesn't check that the engine is WebKit and that the WebKit isn't desktop.\n */\nfunction isIPad() {\n // Checked on:\n // Safari on iPadOS (both mobile and desktop modes): 8, 11, 12, 13, 14\n // Chrome on iPadOS (both mobile and desktop modes): 11, 12, 13, 14\n // Safari on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14\n // Chrome on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14\n // Before iOS 13. Safari tampers the value in \"request desktop site\" mode since iOS 13.\n if (navigator.platform === 'iPad') {\n return true;\n }\n var s = screen;\n var screenRatio = s.width / s.height;\n return countTruthy(['MediaSource' in window, !!Element.prototype.webkitRequestFullscreen,\n // iPhone 4S that runs iOS 9 matches this. But it won't match the criteria above, so it won't be detected as iPad.\n screenRatio > 0.65 && screenRatio < 1.53]) >= 2;\n}\n/**\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction getFullscreenElement() {\n var d = document;\n return d.fullscreenElement || d.msFullscreenElement || d.mozFullScreenElement || d.webkitFullscreenElement || null;\n}\nfunction exitFullscreen() {\n var d = document;\n // `call` is required because the function throws an error without a proper \"this\" context\n return (d.exitFullscreen || d.msExitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen).call(d);\n}\n/**\n * Checks whether the device runs on Android without using user-agent.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isAndroid() {\n var isItChromium = isChromium();\n var isItGecko = isGecko();\n // Only 2 browser engines are presented on Android.\n // Actually, there is also Android 4.1 browser, but it's not worth detecting it at the moment.\n if (!isItChromium && !isItGecko) {\n return false;\n }\n var w = window;\n // Chrome removes all words \"Android\" from `navigator` when desktop version is requested\n // Firefox keeps \"Android\" in `navigator.appVersion` when desktop version is requested\n return countTruthy(['onorientationchange' in w, 'orientation' in w, isItChromium && !('SharedWorker' in w), isItGecko && /android/i.test(navigator.appVersion)]) >= 2;\n}\n\n/**\n * A deep description: https://fingerprint.com/blog/audio-fingerprinting/\n * Inspired by and based on https://github.com/cozylife/audio-fingerprint\n */\nfunction getAudioFingerprint() {\n var w = window;\n var AudioContext = w.OfflineAudioContext || w.webkitOfflineAudioContext;\n if (!AudioContext) {\n return -2 /* SpecialFingerprint.NotSupported */;\n }\n // In some browsers, audio context always stays suspended unless the context is started in response to a user action\n // (e.g. a click or a tap). It prevents audio fingerprint from being taken at an arbitrary moment of time.\n // Such browsers are old and unpopular, so the audio fingerprinting is just skipped in them.\n // See a similar case explanation at https://stackoverflow.com/questions/46363048/onaudioprocess-not-called-on-ios11#46534088\n if (doesCurrentBrowserSuspendAudioContext()) {\n return -1 /* SpecialFingerprint.KnownToSuspend */;\n }\n\n var hashFromIndex = 4500;\n var hashToIndex = 5000;\n var context = new AudioContext(1, hashToIndex, 44100);\n var oscillator = context.createOscillator();\n oscillator.type = 'triangle';\n oscillator.frequency.value = 10000;\n var compressor = context.createDynamicsCompressor();\n compressor.threshold.value = -50;\n compressor.knee.value = 40;\n compressor.ratio.value = 12;\n compressor.attack.value = 0;\n compressor.release.value = 0.25;\n oscillator.connect(compressor);\n compressor.connect(context.destination);\n oscillator.start(0);\n var _a = startRenderingAudio(context),\n renderPromise = _a[0],\n finishRendering = _a[1];\n var fingerprintPromise = renderPromise.then(function (buffer) {\n return getHash(buffer.getChannelData(0).subarray(hashFromIndex));\n }, function (error) {\n if (error.name === \"timeout\" /* InnerErrorName.Timeout */ || error.name === \"suspended\" /* InnerErrorName.Suspended */) {\n return -3 /* SpecialFingerprint.Timeout */;\n }\n\n throw error;\n });\n // Suppresses the console error message in case when the fingerprint fails before requested\n suppressUnhandledRejectionWarning(fingerprintPromise);\n return function () {\n finishRendering();\n return fingerprintPromise;\n };\n}\n/**\n * Checks if the current browser is known to always suspend audio context\n */\nfunction doesCurrentBrowserSuspendAudioContext() {\n return isWebKit() && !isDesktopSafari() && !isWebKit606OrNewer();\n}\n/**\n * Starts rendering the audio context.\n * When the returned function is called, the render process starts finishing.\n */\nfunction startRenderingAudio(context) {\n var renderTryMaxCount = 3;\n var renderRetryDelay = 500;\n var runningMaxAwaitTime = 500;\n var runningSufficientTime = 5000;\n var finalize = function () {\n return undefined;\n };\n var resultPromise = new Promise(function (resolve, reject) {\n var isFinalized = false;\n var renderTryCount = 0;\n var startedRunningAt = 0;\n context.oncomplete = function (event) {\n return resolve(event.renderedBuffer);\n };\n var startRunningTimeout = function () {\n setTimeout(function () {\n return reject(makeInnerError(\"timeout\" /* InnerErrorName.Timeout */));\n }, Math.min(runningMaxAwaitTime, startedRunningAt + runningSufficientTime - Date.now()));\n };\n var tryRender = function () {\n try {\n context.startRendering();\n switch (context.state) {\n case 'running':\n startedRunningAt = Date.now();\n if (isFinalized) {\n startRunningTimeout();\n }\n break;\n // Sometimes the audio context doesn't start after calling `startRendering` (in addition to the cases where\n // audio context doesn't start at all). A known case is starting an audio context when the browser tab is in\n // background on iPhone. Retries usually help in this case.\n case 'suspended':\n // The audio context can reject starting until the tab is in foreground. Long fingerprint duration\n // in background isn't a problem, therefore the retry attempts don't count in background. It can lead to\n // a situation when a fingerprint takes very long time and finishes successfully. FYI, the audio context\n // can be suspended when `document.hidden === false` and start running after a retry.\n if (!document.hidden) {\n renderTryCount++;\n }\n if (isFinalized && renderTryCount >= renderTryMaxCount) {\n reject(makeInnerError(\"suspended\" /* InnerErrorName.Suspended */));\n } else {\n setTimeout(tryRender, renderRetryDelay);\n }\n break;\n }\n } catch (error) {\n reject(error);\n }\n };\n tryRender();\n finalize = function () {\n if (!isFinalized) {\n isFinalized = true;\n if (startedRunningAt > 0) {\n startRunningTimeout();\n }\n }\n };\n });\n return [resultPromise, finalize];\n}\nfunction getHash(signal) {\n var hash = 0;\n for (var i = 0; i < signal.length; ++i) {\n hash += Math.abs(signal[i]);\n }\n return hash;\n}\nfunction makeInnerError(name) {\n var error = new Error(name);\n error.name = name;\n return error;\n}\n\n/**\n * Creates and keeps an invisible iframe while the given function runs.\n * The given function is called when the iframe is loaded and has a body.\n * The iframe allows to measure DOM sizes inside itself.\n *\n * Notice: passing an initial HTML code doesn't work in IE.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction withIframe(action, initialHtml, domPollInterval) {\n var _a, _b, _c;\n if (domPollInterval === void 0) {\n domPollInterval = 50;\n }\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var d, iframe;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_d) {\n switch (_d.label) {\n case 0:\n d = document;\n _d.label = 1;\n case 1:\n if (!!d.body) return [3 /*break*/, 3];\n return [4 /*yield*/, wait(domPollInterval)];\n case 2:\n _d.sent();\n return [3 /*break*/, 1];\n case 3:\n iframe = d.createElement('iframe');\n _d.label = 4;\n case 4:\n _d.trys.push([4,, 10, 11]);\n return [4 /*yield*/, new Promise(function (_resolve, _reject) {\n var isComplete = false;\n var resolve = function () {\n isComplete = true;\n _resolve();\n };\n var reject = function (error) {\n isComplete = true;\n _reject(error);\n };\n iframe.onload = resolve;\n iframe.onerror = reject;\n var style = iframe.style;\n style.setProperty('display', 'block', 'important'); // Required for browsers to calculate the layout\n style.position = 'absolute';\n style.top = '0';\n style.left = '0';\n style.visibility = 'hidden';\n if (initialHtml && 'srcdoc' in iframe) {\n iframe.srcdoc = initialHtml;\n } else {\n iframe.src = 'about:blank';\n }\n d.body.appendChild(iframe);\n // WebKit in WeChat doesn't fire the iframe's `onload` for some reason.\n // This code checks for the loading state manually.\n // See https://github.com/fingerprintjs/fingerprintjs/issues/645\n var checkReadyState = function () {\n var _a, _b;\n // The ready state may never become 'complete' in Firefox despite the 'load' event being fired.\n // So an infinite setTimeout loop can happen without this check.\n // See https://github.com/fingerprintjs/fingerprintjs/pull/716#issuecomment-986898796\n if (isComplete) {\n return;\n }\n // Make sure iframe.contentWindow and iframe.contentWindow.document are both loaded\n // The contentWindow.document can miss in JSDOM (https://github.com/jsdom/jsdom).\n if (((_b = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document) === null || _b === void 0 ? void 0 : _b.readyState) === 'complete') {\n resolve();\n } else {\n setTimeout(checkReadyState, 10);\n }\n };\n checkReadyState();\n })];\n case 5:\n _d.sent();\n _d.label = 6;\n case 6:\n if (!!((_b = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document) === null || _b === void 0 ? void 0 : _b.body)) return [3 /*break*/, 8];\n return [4 /*yield*/, wait(domPollInterval)];\n case 7:\n _d.sent();\n return [3 /*break*/, 6];\n case 8:\n return [4 /*yield*/, action(iframe, iframe.contentWindow)];\n case 9:\n return [2 /*return*/, _d.sent()];\n case 10:\n (_c = iframe.parentNode) === null || _c === void 0 ? void 0 : _c.removeChild(iframe);\n return [7 /*endfinally*/];\n case 11:\n return [2 /*return*/];\n }\n });\n });\n}\n/**\n * Creates a DOM element that matches the given selector.\n * Only single element selector are supported (without operators like space, +, >, etc).\n */\nfunction selectorToElement(selector) {\n var _a = parseSimpleCssSelector(selector),\n tag = _a[0],\n attributes = _a[1];\n var element = document.createElement(tag !== null && tag !== void 0 ? tag : 'div');\n for (var _i = 0, _b = Object.keys(attributes); _i < _b.length; _i++) {\n var name_1 = _b[_i];\n var value = attributes[name_1].join(' ');\n // Changing the `style` attribute can cause a CSP error, therefore we change the `style.cssText` property.\n // https://github.com/fingerprintjs/fingerprintjs/issues/733\n if (name_1 === 'style') {\n addStyleString(element.style, value);\n } else {\n element.setAttribute(name_1, value);\n }\n }\n return element;\n}\n/**\n * Adds CSS styles from a string in such a way that doesn't trigger a CSP warning (unsafe-inline or unsafe-eval)\n */\nfunction addStyleString(style, source) {\n // We don't use `style.cssText` because browsers must block it when no `unsafe-eval` CSP is presented: https://csplite.com/csp145/#w3c_note\n // Even though the browsers ignore this standard, we don't use `cssText` just in case.\n for (var _i = 0, _a = source.split(';'); _i < _a.length; _i++) {\n var property = _a[_i];\n var match = /^\\s*([\\w-]+)\\s*:\\s*(.+?)(\\s*!([\\w-]+))?\\s*$/.exec(property);\n if (match) {\n var name_2 = match[1],\n value = match[2],\n priority = match[4];\n style.setProperty(name_2, value, priority || ''); // The last argument can't be undefined in IE11\n }\n }\n}\n\n// We use m or w because these two characters take up the maximum width.\n// And we use a LLi so that the same matching fonts can get separated.\nvar testString = 'mmMwWLliI0O&1';\n// We test using 48px font size, we may use any size. I guess larger the better.\nvar textSize = '48px';\n// A font will be compared against all the three default fonts.\n// And if for any default fonts it doesn't match, then that font is available.\nvar baseFonts = ['monospace', 'sans-serif', 'serif'];\nvar fontList = [\n// This is android-specific font from \"Roboto\" family\n'sans-serif-thin', 'ARNO PRO', 'Agency FB', 'Arabic Typesetting', 'Arial Unicode MS', 'AvantGarde Bk BT', 'BankGothic Md BT', 'Batang', 'Bitstream Vera Sans Mono', 'Calibri', 'Century', 'Century Gothic', 'Clarendon', 'EUROSTILE', 'Franklin Gothic', 'Futura Bk BT', 'Futura Md BT', 'GOTHAM', 'Gill Sans', 'HELV', 'Haettenschweiler', 'Helvetica Neue', 'Humanst521 BT', 'Leelawadee', 'Letter Gothic', 'Levenim MT', 'Lucida Bright', 'Lucida Sans', 'Menlo', 'MS Mincho', 'MS Outlook', 'MS Reference Specialty', 'MS UI Gothic', 'MT Extra', 'MYRIAD PRO', 'Marlett', 'Meiryo UI', 'Microsoft Uighur', 'Minion Pro', 'Monotype Corsiva', 'PMingLiU', 'Pristina', 'SCRIPTINA', 'Segoe UI Light', 'Serifa', 'SimHei', 'Small Fonts', 'Staccato222 BT', 'TRAJAN PRO', 'Univers CE 55 Medium', 'Vrinda', 'ZWAdobeF'];\n// kudos to http://www.lalit.org/lab/javascript-css-font-detect/\nfunction getFonts() {\n // Running the script in an iframe makes it not affect the page look and not be affected by the page CSS. See:\n // https://github.com/fingerprintjs/fingerprintjs/issues/592\n // https://github.com/fingerprintjs/fingerprintjs/issues/628\n return withIframe(function (_, _a) {\n var document = _a.document;\n var holder = document.body;\n holder.style.fontSize = textSize;\n // div to load spans for the default fonts and the fonts to detect\n var spansContainer = document.createElement('div');\n var defaultWidth = {};\n var defaultHeight = {};\n // creates a span where the fonts will be loaded\n var createSpan = function (fontFamily) {\n var span = document.createElement('span');\n var style = span.style;\n style.position = 'absolute';\n style.top = '0';\n style.left = '0';\n style.fontFamily = fontFamily;\n span.textContent = testString;\n spansContainer.appendChild(span);\n return span;\n };\n // creates a span and load the font to detect and a base font for fallback\n var createSpanWithFonts = function (fontToDetect, baseFont) {\n return createSpan(\"'\".concat(fontToDetect, \"',\").concat(baseFont));\n };\n // creates spans for the base fonts and adds them to baseFontsDiv\n var initializeBaseFontsSpans = function () {\n return baseFonts.map(createSpan);\n };\n // creates spans for the fonts to detect and adds them to fontsDiv\n var initializeFontsSpans = function () {\n // Stores {fontName : [spans for that font]}\n var spans = {};\n var _loop_1 = function (font) {\n spans[font] = baseFonts.map(function (baseFont) {\n return createSpanWithFonts(font, baseFont);\n });\n };\n for (var _i = 0, fontList_1 = fontList; _i < fontList_1.length; _i++) {\n var font = fontList_1[_i];\n _loop_1(font);\n }\n return spans;\n };\n // checks if a font is available\n var isFontAvailable = function (fontSpans) {\n return baseFonts.some(function (baseFont, baseFontIndex) {\n return fontSpans[baseFontIndex].offsetWidth !== defaultWidth[baseFont] || fontSpans[baseFontIndex].offsetHeight !== defaultHeight[baseFont];\n });\n };\n // create spans for base fonts\n var baseFontsSpans = initializeBaseFontsSpans();\n // create spans for fonts to detect\n var fontsSpans = initializeFontsSpans();\n // add all the spans to the DOM\n holder.appendChild(spansContainer);\n // get the default width for the three base fonts\n for (var index = 0; index < baseFonts.length; index++) {\n defaultWidth[baseFonts[index]] = baseFontsSpans[index].offsetWidth; // width for the default font\n defaultHeight[baseFonts[index]] = baseFontsSpans[index].offsetHeight; // height for the default font\n }\n // check available fonts\n return fontList.filter(function (font) {\n return isFontAvailable(fontsSpans[font]);\n });\n });\n}\nfunction getPlugins() {\n var rawPlugins = navigator.plugins;\n if (!rawPlugins) {\n return undefined;\n }\n var plugins = [];\n // Safari 10 doesn't support iterating navigator.plugins with for...of\n for (var i = 0; i < rawPlugins.length; ++i) {\n var plugin = rawPlugins[i];\n if (!plugin) {\n continue;\n }\n var mimeTypes = [];\n for (var j = 0; j < plugin.length; ++j) {\n var mimeType = plugin[j];\n mimeTypes.push({\n type: mimeType.type,\n suffixes: mimeType.suffixes\n });\n }\n plugins.push({\n name: plugin.name,\n description: plugin.description,\n mimeTypes: mimeTypes\n });\n }\n return plugins;\n}\n\n// https://www.browserleaks.com/canvas#how-does-it-work\nfunction getCanvasFingerprint() {\n var winding = false;\n var geometry;\n var text;\n var _a = makeCanvasContext(),\n canvas = _a[0],\n context = _a[1];\n if (!isSupported(canvas, context)) {\n geometry = text = ''; // The value will be 'unsupported' in v3.4\n } else {\n winding = doesSupportWinding(context);\n renderTextImage(canvas, context);\n var textImage1 = canvasToString(canvas);\n var textImage2 = canvasToString(canvas); // It's slightly faster to double-encode the text image\n // Some browsers add a noise to the canvas: https://github.com/fingerprintjs/fingerprintjs/issues/791\n // The canvas is excluded from the fingerprint in this case\n if (textImage1 !== textImage2) {\n geometry = text = 'unstable';\n } else {\n text = textImage1;\n // Text is unstable:\n // https://github.com/fingerprintjs/fingerprintjs/issues/583\n // https://github.com/fingerprintjs/fingerprintjs/issues/103\n // Therefore it's extracted into a separate image.\n renderGeometryImage(canvas, context);\n geometry = canvasToString(canvas);\n }\n }\n return {\n winding: winding,\n geometry: geometry,\n text: text\n };\n}\nfunction makeCanvasContext() {\n var canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n return [canvas, canvas.getContext('2d')];\n}\nfunction isSupported(canvas, context) {\n return !!(context && canvas.toDataURL);\n}\nfunction doesSupportWinding(context) {\n // https://web.archive.org/web/20170825024655/http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/\n // https://github.com/Modernizr/Modernizr/blob/master/feature-detects/canvas/winding.js\n context.rect(0, 0, 10, 10);\n context.rect(2, 2, 6, 6);\n return !context.isPointInPath(5, 5, 'evenodd');\n}\nfunction renderTextImage(canvas, context) {\n // Resizing the canvas cleans it\n canvas.width = 240;\n canvas.height = 60;\n context.textBaseline = 'alphabetic';\n context.fillStyle = '#f60';\n context.fillRect(100, 1, 62, 20);\n context.fillStyle = '#069';\n // It's important to use explicit built-in fonts in order to exclude the affect of font preferences\n // (there is a separate entropy source for them).\n context.font = '11pt \"Times New Roman\"';\n // The choice of emojis has a gigantic impact on rendering performance (especially in FF).\n // Some newer emojis cause it to slow down 50-200 times.\n // There must be no text to the right of the emoji, see https://github.com/fingerprintjs/fingerprintjs/issues/574\n // A bare emoji shouldn't be used because the canvas will change depending on the script encoding:\n // https://github.com/fingerprintjs/fingerprintjs/issues/66\n // Escape sequence shouldn't be used too because Terser will turn it into a bare unicode.\n var printedText = \"Cwm fjordbank gly \".concat(String.fromCharCode(55357, 56835) /* 😃 */);\n context.fillText(printedText, 2, 15);\n context.fillStyle = 'rgba(102, 204, 0, 0.2)';\n context.font = '18pt Arial';\n context.fillText(printedText, 4, 45);\n}\nfunction renderGeometryImage(canvas, context) {\n // Resizing the canvas cleans it\n canvas.width = 122;\n canvas.height = 110;\n // Canvas blending\n // https://web.archive.org/web/20170826194121/http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/\n // http://jsfiddle.net/NDYV8/16/\n context.globalCompositeOperation = 'multiply';\n for (var _i = 0, _a = [['#f2f', 40, 40], ['#2ff', 80, 40], ['#ff2', 60, 80]]; _i < _a.length; _i++) {\n var _b = _a[_i],\n color = _b[0],\n x = _b[1],\n y = _b[2];\n context.fillStyle = color;\n context.beginPath();\n context.arc(x, y, 40, 0, Math.PI * 2, true);\n context.closePath();\n context.fill();\n }\n // Canvas winding\n // https://web.archive.org/web/20130913061632/http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/\n // http://jsfiddle.net/NDYV8/19/\n context.fillStyle = '#f9c';\n context.arc(60, 60, 60, 0, Math.PI * 2, true);\n context.arc(60, 60, 20, 0, Math.PI * 2, true);\n context.fill('evenodd');\n}\nfunction canvasToString(canvas) {\n return canvas.toDataURL();\n}\n\n/**\n * This is a crude and primitive touch screen detection. It's not possible to currently reliably detect the availability\n * of a touch screen with a JS, without actually subscribing to a touch event.\n *\n * @see http://www.stucox.com/blog/you-cant-detect-a-touchscreen/\n * @see https://github.com/Modernizr/Modernizr/issues/548\n */\nfunction getTouchSupport() {\n var n = navigator;\n var maxTouchPoints = 0;\n var touchEvent;\n if (n.maxTouchPoints !== undefined) {\n maxTouchPoints = toInt(n.maxTouchPoints);\n } else if (n.msMaxTouchPoints !== undefined) {\n maxTouchPoints = n.msMaxTouchPoints;\n }\n try {\n document.createEvent('TouchEvent');\n touchEvent = true;\n } catch (_a) {\n touchEvent = false;\n }\n var touchStart = ('ontouchstart' in window);\n return {\n maxTouchPoints: maxTouchPoints,\n touchEvent: touchEvent,\n touchStart: touchStart\n };\n}\nfunction getOsCpu() {\n return navigator.oscpu;\n}\nfunction getLanguages() {\n var n = navigator;\n var result = [];\n var language = n.language || n.userLanguage || n.browserLanguage || n.systemLanguage;\n if (language !== undefined) {\n result.push([language]);\n }\n if (Array.isArray(n.languages)) {\n // Starting from Chromium 86, there is only a single value in `navigator.language` in Incognito mode:\n // the value of `navigator.language`. Therefore the value is ignored in this browser.\n if (!(isChromium() && isChromium86OrNewer())) {\n result.push(n.languages);\n }\n } else if (typeof n.languages === 'string') {\n var languages = n.languages;\n if (languages) {\n result.push(languages.split(','));\n }\n }\n return result;\n}\nfunction getColorDepth() {\n return window.screen.colorDepth;\n}\nfunction getDeviceMemory() {\n // `navigator.deviceMemory` is a string containing a number in some unidentified cases\n return replaceNaN(toFloat(navigator.deviceMemory), undefined);\n}\nfunction getScreenResolution() {\n var s = screen;\n // Some browsers return screen resolution as strings, e.g. \"1200\", instead of a number, e.g. 1200.\n // I suspect it's done by certain plugins that randomize browser properties to prevent fingerprinting.\n // Some browsers even return screen resolution as not numbers.\n var parseDimension = function (value) {\n return replaceNaN(toInt(value), null);\n };\n var dimensions = [parseDimension(s.width), parseDimension(s.height)];\n dimensions.sort().reverse();\n return dimensions;\n}\nvar screenFrameCheckInterval = 2500;\nvar roundingPrecision = 10;\n// The type is readonly to protect from unwanted mutations\nvar screenFrameBackup;\nvar screenFrameSizeTimeoutId;\n/**\n * Starts watching the screen frame size. When a non-zero size appears, the size is saved and the watch is stopped.\n * Later, when `getScreenFrame` runs, it will return the saved non-zero size if the current size is null.\n *\n * This trick is required to mitigate the fact that the screen frame turns null in some cases.\n * See more on this at https://github.com/fingerprintjs/fingerprintjs/issues/568\n */\nfunction watchScreenFrame() {\n if (screenFrameSizeTimeoutId !== undefined) {\n return;\n }\n var checkScreenFrame = function () {\n var frameSize = getCurrentScreenFrame();\n if (isFrameSizeNull(frameSize)) {\n screenFrameSizeTimeoutId = setTimeout(checkScreenFrame, screenFrameCheckInterval);\n } else {\n screenFrameBackup = frameSize;\n screenFrameSizeTimeoutId = undefined;\n }\n };\n checkScreenFrame();\n}\nfunction getScreenFrame() {\n var _this = this;\n watchScreenFrame();\n return function () {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(_this, void 0, void 0, function () {\n var frameSize;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n frameSize = getCurrentScreenFrame();\n if (!isFrameSizeNull(frameSize)) return [3 /*break*/, 2];\n if (screenFrameBackup) {\n return [2 /*return*/, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spreadArray\"])([], screenFrameBackup, true)];\n }\n if (!getFullscreenElement()) return [3 /*break*/, 2];\n // Some browsers set the screen frame to zero when programmatic fullscreen is on.\n // There is a chance of getting a non-zero frame after exiting the fullscreen.\n // See more on this at https://github.com/fingerprintjs/fingerprintjs/issues/568\n return [4 /*yield*/, exitFullscreen()];\n case 1:\n // Some browsers set the screen frame to zero when programmatic fullscreen is on.\n // There is a chance of getting a non-zero frame after exiting the fullscreen.\n // See more on this at https://github.com/fingerprintjs/fingerprintjs/issues/568\n _a.sent();\n frameSize = getCurrentScreenFrame();\n _a.label = 2;\n case 2:\n if (!isFrameSizeNull(frameSize)) {\n screenFrameBackup = frameSize;\n }\n return [2 /*return*/, frameSize];\n }\n });\n });\n };\n}\n/**\n * Sometimes the available screen resolution changes a bit, e.g. 1900x1440 → 1900x1439. A possible reason: macOS Dock\n * shrinks to fit more icons when there is too little space. The rounding is used to mitigate the difference.\n */\nfunction getRoundedScreenFrame() {\n var _this = this;\n var screenFrameGetter = getScreenFrame();\n return function () {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(_this, void 0, void 0, function () {\n var frameSize, processSize;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, screenFrameGetter()];\n case 1:\n frameSize = _a.sent();\n processSize = function (sideSize) {\n return sideSize === null ? null : round(sideSize, roundingPrecision);\n };\n // It might look like I don't know about `for` and `map`.\n // In fact, such code is used to avoid TypeScript issues without using `as`.\n return [2 /*return*/, [processSize(frameSize[0]), processSize(frameSize[1]), processSize(frameSize[2]), processSize(frameSize[3])]];\n }\n });\n });\n };\n}\nfunction getCurrentScreenFrame() {\n var s = screen;\n // Some browsers return screen resolution as strings, e.g. \"1200\", instead of a number, e.g. 1200.\n // I suspect it's done by certain plugins that randomize browser properties to prevent fingerprinting.\n //\n // Some browsers (IE, Edge ≤18) don't provide `screen.availLeft` and `screen.availTop`. The property values are\n // replaced with 0 in such cases to not lose the entropy from `screen.availWidth` and `screen.availHeight`.\n return [replaceNaN(toFloat(s.availTop), null), replaceNaN(toFloat(s.width) - toFloat(s.availWidth) - replaceNaN(toFloat(s.availLeft), 0), null), replaceNaN(toFloat(s.height) - toFloat(s.availHeight) - replaceNaN(toFloat(s.availTop), 0), null), replaceNaN(toFloat(s.availLeft), null)];\n}\nfunction isFrameSizeNull(frameSize) {\n for (var i = 0; i < 4; ++i) {\n if (frameSize[i]) {\n return false;\n }\n }\n return true;\n}\nfunction getHardwareConcurrency() {\n // sometimes hardware concurrency is a string\n return replaceNaN(toInt(navigator.hardwareConcurrency), undefined);\n}\nfunction getTimezone() {\n var _a;\n var DateTimeFormat = (_a = window.Intl) === null || _a === void 0 ? void 0 : _a.DateTimeFormat;\n if (DateTimeFormat) {\n var timezone = new DateTimeFormat().resolvedOptions().timeZone;\n if (timezone) {\n return timezone;\n }\n }\n // For browsers that don't support timezone names\n // The minus is intentional because the JS offset is opposite to the real offset\n var offset = -getTimezoneOffset();\n return \"UTC\".concat(offset >= 0 ? '+' : '').concat(Math.abs(offset));\n}\nfunction getTimezoneOffset() {\n var currentYear = new Date().getFullYear();\n // The timezone offset may change over time due to daylight saving time (DST) shifts.\n // The non-DST timezone offset is used as the result timezone offset.\n // Since the DST season differs in the northern and the southern hemispheres,\n // both January and July timezones offsets are considered.\n return Math.max(\n // `getTimezoneOffset` returns a number as a string in some unidentified cases\n toFloat(new Date(currentYear, 0, 1).getTimezoneOffset()), toFloat(new Date(currentYear, 6, 1).getTimezoneOffset()));\n}\nfunction getSessionStorage() {\n try {\n return !!window.sessionStorage;\n } catch (error) {\n /* SecurityError when referencing it means it exists */\n return true;\n }\n}\n\n// https://bugzilla.mozilla.org/show_bug.cgi?id=781447\nfunction getLocalStorage() {\n try {\n return !!window.localStorage;\n } catch (e) {\n /* SecurityError when referencing it means it exists */\n return true;\n }\n}\nfunction getIndexedDB() {\n // IE and Edge don't allow accessing indexedDB in private mode, therefore IE and Edge will have different\n // visitor identifier in normal and private modes.\n if (isTrident() || isEdgeHTML()) {\n return undefined;\n }\n try {\n return !!window.indexedDB;\n } catch (e) {\n /* SecurityError when referencing it means it exists */\n return true;\n }\n}\nfunction getOpenDatabase() {\n return !!window.openDatabase;\n}\nfunction getCpuClass() {\n return navigator.cpuClass;\n}\nfunction getPlatform() {\n // Android Chrome 86 and 87 and Android Firefox 80 and 84 don't mock the platform value when desktop mode is requested\n var platform = navigator.platform;\n // iOS mocks the platform value when desktop version is requested: https://github.com/fingerprintjs/fingerprintjs/issues/514\n // iPad uses desktop mode by default since iOS 13\n // The value is 'MacIntel' on M1 Macs\n // The value is 'iPhone' on iPod Touch\n if (platform === 'MacIntel') {\n if (isWebKit() && !isDesktopSafari()) {\n return isIPad() ? 'iPad' : 'iPhone';\n }\n }\n return platform;\n}\nfunction getVendor() {\n return navigator.vendor || '';\n}\n\n/**\n * Checks for browser-specific (not engine specific) global variables to tell browsers with the same engine apart.\n * Only somewhat popular browsers are considered.\n */\nfunction getVendorFlavors() {\n var flavors = [];\n for (var _i = 0, _a = [\n // Blink and some browsers on iOS\n 'chrome',\n // Safari on macOS\n 'safari',\n // Chrome on iOS (checked in 85 on 13 and 87 on 14)\n '__crWeb', '__gCrWeb',\n // Yandex Browser on iOS, macOS and Android (checked in 21.2 on iOS 14, macOS and Android)\n 'yandex',\n // Yandex Browser on iOS (checked in 21.2 on 14)\n '__yb', '__ybro',\n // Firefox on iOS (checked in 32 on 14)\n '__firefox__',\n // Edge on iOS (checked in 46 on 14)\n '__edgeTrackingPreventionStatistics', 'webkit',\n // Opera Touch on iOS (checked in 2.6 on 14)\n 'oprt',\n // Samsung Internet on Android (checked in 11.1)\n 'samsungAr',\n // UC Browser on Android (checked in 12.10 and 13.0)\n 'ucweb', 'UCShellJava',\n // Puffin on Android (checked in 9.0)\n 'puffinDevice'\n // UC on iOS and Opera on Android have no specific global variables\n // Edge for Android isn't checked\n ]; _i < _a.length; _i++) {\n var key = _a[_i];\n var value = window[key];\n if (value && typeof value === 'object') {\n flavors.push(key);\n }\n }\n return flavors.sort();\n}\n\n/**\n * navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking\n * cookies via the Advanced Privacy Settings in IE9, it always returns true. And there have been issues in the past with\n * site-specific exceptions. Don't rely on it.\n *\n * @see https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cookies.js Taken from here\n */\nfunction areCookiesEnabled() {\n var d = document;\n // Taken from here: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cookies.js\n // navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking\n // cookies via the Advanced Privacy Settings in IE9, it always returns true. And there have been issues in the past\n // with site-specific exceptions. Don't rely on it.\n // try..catch because some in situations `document.cookie` is exposed but throws a\n // SecurityError if you try to access it; e.g. documents created from data URIs\n // or in sandboxed iframes (depending on flags/context)\n try {\n // Create cookie\n d.cookie = 'cookietest=1; SameSite=Strict;';\n var result = d.cookie.indexOf('cookietest=') !== -1;\n // Delete cookie\n d.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT';\n return result;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Only single element selector are supported (no operators like space, +, >, etc).\n * `embed` and `position: fixed;` will be considered as blocked anyway because it always has no offsetParent.\n * Avoid `iframe` and anything with `[src=]` because they produce excess HTTP requests.\n *\n * The \"inappropriate\" selectors are obfuscated. See https://github.com/fingerprintjs/fingerprintjs/issues/734.\n * A function is used instead of a plain object to help tree-shaking.\n *\n * The function code is generated automatically. See docs/content_blockers.md to learn how to make the list.\n */\nfunction getFilters() {\n var fromB64 = atob; // Just for better minification\n return {\n abpIndo: ['#Iklan-Melayang', '#Kolom-Iklan-728', '#SidebarIklan-wrapper', fromB64('YVt0aXRsZT0iN25hZ2EgcG9rZXIiIGld'), '[title=\"ALIENBOLA\" i]'],\n abpvn: ['#quangcaomb', fromB64('Lmlvc0Fkc2lvc0Fkcy1sYXlvdXQ='), '.quangcao', fromB64('W2hyZWZePSJodHRwczovL3I4OC52bi8iXQ=='), fromB64('W2hyZWZePSJodHRwczovL3piZXQudm4vIl0=')],\n adBlockFinland: ['.mainostila', fromB64('LnNwb25zb3JpdA=='), '.ylamainos', fromB64('YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd'), fromB64('YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd')],\n adBlockPersian: ['#navbar_notice_50', '.kadr', 'TABLE[width=\"140px\"]', '#divAgahi', fromB64('I2FkMl9pbmxpbmU=')],\n adBlockWarningRemoval: ['#adblock-honeypot', '.adblocker-root', '.wp_adblock_detect', fromB64('LmhlYWRlci1ibG9ja2VkLWFk'), fromB64('I2FkX2Jsb2NrZXI=')],\n adGuardAnnoyances: ['amp-embed[type=\"zen\"]', '.hs-sosyal', '#cookieconsentdiv', 'div[class^=\"app_gdpr\"]', '.as-oil'],\n adGuardBase: ['.BetterJsPopOverlay', fromB64('I2FkXzMwMFgyNTA='), fromB64('I2Jhbm5lcmZsb2F0MjI='), fromB64('I2FkLWJhbm5lcg=='), fromB64('I2NhbXBhaWduLWJhbm5lcg==')],\n adGuardChinese: [fromB64('LlppX2FkX2FfSA=='), fromB64('YVtocmVmKj0iL29kMDA1LmNvbSJd'), fromB64('YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd'), '.qq_nr_lad', '#widget-quan'],\n adGuardFrench: [fromB64('I2Jsb2NrLXZpZXdzLWFkcy1zaWRlYmFyLWJsb2NrLWJsb2Nr'), '#pavePub', fromB64('LmFkLWRlc2t0b3AtcmVjdGFuZ2xl'), '.mobile_adhesion', '.widgetadv'],\n adGuardGerman: [fromB64('LmJhbm5lcml0ZW13ZXJidW5nX2hlYWRfMQ=='), fromB64('LmJveHN0YXJ0d2VyYnVuZw=='), fromB64('LndlcmJ1bmcz'), fromB64('YVtocmVmXj0iaHR0cDovL3d3dy5laXMuZGUvaW5kZXgucGh0bWw/cmVmaWQ9Il0='), fromB64('YVtocmVmXj0iaHR0cHM6Ly93d3cudGlwaWNvLmNvbS8/YWZmaWxpYXRlSWQ9Il0=')],\n adGuardJapanese: ['#kauli_yad_1', fromB64('YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0='), fromB64('Ll9wb3BJbl9pbmZpbml0ZV9hZA=='), fromB64('LmFkZ29vZ2xl'), fromB64('LmFkX3JlZ3VsYXIz')],\n adGuardMobile: [fromB64('YW1wLWF1dG8tYWRz'), fromB64('LmFtcF9hZA=='), 'amp-embed[type=\"24smi\"]', '#mgid_iframe1', fromB64('I2FkX2ludmlld19hcmVh')],\n adGuardRussian: [fromB64('YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0='), fromB64('LnJlY2xhbWE='), 'div[id^=\"smi2adblock\"]', fromB64('ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd'), fromB64('I2FkX3NxdWFyZQ==')],\n adGuardSocial: [fromB64('YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0='), fromB64('YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0='), '.etsy-tweet', '#inlineShare', '.popup-social'],\n adGuardSpanishPortuguese: ['#barraPublicidade', '#Publicidade', '#publiEspecial', '#queTooltip', fromB64('W2hyZWZePSJodHRwOi8vYWRzLmdsaXNwYS5jb20vIl0=')],\n adGuardTrackingProtection: ['#qoo-counter', fromB64('YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=='), fromB64('YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0='), fromB64('YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=='), '#top100counter'],\n adGuardTurkish: ['#backkapat', fromB64('I3Jla2xhbWk='), fromB64('YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0='), fromB64('YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd'), fromB64('YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==')],\n bulgarian: [fromB64('dGQjZnJlZW5ldF90YWJsZV9hZHM='), '#ea_intext_div', '.lapni-pop-over', '#xenium_hot_offers', fromB64('I25ld0Fk')],\n easyList: [fromB64('I0FEX0NPTlRST0xfMjg='), fromB64('LnNlY29uZC1wb3N0LWFkcy13cmFwcGVy'), '.universalboxADVBOX03', fromB64('LmFkdmVydGlzZW1lbnQtNzI4eDkw'), fromB64('LnNxdWFyZV9hZHM=')],\n easyListChina: [fromB64('YVtocmVmKj0iLndlbnNpeHVldGFuZy5jb20vIl0='), fromB64('LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=='), fromB64('LmZyb250cGFnZUFkdk0='), '#taotaole', '#aafoot.top_box'],\n easyListCookie: ['#AdaCompliance.app-notice', '.text-center.rgpd', '.panel--cookie', '.js-cookies-andromeda', '.elxtr-consent'],\n easyListCzechSlovak: ['#onlajny-stickers', fromB64('I3Jla2xhbW5pLWJveA=='), fromB64('LnJla2xhbWEtbWVnYWJvYXJk'), '.sklik', fromB64('W2lkXj0ic2tsaWtSZWtsYW1hIl0=')],\n easyListDutch: [fromB64('I2FkdmVydGVudGll'), fromB64('I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=='), '.adstekst', fromB64('YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0='), '#semilo-lrectangle'],\n easyListGermany: [fromB64('I0FkX1dpbjJkYXk='), fromB64('I3dlcmJ1bmdzYm94MzAw'), fromB64('YVtocmVmXj0iaHR0cDovL3d3dy5yb3RsaWNodGthcnRlaS5jb20vP3NjPSJd'), fromB64('I3dlcmJ1bmdfd2lkZXNreXNjcmFwZXJfc2NyZWVu'), fromB64('YVtocmVmXj0iaHR0cDovL2xhbmRpbmcucGFya3BsYXR6a2FydGVpLmNvbS8/YWc9Il0=')],\n easyListItaly: [fromB64('LmJveF9hZHZfYW5udW5jaQ=='), '.sb-box-pubbliredazionale', fromB64('YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd'), fromB64('YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd'), fromB64('YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==')],\n easyListLithuania: [fromB64('LnJla2xhbW9zX3RhcnBhcw=='), fromB64('LnJla2xhbW9zX251b3JvZG9z'), fromB64('aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd'), fromB64('aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd'), fromB64('aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd')],\n estonian: [fromB64('QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==')],\n fanboyAnnoyances: ['#feedback-tab', '#taboola-below-article', '.feedburnerFeedBlock', '.widget-feedburner-counter', '[title=\"Subscribe to our blog\"]'],\n fanboyAntiFacebook: ['.util-bar-module-firefly-visible'],\n fanboyEnhancedTrackers: ['.open.pushModal', '#issuem-leaky-paywall-articles-zero-remaining-nag', '#sovrn_container', 'div[class$=\"-hide\"][zoompage-fontsize][style=\"display: block;\"]', '.BlockNag__Card'],\n fanboySocial: ['.td-tags-and-social-wrapper-box', '.twitterContainer', '.youtube-social', 'a[title^=\"Like us on Facebook\"]', 'img[alt^=\"Share on Digg\"]'],\n frellwitSwedish: [fromB64('YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=='), fromB64('YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=='), 'article.category-samarbete', fromB64('ZGl2LmhvbGlkQWRz'), 'ul.adsmodern'],\n greekAdBlock: [fromB64('QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd'), fromB64('QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=='), fromB64('QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd'), 'DIV.agores300', 'TABLE.advright'],\n hungarian: ['#cemp_doboz', '.optimonk-iframe-container', fromB64('LmFkX19tYWlu'), fromB64('W2NsYXNzKj0iR29vZ2xlQWRzIl0='), '#hirdetesek_box'],\n iDontCareAboutCookies: ['.alert-info[data-block-track*=\"CookieNotice\"]', '.ModuleTemplateCookieIndicator', '.o--cookies--container', '.cookie-msg-info-container', '#cookies-policy-sticky'],\n icelandicAbp: [fromB64('QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==')],\n latvian: [fromB64('YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0O' + 'iA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0='), fromB64('YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6I' + 'DMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==')],\n listKr: [fromB64('YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0='), fromB64('I2xpdmVyZUFkV3JhcHBlcg=='), fromB64('YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=='), fromB64('aW5zLmZhc3R2aWV3LWFk'), '.revenue_unit_item.dable'],\n listeAr: [fromB64('LmdlbWluaUxCMUFk'), '.right-and-left-sponsers', fromB64('YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=='), fromB64('YVtocmVmKj0iYm9vcmFxLm9yZyJd'), fromB64('YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd')],\n listeFr: [fromB64('YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=='), fromB64('I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=='), fromB64('YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0='), '.site-pub-interstitiel', 'div[id^=\"crt-\"][data-criteo-id]'],\n officialPolish: ['#ceneo-placeholder-ceneo-12', fromB64('W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd'), fromB64('YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=='), fromB64('YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=='), fromB64('ZGl2I3NrYXBpZWNfYWQ=')],\n ro: [fromB64('YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd'), 'a[href^=\"/magazin/\"]', fromB64('YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd'), fromB64('YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0='), fromB64('YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd')],\n ruAd: [fromB64('YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd'), fromB64('YVtocmVmKj0iLy91dGltZy5ydS8iXQ=='), fromB64('YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0='), '#pgeldiz', '.yandex-rtb-block'],\n thaiAds: ['a[href*=macau-uta-popup]', fromB64('I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=='), fromB64('LmFkczMwMHM='), '.bumq', '.img-kosana'],\n webAnnoyancesUltralist: ['#mod-social-share-2', '#social-tools', fromB64('LmN0cGwtZnVsbGJhbm5lcg=='), '.zergnet-recommend', '.yt.btn-link.btn-md.btn']\n };\n}\n/**\n * The order of the returned array means nothing (it's always sorted alphabetically).\n *\n * Notice that the source is slightly unstable.\n * Safari provides a 2-taps way to disable all content blockers on a page temporarily.\n * Also content blockers can be disabled permanently for a domain, but it requires 4 taps.\n * So empty array shouldn't be treated as \"no blockers\", it should be treated as \"no signal\".\n * If you are a website owner, don't make your visitors want to disable content blockers.\n */\nfunction getDomBlockers(_a) {\n var _b = _a === void 0 ? {} : _a,\n debug = _b.debug;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var filters, filterNames, allSelectors, blockedSelectors, activeBlockers;\n var _c;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_d) {\n switch (_d.label) {\n case 0:\n if (!isApplicable()) {\n return [2 /*return*/, undefined];\n }\n filters = getFilters();\n filterNames = Object.keys(filters);\n allSelectors = (_c = []).concat.apply(_c, filterNames.map(function (filterName) {\n return filters[filterName];\n }));\n return [4 /*yield*/, getBlockedSelectors(allSelectors)];\n case 1:\n blockedSelectors = _d.sent();\n if (debug) {\n printDebug(filters, blockedSelectors);\n }\n activeBlockers = filterNames.filter(function (filterName) {\n var selectors = filters[filterName];\n var blockedCount = countTruthy(selectors.map(function (selector) {\n return blockedSelectors[selector];\n }));\n return blockedCount > selectors.length * 0.6;\n });\n activeBlockers.sort();\n return [2 /*return*/, activeBlockers];\n }\n });\n });\n}\nfunction isApplicable() {\n // Safari (desktop and mobile) and all Android browsers keep content blockers in both regular and private mode\n return isWebKit() || isAndroid();\n}\nfunction getBlockedSelectors(selectors) {\n var _a;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var d, root, elements, blockedSelectors, i, element, holder, i;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_b) {\n switch (_b.label) {\n case 0:\n d = document;\n root = d.createElement('div');\n elements = new Array(selectors.length);\n blockedSelectors = {} // Set() isn't used just in case somebody need older browser support\n ;\n\n forceShow(root);\n // First create all elements that can be blocked. If the DOM steps below are done in a single cycle,\n // browser will alternate tree modification and layout reading, that is very slow.\n for (i = 0; i < selectors.length; ++i) {\n element = selectorToElement(selectors[i]);\n holder = d.createElement('div') // Protects from unwanted effects of `+` and `~` selectors of filters\n ;\n\n forceShow(holder);\n holder.appendChild(element);\n root.appendChild(holder);\n elements[i] = element;\n }\n _b.label = 1;\n case 1:\n if (!!d.body) return [3 /*break*/, 3];\n return [4 /*yield*/, wait(50)];\n case 2:\n _b.sent();\n return [3 /*break*/, 1];\n case 3:\n d.body.appendChild(root);\n try {\n // Then check which of the elements are blocked\n for (i = 0; i < selectors.length; ++i) {\n if (!elements[i].offsetParent) {\n blockedSelectors[selectors[i]] = true;\n }\n }\n } finally {\n // Then remove the elements\n (_a = root.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(root);\n }\n return [2 /*return*/, blockedSelectors];\n }\n });\n });\n}\nfunction forceShow(element) {\n element.style.setProperty('display', 'block', 'important');\n}\nfunction printDebug(filters, blockedSelectors) {\n var message = 'DOM blockers debug:\\n```';\n for (var _i = 0, _a = Object.keys(filters); _i < _a.length; _i++) {\n var filterName = _a[_i];\n message += \"\\n\".concat(filterName, \":\");\n for (var _b = 0, _c = filters[filterName]; _b < _c.length; _b++) {\n var selector = _c[_b];\n message += \"\\n \".concat(blockedSelectors[selector] ? '🚫' : '➡️', \" \").concat(selector);\n }\n }\n // console.log is ok here because it's under a debug clause\n // eslint-disable-next-line no-console\n console.log(\"\".concat(message, \"\\n```\"));\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/color-gamut\n */\nfunction getColorGamut() {\n // rec2020 includes p3 and p3 includes srgb\n for (var _i = 0, _a = ['rec2020', 'p3', 'srgb']; _i < _a.length; _i++) {\n var gamut = _a[_i];\n if (matchMedia(\"(color-gamut: \".concat(gamut, \")\")).matches) {\n return gamut;\n }\n }\n return undefined;\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/inverted-colors\n */\nfunction areColorsInverted() {\n if (doesMatch$4('inverted')) {\n return true;\n }\n if (doesMatch$4('none')) {\n return false;\n }\n return undefined;\n}\nfunction doesMatch$4(value) {\n return matchMedia(\"(inverted-colors: \".concat(value, \")\")).matches;\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/forced-colors\n */\nfunction areColorsForced() {\n if (doesMatch$3('active')) {\n return true;\n }\n if (doesMatch$3('none')) {\n return false;\n }\n return undefined;\n}\nfunction doesMatch$3(value) {\n return matchMedia(\"(forced-colors: \".concat(value, \")\")).matches;\n}\nvar maxValueToCheck = 100;\n/**\n * If the display is monochrome (e.g. black&white), the value will be ≥0 and will mean the number of bits per pixel.\n * If the display is not monochrome, the returned value will be 0.\n * If the browser doesn't support this feature, the returned value will be undefined.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/monochrome\n */\nfunction getMonochromeDepth() {\n if (!matchMedia('(min-monochrome: 0)').matches) {\n // The media feature isn't supported by the browser\n return undefined;\n }\n // A variation of binary search algorithm can be used here.\n // But since expected values are very small (≤10), there is no sense in adding the complexity.\n for (var i = 0; i <= maxValueToCheck; ++i) {\n if (matchMedia(\"(max-monochrome: \".concat(i, \")\")).matches) {\n return i;\n }\n }\n throw new Error('Too high value');\n}\n\n/**\n * @see https://www.w3.org/TR/mediaqueries-5/#prefers-contrast\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-contrast\n */\nfunction getContrastPreference() {\n if (doesMatch$2('no-preference')) {\n return 0 /* ContrastPreference.None */;\n }\n // The sources contradict on the keywords. Probably 'high' and 'low' will never be implemented.\n // Need to check it when all browsers implement the feature.\n if (doesMatch$2('high') || doesMatch$2('more')) {\n return 1 /* ContrastPreference.More */;\n }\n\n if (doesMatch$2('low') || doesMatch$2('less')) {\n return -1 /* ContrastPreference.Less */;\n }\n\n if (doesMatch$2('forced')) {\n return 10 /* ContrastPreference.ForcedColors */;\n }\n\n return undefined;\n}\nfunction doesMatch$2(value) {\n return matchMedia(\"(prefers-contrast: \".concat(value, \")\")).matches;\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion\n */\nfunction isMotionReduced() {\n if (doesMatch$1('reduce')) {\n return true;\n }\n if (doesMatch$1('no-preference')) {\n return false;\n }\n return undefined;\n}\nfunction doesMatch$1(value) {\n return matchMedia(\"(prefers-reduced-motion: \".concat(value, \")\")).matches;\n}\n\n/**\n * @see https://www.w3.org/TR/mediaqueries-5/#dynamic-range\n */\nfunction isHDR() {\n if (doesMatch('high')) {\n return true;\n }\n if (doesMatch('standard')) {\n return false;\n }\n return undefined;\n}\nfunction doesMatch(value) {\n return matchMedia(\"(dynamic-range: \".concat(value, \")\")).matches;\n}\nvar M = Math; // To reduce the minified code size\nvar fallbackFn = function () {\n return 0;\n};\n/**\n * @see https://gitlab.torproject.org/legacy/trac/-/issues/13018\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=531915\n */\nfunction getMathFingerprint() {\n // Native operations\n var acos = M.acos || fallbackFn;\n var acosh = M.acosh || fallbackFn;\n var asin = M.asin || fallbackFn;\n var asinh = M.asinh || fallbackFn;\n var atanh = M.atanh || fallbackFn;\n var atan = M.atan || fallbackFn;\n var sin = M.sin || fallbackFn;\n var sinh = M.sinh || fallbackFn;\n var cos = M.cos || fallbackFn;\n var cosh = M.cosh || fallbackFn;\n var tan = M.tan || fallbackFn;\n var tanh = M.tanh || fallbackFn;\n var exp = M.exp || fallbackFn;\n var expm1 = M.expm1 || fallbackFn;\n var log1p = M.log1p || fallbackFn;\n // Operation polyfills\n var powPI = function (value) {\n return M.pow(M.PI, value);\n };\n var acoshPf = function (value) {\n return M.log(value + M.sqrt(value * value - 1));\n };\n var asinhPf = function (value) {\n return M.log(value + M.sqrt(value * value + 1));\n };\n var atanhPf = function (value) {\n return M.log((1 + value) / (1 - value)) / 2;\n };\n var sinhPf = function (value) {\n return M.exp(value) - 1 / M.exp(value) / 2;\n };\n var coshPf = function (value) {\n return (M.exp(value) + 1 / M.exp(value)) / 2;\n };\n var expm1Pf = function (value) {\n return M.exp(value) - 1;\n };\n var tanhPf = function (value) {\n return (M.exp(2 * value) - 1) / (M.exp(2 * value) + 1);\n };\n var log1pPf = function (value) {\n return M.log(1 + value);\n };\n // Note: constant values are empirical\n return {\n acos: acos(0.123124234234234242),\n acosh: acosh(1e308),\n acoshPf: acoshPf(1e154),\n asin: asin(0.123124234234234242),\n asinh: asinh(1),\n asinhPf: asinhPf(1),\n atanh: atanh(0.5),\n atanhPf: atanhPf(0.5),\n atan: atan(0.5),\n sin: sin(-1e300),\n sinh: sinh(1),\n sinhPf: sinhPf(1),\n cos: cos(10.000000000123),\n cosh: cosh(1),\n coshPf: coshPf(1),\n tan: tan(-1e300),\n tanh: tanh(1),\n tanhPf: tanhPf(1),\n exp: exp(1),\n expm1: expm1(1),\n expm1Pf: expm1Pf(1),\n log1p: log1p(10),\n log1pPf: log1pPf(10),\n powPI: powPI(-100)\n };\n}\n\n/**\n * We use m or w because these two characters take up the maximum width.\n * Also there are a couple of ligatures.\n */\nvar defaultText = 'mmMwWLliI0fiflO&1';\n/**\n * Settings of text blocks to measure. The keys are random but persistent words.\n */\nvar presets = {\n /**\n * The default font. User can change it in desktop Chrome, desktop Firefox, IE 11,\n * Android Chrome (but only when the size is ≥ than the default) and Android Firefox.\n */\n default: [],\n /** OS font on macOS. User can change its size and weight. Applies after Safari restart. */\n apple: [{\n font: '-apple-system-body'\n }],\n /** User can change it in desktop Chrome and desktop Firefox. */\n serif: [{\n fontFamily: 'serif'\n }],\n /** User can change it in desktop Chrome and desktop Firefox. */\n sans: [{\n fontFamily: 'sans-serif'\n }],\n /** User can change it in desktop Chrome and desktop Firefox. */\n mono: [{\n fontFamily: 'monospace'\n }],\n /**\n * Check the smallest allowed font size. User can change it in desktop Chrome, desktop Firefox and desktop Safari.\n * The height can be 0 in Chrome on a retina display.\n */\n min: [{\n fontSize: '1px'\n }],\n /** Tells one OS from another in desktop Chrome. */\n system: [{\n fontFamily: 'system-ui'\n }]\n};\n/**\n * The result is a dictionary of the width of the text samples.\n * Heights aren't included because they give no extra entropy and are unstable.\n *\n * The result is very stable in IE 11, Edge 18 and Safari 14.\n * The result changes when the OS pixel density changes in Chromium 87. The real pixel density is required to solve,\n * but seems like it's impossible: https://stackoverflow.com/q/1713771/1118709.\n * The \"min\" and the \"mono\" (only on Windows) value may change when the page is zoomed in Firefox 87.\n */\nfunction getFontPreferences() {\n return withNaturalFonts(function (document, container) {\n var elements = {};\n var sizes = {};\n // First create all elements to measure. If the DOM steps below are done in a single cycle,\n // browser will alternate tree modification and layout reading, that is very slow.\n for (var _i = 0, _a = Object.keys(presets); _i < _a.length; _i++) {\n var key = _a[_i];\n var _b = presets[key],\n _c = _b[0],\n style = _c === void 0 ? {} : _c,\n _d = _b[1],\n text = _d === void 0 ? defaultText : _d;\n var element = document.createElement('span');\n element.textContent = text;\n element.style.whiteSpace = 'nowrap';\n for (var _e = 0, _f = Object.keys(style); _e < _f.length; _e++) {\n var name_1 = _f[_e];\n var value = style[name_1];\n if (value !== undefined) {\n element.style[name_1] = value;\n }\n }\n elements[key] = element;\n container.appendChild(document.createElement('br'));\n container.appendChild(element);\n }\n // Then measure the created elements\n for (var _g = 0, _h = Object.keys(presets); _g < _h.length; _g++) {\n var key = _h[_g];\n sizes[key] = elements[key].getBoundingClientRect().width;\n }\n return sizes;\n });\n}\n/**\n * Creates a DOM environment that provides the most natural font available, including Android OS font.\n * Measurements of the elements are zoom-independent.\n * Don't put a content to measure inside an absolutely positioned element.\n */\nfunction withNaturalFonts(action, containerWidthPx) {\n if (containerWidthPx === void 0) {\n containerWidthPx = 4000;\n }\n /*\n * Requirements for Android Chrome to apply the system font size to a text inside an iframe:\n * - The iframe mustn't have a `display: none;` style;\n * - The text mustn't be positioned absolutely;\n * - The text block must be wide enough.\n * 2560px on some devices in portrait orientation for the biggest font size option (32px);\n * - There must be much enough text to form a few lines (I don't know the exact numbers);\n * - The text must have the `text-size-adjust: none` style. Otherwise the text will scale in \"Desktop site\" mode;\n *\n * Requirements for Android Firefox to apply the system font size to a text inside an iframe:\n * - The iframe document must have a header: `<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />`.\n * The only way to set it is to use the `srcdoc` attribute of the iframe;\n * - The iframe content must get loaded before adding extra content with JavaScript;\n *\n * https://example.com as the iframe target always inherits Android font settings so it can be used as a reference.\n *\n * Observations on how page zoom affects the measurements:\n * - macOS Safari 11.1, 12.1, 13.1, 14.0: zoom reset + offsetWidth = 100% reliable;\n * - macOS Safari 11.1, 12.1, 13.1, 14.0: zoom reset + getBoundingClientRect = 100% reliable;\n * - macOS Safari 14.0: offsetWidth = 5% fluctuation;\n * - macOS Safari 14.0: getBoundingClientRect = 5% fluctuation;\n * - iOS Safari 9, 10, 11.0, 12.0: haven't found a way to zoom a page (pinch doesn't change layout);\n * - iOS Safari 13.1, 14.0: zoom reset + offsetWidth = 100% reliable;\n * - iOS Safari 13.1, 14.0: zoom reset + getBoundingClientRect = 100% reliable;\n * - iOS Safari 14.0: offsetWidth = 100% reliable;\n * - iOS Safari 14.0: getBoundingClientRect = 100% reliable;\n * - Chrome 42, 65, 80, 87: zoom 1/devicePixelRatio + offsetWidth = 1px fluctuation;\n * - Chrome 42, 65, 80, 87: zoom 1/devicePixelRatio + getBoundingClientRect = 100% reliable;\n * - Chrome 87: offsetWidth = 1px fluctuation;\n * - Chrome 87: getBoundingClientRect = 0.7px fluctuation;\n * - Firefox 48, 51: offsetWidth = 10% fluctuation;\n * - Firefox 48, 51: getBoundingClientRect = 10% fluctuation;\n * - Firefox 52, 53, 57, 62, 66, 67, 68, 71, 75, 80, 84: offsetWidth = width 100% reliable, height 10% fluctuation;\n * - Firefox 52, 53, 57, 62, 66, 67, 68, 71, 75, 80, 84: getBoundingClientRect = width 100% reliable, height 10%\n * fluctuation;\n * - Android Chrome 86: haven't found a way to zoom a page (pinch doesn't change layout);\n * - Android Firefox 84: font size in accessibility settings changes all the CSS sizes, but offsetWidth and\n * getBoundingClientRect keep measuring with regular units, so the size reflects the font size setting and doesn't\n * fluctuate;\n * - IE 11, Edge 18: zoom 1/devicePixelRatio + offsetWidth = 100% reliable;\n * - IE 11, Edge 18: zoom 1/devicePixelRatio + getBoundingClientRect = reflects the zoom level;\n * - IE 11, Edge 18: offsetWidth = 100% reliable;\n * - IE 11, Edge 18: getBoundingClientRect = 100% reliable;\n */\n return withIframe(function (_, iframeWindow) {\n var iframeDocument = iframeWindow.document;\n var iframeBody = iframeDocument.body;\n var bodyStyle = iframeBody.style;\n bodyStyle.width = \"\".concat(containerWidthPx, \"px\");\n bodyStyle.webkitTextSizeAdjust = bodyStyle.textSizeAdjust = 'none';\n // See the big comment above\n if (isChromium()) {\n iframeBody.style.zoom = \"\".concat(1 / iframeWindow.devicePixelRatio);\n } else if (isWebKit()) {\n iframeBody.style.zoom = 'reset';\n }\n // See the big comment above\n var linesOfText = iframeDocument.createElement('div');\n linesOfText.textContent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spreadArray\"])([], Array(containerWidthPx / 20 << 0), true).map(function () {\n return 'word';\n }).join(' ');\n iframeBody.appendChild(linesOfText);\n return action(iframeDocument, iframeBody);\n }, '<!doctype html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">');\n}\n\n/**\n * @see Credits: https://stackoverflow.com/a/49267844\n */\nfunction getVideoCard() {\n var _a;\n var canvas = document.createElement('canvas');\n var gl = (_a = canvas.getContext('webgl')) !== null && _a !== void 0 ? _a : canvas.getContext('experimental-webgl');\n if (gl && 'getExtension' in gl) {\n var debugInfo = gl.getExtension('WEBGL_debug_renderer_info');\n if (debugInfo) {\n return {\n vendor: (gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL) || '').toString(),\n renderer: (gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL) || '').toString()\n };\n }\n }\n return undefined;\n}\nfunction isPdfViewerEnabled() {\n return navigator.pdfViewerEnabled;\n}\n\n/**\n * Unlike most other architectures, on x86/x86-64 when floating-point instructions\n * have no NaN arguments, but produce NaN output, the output NaN has sign bit set.\n * We use it to distinguish x86/x86-64 from other architectures, by doing subtraction\n * of two infinities (must produce NaN per IEEE 754 standard).\n *\n * See https://codebrowser.bddppq.com/pytorch/pytorch/third_party/XNNPACK/src/init.c.html#79\n */\nfunction getArchitecture() {\n var f = new Float32Array(1);\n var u8 = new Uint8Array(f.buffer);\n f[0] = Infinity;\n f[0] = f[0] - f[0];\n return u8[3];\n}\n\n/**\n * The list of entropy sources used to make visitor identifiers.\n *\n * This value isn't restricted by Semantic Versioning, i.e. it may be changed without bumping minor or major version of\n * this package.\n *\n * Note: Rollup and Webpack are smart enough to remove unused properties of this object during tree-shaking, so there is\n * no need to export the sources individually.\n */\nvar sources = {\n // READ FIRST:\n // See https://github.com/fingerprintjs/fingerprintjs/blob/master/contributing.md#how-to-make-an-entropy-source\n // to learn how entropy source works and how to make your own.\n // The sources run in this exact order.\n // The asynchronous sources are at the start to run in parallel with other sources.\n fonts: getFonts,\n domBlockers: getDomBlockers,\n fontPreferences: getFontPreferences,\n audio: getAudioFingerprint,\n screenFrame: getRoundedScreenFrame,\n osCpu: getOsCpu,\n languages: getLanguages,\n colorDepth: getColorDepth,\n deviceMemory: getDeviceMemory,\n screenResolution: getScreenResolution,\n hardwareConcurrency: getHardwareConcurrency,\n timezone: getTimezone,\n sessionStorage: getSessionStorage,\n localStorage: getLocalStorage,\n indexedDB: getIndexedDB,\n openDatabase: getOpenDatabase,\n cpuClass: getCpuClass,\n platform: getPlatform,\n plugins: getPlugins,\n canvas: getCanvasFingerprint,\n touchSupport: getTouchSupport,\n vendor: getVendor,\n vendorFlavors: getVendorFlavors,\n cookiesEnabled: areCookiesEnabled,\n colorGamut: getColorGamut,\n invertedColors: areColorsInverted,\n forcedColors: areColorsForced,\n monochrome: getMonochromeDepth,\n contrast: getContrastPreference,\n reducedMotion: isMotionReduced,\n hdr: isHDR,\n math: getMathFingerprint,\n videoCard: getVideoCard,\n pdfViewerEnabled: isPdfViewerEnabled,\n architecture: getArchitecture\n};\n/**\n * Loads the built-in entropy sources.\n * Returns a function that collects the entropy components to make the visitor identifier.\n */\nfunction loadBuiltinSources(options) {\n return loadSources(sources, options, []);\n}\nvar commentTemplate = '$ if upgrade to Pro: https://fpjs.dev/pro';\nfunction getConfidence(components) {\n var openConfidenceScore = getOpenConfidenceScore(components);\n var proConfidenceScore = deriveProConfidenceScore(openConfidenceScore);\n return {\n score: openConfidenceScore,\n comment: commentTemplate.replace(/\\$/g, \"\".concat(proConfidenceScore))\n };\n}\nfunction getOpenConfidenceScore(components) {\n // In order to calculate the true probability of the visitor identifier being correct, we need to know the number of\n // website visitors (the higher the number, the less the probability because the fingerprint entropy is limited).\n // JS agent doesn't know the number of visitors, so we can only do an approximate assessment.\n if (isAndroid()) {\n return 0.4;\n }\n // Safari (mobile and desktop)\n if (isWebKit()) {\n return isDesktopSafari() ? 0.5 : 0.3;\n }\n var platform = components.platform.value || '';\n // Windows\n if (/^Win/.test(platform)) {\n // The score is greater than on macOS because of the higher variety of devices running Windows.\n // Chrome provides more entropy than Firefox according too\n // https://netmarketshare.com/browser-market-share.aspx?options=%7B%22filter%22%3A%7B%22%24and%22%3A%5B%7B%22platform%22%3A%7B%22%24in%22%3A%5B%22Windows%22%5D%7D%7D%5D%7D%2C%22dateLabel%22%3A%22Trend%22%2C%22attributes%22%3A%22share%22%2C%22group%22%3A%22browser%22%2C%22sort%22%3A%7B%22share%22%3A-1%7D%2C%22id%22%3A%22browsersDesktop%22%2C%22dateInterval%22%3A%22Monthly%22%2C%22dateStart%22%3A%222019-11%22%2C%22dateEnd%22%3A%222020-10%22%2C%22segments%22%3A%22-1000%22%7D\n // So we assign the same score to them.\n return 0.6;\n }\n // macOS\n if (/^Mac/.test(platform)) {\n // Chrome provides more entropy than Safari and Safari provides more entropy than Firefox.\n // Chrome is more popular than Safari and Safari is more popular than Firefox according to\n // https://netmarketshare.com/browser-market-share.aspx?options=%7B%22filter%22%3A%7B%22%24and%22%3A%5B%7B%22platform%22%3A%7B%22%24in%22%3A%5B%22Mac%20OS%22%5D%7D%7D%5D%7D%2C%22dateLabel%22%3A%22Trend%22%2C%22attributes%22%3A%22share%22%2C%22group%22%3A%22browser%22%2C%22sort%22%3A%7B%22share%22%3A-1%7D%2C%22id%22%3A%22browsersDesktop%22%2C%22dateInterval%22%3A%22Monthly%22%2C%22dateStart%22%3A%222019-11%22%2C%22dateEnd%22%3A%222020-10%22%2C%22segments%22%3A%22-1000%22%7D\n // So we assign the same score to them.\n return 0.5;\n }\n // Another platform, e.g. a desktop Linux. It's rare, so it should be pretty unique.\n return 0.7;\n}\nfunction deriveProConfidenceScore(openConfidenceScore) {\n return round(0.99 + 0.01 * openConfidenceScore, 0.0001);\n}\nfunction componentsToCanonicalString(components) {\n var result = '';\n for (var _i = 0, _a = Object.keys(components).sort(); _i < _a.length; _i++) {\n var componentKey = _a[_i];\n var component = components[componentKey];\n var value = component.error ? 'error' : JSON.stringify(component.value);\n result += \"\".concat(result ? '|' : '').concat(componentKey.replace(/([:|\\\\])/g, '\\\\$1'), \":\").concat(value);\n }\n return result;\n}\nfunction componentsToDebugString(components) {\n return JSON.stringify(components, function (_key, value) {\n if (value instanceof Error) {\n return errorToObject(value);\n }\n return value;\n }, 2);\n}\nfunction hashComponents(components) {\n return x64hash128(componentsToCanonicalString(components));\n}\n/**\n * Makes a GetResult implementation that calculates the visitor id hash on demand.\n * Designed for optimisation.\n */\nfunction makeLazyGetResult(components) {\n var visitorIdCache;\n // This function runs very fast, so there is no need to make it lazy\n var confidence = getConfidence(components);\n // A plain class isn't used because its getters and setters aren't enumerable.\n return {\n get visitorId() {\n if (visitorIdCache === undefined) {\n visitorIdCache = hashComponents(this.components);\n }\n return visitorIdCache;\n },\n set visitorId(visitorId) {\n visitorIdCache = visitorId;\n },\n confidence: confidence,\n components: components,\n version: version\n };\n}\n/**\n * A delay is required to ensure consistent entropy components.\n * See https://github.com/fingerprintjs/fingerprintjs/issues/254\n * and https://github.com/fingerprintjs/fingerprintjs/issues/307\n * and https://github.com/fingerprintjs/fingerprintjs/commit/945633e7c5f67ae38eb0fea37349712f0e669b18\n */\nfunction prepareForSources(delayFallback) {\n if (delayFallback === void 0) {\n delayFallback = 50;\n }\n // A proper deadline is unknown. Let it be twice the fallback timeout so that both cases have the same average time.\n return requestIdleCallbackIfAvailable(delayFallback, delayFallback * 2);\n}\n/**\n * The function isn't exported from the index file to not allow to call it without `load()`.\n * The hiding gives more freedom for future non-breaking updates.\n *\n * A factory function is used instead of a class to shorten the attribute names in the minified code.\n * Native private class fields could've been used, but TypeScript doesn't allow them with `\"target\": \"es5\"`.\n */\nfunction makeAgent(getComponents, debug) {\n var creationTime = Date.now();\n return {\n get: function (options) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var startTime, components, result;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = Date.now();\n return [4 /*yield*/, getComponents()];\n case 1:\n components = _a.sent();\n result = makeLazyGetResult(components);\n if (debug || (options === null || options === void 0 ? void 0 : options.debug)) {\n // console.log is ok here because it's under a debug clause\n // eslint-disable-next-line no-console\n console.log(\"Copy the text below to get the debug data:\\n\\n```\\nversion: \".concat(result.version, \"\\nuserAgent: \").concat(navigator.userAgent, \"\\ntimeBetweenLoadAndGet: \").concat(startTime - creationTime, \"\\nvisitorId: \").concat(result.visitorId, \"\\ncomponents: \").concat(componentsToDebugString(components), \"\\n```\"));\n }\n return [2 /*return*/, result];\n }\n });\n });\n }\n };\n}\n/**\n * Sends an unpersonalized AJAX request to collect installation statistics\n */\nfunction monitor() {\n // The FingerprintJS CDN (https://github.com/fingerprintjs/cdn) replaces `window.__fpjs_d_m` with `true`\n if (window.__fpjs_d_m || Math.random() >= 0.001) {\n return;\n }\n try {\n var request = new XMLHttpRequest();\n request.open('get', \"https://m1.openfpcdn.io/fingerprintjs/v\".concat(version, \"/npm-monitoring\"), true);\n request.send();\n } catch (error) {\n // console.error is ok here because it's an unexpected error handler\n // eslint-disable-next-line no-console\n console.error(error);\n }\n}\n/**\n * Builds an instance of Agent and waits a delay required for a proper operation.\n */\nfunction load(_a) {\n var _b = _a === void 0 ? {} : _a,\n delayFallback = _b.delayFallback,\n debug = _b.debug,\n _c = _b.monitoring,\n monitoring = _c === void 0 ? true : _c;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var getComponents;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_d) {\n switch (_d.label) {\n case 0:\n if (monitoring) {\n monitor();\n }\n return [4 /*yield*/, prepareForSources(delayFallback)];\n case 1:\n _d.sent();\n getComponents = loadBuiltinSources({\n debug: debug\n });\n return [2 /*return*/, makeAgent(getComponents, debug)];\n }\n });\n });\n}\n\n// The default export is a syntax sugar (`import * as FP from '...' → import FP from '...'`).\n// It should contain all the public exported values.\nvar index = {\n load: load,\n hashComponents: hashComponents,\n componentsToDebugString: componentsToDebugString\n};\n// The exports below are for private usage. They may change unexpectedly. Use them at your own risk.\n/** Not documented, out of Semantic Versioning, usage is at your own risk */\nvar murmurX64Hash128 = x64hash128;\n\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.js?");
|
|
563
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"componentsToDebugString\", function() { return componentsToDebugString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return index; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFullscreenElement\", function() { return getFullscreenElement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getScreenFrame\", function() { return getScreenFrame; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hashComponents\", function() { return hashComponents; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isAndroid\", function() { return isAndroid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isChromium\", function() { return isChromium; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDesktopSafari\", function() { return isDesktopSafari; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isEdgeHTML\", function() { return isEdgeHTML; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isGecko\", function() { return isGecko; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isTrident\", function() { return isTrident; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isWebKit\", function() { return isWebKit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"load\", function() { return load; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadSources\", function() { return loadSources; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"murmurX64Hash128\", function() { return murmurX64Hash128; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prepareForSources\", function() { return prepareForSources; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sources\", function() { return sources; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformSource\", function() { return transformSource; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withIframe\", function() { return withIframe; });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.js\");\n/**\n * FingerprintJS v3.4.2 - Copyright (c) FingerprintJS, Inc, 2023 (https://fingerprint.com)\n * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.\n *\n * This software contains code from open-source projects:\n * MurmurHash3 by Karan Lyons (https://github.com/karanlyons/murmurHash3.js)\n */\n\n\nvar version = \"3.4.2\";\nfunction wait(durationMs, resolveWith) {\n return new Promise(function (resolve) {\n return setTimeout(resolve, durationMs, resolveWith);\n });\n}\nfunction requestIdleCallbackIfAvailable(fallbackTimeout, deadlineTimeout) {\n if (deadlineTimeout === void 0) {\n deadlineTimeout = Infinity;\n }\n var requestIdleCallback = window.requestIdleCallback;\n if (requestIdleCallback) {\n // The function `requestIdleCallback` loses the binding to `window` here.\n // `globalThis` isn't always equal `window` (see https://github.com/fingerprintjs/fingerprintjs/issues/683).\n // Therefore, an error can occur. `call(window,` prevents the error.\n return new Promise(function (resolve) {\n return requestIdleCallback.call(window, function () {\n return resolve();\n }, {\n timeout: deadlineTimeout\n });\n });\n } else {\n return wait(Math.min(fallbackTimeout, deadlineTimeout));\n }\n}\nfunction isPromise(value) {\n return !!value && typeof value.then === 'function';\n}\n/**\n * Calls a maybe asynchronous function without creating microtasks when the function is synchronous.\n * Catches errors in both cases.\n *\n * If just you run a code like this:\n * ```\n * console.time('Action duration')\n * await action()\n * console.timeEnd('Action duration')\n * ```\n * The synchronous function time can be measured incorrectly because another microtask may run before the `await`\n * returns the control back to the code.\n */\nfunction awaitIfAsync(action, callback) {\n try {\n var returnedValue = action();\n if (isPromise(returnedValue)) {\n returnedValue.then(function (result) {\n return callback(true, result);\n }, function (error) {\n return callback(false, error);\n });\n } else {\n callback(true, returnedValue);\n }\n } catch (error) {\n callback(false, error);\n }\n}\n/**\n * If you run many synchronous tasks without using this function, the JS main loop will be busy and asynchronous tasks\n * (e.g. completing a network request, rendering the page) won't be able to happen.\n * This function allows running many synchronous tasks such way that asynchronous tasks can run too in background.\n */\nfunction mapWithBreaks(items, callback, loopReleaseInterval) {\n if (loopReleaseInterval === void 0) {\n loopReleaseInterval = 16;\n }\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var results, lastLoopReleaseTime, i, now;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n results = Array(items.length);\n lastLoopReleaseTime = Date.now();\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < items.length)) return [3 /*break*/, 4];\n results[i] = callback(items[i], i);\n now = Date.now();\n if (!(now >= lastLoopReleaseTime + loopReleaseInterval)) return [3 /*break*/, 3];\n lastLoopReleaseTime = now;\n // Allows asynchronous actions and microtasks to happen\n return [4 /*yield*/, wait(0)];\n case 2:\n // Allows asynchronous actions and microtasks to happen\n _a.sent();\n _a.label = 3;\n case 3:\n ++i;\n return [3 /*break*/, 1];\n case 4:\n return [2 /*return*/, results];\n }\n });\n });\n}\n/**\n * Makes the given promise never emit an unhandled promise rejection console warning.\n * The promise will still pass errors to the next promises.\n *\n * Otherwise, promise emits a console warning unless it has a `catch` listener.\n */\nfunction suppressUnhandledRejectionWarning(promise) {\n promise.then(undefined, function () {\n return undefined;\n });\n}\n\n/*\n * Taken from https://github.com/karanlyons/murmurHash3.js/blob/a33d0723127e2e5415056c455f8aed2451ace208/murmurHash3.js\n */\n//\n// Given two 64bit ints (as an array of two 32bit ints) returns the two\n// added together as a 64bit int (as an array of two 32bit ints).\n//\nfunction x64Add(m, n) {\n m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff];\n n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff];\n var o = [0, 0, 0, 0];\n o[3] += m[3] + n[3];\n o[2] += o[3] >>> 16;\n o[3] &= 0xffff;\n o[2] += m[2] + n[2];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n o[1] += m[1] + n[1];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n o[0] += m[0] + n[0];\n o[0] &= 0xffff;\n return [o[0] << 16 | o[1], o[2] << 16 | o[3]];\n}\n//\n// Given two 64bit ints (as an array of two 32bit ints) returns the two\n// multiplied together as a 64bit int (as an array of two 32bit ints).\n//\nfunction x64Multiply(m, n) {\n m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff];\n n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff];\n var o = [0, 0, 0, 0];\n o[3] += m[3] * n[3];\n o[2] += o[3] >>> 16;\n o[3] &= 0xffff;\n o[2] += m[2] * n[3];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n o[2] += m[3] * n[2];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n o[1] += m[1] * n[3];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n o[1] += m[2] * n[2];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n o[1] += m[3] * n[1];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n o[0] += m[0] * n[3] + m[1] * n[2] + m[2] * n[1] + m[3] * n[0];\n o[0] &= 0xffff;\n return [o[0] << 16 | o[1], o[2] << 16 | o[3]];\n}\n//\n// Given a 64bit int (as an array of two 32bit ints) and an int\n// representing a number of bit positions, returns the 64bit int (as an\n// array of two 32bit ints) rotated left by that number of positions.\n//\nfunction x64Rotl(m, n) {\n n %= 64;\n if (n === 32) {\n return [m[1], m[0]];\n } else if (n < 32) {\n return [m[0] << n | m[1] >>> 32 - n, m[1] << n | m[0] >>> 32 - n];\n } else {\n n -= 32;\n return [m[1] << n | m[0] >>> 32 - n, m[0] << n | m[1] >>> 32 - n];\n }\n}\n//\n// Given a 64bit int (as an array of two 32bit ints) and an int\n// representing a number of bit positions, returns the 64bit int (as an\n// array of two 32bit ints) shifted left by that number of positions.\n//\nfunction x64LeftShift(m, n) {\n n %= 64;\n if (n === 0) {\n return m;\n } else if (n < 32) {\n return [m[0] << n | m[1] >>> 32 - n, m[1] << n];\n } else {\n return [m[1] << n - 32, 0];\n }\n}\n//\n// Given two 64bit ints (as an array of two 32bit ints) returns the two\n// xored together as a 64bit int (as an array of two 32bit ints).\n//\nfunction x64Xor(m, n) {\n return [m[0] ^ n[0], m[1] ^ n[1]];\n}\n//\n// Given a block, returns murmurHash3's final x64 mix of that block.\n// (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the\n// only place where we need to right shift 64bit ints.)\n//\nfunction x64Fmix(h) {\n h = x64Xor(h, [0, h[0] >>> 1]);\n h = x64Multiply(h, [0xff51afd7, 0xed558ccd]);\n h = x64Xor(h, [0, h[0] >>> 1]);\n h = x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53]);\n h = x64Xor(h, [0, h[0] >>> 1]);\n return h;\n}\n//\n// Given a string and an optional seed as an int, returns a 128 bit\n// hash using the x64 flavor of MurmurHash3, as an unsigned hex.\n//\nfunction x64hash128(key, seed) {\n key = key || '';\n seed = seed || 0;\n var remainder = key.length % 16;\n var bytes = key.length - remainder;\n var h1 = [0, seed];\n var h2 = [0, seed];\n var k1 = [0, 0];\n var k2 = [0, 0];\n var c1 = [0x87c37b91, 0x114253d5];\n var c2 = [0x4cf5ad43, 0x2745937f];\n var i;\n for (i = 0; i < bytes; i = i + 16) {\n k1 = [key.charCodeAt(i + 4) & 0xff | (key.charCodeAt(i + 5) & 0xff) << 8 | (key.charCodeAt(i + 6) & 0xff) << 16 | (key.charCodeAt(i + 7) & 0xff) << 24, key.charCodeAt(i) & 0xff | (key.charCodeAt(i + 1) & 0xff) << 8 | (key.charCodeAt(i + 2) & 0xff) << 16 | (key.charCodeAt(i + 3) & 0xff) << 24];\n k2 = [key.charCodeAt(i + 12) & 0xff | (key.charCodeAt(i + 13) & 0xff) << 8 | (key.charCodeAt(i + 14) & 0xff) << 16 | (key.charCodeAt(i + 15) & 0xff) << 24, key.charCodeAt(i + 8) & 0xff | (key.charCodeAt(i + 9) & 0xff) << 8 | (key.charCodeAt(i + 10) & 0xff) << 16 | (key.charCodeAt(i + 11) & 0xff) << 24];\n k1 = x64Multiply(k1, c1);\n k1 = x64Rotl(k1, 31);\n k1 = x64Multiply(k1, c2);\n h1 = x64Xor(h1, k1);\n h1 = x64Rotl(h1, 27);\n h1 = x64Add(h1, h2);\n h1 = x64Add(x64Multiply(h1, [0, 5]), [0, 0x52dce729]);\n k2 = x64Multiply(k2, c2);\n k2 = x64Rotl(k2, 33);\n k2 = x64Multiply(k2, c1);\n h2 = x64Xor(h2, k2);\n h2 = x64Rotl(h2, 31);\n h2 = x64Add(h2, h1);\n h2 = x64Add(x64Multiply(h2, [0, 5]), [0, 0x38495ab5]);\n }\n k1 = [0, 0];\n k2 = [0, 0];\n switch (remainder) {\n case 15:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 14)], 48));\n // fallthrough\n case 14:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 13)], 40));\n // fallthrough\n case 13:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 12)], 32));\n // fallthrough\n case 12:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 11)], 24));\n // fallthrough\n case 11:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 10)], 16));\n // fallthrough\n case 10:\n k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 9)], 8));\n // fallthrough\n case 9:\n k2 = x64Xor(k2, [0, key.charCodeAt(i + 8)]);\n k2 = x64Multiply(k2, c2);\n k2 = x64Rotl(k2, 33);\n k2 = x64Multiply(k2, c1);\n h2 = x64Xor(h2, k2);\n // fallthrough\n case 8:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 7)], 56));\n // fallthrough\n case 7:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 6)], 48));\n // fallthrough\n case 6:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 5)], 40));\n // fallthrough\n case 5:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 4)], 32));\n // fallthrough\n case 4:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 3)], 24));\n // fallthrough\n case 3:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 2)], 16));\n // fallthrough\n case 2:\n k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 1)], 8));\n // fallthrough\n case 1:\n k1 = x64Xor(k1, [0, key.charCodeAt(i)]);\n k1 = x64Multiply(k1, c1);\n k1 = x64Rotl(k1, 31);\n k1 = x64Multiply(k1, c2);\n h1 = x64Xor(h1, k1);\n // fallthrough\n }\n\n h1 = x64Xor(h1, [0, key.length]);\n h2 = x64Xor(h2, [0, key.length]);\n h1 = x64Add(h1, h2);\n h2 = x64Add(h2, h1);\n h1 = x64Fmix(h1);\n h2 = x64Fmix(h2);\n h1 = x64Add(h1, h2);\n h2 = x64Add(h2, h1);\n return ('00000000' + (h1[0] >>> 0).toString(16)).slice(-8) + ('00000000' + (h1[1] >>> 0).toString(16)).slice(-8) + ('00000000' + (h2[0] >>> 0).toString(16)).slice(-8) + ('00000000' + (h2[1] >>> 0).toString(16)).slice(-8);\n}\n\n/**\n * Converts an error object to a plain object that can be used with `JSON.stringify`.\n * If you just run `JSON.stringify(error)`, you'll get `'{}'`.\n */\nfunction errorToObject(error) {\n var _a;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({\n name: error.name,\n message: error.message,\n stack: (_a = error.stack) === null || _a === void 0 ? void 0 : _a.split('\\n')\n }, error);\n}\n\n/*\n * This file contains functions to work with pure data only (no browser features, DOM, side effects, etc).\n */\n/**\n * Does the same as Array.prototype.includes but has better typing\n */\nfunction includes(haystack, needle) {\n for (var i = 0, l = haystack.length; i < l; ++i) {\n if (haystack[i] === needle) {\n return true;\n }\n }\n return false;\n}\n/**\n * Like `!includes()` but with proper typing\n */\nfunction excludes(haystack, needle) {\n return !includes(haystack, needle);\n}\n/**\n * Be careful, NaN can return\n */\nfunction toInt(value) {\n return parseInt(value);\n}\n/**\n * Be careful, NaN can return\n */\nfunction toFloat(value) {\n return parseFloat(value);\n}\nfunction replaceNaN(value, replacement) {\n return typeof value === 'number' && isNaN(value) ? replacement : value;\n}\nfunction countTruthy(values) {\n return values.reduce(function (sum, value) {\n return sum + (value ? 1 : 0);\n }, 0);\n}\nfunction round(value, base) {\n if (base === void 0) {\n base = 1;\n }\n if (Math.abs(base) >= 1) {\n return Math.round(value / base) * base;\n } else {\n // Sometimes when a number is multiplied by a small number, precision is lost,\n // for example 1234 * 0.0001 === 0.12340000000000001, and it's more precise divide: 1234 / (1 / 0.0001) === 0.1234.\n var counterBase = 1 / base;\n return Math.round(value * counterBase) / counterBase;\n }\n}\n/**\n * Parses a CSS selector into tag name with HTML attributes.\n * Only single element selector are supported (without operators like space, +, >, etc).\n *\n * Multiple values can be returned for each attribute. You decide how to handle them.\n */\nfunction parseSimpleCssSelector(selector) {\n var _a, _b;\n var errorMessage = \"Unexpected syntax '\".concat(selector, \"'\");\n var tagMatch = /^\\s*([a-z-]*)(.*)$/i.exec(selector);\n var tag = tagMatch[1] || undefined;\n var attributes = {};\n var partsRegex = /([.:#][\\w-]+|\\[.+?\\])/gi;\n var addAttribute = function (name, value) {\n attributes[name] = attributes[name] || [];\n attributes[name].push(value);\n };\n for (;;) {\n var match = partsRegex.exec(tagMatch[2]);\n if (!match) {\n break;\n }\n var part = match[0];\n switch (part[0]) {\n case '.':\n addAttribute('class', part.slice(1));\n break;\n case '#':\n addAttribute('id', part.slice(1));\n break;\n case '[':\n {\n var attributeMatch = /^\\[([\\w-]+)([~|^$*]?=(\"(.*?)\"|([\\w-]+)))?(\\s+[is])?\\]$/.exec(part);\n if (attributeMatch) {\n addAttribute(attributeMatch[1], (_b = (_a = attributeMatch[4]) !== null && _a !== void 0 ? _a : attributeMatch[5]) !== null && _b !== void 0 ? _b : '');\n } else {\n throw new Error(errorMessage);\n }\n break;\n }\n default:\n throw new Error(errorMessage);\n }\n }\n return [tag, attributes];\n}\nfunction ensureErrorWithMessage(error) {\n return error && typeof error === 'object' && 'message' in error ? error : {\n message: error\n };\n}\nfunction isFinalResultLoaded(loadResult) {\n return typeof loadResult !== 'function';\n}\n/**\n * Loads the given entropy source. Returns a function that gets an entropy component from the source.\n *\n * The result is returned synchronously to prevent `loadSources` from\n * waiting for one source to load before getting the components from the other sources.\n */\nfunction loadSource(source, sourceOptions) {\n var sourceLoadPromise = new Promise(function (resolveLoad) {\n var loadStartTime = Date.now();\n // `awaitIfAsync` is used instead of just `await` in order to measure the duration of synchronous sources\n // correctly (other microtasks won't affect the duration).\n awaitIfAsync(source.bind(null, sourceOptions), function () {\n var loadArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n loadArgs[_i] = arguments[_i];\n }\n var loadDuration = Date.now() - loadStartTime;\n // Source loading failed\n if (!loadArgs[0]) {\n return resolveLoad(function () {\n return {\n error: ensureErrorWithMessage(loadArgs[1]),\n duration: loadDuration\n };\n });\n }\n var loadResult = loadArgs[1];\n // Source loaded with the final result\n if (isFinalResultLoaded(loadResult)) {\n return resolveLoad(function () {\n return {\n value: loadResult,\n duration: loadDuration\n };\n });\n }\n // Source loaded with \"get\" stage\n resolveLoad(function () {\n return new Promise(function (resolveGet) {\n var getStartTime = Date.now();\n awaitIfAsync(loadResult, function () {\n var getArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n getArgs[_i] = arguments[_i];\n }\n var duration = loadDuration + Date.now() - getStartTime;\n // Source getting failed\n if (!getArgs[0]) {\n return resolveGet({\n error: ensureErrorWithMessage(getArgs[1]),\n duration: duration\n });\n }\n // Source getting succeeded\n resolveGet({\n value: getArgs[1],\n duration: duration\n });\n });\n });\n });\n });\n });\n suppressUnhandledRejectionWarning(sourceLoadPromise);\n return function getComponent() {\n return sourceLoadPromise.then(function (finalizeSource) {\n return finalizeSource();\n });\n };\n}\n/**\n * Loads the given entropy sources. Returns a function that collects the entropy components.\n *\n * The result is returned synchronously in order to allow start getting the components\n * before the sources are loaded completely.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction loadSources(sources, sourceOptions, excludeSources) {\n var includedSources = Object.keys(sources).filter(function (sourceKey) {\n return excludes(excludeSources, sourceKey);\n });\n // Using `mapWithBreaks` allows asynchronous sources to complete between synchronous sources\n // and measure the duration correctly\n var sourceGettersPromise = mapWithBreaks(includedSources, function (sourceKey) {\n return loadSource(sources[sourceKey], sourceOptions);\n });\n suppressUnhandledRejectionWarning(sourceGettersPromise);\n return function getComponents() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var sourceGetters, componentPromises, componentArray, components, index;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, sourceGettersPromise];\n case 1:\n sourceGetters = _a.sent();\n return [4 /*yield*/, mapWithBreaks(sourceGetters, function (sourceGetter) {\n var componentPromise = sourceGetter();\n suppressUnhandledRejectionWarning(componentPromise);\n return componentPromise;\n })];\n case 2:\n componentPromises = _a.sent();\n return [4 /*yield*/, Promise.all(componentPromises)\n // Keeping the component keys order the same as the source keys order\n ];\n\n case 3:\n componentArray = _a.sent();\n components = {};\n for (index = 0; index < includedSources.length; ++index) {\n components[includedSources[index]] = componentArray[index];\n }\n return [2 /*return*/, components];\n }\n });\n });\n };\n}\n/**\n * Modifies an entropy source by transforming its returned value with the given function.\n * Keeps the source properties: sync/async, 1/2 stages.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction transformSource(source, transformValue) {\n var transformLoadResult = function (loadResult) {\n if (isFinalResultLoaded(loadResult)) {\n return transformValue(loadResult);\n }\n return function () {\n var getResult = loadResult();\n if (isPromise(getResult)) {\n return getResult.then(transformValue);\n }\n return transformValue(getResult);\n };\n };\n return function (options) {\n var loadResult = source(options);\n if (isPromise(loadResult)) {\n return loadResult.then(transformLoadResult);\n }\n return transformLoadResult(loadResult);\n };\n}\n\n/*\n * Functions to help with features that vary through browsers\n */\n/**\n * Checks whether the browser is based on Trident (the Internet Explorer engine) without using user-agent.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isTrident() {\n var w = window;\n var n = navigator;\n // The properties are checked to be in IE 10, IE 11 and not to be in other browsers in October 2020\n return countTruthy(['MSCSSMatrix' in w, 'msSetImmediate' in w, 'msIndexedDB' in w, 'msMaxTouchPoints' in n, 'msPointerEnabled' in n]) >= 4;\n}\n/**\n * Checks whether the browser is based on EdgeHTML (the pre-Chromium Edge engine) without using user-agent.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isEdgeHTML() {\n // Based on research in October 2020\n var w = window;\n var n = navigator;\n return countTruthy(['msWriteProfilerMark' in w, 'MSStream' in w, 'msLaunchUri' in n, 'msSaveBlob' in n]) >= 3 && !isTrident();\n}\n/**\n * Checks whether the browser is based on Chromium without using user-agent.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isChromium() {\n // Based on research in October 2020. Tested to detect Chromium 42-86.\n var w = window;\n var n = navigator;\n return countTruthy(['webkitPersistentStorage' in n, 'webkitTemporaryStorage' in n, n.vendor.indexOf('Google') === 0, 'webkitResolveLocalFileSystemURL' in w, 'BatteryManager' in w, 'webkitMediaStream' in w, 'webkitSpeechGrammar' in w]) >= 5;\n}\n/**\n * Checks whether the browser is based on mobile or desktop Safari without using user-agent.\n * All iOS browsers use WebKit (the Safari engine).\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isWebKit() {\n // Based on research in September 2020\n var w = window;\n var n = navigator;\n return countTruthy(['ApplePayError' in w, 'CSSPrimitiveValue' in w, 'Counter' in w, n.vendor.indexOf('Apple') === 0, 'getStorageUpdates' in n, 'WebKitMediaKeys' in w]) >= 4;\n}\n/**\n * Checks whether the WebKit browser is a desktop Safari.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isDesktopSafari() {\n var w = window;\n return countTruthy(['safari' in w, !('DeviceMotionEvent' in w), !('ongestureend' in w), !('standalone' in navigator)]) >= 3;\n}\n/**\n * Checks whether the browser is based on Gecko (Firefox engine) without using user-agent.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isGecko() {\n var _a, _b;\n var w = window;\n // Based on research in September 2020\n return countTruthy(['buildID' in navigator, 'MozAppearance' in ((_b = (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {}), 'onmozfullscreenchange' in w, 'mozInnerScreenX' in w, 'CSSMozDocumentRule' in w, 'CanvasCaptureMediaStream' in w]) >= 4;\n}\n/**\n * Checks whether the browser is based on Chromium version ≥86 without using user-agent.\n * It doesn't check that the browser is based on Chromium, there is a separate function for this.\n */\nfunction isChromium86OrNewer() {\n // Checked in Chrome 85 vs Chrome 86 both on desktop and Android\n var w = window;\n return countTruthy([!('MediaSettingsRange' in w), 'RTCEncodedAudioFrame' in w, '' + w.Intl === '[object Intl]', '' + w.Reflect === '[object Reflect]']) >= 3;\n}\n/**\n * Checks whether the browser is based on WebKit version ≥606 (Safari ≥12) without using user-agent.\n * It doesn't check that the browser is based on WebKit, there is a separate function for this.\n *\n * @link https://en.wikipedia.org/wiki/Safari_version_history#Release_history Safari-WebKit versions map\n */\nfunction isWebKit606OrNewer() {\n // Checked in Safari 9–14\n var w = window;\n return countTruthy(['DOMRectList' in w, 'RTCPeerConnectionIceEvent' in w, 'SVGGeometryElement' in w, 'ontransitioncancel' in w]) >= 3;\n}\n/**\n * Checks whether the device is an iPad.\n * It doesn't check that the engine is WebKit and that the WebKit isn't desktop.\n */\nfunction isIPad() {\n // Checked on:\n // Safari on iPadOS (both mobile and desktop modes): 8, 11, 12, 13, 14\n // Chrome on iPadOS (both mobile and desktop modes): 11, 12, 13, 14\n // Safari on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14\n // Chrome on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14\n // Before iOS 13. Safari tampers the value in \"request desktop site\" mode since iOS 13.\n if (navigator.platform === 'iPad') {\n return true;\n }\n var s = screen;\n var screenRatio = s.width / s.height;\n return countTruthy(['MediaSource' in window, !!Element.prototype.webkitRequestFullscreen,\n // iPhone 4S that runs iOS 9 matches this. But it won't match the criteria above, so it won't be detected as iPad.\n screenRatio > 0.65 && screenRatio < 1.53]) >= 2;\n}\n/**\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction getFullscreenElement() {\n var d = document;\n return d.fullscreenElement || d.msFullscreenElement || d.mozFullScreenElement || d.webkitFullscreenElement || null;\n}\nfunction exitFullscreen() {\n var d = document;\n // `call` is required because the function throws an error without a proper \"this\" context\n return (d.exitFullscreen || d.msExitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen).call(d);\n}\n/**\n * Checks whether the device runs on Android without using user-agent.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction isAndroid() {\n var isItChromium = isChromium();\n var isItGecko = isGecko();\n // Only 2 browser engines are presented on Android.\n // Actually, there is also Android 4.1 browser, but it's not worth detecting it at the moment.\n if (!isItChromium && !isItGecko) {\n return false;\n }\n var w = window;\n // Chrome removes all words \"Android\" from `navigator` when desktop version is requested\n // Firefox keeps \"Android\" in `navigator.appVersion` when desktop version is requested\n return countTruthy(['onorientationchange' in w, 'orientation' in w, isItChromium && !('SharedWorker' in w), isItGecko && /android/i.test(navigator.appVersion)]) >= 2;\n}\n\n/**\n * A deep description: https://fingerprint.com/blog/audio-fingerprinting/\n * Inspired by and based on https://github.com/cozylife/audio-fingerprint\n */\nfunction getAudioFingerprint() {\n var w = window;\n var AudioContext = w.OfflineAudioContext || w.webkitOfflineAudioContext;\n if (!AudioContext) {\n return -2 /* SpecialFingerprint.NotSupported */;\n }\n // In some browsers, audio context always stays suspended unless the context is started in response to a user action\n // (e.g. a click or a tap). It prevents audio fingerprint from being taken at an arbitrary moment of time.\n // Such browsers are old and unpopular, so the audio fingerprinting is just skipped in them.\n // See a similar case explanation at https://stackoverflow.com/questions/46363048/onaudioprocess-not-called-on-ios11#46534088\n if (doesCurrentBrowserSuspendAudioContext()) {\n return -1 /* SpecialFingerprint.KnownToSuspend */;\n }\n\n var hashFromIndex = 4500;\n var hashToIndex = 5000;\n var context = new AudioContext(1, hashToIndex, 44100);\n var oscillator = context.createOscillator();\n oscillator.type = 'triangle';\n oscillator.frequency.value = 10000;\n var compressor = context.createDynamicsCompressor();\n compressor.threshold.value = -50;\n compressor.knee.value = 40;\n compressor.ratio.value = 12;\n compressor.attack.value = 0;\n compressor.release.value = 0.25;\n oscillator.connect(compressor);\n compressor.connect(context.destination);\n oscillator.start(0);\n var _a = startRenderingAudio(context),\n renderPromise = _a[0],\n finishRendering = _a[1];\n var fingerprintPromise = renderPromise.then(function (buffer) {\n return getHash(buffer.getChannelData(0).subarray(hashFromIndex));\n }, function (error) {\n if (error.name === \"timeout\" /* InnerErrorName.Timeout */ || error.name === \"suspended\" /* InnerErrorName.Suspended */) {\n return -3 /* SpecialFingerprint.Timeout */;\n }\n\n throw error;\n });\n // Suppresses the console error message in case when the fingerprint fails before requested\n suppressUnhandledRejectionWarning(fingerprintPromise);\n return function () {\n finishRendering();\n return fingerprintPromise;\n };\n}\n/**\n * Checks if the current browser is known to always suspend audio context\n */\nfunction doesCurrentBrowserSuspendAudioContext() {\n return isWebKit() && !isDesktopSafari() && !isWebKit606OrNewer();\n}\n/**\n * Starts rendering the audio context.\n * When the returned function is called, the render process starts finishing.\n */\nfunction startRenderingAudio(context) {\n var renderTryMaxCount = 3;\n var renderRetryDelay = 500;\n var runningMaxAwaitTime = 500;\n var runningSufficientTime = 5000;\n var finalize = function () {\n return undefined;\n };\n var resultPromise = new Promise(function (resolve, reject) {\n var isFinalized = false;\n var renderTryCount = 0;\n var startedRunningAt = 0;\n context.oncomplete = function (event) {\n return resolve(event.renderedBuffer);\n };\n var startRunningTimeout = function () {\n setTimeout(function () {\n return reject(makeInnerError(\"timeout\" /* InnerErrorName.Timeout */));\n }, Math.min(runningMaxAwaitTime, startedRunningAt + runningSufficientTime - Date.now()));\n };\n var tryRender = function () {\n try {\n var renderingPromise = context.startRendering();\n // `context.startRendering` has two APIs: Promise and callback, we check that it's really a promise just in case\n if (isPromise(renderingPromise)) {\n // Suppresses all unhadled rejections in case of scheduled redundant retries after successful rendering\n suppressUnhandledRejectionWarning(renderingPromise);\n }\n switch (context.state) {\n case 'running':\n startedRunningAt = Date.now();\n if (isFinalized) {\n startRunningTimeout();\n }\n break;\n // Sometimes the audio context doesn't start after calling `startRendering` (in addition to the cases where\n // audio context doesn't start at all). A known case is starting an audio context when the browser tab is in\n // background on iPhone. Retries usually help in this case.\n case 'suspended':\n // The audio context can reject starting until the tab is in foreground. Long fingerprint duration\n // in background isn't a problem, therefore the retry attempts don't count in background. It can lead to\n // a situation when a fingerprint takes very long time and finishes successfully. FYI, the audio context\n // can be suspended when `document.hidden === false` and start running after a retry.\n if (!document.hidden) {\n renderTryCount++;\n }\n if (isFinalized && renderTryCount >= renderTryMaxCount) {\n reject(makeInnerError(\"suspended\" /* InnerErrorName.Suspended */));\n } else {\n setTimeout(tryRender, renderRetryDelay);\n }\n break;\n }\n } catch (error) {\n reject(error);\n }\n };\n tryRender();\n finalize = function () {\n if (!isFinalized) {\n isFinalized = true;\n if (startedRunningAt > 0) {\n startRunningTimeout();\n }\n }\n };\n });\n return [resultPromise, finalize];\n}\nfunction getHash(signal) {\n var hash = 0;\n for (var i = 0; i < signal.length; ++i) {\n hash += Math.abs(signal[i]);\n }\n return hash;\n}\nfunction makeInnerError(name) {\n var error = new Error(name);\n error.name = name;\n return error;\n}\n\n/**\n * Creates and keeps an invisible iframe while the given function runs.\n * The given function is called when the iframe is loaded and has a body.\n * The iframe allows to measure DOM sizes inside itself.\n *\n * Notice: passing an initial HTML code doesn't work in IE.\n *\n * Warning for package users:\n * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.\n */\nfunction withIframe(action, initialHtml, domPollInterval) {\n var _a, _b, _c;\n if (domPollInterval === void 0) {\n domPollInterval = 50;\n }\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var d, iframe;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_d) {\n switch (_d.label) {\n case 0:\n d = document;\n _d.label = 1;\n case 1:\n if (!!d.body) return [3 /*break*/, 3];\n return [4 /*yield*/, wait(domPollInterval)];\n case 2:\n _d.sent();\n return [3 /*break*/, 1];\n case 3:\n iframe = d.createElement('iframe');\n _d.label = 4;\n case 4:\n _d.trys.push([4,, 10, 11]);\n return [4 /*yield*/, new Promise(function (_resolve, _reject) {\n var isComplete = false;\n var resolve = function () {\n isComplete = true;\n _resolve();\n };\n var reject = function (error) {\n isComplete = true;\n _reject(error);\n };\n iframe.onload = resolve;\n iframe.onerror = reject;\n var style = iframe.style;\n style.setProperty('display', 'block', 'important'); // Required for browsers to calculate the layout\n style.position = 'absolute';\n style.top = '0';\n style.left = '0';\n style.visibility = 'hidden';\n if (initialHtml && 'srcdoc' in iframe) {\n iframe.srcdoc = initialHtml;\n } else {\n iframe.src = 'about:blank';\n }\n d.body.appendChild(iframe);\n // WebKit in WeChat doesn't fire the iframe's `onload` for some reason.\n // This code checks for the loading state manually.\n // See https://github.com/fingerprintjs/fingerprintjs/issues/645\n var checkReadyState = function () {\n var _a, _b;\n // The ready state may never become 'complete' in Firefox despite the 'load' event being fired.\n // So an infinite setTimeout loop can happen without this check.\n // See https://github.com/fingerprintjs/fingerprintjs/pull/716#issuecomment-986898796\n if (isComplete) {\n return;\n }\n // Make sure iframe.contentWindow and iframe.contentWindow.document are both loaded\n // The contentWindow.document can miss in JSDOM (https://github.com/jsdom/jsdom).\n if (((_b = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document) === null || _b === void 0 ? void 0 : _b.readyState) === 'complete') {\n resolve();\n } else {\n setTimeout(checkReadyState, 10);\n }\n };\n checkReadyState();\n })];\n case 5:\n _d.sent();\n _d.label = 6;\n case 6:\n if (!!((_b = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document) === null || _b === void 0 ? void 0 : _b.body)) return [3 /*break*/, 8];\n return [4 /*yield*/, wait(domPollInterval)];\n case 7:\n _d.sent();\n return [3 /*break*/, 6];\n case 8:\n return [4 /*yield*/, action(iframe, iframe.contentWindow)];\n case 9:\n return [2 /*return*/, _d.sent()];\n case 10:\n (_c = iframe.parentNode) === null || _c === void 0 ? void 0 : _c.removeChild(iframe);\n return [7 /*endfinally*/];\n case 11:\n return [2 /*return*/];\n }\n });\n });\n}\n/**\n * Creates a DOM element that matches the given selector.\n * Only single element selector are supported (without operators like space, +, >, etc).\n */\nfunction selectorToElement(selector) {\n var _a = parseSimpleCssSelector(selector),\n tag = _a[0],\n attributes = _a[1];\n var element = document.createElement(tag !== null && tag !== void 0 ? tag : 'div');\n for (var _i = 0, _b = Object.keys(attributes); _i < _b.length; _i++) {\n var name_1 = _b[_i];\n var value = attributes[name_1].join(' ');\n // Changing the `style` attribute can cause a CSP error, therefore we change the `style.cssText` property.\n // https://github.com/fingerprintjs/fingerprintjs/issues/733\n if (name_1 === 'style') {\n addStyleString(element.style, value);\n } else {\n element.setAttribute(name_1, value);\n }\n }\n return element;\n}\n/**\n * Adds CSS styles from a string in such a way that doesn't trigger a CSP warning (unsafe-inline or unsafe-eval)\n */\nfunction addStyleString(style, source) {\n // We don't use `style.cssText` because browsers must block it when no `unsafe-eval` CSP is presented: https://csplite.com/csp145/#w3c_note\n // Even though the browsers ignore this standard, we don't use `cssText` just in case.\n for (var _i = 0, _a = source.split(';'); _i < _a.length; _i++) {\n var property = _a[_i];\n var match = /^\\s*([\\w-]+)\\s*:\\s*(.+?)(\\s*!([\\w-]+))?\\s*$/.exec(property);\n if (match) {\n var name_2 = match[1],\n value = match[2],\n priority = match[4];\n style.setProperty(name_2, value, priority || ''); // The last argument can't be undefined in IE11\n }\n }\n}\n\n// We use m or w because these two characters take up the maximum width.\n// And we use a LLi so that the same matching fonts can get separated.\nvar testString = 'mmMwWLliI0O&1';\n// We test using 48px font size, we may use any size. I guess larger the better.\nvar textSize = '48px';\n// A font will be compared against all the three default fonts.\n// And if for any default fonts it doesn't match, then that font is available.\nvar baseFonts = ['monospace', 'sans-serif', 'serif'];\nvar fontList = [\n// This is android-specific font from \"Roboto\" family\n'sans-serif-thin', 'ARNO PRO', 'Agency FB', 'Arabic Typesetting', 'Arial Unicode MS', 'AvantGarde Bk BT', 'BankGothic Md BT', 'Batang', 'Bitstream Vera Sans Mono', 'Calibri', 'Century', 'Century Gothic', 'Clarendon', 'EUROSTILE', 'Franklin Gothic', 'Futura Bk BT', 'Futura Md BT', 'GOTHAM', 'Gill Sans', 'HELV', 'Haettenschweiler', 'Helvetica Neue', 'Humanst521 BT', 'Leelawadee', 'Letter Gothic', 'Levenim MT', 'Lucida Bright', 'Lucida Sans', 'Menlo', 'MS Mincho', 'MS Outlook', 'MS Reference Specialty', 'MS UI Gothic', 'MT Extra', 'MYRIAD PRO', 'Marlett', 'Meiryo UI', 'Microsoft Uighur', 'Minion Pro', 'Monotype Corsiva', 'PMingLiU', 'Pristina', 'SCRIPTINA', 'Segoe UI Light', 'Serifa', 'SimHei', 'Small Fonts', 'Staccato222 BT', 'TRAJAN PRO', 'Univers CE 55 Medium', 'Vrinda', 'ZWAdobeF'];\n// kudos to http://www.lalit.org/lab/javascript-css-font-detect/\nfunction getFonts() {\n // Running the script in an iframe makes it not affect the page look and not be affected by the page CSS. See:\n // https://github.com/fingerprintjs/fingerprintjs/issues/592\n // https://github.com/fingerprintjs/fingerprintjs/issues/628\n return withIframe(function (_, _a) {\n var document = _a.document;\n var holder = document.body;\n holder.style.fontSize = textSize;\n // div to load spans for the default fonts and the fonts to detect\n var spansContainer = document.createElement('div');\n var defaultWidth = {};\n var defaultHeight = {};\n // creates a span where the fonts will be loaded\n var createSpan = function (fontFamily) {\n var span = document.createElement('span');\n var style = span.style;\n style.position = 'absolute';\n style.top = '0';\n style.left = '0';\n style.fontFamily = fontFamily;\n span.textContent = testString;\n spansContainer.appendChild(span);\n return span;\n };\n // creates a span and load the font to detect and a base font for fallback\n var createSpanWithFonts = function (fontToDetect, baseFont) {\n return createSpan(\"'\".concat(fontToDetect, \"',\").concat(baseFont));\n };\n // creates spans for the base fonts and adds them to baseFontsDiv\n var initializeBaseFontsSpans = function () {\n return baseFonts.map(createSpan);\n };\n // creates spans for the fonts to detect and adds them to fontsDiv\n var initializeFontsSpans = function () {\n // Stores {fontName : [spans for that font]}\n var spans = {};\n var _loop_1 = function (font) {\n spans[font] = baseFonts.map(function (baseFont) {\n return createSpanWithFonts(font, baseFont);\n });\n };\n for (var _i = 0, fontList_1 = fontList; _i < fontList_1.length; _i++) {\n var font = fontList_1[_i];\n _loop_1(font);\n }\n return spans;\n };\n // checks if a font is available\n var isFontAvailable = function (fontSpans) {\n return baseFonts.some(function (baseFont, baseFontIndex) {\n return fontSpans[baseFontIndex].offsetWidth !== defaultWidth[baseFont] || fontSpans[baseFontIndex].offsetHeight !== defaultHeight[baseFont];\n });\n };\n // create spans for base fonts\n var baseFontsSpans = initializeBaseFontsSpans();\n // create spans for fonts to detect\n var fontsSpans = initializeFontsSpans();\n // add all the spans to the DOM\n holder.appendChild(spansContainer);\n // get the default width for the three base fonts\n for (var index = 0; index < baseFonts.length; index++) {\n defaultWidth[baseFonts[index]] = baseFontsSpans[index].offsetWidth; // width for the default font\n defaultHeight[baseFonts[index]] = baseFontsSpans[index].offsetHeight; // height for the default font\n }\n // check available fonts\n return fontList.filter(function (font) {\n return isFontAvailable(fontsSpans[font]);\n });\n });\n}\nfunction getPlugins() {\n var rawPlugins = navigator.plugins;\n if (!rawPlugins) {\n return undefined;\n }\n var plugins = [];\n // Safari 10 doesn't support iterating navigator.plugins with for...of\n for (var i = 0; i < rawPlugins.length; ++i) {\n var plugin = rawPlugins[i];\n if (!plugin) {\n continue;\n }\n var mimeTypes = [];\n for (var j = 0; j < plugin.length; ++j) {\n var mimeType = plugin[j];\n mimeTypes.push({\n type: mimeType.type,\n suffixes: mimeType.suffixes\n });\n }\n plugins.push({\n name: plugin.name,\n description: plugin.description,\n mimeTypes: mimeTypes\n });\n }\n return plugins;\n}\n\n// https://www.browserleaks.com/canvas#how-does-it-work\nfunction getCanvasFingerprint() {\n var winding = false;\n var geometry;\n var text;\n var _a = makeCanvasContext(),\n canvas = _a[0],\n context = _a[1];\n if (!isSupported(canvas, context)) {\n geometry = text = ''; // The value will be 'unsupported' in v3.4\n } else {\n winding = doesSupportWinding(context);\n renderTextImage(canvas, context);\n var textImage1 = canvasToString(canvas);\n var textImage2 = canvasToString(canvas); // It's slightly faster to double-encode the text image\n // Some browsers add a noise to the canvas: https://github.com/fingerprintjs/fingerprintjs/issues/791\n // The canvas is excluded from the fingerprint in this case\n if (textImage1 !== textImage2) {\n geometry = text = 'unstable';\n } else {\n text = textImage1;\n // Text is unstable:\n // https://github.com/fingerprintjs/fingerprintjs/issues/583\n // https://github.com/fingerprintjs/fingerprintjs/issues/103\n // Therefore it's extracted into a separate image.\n renderGeometryImage(canvas, context);\n geometry = canvasToString(canvas);\n }\n }\n return {\n winding: winding,\n geometry: geometry,\n text: text\n };\n}\nfunction makeCanvasContext() {\n var canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n return [canvas, canvas.getContext('2d')];\n}\nfunction isSupported(canvas, context) {\n return !!(context && canvas.toDataURL);\n}\nfunction doesSupportWinding(context) {\n // https://web.archive.org/web/20170825024655/http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/\n // https://github.com/Modernizr/Modernizr/blob/master/feature-detects/canvas/winding.js\n context.rect(0, 0, 10, 10);\n context.rect(2, 2, 6, 6);\n return !context.isPointInPath(5, 5, 'evenodd');\n}\nfunction renderTextImage(canvas, context) {\n // Resizing the canvas cleans it\n canvas.width = 240;\n canvas.height = 60;\n context.textBaseline = 'alphabetic';\n context.fillStyle = '#f60';\n context.fillRect(100, 1, 62, 20);\n context.fillStyle = '#069';\n // It's important to use explicit built-in fonts in order to exclude the affect of font preferences\n // (there is a separate entropy source for them).\n context.font = '11pt \"Times New Roman\"';\n // The choice of emojis has a gigantic impact on rendering performance (especially in FF).\n // Some newer emojis cause it to slow down 50-200 times.\n // There must be no text to the right of the emoji, see https://github.com/fingerprintjs/fingerprintjs/issues/574\n // A bare emoji shouldn't be used because the canvas will change depending on the script encoding:\n // https://github.com/fingerprintjs/fingerprintjs/issues/66\n // Escape sequence shouldn't be used too because Terser will turn it into a bare unicode.\n var printedText = \"Cwm fjordbank gly \".concat(String.fromCharCode(55357, 56835) /* 😃 */);\n context.fillText(printedText, 2, 15);\n context.fillStyle = 'rgba(102, 204, 0, 0.2)';\n context.font = '18pt Arial';\n context.fillText(printedText, 4, 45);\n}\nfunction renderGeometryImage(canvas, context) {\n // Resizing the canvas cleans it\n canvas.width = 122;\n canvas.height = 110;\n // Canvas blending\n // https://web.archive.org/web/20170826194121/http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/\n // http://jsfiddle.net/NDYV8/16/\n context.globalCompositeOperation = 'multiply';\n for (var _i = 0, _a = [['#f2f', 40, 40], ['#2ff', 80, 40], ['#ff2', 60, 80]]; _i < _a.length; _i++) {\n var _b = _a[_i],\n color = _b[0],\n x = _b[1],\n y = _b[2];\n context.fillStyle = color;\n context.beginPath();\n context.arc(x, y, 40, 0, Math.PI * 2, true);\n context.closePath();\n context.fill();\n }\n // Canvas winding\n // https://web.archive.org/web/20130913061632/http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/\n // http://jsfiddle.net/NDYV8/19/\n context.fillStyle = '#f9c';\n context.arc(60, 60, 60, 0, Math.PI * 2, true);\n context.arc(60, 60, 20, 0, Math.PI * 2, true);\n context.fill('evenodd');\n}\nfunction canvasToString(canvas) {\n return canvas.toDataURL();\n}\n\n/**\n * This is a crude and primitive touch screen detection. It's not possible to currently reliably detect the availability\n * of a touch screen with a JS, without actually subscribing to a touch event.\n *\n * @see http://www.stucox.com/blog/you-cant-detect-a-touchscreen/\n * @see https://github.com/Modernizr/Modernizr/issues/548\n */\nfunction getTouchSupport() {\n var n = navigator;\n var maxTouchPoints = 0;\n var touchEvent;\n if (n.maxTouchPoints !== undefined) {\n maxTouchPoints = toInt(n.maxTouchPoints);\n } else if (n.msMaxTouchPoints !== undefined) {\n maxTouchPoints = n.msMaxTouchPoints;\n }\n try {\n document.createEvent('TouchEvent');\n touchEvent = true;\n } catch (_a) {\n touchEvent = false;\n }\n var touchStart = ('ontouchstart' in window);\n return {\n maxTouchPoints: maxTouchPoints,\n touchEvent: touchEvent,\n touchStart: touchStart\n };\n}\nfunction getOsCpu() {\n return navigator.oscpu;\n}\nfunction getLanguages() {\n var n = navigator;\n var result = [];\n var language = n.language || n.userLanguage || n.browserLanguage || n.systemLanguage;\n if (language !== undefined) {\n result.push([language]);\n }\n if (Array.isArray(n.languages)) {\n // Starting from Chromium 86, there is only a single value in `navigator.language` in Incognito mode:\n // the value of `navigator.language`. Therefore the value is ignored in this browser.\n if (!(isChromium() && isChromium86OrNewer())) {\n result.push(n.languages);\n }\n } else if (typeof n.languages === 'string') {\n var languages = n.languages;\n if (languages) {\n result.push(languages.split(','));\n }\n }\n return result;\n}\nfunction getColorDepth() {\n return window.screen.colorDepth;\n}\nfunction getDeviceMemory() {\n // `navigator.deviceMemory` is a string containing a number in some unidentified cases\n return replaceNaN(toFloat(navigator.deviceMemory), undefined);\n}\nfunction getScreenResolution() {\n var s = screen;\n // Some browsers return screen resolution as strings, e.g. \"1200\", instead of a number, e.g. 1200.\n // I suspect it's done by certain plugins that randomize browser properties to prevent fingerprinting.\n // Some browsers even return screen resolution as not numbers.\n var parseDimension = function (value) {\n return replaceNaN(toInt(value), null);\n };\n var dimensions = [parseDimension(s.width), parseDimension(s.height)];\n dimensions.sort().reverse();\n return dimensions;\n}\nvar screenFrameCheckInterval = 2500;\nvar roundingPrecision = 10;\n// The type is readonly to protect from unwanted mutations\nvar screenFrameBackup;\nvar screenFrameSizeTimeoutId;\n/**\n * Starts watching the screen frame size. When a non-zero size appears, the size is saved and the watch is stopped.\n * Later, when `getScreenFrame` runs, it will return the saved non-zero size if the current size is null.\n *\n * This trick is required to mitigate the fact that the screen frame turns null in some cases.\n * See more on this at https://github.com/fingerprintjs/fingerprintjs/issues/568\n */\nfunction watchScreenFrame() {\n if (screenFrameSizeTimeoutId !== undefined) {\n return;\n }\n var checkScreenFrame = function () {\n var frameSize = getCurrentScreenFrame();\n if (isFrameSizeNull(frameSize)) {\n screenFrameSizeTimeoutId = setTimeout(checkScreenFrame, screenFrameCheckInterval);\n } else {\n screenFrameBackup = frameSize;\n screenFrameSizeTimeoutId = undefined;\n }\n };\n checkScreenFrame();\n}\nfunction getScreenFrame() {\n var _this = this;\n watchScreenFrame();\n return function () {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(_this, void 0, void 0, function () {\n var frameSize;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n frameSize = getCurrentScreenFrame();\n if (!isFrameSizeNull(frameSize)) return [3 /*break*/, 2];\n if (screenFrameBackup) {\n return [2 /*return*/, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spreadArray\"])([], screenFrameBackup, true)];\n }\n if (!getFullscreenElement()) return [3 /*break*/, 2];\n // Some browsers set the screen frame to zero when programmatic fullscreen is on.\n // There is a chance of getting a non-zero frame after exiting the fullscreen.\n // See more on this at https://github.com/fingerprintjs/fingerprintjs/issues/568\n return [4 /*yield*/, exitFullscreen()];\n case 1:\n // Some browsers set the screen frame to zero when programmatic fullscreen is on.\n // There is a chance of getting a non-zero frame after exiting the fullscreen.\n // See more on this at https://github.com/fingerprintjs/fingerprintjs/issues/568\n _a.sent();\n frameSize = getCurrentScreenFrame();\n _a.label = 2;\n case 2:\n if (!isFrameSizeNull(frameSize)) {\n screenFrameBackup = frameSize;\n }\n return [2 /*return*/, frameSize];\n }\n });\n });\n };\n}\n/**\n * Sometimes the available screen resolution changes a bit, e.g. 1900x1440 → 1900x1439. A possible reason: macOS Dock\n * shrinks to fit more icons when there is too little space. The rounding is used to mitigate the difference.\n */\nfunction getRoundedScreenFrame() {\n var _this = this;\n var screenFrameGetter = getScreenFrame();\n return function () {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(_this, void 0, void 0, function () {\n var frameSize, processSize;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, screenFrameGetter()];\n case 1:\n frameSize = _a.sent();\n processSize = function (sideSize) {\n return sideSize === null ? null : round(sideSize, roundingPrecision);\n };\n // It might look like I don't know about `for` and `map`.\n // In fact, such code is used to avoid TypeScript issues without using `as`.\n return [2 /*return*/, [processSize(frameSize[0]), processSize(frameSize[1]), processSize(frameSize[2]), processSize(frameSize[3])]];\n }\n });\n });\n };\n}\nfunction getCurrentScreenFrame() {\n var s = screen;\n // Some browsers return screen resolution as strings, e.g. \"1200\", instead of a number, e.g. 1200.\n // I suspect it's done by certain plugins that randomize browser properties to prevent fingerprinting.\n //\n // Some browsers (IE, Edge ≤18) don't provide `screen.availLeft` and `screen.availTop`. The property values are\n // replaced with 0 in such cases to not lose the entropy from `screen.availWidth` and `screen.availHeight`.\n return [replaceNaN(toFloat(s.availTop), null), replaceNaN(toFloat(s.width) - toFloat(s.availWidth) - replaceNaN(toFloat(s.availLeft), 0), null), replaceNaN(toFloat(s.height) - toFloat(s.availHeight) - replaceNaN(toFloat(s.availTop), 0), null), replaceNaN(toFloat(s.availLeft), null)];\n}\nfunction isFrameSizeNull(frameSize) {\n for (var i = 0; i < 4; ++i) {\n if (frameSize[i]) {\n return false;\n }\n }\n return true;\n}\nfunction getHardwareConcurrency() {\n // sometimes hardware concurrency is a string\n return replaceNaN(toInt(navigator.hardwareConcurrency), undefined);\n}\nfunction getTimezone() {\n var _a;\n var DateTimeFormat = (_a = window.Intl) === null || _a === void 0 ? void 0 : _a.DateTimeFormat;\n if (DateTimeFormat) {\n var timezone = new DateTimeFormat().resolvedOptions().timeZone;\n if (timezone) {\n return timezone;\n }\n }\n // For browsers that don't support timezone names\n // The minus is intentional because the JS offset is opposite to the real offset\n var offset = -getTimezoneOffset();\n return \"UTC\".concat(offset >= 0 ? '+' : '').concat(Math.abs(offset));\n}\nfunction getTimezoneOffset() {\n var currentYear = new Date().getFullYear();\n // The timezone offset may change over time due to daylight saving time (DST) shifts.\n // The non-DST timezone offset is used as the result timezone offset.\n // Since the DST season differs in the northern and the southern hemispheres,\n // both January and July timezones offsets are considered.\n return Math.max(\n // `getTimezoneOffset` returns a number as a string in some unidentified cases\n toFloat(new Date(currentYear, 0, 1).getTimezoneOffset()), toFloat(new Date(currentYear, 6, 1).getTimezoneOffset()));\n}\nfunction getSessionStorage() {\n try {\n return !!window.sessionStorage;\n } catch (error) {\n /* SecurityError when referencing it means it exists */\n return true;\n }\n}\n\n// https://bugzilla.mozilla.org/show_bug.cgi?id=781447\nfunction getLocalStorage() {\n try {\n return !!window.localStorage;\n } catch (e) {\n /* SecurityError when referencing it means it exists */\n return true;\n }\n}\nfunction getIndexedDB() {\n // IE and Edge don't allow accessing indexedDB in private mode, therefore IE and Edge will have different\n // visitor identifier in normal and private modes.\n if (isTrident() || isEdgeHTML()) {\n return undefined;\n }\n try {\n return !!window.indexedDB;\n } catch (e) {\n /* SecurityError when referencing it means it exists */\n return true;\n }\n}\nfunction getOpenDatabase() {\n return !!window.openDatabase;\n}\nfunction getCpuClass() {\n return navigator.cpuClass;\n}\nfunction getPlatform() {\n // Android Chrome 86 and 87 and Android Firefox 80 and 84 don't mock the platform value when desktop mode is requested\n var platform = navigator.platform;\n // iOS mocks the platform value when desktop version is requested: https://github.com/fingerprintjs/fingerprintjs/issues/514\n // iPad uses desktop mode by default since iOS 13\n // The value is 'MacIntel' on M1 Macs\n // The value is 'iPhone' on iPod Touch\n if (platform === 'MacIntel') {\n if (isWebKit() && !isDesktopSafari()) {\n return isIPad() ? 'iPad' : 'iPhone';\n }\n }\n return platform;\n}\nfunction getVendor() {\n return navigator.vendor || '';\n}\n\n/**\n * Checks for browser-specific (not engine specific) global variables to tell browsers with the same engine apart.\n * Only somewhat popular browsers are considered.\n */\nfunction getVendorFlavors() {\n var flavors = [];\n for (var _i = 0, _a = [\n // Blink and some browsers on iOS\n 'chrome',\n // Safari on macOS\n 'safari',\n // Chrome on iOS (checked in 85 on 13 and 87 on 14)\n '__crWeb', '__gCrWeb',\n // Yandex Browser on iOS, macOS and Android (checked in 21.2 on iOS 14, macOS and Android)\n 'yandex',\n // Yandex Browser on iOS (checked in 21.2 on 14)\n '__yb', '__ybro',\n // Firefox on iOS (checked in 32 on 14)\n '__firefox__',\n // Edge on iOS (checked in 46 on 14)\n '__edgeTrackingPreventionStatistics', 'webkit',\n // Opera Touch on iOS (checked in 2.6 on 14)\n 'oprt',\n // Samsung Internet on Android (checked in 11.1)\n 'samsungAr',\n // UC Browser on Android (checked in 12.10 and 13.0)\n 'ucweb', 'UCShellJava',\n // Puffin on Android (checked in 9.0)\n 'puffinDevice'\n // UC on iOS and Opera on Android have no specific global variables\n // Edge for Android isn't checked\n ]; _i < _a.length; _i++) {\n var key = _a[_i];\n var value = window[key];\n if (value && typeof value === 'object') {\n flavors.push(key);\n }\n }\n return flavors.sort();\n}\n\n/**\n * navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking\n * cookies via the Advanced Privacy Settings in IE9, it always returns true. And there have been issues in the past with\n * site-specific exceptions. Don't rely on it.\n *\n * @see https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cookies.js Taken from here\n */\nfunction areCookiesEnabled() {\n var d = document;\n // Taken from here: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cookies.js\n // navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking\n // cookies via the Advanced Privacy Settings in IE9, it always returns true. And there have been issues in the past\n // with site-specific exceptions. Don't rely on it.\n // try..catch because some in situations `document.cookie` is exposed but throws a\n // SecurityError if you try to access it; e.g. documents created from data URIs\n // or in sandboxed iframes (depending on flags/context)\n try {\n // Create cookie\n d.cookie = 'cookietest=1; SameSite=Strict;';\n var result = d.cookie.indexOf('cookietest=') !== -1;\n // Delete cookie\n d.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT';\n return result;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Only single element selector are supported (no operators like space, +, >, etc).\n * `embed` and `position: fixed;` will be considered as blocked anyway because it always has no offsetParent.\n * Avoid `iframe` and anything with `[src=]` because they produce excess HTTP requests.\n *\n * The \"inappropriate\" selectors are obfuscated. See https://github.com/fingerprintjs/fingerprintjs/issues/734.\n * A function is used instead of a plain object to help tree-shaking.\n *\n * The function code is generated automatically. See docs/content_blockers.md to learn how to make the list.\n */\nfunction getFilters() {\n var fromB64 = atob; // Just for better minification\n return {\n abpIndo: ['#Iklan-Melayang', '#Kolom-Iklan-728', '#SidebarIklan-wrapper', '[title=\"ALIENBOLA\" i]', fromB64('I0JveC1CYW5uZXItYWRz')],\n abpvn: ['.quangcao', '#mobileCatfish', fromB64('LmNsb3NlLWFkcw=='), '[id^=\"bn_bottom_fixed_\"]', '#pmadv'],\n adBlockFinland: ['.mainostila', fromB64('LnNwb25zb3JpdA=='), '.ylamainos', fromB64('YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd'), fromB64('YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd')],\n adBlockPersian: ['#navbar_notice_50', '.kadr', 'TABLE[width=\"140px\"]', '#divAgahi', fromB64('YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd')],\n adBlockWarningRemoval: ['#adblock-honeypot', '.adblocker-root', '.wp_adblock_detect', fromB64('LmhlYWRlci1ibG9ja2VkLWFk'), fromB64('I2FkX2Jsb2NrZXI=')],\n adGuardAnnoyances: ['.hs-sosyal', '#cookieconsentdiv', 'div[class^=\"app_gdpr\"]', '.as-oil', '[data-cypress=\"soft-push-notification-modal\"]'],\n adGuardBase: ['.BetterJsPopOverlay', fromB64('I2FkXzMwMFgyNTA='), fromB64('I2Jhbm5lcmZsb2F0MjI='), fromB64('I2NhbXBhaWduLWJhbm5lcg=='), fromB64('I0FkLUNvbnRlbnQ=')],\n adGuardChinese: [fromB64('LlppX2FkX2FfSA=='), fromB64('YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd'), '#widget-quan', fromB64('YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd'), fromB64('YVtocmVmKj0iLjE5NTZobC5jb20vIl0=')],\n adGuardFrench: ['#pavePub', fromB64('LmFkLWRlc2t0b3AtcmVjdGFuZ2xl'), '.mobile_adhesion', '.widgetadv', fromB64('LmFkc19iYW4=')],\n adGuardGerman: ['aside[data-portal-id=\"leaderboard\"]'],\n adGuardJapanese: ['#kauli_yad_1', fromB64('YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0='), fromB64('Ll9wb3BJbl9pbmZpbml0ZV9hZA=='), fromB64('LmFkZ29vZ2xl'), fromB64('Ll9faXNib29zdFJldHVybkFk')],\n adGuardMobile: [fromB64('YW1wLWF1dG8tYWRz'), fromB64('LmFtcF9hZA=='), 'amp-embed[type=\"24smi\"]', '#mgid_iframe1', fromB64('I2FkX2ludmlld19hcmVh')],\n adGuardRussian: [fromB64('YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0='), fromB64('LnJlY2xhbWE='), 'div[id^=\"smi2adblock\"]', fromB64('ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd'), '#psyduckpockeball'],\n adGuardSocial: [fromB64('YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0='), fromB64('YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0='), '.etsy-tweet', '#inlineShare', '.popup-social'],\n adGuardSpanishPortuguese: ['#barraPublicidade', '#Publicidade', '#publiEspecial', '#queTooltip', '.cnt-publi'],\n adGuardTrackingProtection: ['#qoo-counter', fromB64('YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=='), fromB64('YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0='), fromB64('YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=='), '#top100counter'],\n adGuardTurkish: ['#backkapat', fromB64('I3Jla2xhbWk='), fromB64('YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0='), fromB64('YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd'), fromB64('YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==')],\n bulgarian: [fromB64('dGQjZnJlZW5ldF90YWJsZV9hZHM='), '#ea_intext_div', '.lapni-pop-over', '#xenium_hot_offers'],\n easyList: ['.yb-floorad', fromB64('LndpZGdldF9wb19hZHNfd2lkZ2V0'), fromB64('LnRyYWZmaWNqdW5reS1hZA=='), '.textad_headline', fromB64('LnNwb25zb3JlZC10ZXh0LWxpbmtz')],\n easyListChina: [fromB64('LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=='), fromB64('LmZyb250cGFnZUFkdk0='), '#taotaole', '#aafoot.top_box', '.cfa_popup'],\n easyListCookie: ['.ezmob-footer', '.cc-CookieWarning', '[data-cookie-number]', fromB64('LmF3LWNvb2tpZS1iYW5uZXI='), '.sygnal24-gdpr-modal-wrap'],\n easyListCzechSlovak: ['#onlajny-stickers', fromB64('I3Jla2xhbW5pLWJveA=='), fromB64('LnJla2xhbWEtbWVnYWJvYXJk'), '.sklik', fromB64('W2lkXj0ic2tsaWtSZWtsYW1hIl0=')],\n easyListDutch: [fromB64('I2FkdmVydGVudGll'), fromB64('I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=='), '.adstekst', fromB64('YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0='), '#semilo-lrectangle'],\n easyListGermany: ['#SSpotIMPopSlider', fromB64('LnNwb25zb3JsaW5rZ3J1ZW4='), fromB64('I3dlcmJ1bmdza3k='), fromB64('I3Jla2xhbWUtcmVjaHRzLW1pdHRl'), fromB64('YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=')],\n easyListItaly: [fromB64('LmJveF9hZHZfYW5udW5jaQ=='), '.sb-box-pubbliredazionale', fromB64('YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd'), fromB64('YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd'), fromB64('YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==')],\n easyListLithuania: [fromB64('LnJla2xhbW9zX3RhcnBhcw=='), fromB64('LnJla2xhbW9zX251b3JvZG9z'), fromB64('aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd'), fromB64('aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd'), fromB64('aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd')],\n estonian: [fromB64('QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==')],\n fanboyAnnoyances: ['#ac-lre-player', '.navigate-to-top', '#subscribe_popup', '.newsletter_holder', '#back-top'],\n fanboyAntiFacebook: ['.util-bar-module-firefly-visible'],\n fanboyEnhancedTrackers: ['.open.pushModal', '#issuem-leaky-paywall-articles-zero-remaining-nag', '#sovrn_container', 'div[class$=\"-hide\"][zoompage-fontsize][style=\"display: block;\"]', '.BlockNag__Card'],\n fanboySocial: ['#FollowUs', '#meteored_share', '#social_follow', '.article-sharer', '.community__social-desc'],\n frellwitSwedish: [fromB64('YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=='), fromB64('YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=='), 'article.category-samarbete', fromB64('ZGl2LmhvbGlkQWRz'), 'ul.adsmodern'],\n greekAdBlock: [fromB64('QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd'), fromB64('QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=='), fromB64('QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd'), 'DIV.agores300', 'TABLE.advright'],\n hungarian: ['#cemp_doboz', '.optimonk-iframe-container', fromB64('LmFkX19tYWlu'), fromB64('W2NsYXNzKj0iR29vZ2xlQWRzIl0='), '#hirdetesek_box'],\n iDontCareAboutCookies: ['.alert-info[data-block-track*=\"CookieNotice\"]', '.ModuleTemplateCookieIndicator', '.o--cookies--container', '#cookies-policy-sticky', '#stickyCookieBar'],\n icelandicAbp: [fromB64('QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==')],\n latvian: [fromB64('YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0O' + 'iA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0='), fromB64('YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6I' + 'DMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==')],\n listKr: [fromB64('YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0='), fromB64('I2xpdmVyZUFkV3JhcHBlcg=='), fromB64('YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=='), fromB64('aW5zLmZhc3R2aWV3LWFk'), '.revenue_unit_item.dable'],\n listeAr: [fromB64('LmdlbWluaUxCMUFk'), '.right-and-left-sponsers', fromB64('YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=='), fromB64('YVtocmVmKj0iYm9vcmFxLm9yZyJd'), fromB64('YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd')],\n listeFr: [fromB64('YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=='), fromB64('I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=='), fromB64('YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0='), '.site-pub-interstitiel', 'div[id^=\"crt-\"][data-criteo-id]'],\n officialPolish: ['#ceneo-placeholder-ceneo-12', fromB64('W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd'), fromB64('YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=='), fromB64('YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=='), fromB64('ZGl2I3NrYXBpZWNfYWQ=')],\n ro: [fromB64('YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd'), fromB64('YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd'), fromB64('YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0='), fromB64('YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd'), 'a[href^=\"/url/\"]'],\n ruAd: [fromB64('YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd'), fromB64('YVtocmVmKj0iLy91dGltZy5ydS8iXQ=='), fromB64('YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0='), '#pgeldiz', '.yandex-rtb-block'],\n thaiAds: ['a[href*=macau-uta-popup]', fromB64('I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=='), fromB64('LmFkczMwMHM='), '.bumq', '.img-kosana'],\n webAnnoyancesUltralist: ['#mod-social-share-2', '#social-tools', fromB64('LmN0cGwtZnVsbGJhbm5lcg=='), '.zergnet-recommend', '.yt.btn-link.btn-md.btn']\n };\n}\n/**\n * The order of the returned array means nothing (it's always sorted alphabetically).\n *\n * Notice that the source is slightly unstable.\n * Safari provides a 2-taps way to disable all content blockers on a page temporarily.\n * Also content blockers can be disabled permanently for a domain, but it requires 4 taps.\n * So empty array shouldn't be treated as \"no blockers\", it should be treated as \"no signal\".\n * If you are a website owner, don't make your visitors want to disable content blockers.\n */\nfunction getDomBlockers(_a) {\n var _b = _a === void 0 ? {} : _a,\n debug = _b.debug;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var filters, filterNames, allSelectors, blockedSelectors, activeBlockers;\n var _c;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_d) {\n switch (_d.label) {\n case 0:\n if (!isApplicable()) {\n return [2 /*return*/, undefined];\n }\n filters = getFilters();\n filterNames = Object.keys(filters);\n allSelectors = (_c = []).concat.apply(_c, filterNames.map(function (filterName) {\n return filters[filterName];\n }));\n return [4 /*yield*/, getBlockedSelectors(allSelectors)];\n case 1:\n blockedSelectors = _d.sent();\n if (debug) {\n printDebug(filters, blockedSelectors);\n }\n activeBlockers = filterNames.filter(function (filterName) {\n var selectors = filters[filterName];\n var blockedCount = countTruthy(selectors.map(function (selector) {\n return blockedSelectors[selector];\n }));\n return blockedCount > selectors.length * 0.6;\n });\n activeBlockers.sort();\n return [2 /*return*/, activeBlockers];\n }\n });\n });\n}\nfunction isApplicable() {\n // Safari (desktop and mobile) and all Android browsers keep content blockers in both regular and private mode\n return isWebKit() || isAndroid();\n}\nfunction getBlockedSelectors(selectors) {\n var _a;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var d, root, elements, blockedSelectors, i, element, holder, i;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_b) {\n switch (_b.label) {\n case 0:\n d = document;\n root = d.createElement('div');\n elements = new Array(selectors.length);\n blockedSelectors = {} // Set() isn't used just in case somebody need older browser support\n ;\n\n forceShow(root);\n // First create all elements that can be blocked. If the DOM steps below are done in a single cycle,\n // browser will alternate tree modification and layout reading, that is very slow.\n for (i = 0; i < selectors.length; ++i) {\n element = selectorToElement(selectors[i]);\n if (element.tagName === 'DIALOG') {\n element.show();\n }\n holder = d.createElement('div') // Protects from unwanted effects of `+` and `~` selectors of filters\n ;\n\n forceShow(holder);\n holder.appendChild(element);\n root.appendChild(holder);\n elements[i] = element;\n }\n _b.label = 1;\n case 1:\n if (!!d.body) return [3 /*break*/, 3];\n return [4 /*yield*/, wait(50)];\n case 2:\n _b.sent();\n return [3 /*break*/, 1];\n case 3:\n d.body.appendChild(root);\n try {\n // Then check which of the elements are blocked\n for (i = 0; i < selectors.length; ++i) {\n if (!elements[i].offsetParent) {\n blockedSelectors[selectors[i]] = true;\n }\n }\n } finally {\n // Then remove the elements\n (_a = root.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(root);\n }\n return [2 /*return*/, blockedSelectors];\n }\n });\n });\n}\nfunction forceShow(element) {\n element.style.setProperty('display', 'block', 'important');\n}\nfunction printDebug(filters, blockedSelectors) {\n var message = 'DOM blockers debug:\\n```';\n for (var _i = 0, _a = Object.keys(filters); _i < _a.length; _i++) {\n var filterName = _a[_i];\n message += \"\\n\".concat(filterName, \":\");\n for (var _b = 0, _c = filters[filterName]; _b < _c.length; _b++) {\n var selector = _c[_b];\n message += \"\\n \".concat(blockedSelectors[selector] ? '🚫' : '➡️', \" \").concat(selector);\n }\n }\n // console.log is ok here because it's under a debug clause\n // eslint-disable-next-line no-console\n console.log(\"\".concat(message, \"\\n```\"));\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/color-gamut\n */\nfunction getColorGamut() {\n // rec2020 includes p3 and p3 includes srgb\n for (var _i = 0, _a = ['rec2020', 'p3', 'srgb']; _i < _a.length; _i++) {\n var gamut = _a[_i];\n if (matchMedia(\"(color-gamut: \".concat(gamut, \")\")).matches) {\n return gamut;\n }\n }\n return undefined;\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/inverted-colors\n */\nfunction areColorsInverted() {\n if (doesMatch$4('inverted')) {\n return true;\n }\n if (doesMatch$4('none')) {\n return false;\n }\n return undefined;\n}\nfunction doesMatch$4(value) {\n return matchMedia(\"(inverted-colors: \".concat(value, \")\")).matches;\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/forced-colors\n */\nfunction areColorsForced() {\n if (doesMatch$3('active')) {\n return true;\n }\n if (doesMatch$3('none')) {\n return false;\n }\n return undefined;\n}\nfunction doesMatch$3(value) {\n return matchMedia(\"(forced-colors: \".concat(value, \")\")).matches;\n}\nvar maxValueToCheck = 100;\n/**\n * If the display is monochrome (e.g. black&white), the value will be ≥0 and will mean the number of bits per pixel.\n * If the display is not monochrome, the returned value will be 0.\n * If the browser doesn't support this feature, the returned value will be undefined.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/monochrome\n */\nfunction getMonochromeDepth() {\n if (!matchMedia('(min-monochrome: 0)').matches) {\n // The media feature isn't supported by the browser\n return undefined;\n }\n // A variation of binary search algorithm can be used here.\n // But since expected values are very small (≤10), there is no sense in adding the complexity.\n for (var i = 0; i <= maxValueToCheck; ++i) {\n if (matchMedia(\"(max-monochrome: \".concat(i, \")\")).matches) {\n return i;\n }\n }\n throw new Error('Too high value');\n}\n\n/**\n * @see https://www.w3.org/TR/mediaqueries-5/#prefers-contrast\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-contrast\n */\nfunction getContrastPreference() {\n if (doesMatch$2('no-preference')) {\n return 0 /* ContrastPreference.None */;\n }\n // The sources contradict on the keywords. Probably 'high' and 'low' will never be implemented.\n // Need to check it when all browsers implement the feature.\n if (doesMatch$2('high') || doesMatch$2('more')) {\n return 1 /* ContrastPreference.More */;\n }\n\n if (doesMatch$2('low') || doesMatch$2('less')) {\n return -1 /* ContrastPreference.Less */;\n }\n\n if (doesMatch$2('forced')) {\n return 10 /* ContrastPreference.ForcedColors */;\n }\n\n return undefined;\n}\nfunction doesMatch$2(value) {\n return matchMedia(\"(prefers-contrast: \".concat(value, \")\")).matches;\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion\n */\nfunction isMotionReduced() {\n if (doesMatch$1('reduce')) {\n return true;\n }\n if (doesMatch$1('no-preference')) {\n return false;\n }\n return undefined;\n}\nfunction doesMatch$1(value) {\n return matchMedia(\"(prefers-reduced-motion: \".concat(value, \")\")).matches;\n}\n\n/**\n * @see https://www.w3.org/TR/mediaqueries-5/#dynamic-range\n */\nfunction isHDR() {\n if (doesMatch('high')) {\n return true;\n }\n if (doesMatch('standard')) {\n return false;\n }\n return undefined;\n}\nfunction doesMatch(value) {\n return matchMedia(\"(dynamic-range: \".concat(value, \")\")).matches;\n}\nvar M = Math; // To reduce the minified code size\nvar fallbackFn = function () {\n return 0;\n};\n/**\n * @see https://gitlab.torproject.org/legacy/trac/-/issues/13018\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=531915\n */\nfunction getMathFingerprint() {\n // Native operations\n var acos = M.acos || fallbackFn;\n var acosh = M.acosh || fallbackFn;\n var asin = M.asin || fallbackFn;\n var asinh = M.asinh || fallbackFn;\n var atanh = M.atanh || fallbackFn;\n var atan = M.atan || fallbackFn;\n var sin = M.sin || fallbackFn;\n var sinh = M.sinh || fallbackFn;\n var cos = M.cos || fallbackFn;\n var cosh = M.cosh || fallbackFn;\n var tan = M.tan || fallbackFn;\n var tanh = M.tanh || fallbackFn;\n var exp = M.exp || fallbackFn;\n var expm1 = M.expm1 || fallbackFn;\n var log1p = M.log1p || fallbackFn;\n // Operation polyfills\n var powPI = function (value) {\n return M.pow(M.PI, value);\n };\n var acoshPf = function (value) {\n return M.log(value + M.sqrt(value * value - 1));\n };\n var asinhPf = function (value) {\n return M.log(value + M.sqrt(value * value + 1));\n };\n var atanhPf = function (value) {\n return M.log((1 + value) / (1 - value)) / 2;\n };\n var sinhPf = function (value) {\n return M.exp(value) - 1 / M.exp(value) / 2;\n };\n var coshPf = function (value) {\n return (M.exp(value) + 1 / M.exp(value)) / 2;\n };\n var expm1Pf = function (value) {\n return M.exp(value) - 1;\n };\n var tanhPf = function (value) {\n return (M.exp(2 * value) - 1) / (M.exp(2 * value) + 1);\n };\n var log1pPf = function (value) {\n return M.log(1 + value);\n };\n // Note: constant values are empirical\n return {\n acos: acos(0.123124234234234242),\n acosh: acosh(1e308),\n acoshPf: acoshPf(1e154),\n asin: asin(0.123124234234234242),\n asinh: asinh(1),\n asinhPf: asinhPf(1),\n atanh: atanh(0.5),\n atanhPf: atanhPf(0.5),\n atan: atan(0.5),\n sin: sin(-1e300),\n sinh: sinh(1),\n sinhPf: sinhPf(1),\n cos: cos(10.000000000123),\n cosh: cosh(1),\n coshPf: coshPf(1),\n tan: tan(-1e300),\n tanh: tanh(1),\n tanhPf: tanhPf(1),\n exp: exp(1),\n expm1: expm1(1),\n expm1Pf: expm1Pf(1),\n log1p: log1p(10),\n log1pPf: log1pPf(10),\n powPI: powPI(-100)\n };\n}\n\n/**\n * We use m or w because these two characters take up the maximum width.\n * Also there are a couple of ligatures.\n */\nvar defaultText = 'mmMwWLliI0fiflO&1';\n/**\n * Settings of text blocks to measure. The keys are random but persistent words.\n */\nvar presets = {\n /**\n * The default font. User can change it in desktop Chrome, desktop Firefox, IE 11,\n * Android Chrome (but only when the size is ≥ than the default) and Android Firefox.\n */\n default: [],\n /** OS font on macOS. User can change its size and weight. Applies after Safari restart. */\n apple: [{\n font: '-apple-system-body'\n }],\n /** User can change it in desktop Chrome and desktop Firefox. */\n serif: [{\n fontFamily: 'serif'\n }],\n /** User can change it in desktop Chrome and desktop Firefox. */\n sans: [{\n fontFamily: 'sans-serif'\n }],\n /** User can change it in desktop Chrome and desktop Firefox. */\n mono: [{\n fontFamily: 'monospace'\n }],\n /**\n * Check the smallest allowed font size. User can change it in desktop Chrome, desktop Firefox and desktop Safari.\n * The height can be 0 in Chrome on a retina display.\n */\n min: [{\n fontSize: '1px'\n }],\n /** Tells one OS from another in desktop Chrome. */\n system: [{\n fontFamily: 'system-ui'\n }]\n};\n/**\n * The result is a dictionary of the width of the text samples.\n * Heights aren't included because they give no extra entropy and are unstable.\n *\n * The result is very stable in IE 11, Edge 18 and Safari 14.\n * The result changes when the OS pixel density changes in Chromium 87. The real pixel density is required to solve,\n * but seems like it's impossible: https://stackoverflow.com/q/1713771/1118709.\n * The \"min\" and the \"mono\" (only on Windows) value may change when the page is zoomed in Firefox 87.\n */\nfunction getFontPreferences() {\n return withNaturalFonts(function (document, container) {\n var elements = {};\n var sizes = {};\n // First create all elements to measure. If the DOM steps below are done in a single cycle,\n // browser will alternate tree modification and layout reading, that is very slow.\n for (var _i = 0, _a = Object.keys(presets); _i < _a.length; _i++) {\n var key = _a[_i];\n var _b = presets[key],\n _c = _b[0],\n style = _c === void 0 ? {} : _c,\n _d = _b[1],\n text = _d === void 0 ? defaultText : _d;\n var element = document.createElement('span');\n element.textContent = text;\n element.style.whiteSpace = 'nowrap';\n for (var _e = 0, _f = Object.keys(style); _e < _f.length; _e++) {\n var name_1 = _f[_e];\n var value = style[name_1];\n if (value !== undefined) {\n element.style[name_1] = value;\n }\n }\n elements[key] = element;\n container.appendChild(document.createElement('br'));\n container.appendChild(element);\n }\n // Then measure the created elements\n for (var _g = 0, _h = Object.keys(presets); _g < _h.length; _g++) {\n var key = _h[_g];\n sizes[key] = elements[key].getBoundingClientRect().width;\n }\n return sizes;\n });\n}\n/**\n * Creates a DOM environment that provides the most natural font available, including Android OS font.\n * Measurements of the elements are zoom-independent.\n * Don't put a content to measure inside an absolutely positioned element.\n */\nfunction withNaturalFonts(action, containerWidthPx) {\n if (containerWidthPx === void 0) {\n containerWidthPx = 4000;\n }\n /*\n * Requirements for Android Chrome to apply the system font size to a text inside an iframe:\n * - The iframe mustn't have a `display: none;` style;\n * - The text mustn't be positioned absolutely;\n * - The text block must be wide enough.\n * 2560px on some devices in portrait orientation for the biggest font size option (32px);\n * - There must be much enough text to form a few lines (I don't know the exact numbers);\n * - The text must have the `text-size-adjust: none` style. Otherwise the text will scale in \"Desktop site\" mode;\n *\n * Requirements for Android Firefox to apply the system font size to a text inside an iframe:\n * - The iframe document must have a header: `<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />`.\n * The only way to set it is to use the `srcdoc` attribute of the iframe;\n * - The iframe content must get loaded before adding extra content with JavaScript;\n *\n * https://example.com as the iframe target always inherits Android font settings so it can be used as a reference.\n *\n * Observations on how page zoom affects the measurements:\n * - macOS Safari 11.1, 12.1, 13.1, 14.0: zoom reset + offsetWidth = 100% reliable;\n * - macOS Safari 11.1, 12.1, 13.1, 14.0: zoom reset + getBoundingClientRect = 100% reliable;\n * - macOS Safari 14.0: offsetWidth = 5% fluctuation;\n * - macOS Safari 14.0: getBoundingClientRect = 5% fluctuation;\n * - iOS Safari 9, 10, 11.0, 12.0: haven't found a way to zoom a page (pinch doesn't change layout);\n * - iOS Safari 13.1, 14.0: zoom reset + offsetWidth = 100% reliable;\n * - iOS Safari 13.1, 14.0: zoom reset + getBoundingClientRect = 100% reliable;\n * - iOS Safari 14.0: offsetWidth = 100% reliable;\n * - iOS Safari 14.0: getBoundingClientRect = 100% reliable;\n * - Chrome 42, 65, 80, 87: zoom 1/devicePixelRatio + offsetWidth = 1px fluctuation;\n * - Chrome 42, 65, 80, 87: zoom 1/devicePixelRatio + getBoundingClientRect = 100% reliable;\n * - Chrome 87: offsetWidth = 1px fluctuation;\n * - Chrome 87: getBoundingClientRect = 0.7px fluctuation;\n * - Firefox 48, 51: offsetWidth = 10% fluctuation;\n * - Firefox 48, 51: getBoundingClientRect = 10% fluctuation;\n * - Firefox 52, 53, 57, 62, 66, 67, 68, 71, 75, 80, 84: offsetWidth = width 100% reliable, height 10% fluctuation;\n * - Firefox 52, 53, 57, 62, 66, 67, 68, 71, 75, 80, 84: getBoundingClientRect = width 100% reliable, height 10%\n * fluctuation;\n * - Android Chrome 86: haven't found a way to zoom a page (pinch doesn't change layout);\n * - Android Firefox 84: font size in accessibility settings changes all the CSS sizes, but offsetWidth and\n * getBoundingClientRect keep measuring with regular units, so the size reflects the font size setting and doesn't\n * fluctuate;\n * - IE 11, Edge 18: zoom 1/devicePixelRatio + offsetWidth = 100% reliable;\n * - IE 11, Edge 18: zoom 1/devicePixelRatio + getBoundingClientRect = reflects the zoom level;\n * - IE 11, Edge 18: offsetWidth = 100% reliable;\n * - IE 11, Edge 18: getBoundingClientRect = 100% reliable;\n */\n return withIframe(function (_, iframeWindow) {\n var iframeDocument = iframeWindow.document;\n var iframeBody = iframeDocument.body;\n var bodyStyle = iframeBody.style;\n bodyStyle.width = \"\".concat(containerWidthPx, \"px\");\n bodyStyle.webkitTextSizeAdjust = bodyStyle.textSizeAdjust = 'none';\n // See the big comment above\n if (isChromium()) {\n iframeBody.style.zoom = \"\".concat(1 / iframeWindow.devicePixelRatio);\n } else if (isWebKit()) {\n iframeBody.style.zoom = 'reset';\n }\n // See the big comment above\n var linesOfText = iframeDocument.createElement('div');\n linesOfText.textContent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spreadArray\"])([], Array(containerWidthPx / 20 << 0), true).map(function () {\n return 'word';\n }).join(' ');\n iframeBody.appendChild(linesOfText);\n return action(iframeDocument, iframeBody);\n }, '<!doctype html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">');\n}\n\n/**\n * @see Credits: https://stackoverflow.com/a/49267844\n */\nfunction getVideoCard() {\n var _a;\n var canvas = document.createElement('canvas');\n var gl = (_a = canvas.getContext('webgl')) !== null && _a !== void 0 ? _a : canvas.getContext('experimental-webgl');\n if (gl && 'getExtension' in gl) {\n var debugInfo = gl.getExtension('WEBGL_debug_renderer_info');\n if (debugInfo) {\n return {\n vendor: (gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL) || '').toString(),\n renderer: (gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL) || '').toString()\n };\n }\n }\n return undefined;\n}\nfunction isPdfViewerEnabled() {\n return navigator.pdfViewerEnabled;\n}\n\n/**\n * Unlike most other architectures, on x86/x86-64 when floating-point instructions\n * have no NaN arguments, but produce NaN output, the output NaN has sign bit set.\n * We use it to distinguish x86/x86-64 from other architectures, by doing subtraction\n * of two infinities (must produce NaN per IEEE 754 standard).\n *\n * See https://codebrowser.bddppq.com/pytorch/pytorch/third_party/XNNPACK/src/init.c.html#79\n */\nfunction getArchitecture() {\n var f = new Float32Array(1);\n var u8 = new Uint8Array(f.buffer);\n f[0] = Infinity;\n f[0] = f[0] - f[0];\n return u8[3];\n}\n\n/**\n * The list of entropy sources used to make visitor identifiers.\n *\n * This value isn't restricted by Semantic Versioning, i.e. it may be changed without bumping minor or major version of\n * this package.\n *\n * Note: Rollup and Webpack are smart enough to remove unused properties of this object during tree-shaking, so there is\n * no need to export the sources individually.\n */\nvar sources = {\n // READ FIRST:\n // See https://github.com/fingerprintjs/fingerprintjs/blob/master/contributing.md#how-to-make-an-entropy-source\n // to learn how entropy source works and how to make your own.\n // The sources run in this exact order.\n // The asynchronous sources are at the start to run in parallel with other sources.\n fonts: getFonts,\n domBlockers: getDomBlockers,\n fontPreferences: getFontPreferences,\n audio: getAudioFingerprint,\n screenFrame: getRoundedScreenFrame,\n osCpu: getOsCpu,\n languages: getLanguages,\n colorDepth: getColorDepth,\n deviceMemory: getDeviceMemory,\n screenResolution: getScreenResolution,\n hardwareConcurrency: getHardwareConcurrency,\n timezone: getTimezone,\n sessionStorage: getSessionStorage,\n localStorage: getLocalStorage,\n indexedDB: getIndexedDB,\n openDatabase: getOpenDatabase,\n cpuClass: getCpuClass,\n platform: getPlatform,\n plugins: getPlugins,\n canvas: getCanvasFingerprint,\n touchSupport: getTouchSupport,\n vendor: getVendor,\n vendorFlavors: getVendorFlavors,\n cookiesEnabled: areCookiesEnabled,\n colorGamut: getColorGamut,\n invertedColors: areColorsInverted,\n forcedColors: areColorsForced,\n monochrome: getMonochromeDepth,\n contrast: getContrastPreference,\n reducedMotion: isMotionReduced,\n hdr: isHDR,\n math: getMathFingerprint,\n videoCard: getVideoCard,\n pdfViewerEnabled: isPdfViewerEnabled,\n architecture: getArchitecture\n};\n/**\n * Loads the built-in entropy sources.\n * Returns a function that collects the entropy components to make the visitor identifier.\n */\nfunction loadBuiltinSources(options) {\n return loadSources(sources, options, []);\n}\nvar commentTemplate = '$ if upgrade to Pro: https://fpjs.dev/pro';\nfunction getConfidence(components) {\n var openConfidenceScore = getOpenConfidenceScore(components);\n var proConfidenceScore = deriveProConfidenceScore(openConfidenceScore);\n return {\n score: openConfidenceScore,\n comment: commentTemplate.replace(/\\$/g, \"\".concat(proConfidenceScore))\n };\n}\nfunction getOpenConfidenceScore(components) {\n // In order to calculate the true probability of the visitor identifier being correct, we need to know the number of\n // website visitors (the higher the number, the less the probability because the fingerprint entropy is limited).\n // JS agent doesn't know the number of visitors, so we can only do an approximate assessment.\n if (isAndroid()) {\n return 0.4;\n }\n // Safari (mobile and desktop)\n if (isWebKit()) {\n return isDesktopSafari() ? 0.5 : 0.3;\n }\n var platform = components.platform.value || '';\n // Windows\n if (/^Win/.test(platform)) {\n // The score is greater than on macOS because of the higher variety of devices running Windows.\n // Chrome provides more entropy than Firefox according too\n // https://netmarketshare.com/browser-market-share.aspx?options=%7B%22filter%22%3A%7B%22%24and%22%3A%5B%7B%22platform%22%3A%7B%22%24in%22%3A%5B%22Windows%22%5D%7D%7D%5D%7D%2C%22dateLabel%22%3A%22Trend%22%2C%22attributes%22%3A%22share%22%2C%22group%22%3A%22browser%22%2C%22sort%22%3A%7B%22share%22%3A-1%7D%2C%22id%22%3A%22browsersDesktop%22%2C%22dateInterval%22%3A%22Monthly%22%2C%22dateStart%22%3A%222019-11%22%2C%22dateEnd%22%3A%222020-10%22%2C%22segments%22%3A%22-1000%22%7D\n // So we assign the same score to them.\n return 0.6;\n }\n // macOS\n if (/^Mac/.test(platform)) {\n // Chrome provides more entropy than Safari and Safari provides more entropy than Firefox.\n // Chrome is more popular than Safari and Safari is more popular than Firefox according to\n // https://netmarketshare.com/browser-market-share.aspx?options=%7B%22filter%22%3A%7B%22%24and%22%3A%5B%7B%22platform%22%3A%7B%22%24in%22%3A%5B%22Mac%20OS%22%5D%7D%7D%5D%7D%2C%22dateLabel%22%3A%22Trend%22%2C%22attributes%22%3A%22share%22%2C%22group%22%3A%22browser%22%2C%22sort%22%3A%7B%22share%22%3A-1%7D%2C%22id%22%3A%22browsersDesktop%22%2C%22dateInterval%22%3A%22Monthly%22%2C%22dateStart%22%3A%222019-11%22%2C%22dateEnd%22%3A%222020-10%22%2C%22segments%22%3A%22-1000%22%7D\n // So we assign the same score to them.\n return 0.5;\n }\n // Another platform, e.g. a desktop Linux. It's rare, so it should be pretty unique.\n return 0.7;\n}\nfunction deriveProConfidenceScore(openConfidenceScore) {\n return round(0.99 + 0.01 * openConfidenceScore, 0.0001);\n}\nfunction componentsToCanonicalString(components) {\n var result = '';\n for (var _i = 0, _a = Object.keys(components).sort(); _i < _a.length; _i++) {\n var componentKey = _a[_i];\n var component = components[componentKey];\n var value = component.error ? 'error' : JSON.stringify(component.value);\n result += \"\".concat(result ? '|' : '').concat(componentKey.replace(/([:|\\\\])/g, '\\\\$1'), \":\").concat(value);\n }\n return result;\n}\nfunction componentsToDebugString(components) {\n return JSON.stringify(components, function (_key, value) {\n if (value instanceof Error) {\n return errorToObject(value);\n }\n return value;\n }, 2);\n}\nfunction hashComponents(components) {\n return x64hash128(componentsToCanonicalString(components));\n}\n/**\n * Makes a GetResult implementation that calculates the visitor id hash on demand.\n * Designed for optimisation.\n */\nfunction makeLazyGetResult(components) {\n var visitorIdCache;\n // This function runs very fast, so there is no need to make it lazy\n var confidence = getConfidence(components);\n // A plain class isn't used because its getters and setters aren't enumerable.\n return {\n get visitorId() {\n if (visitorIdCache === undefined) {\n visitorIdCache = hashComponents(this.components);\n }\n return visitorIdCache;\n },\n set visitorId(visitorId) {\n visitorIdCache = visitorId;\n },\n confidence: confidence,\n components: components,\n version: version\n };\n}\n/**\n * A delay is required to ensure consistent entropy components.\n * See https://github.com/fingerprintjs/fingerprintjs/issues/254\n * and https://github.com/fingerprintjs/fingerprintjs/issues/307\n * and https://github.com/fingerprintjs/fingerprintjs/commit/945633e7c5f67ae38eb0fea37349712f0e669b18\n */\nfunction prepareForSources(delayFallback) {\n if (delayFallback === void 0) {\n delayFallback = 50;\n }\n // A proper deadline is unknown. Let it be twice the fallback timeout so that both cases have the same average time.\n return requestIdleCallbackIfAvailable(delayFallback, delayFallback * 2);\n}\n/**\n * The function isn't exported from the index file to not allow to call it without `load()`.\n * The hiding gives more freedom for future non-breaking updates.\n *\n * A factory function is used instead of a class to shorten the attribute names in the minified code.\n * Native private class fields could've been used, but TypeScript doesn't allow them with `\"target\": \"es5\"`.\n */\nfunction makeAgent(getComponents, debug) {\n var creationTime = Date.now();\n return {\n get: function (options) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var startTime, components, result;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = Date.now();\n return [4 /*yield*/, getComponents()];\n case 1:\n components = _a.sent();\n result = makeLazyGetResult(components);\n if (debug || (options === null || options === void 0 ? void 0 : options.debug)) {\n // console.log is ok here because it's under a debug clause\n // eslint-disable-next-line no-console\n console.log(\"Copy the text below to get the debug data:\\n\\n```\\nversion: \".concat(result.version, \"\\nuserAgent: \").concat(navigator.userAgent, \"\\ntimeBetweenLoadAndGet: \").concat(startTime - creationTime, \"\\nvisitorId: \").concat(result.visitorId, \"\\ncomponents: \").concat(componentsToDebugString(components), \"\\n```\"));\n }\n return [2 /*return*/, result];\n }\n });\n });\n }\n };\n}\n/**\n * Sends an unpersonalized AJAX request to collect installation statistics\n */\nfunction monitor() {\n // The FingerprintJS CDN (https://github.com/fingerprintjs/cdn) replaces `window.__fpjs_d_m` with `true`\n if (window.__fpjs_d_m || Math.random() >= 0.001) {\n return;\n }\n try {\n var request = new XMLHttpRequest();\n request.open('get', \"https://m1.openfpcdn.io/fingerprintjs/v\".concat(version, \"/npm-monitoring\"), true);\n request.send();\n } catch (error) {\n // console.error is ok here because it's an unexpected error handler\n // eslint-disable-next-line no-console\n console.error(error);\n }\n}\n/**\n * Builds an instance of Agent and waits a delay required for a proper operation.\n */\nfunction load(_a) {\n var _b = _a === void 0 ? {} : _a,\n delayFallback = _b.delayFallback,\n debug = _b.debug,\n _c = _b.monitoring,\n monitoring = _c === void 0 ? true : _c;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var getComponents;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_d) {\n switch (_d.label) {\n case 0:\n if (monitoring) {\n monitor();\n }\n return [4 /*yield*/, prepareForSources(delayFallback)];\n case 1:\n _d.sent();\n getComponents = loadBuiltinSources({\n debug: debug\n });\n return [2 /*return*/, makeAgent(getComponents, debug)];\n }\n });\n });\n}\n\n// The default export is a syntax sugar (`import * as FP from '...' → import FP from '...'`).\n// It should contain all the public exported values.\nvar index = {\n load: load,\n hashComponents: hashComponents,\n componentsToDebugString: componentsToDebugString\n};\n// The exports below are for private usage. They may change unexpectedly. Use them at your own risk.\n/** Not documented, out of Semantic Versioning, usage is at your own risk */\nvar murmurX64Hash128 = x64hash128;\n\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.js?");
|
|
795
564
|
|
|
796
565
|
/***/ }),
|
|
797
566
|
|
|
@@ -1585,6 +1354,17 @@ eval("var parent = __webpack_require__(/*! ../../stable/instance/index-of */ \".
|
|
|
1585
1354
|
|
|
1586
1355
|
/***/ }),
|
|
1587
1356
|
|
|
1357
|
+
/***/ "./node_modules/core-js-pure/actual/instance/push.js":
|
|
1358
|
+
/*!***********************************************************!*\
|
|
1359
|
+
!*** ./node_modules/core-js-pure/actual/instance/push.js ***!
|
|
1360
|
+
\***********************************************************/
|
|
1361
|
+
/*! no static exports found */
|
|
1362
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1363
|
+
|
|
1364
|
+
eval("var parent = __webpack_require__(/*! ../../stable/instance/push */ \"./node_modules/core-js-pure/stable/instance/push.js\");\nmodule.exports = parent;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/actual/instance/push.js?");
|
|
1365
|
+
|
|
1366
|
+
/***/ }),
|
|
1367
|
+
|
|
1588
1368
|
/***/ "./node_modules/core-js-pure/actual/instance/reverse.js":
|
|
1589
1369
|
/*!**************************************************************!*\
|
|
1590
1370
|
!*** ./node_modules/core-js-pure/actual/instance/reverse.js ***!
|
|
@@ -1724,7 +1504,7 @@ eval("var parent = __webpack_require__(/*! ../../stable/promise */ \"./node_modu
|
|
|
1724
1504
|
/*! no static exports found */
|
|
1725
1505
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1726
1506
|
|
|
1727
|
-
eval("var parent = __webpack_require__(/*! ../../stable/symbol */ \"./node_modules/core-js-pure/stable/symbol/index.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.dispose */ \"./node_modules/core-js-pure/modules/esnext.symbol.dispose.js\");\nmodule.exports = parent;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/actual/symbol/index.js?");
|
|
1507
|
+
eval("var parent = __webpack_require__(/*! ../../stable/symbol */ \"./node_modules/core-js-pure/stable/symbol/index.js\");\n__webpack_require__(/*! ../../modules/esnext.function.metadata */ \"./node_modules/core-js-pure/modules/esnext.function.metadata.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.dispose */ \"./node_modules/core-js-pure/modules/esnext.symbol.dispose.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.metadata */ \"./node_modules/core-js-pure/modules/esnext.symbol.metadata.js\");\nmodule.exports = parent;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/actual/symbol/index.js?");
|
|
1728
1508
|
|
|
1729
1509
|
/***/ }),
|
|
1730
1510
|
|
|
@@ -1860,6 +1640,17 @@ eval("__webpack_require__(/*! ../../../modules/es.array.map */ \"./node_modules/
|
|
|
1860
1640
|
|
|
1861
1641
|
/***/ }),
|
|
1862
1642
|
|
|
1643
|
+
/***/ "./node_modules/core-js-pure/es/array/virtual/push.js":
|
|
1644
|
+
/*!************************************************************!*\
|
|
1645
|
+
!*** ./node_modules/core-js-pure/es/array/virtual/push.js ***!
|
|
1646
|
+
\************************************************************/
|
|
1647
|
+
/*! no static exports found */
|
|
1648
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1649
|
+
|
|
1650
|
+
eval("__webpack_require__(/*! ../../../modules/es.array.push */ \"./node_modules/core-js-pure/modules/es.array.push.js\");\nvar entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ \"./node_modules/core-js-pure/internals/entry-virtual.js\");\nmodule.exports = entryVirtual('Array').push;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/es/array/virtual/push.js?");
|
|
1651
|
+
|
|
1652
|
+
/***/ }),
|
|
1653
|
+
|
|
1863
1654
|
/***/ "./node_modules/core-js-pure/es/array/virtual/reverse.js":
|
|
1864
1655
|
/*!***************************************************************!*\
|
|
1865
1656
|
!*** ./node_modules/core-js-pure/es/array/virtual/reverse.js ***!
|
|
@@ -1970,6 +1761,17 @@ eval("var isPrototypeOf = __webpack_require__(/*! ../../internals/object-is-prot
|
|
|
1970
1761
|
|
|
1971
1762
|
/***/ }),
|
|
1972
1763
|
|
|
1764
|
+
/***/ "./node_modules/core-js-pure/es/instance/push.js":
|
|
1765
|
+
/*!*******************************************************!*\
|
|
1766
|
+
!*** ./node_modules/core-js-pure/es/instance/push.js ***!
|
|
1767
|
+
\*******************************************************/
|
|
1768
|
+
/*! no static exports found */
|
|
1769
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1770
|
+
|
|
1771
|
+
eval("var isPrototypeOf = __webpack_require__(/*! ../../internals/object-is-prototype-of */ \"./node_modules/core-js-pure/internals/object-is-prototype-of.js\");\nvar method = __webpack_require__(/*! ../array/virtual/push */ \"./node_modules/core-js-pure/es/array/virtual/push.js\");\nvar ArrayPrototype = Array.prototype;\nmodule.exports = function (it) {\n var own = it.push;\n return it === ArrayPrototype || isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.push ? method : own;\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/es/instance/push.js?");
|
|
1772
|
+
|
|
1773
|
+
/***/ }),
|
|
1774
|
+
|
|
1973
1775
|
/***/ "./node_modules/core-js-pure/es/instance/reverse.js":
|
|
1974
1776
|
/*!**********************************************************!*\
|
|
1975
1777
|
!*** ./node_modules/core-js-pure/es/instance/reverse.js ***!
|
|
@@ -2289,6 +2091,17 @@ eval("module.exports = __webpack_require__(/*! ../../full/instance/index-of */ \
|
|
|
2289
2091
|
|
|
2290
2092
|
/***/ }),
|
|
2291
2093
|
|
|
2094
|
+
/***/ "./node_modules/core-js-pure/features/instance/push.js":
|
|
2095
|
+
/*!*************************************************************!*\
|
|
2096
|
+
!*** ./node_modules/core-js-pure/features/instance/push.js ***!
|
|
2097
|
+
\*************************************************************/
|
|
2098
|
+
/*! no static exports found */
|
|
2099
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2100
|
+
|
|
2101
|
+
eval("module.exports = __webpack_require__(/*! ../../full/instance/push */ \"./node_modules/core-js-pure/full/instance/push.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/features/instance/push.js?");
|
|
2102
|
+
|
|
2103
|
+
/***/ }),
|
|
2104
|
+
|
|
2292
2105
|
/***/ "./node_modules/core-js-pure/features/instance/reverse.js":
|
|
2293
2106
|
/*!****************************************************************!*\
|
|
2294
2107
|
!*** ./node_modules/core-js-pure/features/instance/reverse.js ***!
|
|
@@ -2520,6 +2333,17 @@ eval("var parent = __webpack_require__(/*! ../../actual/instance/index-of */ \".
|
|
|
2520
2333
|
|
|
2521
2334
|
/***/ }),
|
|
2522
2335
|
|
|
2336
|
+
/***/ "./node_modules/core-js-pure/full/instance/push.js":
|
|
2337
|
+
/*!*********************************************************!*\
|
|
2338
|
+
!*** ./node_modules/core-js-pure/full/instance/push.js ***!
|
|
2339
|
+
\*********************************************************/
|
|
2340
|
+
/*! no static exports found */
|
|
2341
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2342
|
+
|
|
2343
|
+
eval("var parent = __webpack_require__(/*! ../../actual/instance/push */ \"./node_modules/core-js-pure/actual/instance/push.js\");\nmodule.exports = parent;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/full/instance/push.js?");
|
|
2344
|
+
|
|
2345
|
+
/***/ }),
|
|
2346
|
+
|
|
2523
2347
|
/***/ "./node_modules/core-js-pure/full/instance/reverse.js":
|
|
2524
2348
|
/*!************************************************************!*\
|
|
2525
2349
|
!*** ./node_modules/core-js-pure/full/instance/reverse.js ***!
|
|
@@ -2648,7 +2472,7 @@ eval("var parent = __webpack_require__(/*! ../../actual/object/set-prototype-of
|
|
|
2648
2472
|
/*! no static exports found */
|
|
2649
2473
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2650
2474
|
|
|
2651
|
-
eval("var parent = __webpack_require__(/*! ../../actual/promise */ \"./node_modules/core-js-pure/actual/promise/index.js\");\n__webpack_require__(/*! ../../modules/esnext.
|
|
2475
|
+
eval("var parent = __webpack_require__(/*! ../../actual/promise */ \"./node_modules/core-js-pure/actual/promise/index.js\");\n__webpack_require__(/*! ../../modules/esnext.promise.with-resolvers */ \"./node_modules/core-js-pure/modules/esnext.promise.with-resolvers.js\");\n// TODO: Remove from `core-js@4`\n__webpack_require__(/*! ../../modules/esnext.aggregate-error */ \"./node_modules/core-js-pure/modules/esnext.aggregate-error.js\");\n__webpack_require__(/*! ../../modules/esnext.promise.all-settled */ \"./node_modules/core-js-pure/modules/esnext.promise.all-settled.js\");\n__webpack_require__(/*! ../../modules/esnext.promise.try */ \"./node_modules/core-js-pure/modules/esnext.promise.try.js\");\n__webpack_require__(/*! ../../modules/esnext.promise.any */ \"./node_modules/core-js-pure/modules/esnext.promise.any.js\");\nmodule.exports = parent;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/full/promise/index.js?");
|
|
2652
2476
|
|
|
2653
2477
|
/***/ }),
|
|
2654
2478
|
|
|
@@ -2659,7 +2483,7 @@ eval("var parent = __webpack_require__(/*! ../../actual/promise */ \"./node_modu
|
|
|
2659
2483
|
/*! no static exports found */
|
|
2660
2484
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2661
2485
|
|
|
2662
|
-
eval("var parent = __webpack_require__(/*! ../../actual/symbol */ \"./node_modules/core-js-pure/actual/symbol/index.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.async-dispose */ \"./node_modules/core-js-pure/modules/esnext.symbol.async-dispose.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.is-registered */ \"./node_modules/core-js-pure/modules/esnext.symbol.is-registered.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.is-well-known */ \"./node_modules/core-js-pure/modules/esnext.symbol.is-well-known.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.matcher */ \"./node_modules/core-js-pure/modules/esnext.symbol.matcher.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.
|
|
2486
|
+
eval("var parent = __webpack_require__(/*! ../../actual/symbol */ \"./node_modules/core-js-pure/actual/symbol/index.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.async-dispose */ \"./node_modules/core-js-pure/modules/esnext.symbol.async-dispose.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.is-registered-symbol */ \"./node_modules/core-js-pure/modules/esnext.symbol.is-registered-symbol.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.is-well-known-symbol */ \"./node_modules/core-js-pure/modules/esnext.symbol.is-well-known-symbol.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.matcher */ \"./node_modules/core-js-pure/modules/esnext.symbol.matcher.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.observable */ \"./node_modules/core-js-pure/modules/esnext.symbol.observable.js\");\n// TODO: Remove from `core-js@4`\n__webpack_require__(/*! ../../modules/esnext.symbol.is-registered */ \"./node_modules/core-js-pure/modules/esnext.symbol.is-registered.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.is-well-known */ \"./node_modules/core-js-pure/modules/esnext.symbol.is-well-known.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.metadata-key */ \"./node_modules/core-js-pure/modules/esnext.symbol.metadata-key.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.pattern-match */ \"./node_modules/core-js-pure/modules/esnext.symbol.pattern-match.js\");\n__webpack_require__(/*! ../../modules/esnext.symbol.replace-all */ \"./node_modules/core-js-pure/modules/esnext.symbol.replace-all.js\");\nmodule.exports = parent;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/full/symbol/index.js?");
|
|
2663
2487
|
|
|
2664
2488
|
/***/ }),
|
|
2665
2489
|
|
|
@@ -3482,7 +3306,7 @@ eval("var aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./nod
|
|
|
3482
3306
|
/*! no static exports found */
|
|
3483
3307
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3484
3308
|
|
|
3485
|
-
eval("/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n// eslint-disable-next-line es/no-global-this -- safe\ncheck(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) ||\n// eslint-disable-next-line no-restricted-globals -- safe\ncheck(typeof self == 'object' && self) || check(typeof global == 'object' && global) ||\n// eslint-disable-next-line no-new-func -- fallback\nfunction () {\n return this;\n}() || Function('return this')();\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/internals/global.js?");
|
|
3309
|
+
eval("/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n// eslint-disable-next-line es/no-global-this -- safe\ncheck(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) ||\n// eslint-disable-next-line no-restricted-globals -- safe\ncheck(typeof self == 'object' && self) || check(typeof global == 'object' && global) ||\n// eslint-disable-next-line no-new-func -- fallback\nfunction () {\n return this;\n}() || this || Function('return this')();\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/internals/global.js?");
|
|
3486
3310
|
|
|
3487
3311
|
/***/ }),
|
|
3488
3312
|
|
|
@@ -4016,7 +3840,7 @@ eval("/* eslint-disable no-proto -- safe */\nvar uncurryThisAccessor = __webpack
|
|
|
4016
3840
|
/*! no static exports found */
|
|
4017
3841
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4018
3842
|
|
|
4019
|
-
eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js-pure/internals/function-uncurry-this.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js-pure/internals/object-keys.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js-pure/internals/to-indexed-object.js\");\nvar $propertyIsEnumerable = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js-pure/internals/object-property-is-enumerable.js\").f;\nvar propertyIsEnumerable = uncurryThis($propertyIsEnumerable);\nvar push = uncurryThis([].push);\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable(O, key)) {\n push(result, TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/internals/object-to-array.js?");
|
|
3843
|
+
eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js-pure/internals/function-uncurry-this.js\");\nvar objectGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js-pure/internals/object-get-prototype-of.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js-pure/internals/object-keys.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js-pure/internals/to-indexed-object.js\");\nvar $propertyIsEnumerable = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js-pure/internals/object-property-is-enumerable.js\").f;\nvar propertyIsEnumerable = uncurryThis($propertyIsEnumerable);\nvar push = uncurryThis([].push);\n\n// in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys\n// of `null` prototype objects\nvar IE_BUG = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-create -- safe\n var O = Object.create(null);\n O[2] = 2;\n return !propertyIsEnumerable(O, 2);\n});\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {\n push(result, TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/internals/object-to-array.js?");
|
|
4020
3844
|
|
|
4021
3845
|
/***/ }),
|
|
4022
3846
|
|
|
@@ -4194,7 +4018,7 @@ eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modul
|
|
|
4194
4018
|
/*! no static exports found */
|
|
4195
4019
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4196
4020
|
|
|
4197
|
-
eval("var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js-pure/internals/is-pure.js\");\nvar store = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js-pure/internals/shared-store.js\");\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.
|
|
4021
|
+
eval("var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js-pure/internals/is-pure.js\");\nvar store = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js-pure/internals/shared-store.js\");\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.31.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/internals/shared.js?");
|
|
4198
4022
|
|
|
4199
4023
|
/***/ }),
|
|
4200
4024
|
|
|
@@ -4227,7 +4051,7 @@ eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-th
|
|
|
4227
4051
|
/*! no static exports found */
|
|
4228
4052
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4229
4053
|
|
|
4230
|
-
eval("/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js-pure/internals/engine-v8-version.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return
|
|
4054
|
+
eval("/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js-pure/internals/engine-v8-version.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar $String = global.String;\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,\n // of course, fail.\n return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/internals/symbol-constructor-detection.js?");
|
|
4231
4055
|
|
|
4232
4056
|
/***/ }),
|
|
4233
4057
|
|
|
@@ -4242,6 +4066,28 @@ eval("var call = __webpack_require__(/*! ../internals/function-call */ \"./node_
|
|
|
4242
4066
|
|
|
4243
4067
|
/***/ }),
|
|
4244
4068
|
|
|
4069
|
+
/***/ "./node_modules/core-js-pure/internals/symbol-is-registered.js":
|
|
4070
|
+
/*!*********************************************************************!*\
|
|
4071
|
+
!*** ./node_modules/core-js-pure/internals/symbol-is-registered.js ***!
|
|
4072
|
+
\*********************************************************************/
|
|
4073
|
+
/*! no static exports found */
|
|
4074
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
4075
|
+
|
|
4076
|
+
eval("var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js-pure/internals/get-built-in.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js-pure/internals/function-uncurry-this.js\");\nvar Symbol = getBuiltIn('Symbol');\nvar keyFor = Symbol.keyFor;\nvar thisSymbolValue = uncurryThis(Symbol.prototype.valueOf);\n\n// `Symbol.isRegisteredSymbol` method\n// https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol\nmodule.exports = Symbol.isRegisteredSymbol || function isRegisteredSymbol(value) {\n try {\n return keyFor(thisSymbolValue(value)) !== undefined;\n } catch (error) {\n return false;\n }\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/internals/symbol-is-registered.js?");
|
|
4077
|
+
|
|
4078
|
+
/***/ }),
|
|
4079
|
+
|
|
4080
|
+
/***/ "./node_modules/core-js-pure/internals/symbol-is-well-known.js":
|
|
4081
|
+
/*!*********************************************************************!*\
|
|
4082
|
+
!*** ./node_modules/core-js-pure/internals/symbol-is-well-known.js ***!
|
|
4083
|
+
\*********************************************************************/
|
|
4084
|
+
/*! no static exports found */
|
|
4085
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
4086
|
+
|
|
4087
|
+
eval("var shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js-pure/internals/shared.js\");\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js-pure/internals/get-built-in.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js-pure/internals/function-uncurry-this.js\");\nvar isSymbol = __webpack_require__(/*! ../internals/is-symbol */ \"./node_modules/core-js-pure/internals/is-symbol.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar Symbol = getBuiltIn('Symbol');\nvar $isWellKnownSymbol = Symbol.isWellKnownSymbol;\nvar getOwnPropertyNames = getBuiltIn('Object', 'getOwnPropertyNames');\nvar thisSymbolValue = uncurryThis(Symbol.prototype.valueOf);\nvar WellKnownSymbolsStore = shared('wks');\nfor (var i = 0, symbolKeys = getOwnPropertyNames(Symbol), symbolKeysLength = symbolKeys.length; i < symbolKeysLength; i++) {\n // some old engines throws on access to some keys like `arguments` or `caller`\n try {\n var symbolKey = symbolKeys[i];\n if (isSymbol(Symbol[symbolKey])) wellKnownSymbol(symbolKey);\n } catch (error) {/* empty */}\n}\n\n// `Symbol.isWellKnownSymbol` method\n// https://tc39.es/proposal-symbol-predicates/#sec-symbol-iswellknownsymbol\n// We should patch it for newly added well-known symbols. If it's not required, this module just will not be injected\nmodule.exports = function isWellKnownSymbol(value) {\n if ($isWellKnownSymbol && $isWellKnownSymbol(value)) return true;\n try {\n var symbol = thisSymbolValue(value);\n for (var j = 0, keys = getOwnPropertyNames(WellKnownSymbolsStore), keysLength = keys.length; j < keysLength; j++) {\n if (WellKnownSymbolsStore[keys[j]] == symbol) return true;\n }\n } catch (error) {/* empty */}\n return false;\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/internals/symbol-is-well-known.js?");
|
|
4088
|
+
|
|
4089
|
+
/***/ }),
|
|
4090
|
+
|
|
4245
4091
|
/***/ "./node_modules/core-js-pure/internals/symbol-registry-detection.js":
|
|
4246
4092
|
/*!**************************************************************************!*\
|
|
4247
4093
|
!*** ./node_modules/core-js-pure/internals/symbol-registry-detection.js ***!
|
|
@@ -4392,7 +4238,7 @@ eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-th
|
|
|
4392
4238
|
/*! no static exports found */
|
|
4393
4239
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4394
4240
|
|
|
4395
|
-
eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js-pure/internals/is-pure.js\");\nvar ITERATOR = wellKnownSymbol('iterator');\nmodule.exports = !fails(function () {\n // eslint-disable-next-line unicorn/relative-url-style -- required for testing\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return IS_PURE && !url.toJSON || !searchParams.size && (IS_PURE || !DESCRIPTORS) || !searchParams.sort || url.href !== 'http://a/c%20d?a=1&c=3' || searchParams.get('c') !== '3' || String(new URLSearchParams('?a=1')) !== 'a=1' || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a' || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/internals/url-constructor-detection.js?");
|
|
4241
|
+
eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js-pure/internals/is-pure.js\");\nvar ITERATOR = wellKnownSymbol('iterator');\nmodule.exports = !fails(function () {\n // eslint-disable-next-line unicorn/relative-url-style -- required for testing\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var searchParams2 = new URLSearchParams('a=1&a=2');\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n searchParams2['delete']('a', 2);\n return IS_PURE && (!url.toJSON || !searchParams2.has('a', 1) || searchParams2.has('a', 2)) || !searchParams.size && (IS_PURE || !DESCRIPTORS) || !searchParams.sort || url.href !== 'http://a/c%20d?a=1&c=3' || searchParams.get('c') !== '3' || String(new URLSearchParams('?a=1')) !== 'a=1' || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a' || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/internals/url-constructor-detection.js?");
|
|
4396
4242
|
|
|
4397
4243
|
/***/ }),
|
|
4398
4244
|
|
|
@@ -4528,7 +4374,7 @@ eval("\n\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_module
|
|
|
4528
4374
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4529
4375
|
|
|
4530
4376
|
"use strict";
|
|
4531
|
-
eval("\n\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar $find = __webpack_require__(/*! ../internals/array-iteration */ \"./node_modules/core-js-pure/internals/array-iteration.js\").find;\nvar addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ \"./node_modules/core-js-pure/internals/add-to-unscopables.js\");\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND in []) Array(1)[FIND](function () {\n SKIPS_HOLES = false;\n});\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n$({\n target: 'Array',\n proto: true,\n forced: SKIPS_HOLES\n}, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/es.array.find.js?");
|
|
4377
|
+
eval("\n\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar $find = __webpack_require__(/*! ../internals/array-iteration */ \"./node_modules/core-js-pure/internals/array-iteration.js\").find;\nvar addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ \"./node_modules/core-js-pure/internals/add-to-unscopables.js\");\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\n// eslint-disable-next-line es/no-array-prototype-find -- testing\nif (FIND in []) Array(1)[FIND](function () {\n SKIPS_HOLES = false;\n});\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n$({\n target: 'Array',\n proto: true,\n forced: SKIPS_HOLES\n}, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/es.array.find.js?");
|
|
4532
4378
|
|
|
4533
4379
|
/***/ }),
|
|
4534
4380
|
|
|
@@ -4614,6 +4460,18 @@ eval("\n\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_module
|
|
|
4614
4460
|
|
|
4615
4461
|
/***/ }),
|
|
4616
4462
|
|
|
4463
|
+
/***/ "./node_modules/core-js-pure/modules/es.array.push.js":
|
|
4464
|
+
/*!************************************************************!*\
|
|
4465
|
+
!*** ./node_modules/core-js-pure/modules/es.array.push.js ***!
|
|
4466
|
+
\************************************************************/
|
|
4467
|
+
/*! no static exports found */
|
|
4468
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
4469
|
+
|
|
4470
|
+
"use strict";
|
|
4471
|
+
eval("\n\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js-pure/internals/to-object.js\");\nvar lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ \"./node_modules/core-js-pure/internals/length-of-array-like.js\");\nvar setArrayLength = __webpack_require__(/*! ../internals/array-set-length */ \"./node_modules/core-js-pure/internals/array-set-length.js\");\nvar doesNotExceedSafeInteger = __webpack_require__(/*! ../internals/does-not-exceed-safe-integer */ \"./node_modules/core-js-pure/internals/does-not-exceed-safe-integer.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\nvar INCORRECT_TO_LENGTH = fails(function () {\n return [].push.call({\n length: 0x100000000\n }, 1) !== 4294967297;\n});\n\n// V8 and Safari <= 15.4, FF < 23 throws InternalError\n// https://bugs.chromium.org/p/v8/issues/detail?id=12681\nvar properErrorOnNonWritableLength = function () {\n try {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty([], 'length', {\n writable: false\n }).push();\n } catch (error) {\n return error instanceof TypeError;\n }\n};\nvar FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();\n\n// `Array.prototype.push` method\n// https://tc39.es/ecma262/#sec-array.prototype.push\n$({\n target: 'Array',\n proto: true,\n arity: 1,\n forced: FORCED\n}, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n push: function push(item) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var argCount = arguments.length;\n doesNotExceedSafeInteger(len + argCount);\n for (var i = 0; i < argCount; i++) {\n O[len] = arguments[i];\n len++;\n }\n setArrayLength(O, len);\n return len;\n }\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/es.array.push.js?");
|
|
4472
|
+
|
|
4473
|
+
/***/ }),
|
|
4474
|
+
|
|
4617
4475
|
/***/ "./node_modules/core-js-pure/modules/es.array.reverse.js":
|
|
4618
4476
|
/*!***************************************************************!*\
|
|
4619
4477
|
!*** ./node_modules/core-js-pure/modules/es.array.reverse.js ***!
|
|
@@ -5225,6 +5083,17 @@ eval("// TODO: Remove from `core-js@4`\n__webpack_require__(/*! ../modules/es.ag
|
|
|
5225
5083
|
|
|
5226
5084
|
/***/ }),
|
|
5227
5085
|
|
|
5086
|
+
/***/ "./node_modules/core-js-pure/modules/esnext.function.metadata.js":
|
|
5087
|
+
/*!***********************************************************************!*\
|
|
5088
|
+
!*** ./node_modules/core-js-pure/modules/esnext.function.metadata.js ***!
|
|
5089
|
+
\***********************************************************************/
|
|
5090
|
+
/*! no static exports found */
|
|
5091
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5092
|
+
|
|
5093
|
+
eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar defineProperty = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js-pure/internals/object-define-property.js\").f;\nvar METADATA = wellKnownSymbol('metadata');\nvar FunctionPrototype = Function.prototype;\n\n// Function.prototype[@@metadata]\n// https://github.com/tc39/proposal-decorator-metadata\nif (FunctionPrototype[METADATA] === undefined) {\n defineProperty(FunctionPrototype, METADATA, {\n value: null\n });\n}\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/esnext.function.metadata.js?");
|
|
5094
|
+
|
|
5095
|
+
/***/ }),
|
|
5096
|
+
|
|
5228
5097
|
/***/ "./node_modules/core-js-pure/modules/esnext.promise.all-settled.js":
|
|
5229
5098
|
/*!*************************************************************************!*\
|
|
5230
5099
|
!*** ./node_modules/core-js-pure/modules/esnext.promise.all-settled.js ***!
|
|
@@ -5259,6 +5128,18 @@ eval("\n\n// TODO: Remove from `core-js@4`\nvar $ = __webpack_require__(/*! ../i
|
|
|
5259
5128
|
|
|
5260
5129
|
/***/ }),
|
|
5261
5130
|
|
|
5131
|
+
/***/ "./node_modules/core-js-pure/modules/esnext.promise.with-resolvers.js":
|
|
5132
|
+
/*!****************************************************************************!*\
|
|
5133
|
+
!*** ./node_modules/core-js-pure/modules/esnext.promise.with-resolvers.js ***!
|
|
5134
|
+
\****************************************************************************/
|
|
5135
|
+
/*! no static exports found */
|
|
5136
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5137
|
+
|
|
5138
|
+
"use strict";
|
|
5139
|
+
eval("\n\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ \"./node_modules/core-js-pure/internals/new-promise-capability.js\");\n\n// `Promise.withResolvers` method\n// https://github.com/tc39/proposal-promise-with-resolvers\n$({\n target: 'Promise',\n stat: true,\n forced: true\n}, {\n withResolvers: function withResolvers() {\n var promiseCapability = newPromiseCapabilityModule.f(this);\n return {\n promise: promiseCapability.promise,\n resolve: promiseCapability.resolve,\n reject: promiseCapability.reject\n };\n }\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/esnext.promise.with-resolvers.js?");
|
|
5140
|
+
|
|
5141
|
+
/***/ }),
|
|
5142
|
+
|
|
5262
5143
|
/***/ "./node_modules/core-js-pure/modules/esnext.symbol.async-dispose.js":
|
|
5263
5144
|
/*!**************************************************************************!*\
|
|
5264
5145
|
!*** ./node_modules/core-js-pure/modules/esnext.symbol.async-dispose.js ***!
|
|
@@ -5281,6 +5162,17 @@ eval("var defineWellKnownSymbol = __webpack_require__(/*! ../internals/well-know
|
|
|
5281
5162
|
|
|
5282
5163
|
/***/ }),
|
|
5283
5164
|
|
|
5165
|
+
/***/ "./node_modules/core-js-pure/modules/esnext.symbol.is-registered-symbol.js":
|
|
5166
|
+
/*!*********************************************************************************!*\
|
|
5167
|
+
!*** ./node_modules/core-js-pure/modules/esnext.symbol.is-registered-symbol.js ***!
|
|
5168
|
+
\*********************************************************************************/
|
|
5169
|
+
/*! no static exports found */
|
|
5170
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5171
|
+
|
|
5172
|
+
eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar isRegisteredSymbol = __webpack_require__(/*! ../internals/symbol-is-registered */ \"./node_modules/core-js-pure/internals/symbol-is-registered.js\");\n\n// `Symbol.isRegisteredSymbol` method\n// https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol\n$({\n target: 'Symbol',\n stat: true\n}, {\n isRegisteredSymbol: isRegisteredSymbol\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/esnext.symbol.is-registered-symbol.js?");
|
|
5173
|
+
|
|
5174
|
+
/***/ }),
|
|
5175
|
+
|
|
5284
5176
|
/***/ "./node_modules/core-js-pure/modules/esnext.symbol.is-registered.js":
|
|
5285
5177
|
/*!**************************************************************************!*\
|
|
5286
5178
|
!*** ./node_modules/core-js-pure/modules/esnext.symbol.is-registered.js ***!
|
|
@@ -5288,7 +5180,18 @@ eval("var defineWellKnownSymbol = __webpack_require__(/*! ../internals/well-know
|
|
|
5288
5180
|
/*! no static exports found */
|
|
5289
5181
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5290
5182
|
|
|
5291
|
-
eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar
|
|
5183
|
+
eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar isRegisteredSymbol = __webpack_require__(/*! ../internals/symbol-is-registered */ \"./node_modules/core-js-pure/internals/symbol-is-registered.js\");\n\n// `Symbol.isRegistered` method\n// obsolete version of https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol\n$({\n target: 'Symbol',\n stat: true,\n name: 'isRegisteredSymbol'\n}, {\n isRegistered: isRegisteredSymbol\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/esnext.symbol.is-registered.js?");
|
|
5184
|
+
|
|
5185
|
+
/***/ }),
|
|
5186
|
+
|
|
5187
|
+
/***/ "./node_modules/core-js-pure/modules/esnext.symbol.is-well-known-symbol.js":
|
|
5188
|
+
/*!*********************************************************************************!*\
|
|
5189
|
+
!*** ./node_modules/core-js-pure/modules/esnext.symbol.is-well-known-symbol.js ***!
|
|
5190
|
+
\*********************************************************************************/
|
|
5191
|
+
/*! no static exports found */
|
|
5192
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5193
|
+
|
|
5194
|
+
eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar isWellKnownSymbol = __webpack_require__(/*! ../internals/symbol-is-well-known */ \"./node_modules/core-js-pure/internals/symbol-is-well-known.js\");\n\n// `Symbol.isWellKnownSymbol` method\n// https://tc39.es/proposal-symbol-predicates/#sec-symbol-iswellknownsymbol\n// We should patch it for newly added well-known symbols. If it's not required, this module just will not be injected\n$({\n target: 'Symbol',\n stat: true,\n forced: true\n}, {\n isWellKnownSymbol: isWellKnownSymbol\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/esnext.symbol.is-well-known-symbol.js?");
|
|
5292
5195
|
|
|
5293
5196
|
/***/ }),
|
|
5294
5197
|
|
|
@@ -5299,7 +5202,7 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co
|
|
|
5299
5202
|
/*! no static exports found */
|
|
5300
5203
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5301
5204
|
|
|
5302
|
-
eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar
|
|
5205
|
+
eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar isWellKnownSymbol = __webpack_require__(/*! ../internals/symbol-is-well-known */ \"./node_modules/core-js-pure/internals/symbol-is-well-known.js\");\n\n// `Symbol.isWellKnown` method\n// obsolete version of https://tc39.es/proposal-symbol-predicates/#sec-symbol-iswellknownsymbol\n// We should patch it for newly added well-known symbols. If it's not required, this module just will not be injected\n$({\n target: 'Symbol',\n stat: true,\n name: 'isWellKnownSymbol',\n forced: true\n}, {\n isWellKnown: isWellKnownSymbol\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/esnext.symbol.is-well-known.js?");
|
|
5303
5206
|
|
|
5304
5207
|
/***/ }),
|
|
5305
5208
|
|
|
@@ -5388,7 +5291,29 @@ eval("__webpack_require__(/*! ../modules/es.array.iterator */ \"./node_modules/c
|
|
|
5388
5291
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5389
5292
|
|
|
5390
5293
|
"use strict";
|
|
5391
|
-
eval("\n\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\n__webpack_require__(/*! ../modules/es.array.iterator */ \"./node_modules/core-js-pure/modules/es.array.iterator.js\");\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js-pure/internals/function-call.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js-pure/internals/function-uncurry-this.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar USE_NATIVE_URL = __webpack_require__(/*! ../internals/url-constructor-detection */ \"./node_modules/core-js-pure/internals/url-constructor-detection.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js-pure/internals/define-built-in.js\");\nvar defineBuiltInAccessor = __webpack_require__(/*! ../internals/define-built-in-accessor */ \"./node_modules/core-js-pure/internals/define-built-in-accessor.js\");\nvar defineBuiltIns = __webpack_require__(/*! ../internals/define-built-ins */ \"./node_modules/core-js-pure/internals/define-built-ins.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js-pure/internals/set-to-string-tag.js\");\nvar createIteratorConstructor = __webpack_require__(/*! ../internals/iterator-create-constructor */ \"./node_modules/core-js-pure/internals/iterator-create-constructor.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js-pure/internals/internal-state.js\");\nvar anInstance = __webpack_require__(/*! ../internals/an-instance */ \"./node_modules/core-js-pure/internals/an-instance.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js-pure/internals/is-callable.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js-pure/internals/has-own-property.js\");\nvar bind = __webpack_require__(/*! ../internals/function-bind-context */ \"./node_modules/core-js-pure/internals/function-bind-context.js\");\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js-pure/internals/classof.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js-pure/internals/an-object.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js-pure/internals/is-object.js\");\nvar $toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js-pure/internals/to-string.js\");\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js-pure/internals/object-create.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js-pure/internals/create-property-descriptor.js\");\nvar getIterator = __webpack_require__(/*! ../internals/get-iterator */ \"./node_modules/core-js-pure/internals/get-iterator.js\");\nvar getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ \"./node_modules/core-js-pure/internals/get-iterator-method.js\");\nvar validateArgumentsLength = __webpack_require__(/*! ../internals/validate-arguments-length */ \"./node_modules/core-js-pure/internals/validate-arguments-length.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar arraySort = __webpack_require__(/*! ../internals/array-sort */ \"./node_modules/core-js-pure/internals/array-sort.js\");\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Avoid NodeJS experimental warning\nvar safeGetBuiltIn = function (name) {\n if (!DESCRIPTORS) return global[name];\n var descriptor = getOwnPropertyDescriptor(global, name);\n return descriptor && descriptor.value;\n};\nvar nativeFetch = safeGetBuiltIn('fetch');\nvar NativeRequest = safeGetBuiltIn('Request');\nvar Headers = safeGetBuiltIn('Headers');\nvar RequestPrototype = NativeRequest && NativeRequest.prototype;\nvar HeadersPrototype = Headers && Headers.prototype;\nvar RegExp = global.RegExp;\nvar TypeError = global.TypeError;\nvar decodeURIComponent = global.decodeURIComponent;\nvar encodeURIComponent = global.encodeURIComponent;\nvar charAt = uncurryThis(''.charAt);\nvar join = uncurryThis([].join);\nvar push = uncurryThis([].push);\nvar replace = uncurryThis(''.replace);\nvar shift = uncurryThis([].shift);\nvar splice = uncurryThis([].splice);\nvar split = uncurryThis(''.split);\nvar stringSlice = uncurryThis(''.slice);\nvar plus = /\\+/g;\nvar sequences = Array(4);\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\nvar deserialize = function (it) {\n var result = replace(it, plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = replace(result, percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\nvar find = /[!'()~]|%20/g;\nvar replacements = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\nvar replacer = function (match) {\n return replacements[match];\n};\nvar serialize = function (it) {\n return replace(encodeURIComponent(it), find, replacer);\n};\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n }\n return step;\n}, true);\nvar URLSearchParamsState = function (init) {\n this.entries = [];\n this.url = null;\n if (init !== undefined) {\n if (isObject(init)) this.parseObject(init);else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init));\n }\n};\nURLSearchParamsState.prototype = {\n type: URL_SEARCH_PARAMS,\n bindURL: function (url) {\n this.url = url;\n this.update();\n },\n parseObject: function (object) {\n var iteratorMethod = getIteratorMethod(object);\n var iterator, next, step, entryIterator, entryNext, first, second;\n if (iteratorMethod) {\n iterator = getIterator(object, iteratorMethod);\n next = iterator.next;\n while (!(step = call(next, iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if ((first = call(entryNext, entryIterator)).done || (second = call(entryNext, entryIterator)).done || !call(entryNext, entryIterator).done) throw TypeError('Expected sequence with length 2');\n push(this.entries, {\n key: $toString(first.value),\n value: $toString(second.value)\n });\n }\n } else for (var key in object) if (hasOwn(object, key)) {\n push(this.entries, {\n key: key,\n value: $toString(object[key])\n });\n }\n },\n parseQuery: function (query) {\n if (query) {\n var attributes = split(query, '&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = split(attribute, '=');\n push(this.entries, {\n key: deserialize(shift(entry)),\n value: deserialize(join(entry, '='))\n });\n }\n }\n }\n },\n serialize: function () {\n var entries = this.entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n push(result, serialize(entry.key) + '=' + serialize(entry.value));\n }\n return join(result, '&');\n },\n update: function () {\n this.entries.length = 0;\n this.parseQuery(this.url.query);\n },\n updateURL: function () {\n if (this.url) this.url.update();\n }\n};\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams( /* init */\n) {\n anInstance(this, URLSearchParamsPrototype);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var state = setInternalState(this, new URLSearchParamsState(init));\n if (!DESCRIPTORS) this.length = state.entries.length;\n};\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\ndefineBuiltIns(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.append` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n push(state.entries, {\n key: $toString(name),\n value: $toString(value)\n });\n if (!DESCRIPTORS) this.length++;\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) splice(entries, index, 1);else index++;\n }\n if (!DESCRIPTORS) this.length = entries.length;\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) push(result, entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = $toString(name);\n var val = $toString(value);\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) splice(entries, index--, 1);else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) push(entries, {\n key: key,\n value: val\n });\n if (!DESCRIPTORS) this.length = entries.length;\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n arraySort(state.entries, function (a, b) {\n return a.key > b.key ? 1 : -1;\n });\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, {\n enumerable: true\n});\n\n// `URLSearchParams.prototype[@@iterator]` method\ndefineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, {\n name: 'entries'\n});\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\ndefineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() {\n return getInternalParamsState(this).serialize();\n}, {\n enumerable: true\n});\n\n// `URLSearchParams.prototype.size` getter\n// https://github.com/whatwg/url/pull/734\nif (DESCRIPTORS) defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {\n get: function size() {\n return getInternalParamsState(this).entries.length;\n },\n configurable: true,\n enumerable: true\n});\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n$({\n global: true,\n constructor: true,\n forced: !USE_NATIVE_URL\n}, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`\nif (!USE_NATIVE_URL && isCallable(Headers)) {\n var headersHas = uncurryThis(HeadersPrototype.has);\n var headersSet = uncurryThis(HeadersPrototype.set);\n var wrapRequestOptions = function (init) {\n if (isObject(init)) {\n var body = init.body;\n var headers;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headersHas(headers, 'content-type')) {\n headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n return create(init, {\n body: createPropertyDescriptor(0, $toString(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n }\n return init;\n };\n if (isCallable(nativeFetch)) {\n $({\n global: true,\n enumerable: true,\n dontCallGetSet: true,\n forced: true\n }, {\n fetch: function fetch(input /* , init */) {\n return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n }\n });\n }\n if (isCallable(NativeRequest)) {\n var RequestConstructor = function Request(input /* , init */) {\n anInstance(this, RequestPrototype);\n return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n };\n RequestPrototype.constructor = RequestConstructor;\n RequestConstructor.prototype = RequestPrototype;\n $({\n global: true,\n constructor: true,\n dontCallGetSet: true,\n forced: true\n }, {\n Request: RequestConstructor\n });\n }\n}\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/web.url-search-params.constructor.js?");
|
|
5294
|
+
eval("\n\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\n__webpack_require__(/*! ../modules/es.array.iterator */ \"./node_modules/core-js-pure/modules/es.array.iterator.js\");\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js-pure/internals/function-call.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js-pure/internals/function-uncurry-this.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar USE_NATIVE_URL = __webpack_require__(/*! ../internals/url-constructor-detection */ \"./node_modules/core-js-pure/internals/url-constructor-detection.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js-pure/internals/define-built-in.js\");\nvar defineBuiltInAccessor = __webpack_require__(/*! ../internals/define-built-in-accessor */ \"./node_modules/core-js-pure/internals/define-built-in-accessor.js\");\nvar defineBuiltIns = __webpack_require__(/*! ../internals/define-built-ins */ \"./node_modules/core-js-pure/internals/define-built-ins.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js-pure/internals/set-to-string-tag.js\");\nvar createIteratorConstructor = __webpack_require__(/*! ../internals/iterator-create-constructor */ \"./node_modules/core-js-pure/internals/iterator-create-constructor.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js-pure/internals/internal-state.js\");\nvar anInstance = __webpack_require__(/*! ../internals/an-instance */ \"./node_modules/core-js-pure/internals/an-instance.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js-pure/internals/is-callable.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js-pure/internals/has-own-property.js\");\nvar bind = __webpack_require__(/*! ../internals/function-bind-context */ \"./node_modules/core-js-pure/internals/function-bind-context.js\");\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js-pure/internals/classof.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js-pure/internals/an-object.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js-pure/internals/is-object.js\");\nvar $toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js-pure/internals/to-string.js\");\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js-pure/internals/object-create.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js-pure/internals/create-property-descriptor.js\");\nvar getIterator = __webpack_require__(/*! ../internals/get-iterator */ \"./node_modules/core-js-pure/internals/get-iterator.js\");\nvar getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ \"./node_modules/core-js-pure/internals/get-iterator-method.js\");\nvar validateArgumentsLength = __webpack_require__(/*! ../internals/validate-arguments-length */ \"./node_modules/core-js-pure/internals/validate-arguments-length.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar arraySort = __webpack_require__(/*! ../internals/array-sort */ \"./node_modules/core-js-pure/internals/array-sort.js\");\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Avoid NodeJS experimental warning\nvar safeGetBuiltIn = function (name) {\n if (!DESCRIPTORS) return global[name];\n var descriptor = getOwnPropertyDescriptor(global, name);\n return descriptor && descriptor.value;\n};\nvar nativeFetch = safeGetBuiltIn('fetch');\nvar NativeRequest = safeGetBuiltIn('Request');\nvar Headers = safeGetBuiltIn('Headers');\nvar RequestPrototype = NativeRequest && NativeRequest.prototype;\nvar HeadersPrototype = Headers && Headers.prototype;\nvar RegExp = global.RegExp;\nvar TypeError = global.TypeError;\nvar decodeURIComponent = global.decodeURIComponent;\nvar encodeURIComponent = global.encodeURIComponent;\nvar charAt = uncurryThis(''.charAt);\nvar join = uncurryThis([].join);\nvar push = uncurryThis([].push);\nvar replace = uncurryThis(''.replace);\nvar shift = uncurryThis([].shift);\nvar splice = uncurryThis([].splice);\nvar split = uncurryThis(''.split);\nvar stringSlice = uncurryThis(''.slice);\nvar plus = /\\+/g;\nvar sequences = Array(4);\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\nvar deserialize = function (it) {\n var result = replace(it, plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = replace(result, percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\nvar find = /[!'()~]|%20/g;\nvar replacements = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\nvar replacer = function (match) {\n return replacements[match];\n};\nvar serialize = function (it) {\n return replace(encodeURIComponent(it), find, replacer);\n};\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n }\n return step;\n}, true);\nvar URLSearchParamsState = function (init) {\n this.entries = [];\n this.url = null;\n if (init !== undefined) {\n if (isObject(init)) this.parseObject(init);else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init));\n }\n};\nURLSearchParamsState.prototype = {\n type: URL_SEARCH_PARAMS,\n bindURL: function (url) {\n this.url = url;\n this.update();\n },\n parseObject: function (object) {\n var iteratorMethod = getIteratorMethod(object);\n var iterator, next, step, entryIterator, entryNext, first, second;\n if (iteratorMethod) {\n iterator = getIterator(object, iteratorMethod);\n next = iterator.next;\n while (!(step = call(next, iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if ((first = call(entryNext, entryIterator)).done || (second = call(entryNext, entryIterator)).done || !call(entryNext, entryIterator).done) throw TypeError('Expected sequence with length 2');\n push(this.entries, {\n key: $toString(first.value),\n value: $toString(second.value)\n });\n }\n } else for (var key in object) if (hasOwn(object, key)) {\n push(this.entries, {\n key: key,\n value: $toString(object[key])\n });\n }\n },\n parseQuery: function (query) {\n if (query) {\n var attributes = split(query, '&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = split(attribute, '=');\n push(this.entries, {\n key: deserialize(shift(entry)),\n value: deserialize(join(entry, '='))\n });\n }\n }\n }\n },\n serialize: function () {\n var entries = this.entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n push(result, serialize(entry.key) + '=' + serialize(entry.value));\n }\n return join(result, '&');\n },\n update: function () {\n this.entries.length = 0;\n this.parseQuery(this.url.query);\n },\n updateURL: function () {\n if (this.url) this.url.update();\n }\n};\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams( /* init */\n) {\n anInstance(this, URLSearchParamsPrototype);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var state = setInternalState(this, new URLSearchParamsState(init));\n if (!DESCRIPTORS) this.size = state.entries.length;\n};\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\ndefineBuiltIns(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.append` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n var state = getInternalParamsState(this);\n validateArgumentsLength(arguments.length, 2);\n push(state.entries, {\n key: $toString(name),\n value: $toString(value)\n });\n if (!DESCRIPTORS) this.length++;\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name /* , value */) {\n var state = getInternalParamsState(this);\n var length = validateArgumentsLength(arguments.length, 1);\n var entries = state.entries;\n var key = $toString(name);\n var $value = length < 2 ? undefined : arguments[1];\n var value = $value === undefined ? $value : $toString($value);\n var index = 0;\n while (index < entries.length) {\n var entry = entries[index];\n if (entry.key === key && (value === undefined || entry.value === value)) {\n splice(entries, index, 1);\n if (value !== undefined) break;\n } else index++;\n }\n if (!DESCRIPTORS) this.size = entries.length;\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n var entries = getInternalParamsState(this).entries;\n validateArgumentsLength(arguments.length, 1);\n var key = $toString(name);\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n var entries = getInternalParamsState(this).entries;\n validateArgumentsLength(arguments.length, 1);\n var key = $toString(name);\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) push(result, entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name /* , value */) {\n var entries = getInternalParamsState(this).entries;\n var length = validateArgumentsLength(arguments.length, 1);\n var key = $toString(name);\n var $value = length < 2 ? undefined : arguments[1];\n var value = $value === undefined ? $value : $toString($value);\n var index = 0;\n while (index < entries.length) {\n var entry = entries[index++];\n if (entry.key === key && (value === undefined || entry.value === value)) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n var state = getInternalParamsState(this);\n validateArgumentsLength(arguments.length, 1);\n var entries = state.entries;\n var found = false;\n var key = $toString(name);\n var val = $toString(value);\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) splice(entries, index--, 1);else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) push(entries, {\n key: key,\n value: val\n });\n if (!DESCRIPTORS) this.size = entries.length;\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n arraySort(state.entries, function (a, b) {\n return a.key > b.key ? 1 : -1;\n });\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, {\n enumerable: true\n});\n\n// `URLSearchParams.prototype[@@iterator]` method\ndefineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, {\n name: 'entries'\n});\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\ndefineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() {\n return getInternalParamsState(this).serialize();\n}, {\n enumerable: true\n});\n\n// `URLSearchParams.prototype.size` getter\n// https://github.com/whatwg/url/pull/734\nif (DESCRIPTORS) defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {\n get: function size() {\n return getInternalParamsState(this).entries.length;\n },\n configurable: true,\n enumerable: true\n});\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n$({\n global: true,\n constructor: true,\n forced: !USE_NATIVE_URL\n}, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`\nif (!USE_NATIVE_URL && isCallable(Headers)) {\n var headersHas = uncurryThis(HeadersPrototype.has);\n var headersSet = uncurryThis(HeadersPrototype.set);\n var wrapRequestOptions = function (init) {\n if (isObject(init)) {\n var body = init.body;\n var headers;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headersHas(headers, 'content-type')) {\n headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n return create(init, {\n body: createPropertyDescriptor(0, $toString(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n }\n return init;\n };\n if (isCallable(nativeFetch)) {\n $({\n global: true,\n enumerable: true,\n dontCallGetSet: true,\n forced: true\n }, {\n fetch: function fetch(input /* , init */) {\n return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n }\n });\n }\n if (isCallable(NativeRequest)) {\n var RequestConstructor = function Request(input /* , init */) {\n anInstance(this, RequestPrototype);\n return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n };\n RequestPrototype.constructor = RequestConstructor;\n RequestConstructor.prototype = RequestPrototype;\n $({\n global: true,\n constructor: true,\n dontCallGetSet: true,\n forced: true\n }, {\n Request: RequestConstructor\n });\n }\n}\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/web.url-search-params.constructor.js?");
|
|
5295
|
+
|
|
5296
|
+
/***/ }),
|
|
5297
|
+
|
|
5298
|
+
/***/ "./node_modules/core-js-pure/modules/web.url-search-params.delete.js":
|
|
5299
|
+
/*!***************************************************************************!*\
|
|
5300
|
+
!*** ./node_modules/core-js-pure/modules/web.url-search-params.delete.js ***!
|
|
5301
|
+
\***************************************************************************/
|
|
5302
|
+
/*! no static exports found */
|
|
5303
|
+
/***/ (function(module, exports) {
|
|
5304
|
+
|
|
5305
|
+
eval("// empty\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/web.url-search-params.delete.js?");
|
|
5306
|
+
|
|
5307
|
+
/***/ }),
|
|
5308
|
+
|
|
5309
|
+
/***/ "./node_modules/core-js-pure/modules/web.url-search-params.has.js":
|
|
5310
|
+
/*!************************************************************************!*\
|
|
5311
|
+
!*** ./node_modules/core-js-pure/modules/web.url-search-params.has.js ***!
|
|
5312
|
+
\************************************************************************/
|
|
5313
|
+
/*! no static exports found */
|
|
5314
|
+
/***/ (function(module, exports) {
|
|
5315
|
+
|
|
5316
|
+
eval("// empty\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/modules/web.url-search-params.has.js?");
|
|
5392
5317
|
|
|
5393
5318
|
/***/ }),
|
|
5394
5319
|
|
|
@@ -5557,6 +5482,17 @@ eval("var parent = __webpack_require__(/*! ../../es/instance/map */ \"./node_mod
|
|
|
5557
5482
|
|
|
5558
5483
|
/***/ }),
|
|
5559
5484
|
|
|
5485
|
+
/***/ "./node_modules/core-js-pure/stable/instance/push.js":
|
|
5486
|
+
/*!***********************************************************!*\
|
|
5487
|
+
!*** ./node_modules/core-js-pure/stable/instance/push.js ***!
|
|
5488
|
+
\***********************************************************/
|
|
5489
|
+
/*! no static exports found */
|
|
5490
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5491
|
+
|
|
5492
|
+
eval("var parent = __webpack_require__(/*! ../../es/instance/push */ \"./node_modules/core-js-pure/es/instance/push.js\");\nmodule.exports = parent;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/stable/instance/push.js?");
|
|
5493
|
+
|
|
5494
|
+
/***/ }),
|
|
5495
|
+
|
|
5560
5496
|
/***/ "./node_modules/core-js-pure/stable/instance/reverse.js":
|
|
5561
5497
|
/*!**************************************************************!*\
|
|
5562
5498
|
!*** ./node_modules/core-js-pure/stable/instance/reverse.js ***!
|
|
@@ -5806,7 +5742,7 @@ eval("var parent = __webpack_require__(/*! ../../es/weak-map */ \"./node_modules
|
|
|
5806
5742
|
/*! no static exports found */
|
|
5807
5743
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5808
5744
|
|
|
5809
|
-
eval("__webpack_require__(/*! ../modules/web.url-search-params */ \"./node_modules/core-js-pure/modules/web.url-search-params.js\");\n__webpack_require__(/*! ../modules/web.url-search-params.size */ \"./node_modules/core-js-pure/modules/web.url-search-params.size.js\");\nvar path = __webpack_require__(/*! ../internals/path */ \"./node_modules/core-js-pure/internals/path.js\");\nmodule.exports = path.URLSearchParams;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/web/url-search-params.js?");
|
|
5745
|
+
eval("__webpack_require__(/*! ../modules/web.url-search-params */ \"./node_modules/core-js-pure/modules/web.url-search-params.js\");\n__webpack_require__(/*! ../modules/web.url-search-params.delete */ \"./node_modules/core-js-pure/modules/web.url-search-params.delete.js\");\n__webpack_require__(/*! ../modules/web.url-search-params.has */ \"./node_modules/core-js-pure/modules/web.url-search-params.has.js\");\n__webpack_require__(/*! ../modules/web.url-search-params.size */ \"./node_modules/core-js-pure/modules/web.url-search-params.size.js\");\nvar path = __webpack_require__(/*! ../internals/path */ \"./node_modules/core-js-pure/internals/path.js\");\nmodule.exports = path.URLSearchParams;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/core-js-pure/web/url-search-params.js?");
|
|
5810
5746
|
|
|
5811
5747
|
/***/ }),
|
|
5812
5748
|
|
|
@@ -6023,7 +5959,7 @@ eval("\n\nvar assert = __webpack_require__(/*! minimalistic-assert */ \"./node_m
|
|
|
6023
5959
|
/***/ (function(module, exports, __webpack_require__) {
|
|
6024
5960
|
|
|
6025
5961
|
"use strict";
|
|
6026
|
-
eval("\n\nvar assert = __webpack_require__(/*! minimalistic-assert */ \"./node_modules/minimalistic-assert/index.js\");\nfunction Cipher(options) {\n this.options = options;\n this.type = this.options.type;\n this.blockSize = 8;\n this._init();\n this.buffer = new Array(this.blockSize);\n this.bufferOff = 0;\n}\nmodule.exports = Cipher;\nCipher.prototype._init = function _init() {\n // Might be overrided\n};\nCipher.prototype.update = function update(data) {\n if (data.length === 0) return [];\n if (this.type === 'decrypt') return this._updateDecrypt(data);else return this._updateEncrypt(data);\n};\nCipher.prototype._buffer = function _buffer(data, off) {\n // Append data to buffer\n var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);\n for (var i = 0; i < min; i++) this.buffer[this.bufferOff + i] = data[off + i];\n this.bufferOff += min;\n\n // Shift next\n return min;\n};\nCipher.prototype._flushBuffer = function _flushBuffer(out, off) {\n this._update(this.buffer, 0, out, off);\n this.bufferOff = 0;\n return this.blockSize;\n};\nCipher.prototype._updateEncrypt = function _updateEncrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n var count = (this.bufferOff + data.length) / this.blockSize | 0;\n var out = new Array(count * this.blockSize);\n if (this.bufferOff !== 0) {\n inputOff += this._buffer(data, inputOff);\n if (this.bufferOff === this.buffer.length) outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Write blocks\n var max = data.length - (data.length - inputOff) % this.blockSize;\n for (; inputOff < max; inputOff += this.blockSize) {\n this._update(data, inputOff, out, outputOff);\n outputOff += this.blockSize;\n }\n\n // Queue rest\n for (; inputOff < data.length; inputOff++, this.bufferOff++) this.buffer[this.bufferOff] = data[inputOff];\n return out;\n};\nCipher.prototype._updateDecrypt = function _updateDecrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;\n var out = new Array(count * this.blockSize);\n\n // TODO(indutny): optimize it, this is far from optimal\n for (; count > 0; count--) {\n inputOff += this._buffer(data, inputOff);\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Buffer rest of the input\n inputOff += this._buffer(data, inputOff);\n return out;\n};\nCipher.prototype.final = function final(buffer) {\n var first;\n if (buffer) first = this.update(buffer);\n var last;\n if (this.type === 'encrypt') last = this._finalEncrypt();else last = this._finalDecrypt();\n if (first) return first.concat(last);else return last;\n};\nCipher.prototype._pad = function _pad(buffer, off) {\n if (off === 0) return false;\n while (off < buffer.length) buffer[off++] = 0;\n return true;\n};\nCipher.prototype._finalEncrypt = function _finalEncrypt() {\n if (!this._pad(this.buffer, this.bufferOff)) return [];\n var out = new Array(this.blockSize);\n this._update(this.buffer, 0, out, 0);\n return out;\n};\nCipher.prototype._unpad = function _unpad(buffer) {\n return buffer;\n};\nCipher.prototype._finalDecrypt = function _finalDecrypt() {\n assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');\n var out = new Array(this.blockSize);\n this._flushBuffer(out, 0);\n return this._unpad(out);\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/des.js/lib/des/cipher.js?");
|
|
5962
|
+
eval("\n\nvar assert = __webpack_require__(/*! minimalistic-assert */ \"./node_modules/minimalistic-assert/index.js\");\nfunction Cipher(options) {\n this.options = options;\n this.type = this.options.type;\n this.blockSize = 8;\n this._init();\n this.buffer = new Array(this.blockSize);\n this.bufferOff = 0;\n this.padding = options.padding !== false;\n}\nmodule.exports = Cipher;\nCipher.prototype._init = function _init() {\n // Might be overrided\n};\nCipher.prototype.update = function update(data) {\n if (data.length === 0) return [];\n if (this.type === 'decrypt') return this._updateDecrypt(data);else return this._updateEncrypt(data);\n};\nCipher.prototype._buffer = function _buffer(data, off) {\n // Append data to buffer\n var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);\n for (var i = 0; i < min; i++) this.buffer[this.bufferOff + i] = data[off + i];\n this.bufferOff += min;\n\n // Shift next\n return min;\n};\nCipher.prototype._flushBuffer = function _flushBuffer(out, off) {\n this._update(this.buffer, 0, out, off);\n this.bufferOff = 0;\n return this.blockSize;\n};\nCipher.prototype._updateEncrypt = function _updateEncrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n var count = (this.bufferOff + data.length) / this.blockSize | 0;\n var out = new Array(count * this.blockSize);\n if (this.bufferOff !== 0) {\n inputOff += this._buffer(data, inputOff);\n if (this.bufferOff === this.buffer.length) outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Write blocks\n var max = data.length - (data.length - inputOff) % this.blockSize;\n for (; inputOff < max; inputOff += this.blockSize) {\n this._update(data, inputOff, out, outputOff);\n outputOff += this.blockSize;\n }\n\n // Queue rest\n for (; inputOff < data.length; inputOff++, this.bufferOff++) this.buffer[this.bufferOff] = data[inputOff];\n return out;\n};\nCipher.prototype._updateDecrypt = function _updateDecrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;\n var out = new Array(count * this.blockSize);\n\n // TODO(indutny): optimize it, this is far from optimal\n for (; count > 0; count--) {\n inputOff += this._buffer(data, inputOff);\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Buffer rest of the input\n inputOff += this._buffer(data, inputOff);\n return out;\n};\nCipher.prototype.final = function final(buffer) {\n var first;\n if (buffer) first = this.update(buffer);\n var last;\n if (this.type === 'encrypt') last = this._finalEncrypt();else last = this._finalDecrypt();\n if (first) return first.concat(last);else return last;\n};\nCipher.prototype._pad = function _pad(buffer, off) {\n if (off === 0) return false;\n while (off < buffer.length) buffer[off++] = 0;\n return true;\n};\nCipher.prototype._finalEncrypt = function _finalEncrypt() {\n if (!this._pad(this.buffer, this.bufferOff)) return [];\n var out = new Array(this.blockSize);\n this._update(this.buffer, 0, out, 0);\n return out;\n};\nCipher.prototype._unpad = function _unpad(buffer) {\n return buffer;\n};\nCipher.prototype._finalDecrypt = function _finalDecrypt() {\n assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');\n var out = new Array(this.blockSize);\n this._flushBuffer(out, 0);\n return this._unpad(out);\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/des.js/lib/des/cipher.js?");
|
|
6027
5963
|
|
|
6028
5964
|
/***/ }),
|
|
6029
5965
|
|
|
@@ -6035,7 +5971,7 @@ eval("\n\nvar assert = __webpack_require__(/*! minimalistic-assert */ \"./node_m
|
|
|
6035
5971
|
/***/ (function(module, exports, __webpack_require__) {
|
|
6036
5972
|
|
|
6037
5973
|
"use strict";
|
|
6038
|
-
eval("\n\nvar assert = __webpack_require__(/*! minimalistic-assert */ \"./node_modules/minimalistic-assert/index.js\");\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/des.js/lib/des/utils.js\");\nvar Cipher = __webpack_require__(/*! ./cipher */ \"./node_modules/des.js/lib/des/cipher.js\");\nfunction DESState() {\n this.tmp = new Array(2);\n this.keys = null;\n}\nfunction DES(options) {\n Cipher.call(this, options);\n var state = new DESState();\n this._desState = state;\n this.deriveKeys(state, options.key);\n}\ninherits(DES, Cipher);\nmodule.exports = DES;\nDES.create = function create(options) {\n return new DES(options);\n};\nvar shiftTable = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1];\nDES.prototype.deriveKeys = function deriveKeys(state, key) {\n state.keys = new Array(16 * 2);\n assert.equal(key.length, this.blockSize, 'Invalid key length');\n var kL = utils.readUInt32BE(key, 0);\n var kR = utils.readUInt32BE(key, 4);\n utils.pc1(kL, kR, state.tmp, 0);\n kL = state.tmp[0];\n kR = state.tmp[1];\n for (var i = 0; i < state.keys.length; i += 2) {\n var shift = shiftTable[i >>> 1];\n kL = utils.r28shl(kL, shift);\n kR = utils.r28shl(kR, shift);\n utils.pc2(kL, kR, state.keys, i);\n }\n};\nDES.prototype._update = function _update(inp, inOff, out, outOff) {\n var state = this._desState;\n var l = utils.readUInt32BE(inp, inOff);\n var r = utils.readUInt32BE(inp, inOff + 4);\n\n // Initial Permutation\n utils.ip(l, r, state.tmp, 0);\n l = state.tmp[0];\n r = state.tmp[1];\n if (this.type === 'encrypt') this._encrypt(state, l, r, state.tmp, 0);else this._decrypt(state, l, r, state.tmp, 0);\n l = state.tmp[0];\n r = state.tmp[1];\n utils.writeUInt32BE(out, l, outOff);\n utils.writeUInt32BE(out, r, outOff + 4);\n};\nDES.prototype._pad = function _pad(buffer, off) {\n var value = buffer.length - off;\n for (var i = off; i < buffer.length; i++) buffer[i] = value;\n return true;\n};\nDES.prototype._unpad = function _unpad(buffer) {\n var pad = buffer[buffer.length - 1];\n for (var i = buffer.length - pad; i < buffer.length; i++) assert.equal(buffer[i], pad);\n return buffer.slice(0, buffer.length - pad);\n};\nDES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) {\n var l = lStart;\n var r = rStart;\n\n // Apply f() x16 times\n for (var i = 0; i < state.keys.length; i += 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(r, state.tmp, 0);\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n var t = r;\n r = (l ^ f) >>> 0;\n l = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(r, l, out, off);\n};\nDES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {\n var l = rStart;\n var r = lStart;\n\n // Apply f() x16 times\n for (var i = state.keys.length - 2; i >= 0; i -= 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(l, state.tmp, 0);\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n var t = l;\n l = (r ^ f) >>> 0;\n r = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(l, r, out, off);\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/des.js/lib/des/des.js?");
|
|
5974
|
+
eval("\n\nvar assert = __webpack_require__(/*! minimalistic-assert */ \"./node_modules/minimalistic-assert/index.js\");\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/des.js/lib/des/utils.js\");\nvar Cipher = __webpack_require__(/*! ./cipher */ \"./node_modules/des.js/lib/des/cipher.js\");\nfunction DESState() {\n this.tmp = new Array(2);\n this.keys = null;\n}\nfunction DES(options) {\n Cipher.call(this, options);\n var state = new DESState();\n this._desState = state;\n this.deriveKeys(state, options.key);\n}\ninherits(DES, Cipher);\nmodule.exports = DES;\nDES.create = function create(options) {\n return new DES(options);\n};\nvar shiftTable = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1];\nDES.prototype.deriveKeys = function deriveKeys(state, key) {\n state.keys = new Array(16 * 2);\n assert.equal(key.length, this.blockSize, 'Invalid key length');\n var kL = utils.readUInt32BE(key, 0);\n var kR = utils.readUInt32BE(key, 4);\n utils.pc1(kL, kR, state.tmp, 0);\n kL = state.tmp[0];\n kR = state.tmp[1];\n for (var i = 0; i < state.keys.length; i += 2) {\n var shift = shiftTable[i >>> 1];\n kL = utils.r28shl(kL, shift);\n kR = utils.r28shl(kR, shift);\n utils.pc2(kL, kR, state.keys, i);\n }\n};\nDES.prototype._update = function _update(inp, inOff, out, outOff) {\n var state = this._desState;\n var l = utils.readUInt32BE(inp, inOff);\n var r = utils.readUInt32BE(inp, inOff + 4);\n\n // Initial Permutation\n utils.ip(l, r, state.tmp, 0);\n l = state.tmp[0];\n r = state.tmp[1];\n if (this.type === 'encrypt') this._encrypt(state, l, r, state.tmp, 0);else this._decrypt(state, l, r, state.tmp, 0);\n l = state.tmp[0];\n r = state.tmp[1];\n utils.writeUInt32BE(out, l, outOff);\n utils.writeUInt32BE(out, r, outOff + 4);\n};\nDES.prototype._pad = function _pad(buffer, off) {\n if (this.padding === false) {\n return false;\n }\n var value = buffer.length - off;\n for (var i = off; i < buffer.length; i++) buffer[i] = value;\n return true;\n};\nDES.prototype._unpad = function _unpad(buffer) {\n if (this.padding === false) {\n return buffer;\n }\n var pad = buffer[buffer.length - 1];\n for (var i = buffer.length - pad; i < buffer.length; i++) assert.equal(buffer[i], pad);\n return buffer.slice(0, buffer.length - pad);\n};\nDES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) {\n var l = lStart;\n var r = rStart;\n\n // Apply f() x16 times\n for (var i = 0; i < state.keys.length; i += 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(r, state.tmp, 0);\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n var t = r;\n r = (l ^ f) >>> 0;\n l = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(r, l, out, off);\n};\nDES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {\n var l = rStart;\n var r = lStart;\n\n // Apply f() x16 times\n for (var i = state.keys.length - 2; i >= 0; i -= 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(l, state.tmp, 0);\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n var t = l;\n l = (r ^ f) >>> 0;\n r = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(l, r, out, off);\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/des.js/lib/des/des.js?");
|
|
6039
5975
|
|
|
6040
5976
|
/***/ }),
|
|
6041
5977
|
|
|
@@ -6456,7 +6392,19 @@ eval("\n\nvar implementation = __webpack_require__(/*! ./implementation */ \"./n
|
|
|
6456
6392
|
/***/ (function(module, exports, __webpack_require__) {
|
|
6457
6393
|
|
|
6458
6394
|
"use strict";
|
|
6459
|
-
eval("\n\nvar undefined;\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n try {\n return $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n } catch (e) {}\n};\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n try {\n $gOPD({}, '');\n } catch (e) {\n $gOPD = null; // this is IE 8, which has a broken gOPD\n }\n}\n\nvar throwTypeError = function () {\n throw new $TypeError();\n};\nvar ThrowTypeError = $gOPD ? function () {\n try {\n // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n arguments.callee; // IE 8 does not throw here\n return throwTypeError;\n } catch (calleeThrows) {\n try {\n // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n return $gOPD(arguments, 'callee').get;\n } catch (gOPDthrows) {\n return throwTypeError;\n }\n }\n}() : throwTypeError;\nvar hasSymbols = __webpack_require__(/*! has-symbols */ \"./node_modules/has-symbols/index.js\")();\nvar getProto = Object.getPrototypeOf || function (x) {\n return x.__proto__;\n}; // eslint-disable-line no-proto\n\nvar needsEval = {};\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\nvar INTRINSICS = {\n '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n '%Array%': Array,\n '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n '%AsyncFromSyncIteratorPrototype%': undefined,\n '%AsyncFunction%': needsEval,\n '%AsyncGenerator%': needsEval,\n '%AsyncGeneratorFunction%': needsEval,\n '%AsyncIteratorPrototype%': needsEval,\n '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n '%Boolean%': Boolean,\n '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n '%Date%': Date,\n '%decodeURI%': decodeURI,\n '%decodeURIComponent%': decodeURIComponent,\n '%encodeURI%': encodeURI,\n '%encodeURIComponent%': encodeURIComponent,\n '%Error%': Error,\n '%eval%': eval,\n // eslint-disable-line no-eval\n '%EvalError%': EvalError,\n '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n '%Function%': $Function,\n '%GeneratorFunction%': needsEval,\n '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n '%isFinite%': isFinite,\n '%isNaN%': isNaN,\n '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n '%JSON%': typeof JSON === 'object' ? JSON : undefined,\n '%Map%': typeof Map === 'undefined' ? undefined : Map,\n '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n '%Math%': Math,\n '%Number%': Number,\n '%Object%': Object,\n '%parseFloat%': parseFloat,\n '%parseInt%': parseInt,\n '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n '%RangeError%': RangeError,\n '%ReferenceError%': ReferenceError,\n '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n '%RegExp%': RegExp,\n '%Set%': typeof Set === 'undefined' ? undefined : Set,\n '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n '%String%': String,\n '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n '%Symbol%': hasSymbols ? Symbol : undefined,\n '%SyntaxError%': $SyntaxError,\n '%ThrowTypeError%': ThrowTypeError,\n '%TypedArray%': TypedArray,\n '%TypeError%': $TypeError,\n '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n '%URIError%': URIError,\n '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\ntry {\n null.error; // eslint-disable-line no-unused-expressions\n} catch (e) {\n // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n var errorProto = getProto(getProto(e));\n INTRINSICS['%Error.prototype%'] = errorProto;\n}\nvar doEval = function doEval(name) {\n var value;\n if (name === '%AsyncFunction%') {\n value = getEvalledConstructor('async function () {}');\n } else if (name === '%GeneratorFunction%') {\n value = getEvalledConstructor('function* () {}');\n } else if (name === '%AsyncGeneratorFunction%') {\n value = getEvalledConstructor('async function* () {}');\n } else if (name === '%AsyncGenerator%') {\n var fn = doEval('%AsyncGeneratorFunction%');\n if (fn) {\n value = fn.prototype;\n }\n } else if (name === '%AsyncIteratorPrototype%') {\n var gen = doEval('%AsyncGenerator%');\n if (gen) {\n value = getProto(gen.prototype);\n }\n }\n INTRINSICS[name] = value;\n return value;\n};\nvar LEGACY_ALIASES = {\n '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n '%ArrayPrototype%': ['Array', 'prototype'],\n '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n '%ArrayProto_values%': ['Array', 'prototype', 'values'],\n '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n '%BooleanPrototype%': ['Boolean', 'prototype'],\n '%DataViewPrototype%': ['DataView', 'prototype'],\n '%DatePrototype%': ['Date', 'prototype'],\n '%ErrorPrototype%': ['Error', 'prototype'],\n '%EvalErrorPrototype%': ['EvalError', 'prototype'],\n '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n '%FunctionPrototype%': ['Function', 'prototype'],\n '%Generator%': ['GeneratorFunction', 'prototype'],\n '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n '%JSONParse%': ['JSON', 'parse'],\n '%JSONStringify%': ['JSON', 'stringify'],\n '%MapPrototype%': ['Map', 'prototype'],\n '%NumberPrototype%': ['Number', 'prototype'],\n '%ObjectPrototype%': ['Object', 'prototype'],\n '%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n '%PromisePrototype%': ['Promise', 'prototype'],\n '%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n '%Promise_all%': ['Promise', 'all'],\n '%Promise_reject%': ['Promise', 'reject'],\n '%Promise_resolve%': ['Promise', 'resolve'],\n '%RangeErrorPrototype%': ['RangeError', 'prototype'],\n '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n '%RegExpPrototype%': ['RegExp', 'prototype'],\n '%SetPrototype%': ['Set', 'prototype'],\n '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n '%StringPrototype%': ['String', 'prototype'],\n '%SymbolPrototype%': ['Symbol', 'prototype'],\n '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n '%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n '%TypeErrorPrototype%': ['TypeError', 'prototype'],\n '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n '%URIErrorPrototype%': ['URIError', 'prototype'],\n '%WeakMapPrototype%': ['WeakMap', 'prototype'],\n '%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\nvar hasOwn = __webpack_require__(/*! has */ \"./node_modules/has/src/index.js\");\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n var first = $strSlice(string, 0, 1);\n var last = $strSlice(string, -1);\n if (first === '%' && last !== '%') {\n throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n } else if (last === '%' && first !== '%') {\n throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n }\n var result = [];\n $replace(string, rePropName, function (match, number, quote, subString) {\n result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n });\n return result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n var intrinsicName = name;\n var alias;\n if (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n alias = LEGACY_ALIASES[intrinsicName];\n intrinsicName = '%' + alias[0] + '%';\n }\n if (hasOwn(INTRINSICS, intrinsicName)) {\n var value = INTRINSICS[intrinsicName];\n if (value === needsEval) {\n value = doEval(intrinsicName);\n }\n if (typeof value === 'undefined' && !allowMissing) {\n throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n }\n return {\n alias: alias,\n name: intrinsicName,\n value: value\n };\n }\n throw new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n if (typeof name !== 'string' || name.length === 0) {\n throw new $TypeError('intrinsic name must be a non-empty string');\n }\n if (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n throw new $TypeError('\"allowMissing\" argument must be a boolean');\n }\n if ($exec(/^%?[^%]*%?$/, name) === null) {\n throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n }\n var parts = stringToPath(name);\n var intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n var intrinsicRealName = intrinsic.name;\n var value = intrinsic.value;\n var skipFurtherCaching = false;\n var alias = intrinsic.alias;\n if (alias) {\n intrinsicBaseName = alias[0];\n $spliceApply(parts, $concat([0, 1], alias));\n }\n for (var i = 1, isOwn = true; i < parts.length; i += 1) {\n var part = parts[i];\n var first = $strSlice(part, 0, 1);\n var last = $strSlice(part, -1);\n if ((first === '\"' || first === \"'\" || first === '`' || last === '\"' || last === \"'\" || last === '`') && first !== last) {\n throw new $SyntaxError('property names with quotes must have matching quotes');\n }\n if (part === 'constructor' || !isOwn) {\n skipFurtherCaching = true;\n }\n intrinsicBaseName += '.' + part;\n intrinsicRealName = '%' + intrinsicBaseName + '%';\n if (hasOwn(INTRINSICS, intrinsicRealName)) {\n value = INTRINSICS[intrinsicRealName];\n } else if (value != null) {\n if (!(part in value)) {\n if (!allowMissing) {\n throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n }\n return void undefined;\n }\n if ($gOPD && i + 1 >= parts.length) {\n var desc = $gOPD(value, part);\n isOwn = !!desc;\n\n // By convention, when a data property is converted to an accessor\n // property to emulate a data property that does not suffer from\n // the override mistake, that accessor's getter is marked with\n // an `originalValue` property. Here, when we detect this, we\n // uphold the illusion by pretending to see that original data\n // property, i.e., returning the value rather than the getter\n // itself.\n if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n value = desc.get;\n } else {\n value = value[part];\n }\n } else {\n isOwn = hasOwn(value, part);\n value = value[part];\n }\n if (isOwn && !skipFurtherCaching) {\n INTRINSICS[intrinsicRealName] = value;\n }\n }\n }\n return value;\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/get-intrinsic/index.js?");
|
|
6395
|
+
eval("\n\nvar undefined;\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n try {\n return $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n } catch (e) {}\n};\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n try {\n $gOPD({}, '');\n } catch (e) {\n $gOPD = null; // this is IE 8, which has a broken gOPD\n }\n}\n\nvar throwTypeError = function () {\n throw new $TypeError();\n};\nvar ThrowTypeError = $gOPD ? function () {\n try {\n // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n arguments.callee; // IE 8 does not throw here\n return throwTypeError;\n } catch (calleeThrows) {\n try {\n // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n return $gOPD(arguments, 'callee').get;\n } catch (gOPDthrows) {\n return throwTypeError;\n }\n }\n}() : throwTypeError;\nvar hasSymbols = __webpack_require__(/*! has-symbols */ \"./node_modules/has-symbols/index.js\")();\nvar hasProto = __webpack_require__(/*! has-proto */ \"./node_modules/has-proto/index.js\")();\nvar getProto = Object.getPrototypeOf || (hasProto ? function (x) {\n return x.__proto__;\n} // eslint-disable-line no-proto\n: null);\nvar needsEval = {};\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\nvar INTRINSICS = {\n '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n '%Array%': Array,\n '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n '%AsyncFromSyncIteratorPrototype%': undefined,\n '%AsyncFunction%': needsEval,\n '%AsyncGenerator%': needsEval,\n '%AsyncGeneratorFunction%': needsEval,\n '%AsyncIteratorPrototype%': needsEval,\n '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n '%Boolean%': Boolean,\n '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n '%Date%': Date,\n '%decodeURI%': decodeURI,\n '%decodeURIComponent%': decodeURIComponent,\n '%encodeURI%': encodeURI,\n '%encodeURIComponent%': encodeURIComponent,\n '%Error%': Error,\n '%eval%': eval,\n // eslint-disable-line no-eval\n '%EvalError%': EvalError,\n '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n '%Function%': $Function,\n '%GeneratorFunction%': needsEval,\n '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n '%isFinite%': isFinite,\n '%isNaN%': isNaN,\n '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n '%JSON%': typeof JSON === 'object' ? JSON : undefined,\n '%Map%': typeof Map === 'undefined' ? undefined : Map,\n '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n '%Math%': Math,\n '%Number%': Number,\n '%Object%': Object,\n '%parseFloat%': parseFloat,\n '%parseInt%': parseInt,\n '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n '%RangeError%': RangeError,\n '%ReferenceError%': ReferenceError,\n '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n '%RegExp%': RegExp,\n '%Set%': typeof Set === 'undefined' ? undefined : Set,\n '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n '%String%': String,\n '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n '%Symbol%': hasSymbols ? Symbol : undefined,\n '%SyntaxError%': $SyntaxError,\n '%ThrowTypeError%': ThrowTypeError,\n '%TypedArray%': TypedArray,\n '%TypeError%': $TypeError,\n '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n '%URIError%': URIError,\n '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\nif (getProto) {\n try {\n null.error; // eslint-disable-line no-unused-expressions\n } catch (e) {\n // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n var errorProto = getProto(getProto(e));\n INTRINSICS['%Error.prototype%'] = errorProto;\n }\n}\nvar doEval = function doEval(name) {\n var value;\n if (name === '%AsyncFunction%') {\n value = getEvalledConstructor('async function () {}');\n } else if (name === '%GeneratorFunction%') {\n value = getEvalledConstructor('function* () {}');\n } else if (name === '%AsyncGeneratorFunction%') {\n value = getEvalledConstructor('async function* () {}');\n } else if (name === '%AsyncGenerator%') {\n var fn = doEval('%AsyncGeneratorFunction%');\n if (fn) {\n value = fn.prototype;\n }\n } else if (name === '%AsyncIteratorPrototype%') {\n var gen = doEval('%AsyncGenerator%');\n if (gen && getProto) {\n value = getProto(gen.prototype);\n }\n }\n INTRINSICS[name] = value;\n return value;\n};\nvar LEGACY_ALIASES = {\n '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n '%ArrayPrototype%': ['Array', 'prototype'],\n '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n '%ArrayProto_values%': ['Array', 'prototype', 'values'],\n '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n '%BooleanPrototype%': ['Boolean', 'prototype'],\n '%DataViewPrototype%': ['DataView', 'prototype'],\n '%DatePrototype%': ['Date', 'prototype'],\n '%ErrorPrototype%': ['Error', 'prototype'],\n '%EvalErrorPrototype%': ['EvalError', 'prototype'],\n '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n '%FunctionPrototype%': ['Function', 'prototype'],\n '%Generator%': ['GeneratorFunction', 'prototype'],\n '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n '%JSONParse%': ['JSON', 'parse'],\n '%JSONStringify%': ['JSON', 'stringify'],\n '%MapPrototype%': ['Map', 'prototype'],\n '%NumberPrototype%': ['Number', 'prototype'],\n '%ObjectPrototype%': ['Object', 'prototype'],\n '%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n '%PromisePrototype%': ['Promise', 'prototype'],\n '%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n '%Promise_all%': ['Promise', 'all'],\n '%Promise_reject%': ['Promise', 'reject'],\n '%Promise_resolve%': ['Promise', 'resolve'],\n '%RangeErrorPrototype%': ['RangeError', 'prototype'],\n '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n '%RegExpPrototype%': ['RegExp', 'prototype'],\n '%SetPrototype%': ['Set', 'prototype'],\n '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n '%StringPrototype%': ['String', 'prototype'],\n '%SymbolPrototype%': ['Symbol', 'prototype'],\n '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n '%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n '%TypeErrorPrototype%': ['TypeError', 'prototype'],\n '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n '%URIErrorPrototype%': ['URIError', 'prototype'],\n '%WeakMapPrototype%': ['WeakMap', 'prototype'],\n '%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\nvar hasOwn = __webpack_require__(/*! has */ \"./node_modules/has/src/index.js\");\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n var first = $strSlice(string, 0, 1);\n var last = $strSlice(string, -1);\n if (first === '%' && last !== '%') {\n throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n } else if (last === '%' && first !== '%') {\n throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n }\n var result = [];\n $replace(string, rePropName, function (match, number, quote, subString) {\n result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n });\n return result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n var intrinsicName = name;\n var alias;\n if (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n alias = LEGACY_ALIASES[intrinsicName];\n intrinsicName = '%' + alias[0] + '%';\n }\n if (hasOwn(INTRINSICS, intrinsicName)) {\n var value = INTRINSICS[intrinsicName];\n if (value === needsEval) {\n value = doEval(intrinsicName);\n }\n if (typeof value === 'undefined' && !allowMissing) {\n throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n }\n return {\n alias: alias,\n name: intrinsicName,\n value: value\n };\n }\n throw new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n if (typeof name !== 'string' || name.length === 0) {\n throw new $TypeError('intrinsic name must be a non-empty string');\n }\n if (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n throw new $TypeError('\"allowMissing\" argument must be a boolean');\n }\n if ($exec(/^%?[^%]*%?$/, name) === null) {\n throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n }\n var parts = stringToPath(name);\n var intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n var intrinsicRealName = intrinsic.name;\n var value = intrinsic.value;\n var skipFurtherCaching = false;\n var alias = intrinsic.alias;\n if (alias) {\n intrinsicBaseName = alias[0];\n $spliceApply(parts, $concat([0, 1], alias));\n }\n for (var i = 1, isOwn = true; i < parts.length; i += 1) {\n var part = parts[i];\n var first = $strSlice(part, 0, 1);\n var last = $strSlice(part, -1);\n if ((first === '\"' || first === \"'\" || first === '`' || last === '\"' || last === \"'\" || last === '`') && first !== last) {\n throw new $SyntaxError('property names with quotes must have matching quotes');\n }\n if (part === 'constructor' || !isOwn) {\n skipFurtherCaching = true;\n }\n intrinsicBaseName += '.' + part;\n intrinsicRealName = '%' + intrinsicBaseName + '%';\n if (hasOwn(INTRINSICS, intrinsicRealName)) {\n value = INTRINSICS[intrinsicRealName];\n } else if (value != null) {\n if (!(part in value)) {\n if (!allowMissing) {\n throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n }\n return void undefined;\n }\n if ($gOPD && i + 1 >= parts.length) {\n var desc = $gOPD(value, part);\n isOwn = !!desc;\n\n // By convention, when a data property is converted to an accessor\n // property to emulate a data property that does not suffer from\n // the override mistake, that accessor's getter is marked with\n // an `originalValue` property. Here, when we detect this, we\n // uphold the illusion by pretending to see that original data\n // property, i.e., returning the value rather than the getter\n // itself.\n if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n value = desc.get;\n } else {\n value = value[part];\n }\n } else {\n isOwn = hasOwn(value, part);\n value = value[part];\n }\n if (isOwn && !skipFurtherCaching) {\n INTRINSICS[intrinsicRealName] = value;\n }\n }\n }\n return value;\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/get-intrinsic/index.js?");
|
|
6396
|
+
|
|
6397
|
+
/***/ }),
|
|
6398
|
+
|
|
6399
|
+
/***/ "./node_modules/has-proto/index.js":
|
|
6400
|
+
/*!*****************************************!*\
|
|
6401
|
+
!*** ./node_modules/has-proto/index.js ***!
|
|
6402
|
+
\*****************************************/
|
|
6403
|
+
/*! no static exports found */
|
|
6404
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6405
|
+
|
|
6406
|
+
"use strict";
|
|
6407
|
+
eval("\n\nvar test = {\n foo: {}\n};\nvar $Object = Object;\nmodule.exports = function hasProto() {\n return {\n __proto__: test\n }.foo === test.foo && !({\n __proto__: null\n } instanceof $Object);\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/has-proto/index.js?");
|
|
6460
6408
|
|
|
6461
6409
|
/***/ }),
|
|
6462
6410
|
|
|
@@ -8638,7 +8586,7 @@ eval("\n\nvar stringify = __webpack_require__(/*! ./stringify */ \"./node_module
|
|
|
8638
8586
|
/***/ (function(module, exports, __webpack_require__) {
|
|
8639
8587
|
|
|
8640
8588
|
"use strict";
|
|
8641
|
-
eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/qs/lib/utils.js\");\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictNullHandling: false\n};\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = {};\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options), function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n });\n }\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n if (has.call(obj, key)) {\n obj[key] = utils.combine(obj[key], val);\n } else {\n obj[key] = val;\n }\n }\n return obj;\n};\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n if (root === '[]' && options.parseArrays) {\n obj = [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (!options.parseArrays && cleanRoot === '') {\n obj = {\n 0: leaf\n };\n } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && options.parseArrays && index <= options.arrayLimit) {\n obj = [];\n obj[index] = leaf;\n } else if (cleanRoot !== '__proto__') {\n obj[cleanRoot] = leaf;\n }\n }\n leaf = obj;\n }\n return leaf;\n};\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n return parseObject(keys, val, options, valuesParsed);\n};\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n return {\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: typeof opts.depth === 'number' || opts.depth === false ? +opts.depth : defaults.depth,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n if (options.allowSparse === true) {\n return obj;\n }\n return utils.compact(obj);\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/qs/lib/parse.js?");
|
|
8589
|
+
eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/qs/lib/utils.js\");\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictNullHandling: false\n};\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = {\n __proto__: null\n };\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options), function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n });\n }\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n if (has.call(obj, key)) {\n obj[key] = utils.combine(obj[key], val);\n } else {\n obj[key] = val;\n }\n }\n return obj;\n};\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n if (root === '[]' && options.parseArrays) {\n obj = [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (!options.parseArrays && cleanRoot === '') {\n obj = {\n 0: leaf\n };\n } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && options.parseArrays && index <= options.arrayLimit) {\n obj = [];\n obj[index] = leaf;\n } else if (cleanRoot !== '__proto__') {\n obj[cleanRoot] = leaf;\n }\n }\n leaf = obj;\n }\n return leaf;\n};\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n return parseObject(keys, val, options, valuesParsed);\n};\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n return {\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: typeof opts.depth === 'number' || opts.depth === false ? +opts.depth : defaults.depth,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n if (options.allowSparse === true) {\n return obj;\n }\n return utils.compact(obj);\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/qs/lib/parse.js?");
|
|
8642
8590
|
|
|
8643
8591
|
/***/ }),
|
|
8644
8592
|
|
|
@@ -8666,42 +8614,6 @@ eval("\n\nvar formats = __webpack_require__(/*! ./formats */ \"./node_modules/qs
|
|
|
8666
8614
|
|
|
8667
8615
|
/***/ }),
|
|
8668
8616
|
|
|
8669
|
-
/***/ "./node_modules/querystring-es3/decode.js":
|
|
8670
|
-
/*!************************************************!*\
|
|
8671
|
-
!*** ./node_modules/querystring-es3/decode.js ***!
|
|
8672
|
-
\************************************************/
|
|
8673
|
-
/*! no static exports found */
|
|
8674
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
8675
|
-
|
|
8676
|
-
"use strict";
|
|
8677
|
-
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nmodule.exports = function (qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n var regexp = /\\+/g;\n qs = qs.split(sep);\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr,\n vstr,\n k,\n v;\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n return obj;\n};\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/querystring-es3/decode.js?");
|
|
8678
|
-
|
|
8679
|
-
/***/ }),
|
|
8680
|
-
|
|
8681
|
-
/***/ "./node_modules/querystring-es3/encode.js":
|
|
8682
|
-
/*!************************************************!*\
|
|
8683
|
-
!*** ./node_modules/querystring-es3/encode.js ***!
|
|
8684
|
-
\************************************************/
|
|
8685
|
-
/*! no static exports found */
|
|
8686
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
8687
|
-
|
|
8688
|
-
"use strict";
|
|
8689
|
-
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar stringifyPrimitive = function (v) {\n switch (typeof v) {\n case 'string':\n return v;\n case 'boolean':\n return v ? 'true' : 'false';\n case 'number':\n return isFinite(v) ? v : '';\n default:\n return '';\n }\n};\nmodule.exports = function (obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function (k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function (v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n }\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));\n};\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\nfunction map(xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/querystring-es3/encode.js?");
|
|
8690
|
-
|
|
8691
|
-
/***/ }),
|
|
8692
|
-
|
|
8693
|
-
/***/ "./node_modules/querystring-es3/index.js":
|
|
8694
|
-
/*!***********************************************!*\
|
|
8695
|
-
!*** ./node_modules/querystring-es3/index.js ***!
|
|
8696
|
-
\***********************************************/
|
|
8697
|
-
/*! no static exports found */
|
|
8698
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
8699
|
-
|
|
8700
|
-
"use strict";
|
|
8701
|
-
eval("\n\nexports.decode = exports.parse = __webpack_require__(/*! ./decode */ \"./node_modules/querystring-es3/decode.js\");\nexports.encode = exports.stringify = __webpack_require__(/*! ./encode */ \"./node_modules/querystring-es3/encode.js\");\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/querystring-es3/index.js?");
|
|
8702
|
-
|
|
8703
|
-
/***/ }),
|
|
8704
|
-
|
|
8705
8617
|
/***/ "./node_modules/randombytes/browser.js":
|
|
8706
8618
|
/*!*********************************************!*\
|
|
8707
8619
|
!*** ./node_modules/randombytes/browser.js ***!
|
|
@@ -9583,11 +9495,11 @@ eval("\n\n// TODO: use call-bind, is-date, is-regex, is-string, is-boolean-objec
|
|
|
9583
9495
|
/*!*****************************************!*\
|
|
9584
9496
|
!*** ./node_modules/tslib/tslib.es6.js ***!
|
|
9585
9497
|
\*****************************************/
|
|
9586
|
-
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn */
|
|
9498
|
+
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources, default */
|
|
9587
9499
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9588
9500
|
|
|
9589
9501
|
"use strict";
|
|
9590
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__extends\", function() { return __extends; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__assign\", function() { return __assign; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__rest\", function() { return __rest; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__decorate\", function() { return __decorate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__param\", function() { return __param; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__esDecorate\", function() { return __esDecorate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__runInitializers\", function() { return __runInitializers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__propKey\", function() { return __propKey; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__setFunctionName\", function() { return __setFunctionName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__metadata\", function() { return __metadata; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__awaiter\", function() { return __awaiter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__generator\", function() { return __generator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__createBinding\", function() { return __createBinding; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__exportStar\", function() { return __exportStar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__values\", function() { return __values; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__read\", function() { return __read; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spread\", function() { return __spread; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spreadArrays\", function() { return __spreadArrays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spreadArray\", function() { return __spreadArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__await\", function() { return __await; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncGenerator\", function() { return __asyncGenerator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncDelegator\", function() { return __asyncDelegator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncValues\", function() { return __asyncValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__makeTemplateObject\", function() { return __makeTemplateObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__importStar\", function() { return __importStar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__importDefault\", function() { return __importDefault; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__classPrivateFieldGet\", function() { return __classPrivateFieldGet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__classPrivateFieldSet\", function() { return __classPrivateFieldSet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__classPrivateFieldIn\", function() { return __classPrivateFieldIn; });\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nfunction __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nfunction __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nfunction __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) {\n if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\");\n return f;\n }\n var kind = contextIn.kind,\n key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _,\n done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) {\n if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f || null));\n };\n var result = (0, decorators[i])(kind === \"accessor\" ? {\n get: descriptor.get,\n set: descriptor.set\n } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.push(_);\n } else if (_ = accept(result)) {\n if (kind === \"field\") initializers.push(_);else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n}\n;\nfunction __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n}\n;\nfunction __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n}\n;\nfunction __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", {\n configurable: true,\n value: prefix ? \"\".concat(prefix, \" \", name) : name\n });\n}\n;\nfunction __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nfunction __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nvar __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\n }\n Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nfunction __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nfunction __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\n\n/** @deprecated */\nfunction __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\nfunction __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nfunction __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nfunction __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: false\n } : f ? f(v) : v;\n } : f;\n }\n}\nfunction __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nfunction __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\nfunction __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\nfunction __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}\nfunction __classPrivateFieldIn(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\") throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/tslib/tslib.es6.js?");
|
|
9502
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__extends\", function() { return __extends; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__assign\", function() { return __assign; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__rest\", function() { return __rest; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__decorate\", function() { return __decorate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__param\", function() { return __param; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__esDecorate\", function() { return __esDecorate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__runInitializers\", function() { return __runInitializers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__propKey\", function() { return __propKey; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__setFunctionName\", function() { return __setFunctionName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__metadata\", function() { return __metadata; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__awaiter\", function() { return __awaiter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__generator\", function() { return __generator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__createBinding\", function() { return __createBinding; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__exportStar\", function() { return __exportStar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__values\", function() { return __values; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__read\", function() { return __read; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spread\", function() { return __spread; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spreadArrays\", function() { return __spreadArrays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spreadArray\", function() { return __spreadArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__await\", function() { return __await; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncGenerator\", function() { return __asyncGenerator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncDelegator\", function() { return __asyncDelegator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncValues\", function() { return __asyncValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__makeTemplateObject\", function() { return __makeTemplateObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__importStar\", function() { return __importStar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__importDefault\", function() { return __importDefault; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__classPrivateFieldGet\", function() { return __classPrivateFieldGet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__classPrivateFieldSet\", function() { return __classPrivateFieldSet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__classPrivateFieldIn\", function() { return __classPrivateFieldIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__addDisposableResource\", function() { return __addDisposableResource; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__disposeResources\", function() { return __disposeResources; });\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nfunction __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nfunction __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nfunction __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) {\n if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\");\n return f;\n }\n var kind = contextIn.kind,\n key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _,\n done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) {\n if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f || null));\n };\n var result = (0, decorators[i])(kind === \"accessor\" ? {\n get: descriptor.get,\n set: descriptor.set\n } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n } else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n}\n;\nfunction __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n}\n;\nfunction __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n}\n;\nfunction __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", {\n configurable: true,\n value: prefix ? \"\".concat(prefix, \" \", name) : name\n });\n}\n;\nfunction __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nfunction __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nvar __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\n }\n Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nfunction __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nfunction __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\n\n/** @deprecated */\nfunction __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\nfunction __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nfunction __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nfunction __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: false\n } : f ? f(v) : v;\n } : f;\n }\n}\nfunction __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nfunction __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\nfunction __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\nfunction __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}\nfunction __classPrivateFieldIn(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\") throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\nfunction __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({\n value: value,\n dispose: dispose,\n async: async\n });\n } else if (async) {\n env.stack.push({\n async: true\n });\n }\n return value;\n}\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\nfunction __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function (e) {\n fail(e);\n return next();\n });\n } catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/tslib/tslib.es6.js?");
|
|
9591
9503
|
|
|
9592
9504
|
/***/ }),
|
|
9593
9505
|
|
|
@@ -9599,19 +9511,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
9599
9511
|
/***/ (function(module, exports, __webpack_require__) {
|
|
9600
9512
|
|
|
9601
9513
|
"use strict";
|
|
9602
|
-
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar punycode = __webpack_require__(/*! punycode */ \"./node_modules/node-libs-browser/node_modules/punycode/punycode.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/url/util.js\");\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\nexports.Url = Url;\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = __webpack_require__(/*! querystring */ \"./node_modules/querystring-es3/index.js\");\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n var u = new Url();\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\nUrl.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) hostEnd = rest.length;\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1) continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\nUrl.prototype.format = function () {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n if (this.query && util.isObject(this.query) && Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n var search = this.search || query && '?' + query || '';\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n pathname = pathname.replace(/[?#]/g, function (match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n return protocol + host + pathname + search + hash;\n};\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\nUrl.prototype.resolve = function (relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\nUrl.prototype.resolveObject = function (relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol') result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n result.href = result.format();\n return result;\n }\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/',\n isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname,\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n if (isRelAbs) {\n // it's absolute.\n result.host = relative.host || relative.host === '' ? relative.host : result.host;\n result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n if (hasTrailingSlash && srcPath.join('/').substr(-1) !== '/') {\n srcPath.push('');\n }\n var isAbsolute = srcPath[0] === '' || srcPath[0] && srcPath[0].charAt(0) === '/';\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n mustEndAbs = mustEndAbs || result.host && srcPath.length;\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\nUrl.prototype.parseHost = function () {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/url/url.js?");
|
|
9603
|
-
|
|
9604
|
-
/***/ }),
|
|
9605
|
-
|
|
9606
|
-
/***/ "./node_modules/url/util.js":
|
|
9607
|
-
/*!**********************************!*\
|
|
9608
|
-
!*** ./node_modules/url/util.js ***!
|
|
9609
|
-
\**********************************/
|
|
9610
|
-
/*! no static exports found */
|
|
9611
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9612
|
-
|
|
9613
|
-
"use strict";
|
|
9614
|
-
eval("\n\nmodule.exports = {\n isString: function (arg) {\n return typeof arg === 'string';\n },\n isObject: function (arg) {\n return typeof arg === 'object' && arg !== null;\n },\n isNull: function (arg) {\n return arg === null;\n },\n isNullOrUndefined: function (arg) {\n return arg == null;\n }\n};\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/url/util.js?");
|
|
9514
|
+
eval("/*\n * Copyright Joyent, Inc. and other Node contributors.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to permit\n * persons to whom the Software is furnished to do so, subject to the\n * following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n * USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\nvar punycode = __webpack_require__(/*! punycode */ \"./node_modules/node-libs-browser/node_modules/punycode/punycode.js\");\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n/*\n * define these here so at least they only have to be\n * compiled once on the first module load.\n */\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^?\\s]*)(\\?[^\\s]*)?$/,\n /*\n * RFC 2396: characters reserved for delimiting URLs.\n * We actually just auto-escape these.\n */\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n /*\n * Characters that are never ever allowed in a hostname.\n * Note that any invalid chars are also handled, but these\n * are the ones that are *expected* to be seen, so we fast-path\n * them.\n */\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n javascript: true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n javascript: true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n http: true,\n https: true,\n ftp: true,\n gopher: true,\n file: true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = __webpack_require__(/*! qs */ \"./node_modules/qs/lib/index.js\");\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && typeof url === 'object' && url instanceof Url) {\n return url;\n }\n var u = new Url();\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\nUrl.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {\n if (typeof url !== 'string') {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n /*\n * Copy chrome, IE, opera backslash-handling behavior.\n * Back slashes before the query string get converted to forward slashes\n * See: https://code.google.com/p/chromium/issues/detail?id=25916\n */\n var queryIndex = url.indexOf('?'),\n splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n var rest = url;\n\n /*\n * trim before proceeding.\n * This is to support parse stuff like \" http://foo.com \\n\"\n */\n rest = rest.trim();\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n /*\n * figure out if it's got a host\n * user@server is *always* interpreted as a hostname, and url\n * resolution will treat //foo/bar as host=foo,path=bar because that's\n * how the browser resolves relative URLs.\n */\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@/]+@[^@/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {\n /*\n * there's a hostname.\n * the first instance of /, ?, ;, or # ends the host.\n *\n * If there is an @ in the hostname, then non-host chars *are* allowed\n * to the left of the last @ sign, unless some host-ending character\n * comes *before* the @-sign.\n * URLs are obnoxious.\n *\n * ex:\n * http://a@b@c/ => user:a@b host:c\n * http://a@b?@c => user:a host:c path:/?@c\n */\n\n /*\n * v0.12 TODO(isaacs): This is not quite how Chrome does things.\n * Review our test case against browsers more comprehensively.\n */\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n\n /*\n * at this point, either we have an explicit point where the\n * auth portion cannot go past, or the last @ char is the decider.\n */\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n /*\n * atSign must be in auth portion.\n * http://a@b/c@d => host:b auth:a path:/c@d\n */\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n /*\n * Now we have a portion which is definitely the auth.\n * Pull that off.\n */\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) {\n hostEnd = rest.length;\n }\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n /*\n * we've indicated that there is a hostname,\n * so even if it's empty, it has to be present.\n */\n this.hostname = this.hostname || '';\n\n /*\n * if hostname begins with [ and ends with ]\n * assume that it's an IPv6 address.\n */\n var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) {\n continue;\n }\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n /*\n * we replace non-ASCII char with a temporary placeholder\n * we need this to make sure size of hostname is not\n * broken by replacing non-ASCII by nothing\n */\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n if (!ipv6Hostname) {\n /*\n * IDNA Support: Returns a punycoded representation of \"domain\".\n * It only converts parts of the domain name that\n * have non-ASCII characters, i.e. it doesn't matter if\n * you call it with a domain that already is ASCII-only.\n */\n this.hostname = punycode.toASCII(this.hostname);\n }\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n /*\n * strip [ and ] from the hostname\n * the host field still retains them, though\n */\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n /*\n * now rest is set to the post-host stuff.\n * chop off any delim chars.\n */\n if (!unsafeProtocol[lowerProto]) {\n /*\n * First, make 100% sure that any \"autoEscape\" chars get\n * escaped, even if encodeURIComponent doesn't think they\n * need to be.\n */\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1) {\n continue;\n }\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) {\n this.pathname = rest;\n }\n if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n // to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n /*\n * ensure it's an object, and not a string url.\n * If it's an obj, this is a no-op.\n * this way, you can call url_format() on strings\n * to clean up potentially wonky urls.\n */\n if (typeof obj === 'string') {\n obj = urlParse(obj);\n }\n if (!(obj instanceof Url)) {\n return Url.prototype.format.call(obj);\n }\n return obj.format();\n}\nUrl.prototype.format = function () {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n if (this.query && typeof this.query === 'object' && Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n var search = this.search || query && '?' + query || '';\n if (protocol && protocol.substr(-1) !== ':') {\n protocol += ':';\n }\n\n /*\n * only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n * unless they had them to begin with.\n */\n if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') {\n pathname = '/' + pathname;\n }\n } else if (!host) {\n host = '';\n }\n if (hash && hash.charAt(0) !== '#') {\n hash = '#' + hash;\n }\n if (search && search.charAt(0) !== '?') {\n search = '?' + search;\n }\n pathname = pathname.replace(/[?#]/g, function (match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n return protocol + host + pathname + search + hash;\n};\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\nUrl.prototype.resolve = function (relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\nfunction urlResolveObject(source, relative) {\n if (!source) {\n return relative;\n }\n return urlParse(source, false, true).resolveObject(relative);\n}\nUrl.prototype.resolveObject = function (relative) {\n if (typeof relative === 'string') {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n /*\n * hash is always overridden, no matter what.\n * even href=\"\" will remove it.\n */\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol') {\n result[rkey] = relative[rkey];\n }\n }\n\n // urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {\n result.pathname = '/';\n result.path = result.pathname;\n }\n result.href = result.format();\n return result;\n }\n if (relative.protocol && relative.protocol !== result.protocol) {\n /*\n * if it's a known url protocol, then changing\n * the protocol does weird things\n * first, if it's not file:, then we MUST have a host,\n * and if there was a path\n * to begin with, then we MUST have a path.\n * if it is file:, then the host is dropped,\n * because that's known to be hostless.\n * anything else is assumed to be absolute.\n */\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift())) {}\n if (!relative.host) {\n relative.host = '';\n }\n if (!relative.hostname) {\n relative.hostname = '';\n }\n if (relPath[0] !== '') {\n relPath.unshift('');\n }\n if (relPath.length < 2) {\n relPath.unshift('');\n }\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/',\n isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname,\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n /*\n * if the url is a non-slashed url, then relative\n * links like ../.. should be able\n * to crawl up to the hostname, as well. This is strange.\n * result.protocol has already been set by now.\n * Later on, put the first path part into the host field.\n */\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') {\n srcPath[0] = result.host;\n } else {\n srcPath.unshift(result.host);\n }\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') {\n relPath[0] = relative.host;\n } else {\n relPath.unshift(relative.host);\n }\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n if (isRelAbs) {\n // it's absolute.\n result.host = relative.host || relative.host === '' ? relative.host : result.host;\n result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n /*\n * it's relative\n * throw away the existing file, and take the new path instead.\n */\n if (!srcPath) {\n srcPath = [];\n }\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (relative.search != null) {\n /*\n * just pull out the search.\n * like href='?foo'.\n * Put this after the other two cases because it simplifies the booleans\n */\n if (psychotic) {\n result.host = srcPath.shift();\n result.hostname = result.host;\n /*\n * occationaly the auth can get stuck only in host\n * this especially happens in cases like\n * url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n // to support http.request\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n if (!srcPath.length) {\n /*\n * no path at all. easy.\n * we've already handled the other stuff above.\n */\n result.pathname = null;\n // to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n /*\n * if a url ENDs in . or .., then it must get a trailing slash.\n * however, if it ends in anything else non-slashy,\n * then it must NOT get a trailing slash.\n */\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';\n\n /*\n * strip single dots, resolve double dots to parent dir\n * if the path tries to go above the root, `up` ends up > 0\n */\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n if (hasTrailingSlash && srcPath.join('/').substr(-1) !== '/') {\n srcPath.push('');\n }\n var isAbsolute = srcPath[0] === '' || srcPath[0] && srcPath[0].charAt(0) === '/';\n\n // put the host back\n if (psychotic) {\n result.hostname = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';\n result.host = result.hostname;\n /*\n * occationaly the auth can get stuck only in host\n * this especially happens in cases like\n * url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n mustEndAbs = mustEndAbs || result.host && srcPath.length;\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n if (srcPath.length > 0) {\n result.pathname = srcPath.join('/');\n } else {\n result.pathname = null;\n result.path = null;\n }\n\n // to support request.http\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\nUrl.prototype.parseHost = function () {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) {\n this.hostname = host;\n }\n};\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\nexports.Url = Url;\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/url/url.js?");
|
|
9615
9515
|
|
|
9616
9516
|
/***/ }),
|
|
9617
9517
|
|
|
@@ -9749,7 +9649,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
9749
9649
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9750
9650
|
|
|
9751
9651
|
"use strict";
|
|
9752
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimRTCIceCandidate\", function() { return shimRTCIceCandidate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimRTCIceCandidateRelayProtocol\", function() { return shimRTCIceCandidateRelayProtocol; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimMaxMessageSize\", function() { return shimMaxMessageSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimSendThrowTypeError\", function() { return shimSendThrowTypeError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimConnectionState\", function() { return shimConnectionState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeExtmapAllowMixed\", function() { return removeExtmapAllowMixed; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimAddIceCandidateNullOrEmpty\", function() { return shimAddIceCandidateNullOrEmpty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimParameterlessSetLocalDescription\", function() { return shimParameterlessSetLocalDescription; });\n/* harmony import */ var sdp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sdp */ \"./node_modules/sdp/sdp.js\");\n/* harmony import */ var sdp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sdp__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./node_modules/webrtc-adapter/src/js/utils.js\");\n/*\n * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n/* eslint-env node */\n\n\n\n\nfunction shimRTCIceCandidate(window) {\n // foundation is arbitrarily chosen as an indicator for full support for\n // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface\n if (!window.RTCIceCandidate || window.RTCIceCandidate && 'foundation' in window.RTCIceCandidate.prototype) {\n return;\n }\n const NativeRTCIceCandidate = window.RTCIceCandidate;\n window.RTCIceCandidate = function RTCIceCandidate(args) {\n // Remove the a= which shouldn't be part of the candidate string.\n if (typeof args === 'object' && args.candidate && args.candidate.indexOf('a=') === 0) {\n args = JSON.parse(JSON.stringify(args));\n args.candidate = args.candidate.substring(2);\n }\n if (args.candidate && args.candidate.length) {\n // Augment the native candidate with the parsed fields.\n const nativeCandidate = new NativeRTCIceCandidate(args);\n const parsedCandidate = sdp__WEBPACK_IMPORTED_MODULE_0___default.a.parseCandidate(args.candidate);\n const augmentedCandidate = Object.assign(nativeCandidate, parsedCandidate);\n\n // Add a serializer that does not serialize the extra attributes.\n augmentedCandidate.toJSON = function toJSON() {\n return {\n candidate: augmentedCandidate.candidate,\n sdpMid: augmentedCandidate.sdpMid,\n sdpMLineIndex: augmentedCandidate.sdpMLineIndex,\n usernameFragment: augmentedCandidate.usernameFragment\n };\n };\n return augmentedCandidate;\n }\n return new NativeRTCIceCandidate(args);\n };\n window.RTCIceCandidate.prototype = NativeRTCIceCandidate.prototype;\n\n // Hook up the augmented candidate in onicecandidate and\n // addEventListener('icecandidate', ...)\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"wrapPeerConnectionEvent\"](window, 'icecandidate', e => {\n if (e.candidate) {\n Object.defineProperty(e, 'candidate', {\n value: new window.RTCIceCandidate(e.candidate),\n writable: 'false'\n });\n }\n return e;\n });\n}\nfunction shimRTCIceCandidateRelayProtocol(window) {\n if (!window.RTCIceCandidate || window.RTCIceCandidate && 'relayProtocol' in window.RTCIceCandidate.prototype) {\n return;\n }\n\n // Hook up the augmented candidate in onicecandidate and\n // addEventListener('icecandidate', ...)\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"wrapPeerConnectionEvent\"](window, 'icecandidate', e => {\n if (e.candidate) {\n const parsedCandidate = sdp__WEBPACK_IMPORTED_MODULE_0___default.a.parseCandidate(e.candidate.candidate);\n if (parsedCandidate.type === 'relay') {\n // This is a libwebrtc-specific mapping of local type preference\n // to relayProtocol.\n e.candidate.relayProtocol = {\n 0: 'tls',\n 1: 'tcp',\n 2: 'udp'\n }[parsedCandidate.priority >> 24];\n }\n }\n return e;\n });\n}\nfunction shimMaxMessageSize(window, browserDetails) {\n if (!window.RTCPeerConnection) {\n return;\n }\n if (!('sctp' in window.RTCPeerConnection.prototype)) {\n Object.defineProperty(window.RTCPeerConnection.prototype, 'sctp', {\n get() {\n return typeof this._sctp === 'undefined' ? null : this._sctp;\n }\n });\n }\n const sctpInDescription = function (description) {\n if (!description || !description.sdp) {\n return false;\n }\n const sections = sdp__WEBPACK_IMPORTED_MODULE_0___default.a.splitSections(description.sdp);\n sections.shift();\n return sections.some(mediaSection => {\n const mLine = sdp__WEBPACK_IMPORTED_MODULE_0___default.a.parseMLine(mediaSection);\n return mLine && mLine.kind === 'application' && mLine.protocol.indexOf('SCTP') !== -1;\n });\n };\n const getRemoteFirefoxVersion = function (description) {\n // TODO: Is there a better solution for detecting Firefox?\n const match = description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\\d+)/);\n if (match === null || match.length < 2) {\n return -1;\n }\n const version = parseInt(match[1], 10);\n // Test for NaN (yes, this is ugly)\n return version !== version ? -1 : version;\n };\n const getCanSendMaxMessageSize = function (remoteIsFirefox) {\n // Every implementation we know can send at least 64 KiB.\n // Note: Although Chrome is technically able to send up to 256 KiB, the\n // data does not reach the other peer reliably.\n // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=8419\n let canSendMaxMessageSize = 65536;\n if (browserDetails.browser === 'firefox') {\n if (browserDetails.version < 57) {\n if (remoteIsFirefox === -1) {\n // FF < 57 will send in 16 KiB chunks using the deprecated PPID\n // fragmentation.\n canSendMaxMessageSize = 16384;\n } else {\n // However, other FF (and RAWRTC) can reassemble PPID-fragmented\n // messages. Thus, supporting ~2 GiB when sending.\n canSendMaxMessageSize = 2147483637;\n }\n } else if (browserDetails.version < 60) {\n // Currently, all FF >= 57 will reset the remote maximum message size\n // to the default value when a data channel is created at a later\n // stage. :(\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831\n canSendMaxMessageSize = browserDetails.version === 57 ? 65535 : 65536;\n } else {\n // FF >= 60 supports sending ~2 GiB\n canSendMaxMessageSize = 2147483637;\n }\n }\n return canSendMaxMessageSize;\n };\n const getMaxMessageSize = function (description, remoteIsFirefox) {\n // Note: 65536 bytes is the default value from the SDP spec. Also,\n // every implementation we know supports receiving 65536 bytes.\n let maxMessageSize = 65536;\n\n // FF 57 has a slightly incorrect default remote max message size, so\n // we need to adjust it here to avoid a failure when sending.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1425697\n if (browserDetails.browser === 'firefox' && browserDetails.version === 57) {\n maxMessageSize = 65535;\n }\n const match = sdp__WEBPACK_IMPORTED_MODULE_0___default.a.matchPrefix(description.sdp, 'a=max-message-size:');\n if (match.length > 0) {\n maxMessageSize = parseInt(match[0].substring(19), 10);\n } else if (browserDetails.browser === 'firefox' && remoteIsFirefox !== -1) {\n // If the maximum message size is not present in the remote SDP and\n // both local and remote are Firefox, the remote peer can receive\n // ~2 GiB.\n maxMessageSize = 2147483637;\n }\n return maxMessageSize;\n };\n const origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;\n window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {\n this._sctp = null;\n // Chrome decided to not expose .sctp in plan-b mode.\n // As usual, adapter.js has to do an 'ugly worakaround'\n // to cover up the mess.\n if (browserDetails.browser === 'chrome' && browserDetails.version >= 76) {\n const {\n sdpSemantics\n } = this.getConfiguration();\n if (sdpSemantics === 'plan-b') {\n Object.defineProperty(this, 'sctp', {\n get() {\n return typeof this._sctp === 'undefined' ? null : this._sctp;\n },\n enumerable: true,\n configurable: true\n });\n }\n }\n if (sctpInDescription(arguments[0])) {\n // Check if the remote is FF.\n const isFirefox = getRemoteFirefoxVersion(arguments[0]);\n\n // Get the maximum message size the local peer is capable of sending\n const canSendMMS = getCanSendMaxMessageSize(isFirefox);\n\n // Get the maximum message size of the remote peer.\n const remoteMMS = getMaxMessageSize(arguments[0], isFirefox);\n\n // Determine final maximum message size\n let maxMessageSize;\n if (canSendMMS === 0 && remoteMMS === 0) {\n maxMessageSize = Number.POSITIVE_INFINITY;\n } else if (canSendMMS === 0 || remoteMMS === 0) {\n maxMessageSize = Math.max(canSendMMS, remoteMMS);\n } else {\n maxMessageSize = Math.min(canSendMMS, remoteMMS);\n }\n\n // Create a dummy RTCSctpTransport object and the 'maxMessageSize'\n // attribute.\n const sctp = {};\n Object.defineProperty(sctp, 'maxMessageSize', {\n get() {\n return maxMessageSize;\n }\n });\n this._sctp = sctp;\n }\n return origSetRemoteDescription.apply(this, arguments);\n };\n}\nfunction shimSendThrowTypeError(window) {\n if (!(window.RTCPeerConnection && 'createDataChannel' in window.RTCPeerConnection.prototype)) {\n return;\n }\n\n // Note: Although Firefox >= 57 has a native implementation, the maximum\n // message size can be reset for all data channels at a later stage.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831\n\n function wrapDcSend(dc, pc) {\n const origDataChannelSend = dc.send;\n dc.send = function send() {\n const data = arguments[0];\n const length = data.length || data.size || data.byteLength;\n if (dc.readyState === 'open' && pc.sctp && length > pc.sctp.maxMessageSize) {\n throw new TypeError('Message too large (can send a maximum of ' + pc.sctp.maxMessageSize + ' bytes)');\n }\n return origDataChannelSend.apply(dc, arguments);\n };\n }\n const origCreateDataChannel = window.RTCPeerConnection.prototype.createDataChannel;\n window.RTCPeerConnection.prototype.createDataChannel = function createDataChannel() {\n const dataChannel = origCreateDataChannel.apply(this, arguments);\n wrapDcSend(dataChannel, this);\n return dataChannel;\n };\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"wrapPeerConnectionEvent\"](window, 'datachannel', e => {\n wrapDcSend(e.channel, e.target);\n return e;\n });\n}\n\n/* shims RTCConnectionState by pretending it is the same as iceConnectionState.\n * See https://bugs.chromium.org/p/webrtc/issues/detail?id=6145#c12\n * for why this is a valid hack in Chrome. In Firefox it is slightly incorrect\n * since DTLS failures would be hidden. See\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1265827\n * for the Firefox tracking bug.\n */\nfunction shimConnectionState(window) {\n if (!window.RTCPeerConnection || 'connectionState' in window.RTCPeerConnection.prototype) {\n return;\n }\n const proto = window.RTCPeerConnection.prototype;\n Object.defineProperty(proto, 'connectionState', {\n get() {\n return {\n completed: 'connected',\n checking: 'connecting'\n }[this.iceConnectionState] || this.iceConnectionState;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(proto, 'onconnectionstatechange', {\n get() {\n return this._onconnectionstatechange || null;\n },\n set(cb) {\n if (this._onconnectionstatechange) {\n this.removeEventListener('connectionstatechange', this._onconnectionstatechange);\n delete this._onconnectionstatechange;\n }\n if (cb) {\n this.addEventListener('connectionstatechange', this._onconnectionstatechange = cb);\n }\n },\n enumerable: true,\n configurable: true\n });\n ['setLocalDescription', 'setRemoteDescription'].forEach(method => {\n const origMethod = proto[method];\n proto[method] = function () {\n if (!this._connectionstatechangepoly) {\n this._connectionstatechangepoly = e => {\n const pc = e.target;\n if (pc._lastConnectionState !== pc.connectionState) {\n pc._lastConnectionState = pc.connectionState;\n const newEvent = new Event('connectionstatechange', e);\n pc.dispatchEvent(newEvent);\n }\n return e;\n };\n this.addEventListener('iceconnectionstatechange', this._connectionstatechangepoly);\n }\n return origMethod.apply(this, arguments);\n };\n });\n}\nfunction removeExtmapAllowMixed(window, browserDetails) {\n /* remove a=extmap-allow-mixed for webrtc.org < M71 */\n if (!window.RTCPeerConnection) {\n return;\n }\n if (browserDetails.browser === 'chrome' && browserDetails.version >= 71) {\n return;\n }\n if (browserDetails.browser === 'safari' && browserDetails.version >= 605) {\n return;\n }\n const nativeSRD = window.RTCPeerConnection.prototype.setRemoteDescription;\n window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription(desc) {\n if (desc && desc.sdp && desc.sdp.indexOf('\\na=extmap-allow-mixed') !== -1) {\n const sdp = desc.sdp.split('\\n').filter(line => {\n return line.trim() !== 'a=extmap-allow-mixed';\n }).join('\\n');\n // Safari enforces read-only-ness of RTCSessionDescription fields.\n if (window.RTCSessionDescription && desc instanceof window.RTCSessionDescription) {\n arguments[0] = new window.RTCSessionDescription({\n type: desc.type,\n sdp\n });\n } else {\n desc.sdp = sdp;\n }\n }\n return nativeSRD.apply(this, arguments);\n };\n}\nfunction shimAddIceCandidateNullOrEmpty(window, browserDetails) {\n // Support for addIceCandidate(null or undefined)\n // as well as addIceCandidate({candidate: \"\", ...})\n // https://bugs.chromium.org/p/chromium/issues/detail?id=978582\n // Note: must be called before other polyfills which change the signature.\n if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {\n return;\n }\n const nativeAddIceCandidate = window.RTCPeerConnection.prototype.addIceCandidate;\n if (!nativeAddIceCandidate || nativeAddIceCandidate.length === 0) {\n return;\n }\n window.RTCPeerConnection.prototype.addIceCandidate = function addIceCandidate() {\n if (!arguments[0]) {\n if (arguments[1]) {\n arguments[1].apply(null);\n }\n return Promise.resolve();\n }\n // Firefox 68+ emits and processes {candidate: \"\", ...}, ignore\n // in older versions.\n // Native support for ignoring exists for Chrome M77+.\n // Safari ignores as well, exact version unknown but works in the same\n // version that also ignores addIceCandidate(null).\n if ((browserDetails.browser === 'chrome' && browserDetails.version < 78 || browserDetails.browser === 'firefox' && browserDetails.version < 68 || browserDetails.browser === 'safari') && arguments[0] && arguments[0].candidate === '') {\n return Promise.resolve();\n }\n return nativeAddIceCandidate.apply(this, arguments);\n };\n}\n\n// Note: Make sure to call this ahead of APIs that modify\n// setLocalDescription.length\nfunction shimParameterlessSetLocalDescription(window, browserDetails) {\n if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {\n return;\n }\n const nativeSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription;\n if (!nativeSetLocalDescription || nativeSetLocalDescription.length === 0) {\n return;\n }\n window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() {\n let desc = arguments[0] || {};\n if (typeof desc !== 'object' || desc.type && desc.sdp) {\n return nativeSetLocalDescription.apply(this, arguments);\n }\n // The remaining steps should technically happen when SLD comes off the\n // RTCPeerConnection's operations chain (not ahead of going on it), but\n // this is too difficult to shim. Instead, this shim only covers the\n // common case where the operations chain is empty. This is imperfect, but\n // should cover many cases. Rationale: Even if we can't reduce the glare\n // window to zero on imperfect implementations, there's value in tapping\n // into the perfect negotiation pattern that several browsers support.\n desc = {\n type: desc.type,\n sdp: desc.sdp\n };\n if (!desc.type) {\n switch (this.signalingState) {\n case 'stable':\n case 'have-local-offer':\n case 'have-remote-pranswer':\n desc.type = 'offer';\n break;\n default:\n desc.type = 'answer';\n break;\n }\n }\n if (desc.sdp || desc.type !== 'offer' && desc.type !== 'answer') {\n return nativeSetLocalDescription.apply(this, [desc]);\n }\n const func = desc.type === 'offer' ? this.createOffer : this.createAnswer;\n return func.apply(this).then(d => nativeSetLocalDescription.apply(this, [d]));\n };\n}\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/webrtc-adapter/src/js/common_shim.js?");
|
|
9652
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimRTCIceCandidate\", function() { return shimRTCIceCandidate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimRTCIceCandidateRelayProtocol\", function() { return shimRTCIceCandidateRelayProtocol; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimMaxMessageSize\", function() { return shimMaxMessageSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimSendThrowTypeError\", function() { return shimSendThrowTypeError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimConnectionState\", function() { return shimConnectionState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeExtmapAllowMixed\", function() { return removeExtmapAllowMixed; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimAddIceCandidateNullOrEmpty\", function() { return shimAddIceCandidateNullOrEmpty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shimParameterlessSetLocalDescription\", function() { return shimParameterlessSetLocalDescription; });\n/* harmony import */ var sdp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sdp */ \"./node_modules/sdp/sdp.js\");\n/* harmony import */ var sdp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sdp__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./node_modules/webrtc-adapter/src/js/utils.js\");\n/*\n * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n/* eslint-env node */\n\n\n\n\nfunction shimRTCIceCandidate(window) {\n // foundation is arbitrarily chosen as an indicator for full support for\n // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface\n if (!window.RTCIceCandidate || window.RTCIceCandidate && 'foundation' in window.RTCIceCandidate.prototype) {\n return;\n }\n const NativeRTCIceCandidate = window.RTCIceCandidate;\n window.RTCIceCandidate = function RTCIceCandidate(args) {\n // Remove the a= which shouldn't be part of the candidate string.\n if (typeof args === 'object' && args.candidate && args.candidate.indexOf('a=') === 0) {\n args = JSON.parse(JSON.stringify(args));\n args.candidate = args.candidate.substring(2);\n }\n if (args.candidate && args.candidate.length) {\n // Augment the native candidate with the parsed fields.\n const nativeCandidate = new NativeRTCIceCandidate(args);\n const parsedCandidate = sdp__WEBPACK_IMPORTED_MODULE_0___default.a.parseCandidate(args.candidate);\n for (const key in parsedCandidate) {\n if (!(key in nativeCandidate)) {\n Object.defineProperty(nativeCandidate, key, {\n value: parsedCandidate[key]\n });\n }\n }\n\n // Override serializer to not serialize the extra attributes.\n nativeCandidate.toJSON = function toJSON() {\n return {\n candidate: nativeCandidate.candidate,\n sdpMid: nativeCandidate.sdpMid,\n sdpMLineIndex: nativeCandidate.sdpMLineIndex,\n usernameFragment: nativeCandidate.usernameFragment\n };\n };\n return nativeCandidate;\n }\n return new NativeRTCIceCandidate(args);\n };\n window.RTCIceCandidate.prototype = NativeRTCIceCandidate.prototype;\n\n // Hook up the augmented candidate in onicecandidate and\n // addEventListener('icecandidate', ...)\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"wrapPeerConnectionEvent\"](window, 'icecandidate', e => {\n if (e.candidate) {\n Object.defineProperty(e, 'candidate', {\n value: new window.RTCIceCandidate(e.candidate),\n writable: 'false'\n });\n }\n return e;\n });\n}\nfunction shimRTCIceCandidateRelayProtocol(window) {\n if (!window.RTCIceCandidate || window.RTCIceCandidate && 'relayProtocol' in window.RTCIceCandidate.prototype) {\n return;\n }\n\n // Hook up the augmented candidate in onicecandidate and\n // addEventListener('icecandidate', ...)\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"wrapPeerConnectionEvent\"](window, 'icecandidate', e => {\n if (e.candidate) {\n const parsedCandidate = sdp__WEBPACK_IMPORTED_MODULE_0___default.a.parseCandidate(e.candidate.candidate);\n if (parsedCandidate.type === 'relay') {\n // This is a libwebrtc-specific mapping of local type preference\n // to relayProtocol.\n e.candidate.relayProtocol = {\n 0: 'tls',\n 1: 'tcp',\n 2: 'udp'\n }[parsedCandidate.priority >> 24];\n }\n }\n return e;\n });\n}\nfunction shimMaxMessageSize(window, browserDetails) {\n if (!window.RTCPeerConnection) {\n return;\n }\n if (!('sctp' in window.RTCPeerConnection.prototype)) {\n Object.defineProperty(window.RTCPeerConnection.prototype, 'sctp', {\n get() {\n return typeof this._sctp === 'undefined' ? null : this._sctp;\n }\n });\n }\n const sctpInDescription = function (description) {\n if (!description || !description.sdp) {\n return false;\n }\n const sections = sdp__WEBPACK_IMPORTED_MODULE_0___default.a.splitSections(description.sdp);\n sections.shift();\n return sections.some(mediaSection => {\n const mLine = sdp__WEBPACK_IMPORTED_MODULE_0___default.a.parseMLine(mediaSection);\n return mLine && mLine.kind === 'application' && mLine.protocol.indexOf('SCTP') !== -1;\n });\n };\n const getRemoteFirefoxVersion = function (description) {\n // TODO: Is there a better solution for detecting Firefox?\n const match = description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\\d+)/);\n if (match === null || match.length < 2) {\n return -1;\n }\n const version = parseInt(match[1], 10);\n // Test for NaN (yes, this is ugly)\n return version !== version ? -1 : version;\n };\n const getCanSendMaxMessageSize = function (remoteIsFirefox) {\n // Every implementation we know can send at least 64 KiB.\n // Note: Although Chrome is technically able to send up to 256 KiB, the\n // data does not reach the other peer reliably.\n // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=8419\n let canSendMaxMessageSize = 65536;\n if (browserDetails.browser === 'firefox') {\n if (browserDetails.version < 57) {\n if (remoteIsFirefox === -1) {\n // FF < 57 will send in 16 KiB chunks using the deprecated PPID\n // fragmentation.\n canSendMaxMessageSize = 16384;\n } else {\n // However, other FF (and RAWRTC) can reassemble PPID-fragmented\n // messages. Thus, supporting ~2 GiB when sending.\n canSendMaxMessageSize = 2147483637;\n }\n } else if (browserDetails.version < 60) {\n // Currently, all FF >= 57 will reset the remote maximum message size\n // to the default value when a data channel is created at a later\n // stage. :(\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831\n canSendMaxMessageSize = browserDetails.version === 57 ? 65535 : 65536;\n } else {\n // FF >= 60 supports sending ~2 GiB\n canSendMaxMessageSize = 2147483637;\n }\n }\n return canSendMaxMessageSize;\n };\n const getMaxMessageSize = function (description, remoteIsFirefox) {\n // Note: 65536 bytes is the default value from the SDP spec. Also,\n // every implementation we know supports receiving 65536 bytes.\n let maxMessageSize = 65536;\n\n // FF 57 has a slightly incorrect default remote max message size, so\n // we need to adjust it here to avoid a failure when sending.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1425697\n if (browserDetails.browser === 'firefox' && browserDetails.version === 57) {\n maxMessageSize = 65535;\n }\n const match = sdp__WEBPACK_IMPORTED_MODULE_0___default.a.matchPrefix(description.sdp, 'a=max-message-size:');\n if (match.length > 0) {\n maxMessageSize = parseInt(match[0].substring(19), 10);\n } else if (browserDetails.browser === 'firefox' && remoteIsFirefox !== -1) {\n // If the maximum message size is not present in the remote SDP and\n // both local and remote are Firefox, the remote peer can receive\n // ~2 GiB.\n maxMessageSize = 2147483637;\n }\n return maxMessageSize;\n };\n const origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;\n window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {\n this._sctp = null;\n // Chrome decided to not expose .sctp in plan-b mode.\n // As usual, adapter.js has to do an 'ugly worakaround'\n // to cover up the mess.\n if (browserDetails.browser === 'chrome' && browserDetails.version >= 76) {\n const {\n sdpSemantics\n } = this.getConfiguration();\n if (sdpSemantics === 'plan-b') {\n Object.defineProperty(this, 'sctp', {\n get() {\n return typeof this._sctp === 'undefined' ? null : this._sctp;\n },\n enumerable: true,\n configurable: true\n });\n }\n }\n if (sctpInDescription(arguments[0])) {\n // Check if the remote is FF.\n const isFirefox = getRemoteFirefoxVersion(arguments[0]);\n\n // Get the maximum message size the local peer is capable of sending\n const canSendMMS = getCanSendMaxMessageSize(isFirefox);\n\n // Get the maximum message size of the remote peer.\n const remoteMMS = getMaxMessageSize(arguments[0], isFirefox);\n\n // Determine final maximum message size\n let maxMessageSize;\n if (canSendMMS === 0 && remoteMMS === 0) {\n maxMessageSize = Number.POSITIVE_INFINITY;\n } else if (canSendMMS === 0 || remoteMMS === 0) {\n maxMessageSize = Math.max(canSendMMS, remoteMMS);\n } else {\n maxMessageSize = Math.min(canSendMMS, remoteMMS);\n }\n\n // Create a dummy RTCSctpTransport object and the 'maxMessageSize'\n // attribute.\n const sctp = {};\n Object.defineProperty(sctp, 'maxMessageSize', {\n get() {\n return maxMessageSize;\n }\n });\n this._sctp = sctp;\n }\n return origSetRemoteDescription.apply(this, arguments);\n };\n}\nfunction shimSendThrowTypeError(window) {\n if (!(window.RTCPeerConnection && 'createDataChannel' in window.RTCPeerConnection.prototype)) {\n return;\n }\n\n // Note: Although Firefox >= 57 has a native implementation, the maximum\n // message size can be reset for all data channels at a later stage.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831\n\n function wrapDcSend(dc, pc) {\n const origDataChannelSend = dc.send;\n dc.send = function send() {\n const data = arguments[0];\n const length = data.length || data.size || data.byteLength;\n if (dc.readyState === 'open' && pc.sctp && length > pc.sctp.maxMessageSize) {\n throw new TypeError('Message too large (can send a maximum of ' + pc.sctp.maxMessageSize + ' bytes)');\n }\n return origDataChannelSend.apply(dc, arguments);\n };\n }\n const origCreateDataChannel = window.RTCPeerConnection.prototype.createDataChannel;\n window.RTCPeerConnection.prototype.createDataChannel = function createDataChannel() {\n const dataChannel = origCreateDataChannel.apply(this, arguments);\n wrapDcSend(dataChannel, this);\n return dataChannel;\n };\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"wrapPeerConnectionEvent\"](window, 'datachannel', e => {\n wrapDcSend(e.channel, e.target);\n return e;\n });\n}\n\n/* shims RTCConnectionState by pretending it is the same as iceConnectionState.\n * See https://bugs.chromium.org/p/webrtc/issues/detail?id=6145#c12\n * for why this is a valid hack in Chrome. In Firefox it is slightly incorrect\n * since DTLS failures would be hidden. See\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1265827\n * for the Firefox tracking bug.\n */\nfunction shimConnectionState(window) {\n if (!window.RTCPeerConnection || 'connectionState' in window.RTCPeerConnection.prototype) {\n return;\n }\n const proto = window.RTCPeerConnection.prototype;\n Object.defineProperty(proto, 'connectionState', {\n get() {\n return {\n completed: 'connected',\n checking: 'connecting'\n }[this.iceConnectionState] || this.iceConnectionState;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(proto, 'onconnectionstatechange', {\n get() {\n return this._onconnectionstatechange || null;\n },\n set(cb) {\n if (this._onconnectionstatechange) {\n this.removeEventListener('connectionstatechange', this._onconnectionstatechange);\n delete this._onconnectionstatechange;\n }\n if (cb) {\n this.addEventListener('connectionstatechange', this._onconnectionstatechange = cb);\n }\n },\n enumerable: true,\n configurable: true\n });\n ['setLocalDescription', 'setRemoteDescription'].forEach(method => {\n const origMethod = proto[method];\n proto[method] = function () {\n if (!this._connectionstatechangepoly) {\n this._connectionstatechangepoly = e => {\n const pc = e.target;\n if (pc._lastConnectionState !== pc.connectionState) {\n pc._lastConnectionState = pc.connectionState;\n const newEvent = new Event('connectionstatechange', e);\n pc.dispatchEvent(newEvent);\n }\n return e;\n };\n this.addEventListener('iceconnectionstatechange', this._connectionstatechangepoly);\n }\n return origMethod.apply(this, arguments);\n };\n });\n}\nfunction removeExtmapAllowMixed(window, browserDetails) {\n /* remove a=extmap-allow-mixed for webrtc.org < M71 */\n if (!window.RTCPeerConnection) {\n return;\n }\n if (browserDetails.browser === 'chrome' && browserDetails.version >= 71) {\n return;\n }\n if (browserDetails.browser === 'safari' && browserDetails.version >= 605) {\n return;\n }\n const nativeSRD = window.RTCPeerConnection.prototype.setRemoteDescription;\n window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription(desc) {\n if (desc && desc.sdp && desc.sdp.indexOf('\\na=extmap-allow-mixed') !== -1) {\n const sdp = desc.sdp.split('\\n').filter(line => {\n return line.trim() !== 'a=extmap-allow-mixed';\n }).join('\\n');\n // Safari enforces read-only-ness of RTCSessionDescription fields.\n if (window.RTCSessionDescription && desc instanceof window.RTCSessionDescription) {\n arguments[0] = new window.RTCSessionDescription({\n type: desc.type,\n sdp\n });\n } else {\n desc.sdp = sdp;\n }\n }\n return nativeSRD.apply(this, arguments);\n };\n}\nfunction shimAddIceCandidateNullOrEmpty(window, browserDetails) {\n // Support for addIceCandidate(null or undefined)\n // as well as addIceCandidate({candidate: \"\", ...})\n // https://bugs.chromium.org/p/chromium/issues/detail?id=978582\n // Note: must be called before other polyfills which change the signature.\n if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {\n return;\n }\n const nativeAddIceCandidate = window.RTCPeerConnection.prototype.addIceCandidate;\n if (!nativeAddIceCandidate || nativeAddIceCandidate.length === 0) {\n return;\n }\n window.RTCPeerConnection.prototype.addIceCandidate = function addIceCandidate() {\n if (!arguments[0]) {\n if (arguments[1]) {\n arguments[1].apply(null);\n }\n return Promise.resolve();\n }\n // Firefox 68+ emits and processes {candidate: \"\", ...}, ignore\n // in older versions.\n // Native support for ignoring exists for Chrome M77+.\n // Safari ignores as well, exact version unknown but works in the same\n // version that also ignores addIceCandidate(null).\n if ((browserDetails.browser === 'chrome' && browserDetails.version < 78 || browserDetails.browser === 'firefox' && browserDetails.version < 68 || browserDetails.browser === 'safari') && arguments[0] && arguments[0].candidate === '') {\n return Promise.resolve();\n }\n return nativeAddIceCandidate.apply(this, arguments);\n };\n}\n\n// Note: Make sure to call this ahead of APIs that modify\n// setLocalDescription.length\nfunction shimParameterlessSetLocalDescription(window, browserDetails) {\n if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {\n return;\n }\n const nativeSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription;\n if (!nativeSetLocalDescription || nativeSetLocalDescription.length === 0) {\n return;\n }\n window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() {\n let desc = arguments[0] || {};\n if (typeof desc !== 'object' || desc.type && desc.sdp) {\n return nativeSetLocalDescription.apply(this, arguments);\n }\n // The remaining steps should technically happen when SLD comes off the\n // RTCPeerConnection's operations chain (not ahead of going on it), but\n // this is too difficult to shim. Instead, this shim only covers the\n // common case where the operations chain is empty. This is imperfect, but\n // should cover many cases. Rationale: Even if we can't reduce the glare\n // window to zero on imperfect implementations, there's value in tapping\n // into the perfect negotiation pattern that several browsers support.\n desc = {\n type: desc.type,\n sdp: desc.sdp\n };\n if (!desc.type) {\n switch (this.signalingState) {\n case 'stable':\n case 'have-local-offer':\n case 'have-remote-pranswer':\n desc.type = 'offer';\n break;\n default:\n desc.type = 'answer';\n break;\n }\n }\n if (desc.sdp || desc.type !== 'offer' && desc.type !== 'answer') {\n return nativeSetLocalDescription.apply(this, [desc]);\n }\n const func = desc.type === 'offer' ? this.createOffer : this.createAnswer;\n return func.apply(this).then(d => nativeSetLocalDescription.apply(this, [d]));\n };\n}\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/webrtc-adapter/src/js/common_shim.js?");
|
|
9753
9653
|
|
|
9754
9654
|
/***/ }),
|
|
9755
9655
|
|
|
@@ -9809,7 +9709,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
9809
9709
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9810
9710
|
|
|
9811
9711
|
"use strict";
|
|
9812
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extractVersion\", function() { return extractVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapPeerConnectionEvent\", function() { return wrapPeerConnectionEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"disableLog\", function() { return disableLog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"disableWarnings\", function() { return disableWarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"log\", function() { return log; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deprecated\", function() { return deprecated; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detectBrowser\", function() { return detectBrowser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"compactObject\", function() { return compactObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"walkStats\", function() { return walkStats; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterStats\", function() { return filterStats; });\n/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n/* eslint-env node */\n\n\nlet logDisabled_ = true;\nlet deprecationWarnings_ = true;\n\n/**\n * Extract browser version out of the provided user agent string.\n *\n * @param {!string} uastring userAgent string.\n * @param {!string} expr Regular expression used as match criteria.\n * @param {!number} pos position in the version string to be returned.\n * @return {!number} browser version.\n */\nfunction extractVersion(uastring, expr, pos) {\n const match = uastring.match(expr);\n return match && match.length >= pos && parseInt(match[pos], 10);\n}\n\n// Wraps the peerconnection event eventNameToWrap in a function\n// which returns the modified event object (or false to prevent\n// the event).\nfunction wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {\n if (!window.RTCPeerConnection) {\n return;\n }\n const proto = window.RTCPeerConnection.prototype;\n const nativeAddEventListener = proto.addEventListener;\n proto.addEventListener = function (nativeEventName, cb) {\n if (nativeEventName !== eventNameToWrap) {\n return nativeAddEventListener.apply(this, arguments);\n }\n const wrappedCallback = e => {\n const modifiedEvent = wrapper(e);\n if (modifiedEvent) {\n if (cb.handleEvent) {\n cb.handleEvent(modifiedEvent);\n } else {\n cb(modifiedEvent);\n }\n }\n };\n this._eventMap = this._eventMap || {};\n if (!this._eventMap[eventNameToWrap]) {\n this._eventMap[eventNameToWrap] = new Map();\n }\n this._eventMap[eventNameToWrap].set(cb, wrappedCallback);\n return nativeAddEventListener.apply(this, [nativeEventName, wrappedCallback]);\n };\n const nativeRemoveEventListener = proto.removeEventListener;\n proto.removeEventListener = function (nativeEventName, cb) {\n if (nativeEventName !== eventNameToWrap || !this._eventMap || !this._eventMap[eventNameToWrap]) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (!this._eventMap[eventNameToWrap].has(cb)) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n const unwrappedCb = this._eventMap[eventNameToWrap].get(cb);\n this._eventMap[eventNameToWrap].delete(cb);\n if (this._eventMap[eventNameToWrap].size === 0) {\n delete this._eventMap[eventNameToWrap];\n }\n if (Object.keys(this._eventMap).length === 0) {\n delete this._eventMap;\n }\n return nativeRemoveEventListener.apply(this, [nativeEventName, unwrappedCb]);\n };\n Object.defineProperty(proto, 'on' + eventNameToWrap, {\n get() {\n return this['_on' + eventNameToWrap];\n },\n set(cb) {\n if (this['_on' + eventNameToWrap]) {\n this.removeEventListener(eventNameToWrap, this['_on' + eventNameToWrap]);\n delete this['_on' + eventNameToWrap];\n }\n if (cb) {\n this.addEventListener(eventNameToWrap, this['_on' + eventNameToWrap] = cb);\n }\n },\n enumerable: true,\n configurable: true\n });\n}\nfunction disableLog(bool) {\n if (typeof bool !== 'boolean') {\n return new Error('Argument type: ' + typeof bool + '. Please use a boolean.');\n }\n logDisabled_ = bool;\n return bool ? 'adapter.js logging disabled' : 'adapter.js logging enabled';\n}\n\n/**\n * Disable or enable deprecation warnings\n * @param {!boolean} bool set to true to disable warnings.\n */\nfunction disableWarnings(bool) {\n if (typeof bool !== 'boolean') {\n return new Error('Argument type: ' + typeof bool + '. Please use a boolean.');\n }\n deprecationWarnings_ = !bool;\n return 'adapter.js deprecation warnings ' + (bool ? 'disabled' : 'enabled');\n}\nfunction log() {\n if (typeof window === 'object') {\n if (logDisabled_) {\n return;\n }\n if (typeof console !== 'undefined' && typeof console.log === 'function') {\n console.log.apply(console, arguments);\n }\n }\n}\n\n/**\n * Shows a deprecation warning suggesting the modern and spec-compatible API.\n */\nfunction deprecated(oldMethod, newMethod) {\n if (!deprecationWarnings_) {\n return;\n }\n console.warn(oldMethod + ' is deprecated, please use ' + newMethod + ' instead.');\n}\n\n/**\n * Browser detector.\n *\n * @return {object} result containing browser and version\n * properties.\n */\nfunction detectBrowser(window) {\n // Returned result object.\n const result = {\n browser: null,\n version: null\n };\n\n // Fail early if it's not a browser\n if (typeof window === 'undefined' || !window.navigator) {\n result.browser = 'Not a browser.';\n return result;\n }\n const {\n navigator\n } = window;\n if (navigator.mozGetUserMedia) {\n // Firefox.\n result.browser = 'firefox';\n result.version = extractVersion(navigator.userAgent, /Firefox\\/(\\d+)\\./, 1);\n } else if (navigator.webkitGetUserMedia || window.isSecureContext === false && window.webkitRTCPeerConnection) {\n // Chrome, Chromium, Webview, Opera.\n // Version matches Chrome/WebRTC version.\n // Chrome 74 removed webkitGetUserMedia on http as well so we need the\n // more complicated fallback to webkitRTCPeerConnection.\n result.browser = 'chrome';\n result.version = extractVersion(navigator.userAgent, /Chrom(e|ium)\\/(\\d+)\\./, 2);\n } else if (window.RTCPeerConnection && navigator.userAgent.match(/AppleWebKit\\/(\\d+)\\./)) {\n // Safari.\n result.browser = 'safari';\n result.version = extractVersion(navigator.userAgent, /AppleWebKit\\/(\\d+)\\./, 1);\n result.supportsUnifiedPlan = window.RTCRtpTransceiver && 'currentDirection' in window.RTCRtpTransceiver.prototype;\n } else {\n // Default fallthrough: not supported.\n result.browser = 'Not a supported browser.';\n return result;\n }\n return result;\n}\n\n/**\n * Checks if something is an object.\n *\n * @param {*} val The something you want to check.\n * @return true if val is an object, false otherwise.\n */\nfunction isObject(val) {\n return Object.prototype.toString.call(val) === '[object Object]';\n}\n\n/**\n * Remove all empty objects and undefined values\n * from a nested object -- an enhanced and vanilla version\n * of Lodash's `compact`.\n */\nfunction compactObject(data) {\n if (!isObject(data)) {\n return data;\n }\n return Object.keys(data).reduce(function (accumulator, key) {\n const isObj = isObject(data[key]);\n const value = isObj ? compactObject(data[key]) : data[key];\n const isEmptyObject = isObj && !Object.keys(value).length;\n if (value === undefined || isEmptyObject) {\n return accumulator;\n }\n return Object.assign(accumulator, {\n [key]: value\n });\n }, {});\n}\n\n/* iterates the stats graph recursively. */\nfunction walkStats(stats, base, resultSet) {\n if (!base || resultSet.has(base.id)) {\n return;\n }\n resultSet.set(base.id, base);\n Object.keys(base).forEach(name => {\n if (name.endsWith('Id')) {\n walkStats(stats, stats.get(base[name]), resultSet);\n } else if (name.endsWith('Ids')) {\n base[name].forEach(id => {\n walkStats(stats, stats.get(id), resultSet);\n });\n }\n });\n}\n\n/* filter getStats for a sender/receiver track. */\nfunction filterStats(result, track, outbound) {\n const streamStatsType = outbound ? 'outbound-rtp' : 'inbound-rtp';\n const filteredResult = new Map();\n if (track === null) {\n return filteredResult;\n }\n const trackStats = [];\n result.forEach(value => {\n if (value.type === 'track' && value.trackIdentifier === track.id) {\n trackStats.push(value);\n }\n });\n trackStats.forEach(trackStat => {\n result.forEach(stats => {\n if (stats.type === streamStatsType && stats.trackId === trackStat.id) {\n walkStats(result, stats, filteredResult);\n }\n });\n });\n return filteredResult;\n}\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/webrtc-adapter/src/js/utils.js?");
|
|
9712
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extractVersion\", function() { return extractVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapPeerConnectionEvent\", function() { return wrapPeerConnectionEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"disableLog\", function() { return disableLog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"disableWarnings\", function() { return disableWarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"log\", function() { return log; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deprecated\", function() { return deprecated; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detectBrowser\", function() { return detectBrowser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"compactObject\", function() { return compactObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"walkStats\", function() { return walkStats; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterStats\", function() { return filterStats; });\n/*\n * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n/* eslint-env node */\n\n\nlet logDisabled_ = true;\nlet deprecationWarnings_ = true;\n\n/**\n * Extract browser version out of the provided user agent string.\n *\n * @param {!string} uastring userAgent string.\n * @param {!string} expr Regular expression used as match criteria.\n * @param {!number} pos position in the version string to be returned.\n * @return {!number} browser version.\n */\nfunction extractVersion(uastring, expr, pos) {\n const match = uastring.match(expr);\n return match && match.length >= pos && parseInt(match[pos], 10);\n}\n\n// Wraps the peerconnection event eventNameToWrap in a function\n// which returns the modified event object (or false to prevent\n// the event).\nfunction wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {\n if (!window.RTCPeerConnection) {\n return;\n }\n const proto = window.RTCPeerConnection.prototype;\n const nativeAddEventListener = proto.addEventListener;\n proto.addEventListener = function (nativeEventName, cb) {\n if (nativeEventName !== eventNameToWrap) {\n return nativeAddEventListener.apply(this, arguments);\n }\n const wrappedCallback = e => {\n const modifiedEvent = wrapper(e);\n if (modifiedEvent) {\n if (cb.handleEvent) {\n cb.handleEvent(modifiedEvent);\n } else {\n cb(modifiedEvent);\n }\n }\n };\n this._eventMap = this._eventMap || {};\n if (!this._eventMap[eventNameToWrap]) {\n this._eventMap[eventNameToWrap] = new Map();\n }\n this._eventMap[eventNameToWrap].set(cb, wrappedCallback);\n return nativeAddEventListener.apply(this, [nativeEventName, wrappedCallback]);\n };\n const nativeRemoveEventListener = proto.removeEventListener;\n proto.removeEventListener = function (nativeEventName, cb) {\n if (nativeEventName !== eventNameToWrap || !this._eventMap || !this._eventMap[eventNameToWrap]) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (!this._eventMap[eventNameToWrap].has(cb)) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n const unwrappedCb = this._eventMap[eventNameToWrap].get(cb);\n this._eventMap[eventNameToWrap].delete(cb);\n if (this._eventMap[eventNameToWrap].size === 0) {\n delete this._eventMap[eventNameToWrap];\n }\n if (Object.keys(this._eventMap).length === 0) {\n delete this._eventMap;\n }\n return nativeRemoveEventListener.apply(this, [nativeEventName, unwrappedCb]);\n };\n Object.defineProperty(proto, 'on' + eventNameToWrap, {\n get() {\n return this['_on' + eventNameToWrap];\n },\n set(cb) {\n if (this['_on' + eventNameToWrap]) {\n this.removeEventListener(eventNameToWrap, this['_on' + eventNameToWrap]);\n delete this['_on' + eventNameToWrap];\n }\n if (cb) {\n this.addEventListener(eventNameToWrap, this['_on' + eventNameToWrap] = cb);\n }\n },\n enumerable: true,\n configurable: true\n });\n}\nfunction disableLog(bool) {\n if (typeof bool !== 'boolean') {\n return new Error('Argument type: ' + typeof bool + '. Please use a boolean.');\n }\n logDisabled_ = bool;\n return bool ? 'adapter.js logging disabled' : 'adapter.js logging enabled';\n}\n\n/**\n * Disable or enable deprecation warnings\n * @param {!boolean} bool set to true to disable warnings.\n */\nfunction disableWarnings(bool) {\n if (typeof bool !== 'boolean') {\n return new Error('Argument type: ' + typeof bool + '. Please use a boolean.');\n }\n deprecationWarnings_ = !bool;\n return 'adapter.js deprecation warnings ' + (bool ? 'disabled' : 'enabled');\n}\nfunction log() {\n if (typeof window === 'object') {\n if (logDisabled_) {\n return;\n }\n if (typeof console !== 'undefined' && typeof console.log === 'function') {\n console.log.apply(console, arguments);\n }\n }\n}\n\n/**\n * Shows a deprecation warning suggesting the modern and spec-compatible API.\n */\nfunction deprecated(oldMethod, newMethod) {\n if (!deprecationWarnings_) {\n return;\n }\n console.warn(oldMethod + ' is deprecated, please use ' + newMethod + ' instead.');\n}\n\n/**\n * Browser detector.\n *\n * @return {object} result containing browser and version\n * properties.\n */\nfunction detectBrowser(window) {\n // Returned result object.\n const result = {\n browser: null,\n version: null\n };\n\n // Fail early if it's not a browser\n if (typeof window === 'undefined' || !window.navigator || !window.navigator.userAgent) {\n result.browser = 'Not a browser.';\n return result;\n }\n const {\n navigator\n } = window;\n if (navigator.mozGetUserMedia) {\n // Firefox.\n result.browser = 'firefox';\n result.version = extractVersion(navigator.userAgent, /Firefox\\/(\\d+)\\./, 1);\n } else if (navigator.webkitGetUserMedia || window.isSecureContext === false && window.webkitRTCPeerConnection) {\n // Chrome, Chromium, Webview, Opera.\n // Version matches Chrome/WebRTC version.\n // Chrome 74 removed webkitGetUserMedia on http as well so we need the\n // more complicated fallback to webkitRTCPeerConnection.\n result.browser = 'chrome';\n result.version = extractVersion(navigator.userAgent, /Chrom(e|ium)\\/(\\d+)\\./, 2);\n } else if (window.RTCPeerConnection && navigator.userAgent.match(/AppleWebKit\\/(\\d+)\\./)) {\n // Safari.\n result.browser = 'safari';\n result.version = extractVersion(navigator.userAgent, /AppleWebKit\\/(\\d+)\\./, 1);\n result.supportsUnifiedPlan = window.RTCRtpTransceiver && 'currentDirection' in window.RTCRtpTransceiver.prototype;\n } else {\n // Default fallthrough: not supported.\n result.browser = 'Not a supported browser.';\n return result;\n }\n return result;\n}\n\n/**\n * Checks if something is an object.\n *\n * @param {*} val The something you want to check.\n * @return true if val is an object, false otherwise.\n */\nfunction isObject(val) {\n return Object.prototype.toString.call(val) === '[object Object]';\n}\n\n/**\n * Remove all empty objects and undefined values\n * from a nested object -- an enhanced and vanilla version\n * of Lodash's `compact`.\n */\nfunction compactObject(data) {\n if (!isObject(data)) {\n return data;\n }\n return Object.keys(data).reduce(function (accumulator, key) {\n const isObj = isObject(data[key]);\n const value = isObj ? compactObject(data[key]) : data[key];\n const isEmptyObject = isObj && !Object.keys(value).length;\n if (value === undefined || isEmptyObject) {\n return accumulator;\n }\n return Object.assign(accumulator, {\n [key]: value\n });\n }, {});\n}\n\n/* iterates the stats graph recursively. */\nfunction walkStats(stats, base, resultSet) {\n if (!base || resultSet.has(base.id)) {\n return;\n }\n resultSet.set(base.id, base);\n Object.keys(base).forEach(name => {\n if (name.endsWith('Id')) {\n walkStats(stats, stats.get(base[name]), resultSet);\n } else if (name.endsWith('Ids')) {\n base[name].forEach(id => {\n walkStats(stats, stats.get(id), resultSet);\n });\n }\n });\n}\n\n/* filter getStats for a sender/receiver track. */\nfunction filterStats(result, track, outbound) {\n const streamStatsType = outbound ? 'outbound-rtp' : 'inbound-rtp';\n const filteredResult = new Map();\n if (track === null) {\n return filteredResult;\n }\n const trackStats = [];\n result.forEach(value => {\n if (value.type === 'track' && value.trackIdentifier === track.id) {\n trackStats.push(value);\n }\n });\n trackStats.forEach(trackStat => {\n result.forEach(stats => {\n if (stats.type === streamStatsType && stats.trackId === trackStat.id) {\n walkStats(result, stats, filteredResult);\n }\n });\n });\n return filteredResult;\n}\n\n//# sourceURL=webpack://WatchTogetherSDK/./node_modules/webrtc-adapter/src/js/utils.js?");
|
|
9813
9713
|
|
|
9814
9714
|
/***/ }),
|
|
9815
9715
|
|
|
@@ -10042,7 +9942,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _mod
|
|
|
10042
9942
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10043
9943
|
|
|
10044
9944
|
"use strict";
|
|
10045
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\nlet iot = function () {\n var _this = this;\n let __currentTopics = [];\n let __ = null;\n return {\n __promise: null,\n __reconnect: err => {\n this.__privates.iot.log('MQTT Error:', err, `Is event error: ${err instanceof Event}`);\n if (err instanceof Event && err.type === 'error') {\n this.__privates.iot.log('SDK MQTT Reconnection attempt');\n clearTimeout(__);\n __ = setTimeout(() => {\n this.iot.iotLogin(true, true).catch(e => this.__privates.iot.log('MQTT Connection Error:', e));\n }, 1000);\n }\n },\n __updateCredentials: () => {\n this.iot.getCredentials().then(response => this.__privates.iot.updateWebSocketCredentials(response.data.credentials.accessKeyId, response.data.credentials.secretAccessKey, response.data.credentials.sessionToken, response.data.credentials.expiration));\n },\n getCredentials: () => {\n return this.__privates.auth.__client.then(client => client.apis.auth.iotSignIn({}, {\n requestBody: {\n suggestedTopics: true,\n domain: location.hostname\n }\n }));\n },\n iotLogin: function () {\n let subscribeToSuggestedTopics = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n let forceDisconnect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n _this.iot.$off('error', _this.iot.__reconnect, _this);\n _this.iot.__promise = new Promise((resolve, reject) => {\n _this.iot.getCredentials().then(response => {\n return Promise.all([response.data.suggestedTopics, _this.__privates.iot.connect(response.data.endpoint, response.data.clientId, response.data.region, response.data.credentials.accessKeyId, response.data.credentials.secretAccessKey, response.data.credentials.sessionToken, response.data.credentials.expiration, forceDisconnect)]);\n }).then(resolve).catch(reject);\n });\n let __currentTopicsCopy = [...__currentTopics];\n __currentTopics.length = 0;\n _this.iot.__promise.then(_ref => {\n let [suggestedTopic, instance] = _ref;\n
|
|
9945
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\nlet iot = function () {\n var _this = this;\n let __currentTopics = [];\n let __ = null;\n return {\n __promise: null,\n __reconnect: err => {\n this.__privates.iot.log('MQTT Error:', err, `Is event error: ${err instanceof Event}`);\n if (err instanceof Event && err.type === 'error') {\n this.__privates.iot.log('SDK MQTT Reconnection attempt');\n clearTimeout(__);\n __ = setTimeout(() => {\n this.iot.iotLogin(true, true).catch(e => this.__privates.iot.log('MQTT Connection Error:', e));\n }, 1000);\n }\n },\n __updateCredentials: () => {\n this.iot.getCredentials().then(response => this.__privates.iot.updateWebSocketCredentials(response.data.credentials.accessKeyId, response.data.credentials.secretAccessKey, response.data.credentials.sessionToken, response.data.credentials.expiration));\n },\n getCredentials: () => {\n return this.__privates.auth.__client.then(client => client.apis.auth.iotSignIn({}, {\n requestBody: {\n suggestedTopics: true,\n domain: location.hostname\n }\n }));\n },\n iotLogin: function () {\n let subscribeToSuggestedTopics = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n let forceDisconnect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n _this.iot.$off('error', _this.iot.__reconnect, _this);\n _this.iot.__promise = new Promise((resolve, reject) => {\n _this.iot.getCredentials().then(response => {\n return Promise.all([response.data.suggestedTopics, _this.__privates.iot.connect(response.data.endpoint, response.data.clientId, response.data.region, response.data.credentials.accessKeyId, response.data.credentials.secretAccessKey, response.data.credentials.sessionToken, response.data.credentials.expiration, forceDisconnect)]);\n }).then(resolve).catch(reject);\n });\n let __currentTopicsCopy = [...__currentTopics];\n __currentTopics.length = 0;\n _this.iot.__promise.then(_ref => {\n let [suggestedTopic, instance] = _ref;\n if (!subscribeToSuggestedTopics) {\n return Promise.resolve(instance);\n }\n const topics = [...suggestedTopic, ...__currentTopicsCopy];\n __currentTopics = topics.filter((c, index) => {\n return topics.indexOf(c) !== index;\n });\n return Promise.all(__currentTopics.map(topic => _this.iot.subscribe(topic))).then(() => instance);\n }).then(instance => {\n _this.iot.$on('error', _this.iot.__reconnect, _this);\n _this.iot.$on('updateCredentials', _this.iot.__updateCredentials, _this);\n return instance;\n });\n return _this.iot.__promise;\n },\n iotLogout: function () {\n let keepCurrentTopics = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n _this.iot.$off('error', _this.iot.__reconnect, _this);\n _this.iot.$off('updateCredentials', _this.iot.__updateCredentials, _this);\n if (!keepCurrentTopics) {\n __currentTopics.length = 0;\n }\n return _this.__privates.iot.disconnect().then(() => {\n _this.iot.__promise = null;\n return true;\n });\n },\n isConnected: () => {\n return this.__privates.iot.isConnected();\n },\n subscribe: topic => {\n if (__currentTopics.indexOf(topic) === -1) {\n __currentTopics.push(topic);\n if (!this.iot.__promise) return Promise.resolve('not_connected');\n return this.iot.__promise.then(() => this.__privates.iot.subscribe(topic));\n }\n },\n unsubscribe: topic => {\n let index = __currentTopics.indexOf(topic);\n index > -1 && __currentTopics.splice(index, 1);\n if (!this.iot.__promise) return Promise.resolve('not_connected');\n return this.iot.__promise.then(() => this.__privates.iot.unsubscribe(topic));\n },\n send: (topic, message) => {\n return this.iot.__promise.then(() => this.__privates.iot.send(topic, message));\n },\n $once: (key, callback, that) => {\n return this.__privates.iot.once(key, callback, that || this);\n },\n $on: (key, callback, that) => {\n return this.__privates.iot.on(key, callback, that || this);\n },\n $off: (key, callback, that) => {\n return this.__privates.iot.off(key, callback, that || this);\n },\n $clear: () => {\n return this.__privates.iot.clear();\n }\n };\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (iot);\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/models/iot.js?");
|
|
10046
9946
|
|
|
10047
9947
|
/***/ }),
|
|
10048
9948
|
|
|
@@ -10114,7 +10014,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _mod
|
|
|
10114
10014
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10115
10015
|
|
|
10116
10016
|
"use strict";
|
|
10117
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\nconst getConstraints = _ref => {\n let {\n hasVideo,\n hasAudio = true,\n isHd,\n aDeviceId,\n vDeviceId,\n lfps,\n autoGainControl = false,\n echoCancellation = true,\n noiseSuppression = true,\n channelCount = 1\n } = _ref;\n // optional: Array (6)\n // • 0: {googEchoCancellation: true}\n // • 1: {googEchoCancellation2: true}\n // • 2: {googAutoGainControl: true}\n // • 3: {googNoiseSuppression: true}\n // » 4: {googHighpassFilter: true}\n // • 5: {googAudioMirroring: true}\n // googTypingNoiseDetection\n\n let audioOnlyConstraints = {\n audio: {\n ...(aDeviceId && {\n deviceId: {\n exact: aDeviceId\n }\n }),\n autoGainControl,\n echoCancellation,\n noiseSuppression,\n channelCount\n }\n };\n let videoOnlyConstraints = {\n video: {\n ...(vDeviceId && {\n deviceId: {\n exact: vDeviceId\n }\n }),\n facingMode: {\n ideal: \"user\"\n },\n ...(lfps ? {\n frameRate: {\n ideal: 10,\n max: 30\n }\n } : {\n frameRate: {\n ideal: 30,\n max: 30\n }\n }),\n width: {\n ideal: isHd ? 1280 : 320\n },\n height: {\n ideal: isHd ? 720 : 240\n }\n }\n };\n return {\n ...(hasAudio ? audioOnlyConstraints : {\n audio: false\n }),\n ...(hasVideo ? videoOnlyConstraints : {\n video: false\n })\n };\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n //TODO: add more constraints\n applyConstraints(_ref2) {\n let {\n isHd,\n lfps,\n autoGainControl = false,\n echoCancellation = true,\n noiseSuppression = true,\n channelCount = 1,\n stream = null\n } = _ref2;\n if (stream) {\n let fullConstraints = getConstraints({\n hasVideo: true,\n hasAudio: true,\n autoGainControl,\n echoCancellation,\n noiseSuppression,\n channelCount,\n isHd,\n lfps\n });\n let returnPromises = [];\n\n // const videoTrack = stream.getVideoTracks()[0];\n // if(videoTrack) {\n // returnPromises.push(videoTrack.applyConstraints(fullConstraints.video));\n // }\n\n const audioTrack = stream.getAudioTracks()[0];\n if (audioTrack) {\n returnPromises.push(audioTrack.applyConstraints(fullConstraints.audio));\n }\n return Promise.all(returnPromises).then(() => {\n return stream;\n });\n } else return Promise.resolve(null);\n },\n getUserStream() {\n let {\n hasVideo,\n hasAudio = true,\n aDeviceId,\n vDeviceId,\n isHd,\n lfps,\n autoGainControl = false,\n echoCancellation = true,\n noiseSuppression = true,\n channelCount = 1,\n muteAudio = false,\n muteVideo = false\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let fullConstraints = getConstraints({\n hasVideo,\n hasAudio,\n isHd,\n aDeviceId,\n vDeviceId,\n lfps,\n autoGainControl,\n echoCancellation,\n noiseSuppression,\n channelCount\n });\n return navigator.mediaDevices.getUserMedia(fullConstraints).then(stream => {\n stream.getAudioTracks().forEach(track => track.enabled = !muteAudio);\n stream.getVideoTracks().forEach(track => track.enabled = !muteVideo);\n return stream;\n });\n }\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/models/utils.js?");
|
|
10017
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\nconst getConstraints = _ref => {\n let {\n hasVideo,\n hasAudio = true,\n isHd,\n aDeviceId,\n vDeviceId,\n lfps,\n autoGainControl = false,\n echoCancellation = true,\n noiseSuppression = true,\n channelCount = 1\n } = _ref;\n // optional: Array (6)\n // • 0: {googEchoCancellation: true}\n // • 1: {googEchoCancellation2: true}\n // • 2: {googAutoGainControl: true}\n // • 3: {googNoiseSuppression: true}\n // » 4: {googHighpassFilter: true}\n // • 5: {googAudioMirroring: true}\n // googTypingNoiseDetection\n\n let audioOnlyConstraints = {\n audio: {\n ...(aDeviceId && {\n deviceId: {\n exact: aDeviceId\n }\n }),\n autoGainControl,\n echoCancellation,\n noiseSuppression,\n channelCount\n }\n };\n let videoOnlyConstraints = {\n video: {\n ...(vDeviceId && {\n deviceId: {\n exact: vDeviceId\n }\n }),\n facingMode: {\n ideal: \"user\"\n },\n ...(lfps ? {\n frameRate: {\n ideal: 10,\n max: 30\n }\n } : {\n frameRate: {\n ideal: 30,\n max: 30\n }\n }),\n width: {\n ideal: isHd ? 1280 : 320\n },\n height: {\n ideal: isHd ? 720 : 240\n }\n }\n };\n return {\n ...(hasAudio ? audioOnlyConstraints : {\n audio: false\n }),\n ...(hasVideo ? videoOnlyConstraints : {\n video: false\n })\n };\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n //TODO: add more constraints\n applyConstraints(_ref2) {\n let {\n isHd,\n lfps,\n autoGainControl = false,\n echoCancellation = true,\n noiseSuppression = true,\n channelCount = 1,\n stream = null\n } = _ref2;\n if (stream) {\n let fullConstraints = getConstraints({\n hasVideo: true,\n hasAudio: true,\n autoGainControl,\n echoCancellation,\n noiseSuppression,\n channelCount,\n isHd,\n lfps\n });\n let returnPromises = [];\n\n // const videoTrack = stream.getVideoTracks()[0];\n // if(videoTrack) {\n // returnPromises.push(videoTrack.applyConstraints(fullConstraints.video));\n // }\n\n const audioTrack = stream.getAudioTracks()[0];\n if (audioTrack) {\n returnPromises.push(audioTrack.applyConstraints(fullConstraints.audio));\n }\n return Promise.all(returnPromises).then(() => {\n return stream;\n });\n } else return Promise.resolve(null);\n },\n getUserStream() {\n let {\n hasVideo,\n hasAudio = true,\n aDeviceId,\n vDeviceId,\n isHd,\n lfps,\n autoGainControl = false,\n echoCancellation = true,\n noiseSuppression = true,\n channelCount = 1,\n muteAudio = false,\n muteVideo = false\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let fullConstraints = getConstraints({\n hasVideo,\n hasAudio,\n isHd,\n aDeviceId,\n vDeviceId,\n lfps,\n autoGainControl,\n echoCancellation,\n noiseSuppression,\n channelCount\n });\n return navigator.mediaDevices.getUserMedia(fullConstraints).then(stream => {\n stream.getAudioTracks().forEach(track => track.enabled = !muteAudio);\n stream.getVideoTracks().forEach(track => track.enabled = !muteVideo);\n return stream;\n });\n },\n getHostStream() {\n let {\n hasAudio,\n hasVideo,\n aDeviceId,\n vDeviceId,\n channelCount = 1\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let audioOnlyConstraints = {\n audio: {\n ...(aDeviceId && {\n deviceId: {\n exact: aDeviceId\n }\n }),\n channelCount\n }\n };\n let videoOnlyConstraints = {\n video: {\n ...(vDeviceId && {\n deviceId: {\n exact: vDeviceId\n }\n }),\n frameRate: {\n ideal: 30,\n max: 30\n },\n width: {\n min: 1280,\n ideal: 1920\n },\n height: {\n min: 720,\n ideal: 1080\n }\n }\n };\n let fullConstraints = {\n ...(hasAudio ? audioOnlyConstraints : {\n audio: false\n }),\n ...(hasVideo ? videoOnlyConstraints : {\n video: false\n })\n };\n return navigator.mediaDevices.getUserMedia(fullConstraints);\n }\n});\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/models/utils.js?");
|
|
10118
10018
|
|
|
10119
10019
|
/***/ }),
|
|
10120
10020
|
|
|
@@ -10318,7 +10218,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
|
10318
10218
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10319
10219
|
|
|
10320
10220
|
"use strict";
|
|
10321
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var aws_iot_device_sdk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! aws-iot-device-sdk */ \"./node_modules/aws-iot-device-sdk/index.js\");\n/* harmony import */ var aws_iot_device_sdk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(aws_iot_device_sdk__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wt_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./wt-emitter */ \"./src/modules/wt-emitter.js\");\n/* harmony import */ var _wt_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./wt-utils */ \"./src/modules/wt-utils.js\");\n\n\n\nclass Iot {\n constructor(enableDebugFlag) {\n Object.assign(this, Object(_wt_emitter__WEBPACK_IMPORTED_MODULE_1__[\"default\"])());\n this.device = null;\n this.decoder = new TextDecoder('utf-8');\n this.connectionActive = false;\n this.log = Iot.noop;\n this.debugFlag = enableDebugFlag;\n this.credentialsExpirationCheckIntervalId = null;\n this.currentCredentialsExpirationStamp = null;\n if (enableDebugFlag) {\n this.enableDebug();\n }\n }\n static noop() {}\n enableDebug() {\n this.log = console.log.bind(console);\n }\n startCredentialsExpirationCheck(expiration) {\n this.stopCredentialsExpirationCheck();\n this.currentCredentialsExpirationStamp = new Date(expiration).getTime();\n this.credentialsExpirationCheckIntervalId = setInterval(() => {\n const curentTimeStamp = new Date().getTime();\n if (this.currentCredentialsExpirationStamp - curentTimeStamp <= 300000) {\n this.emit('updateCredentials');\n }\n }, 5000);\n }\n stopCredentialsExpirationCheck() {\n clearInterval(this.credentialsExpirationCheckIntervalId);\n this.credentialsExpirationCheckIntervalId = null;\n }\n updateWebSocketCredentials(accessKeyId, secretAccessKey, sessionToken, expiration) {\n if (this.device) {\n this.device.updateWebSocketCredentials(accessKeyId, secretAccessKey, sessionToken);\n this.startCredentialsExpirationCheck(expiration);\n }\n }\n connect(apiMqttUrl, apiMqttClientId, region, accessKeyId, secretAccessKey, sessionToken, expiration) {\n let forceDisconnect = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;\n return this.disconnect(forceDisconnect).then(() => {\n return new Promise((resolve, reject) => {\n this.device = Object(aws_iot_device_sdk__WEBPACK_IMPORTED_MODULE_0__[\"device\"])({\n protocol: 'wss',\n clientId: apiMqttClientId,\n region,\n host: apiMqttUrl,\n accessKeyId: accessKeyId,\n secretKey: secretAccessKey,\n sessionToken: sessionToken,\n keepalive: 15,\n maximumReconnectTimeMs: 8000,\n enableMetrics: false,\n debug: this.debugFlag,\n autoResubscribe: true\n });\n this.startCredentialsExpirationCheck(expiration);\n let __s = () => {\n var _this$device, _this$device2;\n (_this$device = this.device) === null || _this$device === void 0 ? void 0 : _this$device.off('connect', __s);\n (_this$device2 = this.device) === null || _this$device2 === void 0 ? void 0 : _this$device2.off('error', __e);\n resolve(this.device);\n };\n let __e = e => {\n var _this$device3, _this$device4;\n (_this$device3 = this.device) === null || _this$device3 === void 0 ? void 0 : _this$device3.off('connect', __s);\n (_this$device4 = this.device) === null || _this$device4 === void 0 ? void 0 : _this$device4.off('error', __e);\n reject(e);\n };\n this.device.once('connect', __s);\n this.device.once('error', __e);\n this.device.on('message', this.__messageCb.bind(this));\n this.device.on('connect', this.__connectCb.bind(this));\n this.device.on('reconnect', this.__reconnectCb.bind(this));\n this.device.on('error', this.__failureCb.bind(this));\n this.device.on('close', this.__closeCb.bind(this));\n this.device.on('offline', this.__offlineCb.bind(this));\n });\n });\n }\n disconnect() {\n let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.stopCredentialsExpirationCheck();\n return new Promise((resolve, reject) => {\n if (!this.device) {\n resolve();\n return;\n }\n let __i = null;\n let __c = () => {\n clearTimeout(__i);\n this.device = null;\n resolve();\n };\n __i = setTimeout(__c, 4000);\n this.device.off('message', this.__messageCb.bind(this));\n this.device.off('connect', this.__connectCb.bind(this));\n this.device.off('reconnect', this.__reconnectCb.bind(this));\n this.device.off('error', this.__failureCb.bind(this));\n this.device.off('close', this.__closeCb.bind(this));\n this.device.off('offline', this.__offlineCb.bind(this));\n this.device.end(force, __c);\n });\n }\n isConnected() {\n return this.connectionActive;\n }\n subscribe(topic) {\n return this.device && this.device.subscribe(topic);\n }\n unsubscribe(topic) {\n return this.device && this.device.unsubscribe(topic);\n }\n send(topic, message) {\n let msg = typeof message === 'object' ? JSON.stringify(message) : message;\n return this.device && this.device.publish(topic, msg);\n }\n __reconnectCb() {\n this.emit('reconnect');\n }\n __connectCb() {\n this.connectionActive = true;\n this.emit('connect');\n }\n __failureCb(err) {\n this.emit('error', err);\n }\n __closeCb(responseObject) {\n this.connectionActive = false;\n this.emit('close');\n }\n __offlineCb(responseObject) {\n this.emit('offline');\n }\n __messageCb(t, message, packet) {\n const topic = t.split('/');\n let payload = JSON.parse(this.decoder.decode(message));\n if (payload.display) {\n const decodedDisplay = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(payload.display);\n if (decodedDisplay.userId) {\n payload = {\n ...payload,\n userId: decodedDisplay.userId,\n role: decodedDisplay.role,\n start: decodedDisplay.start\n };\n }\n }\n if (topic[0] === 'user') {\n // user\n const userId = topic[1].replace(\"_\", ':');\n this.emit('message', {\n userId,\n ...payload,\n event: payload.event ? `user:${payload.event}` : 'user'\n });\n } else if (topic[0] === 'wt') {\n const event = payload.event;\n const roomId = topic[2];\n if (topic[1] === 'room') {\n // room\n if (event === 'message' || event === 'template_updated' || event === 'record_start' || event === 'record_stop' || event === 'record_configured' || event === 'record_livestream_available' || event === 'record_livestream_kick' || event === 'user_update_displayname' || event === 'user_update_avatar' || event === 'user_update_bio' || event === 'user_update_customattributes' || event === 'user_update_privateattributes' || event === 'channel_changed' || event === \"instance_homepage_changed\" || event === \"instance_settings_changed\" || event === \"externalmix_changed\" || event === \"video_uploaded\" || event === \"change_user_devices\" || event === \"queue\" || event === \"title_changed\") {\n this.emit('message', {\n event,\n ...payload,\n roomId\n });\n } else if (event === 'joined' || event === 'leaving') {\n this.emit('message', {\n event,\n ...payload,\n isObserver: !!payload.isObserver,\n roomId\n });\n } else if (event === 'left' ||\n //user removed room a.k.a. left the room\n event === 'kicked' || event === 'banned' || event === 'unbanned' || event === 'approved' || event === 'muted' || event === 'unmuted' || event === 'messageRemoved' || event === 'messageReported' || event === 'chatClear' || event === 'handRaised' || event === 'handLowered' || event === 'handsCleared') {\n this.emit('message', {\n event,\n ...payload\n });\n } else if (event === 'volume_set') {\n this.emit('message', {\n event,\n ...payload\n });\n }\n } else if (topic[1] === 'instanceroom') {\n // instance\n if (event === 'add_room' || event === 'remove_room' || event === 'set_room' || event === \"instance_homepage_changed\" || event === 'instance_settings_changed') {\n this.emit('message', {\n event,\n ...payload\n });\n }\n } else if (topic[1] === 'externalmix') {\n const event = payload.event;\n this.emit('message', {\n event,\n ...payload\n });\n } else if (topic[1] === 'asset') {\n this.emit('message', {\n event: 'asset',\n assetId: topic[2],\n ...payload\n });\n }\n } else if (topic[0] === 'wtr' || topic[0] === 'gwtr') {\n const recorderId = topic[1];\n const sessionId = topic[2];\n if (topic[3] === 'control') {\n this.emit('message', {\n event: 'recorder_control',\n ...payload,\n recorderId,\n sessionId\n });\n } // recorder control\n else if (topic[3] === 'monitor') {\n this.emit('message', {\n event: 'recorder_monitor',\n ...payload,\n recorderId,\n sessionId\n });\n } // recorder monitor\n }\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Iot);\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/modules/wt-iot.js?");
|
|
10221
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var aws_iot_device_sdk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! aws-iot-device-sdk */ \"./node_modules/aws-iot-device-sdk/index.js\");\n/* harmony import */ var aws_iot_device_sdk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(aws_iot_device_sdk__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wt_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./wt-emitter */ \"./src/modules/wt-emitter.js\");\n/* harmony import */ var _wt_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./wt-utils */ \"./src/modules/wt-utils.js\");\n\n\n\nclass Iot {\n constructor(enableDebugFlag) {\n Object.assign(this, Object(_wt_emitter__WEBPACK_IMPORTED_MODULE_1__[\"default\"])());\n this.device = null;\n this.decoder = new TextDecoder('utf-8');\n this.connectionActive = false;\n this.log = Iot.noop;\n this.debugFlag = enableDebugFlag;\n this.credentialsExpirationCheckIntervalId = null;\n this.currentCredentialsExpirationStamp = null;\n if (enableDebugFlag) {\n this.enableDebug();\n }\n }\n static noop() {}\n enableDebug() {\n this.log = console.log.bind(console);\n }\n startCredentialsExpirationCheck(expiration) {\n this.stopCredentialsExpirationCheck();\n this.currentCredentialsExpirationStamp = new Date(expiration).getTime();\n this.credentialsExpirationCheckIntervalId = setInterval(() => {\n const curentTimeStamp = new Date().getTime();\n if (this.currentCredentialsExpirationStamp - curentTimeStamp <= 300000) {\n this.emit('updateCredentials');\n }\n }, 5000);\n }\n stopCredentialsExpirationCheck() {\n clearInterval(this.credentialsExpirationCheckIntervalId);\n this.credentialsExpirationCheckIntervalId = null;\n }\n updateWebSocketCredentials(accessKeyId, secretAccessKey, sessionToken, expiration) {\n this.log('iot updateWebSocketCredentials');\n if (this.device) {\n this.device.updateWebSocketCredentials(accessKeyId, secretAccessKey, sessionToken);\n this.startCredentialsExpirationCheck(expiration);\n }\n }\n connect(apiMqttUrl, apiMqttClientId, region, accessKeyId, secretAccessKey, sessionToken, expiration) {\n let forceDisconnect = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;\n this.log('iot connect');\n return this.disconnect(forceDisconnect).then(() => {\n return new Promise((resolve, reject) => {\n this.device = Object(aws_iot_device_sdk__WEBPACK_IMPORTED_MODULE_0__[\"device\"])({\n protocol: 'wss',\n clientId: apiMqttClientId,\n region,\n host: apiMqttUrl,\n accessKeyId: accessKeyId,\n secretKey: secretAccessKey,\n sessionToken: sessionToken,\n keepalive: 30,\n maximumReconnectTimeMs: 8000,\n enableMetrics: false,\n debug: this.debugFlag,\n autoResubscribe: true\n });\n this.startCredentialsExpirationCheck(expiration);\n let __s = () => {\n var _this$device, _this$device2;\n (_this$device = this.device) === null || _this$device === void 0 ? void 0 : _this$device.off('connect', __s);\n (_this$device2 = this.device) === null || _this$device2 === void 0 ? void 0 : _this$device2.off('error', __e);\n resolve(this.device);\n };\n let __e = e => {\n var _this$device3, _this$device4;\n (_this$device3 = this.device) === null || _this$device3 === void 0 ? void 0 : _this$device3.off('connect', __s);\n (_this$device4 = this.device) === null || _this$device4 === void 0 ? void 0 : _this$device4.off('error', __e);\n reject(e);\n };\n this.device.once('connect', __s);\n this.device.once('error', __e);\n this.device.on('message', this.__messageCb.bind(this));\n this.device.on('connect', this.__connectCb.bind(this));\n this.device.on('reconnect', this.__reconnectCb.bind(this));\n this.device.on('error', this.__failureCb.bind(this));\n this.device.on('close', this.__closeCb.bind(this));\n this.device.on('offline', this.__offlineCb.bind(this));\n });\n });\n }\n disconnect() {\n let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.stopCredentialsExpirationCheck();\n return new Promise((resolve, reject) => {\n if (!this.device) {\n resolve();\n return;\n }\n let __i = null;\n let __c = () => {\n clearTimeout(__i);\n this.device = null;\n resolve();\n };\n __i = setTimeout(__c, 4000);\n this.device.off('message', this.__messageCb.bind(this));\n this.device.off('connect', this.__connectCb.bind(this));\n this.device.off('reconnect', this.__reconnectCb.bind(this));\n this.device.off('error', this.__failureCb.bind(this));\n this.device.off('close', this.__closeCb.bind(this));\n this.device.off('offline', this.__offlineCb.bind(this));\n this.device.end(force, __c);\n });\n }\n isConnected() {\n return this.connectionActive;\n }\n subscribe(topic) {\n this.log('iot subscribe', topic);\n return this.device && this.device.subscribe(topic);\n }\n unsubscribe(topic) {\n this.log('iot unsubscribe', topic);\n return this.device && this.device.unsubscribe(topic);\n }\n send(topic, message) {\n this.log('iot send', topic, message);\n let msg = typeof message === 'object' ? JSON.stringify(message) : message;\n return this.device && this.device.publish(topic, msg);\n }\n __reconnectCb() {\n this.log('iot reconnect');\n this.emit('reconnect');\n }\n __connectCb() {\n this.log('iot connect');\n this.connectionActive = true;\n this.emit('connect');\n }\n __failureCb(err) {\n this.log('iot failure');\n this.emit('error', err);\n }\n __closeCb(responseObject) {\n this.log('iot close');\n this.connectionActive = false;\n this.emit('close');\n }\n __offlineCb(responseObject) {\n this.log('iot offline');\n this.emit('offline');\n }\n __messageCb(t, message, packet) {\n const topic = t.split('/');\n let payload = JSON.parse(this.decoder.decode(message));\n if (payload.display) {\n const decodedDisplay = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(payload.display);\n if (decodedDisplay.userId) {\n payload = {\n ...payload,\n userId: decodedDisplay.userId,\n role: decodedDisplay.role,\n start: decodedDisplay.start\n };\n }\n }\n if (topic[0] === 'user') {\n // user\n const userId = topic[1].replace(\"_\", ':');\n this.emit('message', {\n userId,\n ...payload,\n event: payload.event ? `user:${payload.event}` : 'user'\n });\n } else if (topic[0] === 'wt') {\n const event = payload.event;\n const roomId = topic[2];\n if (topic[1] === 'room') {\n // room\n if (event === 'message' || event === 'template_updated' || event === 'record_start' || event === 'record_stop' || event === 'record_configured' || event === 'record_livestream_available' || event === 'record_livestream_kick' || event === 'user_update_displayname' || event === 'user_update_avatar' || event === 'user_update_bio' || event === 'user_update_customattributes' || event === 'user_update_privateattributes' || event === 'channel_changed' || event === \"instance_homepage_changed\" || event === \"instance_settings_changed\" || event === \"externalmix_changed\" || event === \"video_uploaded\" || event === \"change_user_devices\" || event === \"queue\" || event === \"title_changed\") {\n this.emit('message', {\n event,\n ...payload,\n roomId\n });\n } else if (event === 'joined' || event === 'leaving') {\n this.emit('message', {\n event,\n ...payload,\n isObserver: !!payload.isObserver,\n roomId\n });\n } else if (event === 'left' ||\n //user removed room a.k.a. left the room\n event === 'kicked' || event === 'banned' || event === 'unbanned' || event === 'approved' || event === 'muted' || event === 'unmuted' || event === 'messageRemoved' || event === 'messageReported' || event === 'chatClear' || event === 'handRaised' || event === 'handLowered' || event === 'handsCleared') {\n this.emit('message', {\n event,\n ...payload\n });\n } else if (event === 'volume_set') {\n this.emit('message', {\n event,\n ...payload\n });\n }\n } else if (topic[1] === 'instanceroom') {\n // instance\n if (event === 'add_room' || event === 'remove_room' || event === 'set_room' || event === \"instance_homepage_changed\" || event === 'instance_settings_changed') {\n this.emit('message', {\n event,\n ...payload\n });\n }\n } else if (topic[1] === 'externalmix') {\n const event = payload.event;\n this.emit('message', {\n event,\n ...payload\n });\n } else if (topic[1] === 'asset') {\n this.emit('message', {\n event: 'asset',\n assetId: topic[2],\n ...payload\n });\n }\n } else if (topic[0] === 'wtr' || topic[0] === 'gwtr') {\n const recorderId = topic[1];\n const sessionId = topic[2];\n if (topic[3] === 'control') {\n this.emit('message', {\n event: 'recorder_control',\n ...payload,\n recorderId,\n sessionId\n });\n } // recorder control\n else if (topic[3] === 'monitor') {\n this.emit('message', {\n event: 'recorder_monitor',\n ...payload,\n recorderId,\n sessionId\n });\n } // recorder monitor\n }\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Iot);\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/modules/wt-iot.js?");
|
|
10322
10222
|
|
|
10323
10223
|
/***/ }),
|
|
10324
10224
|
|
|
@@ -10330,7 +10230,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var aws_
|
|
|
10330
10230
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10331
10231
|
|
|
10332
10232
|
"use strict";
|
|
10333
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! webrtc-adapter */ \"./node_modules/webrtc-adapter/src/js/adapter_core.js\");\n/* harmony import */ var _wt_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./wt-emitter */ \"./src/modules/wt-emitter.js\");\n/* harmony import */ var _wt_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./wt-utils */ \"./src/modules/wt-utils.js\");\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n// Watch together janus webrtc library\n\n\n\n\nclass Room {\n constructor(debug) {\n this.debug = debug;\n this.sessions = [];\n this.safariVp8 = false;\n this.browser = webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.browser;\n this.browserDetails = webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails;\n this.webrtcSupported = Room.isWebrtcSupported();\n this.safariVp8TestPromise = Room.testSafariVp8();\n this.safariVp8 = null;\n this.safariVp8TestPromise.then(safariVp8 => {\n this.safariVp8 = safariVp8;\n });\n\n // Let's get it started\n this.whenInitialized = this.initialize();\n }\n initialize() {\n return this.safariVp8TestPromise.then(() => this);\n }\n createSession() {\n let constructId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'reactooroom';\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return new RoomSession(constructId, type, {\n debug: this.debug,\n ...options\n });\n }\n static testSafariVp8() {\n return new Promise(resolve => {\n if (webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.browser === 'safari' && webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.version >= 605) {\n if (RTCRtpSender && RTCRtpSender.getCapabilities && RTCRtpSender.getCapabilities(\"video\") && RTCRtpSender.getCapabilities(\"video\").codecs && RTCRtpSender.getCapabilities(\"video\").codecs.length) {\n var isVp8 = false;\n for (var i in RTCRtpSender.getCapabilities(\"video\").codecs) {\n var codec = RTCRtpSender.getCapabilities(\"video\").codecs[i];\n if (codec && codec.mimeType && codec.mimeType.toLowerCase() === \"video/vp8\") {\n isVp8 = true;\n break;\n }\n }\n resolve(isVp8);\n } else {\n // We do it in a very ugly way, as there's no alternative...\n // We create a PeerConnection to see if VP8 is in an offer\n var testpc = new RTCPeerConnection({}, {});\n testpc.createOffer({\n offerToReceiveVideo: true\n }).then(function (offer) {\n let result = offer.sdp.indexOf(\"VP8\") !== -1;\n testpc.close();\n testpc = null;\n resolve(result);\n });\n }\n } else resolve(false);\n });\n }\n static isWebrtcSupported() {\n return window.RTCPeerConnection !== undefined && window.RTCPeerConnection !== null && navigator.mediaDevices !== undefined && navigator.mediaDevices !== null && navigator.mediaDevices.getUserMedia !== undefined && navigator.mediaDevices.getUserMedia !== null;\n }\n}\nclass RoomSession {\n static noop() {}\n static randomString(len) {\n var charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var randomString = '';\n for (var i = 0; i < len; i++) {\n var randomPoz = Math.floor(Math.random() * charSet.length);\n randomString += charSet.substring(randomPoz, randomPoz + 1);\n }\n return randomString;\n }\n\n //TODO: solve\n // #eventList = ['error', 'kicked', 'addLocalParticipant', ,'addRemoteInstructor','addRemoteParticipant','addRemoteTalkback', 'addRemoteObserver', 'removeRemoteInstructor', 'removeLocalParticipant', 'removeRemoteParticipant', 'removeRemoteTalkback', 'removeRemoteObserver', 'localMuted', 'localHasVideo', 'localHasAudio', 'data', 'iceState', 'connectionState', 'joined', 'joining', 'dataChannel', 'disconnect', 'observerIds', 'talkbackIds', 'instructorId', 'published', 'publishing', 'remoteTrackMuted', 'streamingStatus', 'streaming', 'streamStarting'];\n //\n\n constructor() {\n let constructId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'reactooroom';\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n Object.assign(this, Object(_wt_emitter__WEBPACK_IMPORTED_MODULE_1__[\"default\"])());\n this.options = {\n ...options\n };\n this.defaultDataChannelLabel = 'JanusDataChannel';\n this.server = null;\n this.iceServers = null;\n this.token = null;\n this.roomId = null;\n this.streamId = null;\n this.pin = null;\n this.userId = null;\n this.sessiontype = type;\n this.initialBitrate = 0;\n this.simulcast = false;\n this.simulcastBitrates = {\n high: 900000,\n medium: 300000,\n low: 100000\n };\n this.recordingFilename = null;\n this.pluginName = RoomSession.sessionTypes[type];\n this.id = null;\n this.privateId = null;\n this.constructId = constructId || RoomSession.randomString(16);\n this.sessionId = null;\n this.handleId = null;\n this.ws = null;\n this.isRestarting = false;\n this.isConnecting = false;\n this.isDisconnecting = false;\n this.isConnected = false;\n this.isPublished = false;\n this.isReclaiming = false;\n this.isStreaming = false;\n this._retries = 0;\n this._maxRetries = 3;\n this._keepAliveId = null;\n this._participants = [];\n this._roomType = 'watchparty';\n this._isDataChannelOpen = false;\n this._abortController = null;\n this.isAudioMuted = false;\n this.isVideoMuted = false;\n this.isVideoEnabled = false;\n this.isAudioEnabed = false;\n this.subscriptionRules = {\n ...RoomSession.subscriptionRules,\n ...(this.options.subscriptionRules || {})\n };\n this._log = RoomSession.noop;\n if (this.options.debug) {\n this._enableDebug();\n }\n }\n _participantShouldSubscribe(userId) {\n const myUser = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(this.display);\n const remoteUser = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(userId);\n let localUserRole = (myUser === null || myUser === void 0 ? void 0 : myUser.role) || 'participant';\n let remoteUserRole = (remoteUser === null || remoteUser === void 0 ? void 0 : remoteUser.role) || 'participant';\n return this.subscriptionRules[localUserRole][this._roomType || 'watchparty'].indexOf(remoteUserRole) > -1;\n }\n _getAddParticipantEventName(handleId) {\n var _decodeJanusDisplay;\n let handle = this._getHandle(handleId);\n if (!handle) {\n this.emit('error', {\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'getParticipantEventName']\n });\n }\n const participantRole = (_decodeJanusDisplay = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay === void 0 ? void 0 : _decodeJanusDisplay.role;\n switch (participantRole) {\n case 'participant':\n return 'addRemoteParticipant';\n case 'talkback':\n return 'addRemoteTalkback';\n case 'monitor':\n return 'addRemoteTalkback';\n case 'observer':\n case 'observerSolo1':\n case 'observerSolo2':\n case 'observerSolo3':\n return 'addRemoteObserver';\n case 'host':\n return 'addRemoteInstructor';\n case 'companionTV':\n return 'addRemoteCompanionTV';\n case 'companionPhone':\n return 'addRemoteCompanionPhone';\n default:\n return 'addRemoteParticipant';\n }\n }\n _getRemoveParticipantEventName(handleId) {\n var _decodeJanusDisplay2;\n let handle = this._getHandle(handleId);\n if (!handle) {\n this.emit('error', {\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'getParticipantEventName']\n });\n }\n const participantRole = (_decodeJanusDisplay2 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay2 === void 0 ? void 0 : _decodeJanusDisplay2.role;\n switch (participantRole) {\n case 'participant':\n return 'removeRemoteParticipant';\n case 'talkback':\n return 'removeRemoteTalkback';\n case 'monitor':\n return 'removeRemoteTalkback';\n case 'observer':\n case 'observerSolo1':\n case 'observerSolo2':\n case 'observerSolo3':\n return 'removeRemoteObserver';\n case 'host':\n return 'removeRemoteInstructor';\n case 'companionTV':\n return 'removeRemoteCompanionTV';\n case 'companionPhone':\n return 'removeRemoteCompanionPhone';\n default:\n return 'removeRemoteParticipant';\n }\n }\n sendMessage(handleId) {\n let message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n body: 'Example Body'\n };\n let dontWait = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let dontResolveOnAck = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return this._send({\n \"janus\": \"message\",\n \"handle_id\": handleId,\n ...message\n }, dontWait, dontResolveOnAck).then(json => {\n if (json && json[\"janus\"] === \"success\") {\n let plugindata = json[\"plugindata\"] || {};\n let data = plugindata[\"data\"];\n return Promise.resolve(data);\n }\n return Promise.resolve();\n }).catch(json => {\n if (json && json[\"error\"]) {\n return Promise.reject({\n type: 'warning',\n id: 1,\n message: 'sendMessage failed',\n data: json[\"error\"]\n });\n } else {\n return Promise.reject({\n type: 'warning',\n id: 1,\n message: 'sendMessage failed',\n data: json\n });\n }\n });\n }\n _send() {\n let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let ignoreResponse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let dontResolveOnAck = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let transaction = RoomSession.randomString(12);\n let requestData = {\n ...request,\n transaction,\n token: this.token,\n ...(this.sessionId && {\n 'session_id': this.sessionId\n } || {})\n };\n this._log(requestData);\n return new Promise((resolve, reject) => {\n let messageTimeoutId = null;\n let abortResponse = () => {\n this._abortController.signal.removeEventListener('abort', abortResponse);\n clearTimeout(messageTimeoutId);\n this.ws.removeEventListener('message', parseResponse);\n reject({\n type: 'warning',\n id: 17,\n message: 'connection cancelled'\n });\n };\n let parseResponse = event => {\n let json = JSON.parse(event.data);\n let r_transaction = json['transaction'];\n if (r_transaction === transaction && (!dontResolveOnAck || json['janus'] !== 'ack')) {\n clearTimeout(messageTimeoutId);\n this._abortController.signal.removeEventListener('abort', abortResponse);\n this.ws.removeEventListener('message', parseResponse);\n if (json['janus'] === 'error') {\n var _json$error;\n if ((json === null || json === void 0 ? void 0 : (_json$error = json.error) === null || _json$error === void 0 ? void 0 : _json$error.code) == 403) {\n this.disconnect(true);\n }\n reject({\n type: 'error',\n id: 2,\n message: 'send failed',\n data: json,\n requestData\n });\n } else {\n resolve(json);\n }\n }\n };\n if (ignoreResponse) {\n if (this.ws && this.ws.readyState === 1) {\n this.ws.send(JSON.stringify(requestData));\n }\n resolve();\n } else {\n if (this.ws && this.ws.readyState === 1) {\n this.ws.addEventListener('message', parseResponse);\n messageTimeoutId = setTimeout(() => {\n this.ws.removeEventListener('message', parseResponse);\n this._abortController.signal.removeEventListener('abort', abortResponse);\n reject({\n type: 'error',\n id: 3,\n message: 'send timeout',\n data: requestData\n });\n }, 10000);\n this._abortController.signal.addEventListener('abort', abortResponse);\n this.ws.send(JSON.stringify(requestData));\n } else {\n reject({\n type: 'warning',\n id: 29,\n message: 'No connection to WebSockets',\n data: requestData\n });\n }\n }\n });\n }\n _connectionClosed() {\n if (!this.isConnected || this.isConnecting || this.isDisconnecting) {\n return;\n }\n if (this._retries < this._maxRetries) {\n setTimeout(() => {\n this._retries++;\n this._reconnect().catch(e => {\n this.emit('error', e);\n });\n }, 3000 * this._retries);\n } else {\n if (this.sessiontype === 'reactooroom') {\n this.disconnect(true);\n } else if (this.sessiontype === 'streaming') {\n this.stopStream();\n }\n this.emit('error', {\n type: 'error',\n id: 4,\n message: 'Lost connection to WebSockets',\n data: null\n });\n }\n }\n _wipeListeners() {\n if (this.ws) {\n this.ws.removeEventListener('close', this.__connectionClosedBoundFn);\n this.ws.removeEventListener('message', this.__handleWsEventsBoundFn);\n }\n }\n _startKeepAlive() {\n this._send({\n \"janus\": \"keepalive\"\n }).then(json => {\n if (json[\"janus\"] !== 'ack') {\n this.emit('error', {\n type: 'warning',\n id: 5,\n message: 'keepalive response suspicious',\n data: json[\"janus\"]\n });\n }\n }).catch(e => {\n this.emit('error', {\n type: 'warning',\n id: 6,\n message: 'keepalive dead',\n data: e\n });\n this._connectionClosed();\n });\n this._keepAliveId = setTimeout(() => {\n this._startKeepAlive();\n }, 30000);\n }\n _stopKeepAlive() {\n clearTimeout(this._keepAliveId);\n }\n _handleWsEvents(event) {\n let json = JSON.parse(event.data);\n var sender = json[\"sender\"];\n var type = json[\"janus\"];\n let handle = this._getHandle(sender);\n if (!handle) {\n return;\n }\n if (type === \"trickle\") {\n let candidate = json[\"candidate\"];\n let config = handle.webrtcStuff;\n if (config.pc && config.remoteSdp) {\n if (!candidate || candidate.completed === true) {\n config.pc.addIceCandidate(null);\n } else {\n config.pc.addIceCandidate(candidate);\n }\n } else {\n if (!config.candidates) {\n config.candidates = [];\n }\n config.candidates.push(candidate);\n }\n } else if (type === \"webrtcup\") {\n //none universal\n } else if (type === \"hangup\") {\n this._log('hangup on', handle.handleId);\n this._removeParticipant(handle.handleId, null, false);\n } else if (type === \"detached\") {\n this._log('detached on', handle.handleId);\n this._removeParticipant(handle.handleId, null, true);\n } else if (type === \"media\") {\n this._log('Media event:', handle.handleId, json[\"type\"], json[\"receiving\"], json[\"mid\"]);\n } else if (type === \"slowlink\") {\n this._log('Slowlink', handle.handleId, json[\"uplink\"], json[\"lost\"], json[\"mid\"]);\n } else if (type === \"event\") {\n //none universal\n } else if (type === 'timeout') {\n this.ws.close(3504, \"Gateway timeout\");\n } else if (type === 'success' || type === 'error') {\n // we're capturing those elsewhere\n } else {\n this._log(`Unknown event: ${type} on session: ${this.sessionId}`);\n }\n\n // LOCAL\n\n if (sender === this.handleId) {\n if (type === \"event\") {\n var plugindata = json[\"plugindata\"] || {};\n var msg = plugindata[\"data\"] || {};\n var jsep = json[\"jsep\"];\n let result = msg[\"result\"] || null;\n let event = msg[\"videoroom\"] || null;\n let list = msg[\"publishers\"] || {};\n let leaving = msg[\"leaving\"];\n let kicked = msg[\"kicked\"];\n\n //let joining = msg[\"joining\"];\n let unpublished = msg[\"unpublished\"];\n let error = msg[\"error\"];\n if (event === \"joined\") {\n this.id = msg[\"id\"];\n this.privateId = msg[\"private_id\"];\n this.isConnected = true;\n this.emit('joined', true);\n this._log('We have successfully joined Room');\n for (let f in list) {\n let userId = list[f][\"display\"];\n let streams = list[f][\"streams\"] || [];\n let id = list[f][\"id\"];\n for (let i in streams) {\n streams[i][\"id\"] = id;\n streams[i][\"display\"] = userId;\n }\n this._log('Remote userId: ', userId);\n if (this._participantShouldSubscribe(userId)) {\n this._log('Creating user: ', userId);\n this._createParticipant(userId, id).then(handle => {\n return this.sendMessage(handle.handleId, {\n body: {\n \"request\": \"join\",\n \"room\": this.roomId,\n \"ptype\": \"subscriber\",\n streams: streams.map(stream => ({\n feed: stream.id,\n mid: stream.mid\n })),\n //\"feed\": id,\n \"private_id\": this.privateId,\n ...(this.webrtcVersion > 1000 ? {\n id: this.userId\n } : {}),\n pin: this.pin\n }\n });\n }).catch(err => {\n this.emit('error', err);\n });\n }\n }\n } else if (event === \"event\") {\n if (msg[\"streams\"] !== undefined && msg[\"streams\"] !== null) {\n this._log('Got my own streams back', msg[\"streams\"]);\n }\n for (let f in list) {\n let userId = list[f][\"display\"];\n let streams = list[f][\"streams\"] || [];\n let id = list[f][\"id\"];\n for (let i in streams) {\n streams[i][\"id\"] = id;\n streams[i][\"display\"] = userId;\n }\n this._log('Remote userId: ', userId);\n if (this._participantShouldSubscribe(userId)) {\n this._log('Creating user: ', userId);\n this._createParticipant(userId, id).then(handle => {\n return this.sendMessage(handle.handleId, {\n body: {\n \"request\": \"join\",\n \"room\": this.roomId,\n \"ptype\": \"subscriber\",\n streams: streams.map(stream => ({\n feed: stream.id,\n mid: stream.mid\n })),\n \"private_id\": this.privateId,\n ...(this.webrtcVersion > 1000 ? {\n id: this.userId\n } : {}),\n pin: this.pin\n }\n });\n }).catch(err => {\n this.emit('error', err);\n });\n }\n }\n if (leaving === 'ok') {\n this._log('leaving', this.handleId, 'this is us');\n this._removeParticipant(this.handleId);\n if (msg['reason'] === 'kicked') {\n this.emit('kicked');\n this.disconnect().catch(() => {});\n }\n } else if (leaving) {\n //TODO: shouldnt we detach?\n this._log('leaving', leaving);\n this._removeParticipant(null, leaving, true);\n }\n if (unpublished === 'ok') {\n this._log('unpublished', this.handleId, 'this is us');\n this._removeParticipant(this.handleId, null, false); // we do just hangup\n } else if (unpublished) {\n this._log('unpublished', unpublished);\n this._removeParticipant(null, unpublished, true); // we do hangup and detach\n }\n\n if (kicked === 'ok') {\n // this case shouldn't exist\n } else if (kicked) {\n this._log('kicked', kicked);\n this._removeParticipant(null, kicked, true); // we do hangup and detach\n }\n\n if (error) {\n this.emit('error', {\n type: 'error',\n id: 7,\n message: 'local participant error',\n data: [sender, msg]\n });\n }\n }\n\n // Streaming related\n else if (result && result[\"status\"]) {\n this.emit('streamingStatus', result[\"status\"]);\n if (result[\"status\"] === 'stopped') {\n this.stopStream();\n }\n if (result[\"status\"] === 'started') {\n this.emit('streaming', true);\n this.isStreaming = true;\n }\n }\n if (jsep !== undefined && jsep !== null) {\n if (this.sessiontype === 'reactooroom') {\n this._webrtcPeer(this.handleId, jsep).catch(err => {\n this.emit('error', err);\n });\n } else if (this.sessiontype === 'streaming') {\n this._publishRemote(this.handleId, jsep).catch(err => {\n this.emit('error', err);\n });\n }\n }\n } else if (type === \"webrtcup\") {\n if (this.simulcast) {\n return;\n }\n this._log('Configuring bitrate: ' + this.initialBitrate);\n if (this.initialBitrate > 0) {\n this.sendMessage(this.handleId, {\n \"body\": {\n \"request\": \"configure\",\n \"bitrate\": this.initialBitrate\n }\n }).catch(() => null);\n }\n }\n }\n\n //REMOTE\n else {\n let plugindata = json[\"plugindata\"] || {};\n let msg = plugindata[\"data\"] || {};\n let jsep = json[\"jsep\"];\n let event = msg[\"videoroom\"];\n let error = msg[\"error\"];\n let substream = msg[\"substream\"];\n if (event === \"attached\") {\n var _decodeJanusDisplay3, _decodeJanusDisplay4;\n this._log('Remote have successfully joined Room', msg);\n this.emit(this._getAddParticipantEventName(handle.handleId), {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay3 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay3 === void 0 ? void 0 : _decodeJanusDisplay3.userId,\n role: (_decodeJanusDisplay4 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay4 === void 0 ? void 0 : _decodeJanusDisplay4.role,\n stream: null,\n track: null,\n adding: false,\n constructId: this.constructId,\n metaData: this.options.metaData,\n hasAudioTrack: false,\n hasVideoTrack: false\n });\n }\n if (error) {\n this.emit('error', {\n type: 'warning',\n id: 8,\n message: 'remote participant error',\n data: [sender, msg]\n });\n }\n if (jsep) {\n this._publishRemote(handle.handleId, jsep).catch(err => {\n this.emit('error', err);\n });\n }\n }\n }\n _handleDataEvents(handleId, type, data) {\n let handle = this._getHandle(handleId);\n if (type === 'state') {\n this._log(` - Data channel status - `, `UID: ${handleId}`, `STATUS: ${JSON.stringify(data)}`, `ME: ${handleId === this.handleId}`);\n if (handle) {\n let config = handle.webrtcStuff;\n config.dataChannelOpen = this.defaultDataChannelLabel === (data === null || data === void 0 ? void 0 : data.label) && (data === null || data === void 0 ? void 0 : data.state) === 'open';\n }\n if (handleId === this.handleId && this.defaultDataChannelLabel === (data === null || data === void 0 ? void 0 : data.label)) {\n this._isDataChannelOpen = (data === null || data === void 0 ? void 0 : data.state) === 'open';\n this.emit('dataChannel', (data === null || data === void 0 ? void 0 : data.state) === 'open');\n }\n }\n if (type === 'error') {\n this.emit('error', {\n type: 'warning',\n id: 9,\n message: 'data event warning',\n data: [handleId, data]\n });\n if (handle) {\n let config = handle.webrtcStuff;\n if (this.defaultDataChannelLabel === data.label) {\n config.dataChannelOpen = false;\n }\n }\n if (handleId === this.handleId && this.defaultDataChannelLabel === data.label) {\n this._isDataChannelOpen = false;\n this.emit('dataChannel', false);\n }\n }\n if (handleId === this.handleId && type === 'message') {\n let d = null;\n try {\n d = JSON.parse(data);\n } catch (e) {\n this.emit('error', {\n type: 'warning',\n id: 10,\n message: 'data message parse error',\n data: [handleId, e]\n });\n return;\n }\n this.emit('data', d);\n }\n }\n\n //removeHandle === true -> hangup, detach, removeHandle === false -> hangup\n _removeParticipant(handleId, rfid) {\n let removeHandle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n let handle = this._getHandle(handleId, rfid);\n if (!handle) {\n return Promise.resolve();\n } else {\n handleId = handle.handleId;\n }\n return this._send({\n \"janus\": \"hangup\",\n \"handle_id\": handleId\n }, true).then(() => removeHandle ? this._send({\n \"janus\": \"detach\",\n \"handle_id\": handleId\n }, true) : Promise.resolve()).finally(() => {\n try {\n if (handle.webrtcStuff.stream) {\n if (!this.isRestarting) {\n handle.webrtcStuff.stream.getTracks().forEach(track => track.stop());\n } else {\n handle.webrtcStuff.stream.getTracks().forEach(track => track.onended = null);\n }\n }\n } catch (e) {\n // Do nothing\n }\n handle.webrtcStuff.stream = null;\n if (handle.webrtcStuff.dataChannel) {\n Object.keys(handle.webrtcStuff.dataChannel).forEach(label => {\n handle.webrtcStuff.dataChannel[label].onmessage = null;\n handle.webrtcStuff.dataChannel[label].onopen = null;\n handle.webrtcStuff.dataChannel[label].onclose = null;\n handle.webrtcStuff.dataChannel[label].onerror = null;\n });\n }\n if (handle.webrtcStuff.pc) {\n handle.webrtcStuff.pc.onicecandidate = null;\n handle.webrtcStuff.pc.ontrack = null;\n handle.webrtcStuff.pc.ondatachannel = null;\n handle.webrtcStuff.pc.onconnectionstatechange = null;\n handle.webrtcStuff.pc.oniceconnectionstatechange = null;\n }\n try {\n handle.webrtcStuff.pc.close();\n } catch (e) {}\n handle.webrtcStuff = {\n stream: null,\n mySdp: null,\n mediaConstraints: null,\n pc: null,\n dataChannelOpen: false,\n dataChannel: null,\n dtmfSender: null,\n trickle: true,\n iceDone: false\n };\n if (handleId === this.handleId) {\n var _decodeJanusDisplay5, _decodeJanusDisplay6;\n this._isDataChannelOpen = false;\n this.isPublished = false;\n this.emit('published', {\n status: false,\n hasStream: false\n });\n this.emit('removeLocalParticipant', {\n id: handleId,\n userId: (_decodeJanusDisplay5 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay5 === void 0 ? void 0 : _decodeJanusDisplay5.userId,\n role: (_decodeJanusDisplay6 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay6 === void 0 ? void 0 : _decodeJanusDisplay6.role\n });\n } else {\n var _decodeJanusDisplay7, _decodeJanusDisplay8;\n this.emit(this._getRemoveParticipantEventName(handleId), {\n id: handleId,\n userId: (_decodeJanusDisplay7 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay7 === void 0 ? void 0 : _decodeJanusDisplay7.userId,\n role: (_decodeJanusDisplay8 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay8 === void 0 ? void 0 : _decodeJanusDisplay8.role\n });\n }\n if (removeHandle) {\n let handleIndex = this._participants.findIndex(p => p.handleId === handleId);\n this._participants.splice(handleIndex, 1);\n }\n return true;\n });\n }\n _createParticipant() {\n let userId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n let rfid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n return this._send({\n \"janus\": \"attach\",\n \"plugin\": this.pluginName\n }).then(json => {\n let handleId = json.data[\"id\"];\n let handle = {\n handleId,\n rfid,\n userId,\n webrtcStuff: {\n stream: null,\n mySdp: null,\n mediaConstraints: null,\n pc: null,\n dataChannelOpen: false,\n dataChannel: null,\n dtmfSender: null,\n trickle: true,\n iceDone: false,\n isIceRestarting: false\n }\n };\n this._participants.push(handle);\n return handle;\n });\n }\n _joinRoom(roomId, pin, userId, display) {\n return this.sendMessage(this.handleId, {\n body: {\n \"request\": \"join\",\n \"room\": roomId,\n \"pin\": pin,\n \"ptype\": \"publisher\",\n \"display\": display,\n ...(this.webrtcVersion > 1000 ? {\n id: userId\n } : {})\n }\n }, false, true);\n }\n _watchStream(id) {\n return this.sendMessage(this.handleId, {\n body: {\n \"request\": \"watch\",\n id: String(id)\n }\n }, false, true);\n }\n _leaveRoom() {\n let dontWait = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return this.isConnected ? this.sendMessage(this.handleId, {\n body: {\n \"request\": \"leave\"\n }\n }, dontWait).finally(() => {\n this.isConnected = false;\n this.emit('joined', false);\n }) : Promise.resolve();\n }\n\n // internal reconnect\n\n _reconnect() {\n if (this.isReclaiming) {\n return Promise.resolve();\n }\n if (this.ws) {\n this._wipeListeners();\n if (this.ws.readyState === 1) {\n this.ws.close();\n }\n }\n this._stopKeepAlive();\n this.isReclaiming = true;\n this.emit('joining', true);\n return new Promise((resolve, reject) => {\n let abortReconnect = () => {\n this._abortController.signal.removeEventListener('abort', abortReconnect);\n this.ws.removeEventListener('close', this.__connectionClosedBoundFn);\n this.ws.removeEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = null;\n this.ws.onerror = null;\n this.isReclaiming = false;\n this.emit('joining', false);\n reject({\n type: 'warning',\n id: 17,\n message: 'Connection cancelled',\n data: e\n });\n };\n this.ws = new WebSocket(this.server, 'janus-protocol');\n this.__connectionClosedBoundFn = this._connectionClosed.bind(this);\n this.__handleWsEventsBoundFn = this._handleWsEvents.bind(this);\n this.ws.addEventListener('close', this.__connectionClosedBoundFn);\n this.ws.addEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = () => {\n this._abortController.signal.removeEventListener('abort', abortReconnect);\n this._send({\n \"janus\": \"claim\"\n }).then(json => {\n this.sessionId = json[\"session_id\"] ? json[\"session_id\"] : json.data[\"id\"];\n this._startKeepAlive();\n this.isReclaiming = false;\n this.emit('joining', false);\n this._retries = 0;\n resolve(json);\n }).catch(error => {\n this.isReclaiming = false;\n this.emit('joining', false);\n reject({\n type: 'error',\n id: 11,\n message: 'reconnection error',\n data: error\n });\n });\n };\n\n // this is called before 'close' event callback so it doesn't break reconnect loop\n this.ws.onerror = e => {\n this._abortController.signal.removeEventListener('abort', abortReconnect);\n this.isReclaiming = false;\n this.emit('joining', false);\n reject({\n type: 'warning',\n id: 12,\n message: 'ws reconnection error',\n data: e\n });\n };\n this._abortController.signal.addEventListener('abort', abortReconnect);\n });\n }\n connect(roomId, pin, server, iceServers, token, display, userId) {\n let webrtcVersion = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;\n let initialBitrate = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 0;\n let recordingFilename = arguments.length > 9 ? arguments[9] : undefined;\n let simulcast = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : false;\n let simulcastBitrates = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : {};\n if (this.isConnecting) {\n return Promise.reject({\n type: 'warning',\n id: 16,\n message: 'connection already in progress'\n });\n }\n if (this.ws) {\n this._wipeListeners();\n }\n this._stopKeepAlive();\n this._abortController = new AbortController();\n this.sessionId = null;\n this.server = server;\n this.iceServers = iceServers;\n this.token = token;\n this.roomId = roomId;\n this.pin = pin;\n this.display = display;\n this.userId = userId;\n this.webrtcVersion = webrtcVersion;\n this.initialBitrate = initialBitrate;\n this.recordingFilename = recordingFilename;\n this.isConnecting = true;\n this.simulcast = simulcast;\n this.simulcastBitrates = {\n ...this.simulcastBitrates,\n ...simulcastBitrates\n };\n this.emit('joining', true);\n return new Promise((resolve, reject) => {\n this.ws = new WebSocket(this.server, 'janus-protocol');\n this.__connectionClosedBoundFn = this._connectionClosed.bind(this);\n this.__handleWsEventsBoundFn = this._handleWsEvents.bind(this);\n let abortConnect = () => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this.ws.removeEventListener('close', this.__connectionClosedBoundFn);\n this.ws.removeEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = null;\n this.ws.onerror = null;\n this.isConnecting = false;\n this.emit('joining', false);\n reject({\n type: 'warning',\n id: 17,\n message: 'Connection cancelled'\n });\n };\n this.ws.addEventListener('close', this.__connectionClosedBoundFn);\n this.ws.addEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = () => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this._retries = 0;\n this._send({\n \"janus\": \"create\"\n }).then(json => {\n this.sessionId = json[\"session_id\"] ? json[\"session_id\"] : json.data[\"id\"];\n this._startKeepAlive();\n return 1;\n }).then(() => this._createParticipant(userId)).then(handle => {\n this.handleId = handle.handleId;\n return 1;\n }).then(() => this._joinRoom(roomId, pin, userId, display)).then(() => {\n this.isConnecting = false;\n this.emit('joining', false);\n resolve(this);\n }).catch(error => {\n this.isConnecting = false;\n this.emit('joining', false);\n reject({\n type: (error === null || error === void 0 ? void 0 : error.type) === 'warning' ? 'warning' : 'error',\n id: 13,\n message: 'connection error',\n data: error\n });\n });\n };\n this.ws.onerror = e => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this.isConnecting = false;\n this.emit('joining', false);\n reject({\n type: 'error',\n id: 14,\n message: 'ws connection error',\n data: e\n });\n };\n this._abortController.signal.addEventListener('abort', abortConnect);\n });\n }\n disconnect() {\n var _this$_abortControlle, _this$_abortControlle2;\n if (this.isDisconnecting) {\n return Promise.resolve();\n }\n (_this$_abortControlle = this._abortController) === null || _this$_abortControlle === void 0 ? void 0 : (_this$_abortControlle2 = _this$_abortControlle.abort) === null || _this$_abortControlle2 === void 0 ? void 0 : _this$_abortControlle2.call(_this$_abortControlle);\n this._stopKeepAlive();\n let isConnected = this.isConnected;\n this.isDisconnecting = true;\n return Promise.all(this._participants.map(p => this._removeParticipant(p.handleId))).finally(() => {\n this._wipeListeners();\n if (this.ws && this.ws.readyState === 1) {\n this._send({\n \"janus\": \"destroy\"\n }, true);\n this.ws.close();\n }\n this.sessionId = null;\n this.isPublished = false;\n this.isConnected = false;\n this.isDisconnecting = false;\n this.emit('publishing', false);\n this.emit('published', {\n status: false,\n hasStream: false\n });\n this.emit('joining', false);\n this.emit('joined', false);\n this.emit('disconnect', isConnected);\n return Promise.resolve('Disconnected');\n });\n }\n startStream(streamId, server, iceServers, token, userId) {\n if (this.isConnecting) {\n return Promise.reject({\n type: 'warning',\n id: 16,\n message: 'connection error',\n data: 'Connection is in progress'\n });\n }\n if (this.ws) {\n this._wipeListeners();\n }\n this._stopKeepAlive();\n this._abortController = new AbortController();\n this.server = server;\n this.iceServers = iceServers;\n this.token = token;\n this.streamId = streamId;\n this.userId = userId;\n this.sessionId = null;\n this.isConnecting = true;\n this.emit('streamStarting', true);\n return new Promise((resolve, reject) => {\n this.ws = new WebSocket(this.server, 'janus-protocol');\n this.__connectionClosedBoundFn = this._connectionClosed.bind(this);\n this.__handleWsEventsBoundFn = this._handleWsEvents.bind(this);\n let abortConnect = () => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this.ws.removeEventListener('close', this.__connectionClosedBoundFn);\n this.ws.removeEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = null;\n this.ws.onerror = null;\n this.isConnecting = false;\n this.emit('streamStarting', false);\n reject({\n type: 'warning',\n id: 17,\n message: 'Connection cancelled'\n });\n };\n this.ws.addEventListener('close', this.__connectionClosedBoundFn);\n this.ws.addEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = () => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this._retries = 0;\n this._send({\n \"janus\": \"create\"\n }).then(json => {\n this.sessionId = json[\"session_id\"] ? json[\"session_id\"] : json.data[\"id\"];\n this._startKeepAlive();\n return 1;\n }).then(() => this._createParticipant(userId)).then(handle => {\n this.handleId = handle.handleId;\n return 1;\n }).then(() => this._watchStream(streamId)).then(() => {\n this.isConnecting = false;\n this.emit('streamStarting', false);\n resolve(this);\n }).catch(error => {\n this.isConnecting = false;\n this.emit('streamStarting', false);\n reject({\n type: 'error',\n id: 13,\n message: 'connection error',\n data: error\n });\n });\n };\n this.ws.onerror = e => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this.isConnecting = false;\n this.emit('streamStarting', false);\n reject({\n type: 'error',\n id: 14,\n message: 'ws connection error',\n data: e\n });\n };\n this._abortController.signal.addEventListener('abort', abortConnect);\n });\n }\n stopStream() {\n var _this$_abortControlle3, _this$_abortControlle4;\n if (this.isDisconnecting) {\n return Promise.resolve();\n }\n (_this$_abortControlle3 = this._abortController) === null || _this$_abortControlle3 === void 0 ? void 0 : (_this$_abortControlle4 = _this$_abortControlle3.abort) === null || _this$_abortControlle4 === void 0 ? void 0 : _this$_abortControlle4.call(_this$_abortControlle3);\n this._stopKeepAlive();\n let isStreaming = this.isStreaming;\n this.isDisconnecting = true;\n return this._removeParticipant(this.handleId).finally(() => {\n this.sendMessage(this.handleId, {\n body: {\n \"request\": \"stop\"\n }\n }, true);\n this._wipeListeners();\n this._send({\n \"janus\": \"destroy\"\n }, true);\n if (this.ws && this.ws.readyState === 1) {\n this.ws.close();\n }\n this.sessionId = null;\n this.isDisconnecting = false;\n this.isStreaming = false;\n this.emit('streamStarting', false);\n this.emit('streaming', false);\n this.emit('disconnect', isStreaming);\n return Promise.resolve('Disconnected');\n });\n }\n destroy() {\n if (this.sessiontype === 'reactooroom') {\n return this.disconnect().then(() => {\n this.clear();\n return true;\n });\n } else if (this.sessiontype === 'streaming') {\n return this.stopStream().then(() => {\n this.clear();\n return true;\n });\n }\n }\n _enableDebug() {\n this._log = console.log.bind(console);\n }\n _getHandle(handleId) {\n let rfid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n return this._participants.find(p => p.handleId === handleId || rfid && p.rfid === rfid);\n }\n _getStats() {\n let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n return Promise.all(this._participants.map(participant => {\n let mediaTrack = null;\n if (type === 'video') {\n mediaTrack = participant.webrtcStuff && participant.webrtcStuff.stream && participant.webrtcStuff.stream.getVideoTracks().length && participant.webrtcStuff.stream.getVideoTracks()[0];\n } else if (type === 'audio') {\n mediaTrack = participant.webrtcStuff && participant.webrtcStuff.stream && participant.webrtcStuff.stream.getAudioTracks().length && participant.webrtcStuff.stream.getAudioTracks()[0];\n }\n return participant.webrtcStuff && participant.webrtcStuff.pc && participant.webrtcStuff.pc.getStats(mediaTrack).then(r => ({\n handle: participant,\n stats: r\n })).catch(e => Promise.resolve({\n handle: participant,\n stats: e\n }));\n }));\n }\n _sendTrickleCandidate(handleId, candidate) {\n return this._send({\n \"janus\": \"trickle\",\n \"candidate\": candidate,\n \"handle_id\": handleId\n });\n }\n _webrtc(handleId) {\n let enableOntrack = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let handle = this._getHandle(handleId);\n if (!handle) {\n this.emit('error', {\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'create rtc connection']\n });\n }\n let config = handle.webrtcStuff;\n if (!config.pc) {\n let pc_config = {\n \"iceServers\": this.iceServers,\n \"iceTransportPolicy\": 'all',\n \"bundlePolicy\": undefined\n };\n pc_config[\"sdpSemantics\"] = \"unified-plan\";\n let pc_constraints = {};\n if (webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.browser === \"edge\") {\n // This is Edge, enable BUNDLE explicitly\n pc_config.bundlePolicy = \"max-bundle\";\n }\n\n // pc_config.bundlePolicy = 'balanced';\n // pc_config.iceTransportPolicy = 'relay';\n // pc_config.rtcpMuxPolicy = \"negotiate\";\n\n this._log('new RTCPeerConnection', pc_config, pc_constraints);\n config.pc = new RTCPeerConnection(pc_config, pc_constraints);\n config.pc.onconnectionstatechange = () => {\n if (config.pc.connectionState === 'failed') {\n this._iceRestart(handleId);\n }\n this.emit('connectionState', [handleId, handleId === this.handleId, config.pc.connectionState]);\n if (handleId !== this.handleId && config.pc.connectionState === 'connected') {\n var _decodeJanusDisplay9, _decodeJanusDisplay10;\n this.emit(this._getAddParticipantEventName(handle.handleId), {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay9 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay9 === void 0 ? void 0 : _decodeJanusDisplay9.userId,\n role: (_decodeJanusDisplay10 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay10 === void 0 ? void 0 : _decodeJanusDisplay10.role,\n stream: config.stream,\n track: null,\n optional: true,\n constructId: this.constructId,\n metaData: this.options.metaData,\n adding: false,\n hasAudioTrack: !!(config.stream && config.stream.getAudioTracks().length),\n hasVideoTrack: !!(config.stream && config.stream.getVideoTracks().length)\n });\n }\n };\n config.pc.oniceconnectionstatechange = () => {\n if (config.pc.iceConnectionState === 'failed') {\n this._iceRestart(handleId);\n }\n this.emit('iceState', [handleId, handleId === this.handleId, config.pc.iceConnectionState]);\n if (handleId !== this.handleId && (config.pc.iceConnectionState === 'completed' || config.pc.iceConnectionState === 'connected')) {\n var _decodeJanusDisplay11, _decodeJanusDisplay12;\n this.emit(this._getAddParticipantEventName(handle.handleId), {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay11 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay11 === void 0 ? void 0 : _decodeJanusDisplay11.userId,\n role: (_decodeJanusDisplay12 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay12 === void 0 ? void 0 : _decodeJanusDisplay12.role,\n stream: config.stream,\n track: null,\n optional: true,\n constructId: this.constructId,\n metaData: this.options.metaData,\n adding: false,\n hasAudioTrack: !!(config.stream && config.stream.getAudioTracks().length),\n hasVideoTrack: !!(config.stream && config.stream.getVideoTracks().length)\n });\n }\n };\n config.pc.onicecandidate = event => {\n if (event.candidate == null || webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.browser === 'edge' && event.candidate.candidate.indexOf('endOfCandidates') > 0) {\n config.iceDone = true;\n this._sendTrickleCandidate(handleId, {\n \"completed\": true\n }).catch(e => {\n this.emit('error', e);\n });\n } else {\n // JSON.stringify doesn't work on some WebRTC objects anymore\n // See https://code.google.com/p/chromium/issues/detail?id=467366\n var candidate = {\n \"candidate\": event.candidate.candidate,\n \"sdpMid\": event.candidate.sdpMid,\n \"sdpMLineIndex\": event.candidate.sdpMLineIndex\n };\n this._sendTrickleCandidate(handleId, candidate).catch(e => {\n this.emit('error', e);\n });\n }\n };\n if (enableOntrack) {\n config.pc.ontrack = event => {\n if (!event.streams) return;\n\n //config.stream = event.streams[0];\n\n if (!config.stream) {\n config.stream = new MediaStream();\n }\n if (event.track) {\n var _decodeJanusDisplay13, _decodeJanusDisplay14;\n let mid = event.transceiver ? event.transceiver.mid : event.track.id;\n config.stream.addTrack(event.track);\n this.emit(this._getAddParticipantEventName(handle.handleId), {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n mid,\n id: handle.handleId,\n userId: (_decodeJanusDisplay13 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay13 === void 0 ? void 0 : _decodeJanusDisplay13.userId,\n role: (_decodeJanusDisplay14 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay14 === void 0 ? void 0 : _decodeJanusDisplay14.role,\n stream: config.stream,\n track: event.track,\n constructId: this.constructId,\n metaData: this.options.metaData,\n adding: true,\n hasAudioTrack: !!(config.stream && config.stream.getAudioTracks().length),\n hasVideoTrack: !!(config.stream && config.stream.getVideoTracks().length)\n });\n if (event.track.onended) return;\n event.track.onended = ev => {\n var _config$pc, _config$pc$getTransce;\n let transceiver = (_config$pc = config.pc) === null || _config$pc === void 0 ? void 0 : (_config$pc$getTransce = _config$pc.getTransceivers()) === null || _config$pc$getTransce === void 0 ? void 0 : _config$pc$getTransce.find(t => t.receiver.track === ev.target);\n let mid = (transceiver === null || transceiver === void 0 ? void 0 : transceiver.mid) || ev.target.id;\n if (config.stream) {\n var _decodeJanusDisplay15, _decodeJanusDisplay16;\n config.stream && config.stream.removeTrack(ev.target);\n this.emit(this._getAddParticipantEventName(handle.handleId), {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n mid,\n userId: (_decodeJanusDisplay15 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay15 === void 0 ? void 0 : _decodeJanusDisplay15.userId,\n role: (_decodeJanusDisplay16 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay16 === void 0 ? void 0 : _decodeJanusDisplay16.role,\n stream: config.stream,\n track: ev.target,\n constructId: this.constructId,\n metaData: this.options.metaData,\n adding: false,\n removing: true,\n hasAudioTrack: !!(config.stream && config.stream.getAudioTracks().length),\n hasVideoTrack: !!(config.stream && config.stream.getVideoTracks().length)\n });\n }\n };\n event.track.onmute = ev => {\n var _decodeJanusDisplay17, _decodeJanusDisplay18;\n this._log('remoteTrackMuted', 'onmute');\n let transceiver = config.pc.getTransceivers().find(t => t.receiver.track === ev.target);\n let mid = transceiver.mid || ev.target.id;\n this.emit('remoteTrackMuted', {\n id: handle.handleId,\n mid,\n userId: (_decodeJanusDisplay17 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay17 === void 0 ? void 0 : _decodeJanusDisplay17.userId,\n role: (_decodeJanusDisplay18 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay18 === void 0 ? void 0 : _decodeJanusDisplay18.role,\n stream: config.stream,\n kind: ev.target.kind,\n track: ev.target,\n muted: true\n });\n };\n event.track.onunmute = ev => {\n var _decodeJanusDisplay19, _decodeJanusDisplay20;\n this._log('remoteTrackMuted', 'onunmute');\n let transceiver = config.pc.getTransceivers().find(t => t.receiver.track === ev.target);\n let mid = transceiver.mid || ev.target.id;\n this.emit('remoteTrackMuted', {\n id: handle.handleId,\n mid,\n userId: (_decodeJanusDisplay19 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay19 === void 0 ? void 0 : _decodeJanusDisplay19.userId,\n role: (_decodeJanusDisplay20 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay20 === void 0 ? void 0 : _decodeJanusDisplay20.role,\n stream: config.stream,\n kind: ev.target.kind,\n track: ev.target,\n muted: false\n });\n };\n }\n };\n }\n }\n if (!config.dataChannel || !config.dataChannelOpen) {\n config.dataChannel = {};\n var onDataChannelMessage = event => {\n this._handleDataEvents(handleId, 'message', event.data);\n };\n var onDataChannelStateChange = event => {\n let label = event.target.label;\n let protocol = event.target.protocol;\n let state = config.dataChannel[label] ? config.dataChannel[label].readyState : \"null\";\n this._handleDataEvents(handleId, 'state', {\n state,\n label\n });\n };\n //TODO: check this\n var onDataChannelError = error => {\n var _error$channel;\n this._handleDataEvents(handleId, 'error', {\n label: error === null || error === void 0 ? void 0 : (_error$channel = error.channel) === null || _error$channel === void 0 ? void 0 : _error$channel.label,\n error\n });\n };\n const createDataChannel = (label, protocol, incoming) => {\n let options = {\n ordered: true\n };\n if (!incoming) {\n if (protocol) {\n options = {\n ...options,\n protocol\n };\n }\n config.dataChannel[label] = config.pc.createDataChannel(label, options);\n } else {\n config.dataChannel[label] = incoming;\n }\n config.dataChannel[label].onmessage = onDataChannelMessage;\n config.dataChannel[label].onopen = onDataChannelStateChange;\n config.dataChannel[label].onclose = onDataChannelStateChange;\n config.dataChannel[label].onerror = onDataChannelError;\n };\n createDataChannel(this.defaultDataChannelLabel, null, null);\n config.pc.ondatachannel = function (event) {\n createDataChannel(event.channel.label, event.channel.protocol, event.channel);\n };\n }\n }\n _webrtcPeer(handleId, jsep) {\n let handle = this._getHandle(handleId);\n if (!handle) {\n return Promise.reject({\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'rtc peer']\n });\n }\n var config = handle.webrtcStuff;\n if (jsep !== undefined && jsep !== null) {\n if (config.pc === null) {\n this._log(\"No PeerConnection: if this is an answer, use createAnswer and not _webrtcPeer\");\n return Promise.resolve(null);\n }\n return config.pc.setRemoteDescription(jsep).then(() => {\n config.remoteSdp = jsep.sdp;\n // Any trickle candidate we cached?\n if (config.candidates && config.candidates.length > 0) {\n for (var i = 0; i < config.candidates.length; i++) {\n var candidate = config.candidates[i];\n if (!candidate || candidate.completed === true) {\n config.pc.addIceCandidate(null);\n } else {\n config.pc.addIceCandidate(candidate);\n }\n }\n config.candidates = [];\n }\n // Done\n return true;\n });\n } else {\n return Promise.reject({\n type: 'warning',\n id: 22,\n message: 'rtc peer',\n data: [handleId, 'invalid jsep']\n });\n }\n }\n _iceRestart(handleId) {\n let handle = this._getHandle(handleId);\n if (!handle) {\n return;\n }\n var config = handle.webrtcStuff;\n\n // Already restarting;\n if (config.isIceRestarting) {\n return;\n }\n if (this.handleId === handleId) {\n this._log('Performing local ICE restart');\n config.isIceRestarting = true;\n let hasAudio = !!(config.stream && config.stream.getAudioTracks().length > 0);\n let hasVideo = !!(config.stream && config.stream.getVideoTracks().length > 0);\n this._setupTransceivers(handleId, [hasAudio, false, hasVideo, false]);\n this._createAO('offer', handleId, true).then(jsep => {\n if (!jsep) {\n return null;\n }\n return this.sendMessage(handleId, {\n body: {\n \"request\": \"configure\",\n \"audio\": hasAudio,\n \"video\": hasVideo,\n \"data\": true,\n ...(this.recordingFilename ? {\n filename: this.recordingFilename\n } : {})\n },\n jsep\n });\n }).then(r => {\n config.isIceRestarting = false;\n this._log('ICE restart success');\n }).catch(e => {\n config.isIceRestarting = false;\n this.emit('error', {\n type: 'warning',\n id: 28,\n message: 'iceRestart failed',\n data: e\n });\n });\n } else {\n this._log('Performing remote ICE restart', handleId);\n config.isIceRestarting = true;\n return this.sendMessage(handleId, {\n body: {\n \"request\": \"configure\",\n \"restart\": true\n }\n }).then(() => {\n config.isIceRestarting = false;\n }).catch(() => {\n config.isIceRestarting = false;\n });\n }\n }\n _setupTransceivers(handleId, _ref) {\n let [audioSend, audioRecv, videoSend, videoRecv] = _ref;\n let handle = this._getHandle(handleId);\n if (!handle) {\n return null;\n }\n let config = handle.webrtcStuff;\n let audioTransceiver = null,\n videoTransceiver = null;\n let transceivers = config.pc.getTransceivers();\n if (transceivers && transceivers.length > 0) {\n for (var i in transceivers) {\n var t = transceivers[i];\n if (t.sender && t.sender.track && t.sender.track.kind === \"audio\" || t.receiver && t.receiver.track && t.receiver.track.kind === \"audio\") {\n if (!audioTransceiver) audioTransceiver = t;\n continue;\n }\n if (t.sender && t.sender.track && t.sender.track.kind === \"video\" || t.receiver && t.receiver.track && t.receiver.track.kind === \"video\") {\n if (!videoTransceiver) videoTransceiver = t;\n continue;\n }\n }\n }\n\n // Handle audio (and related changes, if any)\n if (!audioSend && !audioRecv) {\n // Audio disabled: have we removed it?\n if (audioTransceiver) {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection(\"inactive\");\n } else {\n audioTransceiver.direction = \"inactive\";\n }\n }\n } else {\n // Take care of audio m-line\n if (audioSend && audioRecv) {\n if (audioTransceiver) {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection(\"sendrecv\");\n } else {\n audioTransceiver.direction = \"sendrecv\";\n }\n }\n } else if (audioSend && !audioRecv) {\n if (audioTransceiver) {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection(\"sendonly\");\n } else {\n audioTransceiver.direction = \"sendonly\";\n }\n }\n } else if (!audioSend && audioRecv) {\n if (audioTransceiver) {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection(\"recvonly\");\n } else {\n audioTransceiver.direction = \"recvonly\";\n }\n } else {\n // In theory, this is the only case where we might not have a transceiver yet\n config.pc.addTransceiver(\"audio\", {\n direction: \"recvonly\"\n });\n }\n }\n }\n // Handle video (and related changes, if any)\n if (!videoSend && !videoRecv) {\n if (videoTransceiver) {\n if (videoTransceiver.setDirection) {\n videoTransceiver.setDirection(\"inactive\");\n } else {\n videoTransceiver.direction = \"inactive\";\n }\n }\n } else {\n // Take care of video m-line\n if (videoSend && videoRecv) {\n if (videoTransceiver) {\n if (videoTransceiver.setDirection) {\n videoTransceiver.setDirection(\"sendrecv\");\n } else {\n videoTransceiver.direction = \"sendrecv\";\n }\n }\n } else if (videoSend && !videoRecv) {\n if (videoTransceiver) {\n if (videoTransceiver.setDirection) {\n videoTransceiver.setDirection(\"sendonly\");\n } else {\n videoTransceiver.direction = \"sendonly\";\n }\n }\n } else if (!videoSend && videoRecv) {\n if (videoTransceiver) {\n if (videoTransceiver.setDirection) {\n videoTransceiver.setDirection(\"recvonly\");\n } else {\n videoTransceiver.direction = \"recvonly\";\n }\n } else {\n // In theory, this is the only case where we might not have a transceiver yet\n config.pc.addTransceiver(\"video\", {\n direction: \"recvonly\"\n });\n }\n }\n }\n }\n _createAO() {\n let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'offer';\n let handleId = arguments.length > 1 ? arguments[1] : undefined;\n let iceRestart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let handle = this._getHandle(handleId);\n if (!handle) {\n return Promise.reject({\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'createAO', type]\n });\n }\n let methodName = null;\n if (type === 'offer') {\n methodName = 'createOffer';\n } else {\n methodName = 'createAnswer';\n }\n let config = handle.webrtcStuff;\n let mediaConstraints = {};\n if (iceRestart) {\n mediaConstraints[\"iceRestart\"] = true;\n }\n return config.pc[methodName](mediaConstraints).then(function (response) {\n config.mySdp = response.sdp;\n let _p = config.pc.setLocalDescription(response).catch(e => {\n return Promise.reject({\n type: 'warning',\n id: 24,\n message: 'setLocalDescription',\n data: [handleId, e]\n });\n });\n config.mediaConstraints = mediaConstraints;\n if (!config.iceDone && !config.trickle) {\n // Don't do anything until we have all candidates\n return Promise.resolve(null);\n }\n\n // JSON.stringify doesn't work on some WebRTC objects anymore\n // See https://code.google.com/p/chromium/issues/detail?id=467366\n var jsep = {\n \"type\": response.type,\n \"sdp\": response.sdp\n };\n return _p.then(() => jsep);\n }, e => {\n return Promise.reject({\n type: 'warning',\n id: 25,\n message: methodName,\n data: [handleId, e]\n });\n });\n }\n _publishRemote(handleId, jsep) {\n let handle = this._getHandle(handleId);\n if (!handle) {\n return Promise.reject({\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'publish remote participant']\n });\n }\n this._webrtc(handleId, true);\n let config = handle.webrtcStuff;\n if (jsep) {\n return config.pc.setRemoteDescription(jsep).then(() => {\n config.remoteSdp = jsep.sdp;\n // Any trickle candidate we cached?\n if (config.candidates && config.candidates.length > 0) {\n for (var i = 0; i < config.candidates.length; i++) {\n var candidate = config.candidates[i];\n if (!candidate || candidate.completed === true) {\n // end-of-candidates\n config.pc.addIceCandidate(null);\n } else {\n // New candidate\n config.pc.addIceCandidate(candidate);\n }\n }\n config.candidates = [];\n }\n this._setupTransceivers(handleId, [false, true, false, true]);\n\n // Create the answer now\n return this._createAO('answer', handleId, false).then(_jsep => {\n if (!_jsep) {\n this.emit('error', {\n type: 'warning',\n id: 19,\n message: 'publish remote participant',\n data: [handleId, 'no jsep']\n });\n return Promise.resolve();\n }\n return this.sendMessage(handleId, {\n \"body\": {\n \"request\": \"start\",\n ...(this.roomId && {\n \"room\": this.roomId\n }),\n ...(this.pin && {\n pin: this.pin\n })\n },\n \"jsep\": _jsep\n });\n });\n }, e => Promise.reject({\n type: 'warning',\n id: 23,\n message: 'setRemoteDescription',\n data: [handleId, e]\n }));\n } else {\n return Promise.resolve();\n }\n }\n\n //Public methods\n\n publishLocal() {\n let stream = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (this.isDisconnecting || !this.isConnected) {\n return Promise.reject({\n type: 'warning',\n id: 18,\n message: 'Either not connected or disconnecting'\n });\n }\n this.emit('publishing', true);\n let handle = this._getHandle(this.handleId);\n if (!handle) {\n return Promise.reject({\n type: 'error',\n id: 21,\n message: 'no local id, connect before publishing',\n data: null\n });\n }\n this._webrtc(this.handleId);\n let config = handle.webrtcStuff;\n let audioTrackReplacePromise = Promise.resolve();\n let videoTrackReplacePromise = Promise.resolve();\n if (!config.stream) {\n var _stream$getTracks;\n config.stream = stream;\n stream === null || stream === void 0 ? void 0 : (_stream$getTracks = stream.getTracks()) === null || _stream$getTracks === void 0 ? void 0 : _stream$getTracks.forEach(track => {\n if (track.kind === 'audio' || !this.simulcast) {\n config.pc.addTrack(track, stream);\n } else {\n // adding simulcast streams\n let bitRates = this.simulcastBitrates;\n if (webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.browser !== 'firefox') {\n // standard\n\n config.pc.addTransceiver(track, {\n direction: 'sendonly',\n streams: [config.stream],\n sendEncodings: [{\n rid: 'h',\n active: true,\n maxBitrate: bitRates.high\n }, {\n rid: 'm',\n active: true,\n maxBitrate: bitRates.medium,\n scaleResolutionDownBy: 2\n }, {\n rid: 'l',\n active: true,\n maxBitrate: bitRates.low,\n scaleResolutionDownBy: 4\n }]\n });\n } else {\n // firefox\n let transceiver = config.pc.addTransceiver(track, {\n direction: 'sendonly',\n streams: [config.stream]\n });\n let sender = transceiver ? transceiver.sender : null;\n if (sender) {\n let parameters = sender.getParameters() || {};\n parameters.encodings = track.sendEncodings || [{\n rid: 'h',\n active: true,\n maxBitrate: bitRates.high\n }, {\n rid: 'm',\n active: true,\n maxBitrate: bitRates.medium,\n scaleResolutionDownBy: 2\n }, {\n rid: 'l',\n active: true,\n maxBitrate: bitRates.low,\n scaleResolutionDownBy: 4\n }];\n sender.setParameters(parameters);\n }\n }\n }\n });\n } else {\n var _config$stream, _config$stream$getAud, _stream$getAudioTrack, _config$stream2, _config$stream2$getVi, _stream$getVideoTrack;\n let transceivers = config.pc.getTransceivers();\n let audioTransceiver = null;\n let videoTransceiver = null;\n if (transceivers && transceivers.length > 0) {\n for (let i in transceivers) {\n let t = transceivers[i];\n if (t.sender && t.sender.track && t.sender.track.kind === \"audio\" || t.receiver && t.receiver.track && t.receiver.track.kind === \"audio\") {\n audioTransceiver = t;\n break;\n }\n }\n for (let i in transceivers) {\n let t = transceivers[i];\n if (t.sender && t.sender.track && t.sender.track.kind === \"video\" || t.receiver && t.receiver.track && t.receiver.track.kind === \"video\") {\n videoTransceiver = t;\n break;\n }\n }\n }\n\n /* UPDATE Audio */\n // stopping existing tracks\n\n let oldAudioStream = config === null || config === void 0 ? void 0 : (_config$stream = config.stream) === null || _config$stream === void 0 ? void 0 : (_config$stream$getAud = _config$stream.getAudioTracks()) === null || _config$stream$getAud === void 0 ? void 0 : _config$stream$getAud[0];\n if (oldAudioStream) {\n config.stream.removeTrack(oldAudioStream);\n try {\n oldAudioStream.stop();\n } catch (e) {\n this._log(e);\n }\n }\n let replaceAudio = stream === null || stream === void 0 ? void 0 : (_stream$getAudioTrack = stream.getAudioTracks()) === null || _stream$getAudioTrack === void 0 ? void 0 : _stream$getAudioTrack.length;\n if (replaceAudio) {\n config.stream.addTrack(stream.getAudioTracks()[0]);\n if (audioTransceiver && audioTransceiver.sender) {\n audioTrackReplacePromise = audioTransceiver.sender.replaceTrack(stream.getAudioTracks()[0]);\n } else {\n config.pc.addTrack(stream.getAudioTracks()[0], stream);\n }\n } else {\n if (audioTransceiver && audioTransceiver.sender) {\n audioTrackReplacePromise = audioTransceiver.sender.replaceTrack(null);\n }\n }\n\n /* UPDATE Video */\n\n // stopping existing tracks\n\n let oldVideoStream = config === null || config === void 0 ? void 0 : (_config$stream2 = config.stream) === null || _config$stream2 === void 0 ? void 0 : (_config$stream2$getVi = _config$stream2.getVideoTracks()) === null || _config$stream2$getVi === void 0 ? void 0 : _config$stream2$getVi[0];\n if (oldVideoStream) {\n config.stream.removeTrack(oldVideoStream);\n try {\n oldVideoStream.stop();\n } catch (e) {\n this._log(e);\n }\n }\n let replaceVideo = stream === null || stream === void 0 ? void 0 : (_stream$getVideoTrack = stream.getVideoTracks()) === null || _stream$getVideoTrack === void 0 ? void 0 : _stream$getVideoTrack.length;\n if (replaceVideo) {\n config.stream.addTrack(stream.getVideoTracks()[0]);\n if (videoTransceiver && videoTransceiver.sender) {\n videoTrackReplacePromise = videoTransceiver.sender.replaceTrack(stream.getVideoTracks()[0]);\n } else {\n config.pc.addTrack(stream.getVideoTracks()[0], stream);\n }\n } else {\n if (videoTransceiver && videoTransceiver.sender) {\n videoTrackReplacePromise = videoTransceiver.sender.replaceTrack(null);\n }\n }\n }\n let hasAudio = !!(stream && stream.getAudioTracks().length > 0);\n let hasVideo = !!(stream && stream.getVideoTracks().length > 0);\n let isAudioMuted = !stream || stream.getAudioTracks().length === 0 || !stream.getAudioTracks()[0].enabled;\n let isVideoMuted = !stream || stream.getVideoTracks().length === 0 || !stream.getVideoTracks()[0].enabled;\n this.isAudioEnabed = hasAudio;\n this.isVideoEnabled = hasVideo;\n this.isAudioMuted = isAudioMuted;\n this.isVideoMuted = isVideoMuted;\n this._setupTransceivers(this.handleId, [hasAudio, false, hasVideo, false]);\n const emitEvents = () => {\n this.isPublished = true;\n if (config.stream) {\n let tracks = config.stream.getTracks();\n tracks.forEach(track => {\n // used as a flag to not emit tracks that been already emitted\n if (!track.onended) {\n var _decodeJanusDisplay21, _decodeJanusDisplay22;\n this.emit('addLocalParticipant', {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay21 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay21 === void 0 ? void 0 : _decodeJanusDisplay21.userId,\n role: (_decodeJanusDisplay22 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(this.display)) === null || _decodeJanusDisplay22 === void 0 ? void 0 : _decodeJanusDisplay22.role,\n track,\n stream: config.stream,\n adding: true,\n constructId: this.constructId,\n metaData: this.options.metaData,\n hasAudioTrack: hasAudio,\n hasVideoTrack: hasVideo\n });\n track.onended = ev => {\n var _decodeJanusDisplay23, _decodeJanusDisplay24;\n this.emit('addLocalParticipant', {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay23 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay23 === void 0 ? void 0 : _decodeJanusDisplay23.userId,\n role: (_decodeJanusDisplay24 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(this.display)) === null || _decodeJanusDisplay24 === void 0 ? void 0 : _decodeJanusDisplay24.role,\n track: ev.target,\n stream: config.stream,\n adding: false,\n removing: true,\n constructId: this.constructId,\n metaData: this.options.metaData,\n hasAudioTrack: hasAudio,\n hasVideoTrack: hasVideo\n });\n };\n }\n });\n } else {\n var _decodeJanusDisplay25, _decodeJanusDisplay26;\n this.emit('addLocalParticipant', {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay25 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay25 === void 0 ? void 0 : _decodeJanusDisplay25.userId,\n role: (_decodeJanusDisplay26 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(this.display)) === null || _decodeJanusDisplay26 === void 0 ? void 0 : _decodeJanusDisplay26.role,\n stream: null,\n adding: false,\n constructId: this.constructId,\n metaData: this.options.metaData,\n hasAudioTrack: hasAudio,\n hasVideoTrack: hasVideo\n });\n }\n this.emit('published', {\n status: true,\n hasStream: !!config.stream\n });\n this.emit('publishing', false);\n this.emit('localHasVideo', hasVideo);\n this.emit('localHasAudio', hasAudio);\n this.emit('localMuted', {\n type: 'video',\n value: isVideoMuted\n });\n this.emit('localMuted', {\n type: 'audio',\n value: isAudioMuted\n });\n return this;\n };\n\n // this should be enough\n if (this.isPublished) {\n return Promise.all([audioTrackReplacePromise, videoTrackReplacePromise]).then(() => emitEvents());\n }\n return Promise.all([audioTrackReplacePromise, videoTrackReplacePromise]).then(() => this._createAO('offer', this.handleId, false)).then(jsep => {\n if (!jsep) {\n return null;\n }\n //HOTFIX: Temporary fix for Safari 13\n if (jsep.sdp && jsep.sdp.indexOf(\"\\r\\na=ice-ufrag\") === -1) {\n jsep.sdp = jsep.sdp.replace(\"\\na=ice-ufrag\", \"\\r\\na=ice-ufrag\");\n }\n return this.sendMessage(this.handleId, {\n body: {\n \"request\": \"configure\",\n \"audio\": hasAudio,\n \"video\": hasVideo,\n \"data\": true,\n ...(this.recordingFilename ? {\n filename: this.recordingFilename\n } : {})\n },\n jsep\n });\n }).then(r => {\n if (this._isDataChannelOpen) {\n return Promise.resolve(r);\n } else {\n return new Promise((resolve, reject) => {\n let dataChannelTimeoutId = null;\n let _resolve = val => {\n if (val) {\n clearTimeout(dataChannelTimeoutId);\n this._abortController.signal.removeEventListener('abort', _rejectAbort);\n this.off('dataChannel', _resolve, this);\n resolve(this);\n }\n };\n let _rejectTimeout = () => {\n this.off('dataChannel', _resolve, this);\n this._abortController.signal.removeEventListener('abort', _rejectAbort);\n reject({\n type: 'error',\n id: 27,\n message: 'Data channel did not open',\n data: null\n });\n };\n let _rejectAbort = () => {\n this._abortController.signal.removeEventListener('abort', _rejectAbort);\n clearTimeout(dataChannelTimeoutId);\n this.off('dataChannel', _resolve, this);\n reject({\n type: 'warning',\n id: 17,\n message: 'Connection cancelled'\n });\n };\n dataChannelTimeoutId = setTimeout(_rejectTimeout, 5000);\n this._abortController.signal.addEventListener('abort', _rejectAbort);\n this.on('dataChannel', _resolve, this);\n });\n }\n }).then(() => emitEvents()).catch(e => {\n this.emit('publishing', false);\n return Promise.reject(e);\n });\n }\n unpublishLocal() {\n let dontWait = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return this.isPublished ? this.sendMessage(this.handleId, {\n body: {\n \"request\": \"unpublish\"\n }\n }, dontWait).finally(r => {\n this.isPublished = false;\n this.emit('published', {\n status: false,\n hasStream: false\n });\n return r;\n }) : Promise.resolve();\n }\n toggleAudio() {\n let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n let mid = arguments.length > 1 ? arguments[1] : undefined;\n let handle = this._getHandle(this.handleId);\n if (!handle) {\n return Promise.reject({\n type: 'error',\n id: 21,\n message: 'no local id, connect first',\n data: null\n });\n }\n let config = handle.webrtcStuff;\n let transceiver = config.pc.getTransceivers().find(t => t.sender && t.sender.track && t.receiver.track.kind === \"audio\" && (mid ? t.mid === mid : true));\n if (transceiver) {\n transceiver.sender.track.enabled = value !== null ? !!value : !transceiver.sender.track.enabled;\n }\n this.isAudioMuted = !transceiver || !transceiver.sender.track.enabled;\n\n // if (config.stream && config.stream.getAudioTracks().length) {\n // \tconfig.stream.getAudioTracks()[0].enabled = value !== null ? !!value : !config.stream.getAudioTracks()[0].enabled;\n // }\n // this.isAudioMuted = config.stream.getAudioTracks().length === 0 || !config.stream.getAudioTracks()[0].enabled;\n //\n\n this.emit('localMuted', {\n type: 'audio',\n value: this.isAudioMuted,\n mid\n });\n }\n toggleVideo() {\n let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n let mid = arguments.length > 1 ? arguments[1] : undefined;\n let handle = this._getHandle(this.handleId);\n if (!handle) {\n return Promise.reject({\n type: 'error',\n id: 21,\n message: 'no local id, connect first',\n data: null\n });\n }\n let config = handle.webrtcStuff;\n let transceiver = config.pc.getTransceivers().find(t => t.sender && t.sender.track && t.receiver.track.kind === \"video\" && (mid ? t.mid === mid : true));\n if (transceiver) {\n transceiver.sender.track.enabled = value !== null ? !!value : !transceiver.sender.track.enabled;\n }\n this.isVideoMuted = !transceiver || !transceiver.sender.track.enabled;\n\n // if (config.stream && config.stream.getVideoTracks().length) {\n // \tconfig.stream.getVideoTracks()[0].enabled = value !== null ? !!value : !config.stream.getVideoTracks()[0].enabled;\n // }\n // this.isVideoMuted = config.stream.getVideoTracks().length === 0 || !config.stream.getVideoTracks()[0].enabled;\n\n this.emit('localMuted', {\n type: 'video',\n value: this.isVideoMuted,\n mid\n });\n }\n selectSubStream(handleId) {\n let substream = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n this.sendMessage(this.handleId, {\n \"body\": {\n \"request\": \"configure\",\n \"substream\": substream\n }\n }).catch(() => null);\n }\n setRoomType() {\n let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'watchparty';\n this._roomType = type;\n return this._roomType;\n }\n}\n_defineProperty(RoomSession, \"sessionTypes\", {\n 'reactooroom': 'janus.plugin.reactooroom',\n 'streaming': 'janus.plugin.streaming'\n});\n_defineProperty(RoomSession, \"subscriptionRules\", {\n participant: {\n \"watchparty\": ['participant', 'talkback'],\n \"studio\": ['participant', 'talkback', 'host', 'observer'],\n \"commentary\": ['participant', 'talkback', 'host'],\n \"videowall\": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],\n \"videowall-queue\": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],\n \"videowall-queue-video\": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3']\n },\n monitor: {\n \"watchparty\": ['participant', 'host'],\n \"studio\": ['participant', 'host', 'observer'],\n \"commentary\": ['participant', 'host'],\n \"videowall\": ['host', 'participant'],\n \"videowall-queue\": ['host', 'participant'],\n \"videowall-queue-video\": ['host', 'participant']\n },\n talkback: {\n \"watchparty\": ['participant', 'host'],\n \"studio\": ['participant', 'host', 'observer'],\n \"commentary\": ['host', 'participant'],\n \"videowall\": ['host', 'participant'],\n \"videowall-queue\": ['host', 'participant'],\n \"videowall-queue-video\": ['host', 'participant']\n },\n observer: {\n \"watchparty\": ['participant'],\n \"studio\": ['participant'],\n \"commentary\": ['participant'],\n \"videowall\": ['participant'],\n \"videowall-queue\": ['participant'],\n \"videowall-queue-video\": ['participant']\n },\n observerSolo1: {\n \"watchparty\": ['participant'],\n \"studio\": ['participant'],\n \"commentary\": ['participant'],\n \"videowall\": ['participant'],\n \"videowall-queue\": ['participant'],\n \"videowall-queue-video\": ['participant']\n },\n observerSolo2: {\n \"watchparty\": ['participant'],\n \"studio\": ['participant'],\n \"commentary\": ['participant'],\n \"videowall\": ['participant'],\n \"videowall-queue\": ['participant'],\n \"videowall-queue-video\": ['participant']\n },\n observerSolo3: {\n \"watchparty\": ['participant'],\n \"studio\": ['participant'],\n \"commentary\": ['participant'],\n \"videowall\": ['participant'],\n \"videowall-queue\": ['participant'],\n \"videowall-queue-video\": ['participant']\n },\n host: {\n \"watchparty\": [],\n \"studio\": [],\n \"commentary\": [],\n \"videowall\": [],\n \"videowall-queue\": [],\n \"videowall-queue-video\": []\n },\n companionTV: {},\n companionPhone: {}\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Room);\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/modules/wt-room.js?");
|
|
10233
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! webrtc-adapter */ \"./node_modules/webrtc-adapter/src/js/adapter_core.js\");\n/* harmony import */ var _wt_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./wt-emitter */ \"./src/modules/wt-emitter.js\");\n/* harmony import */ var _wt_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./wt-utils */ \"./src/modules/wt-utils.js\");\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n// Watch together janus webrtc library\n\n\n\n\nclass Room {\n constructor(debug) {\n this.debug = debug;\n this.sessions = [];\n this.safariVp8 = false;\n this.browser = webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.browser;\n this.browserDetails = webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails;\n this.webrtcSupported = Room.isWebrtcSupported();\n this.safariVp8TestPromise = Room.testSafariVp8();\n this.safariVp8 = null;\n this.safariVp8TestPromise.then(safariVp8 => {\n this.safariVp8 = safariVp8;\n });\n\n // Let's get it started\n this.whenInitialized = this.initialize();\n }\n initialize() {\n return this.safariVp8TestPromise.then(() => this);\n }\n createSession() {\n let constructId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'reactooroom';\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return new RoomSession(constructId, type, {\n debug: this.debug,\n ...options\n });\n }\n static testSafariVp8() {\n return new Promise(resolve => {\n if (webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.browser === 'safari' && webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.version >= 605) {\n if (RTCRtpSender && RTCRtpSender.getCapabilities && RTCRtpSender.getCapabilities(\"video\") && RTCRtpSender.getCapabilities(\"video\").codecs && RTCRtpSender.getCapabilities(\"video\").codecs.length) {\n var isVp8 = false;\n for (var i in RTCRtpSender.getCapabilities(\"video\").codecs) {\n var codec = RTCRtpSender.getCapabilities(\"video\").codecs[i];\n if (codec && codec.mimeType && codec.mimeType.toLowerCase() === \"video/vp8\") {\n isVp8 = true;\n break;\n }\n }\n resolve(isVp8);\n } else {\n // We do it in a very ugly way, as there's no alternative...\n // We create a PeerConnection to see if VP8 is in an offer\n var testpc = new RTCPeerConnection({}, {});\n testpc.createOffer({\n offerToReceiveVideo: true\n }).then(function (offer) {\n let result = offer.sdp.indexOf(\"VP8\") !== -1;\n testpc.close();\n testpc = null;\n resolve(result);\n });\n }\n } else resolve(false);\n });\n }\n static isWebrtcSupported() {\n return window.RTCPeerConnection !== undefined && window.RTCPeerConnection !== null && navigator.mediaDevices !== undefined && navigator.mediaDevices !== null && navigator.mediaDevices.getUserMedia !== undefined && navigator.mediaDevices.getUserMedia !== null;\n }\n}\nclass RoomSession {\n static noop() {}\n static randomString(len) {\n var charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var randomString = '';\n for (var i = 0; i < len; i++) {\n var randomPoz = Math.floor(Math.random() * charSet.length);\n randomString += charSet.substring(randomPoz, randomPoz + 1);\n }\n return randomString;\n }\n\n //TODO: solve\n // #eventList = ['error', 'kicked', 'addLocalParticipant', ,'addRemoteInstructor','addRemoteParticipant','addRemoteTalkback', 'addRemoteObserver', 'removeRemoteInstructor', 'removeLocalParticipant', 'removeRemoteParticipant', 'removeRemoteTalkback', 'removeRemoteObserver', 'localMuted', 'localHasVideo', 'localHasAudio', 'data', 'iceState', 'connectionState', 'joined', 'joining', 'dataChannel', 'disconnect', 'observerIds', 'talkbackIds', 'instructorId', 'published', 'publishing', 'remoteTrackMuted', 'streamingStatus', 'streaming', 'streamStarting'];\n //\n\n constructor() {\n let constructId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'reactooroom';\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n Object.assign(this, Object(_wt_emitter__WEBPACK_IMPORTED_MODULE_1__[\"default\"])());\n this.options = {\n ...options\n };\n this.defaultDataChannelLabel = 'JanusDataChannel';\n this.server = null;\n this.iceServers = null;\n this.token = null;\n this.roomId = null;\n this.streamId = null;\n this.pin = null;\n this.userId = null;\n this.sessiontype = type;\n this.initialBitrate = 0;\n this.simulcast = false;\n this.simulcastBitrates = {\n high: 900000,\n medium: 300000,\n low: 100000\n };\n this.recordingFilename = null;\n this.pluginName = RoomSession.sessionTypes[type];\n this.id = null;\n this.privateId = null;\n this.constructId = constructId || RoomSession.randomString(16);\n this.sessionId = null;\n this.handleId = null;\n this.ws = null;\n this.isRestarting = false;\n this.isConnecting = false;\n this.isDisconnecting = false;\n this.isConnected = false;\n this.isPublished = false;\n this.isReclaiming = false;\n this.isStreaming = false;\n this._retries = 0;\n this._maxRetries = 3;\n this._keepAliveId = null;\n this._participants = [];\n this._roomType = 'watchparty';\n this._isDataChannelOpen = false;\n this._abortController = null;\n this.isAudioMuted = false;\n this.isVideoMuted = false;\n this.isVideoEnabled = false;\n this.isAudioEnabed = false;\n this.subscriptionRules = {\n ...RoomSession.subscriptionRules,\n ...(this.options.subscriptionRules || {})\n };\n this._log = RoomSession.noop;\n if (this.options.debug) {\n this._enableDebug();\n }\n }\n _participantShouldSubscribe(userId) {\n const myUser = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(this.display);\n const remoteUser = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(userId);\n let localUserRole = (myUser === null || myUser === void 0 ? void 0 : myUser.role) || 'participant';\n let remoteUserRole = (remoteUser === null || remoteUser === void 0 ? void 0 : remoteUser.role) || 'participant';\n return this.subscriptionRules[localUserRole][this._roomType || 'watchparty'].indexOf(remoteUserRole) > -1;\n }\n _getAddParticipantEventName(handleId) {\n var _decodeJanusDisplay;\n let handle = this._getHandle(handleId);\n if (!handle) {\n this.emit('error', {\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'getParticipantEventName']\n });\n }\n const participantRole = (_decodeJanusDisplay = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay === void 0 ? void 0 : _decodeJanusDisplay.role;\n switch (participantRole) {\n case 'participant':\n return 'addRemoteParticipant';\n case 'talkback':\n return 'addRemoteTalkback';\n case 'monitor':\n return 'addRemoteTalkback';\n case 'observer':\n case 'observerSolo1':\n case 'observerSolo2':\n case 'observerSolo3':\n return 'addRemoteObserver';\n case 'host':\n return 'addRemoteInstructor';\n case 'companionTV':\n return 'addRemoteCompanionTV';\n case 'companionPhone':\n return 'addRemoteCompanionPhone';\n default:\n return 'addRemoteParticipant';\n }\n }\n _getRemoveParticipantEventName(handleId) {\n var _decodeJanusDisplay2;\n let handle = this._getHandle(handleId);\n if (!handle) {\n this.emit('error', {\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'getParticipantEventName']\n });\n }\n const participantRole = (_decodeJanusDisplay2 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay2 === void 0 ? void 0 : _decodeJanusDisplay2.role;\n switch (participantRole) {\n case 'participant':\n return 'removeRemoteParticipant';\n case 'talkback':\n return 'removeRemoteTalkback';\n case 'monitor':\n return 'removeRemoteTalkback';\n case 'observer':\n case 'observerSolo1':\n case 'observerSolo2':\n case 'observerSolo3':\n return 'removeRemoteObserver';\n case 'host':\n return 'removeRemoteInstructor';\n case 'companionTV':\n return 'removeRemoteCompanionTV';\n case 'companionPhone':\n return 'removeRemoteCompanionPhone';\n default:\n return 'removeRemoteParticipant';\n }\n }\n sendMessage(handleId) {\n let message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n body: 'Example Body'\n };\n let dontWait = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let dontResolveOnAck = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return this._send({\n \"janus\": \"message\",\n \"handle_id\": handleId,\n ...message\n }, dontWait, dontResolveOnAck).then(json => {\n if (json && json[\"janus\"] === \"success\") {\n let plugindata = json[\"plugindata\"] || {};\n let data = plugindata[\"data\"];\n return Promise.resolve(data);\n }\n return Promise.resolve();\n }).catch(json => {\n if (json && json[\"error\"]) {\n return Promise.reject({\n type: 'warning',\n id: 1,\n message: 'sendMessage failed',\n data: json[\"error\"]\n });\n } else {\n return Promise.reject({\n type: 'warning',\n id: 1,\n message: 'sendMessage failed',\n data: json\n });\n }\n });\n }\n _send() {\n let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let ignoreResponse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let dontResolveOnAck = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let transaction = RoomSession.randomString(12);\n let requestData = {\n ...request,\n transaction,\n token: this.token,\n ...(this.sessionId && {\n 'session_id': this.sessionId\n } || {})\n };\n this._log(requestData);\n return new Promise((resolve, reject) => {\n let messageTimeoutId = null;\n let abortResponse = () => {\n this._abortController.signal.removeEventListener('abort', abortResponse);\n clearTimeout(messageTimeoutId);\n this.ws.removeEventListener('message', parseResponse);\n reject({\n type: 'warning',\n id: 17,\n message: 'connection cancelled'\n });\n };\n let parseResponse = event => {\n let json = JSON.parse(event.data);\n let r_transaction = json['transaction'];\n if (r_transaction === transaction && (!dontResolveOnAck || json['janus'] !== 'ack')) {\n clearTimeout(messageTimeoutId);\n this._abortController.signal.removeEventListener('abort', abortResponse);\n this.ws.removeEventListener('message', parseResponse);\n if (json['janus'] === 'error') {\n var _json$error;\n if ((json === null || json === void 0 ? void 0 : (_json$error = json.error) === null || _json$error === void 0 ? void 0 : _json$error.code) == 403) {\n this.disconnect(true);\n }\n reject({\n type: 'error',\n id: 2,\n message: 'send failed',\n data: json,\n requestData\n });\n } else {\n resolve(json);\n }\n }\n };\n if (ignoreResponse) {\n if (this.ws && this.ws.readyState === 1) {\n this.ws.send(JSON.stringify(requestData));\n }\n resolve();\n } else {\n if (this.ws && this.ws.readyState === 1) {\n this.ws.addEventListener('message', parseResponse);\n messageTimeoutId = setTimeout(() => {\n this.ws.removeEventListener('message', parseResponse);\n this._abortController.signal.removeEventListener('abort', abortResponse);\n reject({\n type: 'error',\n id: 3,\n message: 'send timeout',\n data: requestData\n });\n }, 10000);\n this._abortController.signal.addEventListener('abort', abortResponse);\n this.ws.send(JSON.stringify(requestData));\n } else {\n reject({\n type: 'warning',\n id: 29,\n message: 'No connection to WebSockets',\n data: requestData\n });\n }\n }\n });\n }\n _connectionClosed() {\n if (!this.isConnected || this.isConnecting || this.isDisconnecting) {\n return;\n }\n if (this._retries < this._maxRetries) {\n setTimeout(() => {\n this._retries++;\n this._reconnect().catch(e => {\n this.emit('error', e);\n });\n }, 3000 * this._retries);\n } else {\n if (this.sessiontype === 'reactooroom') {\n this.disconnect(true);\n } else if (this.sessiontype === 'streaming') {\n this.stopStream();\n }\n this.emit('error', {\n type: 'error',\n id: 4,\n message: 'Lost connection to WebSockets',\n data: null\n });\n }\n }\n _wipeListeners() {\n if (this.ws) {\n this.ws.removeEventListener('close', this.__connectionClosedBoundFn);\n this.ws.removeEventListener('message', this.__handleWsEventsBoundFn);\n }\n }\n _startKeepAlive() {\n this._send({\n \"janus\": \"keepalive\"\n }).then(json => {\n if (json[\"janus\"] !== 'ack') {\n this.emit('error', {\n type: 'warning',\n id: 5,\n message: 'keepalive response suspicious',\n data: json[\"janus\"]\n });\n }\n }).catch(e => {\n this.emit('error', {\n type: 'warning',\n id: 6,\n message: 'keepalive dead',\n data: e\n });\n this._connectionClosed();\n });\n this._keepAliveId = setTimeout(() => {\n this._startKeepAlive();\n }, 30000);\n }\n _stopKeepAlive() {\n clearTimeout(this._keepAliveId);\n }\n _handleWsEvents(event) {\n let json = JSON.parse(event.data);\n var sender = json[\"sender\"];\n var type = json[\"janus\"];\n let handle = this._getHandle(sender);\n if (!handle) {\n return;\n }\n if (type === \"trickle\") {\n let candidate = json[\"candidate\"];\n let config = handle.webrtcStuff;\n if (config.pc && config.remoteSdp) {\n if (!candidate || candidate.completed === true) {\n config.pc.addIceCandidate(null);\n } else {\n config.pc.addIceCandidate(candidate);\n }\n } else {\n if (!config.candidates) {\n config.candidates = [];\n }\n config.candidates.push(candidate);\n }\n } else if (type === \"webrtcup\") {\n //none universal\n } else if (type === \"hangup\") {\n this._log('hangup on', handle.handleId);\n this._removeParticipant(handle.handleId, null, false);\n } else if (type === \"detached\") {\n this._log('detached on', handle.handleId);\n this._removeParticipant(handle.handleId, null, true);\n } else if (type === \"media\") {\n this._log('Media event:', handle.handleId, json[\"type\"], json[\"receiving\"], json[\"mid\"]);\n } else if (type === \"slowlink\") {\n this._log('Slowlink', handle.handleId, json[\"uplink\"], json[\"lost\"], json[\"mid\"]);\n } else if (type === \"event\") {\n //none universal\n } else if (type === 'timeout') {\n this.ws.close(3504, \"Gateway timeout\");\n } else if (type === 'success' || type === 'error') {\n // we're capturing those elsewhere\n } else {\n this._log(`Unknown event: ${type} on session: ${this.sessionId}`);\n }\n\n // LOCAL\n\n if (sender === this.handleId) {\n if (type === \"event\") {\n var plugindata = json[\"plugindata\"] || {};\n var msg = plugindata[\"data\"] || {};\n var jsep = json[\"jsep\"];\n let result = msg[\"result\"] || null;\n let event = msg[\"videoroom\"] || null;\n let list = msg[\"publishers\"] || {};\n let leaving = msg[\"leaving\"];\n let kicked = msg[\"kicked\"];\n\n //let joining = msg[\"joining\"];\n let unpublished = msg[\"unpublished\"];\n let error = msg[\"error\"];\n if (event === \"joined\") {\n this.id = msg[\"id\"];\n this.privateId = msg[\"private_id\"];\n this.isConnected = true;\n this.emit('joined', true);\n this._log('We have successfully joined Room');\n for (let f in list) {\n let userId = list[f][\"display\"];\n let streams = list[f][\"streams\"] || [];\n let id = list[f][\"id\"];\n for (let i in streams) {\n streams[i][\"id\"] = id;\n streams[i][\"display\"] = userId;\n }\n this._log('Remote userId: ', userId);\n if (this._participantShouldSubscribe(userId)) {\n this._log('Creating user: ', userId);\n this._createParticipant(userId, id).then(handle => {\n return this.sendMessage(handle.handleId, {\n body: {\n \"request\": \"join\",\n \"room\": this.roomId,\n \"ptype\": \"subscriber\",\n streams: streams.map(stream => ({\n feed: stream.id,\n mid: stream.mid\n })),\n //\"feed\": id,\n \"private_id\": this.privateId,\n ...(this.webrtcVersion > 1000 ? {\n id: this.userId\n } : {}),\n pin: this.pin\n }\n });\n }).catch(err => {\n this.emit('error', err);\n });\n }\n }\n } else if (event === \"event\") {\n if (msg[\"streams\"] !== undefined && msg[\"streams\"] !== null) {\n this._log('Got my own streams back', msg[\"streams\"]);\n }\n for (let f in list) {\n let userId = list[f][\"display\"];\n let streams = list[f][\"streams\"] || [];\n let id = list[f][\"id\"];\n for (let i in streams) {\n streams[i][\"id\"] = id;\n streams[i][\"display\"] = userId;\n }\n this._log('Remote userId: ', userId);\n if (this._participantShouldSubscribe(userId)) {\n this._log('Creating user: ', userId);\n this._createParticipant(userId, id).then(handle => {\n return this.sendMessage(handle.handleId, {\n body: {\n \"request\": \"join\",\n \"room\": this.roomId,\n \"ptype\": \"subscriber\",\n streams: streams.map(stream => ({\n feed: stream.id,\n mid: stream.mid\n })),\n \"private_id\": this.privateId,\n ...(this.webrtcVersion > 1000 ? {\n id: this.userId\n } : {}),\n pin: this.pin\n }\n });\n }).catch(err => {\n this.emit('error', err);\n });\n }\n }\n if (leaving === 'ok') {\n this._log('leaving', this.handleId, 'this is us');\n this._removeParticipant(this.handleId);\n if (msg['reason'] === 'kicked') {\n this.emit('kicked');\n this.disconnect().catch(() => {});\n }\n } else if (leaving) {\n //TODO: shouldnt we detach?\n this._log('leaving', leaving);\n this._removeParticipant(null, leaving, true);\n }\n if (unpublished === 'ok') {\n this._log('unpublished', this.handleId, 'this is us');\n this._removeParticipant(this.handleId, null, false); // we do just hangup\n } else if (unpublished) {\n this._log('unpublished', unpublished);\n this._removeParticipant(null, unpublished, true); // we do hangup and detach\n }\n\n if (kicked === 'ok') {\n // this case shouldn't exist\n } else if (kicked) {\n this._log('kicked', kicked);\n this._removeParticipant(null, kicked, true); // we do hangup and detach\n }\n\n if (error) {\n this.emit('error', {\n type: 'error',\n id: 7,\n message: 'local participant error',\n data: [sender, msg]\n });\n }\n }\n\n // Streaming related\n else if (result && result[\"status\"]) {\n this.emit('streamingStatus', result[\"status\"]);\n if (result[\"status\"] === 'stopped') {\n this.stopStream();\n }\n if (result[\"status\"] === 'started') {\n this.emit('streaming', true);\n this.isStreaming = true;\n }\n }\n if (jsep !== undefined && jsep !== null) {\n if (this.sessiontype === 'reactooroom') {\n this._webrtcPeer(this.handleId, jsep).catch(err => {\n this.emit('error', err);\n });\n } else if (this.sessiontype === 'streaming') {\n this._publishRemote(this.handleId, jsep).catch(err => {\n this.emit('error', err);\n });\n }\n }\n } else if (type === \"webrtcup\") {\n if (this.simulcast) {\n return;\n }\n this._log('Configuring bitrate: ' + this.initialBitrate);\n if (this.initialBitrate > 0) {\n this.sendMessage(this.handleId, {\n \"body\": {\n \"request\": \"configure\",\n \"bitrate\": this.initialBitrate\n }\n }).catch(() => null);\n }\n }\n }\n\n //REMOTE\n else {\n let plugindata = json[\"plugindata\"] || {};\n let msg = plugindata[\"data\"] || {};\n let jsep = json[\"jsep\"];\n let event = msg[\"videoroom\"];\n let error = msg[\"error\"];\n let substream = msg[\"substream\"];\n if (event === \"attached\") {\n var _decodeJanusDisplay3, _decodeJanusDisplay4;\n this._log('Remote have successfully joined Room', msg);\n this.emit(this._getAddParticipantEventName(handle.handleId), {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay3 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay3 === void 0 ? void 0 : _decodeJanusDisplay3.userId,\n role: (_decodeJanusDisplay4 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay4 === void 0 ? void 0 : _decodeJanusDisplay4.role,\n stream: null,\n track: null,\n adding: false,\n constructId: this.constructId,\n metaData: this.options.metaData,\n hasAudioTrack: false,\n hasVideoTrack: false\n });\n }\n if (error) {\n this.emit('error', {\n type: 'warning',\n id: 8,\n message: 'remote participant error',\n data: [sender, msg]\n });\n }\n if (jsep) {\n this._publishRemote(handle.handleId, jsep).catch(err => {\n this.emit('error', err);\n });\n }\n }\n }\n _handleDataEvents(handleId, type, data) {\n let handle = this._getHandle(handleId);\n if (type === 'state') {\n this._log(` - Data channel status - `, `UID: ${handleId}`, `STATUS: ${JSON.stringify(data)}`, `ME: ${handleId === this.handleId}`);\n if (handle) {\n let config = handle.webrtcStuff;\n config.dataChannelOpen = this.defaultDataChannelLabel === (data === null || data === void 0 ? void 0 : data.label) && (data === null || data === void 0 ? void 0 : data.state) === 'open';\n }\n if (handleId === this.handleId && this.defaultDataChannelLabel === (data === null || data === void 0 ? void 0 : data.label)) {\n this._isDataChannelOpen = (data === null || data === void 0 ? void 0 : data.state) === 'open';\n this.emit('dataChannel', (data === null || data === void 0 ? void 0 : data.state) === 'open');\n }\n }\n if (type === 'error') {\n this.emit('error', {\n type: 'warning',\n id: 9,\n message: 'data event warning',\n data: [handleId, data]\n });\n if (handle) {\n let config = handle.webrtcStuff;\n if (this.defaultDataChannelLabel === data.label) {\n config.dataChannelOpen = false;\n }\n }\n if (handleId === this.handleId && this.defaultDataChannelLabel === data.label) {\n this._isDataChannelOpen = false;\n this.emit('dataChannel', false);\n }\n }\n if (handleId === this.handleId && type === 'message') {\n let d = null;\n try {\n d = JSON.parse(data);\n } catch (e) {\n this.emit('error', {\n type: 'warning',\n id: 10,\n message: 'data message parse error',\n data: [handleId, e]\n });\n return;\n }\n this.emit('data', d);\n }\n }\n\n //removeHandle === true -> hangup, detach, removeHandle === false -> hangup\n _removeParticipant(handleId, rfid) {\n let removeHandle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n let handle = this._getHandle(handleId, rfid);\n if (!handle) {\n return Promise.resolve();\n } else {\n handleId = handle.handleId;\n }\n return this._send({\n \"janus\": \"hangup\",\n \"handle_id\": handleId\n }, true).then(() => removeHandle ? this._send({\n \"janus\": \"detach\",\n \"handle_id\": handleId\n }, true) : Promise.resolve()).finally(() => {\n try {\n if (handle.webrtcStuff.stream) {\n if (!this.isRestarting) {\n handle.webrtcStuff.stream.getTracks().forEach(track => track.stop());\n } else {\n handle.webrtcStuff.stream.getTracks().forEach(track => track.onended = null);\n }\n }\n } catch (e) {\n // Do nothing\n }\n handle.webrtcStuff.stream = null;\n if (handle.webrtcStuff.dataChannel) {\n Object.keys(handle.webrtcStuff.dataChannel).forEach(label => {\n handle.webrtcStuff.dataChannel[label].onmessage = null;\n handle.webrtcStuff.dataChannel[label].onopen = null;\n handle.webrtcStuff.dataChannel[label].onclose = null;\n handle.webrtcStuff.dataChannel[label].onerror = null;\n });\n }\n if (handle.webrtcStuff.pc) {\n handle.webrtcStuff.pc.onicecandidate = null;\n handle.webrtcStuff.pc.ontrack = null;\n handle.webrtcStuff.pc.ondatachannel = null;\n handle.webrtcStuff.pc.onconnectionstatechange = null;\n handle.webrtcStuff.pc.oniceconnectionstatechange = null;\n }\n try {\n handle.webrtcStuff.pc.close();\n } catch (e) {}\n handle.webrtcStuff = {\n stream: null,\n mySdp: null,\n mediaConstraints: null,\n pc: null,\n dataChannelOpen: false,\n dataChannel: null,\n dtmfSender: null,\n trickle: true,\n iceDone: false\n };\n if (handleId === this.handleId) {\n var _decodeJanusDisplay5, _decodeJanusDisplay6;\n this._isDataChannelOpen = false;\n this.isPublished = false;\n this.emit('published', {\n status: false,\n hasStream: false\n });\n this.emit('removeLocalParticipant', {\n id: handleId,\n userId: (_decodeJanusDisplay5 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay5 === void 0 ? void 0 : _decodeJanusDisplay5.userId,\n role: (_decodeJanusDisplay6 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay6 === void 0 ? void 0 : _decodeJanusDisplay6.role\n });\n } else {\n var _decodeJanusDisplay7, _decodeJanusDisplay8;\n this.emit(this._getRemoveParticipantEventName(handleId), {\n id: handleId,\n userId: (_decodeJanusDisplay7 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay7 === void 0 ? void 0 : _decodeJanusDisplay7.userId,\n role: (_decodeJanusDisplay8 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay8 === void 0 ? void 0 : _decodeJanusDisplay8.role\n });\n }\n if (removeHandle) {\n let handleIndex = this._participants.findIndex(p => p.handleId === handleId);\n this._participants.splice(handleIndex, 1);\n }\n return true;\n });\n }\n _createParticipant() {\n let userId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n let rfid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n return this._send({\n \"janus\": \"attach\",\n \"plugin\": this.pluginName\n }).then(json => {\n let handleId = json.data[\"id\"];\n let handle = {\n handleId,\n rfid,\n userId,\n webrtcStuff: {\n stream: null,\n mySdp: null,\n mediaConstraints: null,\n pc: null,\n dataChannelOpen: false,\n dataChannel: null,\n dtmfSender: null,\n trickle: true,\n iceDone: false,\n isIceRestarting: false\n }\n };\n this._participants.push(handle);\n return handle;\n });\n }\n _joinRoom(roomId, pin, userId, display) {\n return this.sendMessage(this.handleId, {\n body: {\n \"request\": \"join\",\n \"room\": roomId,\n \"pin\": pin,\n \"ptype\": \"publisher\",\n \"display\": display,\n ...(this.webrtcVersion > 1000 ? {\n id: userId\n } : {})\n }\n }, false, true);\n }\n _watchStream(id) {\n return this.sendMessage(this.handleId, {\n body: {\n \"request\": \"watch\",\n id: String(id)\n }\n }, false, true);\n }\n _leaveRoom() {\n let dontWait = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return this.isConnected ? this.sendMessage(this.handleId, {\n body: {\n \"request\": \"leave\"\n }\n }, dontWait).finally(() => {\n this.isConnected = false;\n this.emit('joined', false);\n }) : Promise.resolve();\n }\n\n // internal reconnect\n\n _reconnect() {\n if (this.isReclaiming) {\n return Promise.resolve();\n }\n if (this.ws) {\n this._wipeListeners();\n if (this.ws.readyState === 1) {\n this.ws.close();\n }\n }\n this._stopKeepAlive();\n this.isReclaiming = true;\n this.emit('joining', true);\n return new Promise((resolve, reject) => {\n let abortReconnect = () => {\n this._abortController.signal.removeEventListener('abort', abortReconnect);\n this.ws.removeEventListener('close', this.__connectionClosedBoundFn);\n this.ws.removeEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = null;\n this.ws.onerror = null;\n this.isReclaiming = false;\n this.emit('joining', false);\n reject({\n type: 'warning',\n id: 17,\n message: 'Connection cancelled',\n data: e\n });\n };\n this.ws = new WebSocket(this.server, 'janus-protocol');\n this.__connectionClosedBoundFn = this._connectionClosed.bind(this);\n this.__handleWsEventsBoundFn = this._handleWsEvents.bind(this);\n this.ws.addEventListener('close', this.__connectionClosedBoundFn);\n this.ws.addEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = () => {\n this._abortController.signal.removeEventListener('abort', abortReconnect);\n this._send({\n \"janus\": \"claim\"\n }).then(json => {\n this.sessionId = json[\"session_id\"] ? json[\"session_id\"] : json.data[\"id\"];\n this._startKeepAlive();\n this.isReclaiming = false;\n this.emit('joining', false);\n this._retries = 0;\n resolve(json);\n }).catch(error => {\n this.isReclaiming = false;\n this.emit('joining', false);\n reject({\n type: 'error',\n id: 11,\n message: 'reconnection error',\n data: error\n });\n });\n };\n\n // this is called before 'close' event callback so it doesn't break reconnect loop\n this.ws.onerror = e => {\n this._abortController.signal.removeEventListener('abort', abortReconnect);\n this.isReclaiming = false;\n this.emit('joining', false);\n reject({\n type: 'warning',\n id: 12,\n message: 'ws reconnection error',\n data: e\n });\n };\n this._abortController.signal.addEventListener('abort', abortReconnect);\n });\n }\n connect(roomId, pin, server, iceServers, token, display, userId) {\n let webrtcVersion = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;\n let initialBitrate = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 0;\n let recordingFilename = arguments.length > 9 ? arguments[9] : undefined;\n let simulcast = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : false;\n let simulcastBitrates = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : {};\n if (this.isConnecting) {\n return Promise.reject({\n type: 'warning',\n id: 16,\n message: 'connection already in progress'\n });\n }\n if (this.ws) {\n this._wipeListeners();\n }\n this._stopKeepAlive();\n this._abortController = new AbortController();\n this.sessionId = null;\n this.server = server;\n this.iceServers = iceServers;\n this.token = token;\n this.roomId = roomId;\n this.pin = pin;\n this.display = display;\n this.userId = userId;\n this.webrtcVersion = webrtcVersion;\n this.initialBitrate = initialBitrate;\n this.recordingFilename = recordingFilename;\n this.isConnecting = true;\n this.simulcast = simulcast;\n this.simulcastBitrates = {\n ...this.simulcastBitrates,\n ...simulcastBitrates\n };\n this.emit('joining', true);\n return new Promise((resolve, reject) => {\n this.ws = new WebSocket(this.server, 'janus-protocol');\n this.__connectionClosedBoundFn = this._connectionClosed.bind(this);\n this.__handleWsEventsBoundFn = this._handleWsEvents.bind(this);\n let abortConnect = () => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this.ws.removeEventListener('close', this.__connectionClosedBoundFn);\n this.ws.removeEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = null;\n this.ws.onerror = null;\n this.isConnecting = false;\n this.emit('joining', false);\n reject({\n type: 'warning',\n id: 17,\n message: 'Connection cancelled'\n });\n };\n this.ws.addEventListener('close', this.__connectionClosedBoundFn);\n this.ws.addEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = () => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this._retries = 0;\n this._send({\n \"janus\": \"create\"\n }).then(json => {\n this.sessionId = json[\"session_id\"] ? json[\"session_id\"] : json.data[\"id\"];\n this._startKeepAlive();\n return 1;\n }).then(() => this._createParticipant(userId)).then(handle => {\n this.handleId = handle.handleId;\n return 1;\n }).then(() => this._joinRoom(roomId, pin, userId, display)).then(() => {\n this.isConnecting = false;\n this.emit('joining', false);\n resolve(this);\n }).catch(error => {\n this.isConnecting = false;\n this.emit('joining', false);\n reject({\n type: (error === null || error === void 0 ? void 0 : error.type) === 'warning' ? 'warning' : 'error',\n id: 13,\n message: 'connection error',\n data: error\n });\n });\n };\n this.ws.onerror = e => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this.isConnecting = false;\n this.emit('joining', false);\n reject({\n type: 'error',\n id: 14,\n message: 'ws connection error',\n data: e\n });\n };\n this._abortController.signal.addEventListener('abort', abortConnect);\n });\n }\n disconnect() {\n var _this$_abortControlle, _this$_abortControlle2;\n if (this.isDisconnecting) {\n return Promise.resolve();\n }\n (_this$_abortControlle = this._abortController) === null || _this$_abortControlle === void 0 ? void 0 : (_this$_abortControlle2 = _this$_abortControlle.abort) === null || _this$_abortControlle2 === void 0 ? void 0 : _this$_abortControlle2.call(_this$_abortControlle);\n this._stopKeepAlive();\n let isConnected = this.isConnected;\n this.isDisconnecting = true;\n return Promise.all(this._participants.map(p => this._removeParticipant(p.handleId))).finally(() => {\n this._wipeListeners();\n if (this.ws && this.ws.readyState === 1) {\n this._send({\n \"janus\": \"destroy\"\n }, true);\n this.ws.close();\n }\n this.sessionId = null;\n this.isPublished = false;\n this.isConnected = false;\n this.isDisconnecting = false;\n this.emit('publishing', false);\n this.emit('published', {\n status: false,\n hasStream: false\n });\n this.emit('joining', false);\n this.emit('joined', false);\n this.emit('disconnect', isConnected);\n return Promise.resolve('Disconnected');\n });\n }\n startStream(streamId, server, iceServers, token, userId) {\n if (this.isConnecting) {\n return Promise.reject({\n type: 'warning',\n id: 16,\n message: 'connection error',\n data: 'Connection is in progress'\n });\n }\n if (this.ws) {\n this._wipeListeners();\n }\n this._stopKeepAlive();\n this._abortController = new AbortController();\n this.server = server;\n this.iceServers = iceServers;\n this.token = token;\n this.streamId = streamId;\n this.userId = userId;\n this.sessionId = null;\n this.isConnecting = true;\n this.emit('streamStarting', true);\n return new Promise((resolve, reject) => {\n this.ws = new WebSocket(this.server, 'janus-protocol');\n this.__connectionClosedBoundFn = this._connectionClosed.bind(this);\n this.__handleWsEventsBoundFn = this._handleWsEvents.bind(this);\n let abortConnect = () => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this.ws.removeEventListener('close', this.__connectionClosedBoundFn);\n this.ws.removeEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = null;\n this.ws.onerror = null;\n this.isConnecting = false;\n this.emit('streamStarting', false);\n reject({\n type: 'warning',\n id: 17,\n message: 'Connection cancelled'\n });\n };\n this.ws.addEventListener('close', this.__connectionClosedBoundFn);\n this.ws.addEventListener('message', this.__handleWsEventsBoundFn);\n this.ws.onopen = () => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this._retries = 0;\n this._send({\n \"janus\": \"create\"\n }).then(json => {\n this.sessionId = json[\"session_id\"] ? json[\"session_id\"] : json.data[\"id\"];\n this._startKeepAlive();\n return 1;\n }).then(() => this._createParticipant(userId)).then(handle => {\n this.handleId = handle.handleId;\n return 1;\n }).then(() => this._watchStream(streamId)).then(() => {\n this.isConnecting = false;\n this.emit('streamStarting', false);\n resolve(this);\n }).catch(error => {\n this.isConnecting = false;\n this.emit('streamStarting', false);\n reject({\n type: 'error',\n id: 13,\n message: 'connection error',\n data: error\n });\n });\n };\n this.ws.onerror = e => {\n this._abortController.signal.removeEventListener('abort', abortConnect);\n this.isConnecting = false;\n this.emit('streamStarting', false);\n reject({\n type: 'error',\n id: 14,\n message: 'ws connection error',\n data: e\n });\n };\n this._abortController.signal.addEventListener('abort', abortConnect);\n });\n }\n stopStream() {\n var _this$_abortControlle3, _this$_abortControlle4;\n if (this.isDisconnecting) {\n return Promise.resolve();\n }\n (_this$_abortControlle3 = this._abortController) === null || _this$_abortControlle3 === void 0 ? void 0 : (_this$_abortControlle4 = _this$_abortControlle3.abort) === null || _this$_abortControlle4 === void 0 ? void 0 : _this$_abortControlle4.call(_this$_abortControlle3);\n this._stopKeepAlive();\n let isStreaming = this.isStreaming;\n this.isDisconnecting = true;\n return this._removeParticipant(this.handleId).finally(() => {\n this.sendMessage(this.handleId, {\n body: {\n \"request\": \"stop\"\n }\n }, true);\n this._wipeListeners();\n this._send({\n \"janus\": \"destroy\"\n }, true);\n if (this.ws && this.ws.readyState === 1) {\n this.ws.close();\n }\n this.sessionId = null;\n this.isDisconnecting = false;\n this.isStreaming = false;\n this.emit('streamStarting', false);\n this.emit('streaming', false);\n this.emit('disconnect', isStreaming);\n return Promise.resolve('Disconnected');\n });\n }\n destroy() {\n if (this.sessiontype === 'reactooroom') {\n return this.disconnect().then(() => {\n this.clear();\n return true;\n });\n } else if (this.sessiontype === 'streaming') {\n return this.stopStream().then(() => {\n this.clear();\n return true;\n });\n }\n }\n _enableDebug() {\n this._log = console.log.bind(console);\n }\n _getHandle(handleId) {\n let rfid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n return this._participants.find(p => p.handleId === handleId || rfid && p.rfid === rfid);\n }\n _getStats() {\n let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n return Promise.all(this._participants.map(participant => {\n let mediaTrack = null;\n if (type === 'video') {\n mediaTrack = participant.webrtcStuff && participant.webrtcStuff.stream && participant.webrtcStuff.stream.getVideoTracks().length && participant.webrtcStuff.stream.getVideoTracks()[0];\n } else if (type === 'audio') {\n mediaTrack = participant.webrtcStuff && participant.webrtcStuff.stream && participant.webrtcStuff.stream.getAudioTracks().length && participant.webrtcStuff.stream.getAudioTracks()[0];\n }\n return participant.webrtcStuff && participant.webrtcStuff.pc && participant.webrtcStuff.pc.getStats(mediaTrack).then(r => ({\n handle: participant,\n stats: r\n })).catch(e => Promise.resolve({\n handle: participant,\n stats: e\n }));\n }));\n }\n _sendTrickleCandidate(handleId, candidate) {\n return this._send({\n \"janus\": \"trickle\",\n \"candidate\": candidate,\n \"handle_id\": handleId\n });\n }\n _webrtc(handleId) {\n let enableOntrack = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let handle = this._getHandle(handleId);\n if (!handle) {\n this.emit('error', {\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'create rtc connection']\n });\n }\n let config = handle.webrtcStuff;\n if (!config.pc) {\n let pc_config = {\n \"iceServers\": this.iceServers,\n \"iceTransportPolicy\": 'all',\n \"bundlePolicy\": undefined\n };\n pc_config[\"sdpSemantics\"] = \"unified-plan\";\n let pc_constraints = {};\n if (webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.browser === \"edge\") {\n // This is Edge, enable BUNDLE explicitly\n pc_config.bundlePolicy = \"max-bundle\";\n }\n\n // pc_config.bundlePolicy = 'balanced';\n // pc_config.iceTransportPolicy = 'relay';\n // pc_config.rtcpMuxPolicy = \"negotiate\";\n\n this._log('new RTCPeerConnection', pc_config, pc_constraints);\n config.pc = new RTCPeerConnection(pc_config, pc_constraints);\n config.pc.onconnectionstatechange = () => {\n if (config.pc.connectionState === 'failed') {\n this._iceRestart(handleId);\n }\n this.emit('connectionState', [handleId, handleId === this.handleId, config.pc.connectionState]);\n if (handleId !== this.handleId && config.pc.connectionState === 'connected') {\n var _decodeJanusDisplay9, _decodeJanusDisplay10;\n this.emit(this._getAddParticipantEventName(handle.handleId), {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay9 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay9 === void 0 ? void 0 : _decodeJanusDisplay9.userId,\n role: (_decodeJanusDisplay10 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay10 === void 0 ? void 0 : _decodeJanusDisplay10.role,\n stream: config.stream,\n track: null,\n optional: true,\n constructId: this.constructId,\n metaData: this.options.metaData,\n adding: false,\n hasAudioTrack: !!(config.stream && config.stream.getAudioTracks().length),\n hasVideoTrack: !!(config.stream && config.stream.getVideoTracks().length)\n });\n }\n };\n config.pc.oniceconnectionstatechange = () => {\n if (config.pc.iceConnectionState === 'failed') {\n this._iceRestart(handleId);\n }\n this.emit('iceState', [handleId, handleId === this.handleId, config.pc.iceConnectionState]);\n if (handleId !== this.handleId && (config.pc.iceConnectionState === 'completed' || config.pc.iceConnectionState === 'connected')) {\n var _decodeJanusDisplay11, _decodeJanusDisplay12;\n this.emit(this._getAddParticipantEventName(handle.handleId), {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay11 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay11 === void 0 ? void 0 : _decodeJanusDisplay11.userId,\n role: (_decodeJanusDisplay12 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay12 === void 0 ? void 0 : _decodeJanusDisplay12.role,\n stream: config.stream,\n track: null,\n optional: true,\n constructId: this.constructId,\n metaData: this.options.metaData,\n adding: false,\n hasAudioTrack: !!(config.stream && config.stream.getAudioTracks().length),\n hasVideoTrack: !!(config.stream && config.stream.getVideoTracks().length)\n });\n }\n };\n config.pc.onicecandidate = event => {\n if (event.candidate == null || webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.browser === 'edge' && event.candidate.candidate.indexOf('endOfCandidates') > 0) {\n config.iceDone = true;\n this._sendTrickleCandidate(handleId, {\n \"completed\": true\n }).catch(e => {\n this.emit('error', e);\n });\n } else {\n // JSON.stringify doesn't work on some WebRTC objects anymore\n // See https://code.google.com/p/chromium/issues/detail?id=467366\n var candidate = {\n \"candidate\": event.candidate.candidate,\n \"sdpMid\": event.candidate.sdpMid,\n \"sdpMLineIndex\": event.candidate.sdpMLineIndex\n };\n this._sendTrickleCandidate(handleId, candidate).catch(e => {\n this.emit('error', e);\n });\n }\n };\n if (enableOntrack) {\n config.pc.ontrack = event => {\n if (!event.streams) return;\n\n //config.stream = event.streams[0];\n\n if (!config.stream) {\n config.stream = new MediaStream();\n }\n if (event.track) {\n var _decodeJanusDisplay13, _decodeJanusDisplay14;\n let mid = event.transceiver ? event.transceiver.mid : event.track.id;\n config.stream.addTrack(event.track);\n this.emit(this._getAddParticipantEventName(handle.handleId), {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n mid,\n id: handle.handleId,\n userId: (_decodeJanusDisplay13 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay13 === void 0 ? void 0 : _decodeJanusDisplay13.userId,\n role: (_decodeJanusDisplay14 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay14 === void 0 ? void 0 : _decodeJanusDisplay14.role,\n stream: config.stream,\n track: event.track,\n constructId: this.constructId,\n metaData: this.options.metaData,\n adding: true,\n hasAudioTrack: !!(config.stream && config.stream.getAudioTracks().length),\n hasVideoTrack: !!(config.stream && config.stream.getVideoTracks().length)\n });\n if (event.track.onended) return;\n event.track.onended = ev => {\n var _config$pc, _config$pc$getTransce;\n let transceiver = (_config$pc = config.pc) === null || _config$pc === void 0 ? void 0 : (_config$pc$getTransce = _config$pc.getTransceivers()) === null || _config$pc$getTransce === void 0 ? void 0 : _config$pc$getTransce.find(t => t.receiver.track === ev.target);\n let mid = (transceiver === null || transceiver === void 0 ? void 0 : transceiver.mid) || ev.target.id;\n if (config.stream) {\n var _decodeJanusDisplay15, _decodeJanusDisplay16;\n config.stream && config.stream.removeTrack(ev.target);\n this.emit(this._getAddParticipantEventName(handle.handleId), {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n mid,\n userId: (_decodeJanusDisplay15 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay15 === void 0 ? void 0 : _decodeJanusDisplay15.userId,\n role: (_decodeJanusDisplay16 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay16 === void 0 ? void 0 : _decodeJanusDisplay16.role,\n stream: config.stream,\n track: ev.target,\n constructId: this.constructId,\n metaData: this.options.metaData,\n adding: false,\n removing: true,\n hasAudioTrack: !!(config.stream && config.stream.getAudioTracks().length),\n hasVideoTrack: !!(config.stream && config.stream.getVideoTracks().length)\n });\n }\n };\n event.track.onmute = ev => {\n var _decodeJanusDisplay17, _decodeJanusDisplay18;\n this._log('remoteTrackMuted', 'onmute');\n let transceiver = config.pc.getTransceivers().find(t => t.receiver.track === ev.target);\n let mid = transceiver.mid || ev.target.id;\n this.emit('remoteTrackMuted', {\n id: handle.handleId,\n mid,\n userId: (_decodeJanusDisplay17 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay17 === void 0 ? void 0 : _decodeJanusDisplay17.userId,\n role: (_decodeJanusDisplay18 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay18 === void 0 ? void 0 : _decodeJanusDisplay18.role,\n stream: config.stream,\n kind: ev.target.kind,\n track: ev.target,\n muted: true\n });\n };\n event.track.onunmute = ev => {\n var _decodeJanusDisplay19, _decodeJanusDisplay20;\n this._log('remoteTrackMuted', 'onunmute');\n let transceiver = config.pc.getTransceivers().find(t => t.receiver.track === ev.target);\n let mid = transceiver.mid || ev.target.id;\n this.emit('remoteTrackMuted', {\n id: handle.handleId,\n mid,\n userId: (_decodeJanusDisplay19 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay19 === void 0 ? void 0 : _decodeJanusDisplay19.userId,\n role: (_decodeJanusDisplay20 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay20 === void 0 ? void 0 : _decodeJanusDisplay20.role,\n stream: config.stream,\n kind: ev.target.kind,\n track: ev.target,\n muted: false\n });\n };\n }\n };\n }\n }\n if (!config.dataChannel || !config.dataChannelOpen) {\n config.dataChannel = {};\n var onDataChannelMessage = event => {\n this._handleDataEvents(handleId, 'message', event.data);\n };\n var onDataChannelStateChange = event => {\n let label = event.target.label;\n let protocol = event.target.protocol;\n let state = config.dataChannel[label] ? config.dataChannel[label].readyState : \"null\";\n this._handleDataEvents(handleId, 'state', {\n state,\n label\n });\n };\n //TODO: check this\n var onDataChannelError = error => {\n var _error$channel;\n this._handleDataEvents(handleId, 'error', {\n label: error === null || error === void 0 ? void 0 : (_error$channel = error.channel) === null || _error$channel === void 0 ? void 0 : _error$channel.label,\n error\n });\n };\n const createDataChannel = (label, protocol, incoming) => {\n let options = {\n ordered: true\n };\n if (!incoming) {\n if (protocol) {\n options = {\n ...options,\n protocol\n };\n }\n config.dataChannel[label] = config.pc.createDataChannel(label, options);\n } else {\n config.dataChannel[label] = incoming;\n }\n config.dataChannel[label].onmessage = onDataChannelMessage;\n config.dataChannel[label].onopen = onDataChannelStateChange;\n config.dataChannel[label].onclose = onDataChannelStateChange;\n config.dataChannel[label].onerror = onDataChannelError;\n };\n createDataChannel(this.defaultDataChannelLabel, null, null);\n config.pc.ondatachannel = function (event) {\n createDataChannel(event.channel.label, event.channel.protocol, event.channel);\n };\n }\n }\n _webrtcPeer(handleId, jsep) {\n let handle = this._getHandle(handleId);\n if (!handle) {\n return Promise.reject({\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'rtc peer']\n });\n }\n var config = handle.webrtcStuff;\n if (jsep !== undefined && jsep !== null) {\n if (config.pc === null) {\n this._log(\"No PeerConnection: if this is an answer, use createAnswer and not _webrtcPeer\");\n return Promise.resolve(null);\n }\n return config.pc.setRemoteDescription(jsep).then(() => {\n config.remoteSdp = jsep.sdp;\n // Any trickle candidate we cached?\n if (config.candidates && config.candidates.length > 0) {\n for (var i = 0; i < config.candidates.length; i++) {\n var candidate = config.candidates[i];\n if (!candidate || candidate.completed === true) {\n config.pc.addIceCandidate(null);\n } else {\n config.pc.addIceCandidate(candidate);\n }\n }\n config.candidates = [];\n }\n // Done\n return true;\n });\n } else {\n return Promise.reject({\n type: 'warning',\n id: 22,\n message: 'rtc peer',\n data: [handleId, 'invalid jsep']\n });\n }\n }\n _iceRestart(handleId) {\n let handle = this._getHandle(handleId);\n if (!handle) {\n return;\n }\n var config = handle.webrtcStuff;\n\n // Already restarting;\n if (config.isIceRestarting) {\n return;\n }\n if (this.handleId === handleId) {\n this._log('Performing local ICE restart');\n config.isIceRestarting = true;\n let hasAudio = !!(config.stream && config.stream.getAudioTracks().length > 0);\n let hasVideo = !!(config.stream && config.stream.getVideoTracks().length > 0);\n this._setupTransceivers(handleId, [hasAudio, false, hasVideo, false]);\n this._createAO('offer', handleId, true).then(jsep => {\n if (!jsep) {\n return null;\n }\n return this.sendMessage(handleId, {\n body: {\n \"request\": \"configure\",\n \"audio\": hasAudio,\n \"video\": hasVideo,\n \"data\": true,\n ...(this.recordingFilename ? {\n filename: this.recordingFilename\n } : {})\n },\n jsep\n });\n }).then(r => {\n config.isIceRestarting = false;\n this._log('ICE restart success');\n }).catch(e => {\n config.isIceRestarting = false;\n this.emit('error', {\n type: 'warning',\n id: 28,\n message: 'iceRestart failed',\n data: e\n });\n });\n } else {\n this._log('Performing remote ICE restart', handleId);\n config.isIceRestarting = true;\n return this.sendMessage(handleId, {\n body: {\n \"request\": \"configure\",\n \"restart\": true\n }\n }).then(() => {\n config.isIceRestarting = false;\n }).catch(() => {\n config.isIceRestarting = false;\n });\n }\n }\n _setupTransceivers(handleId, _ref) {\n let [audioSend, audioRecv, videoSend, videoRecv] = _ref;\n let handle = this._getHandle(handleId);\n if (!handle) {\n return null;\n }\n let config = handle.webrtcStuff;\n let audioTransceiver = null,\n videoTransceiver = null;\n let transceivers = config.pc.getTransceivers();\n if (transceivers && transceivers.length > 0) {\n for (var i in transceivers) {\n var t = transceivers[i];\n if (t.sender && t.sender.track && t.sender.track.kind === \"audio\" || t.receiver && t.receiver.track && t.receiver.track.kind === \"audio\") {\n if (!audioTransceiver) audioTransceiver = t;\n continue;\n }\n if (t.sender && t.sender.track && t.sender.track.kind === \"video\" || t.receiver && t.receiver.track && t.receiver.track.kind === \"video\") {\n if (!videoTransceiver) videoTransceiver = t;\n continue;\n }\n }\n }\n\n // Handle audio (and related changes, if any)\n if (!audioSend && !audioRecv) {\n // Audio disabled: have we removed it?\n if (audioTransceiver) {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection(\"inactive\");\n } else {\n audioTransceiver.direction = \"inactive\";\n }\n }\n } else {\n // Take care of audio m-line\n if (audioSend && audioRecv) {\n if (audioTransceiver) {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection(\"sendrecv\");\n } else {\n audioTransceiver.direction = \"sendrecv\";\n }\n }\n } else if (audioSend && !audioRecv) {\n if (audioTransceiver) {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection(\"sendonly\");\n } else {\n audioTransceiver.direction = \"sendonly\";\n }\n }\n } else if (!audioSend && audioRecv) {\n if (audioTransceiver) {\n if (audioTransceiver.setDirection) {\n audioTransceiver.setDirection(\"recvonly\");\n } else {\n audioTransceiver.direction = \"recvonly\";\n }\n } else {\n // In theory, this is the only case where we might not have a transceiver yet\n config.pc.addTransceiver(\"audio\", {\n direction: \"recvonly\"\n });\n }\n }\n }\n // Handle video (and related changes, if any)\n if (!videoSend && !videoRecv) {\n if (videoTransceiver) {\n if (videoTransceiver.setDirection) {\n videoTransceiver.setDirection(\"inactive\");\n } else {\n videoTransceiver.direction = \"inactive\";\n }\n }\n } else {\n // Take care of video m-line\n if (videoSend && videoRecv) {\n if (videoTransceiver) {\n if (videoTransceiver.setDirection) {\n videoTransceiver.setDirection(\"sendrecv\");\n } else {\n videoTransceiver.direction = \"sendrecv\";\n }\n }\n } else if (videoSend && !videoRecv) {\n if (videoTransceiver) {\n if (videoTransceiver.setDirection) {\n videoTransceiver.setDirection(\"sendonly\");\n } else {\n videoTransceiver.direction = \"sendonly\";\n }\n }\n } else if (!videoSend && videoRecv) {\n if (videoTransceiver) {\n if (videoTransceiver.setDirection) {\n videoTransceiver.setDirection(\"recvonly\");\n } else {\n videoTransceiver.direction = \"recvonly\";\n }\n } else {\n // In theory, this is the only case where we might not have a transceiver yet\n config.pc.addTransceiver(\"video\", {\n direction: \"recvonly\"\n });\n }\n }\n }\n }\n _createAO() {\n let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'offer';\n let handleId = arguments.length > 1 ? arguments[1] : undefined;\n let iceRestart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let handle = this._getHandle(handleId);\n if (!handle) {\n return Promise.reject({\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'createAO', type]\n });\n }\n let methodName = null;\n if (type === 'offer') {\n methodName = 'createOffer';\n } else {\n methodName = 'createAnswer';\n }\n let config = handle.webrtcStuff;\n let mediaConstraints = {};\n if (iceRestart) {\n mediaConstraints[\"iceRestart\"] = true;\n }\n return config.pc[methodName](mediaConstraints).then(function (response) {\n config.mySdp = response.sdp;\n let _p = config.pc.setLocalDescription(response).catch(e => {\n return Promise.reject({\n type: 'warning',\n id: 24,\n message: 'setLocalDescription',\n data: [handleId, e]\n });\n });\n config.mediaConstraints = mediaConstraints;\n if (!config.iceDone && !config.trickle) {\n // Don't do anything until we have all candidates\n return Promise.resolve(null);\n }\n\n // JSON.stringify doesn't work on some WebRTC objects anymore\n // See https://code.google.com/p/chromium/issues/detail?id=467366\n var jsep = {\n \"type\": response.type,\n \"sdp\": response.sdp\n };\n return _p.then(() => jsep);\n }, e => {\n return Promise.reject({\n type: 'warning',\n id: 25,\n message: methodName,\n data: [handleId, e]\n });\n });\n }\n _publishRemote(handleId, jsep) {\n let handle = this._getHandle(handleId);\n if (!handle) {\n return Promise.reject({\n type: 'warning',\n id: 15,\n message: 'id non-existent',\n data: [handleId, 'publish remote participant']\n });\n }\n this._webrtc(handleId, true);\n let config = handle.webrtcStuff;\n if (jsep) {\n return config.pc.setRemoteDescription(jsep).then(() => {\n config.remoteSdp = jsep.sdp;\n // Any trickle candidate we cached?\n if (config.candidates && config.candidates.length > 0) {\n for (var i = 0; i < config.candidates.length; i++) {\n var candidate = config.candidates[i];\n if (!candidate || candidate.completed === true) {\n // end-of-candidates\n config.pc.addIceCandidate(null);\n } else {\n // New candidate\n config.pc.addIceCandidate(candidate);\n }\n }\n config.candidates = [];\n }\n this._setupTransceivers(handleId, [false, true, false, true]);\n\n // Create the answer now\n return this._createAO('answer', handleId, false).then(_jsep => {\n if (!_jsep) {\n this.emit('error', {\n type: 'warning',\n id: 19,\n message: 'publish remote participant',\n data: [handleId, 'no jsep']\n });\n return Promise.resolve();\n }\n return this.sendMessage(handleId, {\n \"body\": {\n \"request\": \"start\",\n ...(this.roomId && {\n \"room\": this.roomId\n }),\n ...(this.pin && {\n pin: this.pin\n })\n },\n \"jsep\": _jsep\n });\n });\n }, e => Promise.reject({\n type: 'warning',\n id: 23,\n message: 'setRemoteDescription',\n data: [handleId, e]\n }));\n } else {\n return Promise.resolve();\n }\n }\n\n //Public methods\n\n publishLocal() {\n let stream = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (this.isDisconnecting || !this.isConnected) {\n return Promise.reject({\n type: 'warning',\n id: 18,\n message: 'Either not connected or disconnecting'\n });\n }\n this.emit('publishing', true);\n let handle = this._getHandle(this.handleId);\n if (!handle) {\n return Promise.reject({\n type: 'error',\n id: 21,\n message: 'no local id, connect before publishing',\n data: null\n });\n }\n this._webrtc(this.handleId);\n let config = handle.webrtcStuff;\n let audioTrackReplacePromise = Promise.resolve();\n let videoTrackReplacePromise = Promise.resolve();\n if (!config.stream) {\n var _stream$getTracks;\n config.stream = stream;\n stream === null || stream === void 0 ? void 0 : (_stream$getTracks = stream.getTracks()) === null || _stream$getTracks === void 0 ? void 0 : _stream$getTracks.forEach(track => {\n if (track.kind === 'audio' || !this.simulcast) {\n config.pc.addTrack(track, stream);\n } else {\n // adding simulcast streams\n let bitRates = this.simulcastBitrates;\n if (webrtc_adapter__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browserDetails.browser !== 'firefox') {\n // standard\n\n config.pc.addTransceiver(track, {\n direction: 'sendonly',\n streams: [config.stream],\n sendEncodings: [{\n rid: 'h',\n active: true,\n scalabilityMode: 'L1T2',\n maxBitrate: bitRates.high\n }, {\n rid: 'm',\n active: true,\n scalabilityMode: 'L1T2',\n maxBitrate: bitRates.medium,\n scaleResolutionDownBy: 2\n }, {\n rid: 'l',\n active: true,\n scalabilityMode: 'L1T2',\n maxBitrate: bitRates.low,\n scaleResolutionDownBy: 4\n }]\n });\n } else {\n // firefox\n let transceiver = config.pc.addTransceiver(track, {\n direction: 'sendonly',\n streams: [config.stream]\n });\n let sender = transceiver ? transceiver.sender : null;\n if (sender) {\n let parameters = sender.getParameters() || {};\n parameters.encodings = track.sendEncodings || [{\n rid: 'h',\n active: true,\n maxBitrate: bitRates.high\n }, {\n rid: 'm',\n active: true,\n maxBitrate: bitRates.medium,\n scaleResolutionDownBy: 2\n }, {\n rid: 'l',\n active: true,\n maxBitrate: bitRates.low,\n scaleResolutionDownBy: 4\n }];\n sender.setParameters(parameters);\n }\n }\n }\n });\n } else {\n var _config$stream, _config$stream$getAud, _stream$getAudioTrack, _config$stream2, _config$stream2$getVi, _stream$getVideoTrack;\n let transceivers = config.pc.getTransceivers();\n let audioTransceiver = null;\n let videoTransceiver = null;\n if (transceivers && transceivers.length > 0) {\n for (let i in transceivers) {\n let t = transceivers[i];\n if (t.sender && t.sender.track && t.sender.track.kind === \"audio\" || t.receiver && t.receiver.track && t.receiver.track.kind === \"audio\") {\n audioTransceiver = t;\n break;\n }\n }\n for (let i in transceivers) {\n let t = transceivers[i];\n if (t.sender && t.sender.track && t.sender.track.kind === \"video\" || t.receiver && t.receiver.track && t.receiver.track.kind === \"video\") {\n videoTransceiver = t;\n break;\n }\n }\n }\n\n /* UPDATE Audio */\n // stopping existing tracks\n\n let oldAudioStream = config === null || config === void 0 ? void 0 : (_config$stream = config.stream) === null || _config$stream === void 0 ? void 0 : (_config$stream$getAud = _config$stream.getAudioTracks()) === null || _config$stream$getAud === void 0 ? void 0 : _config$stream$getAud[0];\n if (oldAudioStream) {\n config.stream.removeTrack(oldAudioStream);\n try {\n oldAudioStream.stop();\n } catch (e) {\n this._log(e);\n }\n }\n let replaceAudio = stream === null || stream === void 0 ? void 0 : (_stream$getAudioTrack = stream.getAudioTracks()) === null || _stream$getAudioTrack === void 0 ? void 0 : _stream$getAudioTrack.length;\n if (replaceAudio) {\n config.stream.addTrack(stream.getAudioTracks()[0]);\n if (audioTransceiver && audioTransceiver.sender) {\n audioTrackReplacePromise = audioTransceiver.sender.replaceTrack(stream.getAudioTracks()[0]);\n } else {\n config.pc.addTrack(stream.getAudioTracks()[0], stream);\n }\n } else {\n if (audioTransceiver && audioTransceiver.sender) {\n audioTrackReplacePromise = audioTransceiver.sender.replaceTrack(null);\n }\n }\n\n /* UPDATE Video */\n\n // stopping existing tracks\n\n let oldVideoStream = config === null || config === void 0 ? void 0 : (_config$stream2 = config.stream) === null || _config$stream2 === void 0 ? void 0 : (_config$stream2$getVi = _config$stream2.getVideoTracks()) === null || _config$stream2$getVi === void 0 ? void 0 : _config$stream2$getVi[0];\n if (oldVideoStream) {\n config.stream.removeTrack(oldVideoStream);\n try {\n oldVideoStream.stop();\n } catch (e) {\n this._log(e);\n }\n }\n let replaceVideo = stream === null || stream === void 0 ? void 0 : (_stream$getVideoTrack = stream.getVideoTracks()) === null || _stream$getVideoTrack === void 0 ? void 0 : _stream$getVideoTrack.length;\n if (replaceVideo) {\n config.stream.addTrack(stream.getVideoTracks()[0]);\n if (videoTransceiver && videoTransceiver.sender) {\n videoTrackReplacePromise = videoTransceiver.sender.replaceTrack(stream.getVideoTracks()[0]);\n } else {\n config.pc.addTrack(stream.getVideoTracks()[0], stream);\n }\n } else {\n if (videoTransceiver && videoTransceiver.sender) {\n videoTrackReplacePromise = videoTransceiver.sender.replaceTrack(null);\n }\n }\n }\n let hasAudio = !!(stream && stream.getAudioTracks().length > 0);\n let hasVideo = !!(stream && stream.getVideoTracks().length > 0);\n let isAudioMuted = !stream || stream.getAudioTracks().length === 0 || !stream.getAudioTracks()[0].enabled;\n let isVideoMuted = !stream || stream.getVideoTracks().length === 0 || !stream.getVideoTracks()[0].enabled;\n this.isAudioEnabed = hasAudio;\n this.isVideoEnabled = hasVideo;\n this.isAudioMuted = isAudioMuted;\n this.isVideoMuted = isVideoMuted;\n this._setupTransceivers(this.handleId, [hasAudio, false, hasVideo, false]);\n const emitEvents = () => {\n this.isPublished = true;\n if (config.stream) {\n let tracks = config.stream.getTracks();\n tracks.forEach(track => {\n // used as a flag to not emit tracks that been already emitted\n if (!track.onended) {\n var _decodeJanusDisplay21, _decodeJanusDisplay22;\n this.emit('addLocalParticipant', {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay21 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay21 === void 0 ? void 0 : _decodeJanusDisplay21.userId,\n role: (_decodeJanusDisplay22 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(this.display)) === null || _decodeJanusDisplay22 === void 0 ? void 0 : _decodeJanusDisplay22.role,\n track,\n stream: config.stream,\n adding: true,\n constructId: this.constructId,\n metaData: this.options.metaData,\n hasAudioTrack: hasAudio,\n hasVideoTrack: hasVideo\n });\n track.onended = ev => {\n var _decodeJanusDisplay23, _decodeJanusDisplay24;\n this.emit('addLocalParticipant', {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay23 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay23 === void 0 ? void 0 : _decodeJanusDisplay23.userId,\n role: (_decodeJanusDisplay24 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(this.display)) === null || _decodeJanusDisplay24 === void 0 ? void 0 : _decodeJanusDisplay24.role,\n track: ev.target,\n stream: config.stream,\n adding: false,\n removing: true,\n constructId: this.constructId,\n metaData: this.options.metaData,\n hasAudioTrack: hasAudio,\n hasVideoTrack: hasVideo\n });\n };\n }\n });\n } else {\n var _decodeJanusDisplay25, _decodeJanusDisplay26;\n this.emit('addLocalParticipant', {\n tid: Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"generateUUID\"])(),\n id: handle.handleId,\n userId: (_decodeJanusDisplay25 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(handle.userId)) === null || _decodeJanusDisplay25 === void 0 ? void 0 : _decodeJanusDisplay25.userId,\n role: (_decodeJanusDisplay26 = Object(_wt_utils__WEBPACK_IMPORTED_MODULE_2__[\"decodeJanusDisplay\"])(this.display)) === null || _decodeJanusDisplay26 === void 0 ? void 0 : _decodeJanusDisplay26.role,\n stream: null,\n adding: false,\n constructId: this.constructId,\n metaData: this.options.metaData,\n hasAudioTrack: hasAudio,\n hasVideoTrack: hasVideo\n });\n }\n this.emit('published', {\n status: true,\n hasStream: !!config.stream\n });\n this.emit('publishing', false);\n this.emit('localHasVideo', hasVideo);\n this.emit('localHasAudio', hasAudio);\n this.emit('localMuted', {\n type: 'video',\n value: isVideoMuted\n });\n this.emit('localMuted', {\n type: 'audio',\n value: isAudioMuted\n });\n return this;\n };\n\n // this should be enough\n if (this.isPublished) {\n return Promise.all([audioTrackReplacePromise, videoTrackReplacePromise]).then(() => emitEvents());\n }\n return Promise.all([audioTrackReplacePromise, videoTrackReplacePromise]).then(() => this._createAO('offer', this.handleId, false)).then(jsep => {\n if (!jsep) {\n return null;\n }\n //HOTFIX: Temporary fix for Safari 13\n if (jsep.sdp && jsep.sdp.indexOf(\"\\r\\na=ice-ufrag\") === -1) {\n jsep.sdp = jsep.sdp.replace(\"\\na=ice-ufrag\", \"\\r\\na=ice-ufrag\");\n }\n return this.sendMessage(this.handleId, {\n body: {\n \"request\": \"configure\",\n \"audio\": hasAudio,\n \"video\": hasVideo,\n \"data\": true,\n ...(this.recordingFilename ? {\n filename: this.recordingFilename\n } : {})\n },\n jsep\n });\n }).then(r => {\n if (this._isDataChannelOpen) {\n return Promise.resolve(r);\n } else {\n return new Promise((resolve, reject) => {\n let dataChannelTimeoutId = null;\n let _resolve = val => {\n if (val) {\n clearTimeout(dataChannelTimeoutId);\n this._abortController.signal.removeEventListener('abort', _rejectAbort);\n this.off('dataChannel', _resolve, this);\n resolve(this);\n }\n };\n let _rejectTimeout = () => {\n this.off('dataChannel', _resolve, this);\n this._abortController.signal.removeEventListener('abort', _rejectAbort);\n reject({\n type: 'error',\n id: 27,\n message: 'Data channel did not open',\n data: null\n });\n };\n let _rejectAbort = () => {\n this._abortController.signal.removeEventListener('abort', _rejectAbort);\n clearTimeout(dataChannelTimeoutId);\n this.off('dataChannel', _resolve, this);\n reject({\n type: 'warning',\n id: 17,\n message: 'Connection cancelled'\n });\n };\n dataChannelTimeoutId = setTimeout(_rejectTimeout, 5000);\n this._abortController.signal.addEventListener('abort', _rejectAbort);\n this.on('dataChannel', _resolve, this);\n });\n }\n }).then(() => emitEvents()).catch(e => {\n this.emit('publishing', false);\n return Promise.reject(e);\n });\n }\n unpublishLocal() {\n let dontWait = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return this.isPublished ? this.sendMessage(this.handleId, {\n body: {\n \"request\": \"unpublish\"\n }\n }, dontWait).finally(r => {\n this.isPublished = false;\n this.emit('published', {\n status: false,\n hasStream: false\n });\n return r;\n }) : Promise.resolve();\n }\n toggleAudio() {\n let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n let mid = arguments.length > 1 ? arguments[1] : undefined;\n let handle = this._getHandle(this.handleId);\n if (!handle) {\n return Promise.reject({\n type: 'error',\n id: 21,\n message: 'no local id, connect first',\n data: null\n });\n }\n let config = handle.webrtcStuff;\n let transceiver = config.pc.getTransceivers().find(t => t.sender && t.sender.track && t.receiver.track.kind === \"audio\" && (mid ? t.mid === mid : true));\n if (transceiver) {\n transceiver.sender.track.enabled = value !== null ? !!value : !transceiver.sender.track.enabled;\n }\n this.isAudioMuted = !transceiver || !transceiver.sender.track.enabled;\n\n // if (config.stream && config.stream.getAudioTracks().length) {\n // \tconfig.stream.getAudioTracks()[0].enabled = value !== null ? !!value : !config.stream.getAudioTracks()[0].enabled;\n // }\n // this.isAudioMuted = config.stream.getAudioTracks().length === 0 || !config.stream.getAudioTracks()[0].enabled;\n //\n\n this.emit('localMuted', {\n type: 'audio',\n value: this.isAudioMuted,\n mid\n });\n }\n toggleVideo() {\n let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n let mid = arguments.length > 1 ? arguments[1] : undefined;\n let handle = this._getHandle(this.handleId);\n if (!handle) {\n return Promise.reject({\n type: 'error',\n id: 21,\n message: 'no local id, connect first',\n data: null\n });\n }\n let config = handle.webrtcStuff;\n let transceiver = config.pc.getTransceivers().find(t => t.sender && t.sender.track && t.receiver.track.kind === \"video\" && (mid ? t.mid === mid : true));\n if (transceiver) {\n transceiver.sender.track.enabled = value !== null ? !!value : !transceiver.sender.track.enabled;\n }\n this.isVideoMuted = !transceiver || !transceiver.sender.track.enabled;\n\n // if (config.stream && config.stream.getVideoTracks().length) {\n // \tconfig.stream.getVideoTracks()[0].enabled = value !== null ? !!value : !config.stream.getVideoTracks()[0].enabled;\n // }\n // this.isVideoMuted = config.stream.getVideoTracks().length === 0 || !config.stream.getVideoTracks()[0].enabled;\n\n this.emit('localMuted', {\n type: 'video',\n value: this.isVideoMuted,\n mid\n });\n }\n selectSubStream(handleId) {\n let substream = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n this.sendMessage(this.handleId, {\n \"body\": {\n \"request\": \"configure\",\n \"substream\": substream\n }\n }).catch(() => null);\n }\n setRoomType() {\n let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'watchparty';\n this._roomType = type;\n return this._roomType;\n }\n}\n_defineProperty(RoomSession, \"sessionTypes\", {\n 'reactooroom': 'janus.plugin.reactooroom',\n 'streaming': 'janus.plugin.streaming'\n});\n_defineProperty(RoomSession, \"subscriptionRules\", {\n participant: {\n \"watchparty\": ['participant', 'talkback'],\n \"studio\": ['participant', 'talkback', 'host', 'observer'],\n \"commentary\": ['participant', 'talkback', 'host'],\n \"videowall\": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],\n \"videowall-queue\": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],\n \"videowall-queue-video\": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3']\n },\n monitor: {\n \"watchparty\": ['participant', 'host'],\n \"studio\": ['participant', 'host', 'observer'],\n \"commentary\": ['participant', 'host'],\n \"videowall\": ['host', 'participant'],\n \"videowall-queue\": ['host', 'participant'],\n \"videowall-queue-video\": ['host', 'participant']\n },\n talkback: {\n \"watchparty\": ['participant', 'host'],\n \"studio\": ['participant', 'host', 'observer'],\n \"commentary\": ['host', 'participant'],\n \"videowall\": ['host', 'participant'],\n \"videowall-queue\": ['host', 'participant'],\n \"videowall-queue-video\": ['host', 'participant']\n },\n observer: {\n \"watchparty\": ['participant'],\n \"studio\": ['participant'],\n \"commentary\": ['participant'],\n \"videowall\": ['participant'],\n \"videowall-queue\": ['participant'],\n \"videowall-queue-video\": ['participant']\n },\n observerSolo1: {\n \"watchparty\": ['participant'],\n \"studio\": ['participant'],\n \"commentary\": ['participant'],\n \"videowall\": ['participant'],\n \"videowall-queue\": ['participant'],\n \"videowall-queue-video\": ['participant']\n },\n observerSolo2: {\n \"watchparty\": ['participant'],\n \"studio\": ['participant'],\n \"commentary\": ['participant'],\n \"videowall\": ['participant'],\n \"videowall-queue\": ['participant'],\n \"videowall-queue-video\": ['participant']\n },\n observerSolo3: {\n \"watchparty\": ['participant'],\n \"studio\": ['participant'],\n \"commentary\": ['participant'],\n \"videowall\": ['participant'],\n \"videowall-queue\": ['participant'],\n \"videowall-queue-video\": ['participant']\n },\n host: {\n \"watchparty\": [],\n \"studio\": [],\n \"commentary\": [],\n \"videowall\": [],\n \"videowall-queue\": [],\n \"videowall-queue-video\": []\n },\n companionTV: {},\n companionPhone: {}\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Room);\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/modules/wt-room.js?");
|
|
10334
10234
|
|
|
10335
10235
|
/***/ }),
|
|
10336
10236
|
|