vis-util 6.0.2 → 6.0.3
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/esnext/esm/vis-util.js +2 -2
- package/esnext/esm/vis-util.min.js +2 -2
- package/esnext/esm/vis-util.min.mjs +2 -2
- package/esnext/esm/vis-util.mjs +2 -2
- package/esnext/umd/vis-util.cjs +2 -2
- package/esnext/umd/vis-util.js +2 -2
- package/esnext/umd/vis-util.min.cjs +2 -2
- package/esnext/umd/vis-util.min.js +2 -2
- package/package.json +10 -10
- package/peer/esm/vis-util.js +233 -60
- package/peer/esm/vis-util.js.map +1 -1
- package/peer/esm/vis-util.min.js +4 -4
- package/peer/esm/vis-util.min.js.map +1 -1
- package/peer/esm/vis-util.min.mjs +4 -4
- package/peer/esm/vis-util.min.mjs.map +1 -1
- package/peer/esm/vis-util.mjs +233 -60
- package/peer/esm/vis-util.mjs.map +1 -1
- package/peer/umd/vis-util.cjs +233 -60
- package/peer/umd/vis-util.cjs.map +1 -1
- package/peer/umd/vis-util.js +233 -60
- package/peer/umd/vis-util.js.map +1 -1
- package/peer/umd/vis-util.min.cjs +4 -4
- package/peer/umd/vis-util.min.cjs.map +1 -1
- package/peer/umd/vis-util.min.js +4 -4
- package/peer/umd/vis-util.min.js.map +1 -1
- package/standalone/esm/vis-util.js +233 -60
- package/standalone/esm/vis-util.js.map +1 -1
- package/standalone/esm/vis-util.min.js +4 -4
- package/standalone/esm/vis-util.min.js.map +1 -1
- package/standalone/esm/vis-util.min.mjs +4 -4
- package/standalone/esm/vis-util.min.mjs.map +1 -1
- package/standalone/esm/vis-util.mjs +233 -60
- package/standalone/esm/vis-util.mjs.map +1 -1
- package/standalone/umd/vis-util.cjs +233 -60
- package/standalone/umd/vis-util.cjs.map +1 -1
- package/standalone/umd/vis-util.js +233 -60
- package/standalone/umd/vis-util.js.map +1 -1
- package/standalone/umd/vis-util.min.cjs +4 -4
- package/standalone/umd/vis-util.min.cjs.map +1 -1
- package/standalone/umd/vis-util.min.js +4 -4
- package/standalone/umd/vis-util.min.js.map +1 -1
package/esnext/esm/vis-util.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* utilitie collection for visjs
|
|
6
6
|
*
|
|
7
|
-
* @version 6.0.
|
|
8
|
-
* @date 2026-
|
|
7
|
+
* @version 6.0.3
|
|
8
|
+
* @date 2026-10-25T07:23:27.729Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* utilitie collection for visjs
|
|
6
6
|
*
|
|
7
|
-
* @version 6.0.
|
|
8
|
-
* @date 2026-
|
|
7
|
+
* @version 6.0.3
|
|
8
|
+
* @date 2026-10-25T07:23:27.729Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* utilitie collection for visjs
|
|
6
6
|
*
|
|
7
|
-
* @version 6.0.
|
|
8
|
-
* @date 2026-
|
|
7
|
+
* @version 6.0.3
|
|
8
|
+
* @date 2026-10-25T07:23:27.729Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
package/esnext/esm/vis-util.mjs
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* utilitie collection for visjs
|
|
6
6
|
*
|
|
7
|
-
* @version 6.0.
|
|
8
|
-
* @date 2026-
|
|
7
|
+
* @version 6.0.3
|
|
8
|
+
* @date 2026-10-25T07:23:27.729Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
package/esnext/umd/vis-util.cjs
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* utilitie collection for visjs
|
|
6
6
|
*
|
|
7
|
-
* @version 6.0.
|
|
8
|
-
* @date 2026-
|
|
7
|
+
* @version 6.0.3
|
|
8
|
+
* @date 2026-10-25T07:23:27.729Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
package/esnext/umd/vis-util.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* utilitie collection for visjs
|
|
6
6
|
*
|
|
7
|
-
* @version 6.0.
|
|
8
|
-
* @date 2026-
|
|
7
|
+
* @version 6.0.3
|
|
8
|
+
* @date 2026-10-25T07:23:27.729Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* utilitie collection for visjs
|
|
6
6
|
*
|
|
7
|
-
* @version 6.0.
|
|
8
|
-
* @date 2026-
|
|
7
|
+
* @version 6.0.3
|
|
8
|
+
* @date 2026-10-25T07:23:27.729Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* utilitie collection for visjs
|
|
6
6
|
*
|
|
7
|
-
* @version 6.0.
|
|
8
|
-
* @date 2026-
|
|
7
|
+
* @version 6.0.3
|
|
8
|
+
* @date 2026-10-25T07:23:27.729Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vis-util",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "utilitie collection for visjs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"util",
|
|
@@ -215,26 +215,26 @@
|
|
|
215
215
|
"@types/chai": "5.2.3",
|
|
216
216
|
"@types/jsdom-global": "3.0.7",
|
|
217
217
|
"@types/mocha": "10.0.10",
|
|
218
|
-
"@types/node": "24.
|
|
218
|
+
"@types/node": "24.19.2",
|
|
219
219
|
"@types/sinon": "22.0.0",
|
|
220
220
|
"component-emitter": "2.0.0",
|
|
221
221
|
"cross-env": "10.1.0",
|
|
222
222
|
"git-authors-cli": "1.0.54",
|
|
223
223
|
"husky": "9.1.7",
|
|
224
|
-
"jsdom": "30.
|
|
224
|
+
"jsdom": "30.1.3",
|
|
225
225
|
"jsdom-global": "3.0.2",
|
|
226
|
-
"lint-staged": "17.
|
|
227
|
-
"mocha": "
|
|
226
|
+
"lint-staged": "17.6.0",
|
|
227
|
+
"mocha": "12.0.3",
|
|
228
228
|
"nyc": "18.0.0",
|
|
229
|
-
"oxfmt": "0.
|
|
230
|
-
"oxlint": "1.
|
|
231
|
-
"oxlint-tsgolint": "7.0.
|
|
232
|
-
"semantic-release": "25.0.
|
|
229
|
+
"oxfmt": "0.74.0",
|
|
230
|
+
"oxlint": "1.78.0",
|
|
231
|
+
"oxlint-tsgolint": "7.0.2004",
|
|
232
|
+
"semantic-release": "25.0.9",
|
|
233
233
|
"shx": "0.4.0",
|
|
234
234
|
"sinon": "22.1.0",
|
|
235
235
|
"snap-shot-it": "7.9.10",
|
|
236
236
|
"typedoc": "0.28.20",
|
|
237
|
-
"vis-dev-utils": "7.1.
|
|
237
|
+
"vis-dev-utils": "7.1.9"
|
|
238
238
|
},
|
|
239
239
|
"peerDependencies": {
|
|
240
240
|
"@egjs/hammerjs": "^2.0.0",
|
package/peer/esm/vis-util.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* utilitie collection for visjs
|
|
6
6
|
*
|
|
7
|
-
* @version 6.0.
|
|
8
|
-
* @date 2026-
|
|
7
|
+
* @version 6.0.3
|
|
8
|
+
* @date 2026-10-25T07:23:27.729Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
@@ -628,10 +628,10 @@ function requireSharedStore () {
|
|
|
628
628
|
var store = sharedStore.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
|
|
629
629
|
|
|
630
630
|
(store.versions || (store.versions = [])).push({
|
|
631
|
-
version: '3.
|
|
631
|
+
version: '3.50.0',
|
|
632
632
|
mode: IS_PURE ? 'pure' : 'global',
|
|
633
633
|
copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
|
|
634
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
634
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE',
|
|
635
635
|
source: 'https://github.com/zloirock/core-js'
|
|
636
636
|
});
|
|
637
637
|
return sharedStore.exports;
|
|
@@ -644,9 +644,11 @@ function requireShared () {
|
|
|
644
644
|
if (hasRequiredShared) return shared;
|
|
645
645
|
hasRequiredShared = 1;
|
|
646
646
|
var store = /*@__PURE__*/ requireSharedStore();
|
|
647
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
648
|
+
var create = Object.create || Object;
|
|
647
649
|
|
|
648
650
|
shared = function (key, value) {
|
|
649
|
-
return store[key] || (store[key] = value ||
|
|
651
|
+
return store[key] || (store[key] = value || create(null));
|
|
650
652
|
};
|
|
651
653
|
return shared;
|
|
652
654
|
}
|
|
@@ -2630,6 +2632,20 @@ function requireIsRawJson () {
|
|
|
2630
2632
|
return isRawJson;
|
|
2631
2633
|
}
|
|
2632
2634
|
|
|
2635
|
+
var thisNumberValue;
|
|
2636
|
+
var hasRequiredThisNumberValue;
|
|
2637
|
+
|
|
2638
|
+
function requireThisNumberValue () {
|
|
2639
|
+
if (hasRequiredThisNumberValue) return thisNumberValue;
|
|
2640
|
+
hasRequiredThisNumberValue = 1;
|
|
2641
|
+
var uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();
|
|
2642
|
+
|
|
2643
|
+
// `thisNumberValue` abstract operation
|
|
2644
|
+
// https://tc39.es/ecma262/#sec-thisnumbervalue
|
|
2645
|
+
thisNumberValue = uncurryThis(1.1.valueOf);
|
|
2646
|
+
return thisNumberValue;
|
|
2647
|
+
}
|
|
2648
|
+
|
|
2633
2649
|
var parseJsonString;
|
|
2634
2650
|
var hasRequiredParseJsonString;
|
|
2635
2651
|
|
|
@@ -2720,38 +2736,54 @@ function requireEs_json_stringify () {
|
|
|
2720
2736
|
hasRequiredEs_json_stringify = 1;
|
|
2721
2737
|
var $ = /*@__PURE__*/ require_export();
|
|
2722
2738
|
var getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();
|
|
2723
|
-
var apply = /*@__PURE__*/ requireFunctionApply();
|
|
2724
2739
|
var call = /*@__PURE__*/ requireFunctionCall();
|
|
2725
2740
|
var uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();
|
|
2726
2741
|
var fails = /*@__PURE__*/ requireFails();
|
|
2727
2742
|
var isArray = /*@__PURE__*/ requireIsArray$6();
|
|
2728
2743
|
var isCallable = /*@__PURE__*/ requireIsCallable();
|
|
2744
|
+
var isObject = /*@__PURE__*/ requireIsObject();
|
|
2745
|
+
var create = /*@__PURE__*/ requireObjectCreate();
|
|
2729
2746
|
var isRawJSON = /*@__PURE__*/ requireIsRawJson();
|
|
2730
2747
|
var isSymbol = /*@__PURE__*/ requireIsSymbol();
|
|
2731
2748
|
var classof = /*@__PURE__*/ requireClassofRaw();
|
|
2749
|
+
var thisNumberValue = /*@__PURE__*/ requireThisNumberValue();
|
|
2750
|
+
var includes = /*@__PURE__*/ requireArrayIncludes().includes;
|
|
2751
|
+
var hasOwn = /*@__PURE__*/ requireHasOwnProperty();
|
|
2732
2752
|
var toString = /*@__PURE__*/ requireToString();
|
|
2733
|
-
var arraySlice = /*@__PURE__*/ requireArraySlice();
|
|
2734
2753
|
var parseJSONString = /*@__PURE__*/ requireParseJsonString();
|
|
2735
2754
|
var uid = /*@__PURE__*/ requireUid();
|
|
2736
2755
|
var NATIVE_SYMBOL = /*@__PURE__*/ requireSymbolConstructorDetection();
|
|
2737
2756
|
var NATIVE_RAW_JSON = /*@__PURE__*/ requireNativeRawJson();
|
|
2738
2757
|
|
|
2739
2758
|
var $String = String;
|
|
2759
|
+
var $TypeError = TypeError;
|
|
2740
2760
|
var $stringify = getBuiltIn('JSON', 'stringify');
|
|
2761
|
+
var $BigInt = getBuiltIn('BigInt');
|
|
2762
|
+
var stringValueOf = uncurryThis(''.valueOf);
|
|
2763
|
+
var booleanValueOf = uncurryThis(true.valueOf);
|
|
2764
|
+
var bigIntValueOf = $BigInt && uncurryThis($BigInt.prototype.valueOf);
|
|
2741
2765
|
var exec = uncurryThis(/./.exec);
|
|
2742
2766
|
var charAt = uncurryThis(''.charAt);
|
|
2743
2767
|
var charCodeAt = uncurryThis(''.charCodeAt);
|
|
2744
2768
|
var replace = uncurryThis(''.replace);
|
|
2745
2769
|
var slice = uncurryThis(''.slice);
|
|
2746
2770
|
var push = uncurryThis([].push);
|
|
2771
|
+
var pop = uncurryThis([].pop);
|
|
2747
2772
|
var numberToString = uncurryThis(1.1.toString);
|
|
2748
2773
|
|
|
2749
2774
|
var surrogates = /[\uD800-\uDFFF]/g;
|
|
2750
2775
|
var leadingSurrogates = /^[\uD800-\uDBFF]$/;
|
|
2751
2776
|
var trailingSurrogates = /^[\uDC00-\uDFFF]$/;
|
|
2777
|
+
var digits = /^\d+$/;
|
|
2752
2778
|
|
|
2753
|
-
|
|
2754
|
-
var
|
|
2779
|
+
// a placeholder of a raw JSON value
|
|
2780
|
+
var RAW_MARK = uid();
|
|
2781
|
+
// a prefix of keys of a reordered object, see `createOrderedObject`
|
|
2782
|
+
var KEY_MARK = uid();
|
|
2783
|
+
// the last key of a reordered object, marks the end of its serialization
|
|
2784
|
+
var END_MARK = uid();
|
|
2785
|
+
var RAW_MARK_LENGTH = RAW_MARK.length;
|
|
2786
|
+
var KEY_MARK_LENGTH = KEY_MARK.length;
|
|
2755
2787
|
|
|
2756
2788
|
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {
|
|
2757
2789
|
var symbol = getBuiltIn('Symbol')('stringify detection');
|
|
@@ -2769,16 +2801,13 @@ function requireEs_json_stringify () {
|
|
|
2769
2801
|
|| $stringify('\uDEAD') !== '"\\udead"';
|
|
2770
2802
|
});
|
|
2771
2803
|
|
|
2772
|
-
var
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
if (!isSymbol(value)) return value;
|
|
2780
|
-
};
|
|
2781
|
-
return apply($stringify, null, args);
|
|
2804
|
+
var isRawJSONValue = NATIVE_RAW_JSON ? getBuiltIn('JSON', 'isRawJSON') : isRawJSON;
|
|
2805
|
+
|
|
2806
|
+
var stringifyWithProperSymbolsConversion = WRONG_SYMBOLS_CONVERSION ? function (it, replacer, space) {
|
|
2807
|
+
return $stringify(it, function (key, value) {
|
|
2808
|
+
var replaced = call(replacer, this, key, value);
|
|
2809
|
+
if (!isSymbol(replaced)) return replaced;
|
|
2810
|
+
}, space);
|
|
2782
2811
|
} : $stringify;
|
|
2783
2812
|
|
|
2784
2813
|
var fixIllFormedJSON = function (match, offset, string) {
|
|
@@ -2792,47 +2821,150 @@ function requireEs_json_stringify () {
|
|
|
2792
2821
|
} return match;
|
|
2793
2822
|
};
|
|
2794
2823
|
|
|
2795
|
-
|
|
2796
|
-
|
|
2824
|
+
// `PropertyList` of `JSON.stringify`
|
|
2825
|
+
// https://tc39.es/ecma262/#sec-json.stringify
|
|
2826
|
+
var getPropertyList = function (replacer) {
|
|
2797
2827
|
if (!isArray(replacer)) return;
|
|
2798
2828
|
var rawLength = replacer.length;
|
|
2799
|
-
var
|
|
2829
|
+
var propertyList = [];
|
|
2830
|
+
// a null prototype object is used as a set of already added keys to keep the deduplication linear
|
|
2831
|
+
var addedKeys = create(null);
|
|
2800
2832
|
for (var i = 0; i < rawLength; i++) {
|
|
2801
2833
|
var element = replacer[i];
|
|
2802
|
-
|
|
2803
|
-
|
|
2834
|
+
var key;
|
|
2835
|
+
if (typeof element == 'string') key = element;
|
|
2836
|
+
else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') key = toString(element);
|
|
2837
|
+
else continue;
|
|
2838
|
+
if (!hasOwn(addedKeys, key)) {
|
|
2839
|
+
addedKeys[key] = true;
|
|
2840
|
+
push(propertyList, key);
|
|
2841
|
+
}
|
|
2804
2842
|
}
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2843
|
+
return propertyList;
|
|
2844
|
+
};
|
|
2845
|
+
|
|
2846
|
+
// values with such an internal slot are unwrapped by `SerializeJSONProperty` instead of being serialized as objects
|
|
2847
|
+
var hasInternalSlot = function (valueOf, it) {
|
|
2848
|
+
try {
|
|
2849
|
+
valueOf(it);
|
|
2850
|
+
return true;
|
|
2851
|
+
} catch (error) {
|
|
2852
|
+
return false;
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
|
|
2856
|
+
// the slot check is expensive, so it's performed only for the kind reported by the value itself -
|
|
2857
|
+
// a value lying about its kind via `Symbol.toStringTag` is serialized as an ordinary object
|
|
2858
|
+
var isBoxedPrimitive = function (it) {
|
|
2859
|
+
var kind = classof(it);
|
|
2860
|
+
return (kind === 'Number' && hasInternalSlot(thisNumberValue, it))
|
|
2861
|
+
|| (kind === 'String' && hasInternalSlot(stringValueOf, it))
|
|
2862
|
+
|| (kind === 'Boolean' && hasInternalSlot(booleanValueOf, it))
|
|
2863
|
+
|| (!!bigIntValueOf && kind === 'BigInt' && hasInternalSlot(bigIntValueOf, it));
|
|
2864
|
+
};
|
|
2865
|
+
|
|
2866
|
+
// only objects serialized by `SerializeJSONObject` are affected by the property list
|
|
2867
|
+
var isSerializedAsObject = function (it) {
|
|
2868
|
+
if (!isObject(it) || isCallable(it) || isArray(it)) return false;
|
|
2869
|
+
try {
|
|
2870
|
+
return !isBoxedPrimitive(it);
|
|
2871
|
+
// `classof` reads `Symbol.toStringTag`, so a proxy could throw - it has no internal slots anyway
|
|
2872
|
+
} catch (error) {
|
|
2873
|
+
return true;
|
|
2874
|
+
}
|
|
2875
|
+
};
|
|
2876
|
+
|
|
2877
|
+
// the engine unwraps it in the same order as it would read the original property,
|
|
2878
|
+
// so the property is read lazily and `toJSON` is called once and with the original key
|
|
2879
|
+
var createElementHolder = function (holder, key) {
|
|
2880
|
+
return {
|
|
2881
|
+
toJSON: function () {
|
|
2882
|
+
var element = holder[key];
|
|
2883
|
+
if (isObject(element) || typeof element == 'bigint') {
|
|
2884
|
+
var elementToJSON = element.toJSON;
|
|
2885
|
+
if (isCallable(elementToJSON)) element = call(elementToJSON, element, key);
|
|
2886
|
+
} return element;
|
|
2811
2887
|
}
|
|
2812
|
-
if (isArray(this)) return value;
|
|
2813
|
-
for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
|
|
2814
2888
|
};
|
|
2815
2889
|
};
|
|
2816
2890
|
|
|
2891
|
+
// own keys of objects are sorted - integer-like keys are moved to the beginning,
|
|
2892
|
+
// so such keys should be marked and restored in the serialized string
|
|
2893
|
+
var getKeyPrefix = function (propertyList) {
|
|
2894
|
+
for (var i = 0, length = propertyList.length; i < length; i++) {
|
|
2895
|
+
if (exec(digits, propertyList[i])) return KEY_MARK;
|
|
2896
|
+
} return '';
|
|
2897
|
+
};
|
|
2898
|
+
|
|
2899
|
+
// `SerializeJSONObject` iterates the property list, so the value is replaced with an object with keys in this order
|
|
2900
|
+
var createOrderedObject = function (value, propertyList, keyPrefix) {
|
|
2901
|
+
// keys are not marked if the property list has no integer-like keys, so `Object.prototype`
|
|
2902
|
+
// with a setter, a non-writable property or `__proto__` should not intercept the assignment
|
|
2903
|
+
var ordered = create(null);
|
|
2904
|
+
for (var i = 0, length = propertyList.length; i < length; i++) {
|
|
2905
|
+
var key = propertyList[i];
|
|
2906
|
+
ordered[keyPrefix + key] = createElementHolder(value, key);
|
|
2907
|
+
}
|
|
2908
|
+
ordered[END_MARK] = null;
|
|
2909
|
+
return ordered;
|
|
2910
|
+
};
|
|
2911
|
+
|
|
2817
2912
|
// `JSON.stringify` method
|
|
2818
2913
|
// https://tc39.es/ecma262/#sec-json.stringify
|
|
2819
2914
|
// https://github.com/tc39/proposal-json-parse-with-source
|
|
2820
2915
|
if ($stringify) $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE || !NATIVE_RAW_JSON }, {
|
|
2821
2916
|
stringify: function stringify(text, replacer, space) {
|
|
2822
|
-
var replacerFunction =
|
|
2917
|
+
var replacerFunction = isCallable(replacer) ? replacer : undefined;
|
|
2918
|
+
var propertyList = replacerFunction ? undefined : getPropertyList(replacer);
|
|
2919
|
+
var keyPrefix = propertyList && getKeyPrefix(propertyList);
|
|
2823
2920
|
var rawStrings = [];
|
|
2921
|
+
var openObjects = [];
|
|
2922
|
+
var parentOrdered = [];
|
|
2923
|
+
var currentOrdered;
|
|
2924
|
+
var marked = false;
|
|
2925
|
+
var root = true;
|
|
2824
2926
|
|
|
2825
2927
|
var json = stringifyWithProperSymbolsConversion(text, function (key, value) {
|
|
2826
2928
|
// some old implementations (like WebKit) could pass numbers as keys
|
|
2827
|
-
|
|
2828
|
-
|
|
2929
|
+
key = $String(key);
|
|
2930
|
+
|
|
2931
|
+
if (propertyList) {
|
|
2932
|
+
if (key === END_MARK) {
|
|
2933
|
+
pop(openObjects);
|
|
2934
|
+
currentOrdered = pop(parentOrdered);
|
|
2935
|
+
return;
|
|
2936
|
+
}
|
|
2937
|
+
if (root) root = false;
|
|
2938
|
+
// the innermost reordered object already contains only keys of the property list and arrays are not
|
|
2939
|
+
// affected by it, the rest of objects (like objects with a fake `Symbol.toStringTag`) are filtered here
|
|
2940
|
+
else if (this !== currentOrdered && !isArray(this) && !includes(propertyList, key)) return;
|
|
2941
|
+
} else if (replacerFunction) value = call(replacerFunction, this, key, value);
|
|
2942
|
+
|
|
2943
|
+
if (isRawJSONValue(value)) {
|
|
2944
|
+
if (NATIVE_RAW_JSON) return value;
|
|
2945
|
+
marked = true;
|
|
2946
|
+
return RAW_MARK + (push(rawStrings, value.rawJSON) - 1);
|
|
2947
|
+
}
|
|
2948
|
+
|
|
2949
|
+
if (propertyList && isSerializedAsObject(value)) {
|
|
2950
|
+
// reordered objects are new each time, so cycles should be detected before the engine does it
|
|
2951
|
+
if (includes(openObjects, value)) throw new $TypeError('Converting circular structure to JSON');
|
|
2952
|
+
var ordered = createOrderedObject(value, propertyList, keyPrefix);
|
|
2953
|
+
push(openObjects, value);
|
|
2954
|
+
push(parentOrdered, currentOrdered);
|
|
2955
|
+
currentOrdered = ordered;
|
|
2956
|
+
if (keyPrefix) marked = true;
|
|
2957
|
+
return ordered;
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
return value;
|
|
2829
2961
|
}, space);
|
|
2830
2962
|
|
|
2831
2963
|
if (typeof json != 'string') return json;
|
|
2832
2964
|
|
|
2833
2965
|
if (ILL_FORMED_UNICODE) json = replace(json, surrogates, fixIllFormedJSON);
|
|
2834
2966
|
|
|
2835
|
-
if (
|
|
2967
|
+
if (!marked) return json;
|
|
2836
2968
|
|
|
2837
2969
|
var result = '';
|
|
2838
2970
|
var length = json.length;
|
|
@@ -2842,9 +2974,9 @@ function requireEs_json_stringify () {
|
|
|
2842
2974
|
if (chr === '"') {
|
|
2843
2975
|
var end = parseJSONString(json, ++i).end - 1;
|
|
2844
2976
|
var string = slice(json, i, end);
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2977
|
+
if (slice(string, 0, RAW_MARK_LENGTH) === RAW_MARK) result += rawStrings[slice(string, RAW_MARK_LENGTH)];
|
|
2978
|
+
else if (slice(string, 0, KEY_MARK_LENGTH) === KEY_MARK) result += '"' + slice(string, KEY_MARK_LENGTH) + '"';
|
|
2979
|
+
else result += '"' + string + '"';
|
|
2848
2980
|
i = end;
|
|
2849
2981
|
} else result += chr;
|
|
2850
2982
|
}
|
|
@@ -3197,7 +3329,7 @@ var hasRequiredIterators;
|
|
|
3197
3329
|
function requireIterators () {
|
|
3198
3330
|
if (hasRequiredIterators) return iterators;
|
|
3199
3331
|
hasRequiredIterators = 1;
|
|
3200
|
-
iterators = {};
|
|
3332
|
+
iterators = Object.create ? Object.create(null) : {};
|
|
3201
3333
|
return iterators;
|
|
3202
3334
|
}
|
|
3203
3335
|
|
|
@@ -4700,24 +4832,37 @@ function requireEs_string_iterator () {
|
|
|
4700
4832
|
return es_string_iterator;
|
|
4701
4833
|
}
|
|
4702
4834
|
|
|
4835
|
+
var getInternalIterator;
|
|
4836
|
+
var hasRequiredGetInternalIterator;
|
|
4837
|
+
|
|
4838
|
+
function requireGetInternalIterator () {
|
|
4839
|
+
if (hasRequiredGetInternalIterator) return getInternalIterator;
|
|
4840
|
+
hasRequiredGetInternalIterator = 1;
|
|
4841
|
+
var classof = /*@__PURE__*/ requireClassof();
|
|
4842
|
+
var hasOwn = /*@__PURE__*/ requireHasOwnProperty();
|
|
4843
|
+
var Iterators = /*@__PURE__*/ requireIterators();
|
|
4844
|
+
|
|
4845
|
+
getInternalIterator = function (it) {
|
|
4846
|
+
var klass = classof(it);
|
|
4847
|
+
if (klass === 'Arguments') klass = 'Array';
|
|
4848
|
+
return hasOwn(Iterators, klass) ? Iterators[klass] : undefined;
|
|
4849
|
+
};
|
|
4850
|
+
return getInternalIterator;
|
|
4851
|
+
}
|
|
4852
|
+
|
|
4703
4853
|
var getIteratorMethod$4;
|
|
4704
4854
|
var hasRequiredGetIteratorMethod$5;
|
|
4705
4855
|
|
|
4706
4856
|
function requireGetIteratorMethod$5 () {
|
|
4707
4857
|
if (hasRequiredGetIteratorMethod$5) return getIteratorMethod$4;
|
|
4708
4858
|
hasRequiredGetIteratorMethod$5 = 1;
|
|
4709
|
-
var
|
|
4710
|
-
var getMethod = /*@__PURE__*/ requireGetMethod();
|
|
4711
|
-
var isNullOrUndefined = /*@__PURE__*/ requireIsNullOrUndefined();
|
|
4712
|
-
var Iterators = /*@__PURE__*/ requireIterators();
|
|
4859
|
+
var getInternalIterator = /*@__PURE__*/ requireGetInternalIterator();
|
|
4713
4860
|
var wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();
|
|
4714
4861
|
|
|
4715
4862
|
var ITERATOR = wellKnownSymbol('iterator');
|
|
4716
4863
|
|
|
4717
4864
|
getIteratorMethod$4 = function (it) {
|
|
4718
|
-
|
|
4719
|
-
|| getMethod(it, '@@iterator')
|
|
4720
|
-
|| Iterators[classof(it)];
|
|
4865
|
+
return it[ITERATOR] || it['@@iterator'] || getInternalIterator(it);
|
|
4721
4866
|
};
|
|
4722
4867
|
return getIteratorMethod$4;
|
|
4723
4868
|
}
|
|
@@ -5055,26 +5200,47 @@ function requireIsArrayIteratorMethod () {
|
|
|
5055
5200
|
return isArrayIteratorMethod;
|
|
5056
5201
|
}
|
|
5057
5202
|
|
|
5058
|
-
var
|
|
5059
|
-
var
|
|
5203
|
+
var getIteratorMethodInternal;
|
|
5204
|
+
var hasRequiredGetIteratorMethodInternal;
|
|
5060
5205
|
|
|
5061
|
-
function
|
|
5062
|
-
if (
|
|
5063
|
-
|
|
5206
|
+
function requireGetIteratorMethodInternal () {
|
|
5207
|
+
if (hasRequiredGetIteratorMethodInternal) return getIteratorMethodInternal;
|
|
5208
|
+
hasRequiredGetIteratorMethodInternal = 1;
|
|
5209
|
+
var getMethod = /*@__PURE__*/ requireGetMethod();
|
|
5210
|
+
var isNullOrUndefined = /*@__PURE__*/ requireIsNullOrUndefined();
|
|
5211
|
+
var getInternalIterator = /*@__PURE__*/ requireGetInternalIterator();
|
|
5212
|
+
var wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();
|
|
5213
|
+
|
|
5214
|
+
var ITERATOR = wellKnownSymbol('iterator');
|
|
5215
|
+
|
|
5216
|
+
getIteratorMethodInternal = function (it) {
|
|
5217
|
+
if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)
|
|
5218
|
+
|| getMethod(it, '@@iterator')
|
|
5219
|
+
|| getInternalIterator(it);
|
|
5220
|
+
};
|
|
5221
|
+
return getIteratorMethodInternal;
|
|
5222
|
+
}
|
|
5223
|
+
|
|
5224
|
+
var getIteratorInternal;
|
|
5225
|
+
var hasRequiredGetIteratorInternal;
|
|
5226
|
+
|
|
5227
|
+
function requireGetIteratorInternal () {
|
|
5228
|
+
if (hasRequiredGetIteratorInternal) return getIteratorInternal;
|
|
5229
|
+
hasRequiredGetIteratorInternal = 1;
|
|
5064
5230
|
var call = /*@__PURE__*/ requireFunctionCall();
|
|
5065
|
-
var
|
|
5231
|
+
var isCallable = /*@__PURE__*/ requireIsCallable();
|
|
5066
5232
|
var anObject = /*@__PURE__*/ requireAnObject();
|
|
5067
5233
|
var tryToString = /*@__PURE__*/ requireTryToString();
|
|
5068
|
-
var getIteratorMethod = /*@__PURE__*/
|
|
5234
|
+
var getIteratorMethod = /*@__PURE__*/ requireGetIteratorMethodInternal();
|
|
5069
5235
|
|
|
5070
5236
|
var $TypeError = TypeError;
|
|
5071
5237
|
|
|
5072
|
-
|
|
5238
|
+
getIteratorInternal = function (argument, usingIterator) {
|
|
5073
5239
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
|
5074
|
-
if (
|
|
5240
|
+
if (isCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
|
|
5075
5241
|
throw new $TypeError(tryToString(argument) + ' is not iterable');
|
|
5076
5242
|
};
|
|
5077
|
-
return
|
|
5243
|
+
return getIteratorInternal;
|
|
5078
5244
|
}
|
|
5079
5245
|
|
|
5080
5246
|
var arrayFrom;
|
|
@@ -5092,9 +5258,10 @@ function requireArrayFrom () {
|
|
|
5092
5258
|
var lengthOfArrayLike = /*@__PURE__*/ requireLengthOfArrayLike();
|
|
5093
5259
|
var createProperty = /*@__PURE__*/ requireCreateProperty();
|
|
5094
5260
|
var setArrayLength = /*@__PURE__*/ requireArraySetLength();
|
|
5095
|
-
var getIterator = /*@__PURE__*/
|
|
5096
|
-
var getIteratorMethod = /*@__PURE__*/
|
|
5261
|
+
var getIterator = /*@__PURE__*/ requireGetIteratorInternal();
|
|
5262
|
+
var getIteratorMethod = /*@__PURE__*/ requireGetIteratorMethodInternal();
|
|
5097
5263
|
var iteratorClose = /*@__PURE__*/ requireIteratorClose();
|
|
5264
|
+
var doesNotExceedSafeInteger = /*@__PURE__*/ requireDoesNotExceedSafeInteger();
|
|
5098
5265
|
|
|
5099
5266
|
var $Array = Array;
|
|
5100
5267
|
|
|
@@ -5116,6 +5283,11 @@ function requireArrayFrom () {
|
|
|
5116
5283
|
iterator = getIterator(O, iteratorMethod);
|
|
5117
5284
|
next = iterator.next;
|
|
5118
5285
|
for (;!(step = call(next, iterator)).done; index++) {
|
|
5286
|
+
try {
|
|
5287
|
+
doesNotExceedSafeInteger(index);
|
|
5288
|
+
} catch (error) {
|
|
5289
|
+
iteratorClose(iterator, 'throw', error);
|
|
5290
|
+
}
|
|
5119
5291
|
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
|
|
5120
5292
|
try {
|
|
5121
5293
|
createProperty(result, index, value);
|
|
@@ -9617,7 +9789,8 @@ function requireArrayFill () {
|
|
|
9617
9789
|
|
|
9618
9790
|
// `Array.prototype.fill` method implementation
|
|
9619
9791
|
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
9620
|
-
|
|
9792
|
+
// eslint-disable-next-line es/no-array-prototype-fill -- fallback included
|
|
9793
|
+
arrayFill = [].fill || function fill(value /* , start = 0, end = @length */) {
|
|
9621
9794
|
var O = toObject(this);
|
|
9622
9795
|
var length = lengthOfArrayLike(O);
|
|
9623
9796
|
var argumentsLength = arguments.length;
|