@ppg_pl/pallete 2.0.23 → 2.0.26
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/README.md +12 -5
- package/dist/cjs/{index-53e78fc8.js → index-d74cbc0d.js} +33 -2
- package/dist/cjs/index-d74cbc0d.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/my-backdrop_8.cjs.entry.js +1651 -1286
- package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -1
- package/dist/cjs/pallete.cjs.js +2 -2
- package/dist/cjs/pallete.cjs.js.map +1 -1
- package/dist/collection/components/my-backdrop/my-backdrop.css +7 -0
- package/dist/collection/components/my-colorbox/my-colorbox.css +7 -0
- package/dist/collection/components/my-colorinfo/assets/Shape.svg +4 -0
- package/dist/collection/components/my-colorinfo/assets/close.png +0 -0
- package/dist/collection/components/my-colorinfo/assets/shape.png +0 -0
- package/dist/collection/components/my-colorinfo/my-colorinfo.css +350 -0
- package/dist/collection/components/my-colorinfo/my-colorinfo.js +135 -1
- package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -1
- package/dist/collection/components/my-component/my-component.js +68 -1
- package/dist/collection/components/my-component/my-component.js.map +1 -1
- package/dist/collection/components/my-modal/my-modal.css +8 -239
- package/dist/collection/components/my-modal/my-modal.js +42 -2
- package/dist/collection/components/my-modal/my-modal.js.map +1 -1
- package/dist/collection/components/my-search/my-search.css +7 -0
- package/dist/collection/components/my-slider/index.js +9 -6
- package/dist/collection/components/my-slider/index.js.map +1 -1
- package/dist/collection/components/my-slider/my-slider.css +12 -3
- package/dist/collection/types.js.map +1 -1
- package/dist/components/index3.js +10 -7
- package/dist/components/index3.js.map +1 -1
- package/dist/components/my-backdrop2.js +1 -1
- package/dist/components/my-backdrop2.js.map +1 -1
- package/dist/components/my-colorbox2.js +1 -1
- package/dist/components/my-colorbox2.js.map +1 -1
- package/dist/components/my-colorinfo2.js +46 -3
- package/dist/components/my-colorinfo2.js.map +1 -1
- package/dist/components/my-component.js +15 -3
- package/dist/components/my-component.js.map +1 -1
- package/dist/components/my-modal2.js +1589 -1274
- package/dist/components/my-modal2.js.map +1 -1
- package/dist/components/my-search2.js +1 -1
- package/dist/components/my-search2.js.map +1 -1
- package/dist/esm/{index-b0145abf.js → index-45a30349.js} +33 -2
- package/dist/esm/index-45a30349.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/my-backdrop_8.entry.js +1651 -1286
- package/dist/esm/my-backdrop_8.entry.js.map +1 -1
- package/dist/esm/pallete.js +3 -3
- package/dist/esm/pallete.js.map +1 -1
- package/dist/pallete/assets/Shape.svg +4 -0
- package/dist/pallete/assets/shape.png +0 -0
- package/dist/pallete/p-2394bcec.entry.js +2 -0
- package/dist/pallete/p-2394bcec.entry.js.map +1 -0
- package/dist/pallete/p-a3449132.js +3 -0
- package/dist/pallete/p-a3449132.js.map +1 -0
- package/dist/pallete/pallete.css +1 -1
- package/dist/pallete/pallete.esm.js +1 -1
- package/dist/pallete/pallete.esm.js.map +1 -1
- package/dist/types/components/my-colorinfo/my-colorinfo.d.ts +11 -1
- package/dist/types/components/my-component/my-component.d.ts +9 -0
- package/dist/types/components/my-modal/my-modal.d.ts +3 -1
- package/dist/types/components.d.ts +24 -2
- package/dist/types/types.d.ts +4 -0
- package/package.json +5 -4
- package/www/build/assets/Shape.svg +4 -0
- package/www/build/assets/shape.png +0 -0
- package/www/build/p-2394bcec.entry.js +2 -0
- package/www/build/p-2394bcec.entry.js.map +1 -0
- package/www/build/p-a3449132.js +3 -0
- package/www/build/p-a3449132.js.map +1 -0
- package/www/build/p-c5910eb7.js +2 -0
- package/www/build/p-f8a0208d.css +1 -0
- package/www/build/pallete.css +1 -1
- package/www/build/pallete.esm.js +1 -1
- package/www/build/pallete.esm.js.map +1 -1
- package/www/index.html +62 -10
- package/dist/cjs/index-53e78fc8.js.map +0 -1
- package/dist/esm/index-b0145abf.js.map +0 -1
- package/dist/pallete/p-bdb05818.entry.js +0 -2
- package/dist/pallete/p-bdb05818.entry.js.map +0 -1
- package/dist/pallete/p-c6a049a2.js +0 -3
- package/dist/pallete/p-c6a049a2.js.map +0 -1
- package/www/build/p-bdb05818.entry.js +0 -2
- package/www/build/p-bdb05818.entry.js.map +0 -1
- package/www/build/p-c6a049a2.js +0 -3
- package/www/build/p-c6a049a2.js.map +0 -1
- /package/www/{build/assets → assets}/fonts/Galatea-Regular.eot +0 -0
- /package/www/{build/assets → assets}/fonts/Galatea-Regular.ttf +0 -0
- /package/www/{build/assets → assets}/fonts/Galatea-Regular.woff +0 -0
- /package/www/{build/assets → assets}/fonts/Galatea-Regular.woff2 +0 -0
|
@@ -7,1389 +7,1534 @@ import { d as defineCustomElement$3 } from './my-loader2.js';
|
|
|
7
7
|
import { d as defineCustomElement$2 } from './my-search2.js';
|
|
8
8
|
import { d as defineCustomElement$1 } from './index3.js';
|
|
9
9
|
|
|
10
|
-
/** @type {import('.')} */
|
|
11
|
-
var esErrors = Error;
|
|
12
|
-
|
|
13
|
-
/** @type {import('./eval')} */
|
|
14
|
-
var _eval = EvalError;
|
|
15
|
-
|
|
16
|
-
/** @type {import('./range')} */
|
|
17
|
-
var range = RangeError;
|
|
18
|
-
|
|
19
|
-
/** @type {import('./ref')} */
|
|
20
|
-
var ref = ReferenceError;
|
|
21
|
-
|
|
22
|
-
/** @type {import('./syntax')} */
|
|
23
|
-
var syntax = SyntaxError;
|
|
24
|
-
|
|
25
10
|
/** @type {import('./type')} */
|
|
26
11
|
var type = TypeError;
|
|
27
12
|
|
|
28
|
-
|
|
29
|
-
var uri = URIError;
|
|
30
|
-
|
|
31
|
-
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
32
|
-
var shams = function hasSymbols() {
|
|
33
|
-
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
34
|
-
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
35
|
-
|
|
36
|
-
var obj = {};
|
|
37
|
-
var sym = Symbol('test');
|
|
38
|
-
var symObj = Object(sym);
|
|
39
|
-
if (typeof sym === 'string') { return false; }
|
|
40
|
-
|
|
41
|
-
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
42
|
-
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
43
|
-
|
|
44
|
-
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
45
|
-
// if (sym instanceof Symbol) { return false; }
|
|
46
|
-
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
47
|
-
// if (!(symObj instanceof Symbol)) { return false; }
|
|
48
|
-
|
|
49
|
-
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
50
|
-
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
51
|
-
|
|
52
|
-
var symVal = 42;
|
|
53
|
-
obj[sym] = symVal;
|
|
54
|
-
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
55
|
-
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
13
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
56
14
|
|
|
57
|
-
|
|
15
|
+
function getAugmentedNamespace(n) {
|
|
16
|
+
if (n.__esModule) return n;
|
|
17
|
+
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
18
|
+
Object.keys(n).forEach(function (k) {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
20
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return n[k];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
return a;
|
|
28
|
+
}
|
|
58
29
|
|
|
59
|
-
|
|
60
|
-
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
30
|
+
const _nodeResolve_empty = {};
|
|
61
31
|
|
|
62
|
-
|
|
32
|
+
const _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({
|
|
33
|
+
__proto__: null,
|
|
34
|
+
'default': _nodeResolve_empty
|
|
35
|
+
});
|
|
63
36
|
|
|
64
|
-
|
|
65
|
-
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
66
|
-
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
67
|
-
}
|
|
37
|
+
const utilInspect = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty$1);
|
|
68
38
|
|
|
69
|
-
|
|
70
|
-
|
|
39
|
+
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
40
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
41
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
42
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
43
|
+
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
44
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
45
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
46
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
47
|
+
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
48
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
49
|
+
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
50
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
51
|
+
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
52
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
53
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
54
|
+
var objectToString = Object.prototype.toString;
|
|
55
|
+
var functionToString = Function.prototype.toString;
|
|
56
|
+
var $match = String.prototype.match;
|
|
57
|
+
var $slice = String.prototype.slice;
|
|
58
|
+
var $replace$1 = String.prototype.replace;
|
|
59
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
60
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
61
|
+
var $test = RegExp.prototype.test;
|
|
62
|
+
var $concat$1 = Array.prototype.concat;
|
|
63
|
+
var $join = Array.prototype.join;
|
|
64
|
+
var $arrSlice = Array.prototype.slice;
|
|
65
|
+
var $floor = Math.floor;
|
|
66
|
+
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
67
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
68
|
+
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
69
|
+
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
70
|
+
// ie, `has-tostringtag/shams
|
|
71
|
+
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
72
|
+
? Symbol.toStringTag
|
|
73
|
+
: null;
|
|
74
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
71
75
|
|
|
72
|
-
var
|
|
76
|
+
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
77
|
+
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
78
|
+
? function (O) {
|
|
79
|
+
return O.__proto__; // eslint-disable-line no-proto
|
|
80
|
+
}
|
|
81
|
+
: null
|
|
82
|
+
);
|
|
73
83
|
|
|
84
|
+
function addNumericSeparator(num, str) {
|
|
85
|
+
if (
|
|
86
|
+
num === Infinity
|
|
87
|
+
|| num === -Infinity
|
|
88
|
+
|| num !== num
|
|
89
|
+
|| (num && num > -1000 && num < 1000)
|
|
90
|
+
|| $test.call(/e/, str)
|
|
91
|
+
) {
|
|
92
|
+
return str;
|
|
93
|
+
}
|
|
94
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
95
|
+
if (typeof num === 'number') {
|
|
96
|
+
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
97
|
+
if (int !== num) {
|
|
98
|
+
var intStr = String(int);
|
|
99
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
100
|
+
return $replace$1.call(intStr, sepRegex, '$&_') + '.' + $replace$1.call($replace$1.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return $replace$1.call(str, sepRegex, '$&_');
|
|
104
|
+
}
|
|
74
105
|
|
|
75
|
-
var hasSymbols$1 = function hasNativeSymbols() {
|
|
76
|
-
if (typeof origSymbol !== 'function') { return false; }
|
|
77
|
-
if (typeof Symbol !== 'function') { return false; }
|
|
78
|
-
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
79
|
-
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
80
106
|
|
|
81
|
-
|
|
82
|
-
|
|
107
|
+
var inspectCustom = utilInspect.custom;
|
|
108
|
+
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
83
109
|
|
|
84
|
-
var
|
|
85
|
-
|
|
86
|
-
|
|
110
|
+
var quotes = {
|
|
111
|
+
__proto__: null,
|
|
112
|
+
'double': '"',
|
|
113
|
+
single: "'"
|
|
87
114
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
var hasProto$1 = function hasProto() {
|
|
93
|
-
// @ts-expect-error: TS errors on an inherited property for some reason
|
|
94
|
-
return { __proto__: test }.foo === test.foo
|
|
95
|
-
&& !(test instanceof $Object);
|
|
115
|
+
var quoteREs = {
|
|
116
|
+
__proto__: null,
|
|
117
|
+
'double': /(["\\])/g,
|
|
118
|
+
single: /(['\\])/g
|
|
96
119
|
};
|
|
97
120
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
101
|
-
var toStr$1 = Object.prototype.toString;
|
|
102
|
-
var max = Math.max;
|
|
103
|
-
var funcType = '[object Function]';
|
|
104
|
-
|
|
105
|
-
var concatty = function concatty(a, b) {
|
|
106
|
-
var arr = [];
|
|
121
|
+
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
122
|
+
var opts = options || {};
|
|
107
123
|
|
|
108
|
-
|
|
109
|
-
|
|
124
|
+
if (has$3(opts, 'quoteStyle') && !has$3(quotes, opts.quoteStyle)) {
|
|
125
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
110
126
|
}
|
|
111
|
-
|
|
112
|
-
|
|
127
|
+
if (
|
|
128
|
+
has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
129
|
+
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
130
|
+
: opts.maxStringLength !== null
|
|
131
|
+
)
|
|
132
|
+
) {
|
|
133
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
134
|
+
}
|
|
135
|
+
var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
|
|
136
|
+
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
137
|
+
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
113
138
|
}
|
|
114
139
|
|
|
115
|
-
|
|
116
|
-
|
|
140
|
+
if (
|
|
141
|
+
has$3(opts, 'indent')
|
|
142
|
+
&& opts.indent !== null
|
|
143
|
+
&& opts.indent !== '\t'
|
|
144
|
+
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
145
|
+
) {
|
|
146
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
147
|
+
}
|
|
148
|
+
if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
149
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
150
|
+
}
|
|
151
|
+
var numericSeparator = opts.numericSeparator;
|
|
117
152
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
153
|
+
if (typeof obj === 'undefined') {
|
|
154
|
+
return 'undefined';
|
|
155
|
+
}
|
|
156
|
+
if (obj === null) {
|
|
157
|
+
return 'null';
|
|
158
|
+
}
|
|
159
|
+
if (typeof obj === 'boolean') {
|
|
160
|
+
return obj ? 'true' : 'false';
|
|
122
161
|
}
|
|
123
|
-
return arr;
|
|
124
|
-
};
|
|
125
162
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if (
|
|
131
|
-
|
|
163
|
+
if (typeof obj === 'string') {
|
|
164
|
+
return inspectString(obj, opts);
|
|
165
|
+
}
|
|
166
|
+
if (typeof obj === 'number') {
|
|
167
|
+
if (obj === 0) {
|
|
168
|
+
return Infinity / obj > 0 ? '0' : '-0';
|
|
132
169
|
}
|
|
170
|
+
var str = String(obj);
|
|
171
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
133
172
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
var implementation = function bind(that) {
|
|
138
|
-
var target = this;
|
|
139
|
-
if (typeof target !== 'function' || toStr$1.apply(target) !== funcType) {
|
|
140
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
173
|
+
if (typeof obj === 'bigint') {
|
|
174
|
+
var bigIntStr = String(obj) + 'n';
|
|
175
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
141
176
|
}
|
|
142
|
-
var args = slicy(arguments, 1);
|
|
143
177
|
|
|
144
|
-
var
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
concatty(args, arguments)
|
|
150
|
-
);
|
|
151
|
-
if (Object(result) === result) {
|
|
152
|
-
return result;
|
|
153
|
-
}
|
|
154
|
-
return this;
|
|
155
|
-
}
|
|
156
|
-
return target.apply(
|
|
157
|
-
that,
|
|
158
|
-
concatty(args, arguments)
|
|
159
|
-
);
|
|
178
|
+
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
179
|
+
if (typeof depth === 'undefined') { depth = 0; }
|
|
180
|
+
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
181
|
+
return isArray$3(obj) ? '[Array]' : '[Object]';
|
|
182
|
+
}
|
|
160
183
|
|
|
161
|
-
|
|
184
|
+
var indent = getIndent(opts, depth);
|
|
162
185
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
186
|
+
if (typeof seen === 'undefined') {
|
|
187
|
+
seen = [];
|
|
188
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
189
|
+
return '[Circular]';
|
|
167
190
|
}
|
|
168
191
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
192
|
+
function inspect(value, from, noIndent) {
|
|
193
|
+
if (from) {
|
|
194
|
+
seen = $arrSlice.call(seen);
|
|
195
|
+
seen.push(from);
|
|
196
|
+
}
|
|
197
|
+
if (noIndent) {
|
|
198
|
+
var newOpts = {
|
|
199
|
+
depth: opts.depth
|
|
200
|
+
};
|
|
201
|
+
if (has$3(opts, 'quoteStyle')) {
|
|
202
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
203
|
+
}
|
|
204
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
205
|
+
}
|
|
206
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
176
207
|
}
|
|
177
208
|
|
|
178
|
-
|
|
209
|
+
if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
|
|
210
|
+
var name = nameOf(obj);
|
|
211
|
+
var keys = arrObjKeys(obj, inspect);
|
|
212
|
+
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
213
|
+
}
|
|
214
|
+
if (isSymbol(obj)) {
|
|
215
|
+
var symString = hasShammedSymbols ? $replace$1.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
216
|
+
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
217
|
+
}
|
|
218
|
+
if (isElement(obj)) {
|
|
219
|
+
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
220
|
+
var attrs = obj.attributes || [];
|
|
221
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
222
|
+
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
223
|
+
}
|
|
224
|
+
s += '>';
|
|
225
|
+
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
226
|
+
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
227
|
+
return s;
|
|
228
|
+
}
|
|
229
|
+
if (isArray$3(obj)) {
|
|
230
|
+
if (obj.length === 0) { return '[]'; }
|
|
231
|
+
var xs = arrObjKeys(obj, inspect);
|
|
232
|
+
if (indent && !singleLineValues(xs)) {
|
|
233
|
+
return '[' + indentedJoin(xs, indent) + ']';
|
|
234
|
+
}
|
|
235
|
+
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
236
|
+
}
|
|
237
|
+
if (isError(obj)) {
|
|
238
|
+
var parts = arrObjKeys(obj, inspect);
|
|
239
|
+
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
240
|
+
return '{ [' + String(obj) + '] ' + $join.call($concat$1.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
241
|
+
}
|
|
242
|
+
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
243
|
+
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
244
|
+
}
|
|
245
|
+
if (typeof obj === 'object' && customInspect) {
|
|
246
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
247
|
+
return utilInspect(obj, { depth: maxDepth - depth });
|
|
248
|
+
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
249
|
+
return obj.inspect();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if (isMap(obj)) {
|
|
253
|
+
var mapParts = [];
|
|
254
|
+
if (mapForEach) {
|
|
255
|
+
mapForEach.call(obj, function (value, key) {
|
|
256
|
+
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
260
|
+
}
|
|
261
|
+
if (isSet(obj)) {
|
|
262
|
+
var setParts = [];
|
|
263
|
+
if (setForEach) {
|
|
264
|
+
setForEach.call(obj, function (value) {
|
|
265
|
+
setParts.push(inspect(value, obj));
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
269
|
+
}
|
|
270
|
+
if (isWeakMap(obj)) {
|
|
271
|
+
return weakCollectionOf('WeakMap');
|
|
272
|
+
}
|
|
273
|
+
if (isWeakSet(obj)) {
|
|
274
|
+
return weakCollectionOf('WeakSet');
|
|
275
|
+
}
|
|
276
|
+
if (isWeakRef(obj)) {
|
|
277
|
+
return weakCollectionOf('WeakRef');
|
|
278
|
+
}
|
|
279
|
+
if (isNumber(obj)) {
|
|
280
|
+
return markBoxed(inspect(Number(obj)));
|
|
281
|
+
}
|
|
282
|
+
if (isBigInt(obj)) {
|
|
283
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
284
|
+
}
|
|
285
|
+
if (isBoolean(obj)) {
|
|
286
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
287
|
+
}
|
|
288
|
+
if (isString(obj)) {
|
|
289
|
+
return markBoxed(inspect(String(obj)));
|
|
290
|
+
}
|
|
291
|
+
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
|
|
292
|
+
/* eslint-env browser */
|
|
293
|
+
if (typeof window !== 'undefined' && obj === window) {
|
|
294
|
+
return '{ [object Window] }';
|
|
295
|
+
}
|
|
296
|
+
if (
|
|
297
|
+
(typeof globalThis !== 'undefined' && obj === globalThis)
|
|
298
|
+
|| (typeof commonjsGlobal !== 'undefined' && obj === commonjsGlobal)
|
|
299
|
+
) {
|
|
300
|
+
return '{ [object globalThis] }';
|
|
301
|
+
}
|
|
302
|
+
if (!isDate(obj) && !isRegExp$1(obj)) {
|
|
303
|
+
var ys = arrObjKeys(obj, inspect);
|
|
304
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
305
|
+
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
306
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
307
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
308
|
+
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat$1.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
309
|
+
if (ys.length === 0) { return tag + '{}'; }
|
|
310
|
+
if (indent) {
|
|
311
|
+
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
312
|
+
}
|
|
313
|
+
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
314
|
+
}
|
|
315
|
+
return String(obj);
|
|
179
316
|
};
|
|
180
317
|
|
|
181
|
-
|
|
318
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
319
|
+
var style = opts.quoteStyle || defaultStyle;
|
|
320
|
+
var quoteChar = quotes[style];
|
|
321
|
+
return quoteChar + s + quoteChar;
|
|
322
|
+
}
|
|
182
323
|
|
|
183
|
-
|
|
184
|
-
|
|
324
|
+
function quote(s) {
|
|
325
|
+
return $replace$1.call(String(s), /"/g, '"');
|
|
326
|
+
}
|
|
185
327
|
|
|
328
|
+
function canTrustToString(obj) {
|
|
329
|
+
return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined'));
|
|
330
|
+
}
|
|
331
|
+
function isArray$3(obj) { return toStr$1(obj) === '[object Array]' && canTrustToString(obj); }
|
|
332
|
+
function isDate(obj) { return toStr$1(obj) === '[object Date]' && canTrustToString(obj); }
|
|
333
|
+
function isRegExp$1(obj) { return toStr$1(obj) === '[object RegExp]' && canTrustToString(obj); }
|
|
334
|
+
function isError(obj) { return toStr$1(obj) === '[object Error]' && canTrustToString(obj); }
|
|
335
|
+
function isString(obj) { return toStr$1(obj) === '[object String]' && canTrustToString(obj); }
|
|
336
|
+
function isNumber(obj) { return toStr$1(obj) === '[object Number]' && canTrustToString(obj); }
|
|
337
|
+
function isBoolean(obj) { return toStr$1(obj) === '[object Boolean]' && canTrustToString(obj); }
|
|
186
338
|
|
|
187
|
-
|
|
188
|
-
|
|
339
|
+
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
340
|
+
function isSymbol(obj) {
|
|
341
|
+
if (hasShammedSymbols) {
|
|
342
|
+
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
343
|
+
}
|
|
344
|
+
if (typeof obj === 'symbol') {
|
|
345
|
+
return true;
|
|
346
|
+
}
|
|
347
|
+
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
try {
|
|
351
|
+
symToString.call(obj);
|
|
352
|
+
return true;
|
|
353
|
+
} catch (e) {}
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
189
356
|
|
|
190
|
-
|
|
357
|
+
function isBigInt(obj) {
|
|
358
|
+
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
try {
|
|
362
|
+
bigIntValueOf.call(obj);
|
|
363
|
+
return true;
|
|
364
|
+
} catch (e) {}
|
|
365
|
+
return false;
|
|
366
|
+
}
|
|
191
367
|
|
|
368
|
+
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
|
369
|
+
function has$3(obj, key) {
|
|
370
|
+
return hasOwn.call(obj, key);
|
|
371
|
+
}
|
|
192
372
|
|
|
373
|
+
function toStr$1(obj) {
|
|
374
|
+
return objectToString.call(obj);
|
|
375
|
+
}
|
|
193
376
|
|
|
377
|
+
function nameOf(f) {
|
|
378
|
+
if (f.name) { return f.name; }
|
|
379
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
380
|
+
if (m) { return m[1]; }
|
|
381
|
+
return null;
|
|
382
|
+
}
|
|
194
383
|
|
|
384
|
+
function indexOf(xs, x) {
|
|
385
|
+
if (xs.indexOf) { return xs.indexOf(x); }
|
|
386
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
387
|
+
if (xs[i] === x) { return i; }
|
|
388
|
+
}
|
|
389
|
+
return -1;
|
|
390
|
+
}
|
|
195
391
|
|
|
392
|
+
function isMap(x) {
|
|
393
|
+
if (!mapSize || !x || typeof x !== 'object') {
|
|
394
|
+
return false;
|
|
395
|
+
}
|
|
396
|
+
try {
|
|
397
|
+
mapSize.call(x);
|
|
398
|
+
try {
|
|
399
|
+
setSize.call(x);
|
|
400
|
+
} catch (s) {
|
|
401
|
+
return true;
|
|
402
|
+
}
|
|
403
|
+
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
404
|
+
} catch (e) {}
|
|
405
|
+
return false;
|
|
406
|
+
}
|
|
196
407
|
|
|
408
|
+
function isWeakMap(x) {
|
|
409
|
+
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
410
|
+
return false;
|
|
411
|
+
}
|
|
412
|
+
try {
|
|
413
|
+
weakMapHas.call(x, weakMapHas);
|
|
414
|
+
try {
|
|
415
|
+
weakSetHas.call(x, weakSetHas);
|
|
416
|
+
} catch (s) {
|
|
417
|
+
return true;
|
|
418
|
+
}
|
|
419
|
+
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
420
|
+
} catch (e) {}
|
|
421
|
+
return false;
|
|
422
|
+
}
|
|
197
423
|
|
|
424
|
+
function isWeakRef(x) {
|
|
425
|
+
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
426
|
+
return false;
|
|
427
|
+
}
|
|
428
|
+
try {
|
|
429
|
+
weakRefDeref.call(x);
|
|
430
|
+
return true;
|
|
431
|
+
} catch (e) {}
|
|
432
|
+
return false;
|
|
433
|
+
}
|
|
198
434
|
|
|
435
|
+
function isSet(x) {
|
|
436
|
+
if (!setSize || !x || typeof x !== 'object') {
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
try {
|
|
440
|
+
setSize.call(x);
|
|
441
|
+
try {
|
|
442
|
+
mapSize.call(x);
|
|
443
|
+
} catch (m) {
|
|
444
|
+
return true;
|
|
445
|
+
}
|
|
446
|
+
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
447
|
+
} catch (e) {}
|
|
448
|
+
return false;
|
|
449
|
+
}
|
|
199
450
|
|
|
200
|
-
|
|
451
|
+
function isWeakSet(x) {
|
|
452
|
+
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
try {
|
|
456
|
+
weakSetHas.call(x, weakSetHas);
|
|
457
|
+
try {
|
|
458
|
+
weakMapHas.call(x, weakMapHas);
|
|
459
|
+
} catch (s) {
|
|
460
|
+
return true;
|
|
461
|
+
}
|
|
462
|
+
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
463
|
+
} catch (e) {}
|
|
464
|
+
return false;
|
|
465
|
+
}
|
|
201
466
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
var $gOPD$1 = Object.getOwnPropertyDescriptor;
|
|
210
|
-
|
|
211
|
-
var throwTypeError = function () {
|
|
212
|
-
throw new type();
|
|
213
|
-
};
|
|
214
|
-
var ThrowTypeError = $gOPD$1
|
|
215
|
-
? (function () {
|
|
216
|
-
try {
|
|
217
|
-
return throwTypeError;
|
|
218
|
-
} catch (calleeThrows) {
|
|
219
|
-
try {
|
|
220
|
-
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
221
|
-
return $gOPD$1(arguments, 'callee').get;
|
|
222
|
-
} catch (gOPDthrows) {
|
|
223
|
-
return throwTypeError;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}())
|
|
227
|
-
: throwTypeError;
|
|
228
|
-
|
|
229
|
-
var hasSymbols = hasSymbols$1();
|
|
230
|
-
var hasProto = hasProto$1();
|
|
231
|
-
|
|
232
|
-
var getProto = Object.getPrototypeOf || (
|
|
233
|
-
hasProto
|
|
234
|
-
? function (x) { return x.__proto__; } // eslint-disable-line no-proto
|
|
235
|
-
: null
|
|
236
|
-
);
|
|
237
|
-
|
|
238
|
-
var needsEval = {};
|
|
239
|
-
|
|
240
|
-
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
241
|
-
|
|
242
|
-
var INTRINSICS = {
|
|
243
|
-
__proto__: null,
|
|
244
|
-
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
245
|
-
'%Array%': Array,
|
|
246
|
-
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
247
|
-
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
248
|
-
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
249
|
-
'%AsyncFunction%': needsEval,
|
|
250
|
-
'%AsyncGenerator%': needsEval,
|
|
251
|
-
'%AsyncGeneratorFunction%': needsEval,
|
|
252
|
-
'%AsyncIteratorPrototype%': needsEval,
|
|
253
|
-
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
254
|
-
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
255
|
-
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
|
|
256
|
-
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
|
|
257
|
-
'%Boolean%': Boolean,
|
|
258
|
-
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
259
|
-
'%Date%': Date,
|
|
260
|
-
'%decodeURI%': decodeURI,
|
|
261
|
-
'%decodeURIComponent%': decodeURIComponent,
|
|
262
|
-
'%encodeURI%': encodeURI,
|
|
263
|
-
'%encodeURIComponent%': encodeURIComponent,
|
|
264
|
-
'%Error%': esErrors,
|
|
265
|
-
'%eval%': eval, // eslint-disable-line no-eval
|
|
266
|
-
'%EvalError%': _eval,
|
|
267
|
-
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
268
|
-
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
269
|
-
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
270
|
-
'%Function%': $Function,
|
|
271
|
-
'%GeneratorFunction%': needsEval,
|
|
272
|
-
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
273
|
-
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
274
|
-
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
275
|
-
'%isFinite%': isFinite,
|
|
276
|
-
'%isNaN%': isNaN,
|
|
277
|
-
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
278
|
-
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
279
|
-
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
280
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
281
|
-
'%Math%': Math,
|
|
282
|
-
'%Number%': Number,
|
|
283
|
-
'%Object%': Object,
|
|
284
|
-
'%parseFloat%': parseFloat,
|
|
285
|
-
'%parseInt%': parseInt,
|
|
286
|
-
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
287
|
-
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
288
|
-
'%RangeError%': range,
|
|
289
|
-
'%ReferenceError%': ref,
|
|
290
|
-
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
291
|
-
'%RegExp%': RegExp,
|
|
292
|
-
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
293
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
294
|
-
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
295
|
-
'%String%': String,
|
|
296
|
-
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
297
|
-
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
298
|
-
'%SyntaxError%': syntax,
|
|
299
|
-
'%ThrowTypeError%': ThrowTypeError,
|
|
300
|
-
'%TypedArray%': TypedArray,
|
|
301
|
-
'%TypeError%': type,
|
|
302
|
-
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
303
|
-
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
304
|
-
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
305
|
-
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
306
|
-
'%URIError%': uri,
|
|
307
|
-
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
308
|
-
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
309
|
-
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
var doEval = function doEval(name) {
|
|
313
|
-
var value;
|
|
314
|
-
if (name === '%AsyncFunction%') {
|
|
315
|
-
value = getEvalledConstructor('async function () {}');
|
|
316
|
-
} else if (name === '%GeneratorFunction%') {
|
|
317
|
-
value = getEvalledConstructor('function* () {}');
|
|
318
|
-
} else if (name === '%AsyncGeneratorFunction%') {
|
|
319
|
-
value = getEvalledConstructor('async function* () {}');
|
|
320
|
-
} else if (name === '%AsyncGenerator%') {
|
|
321
|
-
var fn = doEval('%AsyncGeneratorFunction%');
|
|
322
|
-
if (fn) {
|
|
323
|
-
value = fn.prototype;
|
|
324
|
-
}
|
|
325
|
-
} else if (name === '%AsyncIteratorPrototype%') {
|
|
326
|
-
var gen = doEval('%AsyncGenerator%');
|
|
327
|
-
if (gen && getProto) {
|
|
328
|
-
value = getProto(gen.prototype);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
INTRINSICS[name] = value;
|
|
333
|
-
|
|
334
|
-
return value;
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
var LEGACY_ALIASES = {
|
|
338
|
-
__proto__: null,
|
|
339
|
-
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
340
|
-
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
341
|
-
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
342
|
-
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
343
|
-
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
344
|
-
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
345
|
-
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
346
|
-
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
347
|
-
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
348
|
-
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
349
|
-
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
350
|
-
'%DatePrototype%': ['Date', 'prototype'],
|
|
351
|
-
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
352
|
-
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
353
|
-
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
354
|
-
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
355
|
-
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
356
|
-
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
357
|
-
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
358
|
-
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
359
|
-
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
360
|
-
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
361
|
-
'%JSONParse%': ['JSON', 'parse'],
|
|
362
|
-
'%JSONStringify%': ['JSON', 'stringify'],
|
|
363
|
-
'%MapPrototype%': ['Map', 'prototype'],
|
|
364
|
-
'%NumberPrototype%': ['Number', 'prototype'],
|
|
365
|
-
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
366
|
-
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
367
|
-
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
368
|
-
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
369
|
-
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
370
|
-
'%Promise_all%': ['Promise', 'all'],
|
|
371
|
-
'%Promise_reject%': ['Promise', 'reject'],
|
|
372
|
-
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
373
|
-
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
374
|
-
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
375
|
-
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
376
|
-
'%SetPrototype%': ['Set', 'prototype'],
|
|
377
|
-
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
378
|
-
'%StringPrototype%': ['String', 'prototype'],
|
|
379
|
-
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
380
|
-
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
381
|
-
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
382
|
-
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
383
|
-
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
384
|
-
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
385
|
-
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
386
|
-
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
387
|
-
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
388
|
-
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
389
|
-
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
var $concat$1 = functionBind.call(Function.call, Array.prototype.concat);
|
|
395
|
-
var $spliceApply = functionBind.call(Function.apply, Array.prototype.splice);
|
|
396
|
-
var $replace$1 = functionBind.call(Function.call, String.prototype.replace);
|
|
397
|
-
var $strSlice = functionBind.call(Function.call, String.prototype.slice);
|
|
398
|
-
var $exec = functionBind.call(Function.call, RegExp.prototype.exec);
|
|
399
|
-
|
|
400
|
-
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
401
|
-
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
402
|
-
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
403
|
-
var stringToPath = function stringToPath(string) {
|
|
404
|
-
var first = $strSlice(string, 0, 1);
|
|
405
|
-
var last = $strSlice(string, -1);
|
|
406
|
-
if (first === '%' && last !== '%') {
|
|
407
|
-
throw new syntax('invalid intrinsic syntax, expected closing `%`');
|
|
408
|
-
} else if (last === '%' && first !== '%') {
|
|
409
|
-
throw new syntax('invalid intrinsic syntax, expected opening `%`');
|
|
410
|
-
}
|
|
411
|
-
var result = [];
|
|
412
|
-
$replace$1(string, rePropName, function (match, number, quote, subString) {
|
|
413
|
-
result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
|
|
414
|
-
});
|
|
415
|
-
return result;
|
|
416
|
-
};
|
|
417
|
-
/* end adaptation */
|
|
418
|
-
|
|
419
|
-
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
420
|
-
var intrinsicName = name;
|
|
421
|
-
var alias;
|
|
422
|
-
if (hasown(LEGACY_ALIASES, intrinsicName)) {
|
|
423
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
|
424
|
-
intrinsicName = '%' + alias[0] + '%';
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
if (hasown(INTRINSICS, intrinsicName)) {
|
|
428
|
-
var value = INTRINSICS[intrinsicName];
|
|
429
|
-
if (value === needsEval) {
|
|
430
|
-
value = doEval(intrinsicName);
|
|
431
|
-
}
|
|
432
|
-
if (typeof value === 'undefined' && !allowMissing) {
|
|
433
|
-
throw new type('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
return {
|
|
437
|
-
alias: alias,
|
|
438
|
-
name: intrinsicName,
|
|
439
|
-
value: value
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
throw new syntax('intrinsic ' + name + ' does not exist!');
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
447
|
-
if (typeof name !== 'string' || name.length === 0) {
|
|
448
|
-
throw new type('intrinsic name must be a non-empty string');
|
|
449
|
-
}
|
|
450
|
-
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
451
|
-
throw new type('"allowMissing" argument must be a boolean');
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
455
|
-
throw new syntax('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
456
|
-
}
|
|
457
|
-
var parts = stringToPath(name);
|
|
458
|
-
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
459
|
-
|
|
460
|
-
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
461
|
-
var intrinsicRealName = intrinsic.name;
|
|
462
|
-
var value = intrinsic.value;
|
|
463
|
-
var skipFurtherCaching = false;
|
|
464
|
-
|
|
465
|
-
var alias = intrinsic.alias;
|
|
466
|
-
if (alias) {
|
|
467
|
-
intrinsicBaseName = alias[0];
|
|
468
|
-
$spliceApply(parts, $concat$1([0, 1], alias));
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
472
|
-
var part = parts[i];
|
|
473
|
-
var first = $strSlice(part, 0, 1);
|
|
474
|
-
var last = $strSlice(part, -1);
|
|
475
|
-
if (
|
|
476
|
-
(
|
|
477
|
-
(first === '"' || first === "'" || first === '`')
|
|
478
|
-
|| (last === '"' || last === "'" || last === '`')
|
|
479
|
-
)
|
|
480
|
-
&& first !== last
|
|
481
|
-
) {
|
|
482
|
-
throw new syntax('property names with quotes must have matching quotes');
|
|
483
|
-
}
|
|
484
|
-
if (part === 'constructor' || !isOwn) {
|
|
485
|
-
skipFurtherCaching = true;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
intrinsicBaseName += '.' + part;
|
|
489
|
-
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
490
|
-
|
|
491
|
-
if (hasown(INTRINSICS, intrinsicRealName)) {
|
|
492
|
-
value = INTRINSICS[intrinsicRealName];
|
|
493
|
-
} else if (value != null) {
|
|
494
|
-
if (!(part in value)) {
|
|
495
|
-
if (!allowMissing) {
|
|
496
|
-
throw new type('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
497
|
-
}
|
|
498
|
-
return void undefined$1;
|
|
499
|
-
}
|
|
500
|
-
if ($gOPD$1 && (i + 1) >= parts.length) {
|
|
501
|
-
var desc = $gOPD$1(value, part);
|
|
502
|
-
isOwn = !!desc;
|
|
503
|
-
|
|
504
|
-
// By convention, when a data property is converted to an accessor
|
|
505
|
-
// property to emulate a data property that does not suffer from
|
|
506
|
-
// the override mistake, that accessor's getter is marked with
|
|
507
|
-
// an `originalValue` property. Here, when we detect this, we
|
|
508
|
-
// uphold the illusion by pretending to see that original data
|
|
509
|
-
// property, i.e., returning the value rather than the getter
|
|
510
|
-
// itself.
|
|
511
|
-
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
512
|
-
value = desc.get;
|
|
513
|
-
} else {
|
|
514
|
-
value = value[part];
|
|
515
|
-
}
|
|
516
|
-
} else {
|
|
517
|
-
isOwn = hasown(value, part);
|
|
518
|
-
value = value[part];
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
if (isOwn && !skipFurtherCaching) {
|
|
522
|
-
INTRINSICS[intrinsicRealName] = value;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
return value;
|
|
527
|
-
};
|
|
467
|
+
function isElement(x) {
|
|
468
|
+
if (!x || typeof x !== 'object') { return false; }
|
|
469
|
+
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
470
|
+
return true;
|
|
471
|
+
}
|
|
472
|
+
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
473
|
+
}
|
|
528
474
|
|
|
529
|
-
|
|
475
|
+
function inspectString(str, opts) {
|
|
476
|
+
if (str.length > opts.maxStringLength) {
|
|
477
|
+
var remaining = str.length - opts.maxStringLength;
|
|
478
|
+
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
479
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
480
|
+
}
|
|
481
|
+
var quoteRE = quoteREs[opts.quoteStyle || 'single'];
|
|
482
|
+
quoteRE.lastIndex = 0;
|
|
483
|
+
// eslint-disable-next-line no-control-regex
|
|
484
|
+
var s = $replace$1.call($replace$1.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
485
|
+
return wrapQuotes(s, 'single', opts);
|
|
486
|
+
}
|
|
530
487
|
|
|
531
|
-
function
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
488
|
+
function lowbyte(c) {
|
|
489
|
+
var n = c.charCodeAt(0);
|
|
490
|
+
var x = {
|
|
491
|
+
8: 'b',
|
|
492
|
+
9: 't',
|
|
493
|
+
10: 'n',
|
|
494
|
+
12: 'f',
|
|
495
|
+
13: 'r'
|
|
496
|
+
}[n];
|
|
497
|
+
if (x) { return '\\' + x; }
|
|
498
|
+
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
539
499
|
}
|
|
540
500
|
|
|
541
|
-
function
|
|
542
|
-
|
|
543
|
-
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
544
|
-
Object.keys(n).forEach(function (k) {
|
|
545
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
546
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
547
|
-
enumerable: true,
|
|
548
|
-
get: function () {
|
|
549
|
-
return n[k];
|
|
550
|
-
}
|
|
551
|
-
});
|
|
552
|
-
});
|
|
553
|
-
return a;
|
|
501
|
+
function markBoxed(str) {
|
|
502
|
+
return 'Object(' + str + ')';
|
|
554
503
|
}
|
|
555
504
|
|
|
556
|
-
function
|
|
557
|
-
|
|
505
|
+
function weakCollectionOf(type) {
|
|
506
|
+
return type + ' { ? }';
|
|
558
507
|
}
|
|
559
508
|
|
|
560
|
-
|
|
561
|
-
var
|
|
562
|
-
|
|
563
|
-
try {
|
|
564
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
565
|
-
} catch (e) {
|
|
566
|
-
// IE 8 has a broken defineProperty
|
|
567
|
-
$defineProperty = false;
|
|
568
|
-
}
|
|
509
|
+
function collectionOf(type, size, entries, indent) {
|
|
510
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
511
|
+
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
569
512
|
}
|
|
570
513
|
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
} catch (e) {
|
|
579
|
-
// IE 8 has a broken gOPD
|
|
580
|
-
$gOPD = null;
|
|
581
|
-
}
|
|
514
|
+
function singleLineValues(xs) {
|
|
515
|
+
for (var i = 0; i < xs.length; i++) {
|
|
516
|
+
if (indexOf(xs[i], '\n') >= 0) {
|
|
517
|
+
return false;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
return true;
|
|
582
521
|
}
|
|
583
522
|
|
|
584
|
-
|
|
523
|
+
function getIndent(opts, depth) {
|
|
524
|
+
var baseIndent;
|
|
525
|
+
if (opts.indent === '\t') {
|
|
526
|
+
baseIndent = '\t';
|
|
527
|
+
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
528
|
+
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
529
|
+
} else {
|
|
530
|
+
return null;
|
|
531
|
+
}
|
|
532
|
+
return {
|
|
533
|
+
base: baseIndent,
|
|
534
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
535
|
+
};
|
|
536
|
+
}
|
|
585
537
|
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
) {
|
|
592
|
-
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
593
|
-
throw new type('`obj` must be an object or a function`');
|
|
594
|
-
}
|
|
595
|
-
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
|
596
|
-
throw new type('`property` must be a string or a symbol`');
|
|
597
|
-
}
|
|
598
|
-
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
|
599
|
-
throw new type('`nonEnumerable`, if provided, must be a boolean or null');
|
|
600
|
-
}
|
|
601
|
-
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
|
602
|
-
throw new type('`nonWritable`, if provided, must be a boolean or null');
|
|
603
|
-
}
|
|
604
|
-
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
|
605
|
-
throw new type('`nonConfigurable`, if provided, must be a boolean or null');
|
|
606
|
-
}
|
|
607
|
-
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
|
608
|
-
throw new type('`loose`, if provided, must be a boolean');
|
|
609
|
-
}
|
|
538
|
+
function indentedJoin(xs, indent) {
|
|
539
|
+
if (xs.length === 0) { return ''; }
|
|
540
|
+
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
541
|
+
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
542
|
+
}
|
|
610
543
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
544
|
+
function arrObjKeys(obj, inspect) {
|
|
545
|
+
var isArr = isArray$3(obj);
|
|
546
|
+
var xs = [];
|
|
547
|
+
if (isArr) {
|
|
548
|
+
xs.length = obj.length;
|
|
549
|
+
for (var i = 0; i < obj.length; i++) {
|
|
550
|
+
xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
554
|
+
var symMap;
|
|
555
|
+
if (hasShammedSymbols) {
|
|
556
|
+
symMap = {};
|
|
557
|
+
for (var k = 0; k < syms.length; k++) {
|
|
558
|
+
symMap['$' + syms[k]] = syms[k];
|
|
559
|
+
}
|
|
560
|
+
}
|
|
615
561
|
|
|
616
|
-
|
|
617
|
-
|
|
562
|
+
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
|
563
|
+
if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
564
|
+
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
565
|
+
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
566
|
+
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
567
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
568
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
569
|
+
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
570
|
+
} else {
|
|
571
|
+
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
if (typeof gOPS === 'function') {
|
|
575
|
+
for (var j = 0; j < syms.length; j++) {
|
|
576
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
577
|
+
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
return xs;
|
|
582
|
+
}
|
|
618
583
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
584
|
+
/*
|
|
585
|
+
* This function traverses the list returning the node corresponding to the given key.
|
|
586
|
+
*
|
|
587
|
+
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
|
|
588
|
+
* By doing so, all the recently used nodes can be accessed relatively quickly.
|
|
589
|
+
*/
|
|
590
|
+
/** @type {import('./list.d.ts').listGetNode} */
|
|
591
|
+
// eslint-disable-next-line consistent-return
|
|
592
|
+
var listGetNode = function (list, key, isDelete) {
|
|
593
|
+
/** @type {typeof list | NonNullable<(typeof list)['next']>} */
|
|
594
|
+
var prev = list;
|
|
595
|
+
/** @type {(typeof list)['next']} */
|
|
596
|
+
var curr;
|
|
597
|
+
// eslint-disable-next-line eqeqeq
|
|
598
|
+
for (; (curr = prev.next) != null; prev = curr) {
|
|
599
|
+
if (curr.key === key) {
|
|
600
|
+
prev.next = curr.next;
|
|
601
|
+
if (!isDelete) {
|
|
602
|
+
// eslint-disable-next-line no-extra-parens
|
|
603
|
+
curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
|
|
604
|
+
list.next = curr; // eslint-disable-line no-param-reassign
|
|
605
|
+
}
|
|
606
|
+
return curr;
|
|
607
|
+
}
|
|
631
608
|
}
|
|
632
609
|
};
|
|
633
610
|
|
|
634
|
-
|
|
635
|
-
|
|
611
|
+
/** @type {import('./list.d.ts').listGet} */
|
|
612
|
+
var listGet = function (objects, key) {
|
|
613
|
+
if (!objects) {
|
|
614
|
+
return void undefined;
|
|
615
|
+
}
|
|
616
|
+
var node = listGetNode(objects, key);
|
|
617
|
+
return node && node.value;
|
|
636
618
|
};
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
if (
|
|
641
|
-
|
|
619
|
+
/** @type {import('./list.d.ts').listSet} */
|
|
620
|
+
var listSet = function (objects, key, value) {
|
|
621
|
+
var node = listGetNode(objects, key);
|
|
622
|
+
if (node) {
|
|
623
|
+
node.value = value;
|
|
624
|
+
} else {
|
|
625
|
+
// Prepend the new node to the beginning of the list
|
|
626
|
+
objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
|
|
627
|
+
key: key,
|
|
628
|
+
next: objects.next,
|
|
629
|
+
value: value
|
|
630
|
+
});
|
|
642
631
|
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
return
|
|
632
|
+
};
|
|
633
|
+
/** @type {import('./list.d.ts').listHas} */
|
|
634
|
+
var listHas = function (objects, key) {
|
|
635
|
+
if (!objects) {
|
|
636
|
+
return false;
|
|
637
|
+
}
|
|
638
|
+
return !!listGetNode(objects, key);
|
|
639
|
+
};
|
|
640
|
+
/** @type {import('./list.d.ts').listDelete} */
|
|
641
|
+
// eslint-disable-next-line consistent-return
|
|
642
|
+
var listDelete = function (objects, key) {
|
|
643
|
+
if (objects) {
|
|
644
|
+
return listGetNode(objects, key, true);
|
|
648
645
|
}
|
|
649
646
|
};
|
|
650
647
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
648
|
+
/** @type {import('.')} */
|
|
649
|
+
var sideChannelList = function getSideChannelList() {
|
|
650
|
+
/** @typedef {ReturnType<typeof getSideChannelList>} Channel */
|
|
651
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
652
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
654
653
|
|
|
654
|
+
/** @type {import('./list.d.ts').RootNode<V, K> | undefined} */ var $o;
|
|
655
655
|
|
|
656
|
+
/** @type {Channel} */
|
|
657
|
+
var channel = {
|
|
658
|
+
assert: function (key) {
|
|
659
|
+
if (!channel.has(key)) {
|
|
660
|
+
throw new type('Side channel does not contain ' + objectInspect(key));
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
'delete': function (key) {
|
|
664
|
+
var root = $o && $o.next;
|
|
665
|
+
var deletedNode = listDelete($o, key);
|
|
666
|
+
if (deletedNode && root && root === deletedNode) {
|
|
667
|
+
$o = void undefined;
|
|
668
|
+
}
|
|
669
|
+
return !!deletedNode;
|
|
670
|
+
},
|
|
671
|
+
get: function (key) {
|
|
672
|
+
return listGet($o, key);
|
|
673
|
+
},
|
|
674
|
+
has: function (key) {
|
|
675
|
+
return listHas($o, key);
|
|
676
|
+
},
|
|
677
|
+
set: function (key, value) {
|
|
678
|
+
if (!$o) {
|
|
679
|
+
// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
|
|
680
|
+
$o = {
|
|
681
|
+
next: void undefined
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
// eslint-disable-next-line no-extra-parens
|
|
685
|
+
listSet(/** @type {NonNullable<typeof $o>} */ ($o), key, value);
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
689
|
+
return channel;
|
|
690
|
+
};
|
|
656
691
|
|
|
657
|
-
|
|
692
|
+
/** @type {import('.')} */
|
|
693
|
+
var esObjectAtoms = Object;
|
|
658
694
|
|
|
659
695
|
/** @type {import('.')} */
|
|
660
|
-
var
|
|
661
|
-
if (typeof fn !== 'function') {
|
|
662
|
-
throw new type('`fn` is not a function');
|
|
663
|
-
}
|
|
664
|
-
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
|
|
665
|
-
throw new type('`length` must be a positive 32-bit integer');
|
|
666
|
-
}
|
|
696
|
+
var esErrors = Error;
|
|
667
697
|
|
|
668
|
-
|
|
698
|
+
/** @type {import('./eval')} */
|
|
699
|
+
var _eval = EvalError;
|
|
669
700
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
if ('length' in fn && gopd) {
|
|
673
|
-
var desc = gopd(fn, 'length');
|
|
674
|
-
if (desc && !desc.configurable) {
|
|
675
|
-
functionLengthIsConfigurable = false;
|
|
676
|
-
}
|
|
677
|
-
if (desc && !desc.writable) {
|
|
678
|
-
functionLengthIsWritable = false;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
701
|
+
/** @type {import('./range')} */
|
|
702
|
+
var range = RangeError;
|
|
681
703
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
defineDataProperty(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
|
|
685
|
-
} else {
|
|
686
|
-
defineDataProperty(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
return fn;
|
|
690
|
-
};
|
|
704
|
+
/** @type {import('./ref')} */
|
|
705
|
+
var ref = ReferenceError;
|
|
691
706
|
|
|
692
|
-
|
|
707
|
+
/** @type {import('./syntax')} */
|
|
708
|
+
var syntax = SyntaxError;
|
|
693
709
|
|
|
710
|
+
/** @type {import('./uri')} */
|
|
711
|
+
var uri = URIError;
|
|
694
712
|
|
|
713
|
+
/** @type {import('./abs')} */
|
|
714
|
+
var abs = Math.abs;
|
|
695
715
|
|
|
716
|
+
/** @type {import('./floor')} */
|
|
717
|
+
var floor = Math.floor;
|
|
696
718
|
|
|
719
|
+
/** @type {import('./max')} */
|
|
720
|
+
var max$1 = Math.max;
|
|
697
721
|
|
|
722
|
+
/** @type {import('./min')} */
|
|
723
|
+
var min = Math.min;
|
|
698
724
|
|
|
699
|
-
|
|
700
|
-
var
|
|
701
|
-
var $reflectApply = getIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
|
|
725
|
+
/** @type {import('./pow')} */
|
|
726
|
+
var pow = Math.pow;
|
|
702
727
|
|
|
728
|
+
/** @type {import('./round')} */
|
|
729
|
+
var round = Math.round;
|
|
703
730
|
|
|
704
|
-
|
|
731
|
+
/** @type {import('./isNaN')} */
|
|
732
|
+
var _isNaN = Number.isNaN || function isNaN(a) {
|
|
733
|
+
return a !== a;
|
|
734
|
+
};
|
|
705
735
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
736
|
+
/** @type {import('./sign')} */
|
|
737
|
+
var sign = function sign(number) {
|
|
738
|
+
if (_isNaN(number) || number === 0) {
|
|
739
|
+
return number;
|
|
709
740
|
}
|
|
710
|
-
|
|
711
|
-
return setFunctionLength(
|
|
712
|
-
func,
|
|
713
|
-
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
|
714
|
-
true
|
|
715
|
-
);
|
|
741
|
+
return number < 0 ? -1 : +1;
|
|
716
742
|
};
|
|
717
743
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
};
|
|
744
|
+
/** @type {import('./gOPD')} */
|
|
745
|
+
var gOPD = Object.getOwnPropertyDescriptor;
|
|
721
746
|
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
} else {
|
|
725
|
-
module.exports.apply = applyBind;
|
|
726
|
-
}
|
|
727
|
-
});
|
|
747
|
+
/** @type {import('.')} */
|
|
748
|
+
var $gOPD = gOPD;
|
|
728
749
|
|
|
729
|
-
var
|
|
750
|
+
var gopd = $gOPD;
|
|
730
751
|
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
752
|
+
/** @type {import('.')} */
|
|
753
|
+
var $defineProperty = Object.defineProperty || false;
|
|
754
|
+
if ($defineProperty) {
|
|
755
|
+
try {
|
|
756
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
757
|
+
} catch (e) {
|
|
758
|
+
// IE 8 has a broken defineProperty
|
|
759
|
+
$defineProperty = false;
|
|
735
760
|
}
|
|
736
|
-
|
|
737
|
-
};
|
|
761
|
+
}
|
|
738
762
|
|
|
739
|
-
|
|
763
|
+
var esDefineProperty = $defineProperty;
|
|
740
764
|
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
765
|
+
/** @type {import('./shams')} */
|
|
766
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
767
|
+
var shams = function hasSymbols() {
|
|
768
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
769
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
745
770
|
|
|
746
|
-
|
|
771
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
772
|
+
var obj = {};
|
|
773
|
+
var sym = Symbol('test');
|
|
774
|
+
var symObj = Object(sym);
|
|
775
|
+
if (typeof sym === 'string') { return false; }
|
|
747
776
|
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
751
|
-
var mapForEach = hasMap && Map.prototype.forEach;
|
|
752
|
-
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
753
|
-
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
754
|
-
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
755
|
-
var setForEach = hasSet && Set.prototype.forEach;
|
|
756
|
-
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
757
|
-
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
758
|
-
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
759
|
-
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
760
|
-
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
761
|
-
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
762
|
-
var booleanValueOf = Boolean.prototype.valueOf;
|
|
763
|
-
var objectToString = Object.prototype.toString;
|
|
764
|
-
var functionToString = Function.prototype.toString;
|
|
765
|
-
var $match = String.prototype.match;
|
|
766
|
-
var $slice = String.prototype.slice;
|
|
767
|
-
var $replace = String.prototype.replace;
|
|
768
|
-
var $toUpperCase = String.prototype.toUpperCase;
|
|
769
|
-
var $toLowerCase = String.prototype.toLowerCase;
|
|
770
|
-
var $test = RegExp.prototype.test;
|
|
771
|
-
var $concat = Array.prototype.concat;
|
|
772
|
-
var $join = Array.prototype.join;
|
|
773
|
-
var $arrSlice = Array.prototype.slice;
|
|
774
|
-
var $floor = Math.floor;
|
|
775
|
-
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
776
|
-
var gOPS = Object.getOwnPropertySymbols;
|
|
777
|
-
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
778
|
-
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
779
|
-
// ie, `has-tostringtag/shams
|
|
780
|
-
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
781
|
-
? Symbol.toStringTag
|
|
782
|
-
: null;
|
|
783
|
-
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
777
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
778
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
784
779
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
);
|
|
780
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
781
|
+
// if (sym instanceof Symbol) { return false; }
|
|
782
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
783
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
784
|
+
|
|
785
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
786
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
787
|
+
|
|
788
|
+
var symVal = 42;
|
|
789
|
+
obj[sym] = symVal;
|
|
790
|
+
for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
791
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
792
792
|
|
|
793
|
-
function
|
|
794
|
-
if (
|
|
795
|
-
num === Infinity
|
|
796
|
-
|| num === -Infinity
|
|
797
|
-
|| num !== num
|
|
798
|
-
|| (num && num > -1000 && num < 1000)
|
|
799
|
-
|| $test.call(/e/, str)
|
|
800
|
-
) {
|
|
801
|
-
return str;
|
|
802
|
-
}
|
|
803
|
-
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
804
|
-
if (typeof num === 'number') {
|
|
805
|
-
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
806
|
-
if (int !== num) {
|
|
807
|
-
var intStr = String(int);
|
|
808
|
-
var dec = $slice.call(str, intStr.length + 1);
|
|
809
|
-
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
return $replace.call(str, sepRegex, '$&_');
|
|
813
|
-
}
|
|
793
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
814
794
|
|
|
795
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
796
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
815
797
|
|
|
816
|
-
|
|
817
|
-
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
798
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
818
799
|
|
|
819
|
-
|
|
820
|
-
|
|
800
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
801
|
+
// eslint-disable-next-line no-extra-parens
|
|
802
|
+
var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
|
|
803
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
804
|
+
}
|
|
821
805
|
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
}
|
|
825
|
-
if (
|
|
826
|
-
has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
827
|
-
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
828
|
-
: opts.maxStringLength !== null
|
|
829
|
-
)
|
|
830
|
-
) {
|
|
831
|
-
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
832
|
-
}
|
|
833
|
-
var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
|
|
834
|
-
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
835
|
-
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
836
|
-
}
|
|
806
|
+
return true;
|
|
807
|
+
};
|
|
837
808
|
|
|
838
|
-
|
|
839
|
-
has$3(opts, 'indent')
|
|
840
|
-
&& opts.indent !== null
|
|
841
|
-
&& opts.indent !== '\t'
|
|
842
|
-
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
843
|
-
) {
|
|
844
|
-
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
845
|
-
}
|
|
846
|
-
if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
847
|
-
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
848
|
-
}
|
|
849
|
-
var numericSeparator = opts.numericSeparator;
|
|
809
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
850
810
|
|
|
851
|
-
if (typeof obj === 'undefined') {
|
|
852
|
-
return 'undefined';
|
|
853
|
-
}
|
|
854
|
-
if (obj === null) {
|
|
855
|
-
return 'null';
|
|
856
|
-
}
|
|
857
|
-
if (typeof obj === 'boolean') {
|
|
858
|
-
return obj ? 'true' : 'false';
|
|
859
|
-
}
|
|
860
811
|
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
}
|
|
868
|
-
var str = String(obj);
|
|
869
|
-
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
870
|
-
}
|
|
871
|
-
if (typeof obj === 'bigint') {
|
|
872
|
-
var bigIntStr = String(obj) + 'n';
|
|
873
|
-
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
874
|
-
}
|
|
812
|
+
/** @type {import('.')} */
|
|
813
|
+
var hasSymbols$1 = function hasNativeSymbols() {
|
|
814
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
815
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
816
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
817
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
875
818
|
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
879
|
-
return isArray$3(obj) ? '[Array]' : '[Object]';
|
|
880
|
-
}
|
|
819
|
+
return shams();
|
|
820
|
+
};
|
|
881
821
|
|
|
882
|
-
|
|
822
|
+
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
823
|
+
var Reflect_getPrototypeOf = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
|
883
824
|
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
} else if (indexOf(seen, obj) >= 0) {
|
|
887
|
-
return '[Circular]';
|
|
888
|
-
}
|
|
825
|
+
/** @type {import('./Object.getPrototypeOf')} */
|
|
826
|
+
var Object_getPrototypeOf = esObjectAtoms.getPrototypeOf || null;
|
|
889
827
|
|
|
890
|
-
|
|
891
|
-
if (from) {
|
|
892
|
-
seen = $arrSlice.call(seen);
|
|
893
|
-
seen.push(from);
|
|
894
|
-
}
|
|
895
|
-
if (noIndent) {
|
|
896
|
-
var newOpts = {
|
|
897
|
-
depth: opts.depth
|
|
898
|
-
};
|
|
899
|
-
if (has$3(opts, 'quoteStyle')) {
|
|
900
|
-
newOpts.quoteStyle = opts.quoteStyle;
|
|
901
|
-
}
|
|
902
|
-
return inspect_(value, newOpts, depth + 1, seen);
|
|
903
|
-
}
|
|
904
|
-
return inspect_(value, opts, depth + 1, seen);
|
|
905
|
-
}
|
|
828
|
+
/* eslint no-invalid-this: 1 */
|
|
906
829
|
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
918
|
-
var attrs = obj.attributes || [];
|
|
919
|
-
for (var i = 0; i < attrs.length; i++) {
|
|
920
|
-
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
921
|
-
}
|
|
922
|
-
s += '>';
|
|
923
|
-
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
924
|
-
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
925
|
-
return s;
|
|
830
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
831
|
+
var toStr = Object.prototype.toString;
|
|
832
|
+
var max = Math.max;
|
|
833
|
+
var funcType = '[object Function]';
|
|
834
|
+
|
|
835
|
+
var concatty = function concatty(a, b) {
|
|
836
|
+
var arr = [];
|
|
837
|
+
|
|
838
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
839
|
+
arr[i] = a[i];
|
|
926
840
|
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
var xs = arrObjKeys(obj, inspect);
|
|
930
|
-
if (indent && !singleLineValues(xs)) {
|
|
931
|
-
return '[' + indentedJoin(xs, indent) + ']';
|
|
932
|
-
}
|
|
933
|
-
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
841
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
842
|
+
arr[j + a.length] = b[j];
|
|
934
843
|
}
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
844
|
+
|
|
845
|
+
return arr;
|
|
846
|
+
};
|
|
847
|
+
|
|
848
|
+
var slicy = function slicy(arrLike, offset) {
|
|
849
|
+
var arr = [];
|
|
850
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
851
|
+
arr[j] = arrLike[i];
|
|
942
852
|
}
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
853
|
+
return arr;
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
var joiny = function (arr, joiner) {
|
|
857
|
+
var str = '';
|
|
858
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
859
|
+
str += arr[i];
|
|
860
|
+
if (i + 1 < arr.length) {
|
|
861
|
+
str += joiner;
|
|
948
862
|
}
|
|
949
863
|
}
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
864
|
+
return str;
|
|
865
|
+
};
|
|
866
|
+
|
|
867
|
+
var implementation = function bind(that) {
|
|
868
|
+
var target = this;
|
|
869
|
+
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
|
870
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
958
871
|
}
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
872
|
+
var args = slicy(arguments, 1);
|
|
873
|
+
|
|
874
|
+
var bound;
|
|
875
|
+
var binder = function () {
|
|
876
|
+
if (this instanceof bound) {
|
|
877
|
+
var result = target.apply(
|
|
878
|
+
this,
|
|
879
|
+
concatty(args, arguments)
|
|
880
|
+
);
|
|
881
|
+
if (Object(result) === result) {
|
|
882
|
+
return result;
|
|
883
|
+
}
|
|
884
|
+
return this;
|
|
965
885
|
}
|
|
966
|
-
return
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
if (isNumber(obj)) {
|
|
978
|
-
return markBoxed(inspect(Number(obj)));
|
|
979
|
-
}
|
|
980
|
-
if (isBigInt(obj)) {
|
|
981
|
-
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
982
|
-
}
|
|
983
|
-
if (isBoolean(obj)) {
|
|
984
|
-
return markBoxed(booleanValueOf.call(obj));
|
|
985
|
-
}
|
|
986
|
-
if (isString(obj)) {
|
|
987
|
-
return markBoxed(inspect(String(obj)));
|
|
988
|
-
}
|
|
989
|
-
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
|
|
990
|
-
/* eslint-env browser */
|
|
991
|
-
if (typeof window !== 'undefined' && obj === window) {
|
|
992
|
-
return '{ [object Window] }';
|
|
993
|
-
}
|
|
994
|
-
if (obj === commonjsGlobal) {
|
|
995
|
-
return '{ [object globalThis] }';
|
|
886
|
+
return target.apply(
|
|
887
|
+
that,
|
|
888
|
+
concatty(args, arguments)
|
|
889
|
+
);
|
|
890
|
+
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
var boundLength = max(0, target.length - args.length);
|
|
894
|
+
var boundArgs = [];
|
|
895
|
+
for (var i = 0; i < boundLength; i++) {
|
|
896
|
+
boundArgs[i] = '$' + i;
|
|
996
897
|
}
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
var
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
if (indent) {
|
|
1006
|
-
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
1007
|
-
}
|
|
1008
|
-
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
898
|
+
|
|
899
|
+
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
900
|
+
|
|
901
|
+
if (target.prototype) {
|
|
902
|
+
var Empty = function Empty() {};
|
|
903
|
+
Empty.prototype = target.prototype;
|
|
904
|
+
bound.prototype = new Empty();
|
|
905
|
+
Empty.prototype = null;
|
|
1009
906
|
}
|
|
1010
|
-
|
|
907
|
+
|
|
908
|
+
return bound;
|
|
1011
909
|
};
|
|
1012
910
|
|
|
1013
|
-
|
|
1014
|
-
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
|
|
1015
|
-
return quoteChar + s + quoteChar;
|
|
1016
|
-
}
|
|
911
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
1017
912
|
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
}
|
|
913
|
+
/** @type {import('./functionCall')} */
|
|
914
|
+
var functionCall = Function.prototype.call;
|
|
1021
915
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1025
|
-
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1026
|
-
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1027
|
-
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1028
|
-
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
916
|
+
/** @type {import('./functionApply')} */
|
|
917
|
+
var functionApply = Function.prototype.apply;
|
|
1029
918
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
if (hasShammedSymbols) {
|
|
1033
|
-
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
1034
|
-
}
|
|
1035
|
-
if (typeof obj === 'symbol') {
|
|
1036
|
-
return true;
|
|
1037
|
-
}
|
|
1038
|
-
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
1039
|
-
return false;
|
|
1040
|
-
}
|
|
1041
|
-
try {
|
|
1042
|
-
symToString.call(obj);
|
|
1043
|
-
return true;
|
|
1044
|
-
} catch (e) {}
|
|
1045
|
-
return false;
|
|
1046
|
-
}
|
|
919
|
+
/** @type {import('./reflectApply')} */
|
|
920
|
+
var reflectApply = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
1047
921
|
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
return false;
|
|
1051
|
-
}
|
|
1052
|
-
try {
|
|
1053
|
-
bigIntValueOf.call(obj);
|
|
1054
|
-
return true;
|
|
1055
|
-
} catch (e) {}
|
|
1056
|
-
return false;
|
|
1057
|
-
}
|
|
922
|
+
/** @type {import('./actualApply')} */
|
|
923
|
+
var actualApply = reflectApply || functionBind.call(functionCall, functionApply);
|
|
1058
924
|
|
|
1059
|
-
|
|
1060
|
-
function
|
|
1061
|
-
|
|
1062
|
-
|
|
925
|
+
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
|
926
|
+
var callBindApplyHelpers = function callBindBasic(args) {
|
|
927
|
+
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
928
|
+
throw new type('a function is required');
|
|
929
|
+
}
|
|
930
|
+
return actualApply(functionBind, functionCall, args);
|
|
931
|
+
};
|
|
1063
932
|
|
|
1064
|
-
|
|
1065
|
-
|
|
933
|
+
var hasProtoAccessor;
|
|
934
|
+
try {
|
|
935
|
+
// eslint-disable-next-line no-extra-parens, no-proto
|
|
936
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
|
|
937
|
+
} catch (e) {
|
|
938
|
+
if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
|
|
939
|
+
throw e;
|
|
940
|
+
}
|
|
1066
941
|
}
|
|
1067
942
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
1071
|
-
if (m) { return m[1]; }
|
|
1072
|
-
return null;
|
|
1073
|
-
}
|
|
943
|
+
// eslint-disable-next-line no-extra-parens
|
|
944
|
+
var desc = !!hasProtoAccessor && gopd && gopd(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
|
|
1074
945
|
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
946
|
+
var $Object = Object;
|
|
947
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
948
|
+
|
|
949
|
+
/** @type {import('./get')} */
|
|
950
|
+
var get = desc && typeof desc.get === 'function'
|
|
951
|
+
? callBindApplyHelpers([desc.get])
|
|
952
|
+
: typeof $getPrototypeOf === 'function'
|
|
953
|
+
? /** @type {import('./get')} */ function getDunder(value) {
|
|
954
|
+
// eslint-disable-next-line eqeqeq
|
|
955
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
956
|
+
}
|
|
957
|
+
: false;
|
|
1082
958
|
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
959
|
+
/** @type {import('.')} */
|
|
960
|
+
var getProto = Reflect_getPrototypeOf
|
|
961
|
+
? function getProto(O) {
|
|
962
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
963
|
+
return Reflect_getPrototypeOf(O);
|
|
964
|
+
}
|
|
965
|
+
: Object_getPrototypeOf
|
|
966
|
+
? function getProto(O) {
|
|
967
|
+
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
|
968
|
+
throw new TypeError('getProto: not an object');
|
|
969
|
+
}
|
|
970
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
971
|
+
return Object_getPrototypeOf(O);
|
|
972
|
+
}
|
|
973
|
+
: get
|
|
974
|
+
? function getProto(O) {
|
|
975
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
976
|
+
return get(O);
|
|
977
|
+
}
|
|
978
|
+
: null;
|
|
979
|
+
|
|
980
|
+
var call = Function.prototype.call;
|
|
981
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
/** @type {import('.')} */
|
|
985
|
+
var hasown = functionBind.call(call, $hasOwn);
|
|
986
|
+
|
|
987
|
+
var undefined$1;
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
var $Function = Function;
|
|
1008
|
+
|
|
1009
|
+
// eslint-disable-next-line consistent-return
|
|
1010
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
1011
|
+
try {
|
|
1012
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
1013
|
+
} catch (e) {}
|
|
1014
|
+
};
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
var throwTypeError = function () {
|
|
1020
|
+
throw new type();
|
|
1021
|
+
};
|
|
1022
|
+
var ThrowTypeError = gopd
|
|
1023
|
+
? (function () {
|
|
1024
|
+
try {
|
|
1025
|
+
return throwTypeError;
|
|
1026
|
+
} catch (calleeThrows) {
|
|
1027
|
+
try {
|
|
1028
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
1029
|
+
return gopd(arguments, 'callee').get;
|
|
1030
|
+
} catch (gOPDthrows) {
|
|
1031
|
+
return throwTypeError;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
}())
|
|
1035
|
+
: throwTypeError;
|
|
1036
|
+
|
|
1037
|
+
var hasSymbols = hasSymbols$1();
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
var needsEval = {};
|
|
1047
|
+
|
|
1048
|
+
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
1049
|
+
|
|
1050
|
+
var INTRINSICS = {
|
|
1051
|
+
__proto__: null,
|
|
1052
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
1053
|
+
'%Array%': Array,
|
|
1054
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
1055
|
+
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
1056
|
+
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
1057
|
+
'%AsyncFunction%': needsEval,
|
|
1058
|
+
'%AsyncGenerator%': needsEval,
|
|
1059
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
1060
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
1061
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
1062
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
1063
|
+
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
|
|
1064
|
+
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
|
|
1065
|
+
'%Boolean%': Boolean,
|
|
1066
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
1067
|
+
'%Date%': Date,
|
|
1068
|
+
'%decodeURI%': decodeURI,
|
|
1069
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
1070
|
+
'%encodeURI%': encodeURI,
|
|
1071
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
1072
|
+
'%Error%': esErrors,
|
|
1073
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
1074
|
+
'%EvalError%': _eval,
|
|
1075
|
+
'%Float16Array%': typeof Float16Array === 'undefined' ? undefined$1 : Float16Array,
|
|
1076
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
1077
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
1078
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
1079
|
+
'%Function%': $Function,
|
|
1080
|
+
'%GeneratorFunction%': needsEval,
|
|
1081
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
1082
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
1083
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
1084
|
+
'%isFinite%': isFinite,
|
|
1085
|
+
'%isNaN%': isNaN,
|
|
1086
|
+
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
1087
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
1088
|
+
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
1089
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
1090
|
+
'%Math%': Math,
|
|
1091
|
+
'%Number%': Number,
|
|
1092
|
+
'%Object%': esObjectAtoms,
|
|
1093
|
+
'%Object.getOwnPropertyDescriptor%': gopd,
|
|
1094
|
+
'%parseFloat%': parseFloat,
|
|
1095
|
+
'%parseInt%': parseInt,
|
|
1096
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
1097
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
1098
|
+
'%RangeError%': range,
|
|
1099
|
+
'%ReferenceError%': ref,
|
|
1100
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
1101
|
+
'%RegExp%': RegExp,
|
|
1102
|
+
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
1103
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
1104
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
1105
|
+
'%String%': String,
|
|
1106
|
+
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
1107
|
+
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
1108
|
+
'%SyntaxError%': syntax,
|
|
1109
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
1110
|
+
'%TypedArray%': TypedArray,
|
|
1111
|
+
'%TypeError%': type,
|
|
1112
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
1113
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
1114
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
1115
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
1116
|
+
'%URIError%': uri,
|
|
1117
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
1118
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
1119
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
|
|
1120
|
+
|
|
1121
|
+
'%Function.prototype.call%': functionCall,
|
|
1122
|
+
'%Function.prototype.apply%': functionApply,
|
|
1123
|
+
'%Object.defineProperty%': esDefineProperty,
|
|
1124
|
+
'%Object.getPrototypeOf%': Object_getPrototypeOf,
|
|
1125
|
+
'%Math.abs%': abs,
|
|
1126
|
+
'%Math.floor%': floor,
|
|
1127
|
+
'%Math.max%': max$1,
|
|
1128
|
+
'%Math.min%': min,
|
|
1129
|
+
'%Math.pow%': pow,
|
|
1130
|
+
'%Math.round%': round,
|
|
1131
|
+
'%Math.sign%': sign,
|
|
1132
|
+
'%Reflect.getPrototypeOf%': Reflect_getPrototypeOf
|
|
1133
|
+
};
|
|
1134
|
+
|
|
1135
|
+
var doEval = function doEval(name) {
|
|
1136
|
+
var value;
|
|
1137
|
+
if (name === '%AsyncFunction%') {
|
|
1138
|
+
value = getEvalledConstructor('async function () {}');
|
|
1139
|
+
} else if (name === '%GeneratorFunction%') {
|
|
1140
|
+
value = getEvalledConstructor('function* () {}');
|
|
1141
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
1142
|
+
value = getEvalledConstructor('async function* () {}');
|
|
1143
|
+
} else if (name === '%AsyncGenerator%') {
|
|
1144
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
1145
|
+
if (fn) {
|
|
1146
|
+
value = fn.prototype;
|
|
1147
|
+
}
|
|
1148
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
1149
|
+
var gen = doEval('%AsyncGenerator%');
|
|
1150
|
+
if (gen && getProto) {
|
|
1151
|
+
value = getProto(gen.prototype);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1098
1154
|
|
|
1099
|
-
|
|
1100
|
-
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
1101
|
-
return false;
|
|
1102
|
-
}
|
|
1103
|
-
try {
|
|
1104
|
-
weakMapHas.call(x, weakMapHas);
|
|
1105
|
-
try {
|
|
1106
|
-
weakSetHas.call(x, weakSetHas);
|
|
1107
|
-
} catch (s) {
|
|
1108
|
-
return true;
|
|
1109
|
-
}
|
|
1110
|
-
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
1111
|
-
} catch (e) {}
|
|
1112
|
-
return false;
|
|
1113
|
-
}
|
|
1155
|
+
INTRINSICS[name] = value;
|
|
1114
1156
|
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
return false;
|
|
1118
|
-
}
|
|
1119
|
-
try {
|
|
1120
|
-
weakRefDeref.call(x);
|
|
1121
|
-
return true;
|
|
1122
|
-
} catch (e) {}
|
|
1123
|
-
return false;
|
|
1124
|
-
}
|
|
1157
|
+
return value;
|
|
1158
|
+
};
|
|
1125
1159
|
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1160
|
+
var LEGACY_ALIASES = {
|
|
1161
|
+
__proto__: null,
|
|
1162
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
1163
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
1164
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
1165
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
1166
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
1167
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
1168
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
1169
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
1170
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
1171
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
1172
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
1173
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
1174
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
1175
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
1176
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
1177
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
1178
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
1179
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
1180
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
1181
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
1182
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
1183
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
1184
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
1185
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
1186
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
1187
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
1188
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
1189
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
1190
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
1191
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
1192
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
1193
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
1194
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
1195
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
1196
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
1197
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
1198
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
1199
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
1200
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
1201
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
1202
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
1203
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
1204
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
1205
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
1206
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
1207
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
1208
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
1209
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
1210
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
1211
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
1212
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
1213
|
+
};
|
|
1141
1214
|
|
|
1142
|
-
function isWeakSet(x) {
|
|
1143
|
-
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
1144
|
-
return false;
|
|
1145
|
-
}
|
|
1146
|
-
try {
|
|
1147
|
-
weakSetHas.call(x, weakSetHas);
|
|
1148
|
-
try {
|
|
1149
|
-
weakMapHas.call(x, weakMapHas);
|
|
1150
|
-
} catch (s) {
|
|
1151
|
-
return true;
|
|
1152
|
-
}
|
|
1153
|
-
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
1154
|
-
} catch (e) {}
|
|
1155
|
-
return false;
|
|
1156
|
-
}
|
|
1157
1215
|
|
|
1158
|
-
function isElement(x) {
|
|
1159
|
-
if (!x || typeof x !== 'object') { return false; }
|
|
1160
|
-
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
1161
|
-
return true;
|
|
1162
|
-
}
|
|
1163
|
-
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
1164
|
-
}
|
|
1165
1216
|
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
}
|
|
1172
|
-
// eslint-disable-next-line no-control-regex
|
|
1173
|
-
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
1174
|
-
return wrapQuotes(s, 'single', opts);
|
|
1175
|
-
}
|
|
1217
|
+
var $concat = functionBind.call(functionCall, Array.prototype.concat);
|
|
1218
|
+
var $spliceApply = functionBind.call(functionApply, Array.prototype.splice);
|
|
1219
|
+
var $replace = functionBind.call(functionCall, String.prototype.replace);
|
|
1220
|
+
var $strSlice = functionBind.call(functionCall, String.prototype.slice);
|
|
1221
|
+
var $exec = functionBind.call(functionCall, RegExp.prototype.exec);
|
|
1176
1222
|
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1223
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
1224
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1225
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
1226
|
+
var stringToPath = function stringToPath(string) {
|
|
1227
|
+
var first = $strSlice(string, 0, 1);
|
|
1228
|
+
var last = $strSlice(string, -1);
|
|
1229
|
+
if (first === '%' && last !== '%') {
|
|
1230
|
+
throw new syntax('invalid intrinsic syntax, expected closing `%`');
|
|
1231
|
+
} else if (last === '%' && first !== '%') {
|
|
1232
|
+
throw new syntax('invalid intrinsic syntax, expected opening `%`');
|
|
1233
|
+
}
|
|
1234
|
+
var result = [];
|
|
1235
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
1236
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
1237
|
+
});
|
|
1238
|
+
return result;
|
|
1239
|
+
};
|
|
1240
|
+
/* end adaptation */
|
|
1189
1241
|
|
|
1190
|
-
function
|
|
1191
|
-
|
|
1192
|
-
|
|
1242
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
1243
|
+
var intrinsicName = name;
|
|
1244
|
+
var alias;
|
|
1245
|
+
if (hasown(LEGACY_ALIASES, intrinsicName)) {
|
|
1246
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
1247
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
1248
|
+
}
|
|
1193
1249
|
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1250
|
+
if (hasown(INTRINSICS, intrinsicName)) {
|
|
1251
|
+
var value = INTRINSICS[intrinsicName];
|
|
1252
|
+
if (value === needsEval) {
|
|
1253
|
+
value = doEval(intrinsicName);
|
|
1254
|
+
}
|
|
1255
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
1256
|
+
throw new type('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
1257
|
+
}
|
|
1197
1258
|
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1259
|
+
return {
|
|
1260
|
+
alias: alias,
|
|
1261
|
+
name: intrinsicName,
|
|
1262
|
+
value: value
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1202
1265
|
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
if (indexOf(xs[i], '\n') >= 0) {
|
|
1206
|
-
return false;
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
return true;
|
|
1210
|
-
}
|
|
1266
|
+
throw new syntax('intrinsic ' + name + ' does not exist!');
|
|
1267
|
+
};
|
|
1211
1268
|
|
|
1212
|
-
function
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
return null;
|
|
1220
|
-
}
|
|
1221
|
-
return {
|
|
1222
|
-
base: baseIndent,
|
|
1223
|
-
prev: $join.call(Array(depth + 1), baseIndent)
|
|
1224
|
-
};
|
|
1225
|
-
}
|
|
1269
|
+
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
1270
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
1271
|
+
throw new type('intrinsic name must be a non-empty string');
|
|
1272
|
+
}
|
|
1273
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
1274
|
+
throw new type('"allowMissing" argument must be a boolean');
|
|
1275
|
+
}
|
|
1226
1276
|
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1277
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
1278
|
+
throw new syntax('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
1279
|
+
}
|
|
1280
|
+
var parts = stringToPath(name);
|
|
1281
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
1232
1282
|
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1283
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
1284
|
+
var intrinsicRealName = intrinsic.name;
|
|
1285
|
+
var value = intrinsic.value;
|
|
1286
|
+
var skipFurtherCaching = false;
|
|
1287
|
+
|
|
1288
|
+
var alias = intrinsic.alias;
|
|
1289
|
+
if (alias) {
|
|
1290
|
+
intrinsicBaseName = alias[0];
|
|
1291
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1295
|
+
var part = parts[i];
|
|
1296
|
+
var first = $strSlice(part, 0, 1);
|
|
1297
|
+
var last = $strSlice(part, -1);
|
|
1298
|
+
if (
|
|
1299
|
+
(
|
|
1300
|
+
(first === '"' || first === "'" || first === '`')
|
|
1301
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
1302
|
+
)
|
|
1303
|
+
&& first !== last
|
|
1304
|
+
) {
|
|
1305
|
+
throw new syntax('property names with quotes must have matching quotes');
|
|
1306
|
+
}
|
|
1307
|
+
if (part === 'constructor' || !isOwn) {
|
|
1308
|
+
skipFurtherCaching = true;
|
|
1309
|
+
}
|
|
1250
1310
|
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
1254
|
-
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
1255
|
-
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
1256
|
-
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
1257
|
-
} else if ($test.call(/[^\w$]/, key)) {
|
|
1258
|
-
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
1259
|
-
} else {
|
|
1260
|
-
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
if (typeof gOPS === 'function') {
|
|
1264
|
-
for (var j = 0; j < syms.length; j++) {
|
|
1265
|
-
if (isEnumerable.call(obj, syms[j])) {
|
|
1266
|
-
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
return xs;
|
|
1271
|
-
}
|
|
1311
|
+
intrinsicBaseName += '.' + part;
|
|
1312
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
1272
1313
|
|
|
1273
|
-
|
|
1274
|
-
|
|
1314
|
+
if (hasown(INTRINSICS, intrinsicRealName)) {
|
|
1315
|
+
value = INTRINSICS[intrinsicRealName];
|
|
1316
|
+
} else if (value != null) {
|
|
1317
|
+
if (!(part in value)) {
|
|
1318
|
+
if (!allowMissing) {
|
|
1319
|
+
throw new type('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
1320
|
+
}
|
|
1321
|
+
return void undefined$1;
|
|
1322
|
+
}
|
|
1323
|
+
if (gopd && (i + 1) >= parts.length) {
|
|
1324
|
+
var desc = gopd(value, part);
|
|
1325
|
+
isOwn = !!desc;
|
|
1275
1326
|
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1327
|
+
// By convention, when a data property is converted to an accessor
|
|
1328
|
+
// property to emulate a data property that does not suffer from
|
|
1329
|
+
// the override mistake, that accessor's getter is marked with
|
|
1330
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
1331
|
+
// uphold the illusion by pretending to see that original data
|
|
1332
|
+
// property, i.e., returning the value rather than the getter
|
|
1333
|
+
// itself.
|
|
1334
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
1335
|
+
value = desc.get;
|
|
1336
|
+
} else {
|
|
1337
|
+
value = value[part];
|
|
1338
|
+
}
|
|
1339
|
+
} else {
|
|
1340
|
+
isOwn = hasown(value, part);
|
|
1341
|
+
value = value[part];
|
|
1342
|
+
}
|
|
1282
1343
|
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
|
|
1287
|
-
*/
|
|
1288
|
-
/** @type {import('.').listGetNode} */
|
|
1289
|
-
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
|
|
1290
|
-
/** @type {typeof list | NonNullable<(typeof list)['next']>} */
|
|
1291
|
-
var prev = list;
|
|
1292
|
-
/** @type {(typeof list)['next']} */
|
|
1293
|
-
var curr;
|
|
1294
|
-
for (; (curr = prev.next) !== null; prev = curr) {
|
|
1295
|
-
if (curr.key === key) {
|
|
1296
|
-
prev.next = curr.next;
|
|
1297
|
-
// eslint-disable-next-line no-extra-parens
|
|
1298
|
-
curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
|
|
1299
|
-
list.next = curr; // eslint-disable-line no-param-reassign
|
|
1300
|
-
return curr;
|
|
1344
|
+
if (isOwn && !skipFurtherCaching) {
|
|
1345
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
1346
|
+
}
|
|
1301
1347
|
}
|
|
1302
1348
|
}
|
|
1349
|
+
return value;
|
|
1303
1350
|
};
|
|
1304
1351
|
|
|
1305
|
-
/** @type {
|
|
1306
|
-
var
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
var
|
|
1313
|
-
if (
|
|
1314
|
-
|
|
1315
|
-
} else {
|
|
1316
|
-
// Prepend the new node to the beginning of the list
|
|
1317
|
-
objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
|
|
1318
|
-
key: key,
|
|
1319
|
-
next: objects.next,
|
|
1320
|
-
value: value
|
|
1321
|
-
});
|
|
1352
|
+
/** @type {(thisArg: string, searchString: string, position?: number) => number} */
|
|
1353
|
+
var $indexOf = callBindApplyHelpers([getIntrinsic('%String.prototype.indexOf%')]);
|
|
1354
|
+
|
|
1355
|
+
/** @type {import('.')} */
|
|
1356
|
+
var callBound = function callBoundIntrinsic(name, allowMissing) {
|
|
1357
|
+
/* eslint no-extra-parens: 0 */
|
|
1358
|
+
|
|
1359
|
+
var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (getIntrinsic(name, !!allowMissing));
|
|
1360
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
1361
|
+
return callBindApplyHelpers(/** @type {const} */ ([intrinsic]));
|
|
1322
1362
|
}
|
|
1363
|
+
return intrinsic;
|
|
1323
1364
|
};
|
|
1324
|
-
|
|
1325
|
-
var
|
|
1326
|
-
|
|
1327
|
-
}
|
|
1365
|
+
|
|
1366
|
+
var $Map = getIntrinsic('%Map%', true);
|
|
1367
|
+
|
|
1368
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
|
|
1369
|
+
var $mapGet = callBound('Map.prototype.get', true);
|
|
1370
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
|
|
1371
|
+
var $mapSet = callBound('Map.prototype.set', true);
|
|
1372
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
1373
|
+
var $mapHas = callBound('Map.prototype.has', true);
|
|
1374
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
1375
|
+
var $mapDelete = callBound('Map.prototype.delete', true);
|
|
1376
|
+
/** @type {<K, V>(thisArg: Map<K, V>) => number} */
|
|
1377
|
+
var $mapSize = callBound('Map.prototype.size', true);
|
|
1328
1378
|
|
|
1329
1379
|
/** @type {import('.')} */
|
|
1330
|
-
var
|
|
1331
|
-
/** @
|
|
1332
|
-
/** @
|
|
1333
|
-
/** @
|
|
1380
|
+
var sideChannelMap = !!$Map && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
|
|
1381
|
+
/** @typedef {ReturnType<typeof getSideChannelMap>} Channel */
|
|
1382
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
1383
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
1334
1384
|
|
|
1335
|
-
/** @type {
|
|
1385
|
+
/** @type {Map<K, V> | undefined} */ var $m;
|
|
1386
|
+
|
|
1387
|
+
/** @type {Channel} */
|
|
1336
1388
|
var channel = {
|
|
1337
1389
|
assert: function (key) {
|
|
1338
1390
|
if (!channel.has(key)) {
|
|
1339
1391
|
throw new type('Side channel does not contain ' + objectInspect(key));
|
|
1340
1392
|
}
|
|
1341
1393
|
},
|
|
1342
|
-
|
|
1343
|
-
if ($
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
} else if ($Map) {
|
|
1348
|
-
if ($m) {
|
|
1349
|
-
return $mapGet($m, key);
|
|
1350
|
-
}
|
|
1351
|
-
} else {
|
|
1352
|
-
if ($o) { // eslint-disable-line no-lonely-if
|
|
1353
|
-
return listGet($o, key);
|
|
1394
|
+
'delete': function (key) {
|
|
1395
|
+
if ($m) {
|
|
1396
|
+
var result = $mapDelete($m, key);
|
|
1397
|
+
if ($mapSize($m) === 0) {
|
|
1398
|
+
$m = void undefined;
|
|
1354
1399
|
}
|
|
1400
|
+
return result;
|
|
1401
|
+
}
|
|
1402
|
+
return false;
|
|
1403
|
+
},
|
|
1404
|
+
get: function (key) { // eslint-disable-line consistent-return
|
|
1405
|
+
if ($m) {
|
|
1406
|
+
return $mapGet($m, key);
|
|
1355
1407
|
}
|
|
1356
1408
|
},
|
|
1357
1409
|
has: function (key) {
|
|
1358
|
-
if ($
|
|
1359
|
-
|
|
1360
|
-
return $weakMapHas($wm, key);
|
|
1361
|
-
}
|
|
1362
|
-
} else if ($Map) {
|
|
1363
|
-
if ($m) {
|
|
1364
|
-
return $mapHas($m, key);
|
|
1365
|
-
}
|
|
1366
|
-
} else {
|
|
1367
|
-
if ($o) { // eslint-disable-line no-lonely-if
|
|
1368
|
-
return listHas($o, key);
|
|
1369
|
-
}
|
|
1410
|
+
if ($m) {
|
|
1411
|
+
return $mapHas($m, key);
|
|
1370
1412
|
}
|
|
1371
1413
|
return false;
|
|
1372
1414
|
},
|
|
1373
1415
|
set: function (key, value) {
|
|
1374
|
-
if (
|
|
1375
|
-
|
|
1376
|
-
|
|
1416
|
+
if (!$m) {
|
|
1417
|
+
// @ts-expect-error TS can't handle narrowing a variable inside a closure
|
|
1418
|
+
$m = new $Map();
|
|
1419
|
+
}
|
|
1420
|
+
$mapSet($m, key, value);
|
|
1421
|
+
}
|
|
1422
|
+
};
|
|
1423
|
+
|
|
1424
|
+
// @ts-expect-error TODO: figure out why TS is erroring here
|
|
1425
|
+
return channel;
|
|
1426
|
+
};
|
|
1427
|
+
|
|
1428
|
+
var $WeakMap = getIntrinsic('%WeakMap%', true);
|
|
1429
|
+
|
|
1430
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
|
|
1431
|
+
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
1432
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
|
|
1433
|
+
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
1434
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
1435
|
+
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
1436
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
1437
|
+
var $weakMapDelete = callBound('WeakMap.prototype.delete', true);
|
|
1438
|
+
|
|
1439
|
+
/** @type {import('.')} */
|
|
1440
|
+
var sideChannelWeakmap = $WeakMap
|
|
1441
|
+
? /** @type {Exclude<import('.'), false>} */ function getSideChannelWeakMap() {
|
|
1442
|
+
/** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel */
|
|
1443
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
1444
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
1445
|
+
|
|
1446
|
+
/** @type {WeakMap<K & object, V> | undefined} */ var $wm;
|
|
1447
|
+
/** @type {Channel | undefined} */ var $m;
|
|
1448
|
+
|
|
1449
|
+
/** @type {Channel} */
|
|
1450
|
+
var channel = {
|
|
1451
|
+
assert: function (key) {
|
|
1452
|
+
if (!channel.has(key)) {
|
|
1453
|
+
throw new type('Side channel does not contain ' + objectInspect(key));
|
|
1377
1454
|
}
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
if (
|
|
1381
|
-
|
|
1455
|
+
},
|
|
1456
|
+
'delete': function (key) {
|
|
1457
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1458
|
+
if ($wm) {
|
|
1459
|
+
return $weakMapDelete($wm, key);
|
|
1460
|
+
}
|
|
1461
|
+
} else if (sideChannelMap) {
|
|
1462
|
+
if ($m) {
|
|
1463
|
+
return $m['delete'](key);
|
|
1464
|
+
}
|
|
1382
1465
|
}
|
|
1383
|
-
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
$
|
|
1466
|
+
return false;
|
|
1467
|
+
},
|
|
1468
|
+
get: function (key) {
|
|
1469
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1470
|
+
if ($wm) {
|
|
1471
|
+
return $weakMapGet($wm, key);
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
return $m && $m.get(key);
|
|
1475
|
+
},
|
|
1476
|
+
has: function (key) {
|
|
1477
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1478
|
+
if ($wm) {
|
|
1479
|
+
return $weakMapHas($wm, key);
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
return !!$m && $m.has(key);
|
|
1483
|
+
},
|
|
1484
|
+
set: function (key, value) {
|
|
1485
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1486
|
+
if (!$wm) {
|
|
1487
|
+
$wm = new $WeakMap();
|
|
1488
|
+
}
|
|
1489
|
+
$weakMapSet($wm, key, value);
|
|
1490
|
+
} else if (sideChannelMap) {
|
|
1491
|
+
if (!$m) {
|
|
1492
|
+
$m = sideChannelMap();
|
|
1493
|
+
}
|
|
1494
|
+
// eslint-disable-next-line no-extra-parens
|
|
1495
|
+
/** @type {NonNullable<typeof $m>} */ ($m).set(key, value);
|
|
1388
1496
|
}
|
|
1389
|
-
listSet($o, key, value);
|
|
1390
1497
|
}
|
|
1498
|
+
};
|
|
1499
|
+
|
|
1500
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
1501
|
+
return channel;
|
|
1502
|
+
}
|
|
1503
|
+
: sideChannelMap;
|
|
1504
|
+
|
|
1505
|
+
var makeChannel = sideChannelWeakmap || sideChannelMap || sideChannelList;
|
|
1506
|
+
|
|
1507
|
+
/** @type {import('.')} */
|
|
1508
|
+
var sideChannel = function getSideChannel() {
|
|
1509
|
+
/** @typedef {ReturnType<typeof getSideChannel>} Channel */
|
|
1510
|
+
|
|
1511
|
+
/** @type {Channel | undefined} */ var $channelData;
|
|
1512
|
+
|
|
1513
|
+
/** @type {Channel} */
|
|
1514
|
+
var channel = {
|
|
1515
|
+
assert: function (key) {
|
|
1516
|
+
if (!channel.has(key)) {
|
|
1517
|
+
throw new type('Side channel does not contain ' + objectInspect(key));
|
|
1518
|
+
}
|
|
1519
|
+
},
|
|
1520
|
+
'delete': function (key) {
|
|
1521
|
+
return !!$channelData && $channelData['delete'](key);
|
|
1522
|
+
},
|
|
1523
|
+
get: function (key) {
|
|
1524
|
+
return $channelData && $channelData.get(key);
|
|
1525
|
+
},
|
|
1526
|
+
has: function (key) {
|
|
1527
|
+
return !!$channelData && $channelData.has(key);
|
|
1528
|
+
},
|
|
1529
|
+
set: function (key, value) {
|
|
1530
|
+
if (!$channelData) {
|
|
1531
|
+
$channelData = makeChannel();
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
$channelData.set(key, value);
|
|
1391
1535
|
}
|
|
1392
1536
|
};
|
|
1537
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
1393
1538
|
return channel;
|
|
1394
1539
|
};
|
|
1395
1540
|
|
|
@@ -1418,10 +1563,31 @@ var formats = {
|
|
|
1418
1563
|
var has$2 = Object.prototype.hasOwnProperty;
|
|
1419
1564
|
var isArray$2 = Array.isArray;
|
|
1420
1565
|
|
|
1566
|
+
// Track objects created from arrayLimit overflow using side-channel
|
|
1567
|
+
// Stores the current max numeric index for O(1) lookup
|
|
1568
|
+
var overflowChannel = sideChannel();
|
|
1569
|
+
|
|
1570
|
+
var markOverflow = function markOverflow(obj, maxIndex) {
|
|
1571
|
+
overflowChannel.set(obj, maxIndex);
|
|
1572
|
+
return obj;
|
|
1573
|
+
};
|
|
1574
|
+
|
|
1575
|
+
var isOverflow = function isOverflow(obj) {
|
|
1576
|
+
return overflowChannel.has(obj);
|
|
1577
|
+
};
|
|
1578
|
+
|
|
1579
|
+
var getMaxIndex = function getMaxIndex(obj) {
|
|
1580
|
+
return overflowChannel.get(obj);
|
|
1581
|
+
};
|
|
1582
|
+
|
|
1583
|
+
var setMaxIndex = function setMaxIndex(obj, maxIndex) {
|
|
1584
|
+
overflowChannel.set(obj, maxIndex);
|
|
1585
|
+
};
|
|
1586
|
+
|
|
1421
1587
|
var hexTable = (function () {
|
|
1422
1588
|
var array = [];
|
|
1423
1589
|
for (var i = 0; i < 256; ++i) {
|
|
1424
|
-
array.
|
|
1590
|
+
array[array.length] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
|
|
1425
1591
|
}
|
|
1426
1592
|
|
|
1427
1593
|
return array;
|
|
@@ -1437,7 +1603,7 @@ var compactQueue = function compactQueue(queue) {
|
|
|
1437
1603
|
|
|
1438
1604
|
for (var j = 0; j < obj.length; ++j) {
|
|
1439
1605
|
if (typeof obj[j] !== 'undefined') {
|
|
1440
|
-
compacted.
|
|
1606
|
+
compacted[compacted.length] = obj[j];
|
|
1441
1607
|
}
|
|
1442
1608
|
}
|
|
1443
1609
|
|
|
@@ -1447,7 +1613,7 @@ var compactQueue = function compactQueue(queue) {
|
|
|
1447
1613
|
};
|
|
1448
1614
|
|
|
1449
1615
|
var arrayToObject = function arrayToObject(source, options) {
|
|
1450
|
-
var obj = options && options.plainObjects ?
|
|
1616
|
+
var obj = options && options.plainObjects ? { __proto__: null } : {};
|
|
1451
1617
|
for (var i = 0; i < source.length; ++i) {
|
|
1452
1618
|
if (typeof source[i] !== 'undefined') {
|
|
1453
1619
|
obj[i] = source[i];
|
|
@@ -1463,11 +1629,25 @@ var merge = function merge(target, source, options) {
|
|
|
1463
1629
|
return target;
|
|
1464
1630
|
}
|
|
1465
1631
|
|
|
1466
|
-
if (typeof source !== 'object') {
|
|
1632
|
+
if (typeof source !== 'object' && typeof source !== 'function') {
|
|
1467
1633
|
if (isArray$2(target)) {
|
|
1468
|
-
target.
|
|
1634
|
+
var nextIndex = target.length;
|
|
1635
|
+
if (options && typeof options.arrayLimit === 'number' && nextIndex > options.arrayLimit) {
|
|
1636
|
+
return markOverflow(arrayToObject(target.concat(source), options), nextIndex);
|
|
1637
|
+
}
|
|
1638
|
+
target[nextIndex] = source;
|
|
1469
1639
|
} else if (target && typeof target === 'object') {
|
|
1470
|
-
if ((
|
|
1640
|
+
if (isOverflow(target)) {
|
|
1641
|
+
// Add at next numeric index for overflow objects
|
|
1642
|
+
var newIndex = getMaxIndex(target) + 1;
|
|
1643
|
+
target[newIndex] = source;
|
|
1644
|
+
setMaxIndex(target, newIndex);
|
|
1645
|
+
} else if (options && options.strictMerge) {
|
|
1646
|
+
return [target, source];
|
|
1647
|
+
} else if (
|
|
1648
|
+
(options && (options.plainObjects || options.allowPrototypes))
|
|
1649
|
+
|| !has$2.call(Object.prototype, source)
|
|
1650
|
+
) {
|
|
1471
1651
|
target[source] = true;
|
|
1472
1652
|
}
|
|
1473
1653
|
} else {
|
|
@@ -1478,7 +1658,23 @@ var merge = function merge(target, source, options) {
|
|
|
1478
1658
|
}
|
|
1479
1659
|
|
|
1480
1660
|
if (!target || typeof target !== 'object') {
|
|
1481
|
-
|
|
1661
|
+
if (isOverflow(source)) {
|
|
1662
|
+
// Create new object with target at 0, source values shifted by 1
|
|
1663
|
+
var sourceKeys = Object.keys(source);
|
|
1664
|
+
var result = options && options.plainObjects
|
|
1665
|
+
? { __proto__: null, 0: target }
|
|
1666
|
+
: { 0: target };
|
|
1667
|
+
for (var m = 0; m < sourceKeys.length; m++) {
|
|
1668
|
+
var oldKey = parseInt(sourceKeys[m], 10);
|
|
1669
|
+
result[oldKey + 1] = source[sourceKeys[m]];
|
|
1670
|
+
}
|
|
1671
|
+
return markOverflow(result, getMaxIndex(source) + 1);
|
|
1672
|
+
}
|
|
1673
|
+
var combined = [target].concat(source);
|
|
1674
|
+
if (options && typeof options.arrayLimit === 'number' && combined.length > options.arrayLimit) {
|
|
1675
|
+
return markOverflow(arrayToObject(combined, options), combined.length - 1);
|
|
1676
|
+
}
|
|
1677
|
+
return combined;
|
|
1482
1678
|
}
|
|
1483
1679
|
|
|
1484
1680
|
var mergeTarget = target;
|
|
@@ -1493,7 +1689,7 @@ var merge = function merge(target, source, options) {
|
|
|
1493
1689
|
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
1494
1690
|
target[i] = merge(targetItem, item, options);
|
|
1495
1691
|
} else {
|
|
1496
|
-
target.
|
|
1692
|
+
target[target.length] = item;
|
|
1497
1693
|
}
|
|
1498
1694
|
} else {
|
|
1499
1695
|
target[i] = item;
|
|
@@ -1510,6 +1706,17 @@ var merge = function merge(target, source, options) {
|
|
|
1510
1706
|
} else {
|
|
1511
1707
|
acc[key] = value;
|
|
1512
1708
|
}
|
|
1709
|
+
|
|
1710
|
+
if (isOverflow(source) && !isOverflow(acc)) {
|
|
1711
|
+
markOverflow(acc, getMaxIndex(source));
|
|
1712
|
+
}
|
|
1713
|
+
if (isOverflow(acc)) {
|
|
1714
|
+
var keyNum = parseInt(key, 10);
|
|
1715
|
+
if (String(keyNum) === key && keyNum >= 0 && keyNum > getMaxIndex(acc)) {
|
|
1716
|
+
setMaxIndex(acc, keyNum);
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1513
1720
|
return acc;
|
|
1514
1721
|
}, mergeTarget);
|
|
1515
1722
|
};
|
|
@@ -1521,7 +1728,7 @@ var assign = function assignSingleSource(target, source) {
|
|
|
1521
1728
|
}, target);
|
|
1522
1729
|
};
|
|
1523
1730
|
|
|
1524
|
-
var decode = function (str,
|
|
1731
|
+
var decode = function (str, defaultDecoder, charset) {
|
|
1525
1732
|
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
1526
1733
|
if (charset === 'iso-8859-1') {
|
|
1527
1734
|
// unescape never throws, no try...catch needed:
|
|
@@ -1626,8 +1833,8 @@ var compact = function compact(value) {
|
|
|
1626
1833
|
var key = keys[j];
|
|
1627
1834
|
var val = obj[key];
|
|
1628
1835
|
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
1629
|
-
queue.
|
|
1630
|
-
refs.
|
|
1836
|
+
queue[queue.length] = { obj: obj, prop: key };
|
|
1837
|
+
refs[refs.length] = val;
|
|
1631
1838
|
}
|
|
1632
1839
|
}
|
|
1633
1840
|
}
|
|
@@ -1649,15 +1856,27 @@ var isBuffer = function isBuffer(obj) {
|
|
|
1649
1856
|
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
1650
1857
|
};
|
|
1651
1858
|
|
|
1652
|
-
var combine = function combine(a, b) {
|
|
1653
|
-
|
|
1859
|
+
var combine = function combine(a, b, arrayLimit, plainObjects) {
|
|
1860
|
+
// If 'a' is already an overflow object, add to it
|
|
1861
|
+
if (isOverflow(a)) {
|
|
1862
|
+
var newIndex = getMaxIndex(a) + 1;
|
|
1863
|
+
a[newIndex] = b;
|
|
1864
|
+
setMaxIndex(a, newIndex);
|
|
1865
|
+
return a;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
var result = [].concat(a, b);
|
|
1869
|
+
if (result.length > arrayLimit) {
|
|
1870
|
+
return markOverflow(arrayToObject(result, { plainObjects: plainObjects }), result.length - 1);
|
|
1871
|
+
}
|
|
1872
|
+
return result;
|
|
1654
1873
|
};
|
|
1655
1874
|
|
|
1656
1875
|
var maybeMap = function maybeMap(val, fn) {
|
|
1657
1876
|
if (isArray$2(val)) {
|
|
1658
1877
|
var mapped = [];
|
|
1659
1878
|
for (var i = 0; i < val.length; i += 1) {
|
|
1660
|
-
mapped.
|
|
1879
|
+
mapped[mapped.length] = fn(val[i]);
|
|
1661
1880
|
}
|
|
1662
1881
|
return mapped;
|
|
1663
1882
|
}
|
|
@@ -1672,7 +1891,9 @@ var utils = {
|
|
|
1672
1891
|
decode: decode,
|
|
1673
1892
|
encode: encode,
|
|
1674
1893
|
isBuffer: isBuffer,
|
|
1894
|
+
isOverflow: isOverflow,
|
|
1675
1895
|
isRegExp: isRegExp,
|
|
1896
|
+
markOverflow: markOverflow,
|
|
1676
1897
|
maybeMap: maybeMap,
|
|
1677
1898
|
merge: merge
|
|
1678
1899
|
};
|
|
@@ -1708,11 +1929,13 @@ var defaults$1 = {
|
|
|
1708
1929
|
arrayFormat: 'indices',
|
|
1709
1930
|
charset: 'utf-8',
|
|
1710
1931
|
charsetSentinel: false,
|
|
1932
|
+
commaRoundTrip: false,
|
|
1711
1933
|
delimiter: '&',
|
|
1712
1934
|
encode: true,
|
|
1713
1935
|
encodeDotInKeys: false,
|
|
1714
1936
|
encoder: utils.encode,
|
|
1715
1937
|
encodeValuesOnly: false,
|
|
1938
|
+
filter: void undefined,
|
|
1716
1939
|
format: defaultFormat,
|
|
1717
1940
|
formatter: formats.formatters[defaultFormat],
|
|
1718
1941
|
// deprecated
|
|
@@ -1824,7 +2047,7 @@ var stringify = function stringify(
|
|
|
1824
2047
|
objKeys = sort ? keys.sort(sort) : keys;
|
|
1825
2048
|
}
|
|
1826
2049
|
|
|
1827
|
-
var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix;
|
|
2050
|
+
var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix);
|
|
1828
2051
|
|
|
1829
2052
|
var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
|
|
1830
2053
|
|
|
@@ -1834,13 +2057,15 @@ var stringify = function stringify(
|
|
|
1834
2057
|
|
|
1835
2058
|
for (var j = 0; j < objKeys.length; ++j) {
|
|
1836
2059
|
var key = objKeys[j];
|
|
1837
|
-
var value = typeof key === 'object' && typeof key.value !== 'undefined'
|
|
2060
|
+
var value = typeof key === 'object' && key && typeof key.value !== 'undefined'
|
|
2061
|
+
? key.value
|
|
2062
|
+
: obj[key];
|
|
1838
2063
|
|
|
1839
2064
|
if (skipNulls && value === null) {
|
|
1840
2065
|
continue;
|
|
1841
2066
|
}
|
|
1842
2067
|
|
|
1843
|
-
var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
|
|
2068
|
+
var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key);
|
|
1844
2069
|
var keyPrefix = isArray$1(obj)
|
|
1845
2070
|
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix
|
|
1846
2071
|
: adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
|
|
@@ -1931,7 +2156,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
|
1931
2156
|
arrayFormat: arrayFormat,
|
|
1932
2157
|
charset: charset,
|
|
1933
2158
|
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
|
|
1934
|
-
commaRoundTrip: opts.commaRoundTrip,
|
|
2159
|
+
commaRoundTrip: !!opts.commaRoundTrip,
|
|
1935
2160
|
delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
|
|
1936
2161
|
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
|
|
1937
2162
|
encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults$1.encodeDotInKeys,
|
|
@@ -1982,12 +2207,13 @@ var stringify_1 = function (object, opts) {
|
|
|
1982
2207
|
var sideChannel$1 = sideChannel();
|
|
1983
2208
|
for (var i = 0; i < objKeys.length; ++i) {
|
|
1984
2209
|
var key = objKeys[i];
|
|
2210
|
+
var value = obj[key];
|
|
1985
2211
|
|
|
1986
|
-
if (options.skipNulls &&
|
|
2212
|
+
if (options.skipNulls && value === null) {
|
|
1987
2213
|
continue;
|
|
1988
2214
|
}
|
|
1989
2215
|
pushToArray(keys, stringify(
|
|
1990
|
-
|
|
2216
|
+
value,
|
|
1991
2217
|
key,
|
|
1992
2218
|
generateArrayPrefix,
|
|
1993
2219
|
commaRoundTrip,
|
|
@@ -2046,7 +2272,10 @@ var defaults = {
|
|
|
2046
2272
|
parameterLimit: 1000,
|
|
2047
2273
|
parseArrays: true,
|
|
2048
2274
|
plainObjects: false,
|
|
2049
|
-
|
|
2275
|
+
strictDepth: false,
|
|
2276
|
+
strictMerge: true,
|
|
2277
|
+
strictNullHandling: false,
|
|
2278
|
+
throwOnLimitExceeded: false
|
|
2050
2279
|
};
|
|
2051
2280
|
|
|
2052
2281
|
var interpretNumericEntities = function (str) {
|
|
@@ -2055,11 +2284,15 @@ var interpretNumericEntities = function (str) {
|
|
|
2055
2284
|
});
|
|
2056
2285
|
};
|
|
2057
2286
|
|
|
2058
|
-
var parseArrayValue = function (val, options) {
|
|
2287
|
+
var parseArrayValue = function (val, options, currentArrayLength) {
|
|
2059
2288
|
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
|
2060
2289
|
return val.split(',');
|
|
2061
2290
|
}
|
|
2062
2291
|
|
|
2292
|
+
if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
|
|
2293
|
+
throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2063
2296
|
return val;
|
|
2064
2297
|
};
|
|
2065
2298
|
|
|
@@ -2077,8 +2310,18 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
2077
2310
|
var obj = { __proto__: null };
|
|
2078
2311
|
|
|
2079
2312
|
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
2080
|
-
|
|
2081
|
-
|
|
2313
|
+
cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');
|
|
2314
|
+
|
|
2315
|
+
var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit;
|
|
2316
|
+
var parts = cleanStr.split(
|
|
2317
|
+
options.delimiter,
|
|
2318
|
+
options.throwOnLimitExceeded ? limit + 1 : limit
|
|
2319
|
+
);
|
|
2320
|
+
|
|
2321
|
+
if (options.throwOnLimitExceeded && parts.length > limit) {
|
|
2322
|
+
throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.');
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2082
2325
|
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
|
2083
2326
|
var i;
|
|
2084
2327
|
|
|
@@ -2106,33 +2349,55 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
2106
2349
|
var bracketEqualsPos = part.indexOf(']=');
|
|
2107
2350
|
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
|
2108
2351
|
|
|
2109
|
-
var key
|
|
2352
|
+
var key;
|
|
2353
|
+
var val;
|
|
2110
2354
|
if (pos === -1) {
|
|
2111
2355
|
key = options.decoder(part, defaults.decoder, charset, 'key');
|
|
2112
2356
|
val = options.strictNullHandling ? null : '';
|
|
2113
2357
|
} else {
|
|
2114
2358
|
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2359
|
+
|
|
2360
|
+
if (key !== null) {
|
|
2361
|
+
val = utils.maybeMap(
|
|
2362
|
+
parseArrayValue(
|
|
2363
|
+
part.slice(pos + 1),
|
|
2364
|
+
options,
|
|
2365
|
+
isArray(obj[key]) ? obj[key].length : 0
|
|
2366
|
+
),
|
|
2367
|
+
function (encodedVal) {
|
|
2368
|
+
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
2369
|
+
}
|
|
2370
|
+
);
|
|
2371
|
+
}
|
|
2121
2372
|
}
|
|
2122
2373
|
|
|
2123
2374
|
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
2124
|
-
val = interpretNumericEntities(val);
|
|
2375
|
+
val = interpretNumericEntities(String(val));
|
|
2125
2376
|
}
|
|
2126
2377
|
|
|
2127
2378
|
if (part.indexOf('[]=') > -1) {
|
|
2128
2379
|
val = isArray(val) ? [val] : val;
|
|
2129
2380
|
}
|
|
2130
2381
|
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2382
|
+
if (options.comma && isArray(val) && val.length > options.arrayLimit) {
|
|
2383
|
+
if (options.throwOnLimitExceeded) {
|
|
2384
|
+
throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
|
|
2385
|
+
}
|
|
2386
|
+
val = utils.combine([], val, options.arrayLimit, options.plainObjects);
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
if (key !== null) {
|
|
2390
|
+
var existing = has.call(obj, key);
|
|
2391
|
+
if (existing && (options.duplicates === 'combine' || part.indexOf('[]=') > -1)) {
|
|
2392
|
+
obj[key] = utils.combine(
|
|
2393
|
+
obj[key],
|
|
2394
|
+
val,
|
|
2395
|
+
options.arrayLimit,
|
|
2396
|
+
options.plainObjects
|
|
2397
|
+
);
|
|
2398
|
+
} else if (!existing || options.duplicates === 'last') {
|
|
2399
|
+
obj[key] = val;
|
|
2400
|
+
}
|
|
2136
2401
|
}
|
|
2137
2402
|
}
|
|
2138
2403
|
|
|
@@ -2140,30 +2405,52 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
2140
2405
|
};
|
|
2141
2406
|
|
|
2142
2407
|
var parseObject = function (chain, val, options, valuesParsed) {
|
|
2143
|
-
var
|
|
2408
|
+
var currentArrayLength = 0;
|
|
2409
|
+
if (chain.length > 0 && chain[chain.length - 1] === '[]') {
|
|
2410
|
+
var parentKey = chain.slice(0, -1).join('');
|
|
2411
|
+
currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
|
|
2144
2415
|
|
|
2145
2416
|
for (var i = chain.length - 1; i >= 0; --i) {
|
|
2146
2417
|
var obj;
|
|
2147
2418
|
var root = chain[i];
|
|
2148
2419
|
|
|
2149
2420
|
if (root === '[]' && options.parseArrays) {
|
|
2150
|
-
|
|
2421
|
+
if (utils.isOverflow(leaf)) {
|
|
2422
|
+
// leaf is already an overflow object, preserve it
|
|
2423
|
+
obj = leaf;
|
|
2424
|
+
} else {
|
|
2425
|
+
obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null))
|
|
2426
|
+
? []
|
|
2427
|
+
: utils.combine(
|
|
2428
|
+
[],
|
|
2429
|
+
leaf,
|
|
2430
|
+
options.arrayLimit,
|
|
2431
|
+
options.plainObjects
|
|
2432
|
+
);
|
|
2433
|
+
}
|
|
2151
2434
|
} else {
|
|
2152
|
-
obj = options.plainObjects ?
|
|
2435
|
+
obj = options.plainObjects ? { __proto__: null } : {};
|
|
2153
2436
|
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
2154
2437
|
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
|
|
2155
2438
|
var index = parseInt(decodedRoot, 10);
|
|
2156
|
-
|
|
2157
|
-
obj = { 0: leaf };
|
|
2158
|
-
} else if (
|
|
2159
|
-
!isNaN(index)
|
|
2439
|
+
var isValidArrayIndex = !isNaN(index)
|
|
2160
2440
|
&& root !== decodedRoot
|
|
2161
2441
|
&& String(index) === decodedRoot
|
|
2162
2442
|
&& index >= 0
|
|
2163
|
-
&&
|
|
2164
|
-
) {
|
|
2443
|
+
&& options.parseArrays;
|
|
2444
|
+
if (!options.parseArrays && decodedRoot === '') {
|
|
2445
|
+
obj = { 0: leaf };
|
|
2446
|
+
} else if (isValidArrayIndex && index < options.arrayLimit) {
|
|
2165
2447
|
obj = [];
|
|
2166
2448
|
obj[index] = leaf;
|
|
2449
|
+
} else if (isValidArrayIndex && options.throwOnLimitExceeded) {
|
|
2450
|
+
throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
|
|
2451
|
+
} else if (isValidArrayIndex) {
|
|
2452
|
+
obj[index] = leaf;
|
|
2453
|
+
utils.markOverflow(obj, index);
|
|
2167
2454
|
} else if (decodedRoot !== '__proto__') {
|
|
2168
2455
|
obj[decodedRoot] = leaf;
|
|
2169
2456
|
}
|
|
@@ -2175,55 +2462,71 @@ var parseObject = function (chain, val, options, valuesParsed) {
|
|
|
2175
2462
|
return leaf;
|
|
2176
2463
|
};
|
|
2177
2464
|
|
|
2178
|
-
var
|
|
2179
|
-
if (!givenKey) {
|
|
2180
|
-
return;
|
|
2181
|
-
}
|
|
2182
|
-
|
|
2183
|
-
// Transform dot notation to bracket notation
|
|
2465
|
+
var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) {
|
|
2184
2466
|
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
|
2185
2467
|
|
|
2186
|
-
|
|
2468
|
+
if (options.depth <= 0) {
|
|
2469
|
+
if (!options.plainObjects && has.call(Object.prototype, key)) {
|
|
2470
|
+
if (!options.allowPrototypes) {
|
|
2471
|
+
return;
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
return [key];
|
|
2476
|
+
}
|
|
2187
2477
|
|
|
2188
2478
|
var brackets = /(\[[^[\]]*])/;
|
|
2189
2479
|
var child = /(\[[^[\]]*])/g;
|
|
2190
2480
|
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
var segment = options.depth > 0 && brackets.exec(key);
|
|
2481
|
+
var segment = brackets.exec(key);
|
|
2194
2482
|
var parent = segment ? key.slice(0, segment.index) : key;
|
|
2195
2483
|
|
|
2196
|
-
// Stash the parent if it exists
|
|
2197
|
-
|
|
2198
2484
|
var keys = [];
|
|
2485
|
+
|
|
2199
2486
|
if (parent) {
|
|
2200
|
-
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
|
2201
2487
|
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
2202
2488
|
if (!options.allowPrototypes) {
|
|
2203
2489
|
return;
|
|
2204
2490
|
}
|
|
2205
2491
|
}
|
|
2206
2492
|
|
|
2207
|
-
keys.
|
|
2493
|
+
keys[keys.length] = parent;
|
|
2208
2494
|
}
|
|
2209
2495
|
|
|
2210
|
-
// Loop through children appending to the array until we hit depth
|
|
2211
|
-
|
|
2212
2496
|
var i = 0;
|
|
2213
|
-
while (
|
|
2497
|
+
while ((segment = child.exec(key)) !== null && i < options.depth) {
|
|
2214
2498
|
i += 1;
|
|
2215
|
-
|
|
2499
|
+
|
|
2500
|
+
var segmentContent = segment[1].slice(1, -1);
|
|
2501
|
+
if (!options.plainObjects && has.call(Object.prototype, segmentContent)) {
|
|
2216
2502
|
if (!options.allowPrototypes) {
|
|
2217
2503
|
return;
|
|
2218
2504
|
}
|
|
2219
2505
|
}
|
|
2220
|
-
keys.push(segment[1]);
|
|
2221
|
-
}
|
|
2222
2506
|
|
|
2223
|
-
|
|
2507
|
+
keys[keys.length] = segment[1];
|
|
2508
|
+
}
|
|
2224
2509
|
|
|
2225
2510
|
if (segment) {
|
|
2226
|
-
|
|
2511
|
+
if (options.strictDepth === true) {
|
|
2512
|
+
throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
keys[keys.length] = '[' + key.slice(segment.index) + ']';
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
return keys;
|
|
2519
|
+
};
|
|
2520
|
+
|
|
2521
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
2522
|
+
if (!givenKey) {
|
|
2523
|
+
return;
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
var keys = splitKeyIntoSegments(givenKey, options);
|
|
2527
|
+
|
|
2528
|
+
if (!keys) {
|
|
2529
|
+
return;
|
|
2227
2530
|
}
|
|
2228
2531
|
|
|
2229
2532
|
return parseObject(keys, val, options, valuesParsed);
|
|
@@ -2249,6 +2552,11 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
|
2249
2552
|
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
2250
2553
|
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
2251
2554
|
}
|
|
2555
|
+
|
|
2556
|
+
if (typeof opts.throwOnLimitExceeded !== 'undefined' && typeof opts.throwOnLimitExceeded !== 'boolean') {
|
|
2557
|
+
throw new TypeError('`throwOnLimitExceeded` option must be a boolean');
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2252
2560
|
var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
|
2253
2561
|
|
|
2254
2562
|
var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;
|
|
@@ -2279,7 +2587,10 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
|
2279
2587
|
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
|
2280
2588
|
parseArrays: opts.parseArrays !== false,
|
|
2281
2589
|
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
|
2282
|
-
|
|
2590
|
+
strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,
|
|
2591
|
+
strictMerge: typeof opts.strictMerge === 'boolean' ? !!opts.strictMerge : defaults.strictMerge,
|
|
2592
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling,
|
|
2593
|
+
throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false
|
|
2283
2594
|
};
|
|
2284
2595
|
};
|
|
2285
2596
|
|
|
@@ -2287,11 +2598,11 @@ var parse = function (str, opts) {
|
|
|
2287
2598
|
var options = normalizeParseOptions(opts);
|
|
2288
2599
|
|
|
2289
2600
|
if (str === '' || str === null || typeof str === 'undefined') {
|
|
2290
|
-
return options.plainObjects ?
|
|
2601
|
+
return options.plainObjects ? { __proto__: null } : {};
|
|
2291
2602
|
}
|
|
2292
2603
|
|
|
2293
2604
|
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
|
2294
|
-
var obj = options.plainObjects ?
|
|
2605
|
+
var obj = options.plainObjects ? { __proto__: null } : {};
|
|
2295
2606
|
|
|
2296
2607
|
// Iterate over the keys and setup the new object
|
|
2297
2608
|
|
|
@@ -2376,7 +2687,7 @@ function debounce(func, wait) {
|
|
|
2376
2687
|
};
|
|
2377
2688
|
}
|
|
2378
2689
|
|
|
2379
|
-
const myModalCss = ".pallete-wrapper
|
|
2690
|
+
const myModalCss = "@font-face{font-family:\"Galatea\";src:url(\"/assets/fonts/Galatea-Regular.woff2\") format(\"woff2\"), url(\"/assets/fonts/Galatea-Regular.woff\") format(\"woff\"), url(\"/assets/fonts/Galatea-Regular.ttf\") format(\"truetype\");font-weight:normal;font-style:normal;font-display:swap}.pallete-wrapper.sc-my-modal *.sc-my-modal{font-family:\"Galatea\", sans-serif}.my-modal.sc-my-modal{box-shadow:1px 1px 1px #ccc;background-color:#fff;position:fixed;top:20px;left:50%;transform:translateX(-50%);max-width:1555px;width:90%;z-index:1000;text-align:center;padding:35px 40px;max-height:calc(100vh - 100px);overflow-y:auto;min-height:50vh}@media (max-width: 1024px){.my-modal.sc-my-modal{padding:40px 20px 20px}}.my-modal.sc-my-modal::-webkit-scrollbar{display:none}.my-modal.sc-my-modal .loader.sc-my-modal{display:flex;flex-direction:column;align-items:center;justify-content:center;height:300px}.my-modal__header.sc-my-modal{display:flex;align-items:center;justify-content:space-between;align-items:flex-end;margin-bottom:16px}@media (max-width: 1024px){.my-modal__header.sc-my-modal{flex-direction:column;margin-bottom:12px;align-items:center;display:block}}@media (max-width: 768px){.my-modal__header.sc-my-modal .image-wrapper.sc-my-modal{margin-bottom:12px}}.my-modal__header.sc-my-modal .image-wrapper.sc-my-modal>img.sc-my-modal{max-width:300px;object-fit:cover}@media (max-width: 768px){.my-modal__header.sc-my-modal .image-wrapper.sc-my-modal>img.sc-my-modal{max-width:200px}}.my-modal__header.sc-my-modal .search-wrapper.sc-my-modal{display:flex;gap:55px;align-items:flex-start}@media (max-width: 1024px){.my-modal__header.sc-my-modal .search-wrapper.sc-my-modal{justify-content:center;width:92%}}@media (max-width: 1024px){.my-modal__header.sc-my-modal .search-wrapper.sc-my-modal .sc-my-search-h.sc-my-modal{width:100%;margin:0 auto}}.my-modal__header.sc-my-modal .search-wrapper.sc-my-modal .my-modal__close.sc-my-modal{background:transparent;border:none;margin-top:-20px}.my-modal__header.sc-my-modal .search-wrapper.sc-my-modal .my-modal__close.sc-my-modal>img.sc-my-modal{width:45px;height:45px;object-fit:cover;cursor:pointer}@media (max-width: 1024px){.my-modal__header.sc-my-modal .search-wrapper.sc-my-modal .my-modal__close.sc-my-modal{margin-top:0px;position:absolute;right:10px;top:10px}}.my-modal__see-more.sc-my-modal{font-size:16px;display:flex;justify-content:center;align-items:center;font-weight:300;color:#575757;margin-top:12px;margin-bottom:0px}@media (max-width: 1024px){.my-modal__see-more.sc-my-modal{font-size:18px}}.my-modal__see-more.sc-my-modal img.sc-my-modal{width:45px;height:45px}@media (max-width: 1024px){.my-modal__see-more.sc-my-modal img.sc-my-modal{display:none}}.my-modal__wrapper.sc-my-modal{display:flex;flex-direction:column;position:relative}.my-modal__wrapper.sc-my-modal .boxes.sc-my-modal{display:flex;flex-direction:column;flex-wrap:wrap}.my-modal__wrapper.sc-my-modal .boxes__list.sc-my-modal{display:flex;flex-wrap:wrap;gap:5px 5px}@media (max-width: 1024px){.my-modal__wrapper.sc-my-modal .boxes__list.sc-my-modal{justify-content:center}}.my-modal__wrapper.sc-my-modal .pagination.sc-my-modal{margin:10px 0px;font-size:16px;display:flex;flex-direction:row;align-items:center;justify-content:center}.my-modal__wrapper.sc-my-modal .pagination.sc-my-modal>span.sc-my-modal{margin:0 3px;cursor:pointer;min-width:20px;padding:5px;box-shadow:1px 1px 1px #ccc}.my-modal__wrapper.sc-my-modal .pagination.sc-my-modal .current.sc-my-modal{background-color:wheat}.my-modal.sc-my-modal .categories.sc-my-modal{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid #dfdfdf;display:flex;flex-direction:column;align-items:flex-start}.my-modal.sc-my-modal .categories__container.sc-my-modal{display:flex;flex-wrap:nowrap;gap:5px 5px;overflow-x:auto;width:100%}@media (max-width: 1024px){.my-modal.sc-my-modal .categories__container.sc-my-modal{padding-bottom:5px}}.my-modal.sc-my-modal .categories__slide-information.sc-my-modal{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.my-modal.sc-my-modal .categories__slide-information.sc-my-modal span.sc-my-modal{color:#4c4c4c;font-size:16px;font-weight:normal}.my-modal.sc-my-modal .categories__slide-information.sc-my-modal span.sc-my-modal:first-of-type{margin-left:7px}.my-modal.sc-my-modal .categories__slide-information.sc-my-modal span.sc-my-modal:last-of-type{margin-right:7px}.my-modal.sc-my-modal>.button.sc-my-modal{margin:10px auto}";
|
|
2380
2691
|
|
|
2381
2692
|
const MyModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
2382
2693
|
constructor() {
|
|
@@ -2558,6 +2869,8 @@ const MyModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
2558
2869
|
this.shop = undefined;
|
|
2559
2870
|
this.product = undefined;
|
|
2560
2871
|
this.baselink = undefined;
|
|
2872
|
+
this.available_testers = undefined;
|
|
2873
|
+
this.price = undefined;
|
|
2561
2874
|
this.selectedcolor = undefined;
|
|
2562
2875
|
this.closeImage = 'close.png';
|
|
2563
2876
|
this.arrowDown = 'arrow_down.png';
|
|
@@ -2675,7 +2988,7 @@ const MyModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
2675
2988
|
render() {
|
|
2676
2989
|
var _a, _b;
|
|
2677
2990
|
return (h("div", { class: `my-modal`, onMouseEnter: () => this.handleReadyToClose(false), onMouseLeave: () => this.handleReadyToClose(true) }, this.preloader && (h("div", { class: 'loader' }, h("my-loader", null))), !this.preloader && this.data && (h("div", { class: `my-modal__header` }, h("div", { class: "image-wrapper" }, h("img", { src: `${APIURL}/assets/${(_a = this.data) === null || _a === void 0 ? void 0 : _a.modalLogo}?access_token=${accessToken}`, alt: "modal-logo" }), !this.preloader && this.data && (h("p", { class: "my-modal__see-more" }, (_b = this.data) === null || _b === void 0 ? void 0 : _b.modalDescription))), h("div", { class: "search-wrapper" }, !this.preloader && h("my-search", { shopname: this.shop, productname: this.data.name, isMobile: this.isMobile }), !this.preloader && (h("button", { class: "my-modal__close", onClick: () => this.closeModalHandler() }, h("img", { src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" })))))), h("div", { class: 'my-modal__wrapper' }, this.loading && h("my-loader", null), !this.loading && this.colors && (h("div", { class: 'container_boxes' }, this.colors.list.length > 0 ? (this.chunks(this.colors.list).map((color, index) => {
|
|
2678
|
-
var _a;
|
|
2991
|
+
var _a, _b;
|
|
2679
2992
|
return (h("div", { key: index, class: "boxes" }, h("div", { class: "boxes__list" }, color.map((c) => {
|
|
2680
2993
|
var _a;
|
|
2681
2994
|
return (h("my-colorbox", { key: c.id, onClick: () => {
|
|
@@ -2695,7 +3008,7 @@ const MyModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
2695
3008
|
isImageInsteadHex: c.imageInsteadHex,
|
|
2696
3009
|
bigImage: c.bigImage,
|
|
2697
3010
|
} }));
|
|
2698
|
-
})), ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) && index === this.currentIndex && (h("my-colorinfo", { currentColor: this.currentColor, shop: this.shop, product: this.product, data: this.data, isMobile: this.isMobile, infoBoxWidth: this.infoBoxWidth, baselink: this.baselink }))));
|
|
3011
|
+
})), ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) && index === this.currentIndex && (h("my-colorinfo", { currentColor: this.currentColor, shop: this.shop, product: this.product, data: this.data, isMobile: this.isMobile, infoBoxWidth: this.infoBoxWidth, baselink: this.baselink, availableTesters: (_b = this.available_testers) === null || _b === void 0 ? void 0 : _b.find((t) => { var _a, _b, _c; return ((_a = t.color_name) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === ((_c = (_b = this.currentColor) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.trim().toLowerCase()); }), price: this.price }))));
|
|
2699
3012
|
})) : (h("p", null, "Brak wynik\u00F3w")), this.colors.pagination.filter_count > limit && (h("div", { class: 'pagination' }, Array.from({ length: Math.ceil(this.colors.pagination.filter_count / limit) }).map((_, i) => (h("span", { class: i + 1 === this.page ? 'current' : '', onClick: e => {
|
|
2700
3013
|
e.preventDefault();
|
|
2701
3014
|
this.onPage(i + 1);
|
|
@@ -2708,10 +3021,12 @@ const MyModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
2708
3021
|
"data": ["watchPropHandler"]
|
|
2709
3022
|
}; }
|
|
2710
3023
|
static get style() { return myModalCss; }
|
|
2711
|
-
}, [
|
|
3024
|
+
}, [2, "my-modal", {
|
|
2712
3025
|
"shop": [1],
|
|
2713
3026
|
"product": [1],
|
|
2714
3027
|
"baselink": [1],
|
|
3028
|
+
"available_testers": [16],
|
|
3029
|
+
"price": [2],
|
|
2715
3030
|
"selectedcolor": [1],
|
|
2716
3031
|
"closeImage": [1, "close-image"],
|
|
2717
3032
|
"arrowDown": [1, "arrow-down"],
|