@sawport/react-sdk 0.1.0-alpha.3 → 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.iife.js +68229 -0
- package/dist/index.js +64074 -64054
- package/dist/index.umd.js +345 -322
- package/package.json +6 -4
- package/dist/index.cjs.js +0 -68203
- package/dist/index.es.js +0 -68203
package/dist/index.umd.js
CHANGED
|
@@ -3160,14 +3160,14 @@
|
|
|
3160
3160
|
var result = value2 + "";
|
|
3161
3161
|
return result == "0" && 1 / value2 == -INFINITY$2 ? "-0" : result;
|
|
3162
3162
|
}
|
|
3163
|
-
function toString$
|
|
3163
|
+
function toString$g(value2) {
|
|
3164
3164
|
return value2 == null ? "" : baseToString$2(value2);
|
|
3165
3165
|
}
|
|
3166
3166
|
function toPath(value2) {
|
|
3167
3167
|
if (isArray$l(value2)) {
|
|
3168
3168
|
return arrayMap$2(value2, toKey$5);
|
|
3169
3169
|
}
|
|
3170
|
-
return isSymbol$a(value2) ? [value2] : copyArray(stringToPath$4(toString$
|
|
3170
|
+
return isSymbol$a(value2) ? [value2] : copyArray(stringToPath$4(toString$g(value2)));
|
|
3171
3171
|
}
|
|
3172
3172
|
var isProduction = process.env.NODE_ENV === "production";
|
|
3173
3173
|
function warning(condition, message) {
|
|
@@ -3452,21 +3452,14 @@
|
|
|
3452
3452
|
}
|
|
3453
3453
|
return reactIs_development;
|
|
3454
3454
|
}
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
} else {
|
|
3464
|
-
module2.exports = requireReactIs_development();
|
|
3465
|
-
}
|
|
3466
|
-
})(reactIs$1);
|
|
3467
|
-
return reactIs$1.exports;
|
|
3468
|
-
}
|
|
3469
|
-
var reactIs = requireReactIs();
|
|
3455
|
+
(function(module2) {
|
|
3456
|
+
if (process.env.NODE_ENV === "production") {
|
|
3457
|
+
module2.exports = requireReactIs_production_min();
|
|
3458
|
+
} else {
|
|
3459
|
+
module2.exports = requireReactIs_development();
|
|
3460
|
+
}
|
|
3461
|
+
})(reactIs$1);
|
|
3462
|
+
var reactIs = reactIs$1.exports;
|
|
3470
3463
|
var FORWARD_REF_STATICS = {
|
|
3471
3464
|
"$$typeof": true,
|
|
3472
3465
|
render: true,
|
|
@@ -4717,7 +4710,7 @@
|
|
|
4717
4710
|
function clone$2(src2) {
|
|
4718
4711
|
return baseClone(src2, [], []);
|
|
4719
4712
|
}
|
|
4720
|
-
const toString$
|
|
4713
|
+
const toString$f = Object.prototype.toString;
|
|
4721
4714
|
const errorToString = Error.prototype.toString;
|
|
4722
4715
|
const regExpToString = RegExp.prototype.toString;
|
|
4723
4716
|
const symbolToString$1 = typeof Symbol !== "undefined" ? Symbol.prototype.toString : () => "";
|
|
@@ -4740,7 +4733,7 @@
|
|
|
4740
4733
|
return "[Function " + (val.name || "anonymous") + "]";
|
|
4741
4734
|
if (typeOf === "symbol")
|
|
4742
4735
|
return symbolToString$1.call(val).replace(SYMBOL_REGEXP, "Symbol($1)");
|
|
4743
|
-
const tag = toString$
|
|
4736
|
+
const tag = toString$f.call(val).slice(8, -1);
|
|
4744
4737
|
if (tag === "Date")
|
|
4745
4738
|
return isNaN(val.getTime()) ? "" + val : val.toISOString(val);
|
|
4746
4739
|
if (tag === "Error" || val instanceof Error)
|
|
@@ -5248,16 +5241,16 @@
|
|
|
5248
5241
|
}
|
|
5249
5242
|
var _baseToString = baseToString$1;
|
|
5250
5243
|
var baseToString = _baseToString;
|
|
5251
|
-
function toString$
|
|
5244
|
+
function toString$e(value2) {
|
|
5252
5245
|
return value2 == null ? "" : baseToString(value2);
|
|
5253
5246
|
}
|
|
5254
|
-
var toString_1 = toString$
|
|
5255
|
-
var isArray$g = isArray_1, isKey$2 = _isKey, stringToPath$1 = _stringToPath, toString$
|
|
5247
|
+
var toString_1 = toString$e;
|
|
5248
|
+
var isArray$g = isArray_1, isKey$2 = _isKey, stringToPath$1 = _stringToPath, toString$d = toString_1;
|
|
5256
5249
|
function castPath$2(value2, object2) {
|
|
5257
5250
|
if (isArray$g(value2)) {
|
|
5258
5251
|
return value2;
|
|
5259
5252
|
}
|
|
5260
|
-
return isKey$2(value2, object2) ? [value2] : stringToPath$1(toString$
|
|
5253
|
+
return isKey$2(value2, object2) ? [value2] : stringToPath$1(toString$d(value2));
|
|
5261
5254
|
}
|
|
5262
5255
|
var _castPath = castPath$2;
|
|
5263
5256
|
var baseGetTag$2 = _baseGetTag, isObjectLike$3 = isObjectLike_1;
|
|
@@ -7559,13 +7552,13 @@ attempted value: ${formattedValue}
|
|
|
7559
7552
|
};
|
|
7560
7553
|
var deburrLetter$1 = basePropertyOf(deburredLetters);
|
|
7561
7554
|
var _deburrLetter = deburrLetter$1;
|
|
7562
|
-
var deburrLetter = _deburrLetter, toString$
|
|
7555
|
+
var deburrLetter = _deburrLetter, toString$c = toString_1;
|
|
7563
7556
|
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
7564
7557
|
var rsComboMarksRange$3 = "\\u0300-\\u036f", reComboHalfMarksRange$3 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$3 = "\\u20d0-\\u20ff", rsComboRange$3 = rsComboMarksRange$3 + reComboHalfMarksRange$3 + rsComboSymbolsRange$3;
|
|
7565
7558
|
var rsCombo$2 = "[" + rsComboRange$3 + "]";
|
|
7566
7559
|
var reComboMark = RegExp(rsCombo$2, "g");
|
|
7567
7560
|
function deburr$1(string2) {
|
|
7568
|
-
string2 = toString$
|
|
7561
|
+
string2 = toString$c(string2);
|
|
7569
7562
|
return string2 && string2.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
|
7570
7563
|
}
|
|
7571
7564
|
var deburr_1 = deburr$1;
|
|
@@ -7596,9 +7589,9 @@ attempted value: ${formattedValue}
|
|
|
7596
7589
|
return string2.match(reUnicodeWord) || [];
|
|
7597
7590
|
}
|
|
7598
7591
|
var _unicodeWords = unicodeWords$1;
|
|
7599
|
-
var asciiWords = _asciiWords, hasUnicodeWord = _hasUnicodeWord, toString$
|
|
7592
|
+
var asciiWords = _asciiWords, hasUnicodeWord = _hasUnicodeWord, toString$b = toString_1, unicodeWords = _unicodeWords;
|
|
7600
7593
|
function words$1(string2, pattern, guard) {
|
|
7601
|
-
string2 = toString$
|
|
7594
|
+
string2 = toString$b(string2);
|
|
7602
7595
|
pattern = guard ? void 0 : pattern;
|
|
7603
7596
|
if (pattern === void 0) {
|
|
7604
7597
|
return hasUnicodeWord(string2) ? unicodeWords(string2) : asciiWords(string2);
|
|
@@ -7669,10 +7662,10 @@ attempted value: ${formattedValue}
|
|
|
7669
7662
|
return hasUnicode$1(string2) ? unicodeToArray(string2) : asciiToArray(string2);
|
|
7670
7663
|
}
|
|
7671
7664
|
var _stringToArray = stringToArray$1;
|
|
7672
|
-
var castSlice = _castSlice, hasUnicode = _hasUnicode, stringToArray = _stringToArray, toString$
|
|
7665
|
+
var castSlice = _castSlice, hasUnicode = _hasUnicode, stringToArray = _stringToArray, toString$a = toString_1;
|
|
7673
7666
|
function createCaseFirst$1(methodName) {
|
|
7674
7667
|
return function(string2) {
|
|
7675
|
-
string2 = toString$
|
|
7668
|
+
string2 = toString$a(string2);
|
|
7676
7669
|
var strSymbols = hasUnicode(string2) ? stringToArray(string2) : void 0;
|
|
7677
7670
|
var chr = strSymbols ? strSymbols[0] : string2.charAt(0);
|
|
7678
7671
|
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string2.slice(1);
|
|
@@ -7683,9 +7676,9 @@ attempted value: ${formattedValue}
|
|
|
7683
7676
|
var createCaseFirst = _createCaseFirst;
|
|
7684
7677
|
var upperFirst$1 = createCaseFirst("toUpperCase");
|
|
7685
7678
|
var upperFirst_1 = upperFirst$1;
|
|
7686
|
-
var toString$
|
|
7679
|
+
var toString$9 = toString_1, upperFirst = upperFirst_1;
|
|
7687
7680
|
function capitalize$1(string2) {
|
|
7688
|
-
return upperFirst(toString$
|
|
7681
|
+
return upperFirst(toString$9(string2).toLowerCase());
|
|
7689
7682
|
}
|
|
7690
7683
|
var capitalize_1 = capitalize$1;
|
|
7691
7684
|
var capitalize = capitalize_1, createCompounder = _createCompounder;
|
|
@@ -8294,7 +8287,7 @@ attempted value: ${formattedValue}
|
|
|
8294
8287
|
if (hasRequiredFactoryWithTypeCheckers)
|
|
8295
8288
|
return factoryWithTypeCheckers;
|
|
8296
8289
|
hasRequiredFactoryWithTypeCheckers = 1;
|
|
8297
|
-
var ReactIs2 =
|
|
8290
|
+
var ReactIs2 = reactIs$1.exports;
|
|
8298
8291
|
var assign2 = requireObjectAssign();
|
|
8299
8292
|
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
8300
8293
|
var has2 = requireHas();
|
|
@@ -8787,7 +8780,7 @@ attempted value: ${formattedValue}
|
|
|
8787
8780
|
return factoryWithThrowingShims;
|
|
8788
8781
|
}
|
|
8789
8782
|
if (process.env.NODE_ENV !== "production") {
|
|
8790
|
-
var ReactIs =
|
|
8783
|
+
var ReactIs = reactIs$1.exports;
|
|
8791
8784
|
var throwOnDirectAccess = true;
|
|
8792
8785
|
propTypes$h.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
8793
8786
|
} else {
|
|
@@ -40937,10 +40930,10 @@ attempted value: ${formattedValue}
|
|
|
40937
40930
|
};
|
|
40938
40931
|
};
|
|
40939
40932
|
var bind$6 = bind$7;
|
|
40940
|
-
var toString$
|
|
40933
|
+
var toString$8 = Object.prototype.toString;
|
|
40941
40934
|
var kindOf = function(cache) {
|
|
40942
40935
|
return function(thing) {
|
|
40943
|
-
var str = toString$
|
|
40936
|
+
var str = toString$8.call(thing);
|
|
40944
40937
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
40945
40938
|
};
|
|
40946
40939
|
}(/* @__PURE__ */ Object.create(null));
|
|
@@ -40990,14 +40983,14 @@ attempted value: ${formattedValue}
|
|
|
40990
40983
|
var isBlob = kindOfTest("Blob");
|
|
40991
40984
|
var isFileList = kindOfTest("FileList");
|
|
40992
40985
|
function isFunction$1(val) {
|
|
40993
|
-
return toString$
|
|
40986
|
+
return toString$8.call(val) === "[object Function]";
|
|
40994
40987
|
}
|
|
40995
40988
|
function isStream(val) {
|
|
40996
40989
|
return isObject$d(val) && isFunction$1(val.pipe);
|
|
40997
40990
|
}
|
|
40998
40991
|
function isFormData(thing) {
|
|
40999
40992
|
var pattern = "[object FormData]";
|
|
41000
|
-
return thing && (typeof FormData === "function" && thing instanceof FormData || toString$
|
|
40993
|
+
return thing && (typeof FormData === "function" && thing instanceof FormData || toString$8.call(thing) === pattern || isFunction$1(thing.toString) && thing.toString() === pattern);
|
|
41001
40994
|
}
|
|
41002
40995
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
41003
40996
|
function trim$1(str) {
|
|
@@ -54557,19 +54550,19 @@ attempted value: ${formattedValue}
|
|
|
54557
54550
|
commons.ERROR_PACKET = ERROR_PACKET;
|
|
54558
54551
|
Object.defineProperty(encodePacket_browser, "__esModule", { value: true });
|
|
54559
54552
|
const commons_js_1$1 = commons;
|
|
54560
|
-
const withNativeBlob
|
|
54561
|
-
const withNativeArrayBuffer$
|
|
54562
|
-
const isView
|
|
54553
|
+
const withNativeBlob = typeof Blob === "function" || typeof Blob !== "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]";
|
|
54554
|
+
const withNativeArrayBuffer$1 = typeof ArrayBuffer === "function";
|
|
54555
|
+
const isView = (obj) => {
|
|
54563
54556
|
return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj && obj.buffer instanceof ArrayBuffer;
|
|
54564
54557
|
};
|
|
54565
54558
|
const encodePacket = ({ type, data: data2 }, supportsBinary, callback) => {
|
|
54566
|
-
if (withNativeBlob
|
|
54559
|
+
if (withNativeBlob && data2 instanceof Blob) {
|
|
54567
54560
|
if (supportsBinary) {
|
|
54568
54561
|
return callback(data2);
|
|
54569
54562
|
} else {
|
|
54570
54563
|
return encodeBlobAsBase64(data2, callback);
|
|
54571
54564
|
}
|
|
54572
|
-
} else if (withNativeArrayBuffer$
|
|
54565
|
+
} else if (withNativeArrayBuffer$1 && (data2 instanceof ArrayBuffer || isView(data2))) {
|
|
54573
54566
|
if (supportsBinary) {
|
|
54574
54567
|
return callback(data2);
|
|
54575
54568
|
} else {
|
|
@@ -54636,7 +54629,7 @@ attempted value: ${formattedValue}
|
|
|
54636
54629
|
Object.defineProperty(decodePacket_browser, "__esModule", { value: true });
|
|
54637
54630
|
const commons_js_1 = commons;
|
|
54638
54631
|
const base64_arraybuffer_js_1 = base64Arraybuffer;
|
|
54639
|
-
const withNativeArrayBuffer
|
|
54632
|
+
const withNativeArrayBuffer = typeof ArrayBuffer === "function";
|
|
54640
54633
|
const decodePacket = (encodedPacket, binaryType) => {
|
|
54641
54634
|
if (typeof encodedPacket !== "string") {
|
|
54642
54635
|
return {
|
|
@@ -54663,7 +54656,7 @@ attempted value: ${formattedValue}
|
|
|
54663
54656
|
};
|
|
54664
54657
|
};
|
|
54665
54658
|
const decodeBase64Packet = (data2, binaryType) => {
|
|
54666
|
-
if (withNativeArrayBuffer
|
|
54659
|
+
if (withNativeArrayBuffer) {
|
|
54667
54660
|
const decoded = (0, base64_arraybuffer_js_1.decode)(data2);
|
|
54668
54661
|
return mapBinary(decoded, binaryType);
|
|
54669
54662
|
} else {
|
|
@@ -56436,311 +56429,332 @@ attempted value: ${formattedValue}
|
|
|
56436
56429
|
var socket = {};
|
|
56437
56430
|
var cjs = {};
|
|
56438
56431
|
var binary = {};
|
|
56439
|
-
var isBinary
|
|
56440
|
-
|
|
56441
|
-
|
|
56442
|
-
|
|
56443
|
-
|
|
56444
|
-
|
|
56445
|
-
|
|
56446
|
-
|
|
56447
|
-
|
|
56448
|
-
|
|
56449
|
-
|
|
56450
|
-
|
|
56451
|
-
|
|
56452
|
-
|
|
56453
|
-
|
|
56454
|
-
|
|
56455
|
-
return
|
|
56456
|
-
}
|
|
56457
|
-
|
|
56458
|
-
|
|
56459
|
-
|
|
56460
|
-
|
|
56432
|
+
var isBinary = {};
|
|
56433
|
+
var hasRequiredIsBinary;
|
|
56434
|
+
function requireIsBinary() {
|
|
56435
|
+
if (hasRequiredIsBinary)
|
|
56436
|
+
return isBinary;
|
|
56437
|
+
hasRequiredIsBinary = 1;
|
|
56438
|
+
Object.defineProperty(isBinary, "__esModule", { value: true });
|
|
56439
|
+
isBinary.hasBinary = isBinary.isBinary = void 0;
|
|
56440
|
+
const withNativeArrayBuffer2 = typeof ArrayBuffer === "function";
|
|
56441
|
+
const isView2 = (obj) => {
|
|
56442
|
+
return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj.buffer instanceof ArrayBuffer;
|
|
56443
|
+
};
|
|
56444
|
+
const toString2 = Object.prototype.toString;
|
|
56445
|
+
const withNativeBlob2 = typeof Blob === "function" || typeof Blob !== "undefined" && toString2.call(Blob) === "[object BlobConstructor]";
|
|
56446
|
+
const withNativeFile = typeof File === "function" || typeof File !== "undefined" && toString2.call(File) === "[object FileConstructor]";
|
|
56447
|
+
function isBinary$1(obj) {
|
|
56448
|
+
return withNativeArrayBuffer2 && (obj instanceof ArrayBuffer || isView2(obj)) || withNativeBlob2 && obj instanceof Blob || withNativeFile && obj instanceof File;
|
|
56449
|
+
}
|
|
56450
|
+
isBinary.isBinary = isBinary$1;
|
|
56451
|
+
function hasBinary(obj, toJSON2) {
|
|
56452
|
+
if (!obj || typeof obj !== "object") {
|
|
56453
|
+
return false;
|
|
56454
|
+
}
|
|
56455
|
+
if (Array.isArray(obj)) {
|
|
56456
|
+
for (let i2 = 0, l2 = obj.length; i2 < l2; i2++) {
|
|
56457
|
+
if (hasBinary(obj[i2])) {
|
|
56458
|
+
return true;
|
|
56459
|
+
}
|
|
56461
56460
|
}
|
|
56461
|
+
return false;
|
|
56462
56462
|
}
|
|
56463
|
-
|
|
56464
|
-
}
|
|
56465
|
-
if (isBinary(obj)) {
|
|
56466
|
-
return true;
|
|
56467
|
-
}
|
|
56468
|
-
if (obj.toJSON && typeof obj.toJSON === "function" && arguments.length === 1) {
|
|
56469
|
-
return hasBinary(obj.toJSON(), true);
|
|
56470
|
-
}
|
|
56471
|
-
for (const key in obj) {
|
|
56472
|
-
if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {
|
|
56463
|
+
if (isBinary$1(obj)) {
|
|
56473
56464
|
return true;
|
|
56474
56465
|
}
|
|
56475
|
-
|
|
56476
|
-
|
|
56477
|
-
}
|
|
56478
|
-
isBinary$1.hasBinary = hasBinary;
|
|
56479
|
-
Object.defineProperty(binary, "__esModule", { value: true });
|
|
56480
|
-
binary.reconstructPacket = binary.deconstructPacket = void 0;
|
|
56481
|
-
const is_binary_js_1 = isBinary$1;
|
|
56482
|
-
function deconstructPacket(packet) {
|
|
56483
|
-
const buffers = [];
|
|
56484
|
-
const packetData = packet.data;
|
|
56485
|
-
const pack = packet;
|
|
56486
|
-
pack.data = _deconstructPacket(packetData, buffers);
|
|
56487
|
-
pack.attachments = buffers.length;
|
|
56488
|
-
return { packet: pack, buffers };
|
|
56489
|
-
}
|
|
56490
|
-
binary.deconstructPacket = deconstructPacket;
|
|
56491
|
-
function _deconstructPacket(data2, buffers) {
|
|
56492
|
-
if (!data2)
|
|
56493
|
-
return data2;
|
|
56494
|
-
if (is_binary_js_1.isBinary(data2)) {
|
|
56495
|
-
const placeholder = { _placeholder: true, num: buffers.length };
|
|
56496
|
-
buffers.push(data2);
|
|
56497
|
-
return placeholder;
|
|
56498
|
-
} else if (Array.isArray(data2)) {
|
|
56499
|
-
const newData = new Array(data2.length);
|
|
56500
|
-
for (let i2 = 0; i2 < data2.length; i2++) {
|
|
56501
|
-
newData[i2] = _deconstructPacket(data2[i2], buffers);
|
|
56466
|
+
if (obj.toJSON && typeof obj.toJSON === "function" && arguments.length === 1) {
|
|
56467
|
+
return hasBinary(obj.toJSON(), true);
|
|
56502
56468
|
}
|
|
56503
|
-
|
|
56504
|
-
|
|
56505
|
-
|
|
56506
|
-
for (const key in data2) {
|
|
56507
|
-
if (Object.prototype.hasOwnProperty.call(data2, key)) {
|
|
56508
|
-
newData[key] = _deconstructPacket(data2[key], buffers);
|
|
56469
|
+
for (const key in obj) {
|
|
56470
|
+
if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {
|
|
56471
|
+
return true;
|
|
56509
56472
|
}
|
|
56510
56473
|
}
|
|
56511
|
-
return
|
|
56474
|
+
return false;
|
|
56512
56475
|
}
|
|
56513
|
-
|
|
56514
|
-
|
|
56515
|
-
|
|
56516
|
-
|
|
56517
|
-
|
|
56518
|
-
|
|
56519
|
-
|
|
56520
|
-
|
|
56521
|
-
|
|
56522
|
-
|
|
56523
|
-
|
|
56524
|
-
|
|
56525
|
-
const
|
|
56526
|
-
|
|
56527
|
-
|
|
56528
|
-
|
|
56529
|
-
|
|
56530
|
-
}
|
|
56531
|
-
}
|
|
56532
|
-
|
|
56533
|
-
|
|
56476
|
+
isBinary.hasBinary = hasBinary;
|
|
56477
|
+
return isBinary;
|
|
56478
|
+
}
|
|
56479
|
+
var hasRequiredBinary;
|
|
56480
|
+
function requireBinary() {
|
|
56481
|
+
if (hasRequiredBinary)
|
|
56482
|
+
return binary;
|
|
56483
|
+
hasRequiredBinary = 1;
|
|
56484
|
+
Object.defineProperty(binary, "__esModule", { value: true });
|
|
56485
|
+
binary.reconstructPacket = binary.deconstructPacket = void 0;
|
|
56486
|
+
const is_binary_js_1 = requireIsBinary();
|
|
56487
|
+
function deconstructPacket(packet) {
|
|
56488
|
+
const buffers = [];
|
|
56489
|
+
const packetData = packet.data;
|
|
56490
|
+
const pack = packet;
|
|
56491
|
+
pack.data = _deconstructPacket(packetData, buffers);
|
|
56492
|
+
pack.attachments = buffers.length;
|
|
56493
|
+
return { packet: pack, buffers };
|
|
56494
|
+
}
|
|
56495
|
+
binary.deconstructPacket = deconstructPacket;
|
|
56496
|
+
function _deconstructPacket(data2, buffers) {
|
|
56497
|
+
if (!data2)
|
|
56498
|
+
return data2;
|
|
56499
|
+
if (is_binary_js_1.isBinary(data2)) {
|
|
56500
|
+
const placeholder = { _placeholder: true, num: buffers.length };
|
|
56501
|
+
buffers.push(data2);
|
|
56502
|
+
return placeholder;
|
|
56503
|
+
} else if (Array.isArray(data2)) {
|
|
56504
|
+
const newData = new Array(data2.length);
|
|
56505
|
+
for (let i2 = 0; i2 < data2.length; i2++) {
|
|
56506
|
+
newData[i2] = _deconstructPacket(data2[i2], buffers);
|
|
56507
|
+
}
|
|
56508
|
+
return newData;
|
|
56509
|
+
} else if (typeof data2 === "object" && !(data2 instanceof Date)) {
|
|
56510
|
+
const newData = {};
|
|
56511
|
+
for (const key in data2) {
|
|
56512
|
+
if (Object.prototype.hasOwnProperty.call(data2, key)) {
|
|
56513
|
+
newData[key] = _deconstructPacket(data2[key], buffers);
|
|
56514
|
+
}
|
|
56515
|
+
}
|
|
56516
|
+
return newData;
|
|
56534
56517
|
}
|
|
56535
|
-
|
|
56536
|
-
|
|
56537
|
-
|
|
56538
|
-
|
|
56518
|
+
return data2;
|
|
56519
|
+
}
|
|
56520
|
+
function reconstructPacket(packet, buffers) {
|
|
56521
|
+
packet.data = _reconstructPacket(packet.data, buffers);
|
|
56522
|
+
packet.attachments = void 0;
|
|
56523
|
+
return packet;
|
|
56524
|
+
}
|
|
56525
|
+
binary.reconstructPacket = reconstructPacket;
|
|
56526
|
+
function _reconstructPacket(data2, buffers) {
|
|
56527
|
+
if (!data2)
|
|
56528
|
+
return data2;
|
|
56529
|
+
if (data2 && data2._placeholder === true) {
|
|
56530
|
+
const isIndexValid = typeof data2.num === "number" && data2.num >= 0 && data2.num < buffers.length;
|
|
56531
|
+
if (isIndexValid) {
|
|
56532
|
+
return buffers[data2.num];
|
|
56533
|
+
} else {
|
|
56534
|
+
throw new Error("illegal attachments");
|
|
56535
|
+
}
|
|
56536
|
+
} else if (Array.isArray(data2)) {
|
|
56537
|
+
for (let i2 = 0; i2 < data2.length; i2++) {
|
|
56538
|
+
data2[i2] = _reconstructPacket(data2[i2], buffers);
|
|
56539
|
+
}
|
|
56540
|
+
} else if (typeof data2 === "object") {
|
|
56541
|
+
for (const key in data2) {
|
|
56542
|
+
if (Object.prototype.hasOwnProperty.call(data2, key)) {
|
|
56543
|
+
data2[key] = _reconstructPacket(data2[key], buffers);
|
|
56544
|
+
}
|
|
56539
56545
|
}
|
|
56540
56546
|
}
|
|
56547
|
+
return data2;
|
|
56541
56548
|
}
|
|
56542
|
-
return
|
|
56549
|
+
return binary;
|
|
56543
56550
|
}
|
|
56544
|
-
|
|
56545
|
-
|
|
56546
|
-
|
|
56547
|
-
|
|
56548
|
-
|
|
56549
|
-
|
|
56550
|
-
|
|
56551
|
-
|
|
56552
|
-
|
|
56553
|
-
|
|
56554
|
-
|
|
56555
|
-
|
|
56556
|
-
|
|
56557
|
-
|
|
56558
|
-
|
|
56559
|
-
PacketType2
|
|
56560
|
-
|
|
56561
|
-
|
|
56562
|
-
|
|
56563
|
-
|
|
56564
|
-
|
|
56565
|
-
|
|
56566
|
-
|
|
56567
|
-
|
|
56568
|
-
|
|
56569
|
-
|
|
56570
|
-
|
|
56571
|
-
|
|
56572
|
-
|
|
56573
|
-
|
|
56574
|
-
|
|
56575
|
-
|
|
56576
|
-
|
|
56577
|
-
|
|
56578
|
-
|
|
56579
|
-
|
|
56580
|
-
|
|
56581
|
-
}
|
|
56582
|
-
|
|
56583
|
-
str
|
|
56584
|
-
|
|
56585
|
-
|
|
56586
|
-
|
|
56587
|
-
|
|
56588
|
-
|
|
56589
|
-
|
|
56590
|
-
|
|
56591
|
-
|
|
56592
|
-
|
|
56593
|
-
|
|
56594
|
-
|
|
56595
|
-
|
|
56596
|
-
|
|
56597
|
-
|
|
56598
|
-
|
|
56599
|
-
|
|
56600
|
-
|
|
56601
|
-
|
|
56602
|
-
|
|
56603
|
-
|
|
56604
|
-
|
|
56605
|
-
|
|
56606
|
-
|
|
56607
|
-
|
|
56608
|
-
|
|
56609
|
-
|
|
56610
|
-
|
|
56611
|
-
|
|
56612
|
-
|
|
56613
|
-
|
|
56614
|
-
packet
|
|
56615
|
-
if (
|
|
56616
|
-
this.reconstructor
|
|
56617
|
-
|
|
56551
|
+
var hasRequiredCjs$1;
|
|
56552
|
+
function requireCjs$1() {
|
|
56553
|
+
if (hasRequiredCjs$1)
|
|
56554
|
+
return cjs;
|
|
56555
|
+
hasRequiredCjs$1 = 1;
|
|
56556
|
+
(function(exports3) {
|
|
56557
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
56558
|
+
exports3.Decoder = exports3.Encoder = exports3.PacketType = exports3.protocol = void 0;
|
|
56559
|
+
const component_emitter_12 = require$$5;
|
|
56560
|
+
const binary_js_1 = requireBinary();
|
|
56561
|
+
const is_binary_js_1 = requireIsBinary();
|
|
56562
|
+
const debug_12 = browser.exports;
|
|
56563
|
+
const debug2 = debug_12.default("socket.io-parser");
|
|
56564
|
+
exports3.protocol = 5;
|
|
56565
|
+
var PacketType;
|
|
56566
|
+
(function(PacketType2) {
|
|
56567
|
+
PacketType2[PacketType2["CONNECT"] = 0] = "CONNECT";
|
|
56568
|
+
PacketType2[PacketType2["DISCONNECT"] = 1] = "DISCONNECT";
|
|
56569
|
+
PacketType2[PacketType2["EVENT"] = 2] = "EVENT";
|
|
56570
|
+
PacketType2[PacketType2["ACK"] = 3] = "ACK";
|
|
56571
|
+
PacketType2[PacketType2["CONNECT_ERROR"] = 4] = "CONNECT_ERROR";
|
|
56572
|
+
PacketType2[PacketType2["BINARY_EVENT"] = 5] = "BINARY_EVENT";
|
|
56573
|
+
PacketType2[PacketType2["BINARY_ACK"] = 6] = "BINARY_ACK";
|
|
56574
|
+
})(PacketType = exports3.PacketType || (exports3.PacketType = {}));
|
|
56575
|
+
class Encoder {
|
|
56576
|
+
constructor(replacer) {
|
|
56577
|
+
this.replacer = replacer;
|
|
56578
|
+
}
|
|
56579
|
+
encode(obj) {
|
|
56580
|
+
debug2("encoding packet %j", obj);
|
|
56581
|
+
if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {
|
|
56582
|
+
if (is_binary_js_1.hasBinary(obj)) {
|
|
56583
|
+
obj.type = obj.type === PacketType.EVENT ? PacketType.BINARY_EVENT : PacketType.BINARY_ACK;
|
|
56584
|
+
return this.encodeAsBinary(obj);
|
|
56585
|
+
}
|
|
56586
|
+
}
|
|
56587
|
+
return [this.encodeAsString(obj)];
|
|
56588
|
+
}
|
|
56589
|
+
encodeAsString(obj) {
|
|
56590
|
+
let str = "" + obj.type;
|
|
56591
|
+
if (obj.type === PacketType.BINARY_EVENT || obj.type === PacketType.BINARY_ACK) {
|
|
56592
|
+
str += obj.attachments + "-";
|
|
56593
|
+
}
|
|
56594
|
+
if (obj.nsp && "/" !== obj.nsp) {
|
|
56595
|
+
str += obj.nsp + ",";
|
|
56596
|
+
}
|
|
56597
|
+
if (null != obj.id) {
|
|
56598
|
+
str += obj.id;
|
|
56599
|
+
}
|
|
56600
|
+
if (null != obj.data) {
|
|
56601
|
+
str += JSON.stringify(obj.data, this.replacer);
|
|
56602
|
+
}
|
|
56603
|
+
debug2("encoded %j as %s", obj, str);
|
|
56604
|
+
return str;
|
|
56605
|
+
}
|
|
56606
|
+
encodeAsBinary(obj) {
|
|
56607
|
+
const deconstruction = binary_js_1.deconstructPacket(obj);
|
|
56608
|
+
const pack = this.encodeAsString(deconstruction.packet);
|
|
56609
|
+
const buffers = deconstruction.buffers;
|
|
56610
|
+
buffers.unshift(pack);
|
|
56611
|
+
return buffers;
|
|
56612
|
+
}
|
|
56613
|
+
}
|
|
56614
|
+
exports3.Encoder = Encoder;
|
|
56615
|
+
class Decoder extends component_emitter_12.Emitter {
|
|
56616
|
+
constructor(reviver) {
|
|
56617
|
+
super();
|
|
56618
|
+
this.reviver = reviver;
|
|
56619
|
+
}
|
|
56620
|
+
add(obj) {
|
|
56621
|
+
let packet;
|
|
56622
|
+
if (typeof obj === "string") {
|
|
56623
|
+
if (this.reconstructor) {
|
|
56624
|
+
throw new Error("got plaintext data when reconstructing a packet");
|
|
56625
|
+
}
|
|
56626
|
+
packet = this.decodeString(obj);
|
|
56627
|
+
if (packet.type === PacketType.BINARY_EVENT || packet.type === PacketType.BINARY_ACK) {
|
|
56628
|
+
this.reconstructor = new BinaryReconstructor(packet);
|
|
56629
|
+
if (packet.attachments === 0) {
|
|
56630
|
+
super.emitReserved("decoded", packet);
|
|
56631
|
+
}
|
|
56632
|
+
} else {
|
|
56618
56633
|
super.emitReserved("decoded", packet);
|
|
56619
56634
|
}
|
|
56620
|
-
} else {
|
|
56621
|
-
|
|
56622
|
-
|
|
56623
|
-
|
|
56624
|
-
|
|
56625
|
-
|
|
56626
|
-
|
|
56627
|
-
|
|
56628
|
-
|
|
56629
|
-
this.reconstructor = null;
|
|
56630
|
-
super.emitReserved("decoded", packet);
|
|
56635
|
+
} else if (is_binary_js_1.isBinary(obj) || obj.base64) {
|
|
56636
|
+
if (!this.reconstructor) {
|
|
56637
|
+
throw new Error("got binary data when not reconstructing a packet");
|
|
56638
|
+
} else {
|
|
56639
|
+
packet = this.reconstructor.takeBinaryData(obj);
|
|
56640
|
+
if (packet) {
|
|
56641
|
+
this.reconstructor = null;
|
|
56642
|
+
super.emitReserved("decoded", packet);
|
|
56643
|
+
}
|
|
56631
56644
|
}
|
|
56645
|
+
} else {
|
|
56646
|
+
throw new Error("Unknown type: " + obj);
|
|
56632
56647
|
}
|
|
56633
|
-
} else {
|
|
56634
|
-
throw new Error("Unknown type: " + obj);
|
|
56635
56648
|
}
|
|
56636
|
-
|
|
56637
|
-
|
|
56638
|
-
|
|
56639
|
-
|
|
56640
|
-
|
|
56641
|
-
|
|
56642
|
-
|
|
56643
|
-
throw new Error("unknown packet type " + p2.type);
|
|
56644
|
-
}
|
|
56645
|
-
if (p2.type === PacketType.BINARY_EVENT || p2.type === PacketType.BINARY_ACK) {
|
|
56646
|
-
const start = i2 + 1;
|
|
56647
|
-
while (str.charAt(++i2) !== "-" && i2 != str.length) {
|
|
56649
|
+
decodeString(str) {
|
|
56650
|
+
let i2 = 0;
|
|
56651
|
+
const p2 = {
|
|
56652
|
+
type: Number(str.charAt(0))
|
|
56653
|
+
};
|
|
56654
|
+
if (PacketType[p2.type] === void 0) {
|
|
56655
|
+
throw new Error("unknown packet type " + p2.type);
|
|
56648
56656
|
}
|
|
56649
|
-
|
|
56650
|
-
|
|
56651
|
-
|
|
56657
|
+
if (p2.type === PacketType.BINARY_EVENT || p2.type === PacketType.BINARY_ACK) {
|
|
56658
|
+
const start = i2 + 1;
|
|
56659
|
+
while (str.charAt(++i2) !== "-" && i2 != str.length) {
|
|
56660
|
+
}
|
|
56661
|
+
const buf = str.substring(start, i2);
|
|
56662
|
+
if (buf != Number(buf) || str.charAt(i2) !== "-") {
|
|
56663
|
+
throw new Error("Illegal attachments");
|
|
56664
|
+
}
|
|
56665
|
+
p2.attachments = Number(buf);
|
|
56652
56666
|
}
|
|
56653
|
-
|
|
56654
|
-
|
|
56655
|
-
|
|
56656
|
-
|
|
56657
|
-
|
|
56658
|
-
|
|
56659
|
-
|
|
56660
|
-
|
|
56661
|
-
|
|
56662
|
-
|
|
56667
|
+
if ("/" === str.charAt(i2 + 1)) {
|
|
56668
|
+
const start = i2 + 1;
|
|
56669
|
+
while (++i2) {
|
|
56670
|
+
const c2 = str.charAt(i2);
|
|
56671
|
+
if ("," === c2)
|
|
56672
|
+
break;
|
|
56673
|
+
if (i2 === str.length)
|
|
56674
|
+
break;
|
|
56675
|
+
}
|
|
56676
|
+
p2.nsp = str.substring(start, i2);
|
|
56677
|
+
} else {
|
|
56678
|
+
p2.nsp = "/";
|
|
56679
|
+
}
|
|
56680
|
+
const next = str.charAt(i2 + 1);
|
|
56681
|
+
if ("" !== next && Number(next) == next) {
|
|
56682
|
+
const start = i2 + 1;
|
|
56683
|
+
while (++i2) {
|
|
56684
|
+
const c2 = str.charAt(i2);
|
|
56685
|
+
if (null == c2 || Number(c2) != c2) {
|
|
56686
|
+
--i2;
|
|
56687
|
+
break;
|
|
56688
|
+
}
|
|
56689
|
+
if (i2 === str.length)
|
|
56690
|
+
break;
|
|
56691
|
+
}
|
|
56692
|
+
p2.id = Number(str.substring(start, i2 + 1));
|
|
56663
56693
|
}
|
|
56664
|
-
|
|
56665
|
-
|
|
56666
|
-
|
|
56667
|
-
|
|
56668
|
-
|
|
56669
|
-
|
|
56670
|
-
const start = i2 + 1;
|
|
56671
|
-
while (++i2) {
|
|
56672
|
-
const c2 = str.charAt(i2);
|
|
56673
|
-
if (null == c2 || Number(c2) != c2) {
|
|
56674
|
-
--i2;
|
|
56675
|
-
break;
|
|
56694
|
+
if (str.charAt(++i2)) {
|
|
56695
|
+
const payload = this.tryParse(str.substr(i2));
|
|
56696
|
+
if (Decoder.isPayloadValid(p2.type, payload)) {
|
|
56697
|
+
p2.data = payload;
|
|
56698
|
+
} else {
|
|
56699
|
+
throw new Error("invalid payload");
|
|
56676
56700
|
}
|
|
56677
|
-
if (i2 === str.length)
|
|
56678
|
-
break;
|
|
56679
56701
|
}
|
|
56680
|
-
|
|
56702
|
+
debug2("decoded %s as %j", str, p2);
|
|
56703
|
+
return p2;
|
|
56681
56704
|
}
|
|
56682
|
-
|
|
56683
|
-
|
|
56684
|
-
|
|
56685
|
-
|
|
56686
|
-
|
|
56687
|
-
throw new Error("invalid payload");
|
|
56705
|
+
tryParse(str) {
|
|
56706
|
+
try {
|
|
56707
|
+
return JSON.parse(str, this.reviver);
|
|
56708
|
+
} catch (e2) {
|
|
56709
|
+
return false;
|
|
56688
56710
|
}
|
|
56689
56711
|
}
|
|
56690
|
-
|
|
56691
|
-
|
|
56692
|
-
|
|
56693
|
-
|
|
56694
|
-
|
|
56695
|
-
|
|
56696
|
-
|
|
56697
|
-
|
|
56712
|
+
static isPayloadValid(type, payload) {
|
|
56713
|
+
switch (type) {
|
|
56714
|
+
case PacketType.CONNECT:
|
|
56715
|
+
return typeof payload === "object";
|
|
56716
|
+
case PacketType.DISCONNECT:
|
|
56717
|
+
return payload === void 0;
|
|
56718
|
+
case PacketType.CONNECT_ERROR:
|
|
56719
|
+
return typeof payload === "string" || typeof payload === "object";
|
|
56720
|
+
case PacketType.EVENT:
|
|
56721
|
+
case PacketType.BINARY_EVENT:
|
|
56722
|
+
return Array.isArray(payload) && payload.length > 0;
|
|
56723
|
+
case PacketType.ACK:
|
|
56724
|
+
case PacketType.BINARY_ACK:
|
|
56725
|
+
return Array.isArray(payload);
|
|
56726
|
+
}
|
|
56727
|
+
}
|
|
56728
|
+
destroy() {
|
|
56729
|
+
if (this.reconstructor) {
|
|
56730
|
+
this.reconstructor.finishedReconstruction();
|
|
56731
|
+
}
|
|
56698
56732
|
}
|
|
56699
56733
|
}
|
|
56700
|
-
|
|
56701
|
-
|
|
56702
|
-
|
|
56703
|
-
|
|
56704
|
-
|
|
56705
|
-
|
|
56706
|
-
|
|
56707
|
-
|
|
56708
|
-
|
|
56709
|
-
|
|
56710
|
-
|
|
56711
|
-
|
|
56712
|
-
|
|
56713
|
-
|
|
56714
|
-
|
|
56715
|
-
|
|
56716
|
-
|
|
56717
|
-
|
|
56718
|
-
this.
|
|
56719
|
-
}
|
|
56720
|
-
}
|
|
56721
|
-
}
|
|
56722
|
-
exports3.Decoder = Decoder;
|
|
56723
|
-
class BinaryReconstructor {
|
|
56724
|
-
constructor(packet) {
|
|
56725
|
-
this.packet = packet;
|
|
56726
|
-
this.buffers = [];
|
|
56727
|
-
this.reconPack = packet;
|
|
56728
|
-
}
|
|
56729
|
-
takeBinaryData(binData) {
|
|
56730
|
-
this.buffers.push(binData);
|
|
56731
|
-
if (this.buffers.length === this.reconPack.attachments) {
|
|
56732
|
-
const packet = binary_js_1.reconstructPacket(this.reconPack, this.buffers);
|
|
56733
|
-
this.finishedReconstruction();
|
|
56734
|
-
return packet;
|
|
56734
|
+
exports3.Decoder = Decoder;
|
|
56735
|
+
class BinaryReconstructor {
|
|
56736
|
+
constructor(packet) {
|
|
56737
|
+
this.packet = packet;
|
|
56738
|
+
this.buffers = [];
|
|
56739
|
+
this.reconPack = packet;
|
|
56740
|
+
}
|
|
56741
|
+
takeBinaryData(binData) {
|
|
56742
|
+
this.buffers.push(binData);
|
|
56743
|
+
if (this.buffers.length === this.reconPack.attachments) {
|
|
56744
|
+
const packet = binary_js_1.reconstructPacket(this.reconPack, this.buffers);
|
|
56745
|
+
this.finishedReconstruction();
|
|
56746
|
+
return packet;
|
|
56747
|
+
}
|
|
56748
|
+
return null;
|
|
56749
|
+
}
|
|
56750
|
+
finishedReconstruction() {
|
|
56751
|
+
this.reconPack = null;
|
|
56752
|
+
this.buffers = [];
|
|
56735
56753
|
}
|
|
56736
|
-
return null;
|
|
56737
|
-
}
|
|
56738
|
-
finishedReconstruction() {
|
|
56739
|
-
this.reconPack = null;
|
|
56740
|
-
this.buffers = [];
|
|
56741
56754
|
}
|
|
56742
|
-
}
|
|
56743
|
-
|
|
56755
|
+
})(cjs);
|
|
56756
|
+
return cjs;
|
|
56757
|
+
}
|
|
56744
56758
|
var on$1 = {};
|
|
56745
56759
|
Object.defineProperty(on$1, "__esModule", { value: true });
|
|
56746
56760
|
on$1.on = void 0;
|
|
@@ -56756,7 +56770,7 @@ attempted value: ${formattedValue}
|
|
|
56756
56770
|
};
|
|
56757
56771
|
Object.defineProperty(socket, "__esModule", { value: true });
|
|
56758
56772
|
socket.Socket = void 0;
|
|
56759
|
-
const socket_io_parser_1 =
|
|
56773
|
+
const socket_io_parser_1 = requireCjs$1();
|
|
56760
56774
|
const on_js_1$1 = on$1;
|
|
56761
56775
|
const component_emitter_1$1 = require$$5;
|
|
56762
56776
|
const debug_1$1 = __importDefault$5(browser.exports);
|
|
@@ -57170,7 +57184,7 @@ attempted value: ${formattedValue}
|
|
|
57170
57184
|
manager.Manager = void 0;
|
|
57171
57185
|
const engine_io_client_1 = cjs$2;
|
|
57172
57186
|
const socket_js_1 = socket;
|
|
57173
|
-
const parser = __importStar$2(
|
|
57187
|
+
const parser = __importStar$2(requireCjs$1());
|
|
57174
57188
|
const on_js_1 = on$1;
|
|
57175
57189
|
const backo2_js_1 = backo2;
|
|
57176
57190
|
const component_emitter_1 = require$$5;
|
|
@@ -57485,7 +57499,7 @@ attempted value: ${formattedValue}
|
|
|
57485
57499
|
io: lookup2,
|
|
57486
57500
|
connect: lookup2
|
|
57487
57501
|
});
|
|
57488
|
-
var socket_io_parser_12 =
|
|
57502
|
+
var socket_io_parser_12 = requireCjs$1();
|
|
57489
57503
|
Object.defineProperty(exports3, "protocol", { enumerable: true, get: function() {
|
|
57490
57504
|
return socket_io_parser_12.protocol;
|
|
57491
57505
|
} });
|
|
@@ -68196,6 +68210,15 @@ attempted value: ${formattedValue}
|
|
|
68196
68210
|
...config
|
|
68197
68211
|
}));
|
|
68198
68212
|
});
|
|
68213
|
+
window.sawportSDK = {
|
|
68214
|
+
Widget: Widget$1,
|
|
68215
|
+
SawportContext,
|
|
68216
|
+
setSawportConfig,
|
|
68217
|
+
sawportConfig,
|
|
68218
|
+
useSawportConfig,
|
|
68219
|
+
useSawportContext,
|
|
68220
|
+
mountWidget
|
|
68221
|
+
};
|
|
68199
68222
|
exports2.SawportContext = SawportContext;
|
|
68200
68223
|
exports2.Widget = Widget$1;
|
|
68201
68224
|
exports2.mountWidget = mountWidget;
|