@sawport/react-sdk 0.1.0-alpha.5 → 0.1.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3156,14 +3156,14 @@ function baseToString$2(value2) {
3156
3156
  var result = value2 + "";
3157
3157
  return result == "0" && 1 / value2 == -INFINITY$2 ? "-0" : result;
3158
3158
  }
3159
- function toString$h(value2) {
3159
+ function toString$g(value2) {
3160
3160
  return value2 == null ? "" : baseToString$2(value2);
3161
3161
  }
3162
3162
  function toPath(value2) {
3163
3163
  if (isArray$l(value2)) {
3164
3164
  return arrayMap$2(value2, toKey$5);
3165
3165
  }
3166
- return isSymbol$a(value2) ? [value2] : copyArray(stringToPath$4(toString$h(value2)));
3166
+ return isSymbol$a(value2) ? [value2] : copyArray(stringToPath$4(toString$g(value2)));
3167
3167
  }
3168
3168
  var isProduction = process.env.NODE_ENV === "production";
3169
3169
  function warning(condition, message) {
@@ -3448,21 +3448,14 @@ function requireReactIs_development() {
3448
3448
  }
3449
3449
  return reactIs_development;
3450
3450
  }
3451
- var hasRequiredReactIs;
3452
- function requireReactIs() {
3453
- if (hasRequiredReactIs)
3454
- return reactIs$1.exports;
3455
- hasRequiredReactIs = 1;
3456
- (function(module2) {
3457
- if (process.env.NODE_ENV === "production") {
3458
- module2.exports = requireReactIs_production_min();
3459
- } else {
3460
- module2.exports = requireReactIs_development();
3461
- }
3462
- })(reactIs$1);
3463
- return reactIs$1.exports;
3464
- }
3465
- var reactIs = requireReactIs();
3451
+ (function(module2) {
3452
+ if (process.env.NODE_ENV === "production") {
3453
+ module2.exports = requireReactIs_production_min();
3454
+ } else {
3455
+ module2.exports = requireReactIs_development();
3456
+ }
3457
+ })(reactIs$1);
3458
+ var reactIs = reactIs$1.exports;
3466
3459
  var FORWARD_REF_STATICS = {
3467
3460
  "$$typeof": true,
3468
3461
  render: true,
@@ -4713,7 +4706,7 @@ function baseClone(src2, circulars, clones) {
4713
4706
  function clone$2(src2) {
4714
4707
  return baseClone(src2, [], []);
4715
4708
  }
4716
- const toString$g = Object.prototype.toString;
4709
+ const toString$f = Object.prototype.toString;
4717
4710
  const errorToString = Error.prototype.toString;
4718
4711
  const regExpToString = RegExp.prototype.toString;
4719
4712
  const symbolToString$1 = typeof Symbol !== "undefined" ? Symbol.prototype.toString : () => "";
@@ -4736,7 +4729,7 @@ function printSimpleValue(val, quoteStrings = false) {
4736
4729
  return "[Function " + (val.name || "anonymous") + "]";
4737
4730
  if (typeOf === "symbol")
4738
4731
  return symbolToString$1.call(val).replace(SYMBOL_REGEXP, "Symbol($1)");
4739
- const tag = toString$g.call(val).slice(8, -1);
4732
+ const tag = toString$f.call(val).slice(8, -1);
4740
4733
  if (tag === "Date")
4741
4734
  return isNaN(val.getTime()) ? "" + val : val.toISOString(val);
4742
4735
  if (tag === "Error" || val instanceof Error)
@@ -5244,16 +5237,16 @@ function baseToString$1(value2) {
5244
5237
  }
5245
5238
  var _baseToString = baseToString$1;
5246
5239
  var baseToString = _baseToString;
5247
- function toString$f(value2) {
5240
+ function toString$e(value2) {
5248
5241
  return value2 == null ? "" : baseToString(value2);
5249
5242
  }
5250
- var toString_1 = toString$f;
5251
- var isArray$g = isArray_1, isKey$2 = _isKey, stringToPath$1 = _stringToPath, toString$e = toString_1;
5243
+ var toString_1 = toString$e;
5244
+ var isArray$g = isArray_1, isKey$2 = _isKey, stringToPath$1 = _stringToPath, toString$d = toString_1;
5252
5245
  function castPath$2(value2, object2) {
5253
5246
  if (isArray$g(value2)) {
5254
5247
  return value2;
5255
5248
  }
5256
- return isKey$2(value2, object2) ? [value2] : stringToPath$1(toString$e(value2));
5249
+ return isKey$2(value2, object2) ? [value2] : stringToPath$1(toString$d(value2));
5257
5250
  }
5258
5251
  var _castPath = castPath$2;
5259
5252
  var baseGetTag$2 = _baseGetTag, isObjectLike$3 = isObjectLike_1;
@@ -7555,13 +7548,13 @@ var deburredLetters = {
7555
7548
  };
7556
7549
  var deburrLetter$1 = basePropertyOf(deburredLetters);
7557
7550
  var _deburrLetter = deburrLetter$1;
7558
- var deburrLetter = _deburrLetter, toString$d = toString_1;
7551
+ var deburrLetter = _deburrLetter, toString$c = toString_1;
7559
7552
  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
7560
7553
  var rsComboMarksRange$3 = "\\u0300-\\u036f", reComboHalfMarksRange$3 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$3 = "\\u20d0-\\u20ff", rsComboRange$3 = rsComboMarksRange$3 + reComboHalfMarksRange$3 + rsComboSymbolsRange$3;
7561
7554
  var rsCombo$2 = "[" + rsComboRange$3 + "]";
7562
7555
  var reComboMark = RegExp(rsCombo$2, "g");
7563
7556
  function deburr$1(string2) {
7564
- string2 = toString$d(string2);
7557
+ string2 = toString$c(string2);
7565
7558
  return string2 && string2.replace(reLatin, deburrLetter).replace(reComboMark, "");
7566
7559
  }
7567
7560
  var deburr_1 = deburr$1;
@@ -7592,9 +7585,9 @@ function unicodeWords$1(string2) {
7592
7585
  return string2.match(reUnicodeWord) || [];
7593
7586
  }
7594
7587
  var _unicodeWords = unicodeWords$1;
7595
- var asciiWords = _asciiWords, hasUnicodeWord = _hasUnicodeWord, toString$c = toString_1, unicodeWords = _unicodeWords;
7588
+ var asciiWords = _asciiWords, hasUnicodeWord = _hasUnicodeWord, toString$b = toString_1, unicodeWords = _unicodeWords;
7596
7589
  function words$1(string2, pattern, guard) {
7597
- string2 = toString$c(string2);
7590
+ string2 = toString$b(string2);
7598
7591
  pattern = guard ? void 0 : pattern;
7599
7592
  if (pattern === void 0) {
7600
7593
  return hasUnicodeWord(string2) ? unicodeWords(string2) : asciiWords(string2);
@@ -7665,10 +7658,10 @@ function stringToArray$1(string2) {
7665
7658
  return hasUnicode$1(string2) ? unicodeToArray(string2) : asciiToArray(string2);
7666
7659
  }
7667
7660
  var _stringToArray = stringToArray$1;
7668
- var castSlice = _castSlice, hasUnicode = _hasUnicode, stringToArray = _stringToArray, toString$b = toString_1;
7661
+ var castSlice = _castSlice, hasUnicode = _hasUnicode, stringToArray = _stringToArray, toString$a = toString_1;
7669
7662
  function createCaseFirst$1(methodName) {
7670
7663
  return function(string2) {
7671
- string2 = toString$b(string2);
7664
+ string2 = toString$a(string2);
7672
7665
  var strSymbols = hasUnicode(string2) ? stringToArray(string2) : void 0;
7673
7666
  var chr = strSymbols ? strSymbols[0] : string2.charAt(0);
7674
7667
  var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string2.slice(1);
@@ -7679,9 +7672,9 @@ var _createCaseFirst = createCaseFirst$1;
7679
7672
  var createCaseFirst = _createCaseFirst;
7680
7673
  var upperFirst$1 = createCaseFirst("toUpperCase");
7681
7674
  var upperFirst_1 = upperFirst$1;
7682
- var toString$a = toString_1, upperFirst = upperFirst_1;
7675
+ var toString$9 = toString_1, upperFirst = upperFirst_1;
7683
7676
  function capitalize$1(string2) {
7684
- return upperFirst(toString$a(string2).toLowerCase());
7677
+ return upperFirst(toString$9(string2).toLowerCase());
7685
7678
  }
7686
7679
  var capitalize_1 = capitalize$1;
7687
7680
  var capitalize = capitalize_1, createCompounder = _createCompounder;
@@ -8290,7 +8283,7 @@ function requireFactoryWithTypeCheckers() {
8290
8283
  if (hasRequiredFactoryWithTypeCheckers)
8291
8284
  return factoryWithTypeCheckers;
8292
8285
  hasRequiredFactoryWithTypeCheckers = 1;
8293
- var ReactIs = requireReactIs();
8286
+ var ReactIs = reactIs$1.exports;
8294
8287
  var assign3 = requireObjectAssign();
8295
8288
  var ReactPropTypesSecret = requireReactPropTypesSecret();
8296
8289
  var has2 = requireHas();
@@ -8783,7 +8776,7 @@ function requireFactoryWithThrowingShims() {
8783
8776
  return factoryWithThrowingShims;
8784
8777
  }
8785
8778
  if (process.env.NODE_ENV !== "production") {
8786
- var ReactIs = requireReactIs();
8779
+ var ReactIs = reactIs$1.exports;
8787
8780
  var throwOnDirectAccess = true;
8788
8781
  propTypes$h.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
8789
8782
  } else {
@@ -40933,10 +40926,10 @@ var bind$7 = function bind2(fn, thisArg) {
40933
40926
  };
40934
40927
  };
40935
40928
  var bind$6 = bind$7;
40936
- var toString$9 = Object.prototype.toString;
40929
+ var toString$8 = Object.prototype.toString;
40937
40930
  var kindOf = function(cache) {
40938
40931
  return function(thing) {
40939
- var str = toString$9.call(thing);
40932
+ var str = toString$8.call(thing);
40940
40933
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
40941
40934
  };
40942
40935
  }(/* @__PURE__ */ Object.create(null));
@@ -40986,14 +40979,14 @@ var isFile = kindOfTest("File");
40986
40979
  var isBlob = kindOfTest("Blob");
40987
40980
  var isFileList = kindOfTest("FileList");
40988
40981
  function isFunction$1(val) {
40989
- return toString$9.call(val) === "[object Function]";
40982
+ return toString$8.call(val) === "[object Function]";
40990
40983
  }
40991
40984
  function isStream(val) {
40992
40985
  return isObject$d(val) && isFunction$1(val.pipe);
40993
40986
  }
40994
40987
  function isFormData(thing) {
40995
40988
  var pattern = "[object FormData]";
40996
- return thing && (typeof FormData === "function" && thing instanceof FormData || toString$9.call(thing) === pattern || isFunction$1(thing.toString) && thing.toString() === pattern);
40989
+ return thing && (typeof FormData === "function" && thing instanceof FormData || toString$8.call(thing) === pattern || isFunction$1(thing.toString) && thing.toString() === pattern);
40997
40990
  }
40998
40991
  var isURLSearchParams = kindOfTest("URLSearchParams");
40999
40992
  function trim$1(str) {
@@ -54553,19 +54546,19 @@ const ERROR_PACKET = { type: "error", data: "parser error" };
54553
54546
  commons.ERROR_PACKET = ERROR_PACKET;
54554
54547
  Object.defineProperty(encodePacket_browser, "__esModule", { value: true });
54555
54548
  const commons_js_1$1 = commons;
54556
- const withNativeBlob$1 = typeof Blob === "function" || typeof Blob !== "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]";
54557
- const withNativeArrayBuffer$2 = typeof ArrayBuffer === "function";
54558
- const isView$1 = (obj) => {
54549
+ const withNativeBlob = typeof Blob === "function" || typeof Blob !== "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]";
54550
+ const withNativeArrayBuffer$1 = typeof ArrayBuffer === "function";
54551
+ const isView = (obj) => {
54559
54552
  return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj && obj.buffer instanceof ArrayBuffer;
54560
54553
  };
54561
54554
  const encodePacket = ({ type, data: data2 }, supportsBinary, callback) => {
54562
- if (withNativeBlob$1 && data2 instanceof Blob) {
54555
+ if (withNativeBlob && data2 instanceof Blob) {
54563
54556
  if (supportsBinary) {
54564
54557
  return callback(data2);
54565
54558
  } else {
54566
54559
  return encodeBlobAsBase64(data2, callback);
54567
54560
  }
54568
- } else if (withNativeArrayBuffer$2 && (data2 instanceof ArrayBuffer || isView$1(data2))) {
54561
+ } else if (withNativeArrayBuffer$1 && (data2 instanceof ArrayBuffer || isView(data2))) {
54569
54562
  if (supportsBinary) {
54570
54563
  return callback(data2);
54571
54564
  } else {
@@ -54632,7 +54625,7 @@ base64Arraybuffer.decode = decode$2;
54632
54625
  Object.defineProperty(decodePacket_browser, "__esModule", { value: true });
54633
54626
  const commons_js_1 = commons;
54634
54627
  const base64_arraybuffer_js_1 = base64Arraybuffer;
54635
- const withNativeArrayBuffer$1 = typeof ArrayBuffer === "function";
54628
+ const withNativeArrayBuffer = typeof ArrayBuffer === "function";
54636
54629
  const decodePacket = (encodedPacket, binaryType) => {
54637
54630
  if (typeof encodedPacket !== "string") {
54638
54631
  return {
@@ -54659,7 +54652,7 @@ const decodePacket = (encodedPacket, binaryType) => {
54659
54652
  };
54660
54653
  };
54661
54654
  const decodeBase64Packet = (data2, binaryType) => {
54662
- if (withNativeArrayBuffer$1) {
54655
+ if (withNativeArrayBuffer) {
54663
54656
  const decoded = (0, base64_arraybuffer_js_1.decode)(data2);
54664
54657
  return mapBinary(decoded, binaryType);
54665
54658
  } else {
@@ -56432,311 +56425,332 @@ var manager = {};
56432
56425
  var socket = {};
56433
56426
  var cjs = {};
56434
56427
  var binary = {};
56435
- var isBinary$1 = {};
56436
- Object.defineProperty(isBinary$1, "__esModule", { value: true });
56437
- isBinary$1.hasBinary = isBinary$1.isBinary = void 0;
56438
- const withNativeArrayBuffer = typeof ArrayBuffer === "function";
56439
- const isView = (obj) => {
56440
- return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj.buffer instanceof ArrayBuffer;
56441
- };
56442
- const toString$8 = Object.prototype.toString;
56443
- const withNativeBlob = typeof Blob === "function" || typeof Blob !== "undefined" && toString$8.call(Blob) === "[object BlobConstructor]";
56444
- const withNativeFile = typeof File === "function" || typeof File !== "undefined" && toString$8.call(File) === "[object FileConstructor]";
56445
- function isBinary(obj) {
56446
- return withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj)) || withNativeBlob && obj instanceof Blob || withNativeFile && obj instanceof File;
56447
- }
56448
- isBinary$1.isBinary = isBinary;
56449
- function hasBinary(obj, toJSON3) {
56450
- if (!obj || typeof obj !== "object") {
56451
- return false;
56452
- }
56453
- if (Array.isArray(obj)) {
56454
- for (let i = 0, l2 = obj.length; i < l2; i++) {
56455
- if (hasBinary(obj[i])) {
56456
- return true;
56428
+ var isBinary = {};
56429
+ var hasRequiredIsBinary;
56430
+ function requireIsBinary() {
56431
+ if (hasRequiredIsBinary)
56432
+ return isBinary;
56433
+ hasRequiredIsBinary = 1;
56434
+ Object.defineProperty(isBinary, "__esModule", { value: true });
56435
+ isBinary.hasBinary = isBinary.isBinary = void 0;
56436
+ const withNativeArrayBuffer2 = typeof ArrayBuffer === "function";
56437
+ const isView2 = (obj) => {
56438
+ return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj.buffer instanceof ArrayBuffer;
56439
+ };
56440
+ const toString3 = Object.prototype.toString;
56441
+ const withNativeBlob2 = typeof Blob === "function" || typeof Blob !== "undefined" && toString3.call(Blob) === "[object BlobConstructor]";
56442
+ const withNativeFile = typeof File === "function" || typeof File !== "undefined" && toString3.call(File) === "[object FileConstructor]";
56443
+ function isBinary$1(obj) {
56444
+ return withNativeArrayBuffer2 && (obj instanceof ArrayBuffer || isView2(obj)) || withNativeBlob2 && obj instanceof Blob || withNativeFile && obj instanceof File;
56445
+ }
56446
+ isBinary.isBinary = isBinary$1;
56447
+ function hasBinary(obj, toJSON3) {
56448
+ if (!obj || typeof obj !== "object") {
56449
+ return false;
56450
+ }
56451
+ if (Array.isArray(obj)) {
56452
+ for (let i = 0, l2 = obj.length; i < l2; i++) {
56453
+ if (hasBinary(obj[i])) {
56454
+ return true;
56455
+ }
56457
56456
  }
56457
+ return false;
56458
56458
  }
56459
- return false;
56460
- }
56461
- if (isBinary(obj)) {
56462
- return true;
56463
- }
56464
- if (obj.toJSON && typeof obj.toJSON === "function" && arguments.length === 1) {
56465
- return hasBinary(obj.toJSON(), true);
56466
- }
56467
- for (const key in obj) {
56468
- if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {
56459
+ if (isBinary$1(obj)) {
56469
56460
  return true;
56470
56461
  }
56471
- }
56472
- return false;
56473
- }
56474
- isBinary$1.hasBinary = hasBinary;
56475
- Object.defineProperty(binary, "__esModule", { value: true });
56476
- binary.reconstructPacket = binary.deconstructPacket = void 0;
56477
- const is_binary_js_1 = isBinary$1;
56478
- function deconstructPacket(packet) {
56479
- const buffers = [];
56480
- const packetData = packet.data;
56481
- const pack = packet;
56482
- pack.data = _deconstructPacket(packetData, buffers);
56483
- pack.attachments = buffers.length;
56484
- return { packet: pack, buffers };
56485
- }
56486
- binary.deconstructPacket = deconstructPacket;
56487
- function _deconstructPacket(data2, buffers) {
56488
- if (!data2)
56489
- return data2;
56490
- if (is_binary_js_1.isBinary(data2)) {
56491
- const placeholder = { _placeholder: true, num: buffers.length };
56492
- buffers.push(data2);
56493
- return placeholder;
56494
- } else if (Array.isArray(data2)) {
56495
- const newData = new Array(data2.length);
56496
- for (let i = 0; i < data2.length; i++) {
56497
- newData[i] = _deconstructPacket(data2[i], buffers);
56462
+ if (obj.toJSON && typeof obj.toJSON === "function" && arguments.length === 1) {
56463
+ return hasBinary(obj.toJSON(), true);
56498
56464
  }
56499
- return newData;
56500
- } else if (typeof data2 === "object" && !(data2 instanceof Date)) {
56501
- const newData = {};
56502
- for (const key in data2) {
56503
- if (Object.prototype.hasOwnProperty.call(data2, key)) {
56504
- newData[key] = _deconstructPacket(data2[key], buffers);
56465
+ for (const key in obj) {
56466
+ if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {
56467
+ return true;
56505
56468
  }
56506
56469
  }
56507
- return newData;
56470
+ return false;
56508
56471
  }
56509
- return data2;
56510
- }
56511
- function reconstructPacket(packet, buffers) {
56512
- packet.data = _reconstructPacket(packet.data, buffers);
56513
- packet.attachments = void 0;
56514
- return packet;
56515
- }
56516
- binary.reconstructPacket = reconstructPacket;
56517
- function _reconstructPacket(data2, buffers) {
56518
- if (!data2)
56519
- return data2;
56520
- if (data2 && data2._placeholder === true) {
56521
- const isIndexValid = typeof data2.num === "number" && data2.num >= 0 && data2.num < buffers.length;
56522
- if (isIndexValid) {
56523
- return buffers[data2.num];
56524
- } else {
56525
- throw new Error("illegal attachments");
56526
- }
56527
- } else if (Array.isArray(data2)) {
56528
- for (let i = 0; i < data2.length; i++) {
56529
- data2[i] = _reconstructPacket(data2[i], buffers);
56472
+ isBinary.hasBinary = hasBinary;
56473
+ return isBinary;
56474
+ }
56475
+ var hasRequiredBinary;
56476
+ function requireBinary() {
56477
+ if (hasRequiredBinary)
56478
+ return binary;
56479
+ hasRequiredBinary = 1;
56480
+ Object.defineProperty(binary, "__esModule", { value: true });
56481
+ binary.reconstructPacket = binary.deconstructPacket = void 0;
56482
+ const is_binary_js_1 = requireIsBinary();
56483
+ function deconstructPacket(packet) {
56484
+ const buffers = [];
56485
+ const packetData = packet.data;
56486
+ const pack = packet;
56487
+ pack.data = _deconstructPacket(packetData, buffers);
56488
+ pack.attachments = buffers.length;
56489
+ return { packet: pack, buffers };
56490
+ }
56491
+ binary.deconstructPacket = deconstructPacket;
56492
+ function _deconstructPacket(data2, buffers) {
56493
+ if (!data2)
56494
+ return data2;
56495
+ if (is_binary_js_1.isBinary(data2)) {
56496
+ const placeholder = { _placeholder: true, num: buffers.length };
56497
+ buffers.push(data2);
56498
+ return placeholder;
56499
+ } else if (Array.isArray(data2)) {
56500
+ const newData = new Array(data2.length);
56501
+ for (let i = 0; i < data2.length; i++) {
56502
+ newData[i] = _deconstructPacket(data2[i], buffers);
56503
+ }
56504
+ return newData;
56505
+ } else if (typeof data2 === "object" && !(data2 instanceof Date)) {
56506
+ const newData = {};
56507
+ for (const key in data2) {
56508
+ if (Object.prototype.hasOwnProperty.call(data2, key)) {
56509
+ newData[key] = _deconstructPacket(data2[key], buffers);
56510
+ }
56511
+ }
56512
+ return newData;
56530
56513
  }
56531
- } else if (typeof data2 === "object") {
56532
- for (const key in data2) {
56533
- if (Object.prototype.hasOwnProperty.call(data2, key)) {
56534
- data2[key] = _reconstructPacket(data2[key], buffers);
56514
+ return data2;
56515
+ }
56516
+ function reconstructPacket(packet, buffers) {
56517
+ packet.data = _reconstructPacket(packet.data, buffers);
56518
+ packet.attachments = void 0;
56519
+ return packet;
56520
+ }
56521
+ binary.reconstructPacket = reconstructPacket;
56522
+ function _reconstructPacket(data2, buffers) {
56523
+ if (!data2)
56524
+ return data2;
56525
+ if (data2 && data2._placeholder === true) {
56526
+ const isIndexValid = typeof data2.num === "number" && data2.num >= 0 && data2.num < buffers.length;
56527
+ if (isIndexValid) {
56528
+ return buffers[data2.num];
56529
+ } else {
56530
+ throw new Error("illegal attachments");
56531
+ }
56532
+ } else if (Array.isArray(data2)) {
56533
+ for (let i = 0; i < data2.length; i++) {
56534
+ data2[i] = _reconstructPacket(data2[i], buffers);
56535
+ }
56536
+ } else if (typeof data2 === "object") {
56537
+ for (const key in data2) {
56538
+ if (Object.prototype.hasOwnProperty.call(data2, key)) {
56539
+ data2[key] = _reconstructPacket(data2[key], buffers);
56540
+ }
56535
56541
  }
56536
56542
  }
56543
+ return data2;
56537
56544
  }
56538
- return data2;
56545
+ return binary;
56539
56546
  }
56540
- (function(exports2) {
56541
- Object.defineProperty(exports2, "__esModule", { value: true });
56542
- exports2.Decoder = exports2.Encoder = exports2.PacketType = exports2.protocol = void 0;
56543
- const component_emitter_12 = require$$5;
56544
- const binary_js_1 = binary;
56545
- const is_binary_js_12 = isBinary$1;
56546
- const debug_12 = browser.exports;
56547
- const debug2 = debug_12.default("socket.io-parser");
56548
- exports2.protocol = 5;
56549
- var PacketType;
56550
- (function(PacketType2) {
56551
- PacketType2[PacketType2["CONNECT"] = 0] = "CONNECT";
56552
- PacketType2[PacketType2["DISCONNECT"] = 1] = "DISCONNECT";
56553
- PacketType2[PacketType2["EVENT"] = 2] = "EVENT";
56554
- PacketType2[PacketType2["ACK"] = 3] = "ACK";
56555
- PacketType2[PacketType2["CONNECT_ERROR"] = 4] = "CONNECT_ERROR";
56556
- PacketType2[PacketType2["BINARY_EVENT"] = 5] = "BINARY_EVENT";
56557
- PacketType2[PacketType2["BINARY_ACK"] = 6] = "BINARY_ACK";
56558
- })(PacketType = exports2.PacketType || (exports2.PacketType = {}));
56559
- class Encoder {
56560
- constructor(replacer) {
56561
- this.replacer = replacer;
56562
- }
56563
- encode(obj) {
56564
- debug2("encoding packet %j", obj);
56565
- if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {
56566
- if (is_binary_js_12.hasBinary(obj)) {
56567
- obj.type = obj.type === PacketType.EVENT ? PacketType.BINARY_EVENT : PacketType.BINARY_ACK;
56568
- return this.encodeAsBinary(obj);
56569
- }
56570
- }
56571
- return [this.encodeAsString(obj)];
56572
- }
56573
- encodeAsString(obj) {
56574
- let str = "" + obj.type;
56575
- if (obj.type === PacketType.BINARY_EVENT || obj.type === PacketType.BINARY_ACK) {
56576
- str += obj.attachments + "-";
56577
- }
56578
- if (obj.nsp && "/" !== obj.nsp) {
56579
- str += obj.nsp + ",";
56580
- }
56581
- if (null != obj.id) {
56582
- str += obj.id;
56583
- }
56584
- if (null != obj.data) {
56585
- str += JSON.stringify(obj.data, this.replacer);
56586
- }
56587
- debug2("encoded %j as %s", obj, str);
56588
- return str;
56589
- }
56590
- encodeAsBinary(obj) {
56591
- const deconstruction = binary_js_1.deconstructPacket(obj);
56592
- const pack = this.encodeAsString(deconstruction.packet);
56593
- const buffers = deconstruction.buffers;
56594
- buffers.unshift(pack);
56595
- return buffers;
56596
- }
56597
- }
56598
- exports2.Encoder = Encoder;
56599
- class Decoder extends component_emitter_12.Emitter {
56600
- constructor(reviver) {
56601
- super();
56602
- this.reviver = reviver;
56603
- }
56604
- add(obj) {
56605
- let packet;
56606
- if (typeof obj === "string") {
56607
- if (this.reconstructor) {
56608
- throw new Error("got plaintext data when reconstructing a packet");
56609
- }
56610
- packet = this.decodeString(obj);
56611
- if (packet.type === PacketType.BINARY_EVENT || packet.type === PacketType.BINARY_ACK) {
56612
- this.reconstructor = new BinaryReconstructor(packet);
56613
- if (packet.attachments === 0) {
56547
+ var hasRequiredCjs$1;
56548
+ function requireCjs$1() {
56549
+ if (hasRequiredCjs$1)
56550
+ return cjs;
56551
+ hasRequiredCjs$1 = 1;
56552
+ (function(exports2) {
56553
+ Object.defineProperty(exports2, "__esModule", { value: true });
56554
+ exports2.Decoder = exports2.Encoder = exports2.PacketType = exports2.protocol = void 0;
56555
+ const component_emitter_12 = require$$5;
56556
+ const binary_js_1 = requireBinary();
56557
+ const is_binary_js_1 = requireIsBinary();
56558
+ const debug_12 = browser.exports;
56559
+ const debug2 = debug_12.default("socket.io-parser");
56560
+ exports2.protocol = 5;
56561
+ var PacketType;
56562
+ (function(PacketType2) {
56563
+ PacketType2[PacketType2["CONNECT"] = 0] = "CONNECT";
56564
+ PacketType2[PacketType2["DISCONNECT"] = 1] = "DISCONNECT";
56565
+ PacketType2[PacketType2["EVENT"] = 2] = "EVENT";
56566
+ PacketType2[PacketType2["ACK"] = 3] = "ACK";
56567
+ PacketType2[PacketType2["CONNECT_ERROR"] = 4] = "CONNECT_ERROR";
56568
+ PacketType2[PacketType2["BINARY_EVENT"] = 5] = "BINARY_EVENT";
56569
+ PacketType2[PacketType2["BINARY_ACK"] = 6] = "BINARY_ACK";
56570
+ })(PacketType = exports2.PacketType || (exports2.PacketType = {}));
56571
+ class Encoder {
56572
+ constructor(replacer) {
56573
+ this.replacer = replacer;
56574
+ }
56575
+ encode(obj) {
56576
+ debug2("encoding packet %j", obj);
56577
+ if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {
56578
+ if (is_binary_js_1.hasBinary(obj)) {
56579
+ obj.type = obj.type === PacketType.EVENT ? PacketType.BINARY_EVENT : PacketType.BINARY_ACK;
56580
+ return this.encodeAsBinary(obj);
56581
+ }
56582
+ }
56583
+ return [this.encodeAsString(obj)];
56584
+ }
56585
+ encodeAsString(obj) {
56586
+ let str = "" + obj.type;
56587
+ if (obj.type === PacketType.BINARY_EVENT || obj.type === PacketType.BINARY_ACK) {
56588
+ str += obj.attachments + "-";
56589
+ }
56590
+ if (obj.nsp && "/" !== obj.nsp) {
56591
+ str += obj.nsp + ",";
56592
+ }
56593
+ if (null != obj.id) {
56594
+ str += obj.id;
56595
+ }
56596
+ if (null != obj.data) {
56597
+ str += JSON.stringify(obj.data, this.replacer);
56598
+ }
56599
+ debug2("encoded %j as %s", obj, str);
56600
+ return str;
56601
+ }
56602
+ encodeAsBinary(obj) {
56603
+ const deconstruction = binary_js_1.deconstructPacket(obj);
56604
+ const pack = this.encodeAsString(deconstruction.packet);
56605
+ const buffers = deconstruction.buffers;
56606
+ buffers.unshift(pack);
56607
+ return buffers;
56608
+ }
56609
+ }
56610
+ exports2.Encoder = Encoder;
56611
+ class Decoder extends component_emitter_12.Emitter {
56612
+ constructor(reviver) {
56613
+ super();
56614
+ this.reviver = reviver;
56615
+ }
56616
+ add(obj) {
56617
+ let packet;
56618
+ if (typeof obj === "string") {
56619
+ if (this.reconstructor) {
56620
+ throw new Error("got plaintext data when reconstructing a packet");
56621
+ }
56622
+ packet = this.decodeString(obj);
56623
+ if (packet.type === PacketType.BINARY_EVENT || packet.type === PacketType.BINARY_ACK) {
56624
+ this.reconstructor = new BinaryReconstructor(packet);
56625
+ if (packet.attachments === 0) {
56626
+ super.emitReserved("decoded", packet);
56627
+ }
56628
+ } else {
56614
56629
  super.emitReserved("decoded", packet);
56615
56630
  }
56616
- } else {
56617
- super.emitReserved("decoded", packet);
56618
- }
56619
- } else if (is_binary_js_12.isBinary(obj) || obj.base64) {
56620
- if (!this.reconstructor) {
56621
- throw new Error("got binary data when not reconstructing a packet");
56622
- } else {
56623
- packet = this.reconstructor.takeBinaryData(obj);
56624
- if (packet) {
56625
- this.reconstructor = null;
56626
- super.emitReserved("decoded", packet);
56631
+ } else if (is_binary_js_1.isBinary(obj) || obj.base64) {
56632
+ if (!this.reconstructor) {
56633
+ throw new Error("got binary data when not reconstructing a packet");
56634
+ } else {
56635
+ packet = this.reconstructor.takeBinaryData(obj);
56636
+ if (packet) {
56637
+ this.reconstructor = null;
56638
+ super.emitReserved("decoded", packet);
56639
+ }
56627
56640
  }
56641
+ } else {
56642
+ throw new Error("Unknown type: " + obj);
56628
56643
  }
56629
- } else {
56630
- throw new Error("Unknown type: " + obj);
56631
56644
  }
56632
- }
56633
- decodeString(str) {
56634
- let i = 0;
56635
- const p2 = {
56636
- type: Number(str.charAt(0))
56637
- };
56638
- if (PacketType[p2.type] === void 0) {
56639
- throw new Error("unknown packet type " + p2.type);
56640
- }
56641
- if (p2.type === PacketType.BINARY_EVENT || p2.type === PacketType.BINARY_ACK) {
56642
- const start = i + 1;
56643
- while (str.charAt(++i) !== "-" && i != str.length) {
56645
+ decodeString(str) {
56646
+ let i = 0;
56647
+ const p2 = {
56648
+ type: Number(str.charAt(0))
56649
+ };
56650
+ if (PacketType[p2.type] === void 0) {
56651
+ throw new Error("unknown packet type " + p2.type);
56644
56652
  }
56645
- const buf = str.substring(start, i);
56646
- if (buf != Number(buf) || str.charAt(i) !== "-") {
56647
- throw new Error("Illegal attachments");
56653
+ if (p2.type === PacketType.BINARY_EVENT || p2.type === PacketType.BINARY_ACK) {
56654
+ const start = i + 1;
56655
+ while (str.charAt(++i) !== "-" && i != str.length) {
56656
+ }
56657
+ const buf = str.substring(start, i);
56658
+ if (buf != Number(buf) || str.charAt(i) !== "-") {
56659
+ throw new Error("Illegal attachments");
56660
+ }
56661
+ p2.attachments = Number(buf);
56648
56662
  }
56649
- p2.attachments = Number(buf);
56650
- }
56651
- if ("/" === str.charAt(i + 1)) {
56652
- const start = i + 1;
56653
- while (++i) {
56654
- const c2 = str.charAt(i);
56655
- if ("," === c2)
56656
- break;
56657
- if (i === str.length)
56658
- break;
56663
+ if ("/" === str.charAt(i + 1)) {
56664
+ const start = i + 1;
56665
+ while (++i) {
56666
+ const c2 = str.charAt(i);
56667
+ if ("," === c2)
56668
+ break;
56669
+ if (i === str.length)
56670
+ break;
56671
+ }
56672
+ p2.nsp = str.substring(start, i);
56673
+ } else {
56674
+ p2.nsp = "/";
56675
+ }
56676
+ const next = str.charAt(i + 1);
56677
+ if ("" !== next && Number(next) == next) {
56678
+ const start = i + 1;
56679
+ while (++i) {
56680
+ const c2 = str.charAt(i);
56681
+ if (null == c2 || Number(c2) != c2) {
56682
+ --i;
56683
+ break;
56684
+ }
56685
+ if (i === str.length)
56686
+ break;
56687
+ }
56688
+ p2.id = Number(str.substring(start, i + 1));
56659
56689
  }
56660
- p2.nsp = str.substring(start, i);
56661
- } else {
56662
- p2.nsp = "/";
56663
- }
56664
- const next = str.charAt(i + 1);
56665
- if ("" !== next && Number(next) == next) {
56666
- const start = i + 1;
56667
- while (++i) {
56668
- const c2 = str.charAt(i);
56669
- if (null == c2 || Number(c2) != c2) {
56670
- --i;
56671
- break;
56690
+ if (str.charAt(++i)) {
56691
+ const payload = this.tryParse(str.substr(i));
56692
+ if (Decoder.isPayloadValid(p2.type, payload)) {
56693
+ p2.data = payload;
56694
+ } else {
56695
+ throw new Error("invalid payload");
56672
56696
  }
56673
- if (i === str.length)
56674
- break;
56675
56697
  }
56676
- p2.id = Number(str.substring(start, i + 1));
56698
+ debug2("decoded %s as %j", str, p2);
56699
+ return p2;
56677
56700
  }
56678
- if (str.charAt(++i)) {
56679
- const payload = this.tryParse(str.substr(i));
56680
- if (Decoder.isPayloadValid(p2.type, payload)) {
56681
- p2.data = payload;
56682
- } else {
56683
- throw new Error("invalid payload");
56701
+ tryParse(str) {
56702
+ try {
56703
+ return JSON.parse(str, this.reviver);
56704
+ } catch (e2) {
56705
+ return false;
56684
56706
  }
56685
56707
  }
56686
- debug2("decoded %s as %j", str, p2);
56687
- return p2;
56688
- }
56689
- tryParse(str) {
56690
- try {
56691
- return JSON.parse(str, this.reviver);
56692
- } catch (e2) {
56693
- return false;
56708
+ static isPayloadValid(type, payload) {
56709
+ switch (type) {
56710
+ case PacketType.CONNECT:
56711
+ return typeof payload === "object";
56712
+ case PacketType.DISCONNECT:
56713
+ return payload === void 0;
56714
+ case PacketType.CONNECT_ERROR:
56715
+ return typeof payload === "string" || typeof payload === "object";
56716
+ case PacketType.EVENT:
56717
+ case PacketType.BINARY_EVENT:
56718
+ return Array.isArray(payload) && payload.length > 0;
56719
+ case PacketType.ACK:
56720
+ case PacketType.BINARY_ACK:
56721
+ return Array.isArray(payload);
56722
+ }
56723
+ }
56724
+ destroy() {
56725
+ if (this.reconstructor) {
56726
+ this.reconstructor.finishedReconstruction();
56727
+ }
56694
56728
  }
56695
56729
  }
56696
- static isPayloadValid(type, payload) {
56697
- switch (type) {
56698
- case PacketType.CONNECT:
56699
- return typeof payload === "object";
56700
- case PacketType.DISCONNECT:
56701
- return payload === void 0;
56702
- case PacketType.CONNECT_ERROR:
56703
- return typeof payload === "string" || typeof payload === "object";
56704
- case PacketType.EVENT:
56705
- case PacketType.BINARY_EVENT:
56706
- return Array.isArray(payload) && payload.length > 0;
56707
- case PacketType.ACK:
56708
- case PacketType.BINARY_ACK:
56709
- return Array.isArray(payload);
56710
- }
56711
- }
56712
- destroy() {
56713
- if (this.reconstructor) {
56714
- this.reconstructor.finishedReconstruction();
56715
- }
56716
- }
56717
- }
56718
- exports2.Decoder = Decoder;
56719
- class BinaryReconstructor {
56720
- constructor(packet) {
56721
- this.packet = packet;
56722
- this.buffers = [];
56723
- this.reconPack = packet;
56724
- }
56725
- takeBinaryData(binData) {
56726
- this.buffers.push(binData);
56727
- if (this.buffers.length === this.reconPack.attachments) {
56728
- const packet = binary_js_1.reconstructPacket(this.reconPack, this.buffers);
56729
- this.finishedReconstruction();
56730
- return packet;
56730
+ exports2.Decoder = Decoder;
56731
+ class BinaryReconstructor {
56732
+ constructor(packet) {
56733
+ this.packet = packet;
56734
+ this.buffers = [];
56735
+ this.reconPack = packet;
56736
+ }
56737
+ takeBinaryData(binData) {
56738
+ this.buffers.push(binData);
56739
+ if (this.buffers.length === this.reconPack.attachments) {
56740
+ const packet = binary_js_1.reconstructPacket(this.reconPack, this.buffers);
56741
+ this.finishedReconstruction();
56742
+ return packet;
56743
+ }
56744
+ return null;
56745
+ }
56746
+ finishedReconstruction() {
56747
+ this.reconPack = null;
56748
+ this.buffers = [];
56731
56749
  }
56732
- return null;
56733
- }
56734
- finishedReconstruction() {
56735
- this.reconPack = null;
56736
- this.buffers = [];
56737
56750
  }
56738
- }
56739
- })(cjs);
56751
+ })(cjs);
56752
+ return cjs;
56753
+ }
56740
56754
  var on$1 = {};
56741
56755
  Object.defineProperty(on$1, "__esModule", { value: true });
56742
56756
  on$1.on = void 0;
@@ -56752,7 +56766,7 @@ var __importDefault$5 = commonjsGlobal && commonjsGlobal.__importDefault || func
56752
56766
  };
56753
56767
  Object.defineProperty(socket, "__esModule", { value: true });
56754
56768
  socket.Socket = void 0;
56755
- const socket_io_parser_1 = cjs;
56769
+ const socket_io_parser_1 = requireCjs$1();
56756
56770
  const on_js_1$1 = on$1;
56757
56771
  const component_emitter_1$1 = require$$5;
56758
56772
  const debug_1$1 = __importDefault$5(browser.exports);
@@ -57166,7 +57180,7 @@ Object.defineProperty(manager, "__esModule", { value: true });
57166
57180
  manager.Manager = void 0;
57167
57181
  const engine_io_client_1 = cjs$2;
57168
57182
  const socket_js_1 = socket;
57169
- const parser = __importStar$2(cjs);
57183
+ const parser = __importStar$2(requireCjs$1());
57170
57184
  const on_js_1 = on$1;
57171
57185
  const backo2_js_1 = backo2;
57172
57186
  const component_emitter_1 = require$$5;
@@ -57481,7 +57495,7 @@ manager.Manager = Manager;
57481
57495
  io: lookup2,
57482
57496
  connect: lookup2
57483
57497
  });
57484
- var socket_io_parser_12 = cjs;
57498
+ var socket_io_parser_12 = requireCjs$1();
57485
57499
  Object.defineProperty(exports2, "protocol", { enumerable: true, get: function() {
57486
57500
  return socket_io_parser_12.protocol;
57487
57501
  } });