@hebcal/rest-api 3.10.2 → 3.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +3236 -539
- package/dist/bundle.min.js +2 -2
- package/dist/index.js +61 -10
- package/dist/index.mjs +63 -12
- package/package.json +15 -23
package/dist/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/rest-api v3.
|
|
1
|
+
/*! @hebcal/rest-api v3.13.2 */
|
|
2
2
|
var hebcal__rest_api = (function (exports, core, leyn) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -29,8 +29,8 @@ var check = function (it) {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
32
|
-
var global$
|
|
33
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
32
|
+
var global$C =
|
|
33
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
|
34
34
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
35
35
|
check(typeof window == 'object' && window) ||
|
|
36
36
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
@@ -41,7 +41,7 @@ var global$q =
|
|
|
41
41
|
|
|
42
42
|
var objectGetOwnPropertyDescriptor = {};
|
|
43
43
|
|
|
44
|
-
var fails$
|
|
44
|
+
var fails$g = function (exec) {
|
|
45
45
|
try {
|
|
46
46
|
return !!exec();
|
|
47
47
|
} catch (error) {
|
|
@@ -49,37 +49,48 @@ var fails$8 = function (exec) {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
var fails$
|
|
52
|
+
var fails$f = fails$g;
|
|
53
53
|
|
|
54
54
|
// Detect IE8's incomplete defineProperty implementation
|
|
55
|
-
var descriptors = !fails$
|
|
56
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
55
|
+
var descriptors = !fails$f(function () {
|
|
56
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
57
57
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
var
|
|
60
|
+
var fails$e = fails$g;
|
|
61
61
|
|
|
62
|
-
var
|
|
63
|
-
|
|
62
|
+
var functionBindNative = !fails$e(function () {
|
|
63
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
64
|
+
var test = (function () { /* empty */ }).bind();
|
|
65
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
66
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
var NATIVE_BIND$2 = functionBindNative;
|
|
70
|
+
|
|
71
|
+
var call$c = Function.prototype.call;
|
|
72
|
+
|
|
73
|
+
var functionCall = NATIVE_BIND$2 ? call$c.bind(call$c) : function () {
|
|
74
|
+
return call$c.apply(call$c, arguments);
|
|
64
75
|
};
|
|
65
76
|
|
|
66
77
|
var objectPropertyIsEnumerable = {};
|
|
67
78
|
|
|
68
79
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
69
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
70
|
-
var getOwnPropertyDescriptor$
|
|
80
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
81
|
+
var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
|
|
71
82
|
|
|
72
83
|
// Nashorn ~ JDK8 bug
|
|
73
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$
|
|
84
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$3 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
74
85
|
|
|
75
86
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
76
87
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
77
88
|
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
78
|
-
var descriptor = getOwnPropertyDescriptor$
|
|
89
|
+
var descriptor = getOwnPropertyDescriptor$3(this, V);
|
|
79
90
|
return !!descriptor && descriptor.enumerable;
|
|
80
91
|
} : $propertyIsEnumerable;
|
|
81
92
|
|
|
82
|
-
var createPropertyDescriptor$
|
|
93
|
+
var createPropertyDescriptor$5 = function (bitmap, value) {
|
|
83
94
|
return {
|
|
84
95
|
enumerable: !(bitmap & 1),
|
|
85
96
|
configurable: !(bitmap & 2),
|
|
@@ -88,100 +99,102 @@ var createPropertyDescriptor$2 = function (bitmap, value) {
|
|
|
88
99
|
};
|
|
89
100
|
};
|
|
90
101
|
|
|
102
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
103
|
+
|
|
91
104
|
var FunctionPrototype$1 = Function.prototype;
|
|
92
|
-
var bind = FunctionPrototype$1.bind;
|
|
93
|
-
var call$
|
|
94
|
-
var
|
|
105
|
+
var bind$4 = FunctionPrototype$1.bind;
|
|
106
|
+
var call$b = FunctionPrototype$1.call;
|
|
107
|
+
var uncurryThis$j = NATIVE_BIND$1 && bind$4.bind(call$b, call$b);
|
|
95
108
|
|
|
96
|
-
var functionUncurryThis =
|
|
97
|
-
return fn &&
|
|
109
|
+
var functionUncurryThis = NATIVE_BIND$1 ? function (fn) {
|
|
110
|
+
return fn && uncurryThis$j(fn);
|
|
98
111
|
} : function (fn) {
|
|
99
112
|
return fn && function () {
|
|
100
|
-
return call$
|
|
113
|
+
return call$b.apply(fn, arguments);
|
|
101
114
|
};
|
|
102
115
|
};
|
|
103
116
|
|
|
104
|
-
var uncurryThis$
|
|
117
|
+
var uncurryThis$i = functionUncurryThis;
|
|
105
118
|
|
|
106
|
-
var toString$
|
|
107
|
-
var stringSlice$
|
|
119
|
+
var toString$6 = uncurryThis$i({}.toString);
|
|
120
|
+
var stringSlice$5 = uncurryThis$i(''.slice);
|
|
108
121
|
|
|
109
122
|
var classofRaw$1 = function (it) {
|
|
110
|
-
return stringSlice$
|
|
123
|
+
return stringSlice$5(toString$6(it), 8, -1);
|
|
111
124
|
};
|
|
112
125
|
|
|
113
|
-
var global$
|
|
114
|
-
var uncurryThis$
|
|
115
|
-
var fails$
|
|
116
|
-
var classof$
|
|
126
|
+
var global$B = global$C;
|
|
127
|
+
var uncurryThis$h = functionUncurryThis;
|
|
128
|
+
var fails$d = fails$g;
|
|
129
|
+
var classof$6 = classofRaw$1;
|
|
117
130
|
|
|
118
|
-
var Object$
|
|
119
|
-
var split = uncurryThis$
|
|
131
|
+
var Object$5 = global$B.Object;
|
|
132
|
+
var split$3 = uncurryThis$h(''.split);
|
|
120
133
|
|
|
121
134
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
122
|
-
var indexedObject = fails$
|
|
135
|
+
var indexedObject = fails$d(function () {
|
|
123
136
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
124
137
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
125
|
-
return !Object$
|
|
138
|
+
return !Object$5('z').propertyIsEnumerable(0);
|
|
126
139
|
}) ? function (it) {
|
|
127
|
-
return classof$
|
|
128
|
-
} : Object$
|
|
140
|
+
return classof$6(it) == 'String' ? split$3(it, '') : Object$5(it);
|
|
141
|
+
} : Object$5;
|
|
129
142
|
|
|
130
|
-
var global$
|
|
143
|
+
var global$A = global$C;
|
|
131
144
|
|
|
132
|
-
var TypeError$
|
|
145
|
+
var TypeError$e = global$A.TypeError;
|
|
133
146
|
|
|
134
147
|
// `RequireObjectCoercible` abstract operation
|
|
135
148
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
136
|
-
var requireObjectCoercible$
|
|
137
|
-
if (it == undefined) throw TypeError$
|
|
149
|
+
var requireObjectCoercible$4 = function (it) {
|
|
150
|
+
if (it == undefined) throw TypeError$e("Can't call method on " + it);
|
|
138
151
|
return it;
|
|
139
152
|
};
|
|
140
153
|
|
|
141
154
|
// toObject with fallback for non-array-like ES3 strings
|
|
142
|
-
var IndexedObject = indexedObject;
|
|
143
|
-
var requireObjectCoercible$
|
|
155
|
+
var IndexedObject$1 = indexedObject;
|
|
156
|
+
var requireObjectCoercible$3 = requireObjectCoercible$4;
|
|
144
157
|
|
|
145
|
-
var toIndexedObject$
|
|
146
|
-
return IndexedObject(requireObjectCoercible$
|
|
158
|
+
var toIndexedObject$5 = function (it) {
|
|
159
|
+
return IndexedObject$1(requireObjectCoercible$3(it));
|
|
147
160
|
};
|
|
148
161
|
|
|
149
162
|
// `IsCallable` abstract operation
|
|
150
163
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
151
|
-
var isCallable$
|
|
164
|
+
var isCallable$g = function (argument) {
|
|
152
165
|
return typeof argument == 'function';
|
|
153
166
|
};
|
|
154
167
|
|
|
155
|
-
var isCallable$
|
|
168
|
+
var isCallable$f = isCallable$g;
|
|
156
169
|
|
|
157
|
-
var isObject$
|
|
158
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
170
|
+
var isObject$7 = function (it) {
|
|
171
|
+
return typeof it == 'object' ? it !== null : isCallable$f(it);
|
|
159
172
|
};
|
|
160
173
|
|
|
161
|
-
var global$
|
|
162
|
-
var isCallable$
|
|
174
|
+
var global$z = global$C;
|
|
175
|
+
var isCallable$e = isCallable$g;
|
|
163
176
|
|
|
164
177
|
var aFunction = function (argument) {
|
|
165
|
-
return isCallable$
|
|
178
|
+
return isCallable$e(argument) ? argument : undefined;
|
|
166
179
|
};
|
|
167
180
|
|
|
168
|
-
var getBuiltIn$
|
|
169
|
-
return arguments.length < 2 ? aFunction(global$
|
|
181
|
+
var getBuiltIn$5 = function (namespace, method) {
|
|
182
|
+
return arguments.length < 2 ? aFunction(global$z[namespace]) : global$z[namespace] && global$z[namespace][method];
|
|
170
183
|
};
|
|
171
184
|
|
|
172
|
-
var uncurryThis$
|
|
185
|
+
var uncurryThis$g = functionUncurryThis;
|
|
173
186
|
|
|
174
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
187
|
+
var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf);
|
|
175
188
|
|
|
176
|
-
var getBuiltIn$
|
|
189
|
+
var getBuiltIn$4 = getBuiltIn$5;
|
|
177
190
|
|
|
178
|
-
var engineUserAgent = getBuiltIn$
|
|
191
|
+
var engineUserAgent = getBuiltIn$4('navigator', 'userAgent') || '';
|
|
179
192
|
|
|
180
|
-
var global$
|
|
193
|
+
var global$y = global$C;
|
|
181
194
|
var userAgent = engineUserAgent;
|
|
182
195
|
|
|
183
|
-
var process = global$
|
|
184
|
-
var Deno = global$
|
|
196
|
+
var process = global$y.process;
|
|
197
|
+
var Deno = global$y.Deno;
|
|
185
198
|
var versions = process && process.versions || Deno && Deno.version;
|
|
186
199
|
var v8 = versions && versions.v8;
|
|
187
200
|
var match, version;
|
|
@@ -205,13 +218,13 @@ if (!version && userAgent) {
|
|
|
205
218
|
|
|
206
219
|
var engineV8Version = version;
|
|
207
220
|
|
|
208
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
221
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
209
222
|
|
|
210
223
|
var V8_VERSION = engineV8Version;
|
|
211
|
-
var fails$
|
|
224
|
+
var fails$c = fails$g;
|
|
212
225
|
|
|
213
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
214
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$
|
|
226
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
227
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$c(function () {
|
|
215
228
|
var symbol = Symbol();
|
|
216
229
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
217
230
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -220,7 +233,7 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$5(function () {
|
|
|
220
233
|
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
221
234
|
});
|
|
222
235
|
|
|
223
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
236
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
224
237
|
|
|
225
238
|
var NATIVE_SYMBOL$1 = nativeSymbol;
|
|
226
239
|
|
|
@@ -228,91 +241,93 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
|
228
241
|
&& !Symbol.sham
|
|
229
242
|
&& typeof Symbol.iterator == 'symbol';
|
|
230
243
|
|
|
231
|
-
var global$
|
|
232
|
-
var getBuiltIn$
|
|
233
|
-
var isCallable$
|
|
234
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
244
|
+
var global$x = global$C;
|
|
245
|
+
var getBuiltIn$3 = getBuiltIn$5;
|
|
246
|
+
var isCallable$d = isCallable$g;
|
|
247
|
+
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
235
248
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
236
249
|
|
|
237
|
-
var Object$
|
|
250
|
+
var Object$4 = global$x.Object;
|
|
238
251
|
|
|
239
252
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
240
253
|
return typeof it == 'symbol';
|
|
241
254
|
} : function (it) {
|
|
242
|
-
var $Symbol = getBuiltIn$
|
|
243
|
-
return isCallable$
|
|
255
|
+
var $Symbol = getBuiltIn$3('Symbol');
|
|
256
|
+
return isCallable$d($Symbol) && isPrototypeOf$2($Symbol.prototype, Object$4(it));
|
|
244
257
|
};
|
|
245
258
|
|
|
246
|
-
var global$
|
|
259
|
+
var global$w = global$C;
|
|
247
260
|
|
|
248
|
-
var String$
|
|
261
|
+
var String$4 = global$w.String;
|
|
249
262
|
|
|
250
|
-
var tryToString$
|
|
263
|
+
var tryToString$2 = function (argument) {
|
|
251
264
|
try {
|
|
252
|
-
return String$
|
|
265
|
+
return String$4(argument);
|
|
253
266
|
} catch (error) {
|
|
254
267
|
return 'Object';
|
|
255
268
|
}
|
|
256
269
|
};
|
|
257
270
|
|
|
258
|
-
var global$
|
|
259
|
-
var isCallable$
|
|
260
|
-
var tryToString = tryToString$
|
|
271
|
+
var global$v = global$C;
|
|
272
|
+
var isCallable$c = isCallable$g;
|
|
273
|
+
var tryToString$1 = tryToString$2;
|
|
261
274
|
|
|
262
|
-
var TypeError$
|
|
275
|
+
var TypeError$d = global$v.TypeError;
|
|
263
276
|
|
|
264
277
|
// `Assert: IsCallable(argument) is true`
|
|
265
|
-
var aCallable$
|
|
266
|
-
if (isCallable$
|
|
267
|
-
throw TypeError$
|
|
278
|
+
var aCallable$3 = function (argument) {
|
|
279
|
+
if (isCallable$c(argument)) return argument;
|
|
280
|
+
throw TypeError$d(tryToString$1(argument) + ' is not a function');
|
|
268
281
|
};
|
|
269
282
|
|
|
270
|
-
var aCallable = aCallable$
|
|
283
|
+
var aCallable$2 = aCallable$3;
|
|
271
284
|
|
|
272
285
|
// `GetMethod` abstract operation
|
|
273
286
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
274
|
-
var getMethod$
|
|
287
|
+
var getMethod$3 = function (V, P) {
|
|
275
288
|
var func = V[P];
|
|
276
|
-
return func == null ? undefined : aCallable(func);
|
|
289
|
+
return func == null ? undefined : aCallable$2(func);
|
|
277
290
|
};
|
|
278
291
|
|
|
279
|
-
var global$
|
|
280
|
-
var call$
|
|
281
|
-
var isCallable$
|
|
282
|
-
var isObject$
|
|
292
|
+
var global$u = global$C;
|
|
293
|
+
var call$a = functionCall;
|
|
294
|
+
var isCallable$b = isCallable$g;
|
|
295
|
+
var isObject$6 = isObject$7;
|
|
283
296
|
|
|
284
|
-
var TypeError$
|
|
297
|
+
var TypeError$c = global$u.TypeError;
|
|
285
298
|
|
|
286
299
|
// `OrdinaryToPrimitive` abstract operation
|
|
287
300
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
288
301
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
289
302
|
var fn, val;
|
|
290
|
-
if (pref === 'string' && isCallable$
|
|
291
|
-
if (isCallable$
|
|
292
|
-
if (pref !== 'string' && isCallable$
|
|
293
|
-
throw TypeError$
|
|
303
|
+
if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$6(val = call$a(fn, input))) return val;
|
|
304
|
+
if (isCallable$b(fn = input.valueOf) && !isObject$6(val = call$a(fn, input))) return val;
|
|
305
|
+
if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$6(val = call$a(fn, input))) return val;
|
|
306
|
+
throw TypeError$c("Can't convert object to primitive value");
|
|
294
307
|
};
|
|
295
308
|
|
|
296
309
|
var shared$4 = {exports: {}};
|
|
297
310
|
|
|
298
|
-
var
|
|
311
|
+
var isPure = false;
|
|
299
312
|
|
|
300
|
-
|
|
301
|
-
|
|
313
|
+
var global$t = global$C;
|
|
314
|
+
|
|
315
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
316
|
+
var defineProperty$3 = Object.defineProperty;
|
|
302
317
|
|
|
303
318
|
var setGlobal$3 = function (key, value) {
|
|
304
319
|
try {
|
|
305
|
-
defineProperty(global$
|
|
320
|
+
defineProperty$3(global$t, key, { value: value, configurable: true, writable: true });
|
|
306
321
|
} catch (error) {
|
|
307
|
-
global$
|
|
322
|
+
global$t[key] = value;
|
|
308
323
|
} return value;
|
|
309
324
|
};
|
|
310
325
|
|
|
311
|
-
var global$
|
|
326
|
+
var global$s = global$C;
|
|
312
327
|
var setGlobal$2 = setGlobal$3;
|
|
313
328
|
|
|
314
329
|
var SHARED = '__core-js_shared__';
|
|
315
|
-
var store$3 = global$
|
|
330
|
+
var store$3 = global$s[SHARED] || setGlobal$2(SHARED, {});
|
|
316
331
|
|
|
317
332
|
var sharedStore = store$3;
|
|
318
333
|
|
|
@@ -321,59 +336,62 @@ var store$2 = sharedStore;
|
|
|
321
336
|
(shared$4.exports = function (key, value) {
|
|
322
337
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
323
338
|
})('versions', []).push({
|
|
324
|
-
version: '3.
|
|
339
|
+
version: '3.22.2',
|
|
325
340
|
mode: 'global',
|
|
326
|
-
copyright: '©
|
|
341
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
342
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE',
|
|
343
|
+
source: 'https://github.com/zloirock/core-js'
|
|
327
344
|
});
|
|
328
345
|
|
|
329
|
-
var global$
|
|
330
|
-
var requireObjectCoercible = requireObjectCoercible$
|
|
346
|
+
var global$r = global$C;
|
|
347
|
+
var requireObjectCoercible$2 = requireObjectCoercible$4;
|
|
331
348
|
|
|
332
|
-
var Object$
|
|
349
|
+
var Object$3 = global$r.Object;
|
|
333
350
|
|
|
334
351
|
// `ToObject` abstract operation
|
|
335
352
|
// https://tc39.es/ecma262/#sec-toobject
|
|
336
|
-
var toObject$
|
|
337
|
-
return Object$
|
|
353
|
+
var toObject$4 = function (argument) {
|
|
354
|
+
return Object$3(requireObjectCoercible$2(argument));
|
|
338
355
|
};
|
|
339
356
|
|
|
340
|
-
var uncurryThis$
|
|
341
|
-
var toObject = toObject$
|
|
357
|
+
var uncurryThis$f = functionUncurryThis;
|
|
358
|
+
var toObject$3 = toObject$4;
|
|
342
359
|
|
|
343
|
-
var hasOwnProperty = uncurryThis$
|
|
360
|
+
var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
|
|
344
361
|
|
|
345
362
|
// `HasOwnProperty` abstract operation
|
|
346
363
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
364
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
347
365
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
348
|
-
return hasOwnProperty(toObject(it), key);
|
|
366
|
+
return hasOwnProperty(toObject$3(it), key);
|
|
349
367
|
};
|
|
350
368
|
|
|
351
|
-
var uncurryThis$
|
|
369
|
+
var uncurryThis$e = functionUncurryThis;
|
|
352
370
|
|
|
353
371
|
var id = 0;
|
|
354
372
|
var postfix = Math.random();
|
|
355
|
-
var toString$
|
|
373
|
+
var toString$5 = uncurryThis$e(1.0.toString);
|
|
356
374
|
|
|
357
375
|
var uid$2 = function (key) {
|
|
358
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$
|
|
376
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
|
|
359
377
|
};
|
|
360
378
|
|
|
361
|
-
var global$
|
|
379
|
+
var global$q = global$C;
|
|
362
380
|
var shared$3 = shared$4.exports;
|
|
363
|
-
var hasOwn$
|
|
381
|
+
var hasOwn$b = hasOwnProperty_1;
|
|
364
382
|
var uid$1 = uid$2;
|
|
365
383
|
var NATIVE_SYMBOL = nativeSymbol;
|
|
366
384
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
367
385
|
|
|
368
386
|
var WellKnownSymbolsStore = shared$3('wks');
|
|
369
|
-
var Symbol$1 = global$
|
|
387
|
+
var Symbol$1 = global$q.Symbol;
|
|
370
388
|
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
371
389
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
372
390
|
|
|
373
|
-
var wellKnownSymbol$
|
|
374
|
-
if (!hasOwn$
|
|
391
|
+
var wellKnownSymbol$e = function (name) {
|
|
392
|
+
if (!hasOwn$b(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
375
393
|
var description = 'Symbol.' + name;
|
|
376
|
-
if (NATIVE_SYMBOL && hasOwn$
|
|
394
|
+
if (NATIVE_SYMBOL && hasOwn$b(Symbol$1, name)) {
|
|
377
395
|
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
378
396
|
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
379
397
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
@@ -383,28 +401,28 @@ var wellKnownSymbol$3 = function (name) {
|
|
|
383
401
|
} return WellKnownSymbolsStore[name];
|
|
384
402
|
};
|
|
385
403
|
|
|
386
|
-
var global$
|
|
387
|
-
var call$
|
|
388
|
-
var isObject$
|
|
404
|
+
var global$p = global$C;
|
|
405
|
+
var call$9 = functionCall;
|
|
406
|
+
var isObject$5 = isObject$7;
|
|
389
407
|
var isSymbol$1 = isSymbol$2;
|
|
390
|
-
var getMethod = getMethod$
|
|
408
|
+
var getMethod$2 = getMethod$3;
|
|
391
409
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
392
|
-
var wellKnownSymbol$
|
|
410
|
+
var wellKnownSymbol$d = wellKnownSymbol$e;
|
|
393
411
|
|
|
394
|
-
var TypeError$
|
|
395
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
412
|
+
var TypeError$b = global$p.TypeError;
|
|
413
|
+
var TO_PRIMITIVE = wellKnownSymbol$d('toPrimitive');
|
|
396
414
|
|
|
397
415
|
// `ToPrimitive` abstract operation
|
|
398
416
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
399
417
|
var toPrimitive$1 = function (input, pref) {
|
|
400
|
-
if (!isObject$
|
|
401
|
-
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
418
|
+
if (!isObject$5(input) || isSymbol$1(input)) return input;
|
|
419
|
+
var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
|
|
402
420
|
var result;
|
|
403
421
|
if (exoticToPrim) {
|
|
404
422
|
if (pref === undefined) pref = 'default';
|
|
405
|
-
result = call$
|
|
406
|
-
if (!isObject$
|
|
407
|
-
throw TypeError$
|
|
423
|
+
result = call$9(exoticToPrim, input, pref);
|
|
424
|
+
if (!isObject$5(result) || isSymbol$1(result)) return result;
|
|
425
|
+
throw TypeError$b("Can't convert object to primitive value");
|
|
408
426
|
}
|
|
409
427
|
if (pref === undefined) pref = 'number';
|
|
410
428
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -415,155 +433,189 @@ var isSymbol = isSymbol$2;
|
|
|
415
433
|
|
|
416
434
|
// `ToPropertyKey` abstract operation
|
|
417
435
|
// https://tc39.es/ecma262/#sec-topropertykey
|
|
418
|
-
var toPropertyKey$
|
|
436
|
+
var toPropertyKey$3 = function (argument) {
|
|
419
437
|
var key = toPrimitive(argument, 'string');
|
|
420
438
|
return isSymbol(key) ? key : key + '';
|
|
421
439
|
};
|
|
422
440
|
|
|
423
|
-
var global$
|
|
424
|
-
var isObject$
|
|
441
|
+
var global$o = global$C;
|
|
442
|
+
var isObject$4 = isObject$7;
|
|
425
443
|
|
|
426
|
-
var document$1 = global$
|
|
444
|
+
var document$1 = global$o.document;
|
|
427
445
|
// typeof document.createElement is 'object' in old IE
|
|
428
|
-
var EXISTS$1 = isObject$
|
|
446
|
+
var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
|
|
429
447
|
|
|
430
|
-
var documentCreateElement$
|
|
448
|
+
var documentCreateElement$2 = function (it) {
|
|
431
449
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
432
450
|
};
|
|
433
451
|
|
|
434
|
-
var DESCRIPTORS$
|
|
435
|
-
var fails$
|
|
436
|
-
var createElement = documentCreateElement$
|
|
452
|
+
var DESCRIPTORS$a = descriptors;
|
|
453
|
+
var fails$b = fails$g;
|
|
454
|
+
var createElement = documentCreateElement$2;
|
|
437
455
|
|
|
438
|
-
//
|
|
439
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
440
|
-
// eslint-disable-next-line es/no-object-defineproperty --
|
|
456
|
+
// Thanks to IE8 for its funny defineProperty
|
|
457
|
+
var ie8DomDefine = !DESCRIPTORS$a && !fails$b(function () {
|
|
458
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
441
459
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
442
460
|
get: function () { return 7; }
|
|
443
461
|
}).a != 7;
|
|
444
462
|
});
|
|
445
463
|
|
|
446
|
-
var DESCRIPTORS$
|
|
447
|
-
var call$
|
|
448
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
449
|
-
var createPropertyDescriptor$
|
|
450
|
-
var toIndexedObject$
|
|
451
|
-
var toPropertyKey$
|
|
452
|
-
var hasOwn$
|
|
464
|
+
var DESCRIPTORS$9 = descriptors;
|
|
465
|
+
var call$8 = functionCall;
|
|
466
|
+
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
467
|
+
var createPropertyDescriptor$4 = createPropertyDescriptor$5;
|
|
468
|
+
var toIndexedObject$4 = toIndexedObject$5;
|
|
469
|
+
var toPropertyKey$2 = toPropertyKey$3;
|
|
470
|
+
var hasOwn$a = hasOwnProperty_1;
|
|
453
471
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
454
472
|
|
|
455
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
456
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
473
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
474
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
457
475
|
|
|
458
476
|
// `Object.getOwnPropertyDescriptor` method
|
|
459
477
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
460
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
461
|
-
O = toIndexedObject$
|
|
462
|
-
P = toPropertyKey$
|
|
478
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
479
|
+
O = toIndexedObject$4(O);
|
|
480
|
+
P = toPropertyKey$2(P);
|
|
463
481
|
if (IE8_DOM_DEFINE$1) try {
|
|
464
|
-
return $getOwnPropertyDescriptor(O, P);
|
|
482
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
465
483
|
} catch (error) { /* empty */ }
|
|
466
|
-
if (hasOwn$
|
|
484
|
+
if (hasOwn$a(O, P)) return createPropertyDescriptor$4(!call$8(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
467
485
|
};
|
|
468
486
|
|
|
469
487
|
var objectDefineProperty = {};
|
|
470
488
|
|
|
471
|
-
var
|
|
472
|
-
var
|
|
489
|
+
var DESCRIPTORS$8 = descriptors;
|
|
490
|
+
var fails$a = fails$g;
|
|
491
|
+
|
|
492
|
+
// V8 ~ Chrome 36-
|
|
493
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
494
|
+
var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$a(function () {
|
|
495
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
496
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
497
|
+
value: 42,
|
|
498
|
+
writable: false
|
|
499
|
+
}).prototype != 42;
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
var global$n = global$C;
|
|
503
|
+
var isObject$3 = isObject$7;
|
|
473
504
|
|
|
474
|
-
var String$
|
|
475
|
-
var TypeError$
|
|
505
|
+
var String$3 = global$n.String;
|
|
506
|
+
var TypeError$a = global$n.TypeError;
|
|
476
507
|
|
|
477
508
|
// `Assert: Type(argument) is Object`
|
|
478
|
-
var anObject$
|
|
479
|
-
if (isObject$
|
|
480
|
-
throw TypeError$
|
|
509
|
+
var anObject$b = function (argument) {
|
|
510
|
+
if (isObject$3(argument)) return argument;
|
|
511
|
+
throw TypeError$a(String$3(argument) + ' is not an object');
|
|
481
512
|
};
|
|
482
513
|
|
|
483
|
-
var global$
|
|
484
|
-
var DESCRIPTORS$
|
|
514
|
+
var global$m = global$C;
|
|
515
|
+
var DESCRIPTORS$7 = descriptors;
|
|
485
516
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
486
|
-
var
|
|
487
|
-
var
|
|
517
|
+
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
518
|
+
var anObject$a = anObject$b;
|
|
519
|
+
var toPropertyKey$1 = toPropertyKey$3;
|
|
488
520
|
|
|
489
|
-
var TypeError$
|
|
490
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
521
|
+
var TypeError$9 = global$m.TypeError;
|
|
522
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
491
523
|
var $defineProperty = Object.defineProperty;
|
|
524
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
525
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
526
|
+
var ENUMERABLE = 'enumerable';
|
|
527
|
+
var CONFIGURABLE$1 = 'configurable';
|
|
528
|
+
var WRITABLE = 'writable';
|
|
492
529
|
|
|
493
530
|
// `Object.defineProperty` method
|
|
494
531
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
495
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
496
|
-
anObject$
|
|
497
|
-
P = toPropertyKey(P);
|
|
498
|
-
anObject$
|
|
532
|
+
objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
533
|
+
anObject$a(O);
|
|
534
|
+
P = toPropertyKey$1(P);
|
|
535
|
+
anObject$a(Attributes);
|
|
536
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
537
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
538
|
+
if (current && current[WRITABLE]) {
|
|
539
|
+
O[P] = Attributes.value;
|
|
540
|
+
Attributes = {
|
|
541
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
542
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
543
|
+
writable: false
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
} return $defineProperty(O, P, Attributes);
|
|
547
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
548
|
+
anObject$a(O);
|
|
549
|
+
P = toPropertyKey$1(P);
|
|
550
|
+
anObject$a(Attributes);
|
|
499
551
|
if (IE8_DOM_DEFINE) try {
|
|
500
552
|
return $defineProperty(O, P, Attributes);
|
|
501
553
|
} catch (error) { /* empty */ }
|
|
502
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError$
|
|
554
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$9('Accessors not supported');
|
|
503
555
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
504
556
|
return O;
|
|
505
557
|
};
|
|
506
558
|
|
|
507
|
-
var DESCRIPTORS$
|
|
508
|
-
var definePropertyModule$
|
|
509
|
-
var createPropertyDescriptor = createPropertyDescriptor$
|
|
559
|
+
var DESCRIPTORS$6 = descriptors;
|
|
560
|
+
var definePropertyModule$4 = objectDefineProperty;
|
|
561
|
+
var createPropertyDescriptor$3 = createPropertyDescriptor$5;
|
|
510
562
|
|
|
511
|
-
var createNonEnumerableProperty$
|
|
512
|
-
return definePropertyModule$
|
|
563
|
+
var createNonEnumerableProperty$5 = DESCRIPTORS$6 ? function (object, key, value) {
|
|
564
|
+
return definePropertyModule$4.f(object, key, createPropertyDescriptor$3(1, value));
|
|
513
565
|
} : function (object, key, value) {
|
|
514
566
|
object[key] = value;
|
|
515
567
|
return object;
|
|
516
568
|
};
|
|
517
569
|
|
|
518
|
-
var redefine$
|
|
570
|
+
var redefine$7 = {exports: {}};
|
|
519
571
|
|
|
520
|
-
var uncurryThis$
|
|
521
|
-
var isCallable$
|
|
572
|
+
var uncurryThis$d = functionUncurryThis;
|
|
573
|
+
var isCallable$a = isCallable$g;
|
|
522
574
|
var store$1 = sharedStore;
|
|
523
575
|
|
|
524
|
-
var functionToString = uncurryThis$
|
|
576
|
+
var functionToString = uncurryThis$d(Function.toString);
|
|
525
577
|
|
|
526
578
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
527
|
-
if (!isCallable$
|
|
579
|
+
if (!isCallable$a(store$1.inspectSource)) {
|
|
528
580
|
store$1.inspectSource = function (it) {
|
|
529
581
|
return functionToString(it);
|
|
530
582
|
};
|
|
531
583
|
}
|
|
532
584
|
|
|
533
|
-
var inspectSource$
|
|
585
|
+
var inspectSource$3 = store$1.inspectSource;
|
|
534
586
|
|
|
535
|
-
var global$
|
|
536
|
-
var isCallable$
|
|
537
|
-
var inspectSource$
|
|
587
|
+
var global$l = global$C;
|
|
588
|
+
var isCallable$9 = isCallable$g;
|
|
589
|
+
var inspectSource$2 = inspectSource$3;
|
|
538
590
|
|
|
539
|
-
var WeakMap$1 = global$
|
|
591
|
+
var WeakMap$1 = global$l.WeakMap;
|
|
540
592
|
|
|
541
|
-
var nativeWeakMap = isCallable$
|
|
593
|
+
var nativeWeakMap = isCallable$9(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
|
|
542
594
|
|
|
543
595
|
var shared$2 = shared$4.exports;
|
|
544
596
|
var uid = uid$2;
|
|
545
597
|
|
|
546
598
|
var keys = shared$2('keys');
|
|
547
599
|
|
|
548
|
-
var sharedKey$
|
|
600
|
+
var sharedKey$3 = function (key) {
|
|
549
601
|
return keys[key] || (keys[key] = uid(key));
|
|
550
602
|
};
|
|
551
603
|
|
|
552
604
|
var hiddenKeys$4 = {};
|
|
553
605
|
|
|
554
606
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
555
|
-
var global$
|
|
556
|
-
var uncurryThis$
|
|
557
|
-
var isObject = isObject$
|
|
558
|
-
var createNonEnumerableProperty$
|
|
559
|
-
var hasOwn$
|
|
607
|
+
var global$k = global$C;
|
|
608
|
+
var uncurryThis$c = functionUncurryThis;
|
|
609
|
+
var isObject$2 = isObject$7;
|
|
610
|
+
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
611
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
560
612
|
var shared$1 = sharedStore;
|
|
561
|
-
var sharedKey$
|
|
613
|
+
var sharedKey$2 = sharedKey$3;
|
|
562
614
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
563
615
|
|
|
564
616
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
565
|
-
var TypeError$
|
|
566
|
-
var WeakMap = global$
|
|
617
|
+
var TypeError$8 = global$k.TypeError;
|
|
618
|
+
var WeakMap = global$k.WeakMap;
|
|
567
619
|
var set, get, has;
|
|
568
620
|
|
|
569
621
|
var enforce = function (it) {
|
|
@@ -573,19 +625,19 @@ var enforce = function (it) {
|
|
|
573
625
|
var getterFor = function (TYPE) {
|
|
574
626
|
return function (it) {
|
|
575
627
|
var state;
|
|
576
|
-
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
577
|
-
throw TypeError$
|
|
628
|
+
if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
|
|
629
|
+
throw TypeError$8('Incompatible receiver, ' + TYPE + ' required');
|
|
578
630
|
} return state;
|
|
579
631
|
};
|
|
580
632
|
};
|
|
581
633
|
|
|
582
634
|
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
583
635
|
var store = shared$1.state || (shared$1.state = new WeakMap());
|
|
584
|
-
var wmget = uncurryThis$
|
|
585
|
-
var wmhas = uncurryThis$
|
|
586
|
-
var wmset = uncurryThis$
|
|
636
|
+
var wmget = uncurryThis$c(store.get);
|
|
637
|
+
var wmhas = uncurryThis$c(store.has);
|
|
638
|
+
var wmset = uncurryThis$c(store.set);
|
|
587
639
|
set = function (it, metadata) {
|
|
588
|
-
if (wmhas(store, it)) throw new TypeError$
|
|
640
|
+
if (wmhas(store, it)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);
|
|
589
641
|
metadata.facade = it;
|
|
590
642
|
wmset(store, it, metadata);
|
|
591
643
|
return metadata;
|
|
@@ -597,19 +649,19 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
|
597
649
|
return wmhas(store, it);
|
|
598
650
|
};
|
|
599
651
|
} else {
|
|
600
|
-
var STATE = sharedKey$
|
|
652
|
+
var STATE = sharedKey$2('state');
|
|
601
653
|
hiddenKeys$3[STATE] = true;
|
|
602
654
|
set = function (it, metadata) {
|
|
603
|
-
if (hasOwn$
|
|
655
|
+
if (hasOwn$9(it, STATE)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);
|
|
604
656
|
metadata.facade = it;
|
|
605
|
-
createNonEnumerableProperty$
|
|
657
|
+
createNonEnumerableProperty$4(it, STATE, metadata);
|
|
606
658
|
return metadata;
|
|
607
659
|
};
|
|
608
660
|
get = function (it) {
|
|
609
|
-
return hasOwn$
|
|
661
|
+
return hasOwn$9(it, STATE) ? it[STATE] : {};
|
|
610
662
|
};
|
|
611
663
|
has = function (it) {
|
|
612
|
-
return hasOwn$
|
|
664
|
+
return hasOwn$9(it, STATE);
|
|
613
665
|
};
|
|
614
666
|
}
|
|
615
667
|
|
|
@@ -621,17 +673,17 @@ var internalState = {
|
|
|
621
673
|
getterFor: getterFor
|
|
622
674
|
};
|
|
623
675
|
|
|
624
|
-
var DESCRIPTORS$
|
|
625
|
-
var hasOwn$
|
|
676
|
+
var DESCRIPTORS$5 = descriptors;
|
|
677
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
626
678
|
|
|
627
679
|
var FunctionPrototype = Function.prototype;
|
|
628
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
629
|
-
var getDescriptor = DESCRIPTORS$
|
|
680
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
681
|
+
var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
|
|
630
682
|
|
|
631
|
-
var EXISTS = hasOwn$
|
|
683
|
+
var EXISTS = hasOwn$8(FunctionPrototype, 'name');
|
|
632
684
|
// additional protection from minified / mangled / dropped function names
|
|
633
685
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
634
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$
|
|
686
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
635
687
|
|
|
636
688
|
var functionName = {
|
|
637
689
|
EXISTS: EXISTS,
|
|
@@ -639,38 +691,38 @@ var functionName = {
|
|
|
639
691
|
CONFIGURABLE: CONFIGURABLE
|
|
640
692
|
};
|
|
641
693
|
|
|
642
|
-
var global$
|
|
643
|
-
var isCallable$
|
|
644
|
-
var hasOwn$
|
|
645
|
-
var createNonEnumerableProperty$
|
|
694
|
+
var global$j = global$C;
|
|
695
|
+
var isCallable$8 = isCallable$g;
|
|
696
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
697
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
|
|
646
698
|
var setGlobal$1 = setGlobal$3;
|
|
647
|
-
var inspectSource = inspectSource$
|
|
648
|
-
var InternalStateModule = internalState;
|
|
649
|
-
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
699
|
+
var inspectSource$1 = inspectSource$3;
|
|
700
|
+
var InternalStateModule$4 = internalState;
|
|
701
|
+
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
650
702
|
|
|
651
|
-
var getInternalState$
|
|
652
|
-
var enforceInternalState = InternalStateModule.enforce;
|
|
703
|
+
var getInternalState$3 = InternalStateModule$4.get;
|
|
704
|
+
var enforceInternalState = InternalStateModule$4.enforce;
|
|
653
705
|
var TEMPLATE = String(String).split('String');
|
|
654
706
|
|
|
655
|
-
(redefine$
|
|
707
|
+
(redefine$7.exports = function (O, key, value, options) {
|
|
656
708
|
var unsafe = options ? !!options.unsafe : false;
|
|
657
709
|
var simple = options ? !!options.enumerable : false;
|
|
658
710
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
659
711
|
var name = options && options.name !== undefined ? options.name : key;
|
|
660
712
|
var state;
|
|
661
|
-
if (isCallable$
|
|
713
|
+
if (isCallable$8(value)) {
|
|
662
714
|
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
663
715
|
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
664
716
|
}
|
|
665
|
-
if (!hasOwn$
|
|
666
|
-
createNonEnumerableProperty$
|
|
717
|
+
if (!hasOwn$7(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
718
|
+
createNonEnumerableProperty$3(value, 'name', name);
|
|
667
719
|
}
|
|
668
720
|
state = enforceInternalState(value);
|
|
669
721
|
if (!state.source) {
|
|
670
722
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
671
723
|
}
|
|
672
724
|
}
|
|
673
|
-
if (O === global$
|
|
725
|
+
if (O === global$j) {
|
|
674
726
|
if (simple) O[key] = value;
|
|
675
727
|
else setGlobal$1(key, value);
|
|
676
728
|
return;
|
|
@@ -680,66 +732,66 @@ var TEMPLATE = String(String).split('String');
|
|
|
680
732
|
simple = true;
|
|
681
733
|
}
|
|
682
734
|
if (simple) O[key] = value;
|
|
683
|
-
else createNonEnumerableProperty$
|
|
735
|
+
else createNonEnumerableProperty$3(O, key, value);
|
|
684
736
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
685
737
|
})(Function.prototype, 'toString', function toString() {
|
|
686
|
-
return isCallable$
|
|
738
|
+
return isCallable$8(this) && getInternalState$3(this).source || inspectSource$1(this);
|
|
687
739
|
});
|
|
688
740
|
|
|
689
741
|
var objectGetOwnPropertyNames = {};
|
|
690
742
|
|
|
691
743
|
var ceil = Math.ceil;
|
|
692
|
-
var floor = Math.floor;
|
|
744
|
+
var floor$3 = Math.floor;
|
|
693
745
|
|
|
694
746
|
// `ToIntegerOrInfinity` abstract operation
|
|
695
747
|
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
696
|
-
var toIntegerOrInfinity$
|
|
748
|
+
var toIntegerOrInfinity$3 = function (argument) {
|
|
697
749
|
var number = +argument;
|
|
698
750
|
// eslint-disable-next-line no-self-compare -- safe
|
|
699
|
-
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
751
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor$3 : ceil)(number);
|
|
700
752
|
};
|
|
701
753
|
|
|
702
|
-
var toIntegerOrInfinity$
|
|
754
|
+
var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
|
|
703
755
|
|
|
704
|
-
var max = Math.max;
|
|
705
|
-
var min$
|
|
756
|
+
var max$1 = Math.max;
|
|
757
|
+
var min$2 = Math.min;
|
|
706
758
|
|
|
707
759
|
// Helper for a popular repeating case of the spec:
|
|
708
760
|
// Let integer be ? ToInteger(index).
|
|
709
761
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
710
|
-
var toAbsoluteIndex$
|
|
711
|
-
var integer = toIntegerOrInfinity$
|
|
712
|
-
return integer < 0 ? max(integer + length, 0) : min$
|
|
762
|
+
var toAbsoluteIndex$2 = function (index, length) {
|
|
763
|
+
var integer = toIntegerOrInfinity$2(index);
|
|
764
|
+
return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
|
|
713
765
|
};
|
|
714
766
|
|
|
715
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$
|
|
767
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
|
|
716
768
|
|
|
717
|
-
var min = Math.min;
|
|
769
|
+
var min$1 = Math.min;
|
|
718
770
|
|
|
719
771
|
// `ToLength` abstract operation
|
|
720
772
|
// https://tc39.es/ecma262/#sec-tolength
|
|
721
|
-
var toLength$
|
|
722
|
-
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
773
|
+
var toLength$2 = function (argument) {
|
|
774
|
+
return argument > 0 ? min$1(toIntegerOrInfinity$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
723
775
|
};
|
|
724
776
|
|
|
725
|
-
var toLength = toLength$
|
|
777
|
+
var toLength$1 = toLength$2;
|
|
726
778
|
|
|
727
779
|
// `LengthOfArrayLike` abstract operation
|
|
728
780
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
729
|
-
var lengthOfArrayLike$
|
|
730
|
-
return toLength(obj.length);
|
|
781
|
+
var lengthOfArrayLike$3 = function (obj) {
|
|
782
|
+
return toLength$1(obj.length);
|
|
731
783
|
};
|
|
732
784
|
|
|
733
|
-
var toIndexedObject$
|
|
734
|
-
var toAbsoluteIndex = toAbsoluteIndex$
|
|
735
|
-
var lengthOfArrayLike = lengthOfArrayLike$
|
|
785
|
+
var toIndexedObject$3 = toIndexedObject$5;
|
|
786
|
+
var toAbsoluteIndex$1 = toAbsoluteIndex$2;
|
|
787
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$3;
|
|
736
788
|
|
|
737
789
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
738
|
-
var createMethod = function (IS_INCLUDES) {
|
|
790
|
+
var createMethod$1 = function (IS_INCLUDES) {
|
|
739
791
|
return function ($this, el, fromIndex) {
|
|
740
|
-
var O = toIndexedObject$
|
|
741
|
-
var length = lengthOfArrayLike(O);
|
|
742
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
|
792
|
+
var O = toIndexedObject$3($this);
|
|
793
|
+
var length = lengthOfArrayLike$2(O);
|
|
794
|
+
var index = toAbsoluteIndex$1(fromIndex, length);
|
|
743
795
|
var value;
|
|
744
796
|
// Array#includes uses SameValueZero equality algorithm
|
|
745
797
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
@@ -757,29 +809,29 @@ var createMethod = function (IS_INCLUDES) {
|
|
|
757
809
|
var arrayIncludes = {
|
|
758
810
|
// `Array.prototype.includes` method
|
|
759
811
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
760
|
-
includes: createMethod(true),
|
|
812
|
+
includes: createMethod$1(true),
|
|
761
813
|
// `Array.prototype.indexOf` method
|
|
762
814
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
763
|
-
indexOf: createMethod(false)
|
|
815
|
+
indexOf: createMethod$1(false)
|
|
764
816
|
};
|
|
765
817
|
|
|
766
|
-
var uncurryThis$
|
|
767
|
-
var hasOwn$
|
|
768
|
-
var toIndexedObject$
|
|
818
|
+
var uncurryThis$b = functionUncurryThis;
|
|
819
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
820
|
+
var toIndexedObject$2 = toIndexedObject$5;
|
|
769
821
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
770
822
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
771
823
|
|
|
772
|
-
var push = uncurryThis$
|
|
824
|
+
var push$3 = uncurryThis$b([].push);
|
|
773
825
|
|
|
774
826
|
var objectKeysInternal = function (object, names) {
|
|
775
|
-
var O = toIndexedObject$
|
|
827
|
+
var O = toIndexedObject$2(object);
|
|
776
828
|
var i = 0;
|
|
777
829
|
var result = [];
|
|
778
830
|
var key;
|
|
779
|
-
for (key in O) !hasOwn$
|
|
831
|
+
for (key in O) !hasOwn$6(hiddenKeys$2, key) && hasOwn$6(O, key) && push$3(result, key);
|
|
780
832
|
// Don't enum bug & hidden keys
|
|
781
|
-
while (names.length > i) if (hasOwn$
|
|
782
|
-
~indexOf$1(result, key) || push(result, key);
|
|
833
|
+
while (names.length > i) if (hasOwn$6(O, key = names[i++])) {
|
|
834
|
+
~indexOf$1(result, key) || push$3(result, key);
|
|
783
835
|
}
|
|
784
836
|
return result;
|
|
785
837
|
};
|
|
@@ -802,48 +854,50 @@ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
|
|
|
802
854
|
|
|
803
855
|
// `Object.getOwnPropertyNames` method
|
|
804
856
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
805
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
857
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
806
858
|
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
807
859
|
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
808
860
|
};
|
|
809
861
|
|
|
810
862
|
var objectGetOwnPropertySymbols = {};
|
|
811
863
|
|
|
812
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
864
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
813
865
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
814
866
|
|
|
815
|
-
var getBuiltIn$
|
|
816
|
-
var uncurryThis$
|
|
867
|
+
var getBuiltIn$2 = getBuiltIn$5;
|
|
868
|
+
var uncurryThis$a = functionUncurryThis;
|
|
817
869
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
818
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
819
|
-
var anObject$
|
|
870
|
+
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
871
|
+
var anObject$9 = anObject$b;
|
|
820
872
|
|
|
821
|
-
var concat = uncurryThis$
|
|
873
|
+
var concat$1 = uncurryThis$a([].concat);
|
|
822
874
|
|
|
823
875
|
// all object keys, includes non-enumerable and symbols
|
|
824
|
-
var ownKeys$1 = getBuiltIn$
|
|
825
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
826
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
827
|
-
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
876
|
+
var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
877
|
+
var keys = getOwnPropertyNamesModule.f(anObject$9(it));
|
|
878
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
879
|
+
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
828
880
|
};
|
|
829
881
|
|
|
830
|
-
var hasOwn = hasOwnProperty_1;
|
|
882
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
831
883
|
var ownKeys = ownKeys$1;
|
|
832
884
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
833
|
-
var definePropertyModule$
|
|
885
|
+
var definePropertyModule$3 = objectDefineProperty;
|
|
834
886
|
|
|
835
|
-
var copyConstructorProperties$1 = function (target, source) {
|
|
887
|
+
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
836
888
|
var keys = ownKeys(source);
|
|
837
|
-
var defineProperty = definePropertyModule$
|
|
889
|
+
var defineProperty = definePropertyModule$3.f;
|
|
838
890
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
839
891
|
for (var i = 0; i < keys.length; i++) {
|
|
840
892
|
var key = keys[i];
|
|
841
|
-
if (!hasOwn(target, key)
|
|
893
|
+
if (!hasOwn$5(target, key) && !(exceptions && hasOwn$5(exceptions, key))) {
|
|
894
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
895
|
+
}
|
|
842
896
|
}
|
|
843
897
|
};
|
|
844
898
|
|
|
845
|
-
var fails$
|
|
846
|
-
var isCallable$
|
|
899
|
+
var fails$9 = fails$g;
|
|
900
|
+
var isCallable$7 = isCallable$g;
|
|
847
901
|
|
|
848
902
|
var replacement = /#|\.prototype\./;
|
|
849
903
|
|
|
@@ -851,7 +905,7 @@ var isForced$1 = function (feature, detection) {
|
|
|
851
905
|
var value = data[normalize(feature)];
|
|
852
906
|
return value == POLYFILL ? true
|
|
853
907
|
: value == NATIVE ? false
|
|
854
|
-
: isCallable$
|
|
908
|
+
: isCallable$7(detection) ? fails$9(detection)
|
|
855
909
|
: !!detection;
|
|
856
910
|
};
|
|
857
911
|
|
|
@@ -865,10 +919,10 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
|
865
919
|
|
|
866
920
|
var isForced_1 = isForced$1;
|
|
867
921
|
|
|
868
|
-
var global$
|
|
869
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
870
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$
|
|
871
|
-
var redefine = redefine$
|
|
922
|
+
var global$i = global$C;
|
|
923
|
+
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
924
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
|
|
925
|
+
var redefine$6 = redefine$7.exports;
|
|
872
926
|
var setGlobal = setGlobal$3;
|
|
873
927
|
var copyConstructorProperties = copyConstructorProperties$1;
|
|
874
928
|
var isForced = isForced_1;
|
|
@@ -894,16 +948,16 @@ var _export = function (options, source) {
|
|
|
894
948
|
var STATIC = options.stat;
|
|
895
949
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
896
950
|
if (GLOBAL) {
|
|
897
|
-
target = global$
|
|
951
|
+
target = global$i;
|
|
898
952
|
} else if (STATIC) {
|
|
899
|
-
target = global$
|
|
953
|
+
target = global$i[TARGET] || setGlobal(TARGET, {});
|
|
900
954
|
} else {
|
|
901
|
-
target = (global$
|
|
955
|
+
target = (global$i[TARGET] || {}).prototype;
|
|
902
956
|
}
|
|
903
957
|
if (target) for (key in source) {
|
|
904
958
|
sourceProperty = source[key];
|
|
905
959
|
if (options.noTargetGet) {
|
|
906
|
-
descriptor = getOwnPropertyDescriptor(target, key);
|
|
960
|
+
descriptor = getOwnPropertyDescriptor$2(target, key);
|
|
907
961
|
targetProperty = descriptor && descriptor.value;
|
|
908
962
|
} else targetProperty = target[key];
|
|
909
963
|
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
@@ -914,30 +968,30 @@ var _export = function (options, source) {
|
|
|
914
968
|
}
|
|
915
969
|
// add a flag to not completely full polyfills
|
|
916
970
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
917
|
-
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
971
|
+
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
918
972
|
}
|
|
919
973
|
// extend global
|
|
920
|
-
redefine(target, key, sourceProperty, options);
|
|
974
|
+
redefine$6(target, key, sourceProperty, options);
|
|
921
975
|
}
|
|
922
976
|
};
|
|
923
977
|
|
|
924
|
-
var wellKnownSymbol$
|
|
978
|
+
var wellKnownSymbol$c = wellKnownSymbol$e;
|
|
925
979
|
|
|
926
|
-
var TO_STRING_TAG$
|
|
980
|
+
var TO_STRING_TAG$3 = wellKnownSymbol$c('toStringTag');
|
|
927
981
|
var test = {};
|
|
928
982
|
|
|
929
|
-
test[TO_STRING_TAG$
|
|
983
|
+
test[TO_STRING_TAG$3] = 'z';
|
|
930
984
|
|
|
931
985
|
var toStringTagSupport = String(test) === '[object z]';
|
|
932
986
|
|
|
933
|
-
var global$
|
|
987
|
+
var global$h = global$C;
|
|
934
988
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
935
|
-
var isCallable = isCallable$
|
|
989
|
+
var isCallable$6 = isCallable$g;
|
|
936
990
|
var classofRaw = classofRaw$1;
|
|
937
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
991
|
+
var wellKnownSymbol$b = wellKnownSymbol$e;
|
|
938
992
|
|
|
939
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
940
|
-
var Object$
|
|
993
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$b('toStringTag');
|
|
994
|
+
var Object$2 = global$h.Object;
|
|
941
995
|
|
|
942
996
|
// ES3 wrong here
|
|
943
997
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
@@ -950,34 +1004,35 @@ var tryGet = function (it, key) {
|
|
|
950
1004
|
};
|
|
951
1005
|
|
|
952
1006
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
953
|
-
var classof$
|
|
1007
|
+
var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
954
1008
|
var O, tag, result;
|
|
955
1009
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
956
1010
|
// @@toStringTag case
|
|
957
|
-
: typeof (tag = tryGet(O = Object$
|
|
1011
|
+
: typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$2)) == 'string' ? tag
|
|
958
1012
|
// builtinTag case
|
|
959
1013
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
960
1014
|
// ES3 arguments fallback
|
|
961
|
-
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
1015
|
+
: (result = classofRaw(O)) == 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
|
|
962
1016
|
};
|
|
963
1017
|
|
|
964
|
-
var global$
|
|
965
|
-
var classof = classof$
|
|
1018
|
+
var global$g = global$C;
|
|
1019
|
+
var classof$4 = classof$5;
|
|
966
1020
|
|
|
967
|
-
var String$
|
|
1021
|
+
var String$2 = global$g.String;
|
|
968
1022
|
|
|
969
|
-
var toString$
|
|
970
|
-
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
971
|
-
return String$
|
|
1023
|
+
var toString$4 = function (argument) {
|
|
1024
|
+
if (classof$4(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
1025
|
+
return String$2(argument);
|
|
972
1026
|
};
|
|
973
1027
|
|
|
974
|
-
var anObject$
|
|
1028
|
+
var anObject$8 = anObject$b;
|
|
975
1029
|
|
|
976
1030
|
// `RegExp.prototype.flags` getter implementation
|
|
977
1031
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
978
1032
|
var regexpFlags$1 = function () {
|
|
979
|
-
var that = anObject$
|
|
1033
|
+
var that = anObject$8(this);
|
|
980
1034
|
var result = '';
|
|
1035
|
+
if (that.hasIndices) result += 'd';
|
|
981
1036
|
if (that.global) result += 'g';
|
|
982
1037
|
if (that.ignoreCase) result += 'i';
|
|
983
1038
|
if (that.multiline) result += 'm';
|
|
@@ -987,13 +1042,13 @@ var regexpFlags$1 = function () {
|
|
|
987
1042
|
return result;
|
|
988
1043
|
};
|
|
989
1044
|
|
|
990
|
-
var fails$
|
|
991
|
-
var global$
|
|
1045
|
+
var fails$8 = fails$g;
|
|
1046
|
+
var global$f = global$C;
|
|
992
1047
|
|
|
993
1048
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
994
|
-
var $RegExp$2 = global$
|
|
1049
|
+
var $RegExp$2 = global$f.RegExp;
|
|
995
1050
|
|
|
996
|
-
var UNSUPPORTED_Y$1 = fails$
|
|
1051
|
+
var UNSUPPORTED_Y$1 = fails$8(function () {
|
|
997
1052
|
var re = $RegExp$2('a', 'y');
|
|
998
1053
|
re.lastIndex = 2;
|
|
999
1054
|
return re.exec('abcd') != null;
|
|
@@ -1001,11 +1056,11 @@ var UNSUPPORTED_Y$1 = fails$2(function () {
|
|
|
1001
1056
|
|
|
1002
1057
|
// UC Browser bug
|
|
1003
1058
|
// https://github.com/zloirock/core-js/issues/1008
|
|
1004
|
-
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$
|
|
1059
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$8(function () {
|
|
1005
1060
|
return !$RegExp$2('a', 'y').sticky;
|
|
1006
1061
|
});
|
|
1007
1062
|
|
|
1008
|
-
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$
|
|
1063
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$8(function () {
|
|
1009
1064
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1010
1065
|
var re = $RegExp$2('^r', 'gy');
|
|
1011
1066
|
re.lastIndex = 2;
|
|
@@ -1018,55 +1073,58 @@ var regexpStickyHelpers = {
|
|
|
1018
1073
|
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
1019
1074
|
};
|
|
1020
1075
|
|
|
1076
|
+
var objectDefineProperties = {};
|
|
1077
|
+
|
|
1021
1078
|
var internalObjectKeys = objectKeysInternal;
|
|
1022
1079
|
var enumBugKeys$1 = enumBugKeys$3;
|
|
1023
1080
|
|
|
1024
1081
|
// `Object.keys` method
|
|
1025
1082
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
1026
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1027
|
-
var objectKeys$
|
|
1083
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
1084
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
1028
1085
|
return internalObjectKeys(O, enumBugKeys$1);
|
|
1029
1086
|
};
|
|
1030
1087
|
|
|
1031
|
-
var DESCRIPTORS = descriptors;
|
|
1032
|
-
var
|
|
1033
|
-
var
|
|
1034
|
-
var
|
|
1035
|
-
var
|
|
1088
|
+
var DESCRIPTORS$4 = descriptors;
|
|
1089
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1090
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
1091
|
+
var anObject$7 = anObject$b;
|
|
1092
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
1093
|
+
var objectKeys$1 = objectKeys$2;
|
|
1036
1094
|
|
|
1037
1095
|
// `Object.defineProperties` method
|
|
1038
1096
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1039
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1040
|
-
|
|
1041
|
-
anObject$
|
|
1042
|
-
var props = toIndexedObject(Properties);
|
|
1043
|
-
var keys = objectKeys(Properties);
|
|
1097
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
1098
|
+
objectDefineProperties.f = DESCRIPTORS$4 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1099
|
+
anObject$7(O);
|
|
1100
|
+
var props = toIndexedObject$1(Properties);
|
|
1101
|
+
var keys = objectKeys$1(Properties);
|
|
1044
1102
|
var length = keys.length;
|
|
1045
1103
|
var index = 0;
|
|
1046
1104
|
var key;
|
|
1047
|
-
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1105
|
+
while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]);
|
|
1048
1106
|
return O;
|
|
1049
1107
|
};
|
|
1050
1108
|
|
|
1051
|
-
var getBuiltIn = getBuiltIn$
|
|
1109
|
+
var getBuiltIn$1 = getBuiltIn$5;
|
|
1052
1110
|
|
|
1053
|
-
var html$1 = getBuiltIn('document', 'documentElement');
|
|
1111
|
+
var html$1 = getBuiltIn$1('document', 'documentElement');
|
|
1054
1112
|
|
|
1055
1113
|
/* global ActiveXObject -- old IE, WSH */
|
|
1056
1114
|
|
|
1057
|
-
var anObject = anObject$
|
|
1058
|
-
var
|
|
1115
|
+
var anObject$6 = anObject$b;
|
|
1116
|
+
var definePropertiesModule = objectDefineProperties;
|
|
1059
1117
|
var enumBugKeys = enumBugKeys$3;
|
|
1060
1118
|
var hiddenKeys = hiddenKeys$4;
|
|
1061
1119
|
var html = html$1;
|
|
1062
|
-
var documentCreateElement = documentCreateElement$
|
|
1063
|
-
var sharedKey = sharedKey$
|
|
1120
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
1121
|
+
var sharedKey$1 = sharedKey$3;
|
|
1064
1122
|
|
|
1065
1123
|
var GT$1 = '>';
|
|
1066
1124
|
var LT$1 = '<';
|
|
1067
1125
|
var PROTOTYPE = 'prototype';
|
|
1068
1126
|
var SCRIPT = 'script';
|
|
1069
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1127
|
+
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
1070
1128
|
|
|
1071
1129
|
var EmptyConstructor = function () { /* empty */ };
|
|
1072
1130
|
|
|
@@ -1086,7 +1144,7 @@ var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
|
1086
1144
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
1087
1145
|
var NullProtoObjectViaIFrame = function () {
|
|
1088
1146
|
// Thrash, waste and sodomy: IE GC bug
|
|
1089
|
-
var iframe = documentCreateElement('iframe');
|
|
1147
|
+
var iframe = documentCreateElement$1('iframe');
|
|
1090
1148
|
var JS = 'java' + SCRIPT + ':';
|
|
1091
1149
|
var iframeDocument;
|
|
1092
1150
|
iframe.style.display = 'none';
|
|
@@ -1120,40 +1178,41 @@ var NullProtoObject = function () {
|
|
|
1120
1178
|
return NullProtoObject();
|
|
1121
1179
|
};
|
|
1122
1180
|
|
|
1123
|
-
hiddenKeys[IE_PROTO] = true;
|
|
1181
|
+
hiddenKeys[IE_PROTO$1] = true;
|
|
1124
1182
|
|
|
1125
1183
|
// `Object.create` method
|
|
1126
1184
|
// https://tc39.es/ecma262/#sec-object.create
|
|
1185
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
1127
1186
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
1128
1187
|
var result;
|
|
1129
1188
|
if (O !== null) {
|
|
1130
|
-
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
1189
|
+
EmptyConstructor[PROTOTYPE] = anObject$6(O);
|
|
1131
1190
|
result = new EmptyConstructor();
|
|
1132
1191
|
EmptyConstructor[PROTOTYPE] = null;
|
|
1133
1192
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1134
|
-
result[IE_PROTO] = O;
|
|
1193
|
+
result[IE_PROTO$1] = O;
|
|
1135
1194
|
} else result = NullProtoObject();
|
|
1136
|
-
return Properties === undefined ? result :
|
|
1195
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1137
1196
|
};
|
|
1138
1197
|
|
|
1139
|
-
var fails$
|
|
1140
|
-
var global$
|
|
1198
|
+
var fails$7 = fails$g;
|
|
1199
|
+
var global$e = global$C;
|
|
1141
1200
|
|
|
1142
1201
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1143
|
-
var $RegExp$1 = global$
|
|
1202
|
+
var $RegExp$1 = global$e.RegExp;
|
|
1144
1203
|
|
|
1145
|
-
var regexpUnsupportedDotAll = fails$
|
|
1204
|
+
var regexpUnsupportedDotAll = fails$7(function () {
|
|
1146
1205
|
var re = $RegExp$1('.', 's');
|
|
1147
1206
|
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
1148
1207
|
});
|
|
1149
1208
|
|
|
1150
|
-
var fails = fails$
|
|
1151
|
-
var global$
|
|
1209
|
+
var fails$6 = fails$g;
|
|
1210
|
+
var global$d = global$C;
|
|
1152
1211
|
|
|
1153
1212
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1154
|
-
var $RegExp = global$
|
|
1213
|
+
var $RegExp = global$d.RegExp;
|
|
1155
1214
|
|
|
1156
|
-
var regexpUnsupportedNcg = fails(function () {
|
|
1215
|
+
var regexpUnsupportedNcg = fails$6(function () {
|
|
1157
1216
|
var re = $RegExp('(?<a>b)', 'g');
|
|
1158
1217
|
return re.exec('b').groups.a !== 'b' ||
|
|
1159
1218
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
@@ -1161,30 +1220,30 @@ var regexpUnsupportedNcg = fails(function () {
|
|
|
1161
1220
|
|
|
1162
1221
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1163
1222
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1164
|
-
var call = functionCall;
|
|
1165
|
-
var uncurryThis = functionUncurryThis;
|
|
1166
|
-
var toString = toString$
|
|
1223
|
+
var call$7 = functionCall;
|
|
1224
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
1225
|
+
var toString$3 = toString$4;
|
|
1167
1226
|
var regexpFlags = regexpFlags$1;
|
|
1168
1227
|
var stickyHelpers = regexpStickyHelpers;
|
|
1169
1228
|
var shared = shared$4.exports;
|
|
1170
|
-
var create = objectCreate;
|
|
1171
|
-
var getInternalState = internalState.get;
|
|
1229
|
+
var create$3 = objectCreate;
|
|
1230
|
+
var getInternalState$2 = internalState.get;
|
|
1172
1231
|
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
1173
1232
|
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
1174
1233
|
|
|
1175
1234
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1176
1235
|
var nativeExec = RegExp.prototype.exec;
|
|
1177
1236
|
var patchedExec = nativeExec;
|
|
1178
|
-
var charAt = uncurryThis(''.charAt);
|
|
1179
|
-
var indexOf = uncurryThis(''.indexOf);
|
|
1180
|
-
var replace = uncurryThis(''.replace);
|
|
1181
|
-
var stringSlice = uncurryThis(''.slice);
|
|
1237
|
+
var charAt$4 = uncurryThis$9(''.charAt);
|
|
1238
|
+
var indexOf = uncurryThis$9(''.indexOf);
|
|
1239
|
+
var replace$3 = uncurryThis$9(''.replace);
|
|
1240
|
+
var stringSlice$4 = uncurryThis$9(''.slice);
|
|
1182
1241
|
|
|
1183
1242
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1184
1243
|
var re1 = /a/;
|
|
1185
1244
|
var re2 = /b*/g;
|
|
1186
|
-
call(nativeExec, re1, 'a');
|
|
1187
|
-
call(nativeExec, re2, 'a');
|
|
1245
|
+
call$7(nativeExec, re1, 'a');
|
|
1246
|
+
call$7(nativeExec, re2, 'a');
|
|
1188
1247
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
1189
1248
|
})();
|
|
1190
1249
|
|
|
@@ -1198,34 +1257,34 @@ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPP
|
|
|
1198
1257
|
if (PATCH) {
|
|
1199
1258
|
patchedExec = function exec(string) {
|
|
1200
1259
|
var re = this;
|
|
1201
|
-
var state = getInternalState(re);
|
|
1202
|
-
var str = toString(string);
|
|
1260
|
+
var state = getInternalState$2(re);
|
|
1261
|
+
var str = toString$3(string);
|
|
1203
1262
|
var raw = state.raw;
|
|
1204
1263
|
var result, reCopy, lastIndex, match, i, object, group;
|
|
1205
1264
|
|
|
1206
1265
|
if (raw) {
|
|
1207
1266
|
raw.lastIndex = re.lastIndex;
|
|
1208
|
-
result = call(patchedExec, raw, str);
|
|
1267
|
+
result = call$7(patchedExec, raw, str);
|
|
1209
1268
|
re.lastIndex = raw.lastIndex;
|
|
1210
1269
|
return result;
|
|
1211
1270
|
}
|
|
1212
1271
|
|
|
1213
1272
|
var groups = state.groups;
|
|
1214
1273
|
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
1215
|
-
var flags = call(regexpFlags, re);
|
|
1274
|
+
var flags = call$7(regexpFlags, re);
|
|
1216
1275
|
var source = re.source;
|
|
1217
1276
|
var charsAdded = 0;
|
|
1218
1277
|
var strCopy = str;
|
|
1219
1278
|
|
|
1220
1279
|
if (sticky) {
|
|
1221
|
-
flags = replace(flags, 'y', '');
|
|
1280
|
+
flags = replace$3(flags, 'y', '');
|
|
1222
1281
|
if (indexOf(flags, 'g') === -1) {
|
|
1223
1282
|
flags += 'g';
|
|
1224
1283
|
}
|
|
1225
1284
|
|
|
1226
|
-
strCopy = stringSlice(str, re.lastIndex);
|
|
1285
|
+
strCopy = stringSlice$4(str, re.lastIndex);
|
|
1227
1286
|
// Support anchored sticky behavior.
|
|
1228
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
|
|
1287
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$4(str, re.lastIndex - 1) !== '\n')) {
|
|
1229
1288
|
source = '(?: ' + source + ')';
|
|
1230
1289
|
strCopy = ' ' + strCopy;
|
|
1231
1290
|
charsAdded++;
|
|
@@ -1240,12 +1299,12 @@ if (PATCH) {
|
|
|
1240
1299
|
}
|
|
1241
1300
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
1242
1301
|
|
|
1243
|
-
match = call(nativeExec, sticky ? reCopy : re, strCopy);
|
|
1302
|
+
match = call$7(nativeExec, sticky ? reCopy : re, strCopy);
|
|
1244
1303
|
|
|
1245
1304
|
if (sticky) {
|
|
1246
1305
|
if (match) {
|
|
1247
|
-
match.input = stringSlice(match.input, charsAdded);
|
|
1248
|
-
match[0] = stringSlice(match[0], charsAdded);
|
|
1306
|
+
match.input = stringSlice$4(match.input, charsAdded);
|
|
1307
|
+
match[0] = stringSlice$4(match[0], charsAdded);
|
|
1249
1308
|
match.index = re.lastIndex;
|
|
1250
1309
|
re.lastIndex += match[0].length;
|
|
1251
1310
|
} else re.lastIndex = 0;
|
|
@@ -1255,7 +1314,7 @@ if (PATCH) {
|
|
|
1255
1314
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1256
1315
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1257
1316
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
1258
|
-
call(nativeReplace, match[0], reCopy, function () {
|
|
1317
|
+
call$7(nativeReplace, match[0], reCopy, function () {
|
|
1259
1318
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
1260
1319
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
1261
1320
|
}
|
|
@@ -1263,7 +1322,7 @@ if (PATCH) {
|
|
|
1263
1322
|
}
|
|
1264
1323
|
|
|
1265
1324
|
if (match && groups) {
|
|
1266
|
-
match.groups = object = create(null);
|
|
1325
|
+
match.groups = object = create$3(null);
|
|
1267
1326
|
for (i = 0; i < groups.length; i++) {
|
|
1268
1327
|
group = groups[i];
|
|
1269
1328
|
object[group[0]] = match[group[1]];
|
|
@@ -1276,202 +1335,2792 @@ if (PATCH) {
|
|
|
1276
1335
|
|
|
1277
1336
|
var regexpExec = patchedExec;
|
|
1278
1337
|
|
|
1279
|
-
var
|
|
1280
|
-
var exec = regexpExec;
|
|
1338
|
+
var $$4 = _export;
|
|
1339
|
+
var exec$3 = regexpExec;
|
|
1281
1340
|
|
|
1282
1341
|
// `RegExp.prototype.exec` method
|
|
1283
1342
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
1284
|
-
|
|
1285
|
-
exec: exec
|
|
1343
|
+
$$4({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, {
|
|
1344
|
+
exec: exec$3
|
|
1286
1345
|
});
|
|
1287
1346
|
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1347
|
+
// iterable DOM collections
|
|
1348
|
+
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
1349
|
+
var domIterables = {
|
|
1350
|
+
CSSRuleList: 0,
|
|
1351
|
+
CSSStyleDeclaration: 0,
|
|
1352
|
+
CSSValueList: 0,
|
|
1353
|
+
ClientRectList: 0,
|
|
1354
|
+
DOMRectList: 0,
|
|
1355
|
+
DOMStringList: 0,
|
|
1356
|
+
DOMTokenList: 1,
|
|
1357
|
+
DataTransferItemList: 0,
|
|
1358
|
+
FileList: 0,
|
|
1359
|
+
HTMLAllCollection: 0,
|
|
1360
|
+
HTMLCollection: 0,
|
|
1361
|
+
HTMLFormElement: 0,
|
|
1362
|
+
HTMLSelectElement: 0,
|
|
1363
|
+
MediaList: 0,
|
|
1364
|
+
MimeTypeArray: 0,
|
|
1365
|
+
NamedNodeMap: 0,
|
|
1366
|
+
NodeList: 1,
|
|
1367
|
+
PaintRequestList: 0,
|
|
1368
|
+
Plugin: 0,
|
|
1369
|
+
PluginArray: 0,
|
|
1370
|
+
SVGLengthList: 0,
|
|
1371
|
+
SVGNumberList: 0,
|
|
1372
|
+
SVGPathSegList: 0,
|
|
1373
|
+
SVGPointList: 0,
|
|
1374
|
+
SVGStringList: 0,
|
|
1375
|
+
SVGTransformList: 0,
|
|
1376
|
+
SourceBufferList: 0,
|
|
1377
|
+
StyleSheetList: 0,
|
|
1378
|
+
TextTrackCueList: 0,
|
|
1379
|
+
TextTrackList: 0,
|
|
1380
|
+
TouchList: 0
|
|
1381
|
+
};
|
|
1298
1382
|
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
}
|
|
1302
|
-
/**
|
|
1303
|
-
* @param {HebrewCalendar.Options} options
|
|
1304
|
-
* @return {string}
|
|
1305
|
-
*/
|
|
1383
|
+
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
1384
|
+
var documentCreateElement = documentCreateElement$2;
|
|
1306
1385
|
|
|
1307
|
-
|
|
1308
|
-
|
|
1386
|
+
var classList = documentCreateElement('span').classList;
|
|
1387
|
+
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
1309
1388
|
|
|
1310
|
-
|
|
1311
|
-
fileName += 'h';
|
|
1312
|
-
}
|
|
1389
|
+
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
1313
1390
|
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1391
|
+
var wellKnownSymbol$a = wellKnownSymbol$e;
|
|
1392
|
+
var create$2 = objectCreate;
|
|
1393
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
1317
1394
|
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
fileName += '_' + makeAnchor(name).replace(/[-]/g, '_');
|
|
1321
|
-
}
|
|
1395
|
+
var UNSCOPABLES = wellKnownSymbol$a('unscopables');
|
|
1396
|
+
var ArrayPrototype$1 = Array.prototype;
|
|
1322
1397
|
|
|
1323
|
-
|
|
1398
|
+
// Array.prototype[@@unscopables]
|
|
1399
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1400
|
+
if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
|
|
1401
|
+
definePropertyModule$1.f(ArrayPrototype$1, UNSCOPABLES, {
|
|
1402
|
+
configurable: true,
|
|
1403
|
+
value: create$2(null)
|
|
1404
|
+
});
|
|
1324
1405
|
}
|
|
1325
|
-
/**
|
|
1326
|
-
* @param {number} number
|
|
1327
|
-
* @return {string}
|
|
1328
|
-
*/
|
|
1329
1406
|
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1407
|
+
// add a key to Array.prototype[@@unscopables]
|
|
1408
|
+
var addToUnscopables$1 = function (key) {
|
|
1409
|
+
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
1410
|
+
};
|
|
1334
1411
|
|
|
1335
|
-
|
|
1336
|
-
}
|
|
1337
|
-
/**
|
|
1338
|
-
* @param {number} number
|
|
1339
|
-
* @return {string}
|
|
1340
|
-
*/
|
|
1412
|
+
var iterators = {};
|
|
1341
1413
|
|
|
1342
|
-
|
|
1343
|
-
if (number < 0) {
|
|
1344
|
-
return '-00' + pad4(-number);
|
|
1345
|
-
} else if (number < 10) {
|
|
1346
|
-
return '000' + number;
|
|
1347
|
-
} else if (number < 100) {
|
|
1348
|
-
return '00' + number;
|
|
1349
|
-
} else if (number < 1000) {
|
|
1350
|
-
return '0' + number;
|
|
1351
|
-
}
|
|
1414
|
+
var fails$5 = fails$g;
|
|
1352
1415
|
|
|
1353
|
-
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
* @param {Date} date
|
|
1360
|
-
* @return {string}
|
|
1361
|
-
*/
|
|
1416
|
+
var correctPrototypeGetter = !fails$5(function () {
|
|
1417
|
+
function F() { /* empty */ }
|
|
1418
|
+
F.prototype.constructor = null;
|
|
1419
|
+
// eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
1420
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1421
|
+
});
|
|
1362
1422
|
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
* @return {string}
|
|
1370
|
-
*/
|
|
1423
|
+
var global$c = global$C;
|
|
1424
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
1425
|
+
var isCallable$5 = isCallable$g;
|
|
1426
|
+
var toObject$2 = toObject$4;
|
|
1427
|
+
var sharedKey = sharedKey$3;
|
|
1428
|
+
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1371
1429
|
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1430
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1431
|
+
var Object$1 = global$c.Object;
|
|
1432
|
+
var ObjectPrototype = Object$1.prototype;
|
|
1433
|
+
|
|
1434
|
+
// `Object.getPrototypeOf` method
|
|
1435
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1436
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$1.getPrototypeOf : function (O) {
|
|
1437
|
+
var object = toObject$2(O);
|
|
1438
|
+
if (hasOwn$4(object, IE_PROTO)) return object[IE_PROTO];
|
|
1439
|
+
var constructor = object.constructor;
|
|
1440
|
+
if (isCallable$5(constructor) && object instanceof constructor) {
|
|
1441
|
+
return constructor.prototype;
|
|
1442
|
+
} return object instanceof Object$1 ? ObjectPrototype : null;
|
|
1443
|
+
};
|
|
1383
1444
|
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1445
|
+
var fails$4 = fails$g;
|
|
1446
|
+
var isCallable$4 = isCallable$g;
|
|
1447
|
+
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1448
|
+
var redefine$5 = redefine$7.exports;
|
|
1449
|
+
var wellKnownSymbol$9 = wellKnownSymbol$e;
|
|
1450
|
+
|
|
1451
|
+
var ITERATOR$6 = wellKnownSymbol$9('iterator');
|
|
1452
|
+
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1453
|
+
|
|
1454
|
+
// `%IteratorPrototype%` object
|
|
1455
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1456
|
+
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1457
|
+
|
|
1458
|
+
/* eslint-disable es-x/no-array-prototype-keys -- safe */
|
|
1459
|
+
if ([].keys) {
|
|
1460
|
+
arrayIterator = [].keys();
|
|
1461
|
+
// Safari 8 has buggy iterators w/o `next`
|
|
1462
|
+
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
1463
|
+
else {
|
|
1464
|
+
PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
|
|
1465
|
+
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
|
|
1466
|
+
}
|
|
1388
1467
|
}
|
|
1389
|
-
/**
|
|
1390
|
-
* Returns a category and subcategory name
|
|
1391
|
-
* @param {Event} ev
|
|
1392
|
-
* @return {string[]}
|
|
1393
|
-
*/
|
|
1394
1468
|
|
|
1395
|
-
function
|
|
1396
|
-
|
|
1469
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$4(function () {
|
|
1470
|
+
var test = {};
|
|
1471
|
+
// FF44- legacy iterators case
|
|
1472
|
+
return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
|
|
1473
|
+
});
|
|
1397
1474
|
|
|
1398
|
-
|
|
1399
|
-
return ['zmanim', 'fast'];
|
|
1400
|
-
}
|
|
1475
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
1401
1476
|
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1477
|
+
// `%IteratorPrototype%[@@iterator]()` method
|
|
1478
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1479
|
+
if (!isCallable$4(IteratorPrototype$2[ITERATOR$6])) {
|
|
1480
|
+
redefine$5(IteratorPrototype$2, ITERATOR$6, function () {
|
|
1481
|
+
return this;
|
|
1482
|
+
});
|
|
1483
|
+
}
|
|
1405
1484
|
|
|
1406
|
-
|
|
1407
|
-
|
|
1485
|
+
var iteratorsCore = {
|
|
1486
|
+
IteratorPrototype: IteratorPrototype$2,
|
|
1487
|
+
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1488
|
+
};
|
|
1408
1489
|
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1490
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
1491
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
1492
|
+
var wellKnownSymbol$8 = wellKnownSymbol$e;
|
|
1412
1493
|
|
|
1413
|
-
|
|
1414
|
-
return ['dafyomi'];
|
|
1494
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
|
|
1415
1495
|
|
|
1416
|
-
|
|
1417
|
-
|
|
1496
|
+
var setToStringTag$4 = function (target, TAG, STATIC) {
|
|
1497
|
+
if (target && !STATIC) target = target.prototype;
|
|
1498
|
+
if (target && !hasOwn$3(target, TO_STRING_TAG$1)) {
|
|
1499
|
+
defineProperty$2(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
|
|
1500
|
+
}
|
|
1501
|
+
};
|
|
1418
1502
|
|
|
1419
|
-
|
|
1420
|
-
|
|
1503
|
+
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
1504
|
+
var create$1 = objectCreate;
|
|
1505
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$5;
|
|
1506
|
+
var setToStringTag$3 = setToStringTag$4;
|
|
1507
|
+
var Iterators$4 = iterators;
|
|
1421
1508
|
|
|
1422
|
-
|
|
1423
|
-
return ['holiday', 'fast'];
|
|
1509
|
+
var returnThis$1 = function () { return this; };
|
|
1424
1510
|
|
|
1425
|
-
|
|
1426
|
-
|
|
1511
|
+
var createIteratorConstructor$2 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
1512
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1513
|
+
IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor$2(+!ENUMERABLE_NEXT, next) });
|
|
1514
|
+
setToStringTag$3(IteratorConstructor, TO_STRING_TAG, false);
|
|
1515
|
+
Iterators$4[TO_STRING_TAG] = returnThis$1;
|
|
1516
|
+
return IteratorConstructor;
|
|
1517
|
+
};
|
|
1427
1518
|
|
|
1428
|
-
|
|
1429
|
-
|
|
1519
|
+
var global$b = global$C;
|
|
1520
|
+
var isCallable$3 = isCallable$g;
|
|
1430
1521
|
|
|
1431
|
-
|
|
1432
|
-
|
|
1522
|
+
var String$1 = global$b.String;
|
|
1523
|
+
var TypeError$7 = global$b.TypeError;
|
|
1433
1524
|
|
|
1434
|
-
|
|
1435
|
-
|
|
1525
|
+
var aPossiblePrototype$1 = function (argument) {
|
|
1526
|
+
if (typeof argument == 'object' || isCallable$3(argument)) return argument;
|
|
1527
|
+
throw TypeError$7("Can't set " + String$1(argument) + ' as a prototype');
|
|
1528
|
+
};
|
|
1436
1529
|
|
|
1437
|
-
|
|
1438
|
-
return ['user'];
|
|
1530
|
+
/* eslint-disable no-proto -- safe */
|
|
1439
1531
|
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1532
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
1533
|
+
var anObject$5 = anObject$b;
|
|
1534
|
+
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1535
|
+
|
|
1536
|
+
// `Object.setPrototypeOf` method
|
|
1537
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1538
|
+
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1539
|
+
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
|
|
1540
|
+
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1541
|
+
var CORRECT_SETTER = false;
|
|
1542
|
+
var test = {};
|
|
1543
|
+
var setter;
|
|
1544
|
+
try {
|
|
1545
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
1546
|
+
setter = uncurryThis$8(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1547
|
+
setter(test, []);
|
|
1548
|
+
CORRECT_SETTER = test instanceof Array;
|
|
1549
|
+
} catch (error) { /* empty */ }
|
|
1550
|
+
return function setPrototypeOf(O, proto) {
|
|
1551
|
+
anObject$5(O);
|
|
1552
|
+
aPossiblePrototype(proto);
|
|
1553
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
1554
|
+
else O.__proto__ = proto;
|
|
1555
|
+
return O;
|
|
1556
|
+
};
|
|
1557
|
+
}() : undefined);
|
|
1558
|
+
|
|
1559
|
+
var $$3 = _export;
|
|
1560
|
+
var call$6 = functionCall;
|
|
1561
|
+
var FunctionName = functionName;
|
|
1562
|
+
var isCallable$2 = isCallable$g;
|
|
1563
|
+
var createIteratorConstructor$1 = createIteratorConstructor$2;
|
|
1564
|
+
var getPrototypeOf = objectGetPrototypeOf;
|
|
1565
|
+
var setPrototypeOf = objectSetPrototypeOf;
|
|
1566
|
+
var setToStringTag$2 = setToStringTag$4;
|
|
1567
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
|
|
1568
|
+
var redefine$4 = redefine$7.exports;
|
|
1569
|
+
var wellKnownSymbol$7 = wellKnownSymbol$e;
|
|
1570
|
+
var Iterators$3 = iterators;
|
|
1571
|
+
var IteratorsCore = iteratorsCore;
|
|
1572
|
+
|
|
1573
|
+
var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
|
|
1574
|
+
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1575
|
+
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1576
|
+
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1577
|
+
var ITERATOR$5 = wellKnownSymbol$7('iterator');
|
|
1578
|
+
var KEYS = 'keys';
|
|
1579
|
+
var VALUES = 'values';
|
|
1580
|
+
var ENTRIES = 'entries';
|
|
1581
|
+
|
|
1582
|
+
var returnThis = function () { return this; };
|
|
1583
|
+
|
|
1584
|
+
var defineIterator$2 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
1585
|
+
createIteratorConstructor$1(IteratorConstructor, NAME, next);
|
|
1586
|
+
|
|
1587
|
+
var getIterationMethod = function (KIND) {
|
|
1588
|
+
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
1589
|
+
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
1590
|
+
switch (KIND) {
|
|
1591
|
+
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
1592
|
+
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
1593
|
+
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
1594
|
+
} return function () { return new IteratorConstructor(this); };
|
|
1595
|
+
};
|
|
1596
|
+
|
|
1597
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1598
|
+
var INCORRECT_VALUES_NAME = false;
|
|
1599
|
+
var IterablePrototype = Iterable.prototype;
|
|
1600
|
+
var nativeIterator = IterablePrototype[ITERATOR$5]
|
|
1601
|
+
|| IterablePrototype['@@iterator']
|
|
1602
|
+
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1603
|
+
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
1604
|
+
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
1605
|
+
var CurrentIteratorPrototype, methods, KEY;
|
|
1606
|
+
|
|
1607
|
+
// fix native
|
|
1608
|
+
if (anyNativeIterator) {
|
|
1609
|
+
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
1610
|
+
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
1611
|
+
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1612
|
+
if (setPrototypeOf) {
|
|
1613
|
+
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
1614
|
+
} else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$5])) {
|
|
1615
|
+
redefine$4(CurrentIteratorPrototype, ITERATOR$5, returnThis);
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
// Set @@toStringTag to native iterators
|
|
1619
|
+
setToStringTag$2(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
1620
|
+
}
|
|
1443
1621
|
}
|
|
1444
1622
|
|
|
1445
|
-
|
|
1446
|
-
|
|
1623
|
+
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
1624
|
+
if (PROPER_FUNCTION_NAME$1 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1625
|
+
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
1626
|
+
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
1627
|
+
} else {
|
|
1628
|
+
INCORRECT_VALUES_NAME = true;
|
|
1629
|
+
defaultIterator = function values() { return call$6(nativeIterator, this); };
|
|
1630
|
+
}
|
|
1447
1631
|
}
|
|
1448
1632
|
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1633
|
+
// export additional methods
|
|
1634
|
+
if (DEFAULT) {
|
|
1635
|
+
methods = {
|
|
1636
|
+
values: getIterationMethod(VALUES),
|
|
1637
|
+
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
1638
|
+
entries: getIterationMethod(ENTRIES)
|
|
1639
|
+
};
|
|
1640
|
+
if (FORCED) for (KEY in methods) {
|
|
1641
|
+
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1642
|
+
redefine$4(IterablePrototype, KEY, methods[KEY]);
|
|
1643
|
+
}
|
|
1644
|
+
} else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1645
|
+
}
|
|
1452
1646
|
|
|
1453
|
-
|
|
1454
|
-
|
|
1647
|
+
// define iterator
|
|
1648
|
+
if (IterablePrototype[ITERATOR$5] !== defaultIterator) {
|
|
1649
|
+
redefine$4(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
|
|
1650
|
+
}
|
|
1651
|
+
Iterators$3[NAME] = defaultIterator;
|
|
1455
1652
|
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
case 'Pesach Sheni':
|
|
1459
|
-
case 'Erev Purim':
|
|
1460
|
-
case 'Purim Katan':
|
|
1461
|
-
case 'Shushan Purim':
|
|
1462
|
-
case 'Tu B\'Av':
|
|
1463
|
-
case 'Tu BiShvat':
|
|
1464
|
-
case 'Rosh Hashana LaBehemot':
|
|
1465
|
-
return ['holiday', 'minor'];
|
|
1653
|
+
return methods;
|
|
1654
|
+
};
|
|
1466
1655
|
|
|
1467
|
-
|
|
1468
|
-
|
|
1656
|
+
var toIndexedObject = toIndexedObject$5;
|
|
1657
|
+
var addToUnscopables = addToUnscopables$1;
|
|
1658
|
+
var Iterators$2 = iterators;
|
|
1659
|
+
var InternalStateModule$3 = internalState;
|
|
1660
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1661
|
+
var defineIterator$1 = defineIterator$2;
|
|
1662
|
+
var DESCRIPTORS$3 = descriptors;
|
|
1469
1663
|
|
|
1470
|
-
|
|
1471
|
-
|
|
1664
|
+
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1665
|
+
var setInternalState$3 = InternalStateModule$3.set;
|
|
1666
|
+
var getInternalState$1 = InternalStateModule$3.getterFor(ARRAY_ITERATOR);
|
|
1667
|
+
|
|
1668
|
+
// `Array.prototype.entries` method
|
|
1669
|
+
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
1670
|
+
// `Array.prototype.keys` method
|
|
1671
|
+
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
1672
|
+
// `Array.prototype.values` method
|
|
1673
|
+
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
1674
|
+
// `Array.prototype[@@iterator]` method
|
|
1675
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
1676
|
+
// `CreateArrayIterator` internal method
|
|
1677
|
+
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
1678
|
+
var es_array_iterator = defineIterator$1(Array, 'Array', function (iterated, kind) {
|
|
1679
|
+
setInternalState$3(this, {
|
|
1680
|
+
type: ARRAY_ITERATOR,
|
|
1681
|
+
target: toIndexedObject(iterated), // target
|
|
1682
|
+
index: 0, // next index
|
|
1683
|
+
kind: kind // kind
|
|
1684
|
+
});
|
|
1685
|
+
// `%ArrayIteratorPrototype%.next` method
|
|
1686
|
+
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
1687
|
+
}, function () {
|
|
1688
|
+
var state = getInternalState$1(this);
|
|
1689
|
+
var target = state.target;
|
|
1690
|
+
var kind = state.kind;
|
|
1691
|
+
var index = state.index++;
|
|
1692
|
+
if (!target || index >= target.length) {
|
|
1693
|
+
state.target = undefined;
|
|
1694
|
+
return { value: undefined, done: true };
|
|
1472
1695
|
}
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1696
|
+
if (kind == 'keys') return { value: index, done: false };
|
|
1697
|
+
if (kind == 'values') return { value: target[index], done: false };
|
|
1698
|
+
return { value: [index, target[index]], done: false };
|
|
1699
|
+
}, 'values');
|
|
1700
|
+
|
|
1701
|
+
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
1702
|
+
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
1703
|
+
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
1704
|
+
var values = Iterators$2.Arguments = Iterators$2.Array;
|
|
1705
|
+
|
|
1706
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1707
|
+
addToUnscopables('keys');
|
|
1708
|
+
addToUnscopables('values');
|
|
1709
|
+
addToUnscopables('entries');
|
|
1710
|
+
|
|
1711
|
+
// V8 ~ Chrome 45- bug
|
|
1712
|
+
if (DESCRIPTORS$3 && values.name !== 'values') try {
|
|
1713
|
+
defineProperty$1(values, 'name', { value: 'values' });
|
|
1714
|
+
} catch (error) { /* empty */ }
|
|
1715
|
+
|
|
1716
|
+
var global$a = global$C;
|
|
1717
|
+
var DOMIterables = domIterables;
|
|
1718
|
+
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1719
|
+
var ArrayIteratorMethods = es_array_iterator;
|
|
1720
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$5;
|
|
1721
|
+
var wellKnownSymbol$6 = wellKnownSymbol$e;
|
|
1722
|
+
|
|
1723
|
+
var ITERATOR$4 = wellKnownSymbol$6('iterator');
|
|
1724
|
+
var TO_STRING_TAG = wellKnownSymbol$6('toStringTag');
|
|
1725
|
+
var ArrayValues = ArrayIteratorMethods.values;
|
|
1726
|
+
|
|
1727
|
+
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
1728
|
+
if (CollectionPrototype) {
|
|
1729
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1730
|
+
if (CollectionPrototype[ITERATOR$4] !== ArrayValues) try {
|
|
1731
|
+
createNonEnumerableProperty(CollectionPrototype, ITERATOR$4, ArrayValues);
|
|
1732
|
+
} catch (error) {
|
|
1733
|
+
CollectionPrototype[ITERATOR$4] = ArrayValues;
|
|
1734
|
+
}
|
|
1735
|
+
if (!CollectionPrototype[TO_STRING_TAG]) {
|
|
1736
|
+
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
|
|
1737
|
+
}
|
|
1738
|
+
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
1739
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1740
|
+
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
1741
|
+
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
1742
|
+
} catch (error) {
|
|
1743
|
+
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
};
|
|
1748
|
+
|
|
1749
|
+
for (var COLLECTION_NAME in DOMIterables) {
|
|
1750
|
+
handlePrototype(global$a[COLLECTION_NAME] && global$a[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1754
|
+
|
|
1755
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1756
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$3;
|
|
1757
|
+
var toString$2 = toString$4;
|
|
1758
|
+
var requireObjectCoercible$1 = requireObjectCoercible$4;
|
|
1759
|
+
|
|
1760
|
+
var charAt$3 = uncurryThis$7(''.charAt);
|
|
1761
|
+
var charCodeAt$1 = uncurryThis$7(''.charCodeAt);
|
|
1762
|
+
var stringSlice$3 = uncurryThis$7(''.slice);
|
|
1763
|
+
|
|
1764
|
+
var createMethod = function (CONVERT_TO_STRING) {
|
|
1765
|
+
return function ($this, pos) {
|
|
1766
|
+
var S = toString$2(requireObjectCoercible$1($this));
|
|
1767
|
+
var position = toIntegerOrInfinity(pos);
|
|
1768
|
+
var size = S.length;
|
|
1769
|
+
var first, second;
|
|
1770
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
1771
|
+
first = charCodeAt$1(S, position);
|
|
1772
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
1773
|
+
|| (second = charCodeAt$1(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
|
1774
|
+
? CONVERT_TO_STRING
|
|
1775
|
+
? charAt$3(S, position)
|
|
1776
|
+
: first
|
|
1777
|
+
: CONVERT_TO_STRING
|
|
1778
|
+
? stringSlice$3(S, position, position + 2)
|
|
1779
|
+
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
1780
|
+
};
|
|
1781
|
+
};
|
|
1782
|
+
|
|
1783
|
+
var stringMultibyte = {
|
|
1784
|
+
// `String.prototype.codePointAt` method
|
|
1785
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
1786
|
+
codeAt: createMethod(false),
|
|
1787
|
+
// `String.prototype.at` method
|
|
1788
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
|
1789
|
+
charAt: createMethod(true)
|
|
1790
|
+
};
|
|
1791
|
+
|
|
1792
|
+
var charAt$2 = stringMultibyte.charAt;
|
|
1793
|
+
var toString$1 = toString$4;
|
|
1794
|
+
var InternalStateModule$2 = internalState;
|
|
1795
|
+
var defineIterator = defineIterator$2;
|
|
1796
|
+
|
|
1797
|
+
var STRING_ITERATOR = 'String Iterator';
|
|
1798
|
+
var setInternalState$2 = InternalStateModule$2.set;
|
|
1799
|
+
var getInternalState = InternalStateModule$2.getterFor(STRING_ITERATOR);
|
|
1800
|
+
|
|
1801
|
+
// `String.prototype[@@iterator]` method
|
|
1802
|
+
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
|
|
1803
|
+
defineIterator(String, 'String', function (iterated) {
|
|
1804
|
+
setInternalState$2(this, {
|
|
1805
|
+
type: STRING_ITERATOR,
|
|
1806
|
+
string: toString$1(iterated),
|
|
1807
|
+
index: 0
|
|
1808
|
+
});
|
|
1809
|
+
// `%StringIteratorPrototype%.next` method
|
|
1810
|
+
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
|
|
1811
|
+
}, function next() {
|
|
1812
|
+
var state = getInternalState(this);
|
|
1813
|
+
var string = state.string;
|
|
1814
|
+
var index = state.index;
|
|
1815
|
+
var point;
|
|
1816
|
+
if (index >= string.length) return { value: undefined, done: true };
|
|
1817
|
+
point = charAt$2(string, index);
|
|
1818
|
+
state.index += point.length;
|
|
1819
|
+
return { value: point, done: false };
|
|
1820
|
+
});
|
|
1821
|
+
|
|
1822
|
+
var fails$3 = fails$g;
|
|
1823
|
+
var wellKnownSymbol$5 = wellKnownSymbol$e;
|
|
1824
|
+
var IS_PURE = isPure;
|
|
1825
|
+
|
|
1826
|
+
var ITERATOR$3 = wellKnownSymbol$5('iterator');
|
|
1827
|
+
|
|
1828
|
+
var nativeUrl = !fails$3(function () {
|
|
1829
|
+
// eslint-disable-next-line unicorn/relative-url-style -- required for testing
|
|
1830
|
+
var url = new URL('b?a=1&b=2&c=3', 'http://a');
|
|
1831
|
+
var searchParams = url.searchParams;
|
|
1832
|
+
var result = '';
|
|
1833
|
+
url.pathname = 'c%20d';
|
|
1834
|
+
searchParams.forEach(function (value, key) {
|
|
1835
|
+
searchParams['delete']('b');
|
|
1836
|
+
result += key + value;
|
|
1837
|
+
});
|
|
1838
|
+
return (IS_PURE && !url.toJSON)
|
|
1839
|
+
|| !searchParams.sort
|
|
1840
|
+
|| url.href !== 'http://a/c%20d?a=1&c=3'
|
|
1841
|
+
|| searchParams.get('c') !== '3'
|
|
1842
|
+
|| String(new URLSearchParams('?a=1')) !== 'a=1'
|
|
1843
|
+
|| !searchParams[ITERATOR$3]
|
|
1844
|
+
// throws in Edge
|
|
1845
|
+
|| new URL('https://a@b').username !== 'a'
|
|
1846
|
+
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
|
|
1847
|
+
// not punycoded in Edge
|
|
1848
|
+
|| new URL('http://тест').host !== 'xn--e1aybc'
|
|
1849
|
+
// not escaped in Chrome 62-
|
|
1850
|
+
|| new URL('http://a#б').hash !== '#%D0%B1'
|
|
1851
|
+
// fails in Chrome 66-
|
|
1852
|
+
|| result !== 'a1c3'
|
|
1853
|
+
// throws in Safari
|
|
1854
|
+
|| new URL('http://x', undefined).host !== 'x';
|
|
1855
|
+
});
|
|
1856
|
+
|
|
1857
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1858
|
+
var aCallable$1 = aCallable$3;
|
|
1859
|
+
var NATIVE_BIND = functionBindNative;
|
|
1860
|
+
|
|
1861
|
+
var bind$3 = uncurryThis$6(uncurryThis$6.bind);
|
|
1862
|
+
|
|
1863
|
+
// optional / simple context binding
|
|
1864
|
+
var functionBindContext = function (fn, that) {
|
|
1865
|
+
aCallable$1(fn);
|
|
1866
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$3(fn, that) : function (/* ...args */) {
|
|
1867
|
+
return fn.apply(that, arguments);
|
|
1868
|
+
};
|
|
1869
|
+
};
|
|
1870
|
+
|
|
1871
|
+
var global$9 = global$C;
|
|
1872
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
1873
|
+
|
|
1874
|
+
var TypeError$6 = global$9.TypeError;
|
|
1875
|
+
|
|
1876
|
+
var anInstance$2 = function (it, Prototype) {
|
|
1877
|
+
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
1878
|
+
throw TypeError$6('Incorrect invocation');
|
|
1879
|
+
};
|
|
1880
|
+
|
|
1881
|
+
var DESCRIPTORS$2 = descriptors;
|
|
1882
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
1883
|
+
var call$5 = functionCall;
|
|
1884
|
+
var fails$2 = fails$g;
|
|
1885
|
+
var objectKeys = objectKeys$2;
|
|
1886
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1887
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1888
|
+
var toObject$1 = toObject$4;
|
|
1889
|
+
var IndexedObject = indexedObject;
|
|
1890
|
+
|
|
1891
|
+
// eslint-disable-next-line es-x/no-object-assign -- safe
|
|
1892
|
+
var $assign = Object.assign;
|
|
1893
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
1894
|
+
var defineProperty = Object.defineProperty;
|
|
1895
|
+
var concat = uncurryThis$5([].concat);
|
|
1896
|
+
|
|
1897
|
+
// `Object.assign` method
|
|
1898
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1899
|
+
var objectAssign = !$assign || fails$2(function () {
|
|
1900
|
+
// should have correct order of operations (Edge bug)
|
|
1901
|
+
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
1902
|
+
enumerable: true,
|
|
1903
|
+
get: function () {
|
|
1904
|
+
defineProperty(this, 'b', {
|
|
1905
|
+
value: 3,
|
|
1906
|
+
enumerable: false
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
}), { b: 2 })).b !== 1) return true;
|
|
1910
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1911
|
+
var A = {};
|
|
1912
|
+
var B = {};
|
|
1913
|
+
// eslint-disable-next-line es-x/no-symbol -- safe
|
|
1914
|
+
var symbol = Symbol();
|
|
1915
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
1916
|
+
A[symbol] = 7;
|
|
1917
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1918
|
+
return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
|
|
1919
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1920
|
+
var T = toObject$1(target);
|
|
1921
|
+
var argumentsLength = arguments.length;
|
|
1922
|
+
var index = 1;
|
|
1923
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1924
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1925
|
+
while (argumentsLength > index) {
|
|
1926
|
+
var S = IndexedObject(arguments[index++]);
|
|
1927
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1928
|
+
var length = keys.length;
|
|
1929
|
+
var j = 0;
|
|
1930
|
+
var key;
|
|
1931
|
+
while (length > j) {
|
|
1932
|
+
key = keys[j++];
|
|
1933
|
+
if (!DESCRIPTORS$2 || call$5(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1934
|
+
}
|
|
1935
|
+
} return T;
|
|
1936
|
+
} : $assign;
|
|
1937
|
+
|
|
1938
|
+
var call$4 = functionCall;
|
|
1939
|
+
var anObject$4 = anObject$b;
|
|
1940
|
+
var getMethod$1 = getMethod$3;
|
|
1941
|
+
|
|
1942
|
+
var iteratorClose$1 = function (iterator, kind, value) {
|
|
1943
|
+
var innerResult, innerError;
|
|
1944
|
+
anObject$4(iterator);
|
|
1945
|
+
try {
|
|
1946
|
+
innerResult = getMethod$1(iterator, 'return');
|
|
1947
|
+
if (!innerResult) {
|
|
1948
|
+
if (kind === 'throw') throw value;
|
|
1949
|
+
return value;
|
|
1950
|
+
}
|
|
1951
|
+
innerResult = call$4(innerResult, iterator);
|
|
1952
|
+
} catch (error) {
|
|
1953
|
+
innerError = true;
|
|
1954
|
+
innerResult = error;
|
|
1955
|
+
}
|
|
1956
|
+
if (kind === 'throw') throw value;
|
|
1957
|
+
if (innerError) throw innerResult;
|
|
1958
|
+
anObject$4(innerResult);
|
|
1959
|
+
return value;
|
|
1960
|
+
};
|
|
1961
|
+
|
|
1962
|
+
var anObject$3 = anObject$b;
|
|
1963
|
+
var iteratorClose = iteratorClose$1;
|
|
1964
|
+
|
|
1965
|
+
// call something on iterator step with safe closing on error
|
|
1966
|
+
var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) {
|
|
1967
|
+
try {
|
|
1968
|
+
return ENTRIES ? fn(anObject$3(value)[0], value[1]) : fn(value);
|
|
1969
|
+
} catch (error) {
|
|
1970
|
+
iteratorClose(iterator, 'throw', error);
|
|
1971
|
+
}
|
|
1972
|
+
};
|
|
1973
|
+
|
|
1974
|
+
var wellKnownSymbol$4 = wellKnownSymbol$e;
|
|
1975
|
+
var Iterators$1 = iterators;
|
|
1976
|
+
|
|
1977
|
+
var ITERATOR$2 = wellKnownSymbol$4('iterator');
|
|
1978
|
+
var ArrayPrototype = Array.prototype;
|
|
1979
|
+
|
|
1980
|
+
// check on default Array iterator
|
|
1981
|
+
var isArrayIteratorMethod$1 = function (it) {
|
|
1982
|
+
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
1983
|
+
};
|
|
1984
|
+
|
|
1985
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
1986
|
+
var fails$1 = fails$g;
|
|
1987
|
+
var isCallable$1 = isCallable$g;
|
|
1988
|
+
var classof$3 = classof$5;
|
|
1989
|
+
var getBuiltIn = getBuiltIn$5;
|
|
1990
|
+
var inspectSource = inspectSource$3;
|
|
1991
|
+
|
|
1992
|
+
var noop = function () { /* empty */ };
|
|
1993
|
+
var empty = [];
|
|
1994
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
|
1995
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1996
|
+
var exec$2 = uncurryThis$4(constructorRegExp.exec);
|
|
1997
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1998
|
+
|
|
1999
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
2000
|
+
if (!isCallable$1(argument)) return false;
|
|
2001
|
+
try {
|
|
2002
|
+
construct(noop, empty, argument);
|
|
2003
|
+
return true;
|
|
2004
|
+
} catch (error) {
|
|
2005
|
+
return false;
|
|
2006
|
+
}
|
|
2007
|
+
};
|
|
2008
|
+
|
|
2009
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
2010
|
+
if (!isCallable$1(argument)) return false;
|
|
2011
|
+
switch (classof$3(argument)) {
|
|
2012
|
+
case 'AsyncFunction':
|
|
2013
|
+
case 'GeneratorFunction':
|
|
2014
|
+
case 'AsyncGeneratorFunction': return false;
|
|
2015
|
+
}
|
|
2016
|
+
try {
|
|
2017
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
2018
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
2019
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
2020
|
+
return INCORRECT_TO_STRING || !!exec$2(constructorRegExp, inspectSource(argument));
|
|
2021
|
+
} catch (error) {
|
|
2022
|
+
return true;
|
|
2023
|
+
}
|
|
2024
|
+
};
|
|
2025
|
+
|
|
2026
|
+
isConstructorLegacy.sham = true;
|
|
2027
|
+
|
|
2028
|
+
// `IsConstructor` abstract operation
|
|
2029
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
2030
|
+
var isConstructor$1 = !construct || fails$1(function () {
|
|
2031
|
+
var called;
|
|
2032
|
+
return isConstructorModern(isConstructorModern.call)
|
|
2033
|
+
|| !isConstructorModern(Object)
|
|
2034
|
+
|| !isConstructorModern(function () { called = true; })
|
|
2035
|
+
|| called;
|
|
2036
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
2037
|
+
|
|
2038
|
+
var toPropertyKey = toPropertyKey$3;
|
|
2039
|
+
var definePropertyModule = objectDefineProperty;
|
|
2040
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$5;
|
|
2041
|
+
|
|
2042
|
+
var createProperty$2 = function (object, key, value) {
|
|
2043
|
+
var propertyKey = toPropertyKey(key);
|
|
2044
|
+
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor$1(0, value));
|
|
2045
|
+
else object[propertyKey] = value;
|
|
2046
|
+
};
|
|
2047
|
+
|
|
2048
|
+
var classof$2 = classof$5;
|
|
2049
|
+
var getMethod = getMethod$3;
|
|
2050
|
+
var Iterators = iterators;
|
|
2051
|
+
var wellKnownSymbol$3 = wellKnownSymbol$e;
|
|
2052
|
+
|
|
2053
|
+
var ITERATOR$1 = wellKnownSymbol$3('iterator');
|
|
2054
|
+
|
|
2055
|
+
var getIteratorMethod$3 = function (it) {
|
|
2056
|
+
if (it != undefined) return getMethod(it, ITERATOR$1)
|
|
2057
|
+
|| getMethod(it, '@@iterator')
|
|
2058
|
+
|| Iterators[classof$2(it)];
|
|
2059
|
+
};
|
|
2060
|
+
|
|
2061
|
+
var global$8 = global$C;
|
|
2062
|
+
var call$3 = functionCall;
|
|
2063
|
+
var aCallable = aCallable$3;
|
|
2064
|
+
var anObject$2 = anObject$b;
|
|
2065
|
+
var tryToString = tryToString$2;
|
|
2066
|
+
var getIteratorMethod$2 = getIteratorMethod$3;
|
|
2067
|
+
|
|
2068
|
+
var TypeError$5 = global$8.TypeError;
|
|
2069
|
+
|
|
2070
|
+
var getIterator$2 = function (argument, usingIterator) {
|
|
2071
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$2(argument) : usingIterator;
|
|
2072
|
+
if (aCallable(iteratorMethod)) return anObject$2(call$3(iteratorMethod, argument));
|
|
2073
|
+
throw TypeError$5(tryToString(argument) + ' is not iterable');
|
|
2074
|
+
};
|
|
2075
|
+
|
|
2076
|
+
var global$7 = global$C;
|
|
2077
|
+
var bind$2 = functionBindContext;
|
|
2078
|
+
var call$2 = functionCall;
|
|
2079
|
+
var toObject = toObject$4;
|
|
2080
|
+
var callWithSafeIterationClosing = callWithSafeIterationClosing$1;
|
|
2081
|
+
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
2082
|
+
var isConstructor = isConstructor$1;
|
|
2083
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$3;
|
|
2084
|
+
var createProperty$1 = createProperty$2;
|
|
2085
|
+
var getIterator$1 = getIterator$2;
|
|
2086
|
+
var getIteratorMethod$1 = getIteratorMethod$3;
|
|
2087
|
+
|
|
2088
|
+
var Array$2 = global$7.Array;
|
|
2089
|
+
|
|
2090
|
+
// `Array.from` method implementation
|
|
2091
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
2092
|
+
var arrayFrom$1 = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
|
2093
|
+
var O = toObject(arrayLike);
|
|
2094
|
+
var IS_CONSTRUCTOR = isConstructor(this);
|
|
2095
|
+
var argumentsLength = arguments.length;
|
|
2096
|
+
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
|
2097
|
+
var mapping = mapfn !== undefined;
|
|
2098
|
+
if (mapping) mapfn = bind$2(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
|
|
2099
|
+
var iteratorMethod = getIteratorMethod$1(O);
|
|
2100
|
+
var index = 0;
|
|
2101
|
+
var length, result, step, iterator, next, value;
|
|
2102
|
+
// if the target is not iterable or it's an array with the default iterator - use a simple case
|
|
2103
|
+
if (iteratorMethod && !(this == Array$2 && isArrayIteratorMethod(iteratorMethod))) {
|
|
2104
|
+
iterator = getIterator$1(O, iteratorMethod);
|
|
2105
|
+
next = iterator.next;
|
|
2106
|
+
result = IS_CONSTRUCTOR ? new this() : [];
|
|
2107
|
+
for (;!(step = call$2(next, iterator)).done; index++) {
|
|
2108
|
+
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
|
|
2109
|
+
createProperty$1(result, index, value);
|
|
2110
|
+
}
|
|
2111
|
+
} else {
|
|
2112
|
+
length = lengthOfArrayLike$1(O);
|
|
2113
|
+
result = IS_CONSTRUCTOR ? new this(length) : Array$2(length);
|
|
2114
|
+
for (;length > index; index++) {
|
|
2115
|
+
value = mapping ? mapfn(O[index], index) : O[index];
|
|
2116
|
+
createProperty$1(result, index, value);
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
result.length = index;
|
|
2120
|
+
return result;
|
|
2121
|
+
};
|
|
2122
|
+
|
|
2123
|
+
var global$6 = global$C;
|
|
2124
|
+
var toAbsoluteIndex = toAbsoluteIndex$2;
|
|
2125
|
+
var lengthOfArrayLike = lengthOfArrayLike$3;
|
|
2126
|
+
var createProperty = createProperty$2;
|
|
2127
|
+
|
|
2128
|
+
var Array$1 = global$6.Array;
|
|
2129
|
+
var max = Math.max;
|
|
2130
|
+
|
|
2131
|
+
var arraySliceSimple = function (O, start, end) {
|
|
2132
|
+
var length = lengthOfArrayLike(O);
|
|
2133
|
+
var k = toAbsoluteIndex(start, length);
|
|
2134
|
+
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
2135
|
+
var result = Array$1(max(fin - k, 0));
|
|
2136
|
+
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
|
2137
|
+
result.length = n;
|
|
2138
|
+
return result;
|
|
2139
|
+
};
|
|
2140
|
+
|
|
2141
|
+
// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
|
|
2142
|
+
var global$5 = global$C;
|
|
2143
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
2144
|
+
|
|
2145
|
+
var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
|
|
2146
|
+
var base = 36;
|
|
2147
|
+
var tMin = 1;
|
|
2148
|
+
var tMax = 26;
|
|
2149
|
+
var skew = 38;
|
|
2150
|
+
var damp = 700;
|
|
2151
|
+
var initialBias = 72;
|
|
2152
|
+
var initialN = 128; // 0x80
|
|
2153
|
+
var delimiter = '-'; // '\x2D'
|
|
2154
|
+
var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
|
|
2155
|
+
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
|
|
2156
|
+
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
|
|
2157
|
+
var baseMinusTMin = base - tMin;
|
|
2158
|
+
|
|
2159
|
+
var RangeError = global$5.RangeError;
|
|
2160
|
+
var exec$1 = uncurryThis$3(regexSeparators.exec);
|
|
2161
|
+
var floor$2 = Math.floor;
|
|
2162
|
+
var fromCharCode = String.fromCharCode;
|
|
2163
|
+
var charCodeAt = uncurryThis$3(''.charCodeAt);
|
|
2164
|
+
var join$2 = uncurryThis$3([].join);
|
|
2165
|
+
var push$2 = uncurryThis$3([].push);
|
|
2166
|
+
var replace$2 = uncurryThis$3(''.replace);
|
|
2167
|
+
var split$2 = uncurryThis$3(''.split);
|
|
2168
|
+
var toLowerCase$1 = uncurryThis$3(''.toLowerCase);
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* Creates an array containing the numeric code points of each Unicode
|
|
2172
|
+
* character in the string. While JavaScript uses UCS-2 internally,
|
|
2173
|
+
* this function will convert a pair of surrogate halves (each of which
|
|
2174
|
+
* UCS-2 exposes as separate characters) into a single code point,
|
|
2175
|
+
* matching UTF-16.
|
|
2176
|
+
*/
|
|
2177
|
+
var ucs2decode = function (string) {
|
|
2178
|
+
var output = [];
|
|
2179
|
+
var counter = 0;
|
|
2180
|
+
var length = string.length;
|
|
2181
|
+
while (counter < length) {
|
|
2182
|
+
var value = charCodeAt(string, counter++);
|
|
2183
|
+
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
|
2184
|
+
// It's a high surrogate, and there is a next character.
|
|
2185
|
+
var extra = charCodeAt(string, counter++);
|
|
2186
|
+
if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
|
|
2187
|
+
push$2(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
|
2188
|
+
} else {
|
|
2189
|
+
// It's an unmatched surrogate; only append this code unit, in case the
|
|
2190
|
+
// next code unit is the high surrogate of a surrogate pair.
|
|
2191
|
+
push$2(output, value);
|
|
2192
|
+
counter--;
|
|
2193
|
+
}
|
|
2194
|
+
} else {
|
|
2195
|
+
push$2(output, value);
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
return output;
|
|
2199
|
+
};
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* Converts a digit/integer into a basic code point.
|
|
2203
|
+
*/
|
|
2204
|
+
var digitToBasic = function (digit) {
|
|
2205
|
+
// 0..25 map to ASCII a..z or A..Z
|
|
2206
|
+
// 26..35 map to ASCII 0..9
|
|
2207
|
+
return digit + 22 + 75 * (digit < 26);
|
|
2208
|
+
};
|
|
2209
|
+
|
|
2210
|
+
/**
|
|
2211
|
+
* Bias adaptation function as per section 3.4 of RFC 3492.
|
|
2212
|
+
* https://tools.ietf.org/html/rfc3492#section-3.4
|
|
2213
|
+
*/
|
|
2214
|
+
var adapt = function (delta, numPoints, firstTime) {
|
|
2215
|
+
var k = 0;
|
|
2216
|
+
delta = firstTime ? floor$2(delta / damp) : delta >> 1;
|
|
2217
|
+
delta += floor$2(delta / numPoints);
|
|
2218
|
+
while (delta > baseMinusTMin * tMax >> 1) {
|
|
2219
|
+
delta = floor$2(delta / baseMinusTMin);
|
|
2220
|
+
k += base;
|
|
2221
|
+
}
|
|
2222
|
+
return floor$2(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
2223
|
+
};
|
|
2224
|
+
|
|
2225
|
+
/**
|
|
2226
|
+
* Converts a string of Unicode symbols (e.g. a domain name label) to a
|
|
2227
|
+
* Punycode string of ASCII-only symbols.
|
|
2228
|
+
*/
|
|
2229
|
+
var encode = function (input) {
|
|
2230
|
+
var output = [];
|
|
2231
|
+
|
|
2232
|
+
// Convert the input in UCS-2 to an array of Unicode code points.
|
|
2233
|
+
input = ucs2decode(input);
|
|
2234
|
+
|
|
2235
|
+
// Cache the length.
|
|
2236
|
+
var inputLength = input.length;
|
|
2237
|
+
|
|
2238
|
+
// Initialize the state.
|
|
2239
|
+
var n = initialN;
|
|
2240
|
+
var delta = 0;
|
|
2241
|
+
var bias = initialBias;
|
|
2242
|
+
var i, currentValue;
|
|
2243
|
+
|
|
2244
|
+
// Handle the basic code points.
|
|
2245
|
+
for (i = 0; i < input.length; i++) {
|
|
2246
|
+
currentValue = input[i];
|
|
2247
|
+
if (currentValue < 0x80) {
|
|
2248
|
+
push$2(output, fromCharCode(currentValue));
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
var basicLength = output.length; // number of basic code points.
|
|
2253
|
+
var handledCPCount = basicLength; // number of code points that have been handled;
|
|
2254
|
+
|
|
2255
|
+
// Finish the basic string with a delimiter unless it's empty.
|
|
2256
|
+
if (basicLength) {
|
|
2257
|
+
push$2(output, delimiter);
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
// Main encoding loop:
|
|
2261
|
+
while (handledCPCount < inputLength) {
|
|
2262
|
+
// All non-basic code points < n have been handled already. Find the next larger one:
|
|
2263
|
+
var m = maxInt;
|
|
2264
|
+
for (i = 0; i < input.length; i++) {
|
|
2265
|
+
currentValue = input[i];
|
|
2266
|
+
if (currentValue >= n && currentValue < m) {
|
|
2267
|
+
m = currentValue;
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
|
|
2272
|
+
var handledCPCountPlusOne = handledCPCount + 1;
|
|
2273
|
+
if (m - n > floor$2((maxInt - delta) / handledCPCountPlusOne)) {
|
|
2274
|
+
throw RangeError(OVERFLOW_ERROR);
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
delta += (m - n) * handledCPCountPlusOne;
|
|
2278
|
+
n = m;
|
|
2279
|
+
|
|
2280
|
+
for (i = 0; i < input.length; i++) {
|
|
2281
|
+
currentValue = input[i];
|
|
2282
|
+
if (currentValue < n && ++delta > maxInt) {
|
|
2283
|
+
throw RangeError(OVERFLOW_ERROR);
|
|
2284
|
+
}
|
|
2285
|
+
if (currentValue == n) {
|
|
2286
|
+
// Represent delta as a generalized variable-length integer.
|
|
2287
|
+
var q = delta;
|
|
2288
|
+
var k = base;
|
|
2289
|
+
while (true) {
|
|
2290
|
+
var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
|
2291
|
+
if (q < t) break;
|
|
2292
|
+
var qMinusT = q - t;
|
|
2293
|
+
var baseMinusT = base - t;
|
|
2294
|
+
push$2(output, fromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
|
|
2295
|
+
q = floor$2(qMinusT / baseMinusT);
|
|
2296
|
+
k += base;
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
push$2(output, fromCharCode(digitToBasic(q)));
|
|
2300
|
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
|
2301
|
+
delta = 0;
|
|
2302
|
+
handledCPCount++;
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
delta++;
|
|
2307
|
+
n++;
|
|
2308
|
+
}
|
|
2309
|
+
return join$2(output, '');
|
|
2310
|
+
};
|
|
2311
|
+
|
|
2312
|
+
var stringPunycodeToAscii = function (input) {
|
|
2313
|
+
var encoded = [];
|
|
2314
|
+
var labels = split$2(replace$2(toLowerCase$1(input), regexSeparators, '\u002E'), '.');
|
|
2315
|
+
var i, label;
|
|
2316
|
+
for (i = 0; i < labels.length; i++) {
|
|
2317
|
+
label = labels[i];
|
|
2318
|
+
push$2(encoded, exec$1(regexNonASCII, label) ? 'xn--' + encode(label) : label);
|
|
2319
|
+
}
|
|
2320
|
+
return join$2(encoded, '.');
|
|
2321
|
+
};
|
|
2322
|
+
|
|
2323
|
+
var global$4 = global$C;
|
|
2324
|
+
|
|
2325
|
+
var TypeError$4 = global$4.TypeError;
|
|
2326
|
+
|
|
2327
|
+
var validateArgumentsLength$2 = function (passed, required) {
|
|
2328
|
+
if (passed < required) throw TypeError$4('Not enough arguments');
|
|
2329
|
+
return passed;
|
|
2330
|
+
};
|
|
2331
|
+
|
|
2332
|
+
var redefine$3 = redefine$7.exports;
|
|
2333
|
+
|
|
2334
|
+
var redefineAll$1 = function (target, src, options) {
|
|
2335
|
+
for (var key in src) redefine$3(target, key, src[key], options);
|
|
2336
|
+
return target;
|
|
2337
|
+
};
|
|
2338
|
+
|
|
2339
|
+
var arraySlice$1 = arraySliceSimple;
|
|
2340
|
+
|
|
2341
|
+
var floor$1 = Math.floor;
|
|
2342
|
+
|
|
2343
|
+
var mergeSort = function (array, comparefn) {
|
|
2344
|
+
var length = array.length;
|
|
2345
|
+
var middle = floor$1(length / 2);
|
|
2346
|
+
return length < 8 ? insertionSort(array, comparefn) : merge(
|
|
2347
|
+
array,
|
|
2348
|
+
mergeSort(arraySlice$1(array, 0, middle), comparefn),
|
|
2349
|
+
mergeSort(arraySlice$1(array, middle), comparefn),
|
|
2350
|
+
comparefn
|
|
2351
|
+
);
|
|
2352
|
+
};
|
|
2353
|
+
|
|
2354
|
+
var insertionSort = function (array, comparefn) {
|
|
2355
|
+
var length = array.length;
|
|
2356
|
+
var i = 1;
|
|
2357
|
+
var element, j;
|
|
2358
|
+
|
|
2359
|
+
while (i < length) {
|
|
2360
|
+
j = i;
|
|
2361
|
+
element = array[i];
|
|
2362
|
+
while (j && comparefn(array[j - 1], element) > 0) {
|
|
2363
|
+
array[j] = array[--j];
|
|
2364
|
+
}
|
|
2365
|
+
if (j !== i++) array[j] = element;
|
|
2366
|
+
} return array;
|
|
2367
|
+
};
|
|
2368
|
+
|
|
2369
|
+
var merge = function (array, left, right, comparefn) {
|
|
2370
|
+
var llength = left.length;
|
|
2371
|
+
var rlength = right.length;
|
|
2372
|
+
var lindex = 0;
|
|
2373
|
+
var rindex = 0;
|
|
2374
|
+
|
|
2375
|
+
while (lindex < llength || rindex < rlength) {
|
|
2376
|
+
array[lindex + rindex] = (lindex < llength && rindex < rlength)
|
|
2377
|
+
? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
|
|
2378
|
+
: lindex < llength ? left[lindex++] : right[rindex++];
|
|
2379
|
+
} return array;
|
|
2380
|
+
};
|
|
2381
|
+
|
|
2382
|
+
var arraySort$1 = mergeSort;
|
|
2383
|
+
|
|
2384
|
+
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
2385
|
+
|
|
2386
|
+
var $$2 = _export;
|
|
2387
|
+
var global$3 = global$C;
|
|
2388
|
+
var call$1 = functionCall;
|
|
2389
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
2390
|
+
var DESCRIPTORS$1 = descriptors;
|
|
2391
|
+
var USE_NATIVE_URL$1 = nativeUrl;
|
|
2392
|
+
var redefine$2 = redefine$7.exports;
|
|
2393
|
+
var redefineAll = redefineAll$1;
|
|
2394
|
+
var setToStringTag$1 = setToStringTag$4;
|
|
2395
|
+
var createIteratorConstructor = createIteratorConstructor$2;
|
|
2396
|
+
var InternalStateModule$1 = internalState;
|
|
2397
|
+
var anInstance$1 = anInstance$2;
|
|
2398
|
+
var isCallable = isCallable$g;
|
|
2399
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
2400
|
+
var bind$1 = functionBindContext;
|
|
2401
|
+
var classof$1 = classof$5;
|
|
2402
|
+
var anObject$1 = anObject$b;
|
|
2403
|
+
var isObject$1 = isObject$7;
|
|
2404
|
+
var $toString$2 = toString$4;
|
|
2405
|
+
var create = objectCreate;
|
|
2406
|
+
var createPropertyDescriptor = createPropertyDescriptor$5;
|
|
2407
|
+
var getIterator = getIterator$2;
|
|
2408
|
+
var getIteratorMethod = getIteratorMethod$3;
|
|
2409
|
+
var validateArgumentsLength$1 = validateArgumentsLength$2;
|
|
2410
|
+
var wellKnownSymbol$2 = wellKnownSymbol$e;
|
|
2411
|
+
var arraySort = arraySort$1;
|
|
2412
|
+
|
|
2413
|
+
var ITERATOR = wellKnownSymbol$2('iterator');
|
|
2414
|
+
var URL_SEARCH_PARAMS = 'URLSearchParams';
|
|
2415
|
+
var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
|
|
2416
|
+
var setInternalState$1 = InternalStateModule$1.set;
|
|
2417
|
+
var getInternalParamsState = InternalStateModule$1.getterFor(URL_SEARCH_PARAMS);
|
|
2418
|
+
var getInternalIteratorState = InternalStateModule$1.getterFor(URL_SEARCH_PARAMS_ITERATOR);
|
|
2419
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
2420
|
+
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
2421
|
+
|
|
2422
|
+
// Avoid NodeJS experimental warning
|
|
2423
|
+
var safeGetBuiltIn = function (name) {
|
|
2424
|
+
if (!DESCRIPTORS$1) return global$3[name];
|
|
2425
|
+
var descriptor = getOwnPropertyDescriptor$1(global$3, name);
|
|
2426
|
+
return descriptor && descriptor.value;
|
|
2427
|
+
};
|
|
2428
|
+
|
|
2429
|
+
var nativeFetch = safeGetBuiltIn('fetch');
|
|
2430
|
+
var NativeRequest = safeGetBuiltIn('Request');
|
|
2431
|
+
var Headers = safeGetBuiltIn('Headers');
|
|
2432
|
+
var RequestPrototype = NativeRequest && NativeRequest.prototype;
|
|
2433
|
+
var HeadersPrototype = Headers && Headers.prototype;
|
|
2434
|
+
var RegExp$1 = global$3.RegExp;
|
|
2435
|
+
var TypeError$3 = global$3.TypeError;
|
|
2436
|
+
var decodeURIComponent = global$3.decodeURIComponent;
|
|
2437
|
+
var encodeURIComponent$1 = global$3.encodeURIComponent;
|
|
2438
|
+
var charAt$1 = uncurryThis$2(''.charAt);
|
|
2439
|
+
var join$1 = uncurryThis$2([].join);
|
|
2440
|
+
var push$1 = uncurryThis$2([].push);
|
|
2441
|
+
var replace$1 = uncurryThis$2(''.replace);
|
|
2442
|
+
var shift$1 = uncurryThis$2([].shift);
|
|
2443
|
+
var splice = uncurryThis$2([].splice);
|
|
2444
|
+
var split$1 = uncurryThis$2(''.split);
|
|
2445
|
+
var stringSlice$2 = uncurryThis$2(''.slice);
|
|
2446
|
+
|
|
2447
|
+
var plus = /\+/g;
|
|
2448
|
+
var sequences = Array(4);
|
|
2449
|
+
|
|
2450
|
+
var percentSequence = function (bytes) {
|
|
2451
|
+
return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp$1('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
|
|
2452
|
+
};
|
|
2453
|
+
|
|
2454
|
+
var percentDecode = function (sequence) {
|
|
2455
|
+
try {
|
|
2456
|
+
return decodeURIComponent(sequence);
|
|
2457
|
+
} catch (error) {
|
|
2458
|
+
return sequence;
|
|
2459
|
+
}
|
|
2460
|
+
};
|
|
2461
|
+
|
|
2462
|
+
var deserialize = function (it) {
|
|
2463
|
+
var result = replace$1(it, plus, ' ');
|
|
2464
|
+
var bytes = 4;
|
|
2465
|
+
try {
|
|
2466
|
+
return decodeURIComponent(result);
|
|
2467
|
+
} catch (error) {
|
|
2468
|
+
while (bytes) {
|
|
2469
|
+
result = replace$1(result, percentSequence(bytes--), percentDecode);
|
|
2470
|
+
}
|
|
2471
|
+
return result;
|
|
2472
|
+
}
|
|
2473
|
+
};
|
|
2474
|
+
|
|
2475
|
+
var find = /[!'()~]|%20/g;
|
|
2476
|
+
|
|
2477
|
+
var replacements = {
|
|
2478
|
+
'!': '%21',
|
|
2479
|
+
"'": '%27',
|
|
2480
|
+
'(': '%28',
|
|
2481
|
+
')': '%29',
|
|
2482
|
+
'~': '%7E',
|
|
2483
|
+
'%20': '+'
|
|
2484
|
+
};
|
|
2485
|
+
|
|
2486
|
+
var replacer = function (match) {
|
|
2487
|
+
return replacements[match];
|
|
2488
|
+
};
|
|
2489
|
+
|
|
2490
|
+
var serialize = function (it) {
|
|
2491
|
+
return replace$1(encodeURIComponent$1(it), find, replacer);
|
|
2492
|
+
};
|
|
2493
|
+
|
|
2494
|
+
var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
|
|
2495
|
+
setInternalState$1(this, {
|
|
2496
|
+
type: URL_SEARCH_PARAMS_ITERATOR,
|
|
2497
|
+
iterator: getIterator(getInternalParamsState(params).entries),
|
|
2498
|
+
kind: kind
|
|
2499
|
+
});
|
|
2500
|
+
}, 'Iterator', function next() {
|
|
2501
|
+
var state = getInternalIteratorState(this);
|
|
2502
|
+
var kind = state.kind;
|
|
2503
|
+
var step = state.iterator.next();
|
|
2504
|
+
var entry = step.value;
|
|
2505
|
+
if (!step.done) {
|
|
2506
|
+
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
|
|
2507
|
+
} return step;
|
|
2508
|
+
}, true);
|
|
2509
|
+
|
|
2510
|
+
var URLSearchParamsState = function (init) {
|
|
2511
|
+
this.entries = [];
|
|
2512
|
+
this.url = null;
|
|
2513
|
+
|
|
2514
|
+
if (init !== undefined) {
|
|
2515
|
+
if (isObject$1(init)) this.parseObject(init);
|
|
2516
|
+
else this.parseQuery(typeof init == 'string' ? charAt$1(init, 0) === '?' ? stringSlice$2(init, 1) : init : $toString$2(init));
|
|
2517
|
+
}
|
|
2518
|
+
};
|
|
2519
|
+
|
|
2520
|
+
URLSearchParamsState.prototype = {
|
|
2521
|
+
type: URL_SEARCH_PARAMS,
|
|
2522
|
+
bindURL: function (url) {
|
|
2523
|
+
this.url = url;
|
|
2524
|
+
this.update();
|
|
2525
|
+
},
|
|
2526
|
+
parseObject: function (object) {
|
|
2527
|
+
var iteratorMethod = getIteratorMethod(object);
|
|
2528
|
+
var iterator, next, step, entryIterator, entryNext, first, second;
|
|
2529
|
+
|
|
2530
|
+
if (iteratorMethod) {
|
|
2531
|
+
iterator = getIterator(object, iteratorMethod);
|
|
2532
|
+
next = iterator.next;
|
|
2533
|
+
while (!(step = call$1(next, iterator)).done) {
|
|
2534
|
+
entryIterator = getIterator(anObject$1(step.value));
|
|
2535
|
+
entryNext = entryIterator.next;
|
|
2536
|
+
if (
|
|
2537
|
+
(first = call$1(entryNext, entryIterator)).done ||
|
|
2538
|
+
(second = call$1(entryNext, entryIterator)).done ||
|
|
2539
|
+
!call$1(entryNext, entryIterator).done
|
|
2540
|
+
) throw TypeError$3('Expected sequence with length 2');
|
|
2541
|
+
push$1(this.entries, { key: $toString$2(first.value), value: $toString$2(second.value) });
|
|
2542
|
+
}
|
|
2543
|
+
} else for (var key in object) if (hasOwn$2(object, key)) {
|
|
2544
|
+
push$1(this.entries, { key: key, value: $toString$2(object[key]) });
|
|
2545
|
+
}
|
|
2546
|
+
},
|
|
2547
|
+
parseQuery: function (query) {
|
|
2548
|
+
if (query) {
|
|
2549
|
+
var attributes = split$1(query, '&');
|
|
2550
|
+
var index = 0;
|
|
2551
|
+
var attribute, entry;
|
|
2552
|
+
while (index < attributes.length) {
|
|
2553
|
+
attribute = attributes[index++];
|
|
2554
|
+
if (attribute.length) {
|
|
2555
|
+
entry = split$1(attribute, '=');
|
|
2556
|
+
push$1(this.entries, {
|
|
2557
|
+
key: deserialize(shift$1(entry)),
|
|
2558
|
+
value: deserialize(join$1(entry, '='))
|
|
2559
|
+
});
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
},
|
|
2564
|
+
serialize: function () {
|
|
2565
|
+
var entries = this.entries;
|
|
2566
|
+
var result = [];
|
|
2567
|
+
var index = 0;
|
|
2568
|
+
var entry;
|
|
2569
|
+
while (index < entries.length) {
|
|
2570
|
+
entry = entries[index++];
|
|
2571
|
+
push$1(result, serialize(entry.key) + '=' + serialize(entry.value));
|
|
2572
|
+
} return join$1(result, '&');
|
|
2573
|
+
},
|
|
2574
|
+
update: function () {
|
|
2575
|
+
this.entries.length = 0;
|
|
2576
|
+
this.parseQuery(this.url.query);
|
|
2577
|
+
},
|
|
2578
|
+
updateURL: function () {
|
|
2579
|
+
if (this.url) this.url.update();
|
|
2580
|
+
}
|
|
2581
|
+
};
|
|
2582
|
+
|
|
2583
|
+
// `URLSearchParams` constructor
|
|
2584
|
+
// https://url.spec.whatwg.org/#interface-urlsearchparams
|
|
2585
|
+
var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
|
|
2586
|
+
anInstance$1(this, URLSearchParamsPrototype);
|
|
2587
|
+
var init = arguments.length > 0 ? arguments[0] : undefined;
|
|
2588
|
+
setInternalState$1(this, new URLSearchParamsState(init));
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2591
|
+
var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
|
|
2592
|
+
|
|
2593
|
+
redefineAll(URLSearchParamsPrototype, {
|
|
2594
|
+
// `URLSearchParams.prototype.append` method
|
|
2595
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
2596
|
+
append: function append(name, value) {
|
|
2597
|
+
validateArgumentsLength$1(arguments.length, 2);
|
|
2598
|
+
var state = getInternalParamsState(this);
|
|
2599
|
+
push$1(state.entries, { key: $toString$2(name), value: $toString$2(value) });
|
|
2600
|
+
state.updateURL();
|
|
2601
|
+
},
|
|
2602
|
+
// `URLSearchParams.prototype.delete` method
|
|
2603
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
|
2604
|
+
'delete': function (name) {
|
|
2605
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2606
|
+
var state = getInternalParamsState(this);
|
|
2607
|
+
var entries = state.entries;
|
|
2608
|
+
var key = $toString$2(name);
|
|
2609
|
+
var index = 0;
|
|
2610
|
+
while (index < entries.length) {
|
|
2611
|
+
if (entries[index].key === key) splice(entries, index, 1);
|
|
2612
|
+
else index++;
|
|
2613
|
+
}
|
|
2614
|
+
state.updateURL();
|
|
2615
|
+
},
|
|
2616
|
+
// `URLSearchParams.prototype.get` method
|
|
2617
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-get
|
|
2618
|
+
get: function get(name) {
|
|
2619
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2620
|
+
var entries = getInternalParamsState(this).entries;
|
|
2621
|
+
var key = $toString$2(name);
|
|
2622
|
+
var index = 0;
|
|
2623
|
+
for (; index < entries.length; index++) {
|
|
2624
|
+
if (entries[index].key === key) return entries[index].value;
|
|
2625
|
+
}
|
|
2626
|
+
return null;
|
|
2627
|
+
},
|
|
2628
|
+
// `URLSearchParams.prototype.getAll` method
|
|
2629
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-getall
|
|
2630
|
+
getAll: function getAll(name) {
|
|
2631
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2632
|
+
var entries = getInternalParamsState(this).entries;
|
|
2633
|
+
var key = $toString$2(name);
|
|
2634
|
+
var result = [];
|
|
2635
|
+
var index = 0;
|
|
2636
|
+
for (; index < entries.length; index++) {
|
|
2637
|
+
if (entries[index].key === key) push$1(result, entries[index].value);
|
|
2638
|
+
}
|
|
2639
|
+
return result;
|
|
2640
|
+
},
|
|
2641
|
+
// `URLSearchParams.prototype.has` method
|
|
2642
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-has
|
|
2643
|
+
has: function has(name) {
|
|
2644
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2645
|
+
var entries = getInternalParamsState(this).entries;
|
|
2646
|
+
var key = $toString$2(name);
|
|
2647
|
+
var index = 0;
|
|
2648
|
+
while (index < entries.length) {
|
|
2649
|
+
if (entries[index++].key === key) return true;
|
|
2650
|
+
}
|
|
2651
|
+
return false;
|
|
2652
|
+
},
|
|
2653
|
+
// `URLSearchParams.prototype.set` method
|
|
2654
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-set
|
|
2655
|
+
set: function set(name, value) {
|
|
2656
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2657
|
+
var state = getInternalParamsState(this);
|
|
2658
|
+
var entries = state.entries;
|
|
2659
|
+
var found = false;
|
|
2660
|
+
var key = $toString$2(name);
|
|
2661
|
+
var val = $toString$2(value);
|
|
2662
|
+
var index = 0;
|
|
2663
|
+
var entry;
|
|
2664
|
+
for (; index < entries.length; index++) {
|
|
2665
|
+
entry = entries[index];
|
|
2666
|
+
if (entry.key === key) {
|
|
2667
|
+
if (found) splice(entries, index--, 1);
|
|
2668
|
+
else {
|
|
2669
|
+
found = true;
|
|
2670
|
+
entry.value = val;
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
if (!found) push$1(entries, { key: key, value: val });
|
|
2675
|
+
state.updateURL();
|
|
2676
|
+
},
|
|
2677
|
+
// `URLSearchParams.prototype.sort` method
|
|
2678
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
|
|
2679
|
+
sort: function sort() {
|
|
2680
|
+
var state = getInternalParamsState(this);
|
|
2681
|
+
arraySort(state.entries, function (a, b) {
|
|
2682
|
+
return a.key > b.key ? 1 : -1;
|
|
2683
|
+
});
|
|
2684
|
+
state.updateURL();
|
|
2685
|
+
},
|
|
2686
|
+
// `URLSearchParams.prototype.forEach` method
|
|
2687
|
+
forEach: function forEach(callback /* , thisArg */) {
|
|
2688
|
+
var entries = getInternalParamsState(this).entries;
|
|
2689
|
+
var boundFunction = bind$1(callback, arguments.length > 1 ? arguments[1] : undefined);
|
|
2690
|
+
var index = 0;
|
|
2691
|
+
var entry;
|
|
2692
|
+
while (index < entries.length) {
|
|
2693
|
+
entry = entries[index++];
|
|
2694
|
+
boundFunction(entry.value, entry.key, this);
|
|
2695
|
+
}
|
|
2696
|
+
},
|
|
2697
|
+
// `URLSearchParams.prototype.keys` method
|
|
2698
|
+
keys: function keys() {
|
|
2699
|
+
return new URLSearchParamsIterator(this, 'keys');
|
|
2700
|
+
},
|
|
2701
|
+
// `URLSearchParams.prototype.values` method
|
|
2702
|
+
values: function values() {
|
|
2703
|
+
return new URLSearchParamsIterator(this, 'values');
|
|
2704
|
+
},
|
|
2705
|
+
// `URLSearchParams.prototype.entries` method
|
|
2706
|
+
entries: function entries() {
|
|
2707
|
+
return new URLSearchParamsIterator(this, 'entries');
|
|
2708
|
+
}
|
|
2709
|
+
}, { enumerable: true });
|
|
2710
|
+
|
|
2711
|
+
// `URLSearchParams.prototype[@@iterator]` method
|
|
2712
|
+
redefine$2(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });
|
|
2713
|
+
|
|
2714
|
+
// `URLSearchParams.prototype.toString` method
|
|
2715
|
+
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
|
|
2716
|
+
redefine$2(URLSearchParamsPrototype, 'toString', function toString() {
|
|
2717
|
+
return getInternalParamsState(this).serialize();
|
|
2718
|
+
}, { enumerable: true });
|
|
2719
|
+
|
|
2720
|
+
setToStringTag$1(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
|
|
2721
|
+
|
|
2722
|
+
$$2({ global: true, forced: !USE_NATIVE_URL$1 }, {
|
|
2723
|
+
URLSearchParams: URLSearchParamsConstructor
|
|
2724
|
+
});
|
|
2725
|
+
|
|
2726
|
+
// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`
|
|
2727
|
+
if (!USE_NATIVE_URL$1 && isCallable(Headers)) {
|
|
2728
|
+
var headersHas = uncurryThis$2(HeadersPrototype.has);
|
|
2729
|
+
var headersSet = uncurryThis$2(HeadersPrototype.set);
|
|
2730
|
+
|
|
2731
|
+
var wrapRequestOptions = function (init) {
|
|
2732
|
+
if (isObject$1(init)) {
|
|
2733
|
+
var body = init.body;
|
|
2734
|
+
var headers;
|
|
2735
|
+
if (classof$1(body) === URL_SEARCH_PARAMS) {
|
|
2736
|
+
headers = init.headers ? new Headers(init.headers) : new Headers();
|
|
2737
|
+
if (!headersHas(headers, 'content-type')) {
|
|
2738
|
+
headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
|
2739
|
+
}
|
|
2740
|
+
return create(init, {
|
|
2741
|
+
body: createPropertyDescriptor(0, $toString$2(body)),
|
|
2742
|
+
headers: createPropertyDescriptor(0, headers)
|
|
2743
|
+
});
|
|
2744
|
+
}
|
|
2745
|
+
} return init;
|
|
2746
|
+
};
|
|
2747
|
+
|
|
2748
|
+
if (isCallable(nativeFetch)) {
|
|
2749
|
+
$$2({ global: true, enumerable: true, noTargetGet: true, forced: true }, {
|
|
2750
|
+
fetch: function fetch(input /* , init */) {
|
|
2751
|
+
return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
|
|
2752
|
+
}
|
|
2753
|
+
});
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
if (isCallable(NativeRequest)) {
|
|
2757
|
+
var RequestConstructor = function Request(input /* , init */) {
|
|
2758
|
+
anInstance$1(this, RequestPrototype);
|
|
2759
|
+
return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
|
|
2760
|
+
};
|
|
2761
|
+
|
|
2762
|
+
RequestPrototype.constructor = RequestConstructor;
|
|
2763
|
+
RequestConstructor.prototype = RequestPrototype;
|
|
2764
|
+
|
|
2765
|
+
$$2({ global: true, forced: true, noTargetGet: true }, {
|
|
2766
|
+
Request: RequestConstructor
|
|
2767
|
+
});
|
|
2768
|
+
}
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
var web_urlSearchParams_constructor = {
|
|
2772
|
+
URLSearchParams: URLSearchParamsConstructor,
|
|
2773
|
+
getState: getInternalParamsState
|
|
2774
|
+
};
|
|
2775
|
+
|
|
2776
|
+
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
2777
|
+
|
|
2778
|
+
var $$1 = _export;
|
|
2779
|
+
var DESCRIPTORS = descriptors;
|
|
2780
|
+
var USE_NATIVE_URL = nativeUrl;
|
|
2781
|
+
var global$2 = global$C;
|
|
2782
|
+
var bind = functionBindContext;
|
|
2783
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
2784
|
+
var defineProperties = objectDefineProperties.f;
|
|
2785
|
+
var redefine$1 = redefine$7.exports;
|
|
2786
|
+
var anInstance = anInstance$2;
|
|
2787
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
2788
|
+
var assign = objectAssign;
|
|
2789
|
+
var arrayFrom = arrayFrom$1;
|
|
2790
|
+
var arraySlice = arraySliceSimple;
|
|
2791
|
+
var codeAt = stringMultibyte.codeAt;
|
|
2792
|
+
var toASCII = stringPunycodeToAscii;
|
|
2793
|
+
var $toString$1 = toString$4;
|
|
2794
|
+
var setToStringTag = setToStringTag$4;
|
|
2795
|
+
var validateArgumentsLength = validateArgumentsLength$2;
|
|
2796
|
+
var URLSearchParamsModule = web_urlSearchParams_constructor;
|
|
2797
|
+
var InternalStateModule = internalState;
|
|
2798
|
+
|
|
2799
|
+
var setInternalState = InternalStateModule.set;
|
|
2800
|
+
var getInternalURLState = InternalStateModule.getterFor('URL');
|
|
2801
|
+
var URLSearchParams$1 = URLSearchParamsModule.URLSearchParams;
|
|
2802
|
+
var getInternalSearchParamsState = URLSearchParamsModule.getState;
|
|
2803
|
+
|
|
2804
|
+
var NativeURL = global$2.URL;
|
|
2805
|
+
var TypeError$2 = global$2.TypeError;
|
|
2806
|
+
var parseInt = global$2.parseInt;
|
|
2807
|
+
var floor = Math.floor;
|
|
2808
|
+
var pow = Math.pow;
|
|
2809
|
+
var charAt = uncurryThis$1(''.charAt);
|
|
2810
|
+
var exec = uncurryThis$1(/./.exec);
|
|
2811
|
+
var join = uncurryThis$1([].join);
|
|
2812
|
+
var numberToString = uncurryThis$1(1.0.toString);
|
|
2813
|
+
var pop = uncurryThis$1([].pop);
|
|
2814
|
+
var push = uncurryThis$1([].push);
|
|
2815
|
+
var replace = uncurryThis$1(''.replace);
|
|
2816
|
+
var shift = uncurryThis$1([].shift);
|
|
2817
|
+
var split = uncurryThis$1(''.split);
|
|
2818
|
+
var stringSlice$1 = uncurryThis$1(''.slice);
|
|
2819
|
+
var toLowerCase = uncurryThis$1(''.toLowerCase);
|
|
2820
|
+
var unshift = uncurryThis$1([].unshift);
|
|
2821
|
+
|
|
2822
|
+
var INVALID_AUTHORITY = 'Invalid authority';
|
|
2823
|
+
var INVALID_SCHEME = 'Invalid scheme';
|
|
2824
|
+
var INVALID_HOST = 'Invalid host';
|
|
2825
|
+
var INVALID_PORT = 'Invalid port';
|
|
2826
|
+
|
|
2827
|
+
var ALPHA = /[a-z]/i;
|
|
2828
|
+
// eslint-disable-next-line regexp/no-obscure-range -- safe
|
|
2829
|
+
var ALPHANUMERIC = /[\d+-.a-z]/i;
|
|
2830
|
+
var DIGIT = /\d/;
|
|
2831
|
+
var HEX_START = /^0x/i;
|
|
2832
|
+
var OCT = /^[0-7]+$/;
|
|
2833
|
+
var DEC = /^\d+$/;
|
|
2834
|
+
var HEX = /^[\da-f]+$/i;
|
|
2835
|
+
/* eslint-disable regexp/no-control-character -- safe */
|
|
2836
|
+
var FORBIDDEN_HOST_CODE_POINT = /[\0\t\n\r #%/:<>?@[\\\]^|]/;
|
|
2837
|
+
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\0\t\n\r #/:<>?@[\\\]^|]/;
|
|
2838
|
+
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u0020]+|[\u0000-\u0020]+$/g;
|
|
2839
|
+
var TAB_AND_NEW_LINE = /[\t\n\r]/g;
|
|
2840
|
+
/* eslint-enable regexp/no-control-character -- safe */
|
|
2841
|
+
var EOF;
|
|
2842
|
+
|
|
2843
|
+
// https://url.spec.whatwg.org/#ipv4-number-parser
|
|
2844
|
+
var parseIPv4 = function (input) {
|
|
2845
|
+
var parts = split(input, '.');
|
|
2846
|
+
var partsLength, numbers, index, part, radix, number, ipv4;
|
|
2847
|
+
if (parts.length && parts[parts.length - 1] == '') {
|
|
2848
|
+
parts.length--;
|
|
2849
|
+
}
|
|
2850
|
+
partsLength = parts.length;
|
|
2851
|
+
if (partsLength > 4) return input;
|
|
2852
|
+
numbers = [];
|
|
2853
|
+
for (index = 0; index < partsLength; index++) {
|
|
2854
|
+
part = parts[index];
|
|
2855
|
+
if (part == '') return input;
|
|
2856
|
+
radix = 10;
|
|
2857
|
+
if (part.length > 1 && charAt(part, 0) == '0') {
|
|
2858
|
+
radix = exec(HEX_START, part) ? 16 : 8;
|
|
2859
|
+
part = stringSlice$1(part, radix == 8 ? 1 : 2);
|
|
2860
|
+
}
|
|
2861
|
+
if (part === '') {
|
|
2862
|
+
number = 0;
|
|
2863
|
+
} else {
|
|
2864
|
+
if (!exec(radix == 10 ? DEC : radix == 8 ? OCT : HEX, part)) return input;
|
|
2865
|
+
number = parseInt(part, radix);
|
|
2866
|
+
}
|
|
2867
|
+
push(numbers, number);
|
|
2868
|
+
}
|
|
2869
|
+
for (index = 0; index < partsLength; index++) {
|
|
2870
|
+
number = numbers[index];
|
|
2871
|
+
if (index == partsLength - 1) {
|
|
2872
|
+
if (number >= pow(256, 5 - partsLength)) return null;
|
|
2873
|
+
} else if (number > 255) return null;
|
|
2874
|
+
}
|
|
2875
|
+
ipv4 = pop(numbers);
|
|
2876
|
+
for (index = 0; index < numbers.length; index++) {
|
|
2877
|
+
ipv4 += numbers[index] * pow(256, 3 - index);
|
|
2878
|
+
}
|
|
2879
|
+
return ipv4;
|
|
2880
|
+
};
|
|
2881
|
+
|
|
2882
|
+
// https://url.spec.whatwg.org/#concept-ipv6-parser
|
|
2883
|
+
// eslint-disable-next-line max-statements -- TODO
|
|
2884
|
+
var parseIPv6 = function (input) {
|
|
2885
|
+
var address = [0, 0, 0, 0, 0, 0, 0, 0];
|
|
2886
|
+
var pieceIndex = 0;
|
|
2887
|
+
var compress = null;
|
|
2888
|
+
var pointer = 0;
|
|
2889
|
+
var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
|
|
2890
|
+
|
|
2891
|
+
var chr = function () {
|
|
2892
|
+
return charAt(input, pointer);
|
|
2893
|
+
};
|
|
2894
|
+
|
|
2895
|
+
if (chr() == ':') {
|
|
2896
|
+
if (charAt(input, 1) != ':') return;
|
|
2897
|
+
pointer += 2;
|
|
2898
|
+
pieceIndex++;
|
|
2899
|
+
compress = pieceIndex;
|
|
2900
|
+
}
|
|
2901
|
+
while (chr()) {
|
|
2902
|
+
if (pieceIndex == 8) return;
|
|
2903
|
+
if (chr() == ':') {
|
|
2904
|
+
if (compress !== null) return;
|
|
2905
|
+
pointer++;
|
|
2906
|
+
pieceIndex++;
|
|
2907
|
+
compress = pieceIndex;
|
|
2908
|
+
continue;
|
|
2909
|
+
}
|
|
2910
|
+
value = length = 0;
|
|
2911
|
+
while (length < 4 && exec(HEX, chr())) {
|
|
2912
|
+
value = value * 16 + parseInt(chr(), 16);
|
|
2913
|
+
pointer++;
|
|
2914
|
+
length++;
|
|
2915
|
+
}
|
|
2916
|
+
if (chr() == '.') {
|
|
2917
|
+
if (length == 0) return;
|
|
2918
|
+
pointer -= length;
|
|
2919
|
+
if (pieceIndex > 6) return;
|
|
2920
|
+
numbersSeen = 0;
|
|
2921
|
+
while (chr()) {
|
|
2922
|
+
ipv4Piece = null;
|
|
2923
|
+
if (numbersSeen > 0) {
|
|
2924
|
+
if (chr() == '.' && numbersSeen < 4) pointer++;
|
|
2925
|
+
else return;
|
|
2926
|
+
}
|
|
2927
|
+
if (!exec(DIGIT, chr())) return;
|
|
2928
|
+
while (exec(DIGIT, chr())) {
|
|
2929
|
+
number = parseInt(chr(), 10);
|
|
2930
|
+
if (ipv4Piece === null) ipv4Piece = number;
|
|
2931
|
+
else if (ipv4Piece == 0) return;
|
|
2932
|
+
else ipv4Piece = ipv4Piece * 10 + number;
|
|
2933
|
+
if (ipv4Piece > 255) return;
|
|
2934
|
+
pointer++;
|
|
2935
|
+
}
|
|
2936
|
+
address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
|
|
2937
|
+
numbersSeen++;
|
|
2938
|
+
if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
|
|
2939
|
+
}
|
|
2940
|
+
if (numbersSeen != 4) return;
|
|
2941
|
+
break;
|
|
2942
|
+
} else if (chr() == ':') {
|
|
2943
|
+
pointer++;
|
|
2944
|
+
if (!chr()) return;
|
|
2945
|
+
} else if (chr()) return;
|
|
2946
|
+
address[pieceIndex++] = value;
|
|
2947
|
+
}
|
|
2948
|
+
if (compress !== null) {
|
|
2949
|
+
swaps = pieceIndex - compress;
|
|
2950
|
+
pieceIndex = 7;
|
|
2951
|
+
while (pieceIndex != 0 && swaps > 0) {
|
|
2952
|
+
swap = address[pieceIndex];
|
|
2953
|
+
address[pieceIndex--] = address[compress + swaps - 1];
|
|
2954
|
+
address[compress + --swaps] = swap;
|
|
2955
|
+
}
|
|
2956
|
+
} else if (pieceIndex != 8) return;
|
|
2957
|
+
return address;
|
|
2958
|
+
};
|
|
2959
|
+
|
|
2960
|
+
var findLongestZeroSequence = function (ipv6) {
|
|
2961
|
+
var maxIndex = null;
|
|
2962
|
+
var maxLength = 1;
|
|
2963
|
+
var currStart = null;
|
|
2964
|
+
var currLength = 0;
|
|
2965
|
+
var index = 0;
|
|
2966
|
+
for (; index < 8; index++) {
|
|
2967
|
+
if (ipv6[index] !== 0) {
|
|
2968
|
+
if (currLength > maxLength) {
|
|
2969
|
+
maxIndex = currStart;
|
|
2970
|
+
maxLength = currLength;
|
|
2971
|
+
}
|
|
2972
|
+
currStart = null;
|
|
2973
|
+
currLength = 0;
|
|
2974
|
+
} else {
|
|
2975
|
+
if (currStart === null) currStart = index;
|
|
2976
|
+
++currLength;
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2979
|
+
if (currLength > maxLength) {
|
|
2980
|
+
maxIndex = currStart;
|
|
2981
|
+
maxLength = currLength;
|
|
2982
|
+
}
|
|
2983
|
+
return maxIndex;
|
|
2984
|
+
};
|
|
2985
|
+
|
|
2986
|
+
// https://url.spec.whatwg.org/#host-serializing
|
|
2987
|
+
var serializeHost = function (host) {
|
|
2988
|
+
var result, index, compress, ignore0;
|
|
2989
|
+
// ipv4
|
|
2990
|
+
if (typeof host == 'number') {
|
|
2991
|
+
result = [];
|
|
2992
|
+
for (index = 0; index < 4; index++) {
|
|
2993
|
+
unshift(result, host % 256);
|
|
2994
|
+
host = floor(host / 256);
|
|
2995
|
+
} return join(result, '.');
|
|
2996
|
+
// ipv6
|
|
2997
|
+
} else if (typeof host == 'object') {
|
|
2998
|
+
result = '';
|
|
2999
|
+
compress = findLongestZeroSequence(host);
|
|
3000
|
+
for (index = 0; index < 8; index++) {
|
|
3001
|
+
if (ignore0 && host[index] === 0) continue;
|
|
3002
|
+
if (ignore0) ignore0 = false;
|
|
3003
|
+
if (compress === index) {
|
|
3004
|
+
result += index ? ':' : '::';
|
|
3005
|
+
ignore0 = true;
|
|
3006
|
+
} else {
|
|
3007
|
+
result += numberToString(host[index], 16);
|
|
3008
|
+
if (index < 7) result += ':';
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
return '[' + result + ']';
|
|
3012
|
+
} return host;
|
|
3013
|
+
};
|
|
3014
|
+
|
|
3015
|
+
var C0ControlPercentEncodeSet = {};
|
|
3016
|
+
var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
|
|
3017
|
+
' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
|
|
3018
|
+
});
|
|
3019
|
+
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
|
|
3020
|
+
'#': 1, '?': 1, '{': 1, '}': 1
|
|
3021
|
+
});
|
|
3022
|
+
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
|
|
3023
|
+
'/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
|
|
3024
|
+
});
|
|
3025
|
+
|
|
3026
|
+
var percentEncode = function (chr, set) {
|
|
3027
|
+
var code = codeAt(chr, 0);
|
|
3028
|
+
return code > 0x20 && code < 0x7F && !hasOwn$1(set, chr) ? chr : encodeURIComponent(chr);
|
|
3029
|
+
};
|
|
3030
|
+
|
|
3031
|
+
// https://url.spec.whatwg.org/#special-scheme
|
|
3032
|
+
var specialSchemes = {
|
|
3033
|
+
ftp: 21,
|
|
3034
|
+
file: null,
|
|
3035
|
+
http: 80,
|
|
3036
|
+
https: 443,
|
|
3037
|
+
ws: 80,
|
|
3038
|
+
wss: 443
|
|
3039
|
+
};
|
|
3040
|
+
|
|
3041
|
+
// https://url.spec.whatwg.org/#windows-drive-letter
|
|
3042
|
+
var isWindowsDriveLetter = function (string, normalized) {
|
|
3043
|
+
var second;
|
|
3044
|
+
return string.length == 2 && exec(ALPHA, charAt(string, 0))
|
|
3045
|
+
&& ((second = charAt(string, 1)) == ':' || (!normalized && second == '|'));
|
|
3046
|
+
};
|
|
3047
|
+
|
|
3048
|
+
// https://url.spec.whatwg.org/#start-with-a-windows-drive-letter
|
|
3049
|
+
var startsWithWindowsDriveLetter = function (string) {
|
|
3050
|
+
var third;
|
|
3051
|
+
return string.length > 1 && isWindowsDriveLetter(stringSlice$1(string, 0, 2)) && (
|
|
3052
|
+
string.length == 2 ||
|
|
3053
|
+
((third = charAt(string, 2)) === '/' || third === '\\' || third === '?' || third === '#')
|
|
3054
|
+
);
|
|
3055
|
+
};
|
|
3056
|
+
|
|
3057
|
+
// https://url.spec.whatwg.org/#single-dot-path-segment
|
|
3058
|
+
var isSingleDot = function (segment) {
|
|
3059
|
+
return segment === '.' || toLowerCase(segment) === '%2e';
|
|
3060
|
+
};
|
|
3061
|
+
|
|
3062
|
+
// https://url.spec.whatwg.org/#double-dot-path-segment
|
|
3063
|
+
var isDoubleDot = function (segment) {
|
|
3064
|
+
segment = toLowerCase(segment);
|
|
3065
|
+
return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
|
|
3066
|
+
};
|
|
3067
|
+
|
|
3068
|
+
// States:
|
|
3069
|
+
var SCHEME_START = {};
|
|
3070
|
+
var SCHEME = {};
|
|
3071
|
+
var NO_SCHEME = {};
|
|
3072
|
+
var SPECIAL_RELATIVE_OR_AUTHORITY = {};
|
|
3073
|
+
var PATH_OR_AUTHORITY = {};
|
|
3074
|
+
var RELATIVE = {};
|
|
3075
|
+
var RELATIVE_SLASH = {};
|
|
3076
|
+
var SPECIAL_AUTHORITY_SLASHES = {};
|
|
3077
|
+
var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
|
|
3078
|
+
var AUTHORITY = {};
|
|
3079
|
+
var HOST = {};
|
|
3080
|
+
var HOSTNAME = {};
|
|
3081
|
+
var PORT = {};
|
|
3082
|
+
var FILE = {};
|
|
3083
|
+
var FILE_SLASH = {};
|
|
3084
|
+
var FILE_HOST = {};
|
|
3085
|
+
var PATH_START = {};
|
|
3086
|
+
var PATH = {};
|
|
3087
|
+
var CANNOT_BE_A_BASE_URL_PATH = {};
|
|
3088
|
+
var QUERY = {};
|
|
3089
|
+
var FRAGMENT = {};
|
|
3090
|
+
|
|
3091
|
+
var URLState = function (url, isBase, base) {
|
|
3092
|
+
var urlString = $toString$1(url);
|
|
3093
|
+
var baseState, failure, searchParams;
|
|
3094
|
+
if (isBase) {
|
|
3095
|
+
failure = this.parse(urlString);
|
|
3096
|
+
if (failure) throw TypeError$2(failure);
|
|
3097
|
+
this.searchParams = null;
|
|
3098
|
+
} else {
|
|
3099
|
+
if (base !== undefined) baseState = new URLState(base, true);
|
|
3100
|
+
failure = this.parse(urlString, null, baseState);
|
|
3101
|
+
if (failure) throw TypeError$2(failure);
|
|
3102
|
+
searchParams = getInternalSearchParamsState(new URLSearchParams$1());
|
|
3103
|
+
searchParams.bindURL(this);
|
|
3104
|
+
this.searchParams = searchParams;
|
|
3105
|
+
}
|
|
3106
|
+
};
|
|
3107
|
+
|
|
3108
|
+
URLState.prototype = {
|
|
3109
|
+
type: 'URL',
|
|
3110
|
+
// https://url.spec.whatwg.org/#url-parsing
|
|
3111
|
+
// eslint-disable-next-line max-statements -- TODO
|
|
3112
|
+
parse: function (input, stateOverride, base) {
|
|
3113
|
+
var url = this;
|
|
3114
|
+
var state = stateOverride || SCHEME_START;
|
|
3115
|
+
var pointer = 0;
|
|
3116
|
+
var buffer = '';
|
|
3117
|
+
var seenAt = false;
|
|
3118
|
+
var seenBracket = false;
|
|
3119
|
+
var seenPasswordToken = false;
|
|
3120
|
+
var codePoints, chr, bufferCodePoints, failure;
|
|
3121
|
+
|
|
3122
|
+
input = $toString$1(input);
|
|
3123
|
+
|
|
3124
|
+
if (!stateOverride) {
|
|
3125
|
+
url.scheme = '';
|
|
3126
|
+
url.username = '';
|
|
3127
|
+
url.password = '';
|
|
3128
|
+
url.host = null;
|
|
3129
|
+
url.port = null;
|
|
3130
|
+
url.path = [];
|
|
3131
|
+
url.query = null;
|
|
3132
|
+
url.fragment = null;
|
|
3133
|
+
url.cannotBeABaseURL = false;
|
|
3134
|
+
input = replace(input, LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3137
|
+
input = replace(input, TAB_AND_NEW_LINE, '');
|
|
3138
|
+
|
|
3139
|
+
codePoints = arrayFrom(input);
|
|
3140
|
+
|
|
3141
|
+
while (pointer <= codePoints.length) {
|
|
3142
|
+
chr = codePoints[pointer];
|
|
3143
|
+
switch (state) {
|
|
3144
|
+
case SCHEME_START:
|
|
3145
|
+
if (chr && exec(ALPHA, chr)) {
|
|
3146
|
+
buffer += toLowerCase(chr);
|
|
3147
|
+
state = SCHEME;
|
|
3148
|
+
} else if (!stateOverride) {
|
|
3149
|
+
state = NO_SCHEME;
|
|
3150
|
+
continue;
|
|
3151
|
+
} else return INVALID_SCHEME;
|
|
3152
|
+
break;
|
|
3153
|
+
|
|
3154
|
+
case SCHEME:
|
|
3155
|
+
if (chr && (exec(ALPHANUMERIC, chr) || chr == '+' || chr == '-' || chr == '.')) {
|
|
3156
|
+
buffer += toLowerCase(chr);
|
|
3157
|
+
} else if (chr == ':') {
|
|
3158
|
+
if (stateOverride && (
|
|
3159
|
+
(url.isSpecial() != hasOwn$1(specialSchemes, buffer)) ||
|
|
3160
|
+
(buffer == 'file' && (url.includesCredentials() || url.port !== null)) ||
|
|
3161
|
+
(url.scheme == 'file' && !url.host)
|
|
3162
|
+
)) return;
|
|
3163
|
+
url.scheme = buffer;
|
|
3164
|
+
if (stateOverride) {
|
|
3165
|
+
if (url.isSpecial() && specialSchemes[url.scheme] == url.port) url.port = null;
|
|
3166
|
+
return;
|
|
3167
|
+
}
|
|
3168
|
+
buffer = '';
|
|
3169
|
+
if (url.scheme == 'file') {
|
|
3170
|
+
state = FILE;
|
|
3171
|
+
} else if (url.isSpecial() && base && base.scheme == url.scheme) {
|
|
3172
|
+
state = SPECIAL_RELATIVE_OR_AUTHORITY;
|
|
3173
|
+
} else if (url.isSpecial()) {
|
|
3174
|
+
state = SPECIAL_AUTHORITY_SLASHES;
|
|
3175
|
+
} else if (codePoints[pointer + 1] == '/') {
|
|
3176
|
+
state = PATH_OR_AUTHORITY;
|
|
3177
|
+
pointer++;
|
|
3178
|
+
} else {
|
|
3179
|
+
url.cannotBeABaseURL = true;
|
|
3180
|
+
push(url.path, '');
|
|
3181
|
+
state = CANNOT_BE_A_BASE_URL_PATH;
|
|
3182
|
+
}
|
|
3183
|
+
} else if (!stateOverride) {
|
|
3184
|
+
buffer = '';
|
|
3185
|
+
state = NO_SCHEME;
|
|
3186
|
+
pointer = 0;
|
|
3187
|
+
continue;
|
|
3188
|
+
} else return INVALID_SCHEME;
|
|
3189
|
+
break;
|
|
3190
|
+
|
|
3191
|
+
case NO_SCHEME:
|
|
3192
|
+
if (!base || (base.cannotBeABaseURL && chr != '#')) return INVALID_SCHEME;
|
|
3193
|
+
if (base.cannotBeABaseURL && chr == '#') {
|
|
3194
|
+
url.scheme = base.scheme;
|
|
3195
|
+
url.path = arraySlice(base.path);
|
|
3196
|
+
url.query = base.query;
|
|
3197
|
+
url.fragment = '';
|
|
3198
|
+
url.cannotBeABaseURL = true;
|
|
3199
|
+
state = FRAGMENT;
|
|
3200
|
+
break;
|
|
3201
|
+
}
|
|
3202
|
+
state = base.scheme == 'file' ? FILE : RELATIVE;
|
|
3203
|
+
continue;
|
|
3204
|
+
|
|
3205
|
+
case SPECIAL_RELATIVE_OR_AUTHORITY:
|
|
3206
|
+
if (chr == '/' && codePoints[pointer + 1] == '/') {
|
|
3207
|
+
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3208
|
+
pointer++;
|
|
3209
|
+
} else {
|
|
3210
|
+
state = RELATIVE;
|
|
3211
|
+
continue;
|
|
3212
|
+
} break;
|
|
3213
|
+
|
|
3214
|
+
case PATH_OR_AUTHORITY:
|
|
3215
|
+
if (chr == '/') {
|
|
3216
|
+
state = AUTHORITY;
|
|
3217
|
+
break;
|
|
3218
|
+
} else {
|
|
3219
|
+
state = PATH;
|
|
3220
|
+
continue;
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
case RELATIVE:
|
|
3224
|
+
url.scheme = base.scheme;
|
|
3225
|
+
if (chr == EOF) {
|
|
3226
|
+
url.username = base.username;
|
|
3227
|
+
url.password = base.password;
|
|
3228
|
+
url.host = base.host;
|
|
3229
|
+
url.port = base.port;
|
|
3230
|
+
url.path = arraySlice(base.path);
|
|
3231
|
+
url.query = base.query;
|
|
3232
|
+
} else if (chr == '/' || (chr == '\\' && url.isSpecial())) {
|
|
3233
|
+
state = RELATIVE_SLASH;
|
|
3234
|
+
} else if (chr == '?') {
|
|
3235
|
+
url.username = base.username;
|
|
3236
|
+
url.password = base.password;
|
|
3237
|
+
url.host = base.host;
|
|
3238
|
+
url.port = base.port;
|
|
3239
|
+
url.path = arraySlice(base.path);
|
|
3240
|
+
url.query = '';
|
|
3241
|
+
state = QUERY;
|
|
3242
|
+
} else if (chr == '#') {
|
|
3243
|
+
url.username = base.username;
|
|
3244
|
+
url.password = base.password;
|
|
3245
|
+
url.host = base.host;
|
|
3246
|
+
url.port = base.port;
|
|
3247
|
+
url.path = arraySlice(base.path);
|
|
3248
|
+
url.query = base.query;
|
|
3249
|
+
url.fragment = '';
|
|
3250
|
+
state = FRAGMENT;
|
|
3251
|
+
} else {
|
|
3252
|
+
url.username = base.username;
|
|
3253
|
+
url.password = base.password;
|
|
3254
|
+
url.host = base.host;
|
|
3255
|
+
url.port = base.port;
|
|
3256
|
+
url.path = arraySlice(base.path);
|
|
3257
|
+
url.path.length--;
|
|
3258
|
+
state = PATH;
|
|
3259
|
+
continue;
|
|
3260
|
+
} break;
|
|
3261
|
+
|
|
3262
|
+
case RELATIVE_SLASH:
|
|
3263
|
+
if (url.isSpecial() && (chr == '/' || chr == '\\')) {
|
|
3264
|
+
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3265
|
+
} else if (chr == '/') {
|
|
3266
|
+
state = AUTHORITY;
|
|
3267
|
+
} else {
|
|
3268
|
+
url.username = base.username;
|
|
3269
|
+
url.password = base.password;
|
|
3270
|
+
url.host = base.host;
|
|
3271
|
+
url.port = base.port;
|
|
3272
|
+
state = PATH;
|
|
3273
|
+
continue;
|
|
3274
|
+
} break;
|
|
3275
|
+
|
|
3276
|
+
case SPECIAL_AUTHORITY_SLASHES:
|
|
3277
|
+
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3278
|
+
if (chr != '/' || charAt(buffer, pointer + 1) != '/') continue;
|
|
3279
|
+
pointer++;
|
|
3280
|
+
break;
|
|
3281
|
+
|
|
3282
|
+
case SPECIAL_AUTHORITY_IGNORE_SLASHES:
|
|
3283
|
+
if (chr != '/' && chr != '\\') {
|
|
3284
|
+
state = AUTHORITY;
|
|
3285
|
+
continue;
|
|
3286
|
+
} break;
|
|
3287
|
+
|
|
3288
|
+
case AUTHORITY:
|
|
3289
|
+
if (chr == '@') {
|
|
3290
|
+
if (seenAt) buffer = '%40' + buffer;
|
|
3291
|
+
seenAt = true;
|
|
3292
|
+
bufferCodePoints = arrayFrom(buffer);
|
|
3293
|
+
for (var i = 0; i < bufferCodePoints.length; i++) {
|
|
3294
|
+
var codePoint = bufferCodePoints[i];
|
|
3295
|
+
if (codePoint == ':' && !seenPasswordToken) {
|
|
3296
|
+
seenPasswordToken = true;
|
|
3297
|
+
continue;
|
|
3298
|
+
}
|
|
3299
|
+
var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
|
|
3300
|
+
if (seenPasswordToken) url.password += encodedCodePoints;
|
|
3301
|
+
else url.username += encodedCodePoints;
|
|
3302
|
+
}
|
|
3303
|
+
buffer = '';
|
|
3304
|
+
} else if (
|
|
3305
|
+
chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
|
|
3306
|
+
(chr == '\\' && url.isSpecial())
|
|
3307
|
+
) {
|
|
3308
|
+
if (seenAt && buffer == '') return INVALID_AUTHORITY;
|
|
3309
|
+
pointer -= arrayFrom(buffer).length + 1;
|
|
3310
|
+
buffer = '';
|
|
3311
|
+
state = HOST;
|
|
3312
|
+
} else buffer += chr;
|
|
3313
|
+
break;
|
|
3314
|
+
|
|
3315
|
+
case HOST:
|
|
3316
|
+
case HOSTNAME:
|
|
3317
|
+
if (stateOverride && url.scheme == 'file') {
|
|
3318
|
+
state = FILE_HOST;
|
|
3319
|
+
continue;
|
|
3320
|
+
} else if (chr == ':' && !seenBracket) {
|
|
3321
|
+
if (buffer == '') return INVALID_HOST;
|
|
3322
|
+
failure = url.parseHost(buffer);
|
|
3323
|
+
if (failure) return failure;
|
|
3324
|
+
buffer = '';
|
|
3325
|
+
state = PORT;
|
|
3326
|
+
if (stateOverride == HOSTNAME) return;
|
|
3327
|
+
} else if (
|
|
3328
|
+
chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
|
|
3329
|
+
(chr == '\\' && url.isSpecial())
|
|
3330
|
+
) {
|
|
3331
|
+
if (url.isSpecial() && buffer == '') return INVALID_HOST;
|
|
3332
|
+
if (stateOverride && buffer == '' && (url.includesCredentials() || url.port !== null)) return;
|
|
3333
|
+
failure = url.parseHost(buffer);
|
|
3334
|
+
if (failure) return failure;
|
|
3335
|
+
buffer = '';
|
|
3336
|
+
state = PATH_START;
|
|
3337
|
+
if (stateOverride) return;
|
|
3338
|
+
continue;
|
|
3339
|
+
} else {
|
|
3340
|
+
if (chr == '[') seenBracket = true;
|
|
3341
|
+
else if (chr == ']') seenBracket = false;
|
|
3342
|
+
buffer += chr;
|
|
3343
|
+
} break;
|
|
3344
|
+
|
|
3345
|
+
case PORT:
|
|
3346
|
+
if (exec(DIGIT, chr)) {
|
|
3347
|
+
buffer += chr;
|
|
3348
|
+
} else if (
|
|
3349
|
+
chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
|
|
3350
|
+
(chr == '\\' && url.isSpecial()) ||
|
|
3351
|
+
stateOverride
|
|
3352
|
+
) {
|
|
3353
|
+
if (buffer != '') {
|
|
3354
|
+
var port = parseInt(buffer, 10);
|
|
3355
|
+
if (port > 0xFFFF) return INVALID_PORT;
|
|
3356
|
+
url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port;
|
|
3357
|
+
buffer = '';
|
|
3358
|
+
}
|
|
3359
|
+
if (stateOverride) return;
|
|
3360
|
+
state = PATH_START;
|
|
3361
|
+
continue;
|
|
3362
|
+
} else return INVALID_PORT;
|
|
3363
|
+
break;
|
|
3364
|
+
|
|
3365
|
+
case FILE:
|
|
3366
|
+
url.scheme = 'file';
|
|
3367
|
+
if (chr == '/' || chr == '\\') state = FILE_SLASH;
|
|
3368
|
+
else if (base && base.scheme == 'file') {
|
|
3369
|
+
if (chr == EOF) {
|
|
3370
|
+
url.host = base.host;
|
|
3371
|
+
url.path = arraySlice(base.path);
|
|
3372
|
+
url.query = base.query;
|
|
3373
|
+
} else if (chr == '?') {
|
|
3374
|
+
url.host = base.host;
|
|
3375
|
+
url.path = arraySlice(base.path);
|
|
3376
|
+
url.query = '';
|
|
3377
|
+
state = QUERY;
|
|
3378
|
+
} else if (chr == '#') {
|
|
3379
|
+
url.host = base.host;
|
|
3380
|
+
url.path = arraySlice(base.path);
|
|
3381
|
+
url.query = base.query;
|
|
3382
|
+
url.fragment = '';
|
|
3383
|
+
state = FRAGMENT;
|
|
3384
|
+
} else {
|
|
3385
|
+
if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
3386
|
+
url.host = base.host;
|
|
3387
|
+
url.path = arraySlice(base.path);
|
|
3388
|
+
url.shortenPath();
|
|
3389
|
+
}
|
|
3390
|
+
state = PATH;
|
|
3391
|
+
continue;
|
|
3392
|
+
}
|
|
3393
|
+
} else {
|
|
3394
|
+
state = PATH;
|
|
3395
|
+
continue;
|
|
3396
|
+
} break;
|
|
3397
|
+
|
|
3398
|
+
case FILE_SLASH:
|
|
3399
|
+
if (chr == '/' || chr == '\\') {
|
|
3400
|
+
state = FILE_HOST;
|
|
3401
|
+
break;
|
|
3402
|
+
}
|
|
3403
|
+
if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
3404
|
+
if (isWindowsDriveLetter(base.path[0], true)) push(url.path, base.path[0]);
|
|
3405
|
+
else url.host = base.host;
|
|
3406
|
+
}
|
|
3407
|
+
state = PATH;
|
|
3408
|
+
continue;
|
|
3409
|
+
|
|
3410
|
+
case FILE_HOST:
|
|
3411
|
+
if (chr == EOF || chr == '/' || chr == '\\' || chr == '?' || chr == '#') {
|
|
3412
|
+
if (!stateOverride && isWindowsDriveLetter(buffer)) {
|
|
3413
|
+
state = PATH;
|
|
3414
|
+
} else if (buffer == '') {
|
|
3415
|
+
url.host = '';
|
|
3416
|
+
if (stateOverride) return;
|
|
3417
|
+
state = PATH_START;
|
|
3418
|
+
} else {
|
|
3419
|
+
failure = url.parseHost(buffer);
|
|
3420
|
+
if (failure) return failure;
|
|
3421
|
+
if (url.host == 'localhost') url.host = '';
|
|
3422
|
+
if (stateOverride) return;
|
|
3423
|
+
buffer = '';
|
|
3424
|
+
state = PATH_START;
|
|
3425
|
+
} continue;
|
|
3426
|
+
} else buffer += chr;
|
|
3427
|
+
break;
|
|
3428
|
+
|
|
3429
|
+
case PATH_START:
|
|
3430
|
+
if (url.isSpecial()) {
|
|
3431
|
+
state = PATH;
|
|
3432
|
+
if (chr != '/' && chr != '\\') continue;
|
|
3433
|
+
} else if (!stateOverride && chr == '?') {
|
|
3434
|
+
url.query = '';
|
|
3435
|
+
state = QUERY;
|
|
3436
|
+
} else if (!stateOverride && chr == '#') {
|
|
3437
|
+
url.fragment = '';
|
|
3438
|
+
state = FRAGMENT;
|
|
3439
|
+
} else if (chr != EOF) {
|
|
3440
|
+
state = PATH;
|
|
3441
|
+
if (chr != '/') continue;
|
|
3442
|
+
} break;
|
|
3443
|
+
|
|
3444
|
+
case PATH:
|
|
3445
|
+
if (
|
|
3446
|
+
chr == EOF || chr == '/' ||
|
|
3447
|
+
(chr == '\\' && url.isSpecial()) ||
|
|
3448
|
+
(!stateOverride && (chr == '?' || chr == '#'))
|
|
3449
|
+
) {
|
|
3450
|
+
if (isDoubleDot(buffer)) {
|
|
3451
|
+
url.shortenPath();
|
|
3452
|
+
if (chr != '/' && !(chr == '\\' && url.isSpecial())) {
|
|
3453
|
+
push(url.path, '');
|
|
3454
|
+
}
|
|
3455
|
+
} else if (isSingleDot(buffer)) {
|
|
3456
|
+
if (chr != '/' && !(chr == '\\' && url.isSpecial())) {
|
|
3457
|
+
push(url.path, '');
|
|
3458
|
+
}
|
|
3459
|
+
} else {
|
|
3460
|
+
if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
|
|
3461
|
+
if (url.host) url.host = '';
|
|
3462
|
+
buffer = charAt(buffer, 0) + ':'; // normalize windows drive letter
|
|
3463
|
+
}
|
|
3464
|
+
push(url.path, buffer);
|
|
3465
|
+
}
|
|
3466
|
+
buffer = '';
|
|
3467
|
+
if (url.scheme == 'file' && (chr == EOF || chr == '?' || chr == '#')) {
|
|
3468
|
+
while (url.path.length > 1 && url.path[0] === '') {
|
|
3469
|
+
shift(url.path);
|
|
3470
|
+
}
|
|
3471
|
+
}
|
|
3472
|
+
if (chr == '?') {
|
|
3473
|
+
url.query = '';
|
|
3474
|
+
state = QUERY;
|
|
3475
|
+
} else if (chr == '#') {
|
|
3476
|
+
url.fragment = '';
|
|
3477
|
+
state = FRAGMENT;
|
|
3478
|
+
}
|
|
3479
|
+
} else {
|
|
3480
|
+
buffer += percentEncode(chr, pathPercentEncodeSet);
|
|
3481
|
+
} break;
|
|
3482
|
+
|
|
3483
|
+
case CANNOT_BE_A_BASE_URL_PATH:
|
|
3484
|
+
if (chr == '?') {
|
|
3485
|
+
url.query = '';
|
|
3486
|
+
state = QUERY;
|
|
3487
|
+
} else if (chr == '#') {
|
|
3488
|
+
url.fragment = '';
|
|
3489
|
+
state = FRAGMENT;
|
|
3490
|
+
} else if (chr != EOF) {
|
|
3491
|
+
url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);
|
|
3492
|
+
} break;
|
|
3493
|
+
|
|
3494
|
+
case QUERY:
|
|
3495
|
+
if (!stateOverride && chr == '#') {
|
|
3496
|
+
url.fragment = '';
|
|
3497
|
+
state = FRAGMENT;
|
|
3498
|
+
} else if (chr != EOF) {
|
|
3499
|
+
if (chr == "'" && url.isSpecial()) url.query += '%27';
|
|
3500
|
+
else if (chr == '#') url.query += '%23';
|
|
3501
|
+
else url.query += percentEncode(chr, C0ControlPercentEncodeSet);
|
|
3502
|
+
} break;
|
|
3503
|
+
|
|
3504
|
+
case FRAGMENT:
|
|
3505
|
+
if (chr != EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);
|
|
3506
|
+
break;
|
|
3507
|
+
}
|
|
3508
|
+
|
|
3509
|
+
pointer++;
|
|
3510
|
+
}
|
|
3511
|
+
},
|
|
3512
|
+
// https://url.spec.whatwg.org/#host-parsing
|
|
3513
|
+
parseHost: function (input) {
|
|
3514
|
+
var result, codePoints, index;
|
|
3515
|
+
if (charAt(input, 0) == '[') {
|
|
3516
|
+
if (charAt(input, input.length - 1) != ']') return INVALID_HOST;
|
|
3517
|
+
result = parseIPv6(stringSlice$1(input, 1, -1));
|
|
3518
|
+
if (!result) return INVALID_HOST;
|
|
3519
|
+
this.host = result;
|
|
3520
|
+
// opaque host
|
|
3521
|
+
} else if (!this.isSpecial()) {
|
|
3522
|
+
if (exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT, input)) return INVALID_HOST;
|
|
3523
|
+
result = '';
|
|
3524
|
+
codePoints = arrayFrom(input);
|
|
3525
|
+
for (index = 0; index < codePoints.length; index++) {
|
|
3526
|
+
result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
|
|
3527
|
+
}
|
|
3528
|
+
this.host = result;
|
|
3529
|
+
} else {
|
|
3530
|
+
input = toASCII(input);
|
|
3531
|
+
if (exec(FORBIDDEN_HOST_CODE_POINT, input)) return INVALID_HOST;
|
|
3532
|
+
result = parseIPv4(input);
|
|
3533
|
+
if (result === null) return INVALID_HOST;
|
|
3534
|
+
this.host = result;
|
|
3535
|
+
}
|
|
3536
|
+
},
|
|
3537
|
+
// https://url.spec.whatwg.org/#cannot-have-a-username-password-port
|
|
3538
|
+
cannotHaveUsernamePasswordPort: function () {
|
|
3539
|
+
return !this.host || this.cannotBeABaseURL || this.scheme == 'file';
|
|
3540
|
+
},
|
|
3541
|
+
// https://url.spec.whatwg.org/#include-credentials
|
|
3542
|
+
includesCredentials: function () {
|
|
3543
|
+
return this.username != '' || this.password != '';
|
|
3544
|
+
},
|
|
3545
|
+
// https://url.spec.whatwg.org/#is-special
|
|
3546
|
+
isSpecial: function () {
|
|
3547
|
+
return hasOwn$1(specialSchemes, this.scheme);
|
|
3548
|
+
},
|
|
3549
|
+
// https://url.spec.whatwg.org/#shorten-a-urls-path
|
|
3550
|
+
shortenPath: function () {
|
|
3551
|
+
var path = this.path;
|
|
3552
|
+
var pathSize = path.length;
|
|
3553
|
+
if (pathSize && (this.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
|
|
3554
|
+
path.length--;
|
|
3555
|
+
}
|
|
3556
|
+
},
|
|
3557
|
+
// https://url.spec.whatwg.org/#concept-url-serializer
|
|
3558
|
+
serialize: function () {
|
|
3559
|
+
var url = this;
|
|
3560
|
+
var scheme = url.scheme;
|
|
3561
|
+
var username = url.username;
|
|
3562
|
+
var password = url.password;
|
|
3563
|
+
var host = url.host;
|
|
3564
|
+
var port = url.port;
|
|
3565
|
+
var path = url.path;
|
|
3566
|
+
var query = url.query;
|
|
3567
|
+
var fragment = url.fragment;
|
|
3568
|
+
var output = scheme + ':';
|
|
3569
|
+
if (host !== null) {
|
|
3570
|
+
output += '//';
|
|
3571
|
+
if (url.includesCredentials()) {
|
|
3572
|
+
output += username + (password ? ':' + password : '') + '@';
|
|
3573
|
+
}
|
|
3574
|
+
output += serializeHost(host);
|
|
3575
|
+
if (port !== null) output += ':' + port;
|
|
3576
|
+
} else if (scheme == 'file') output += '//';
|
|
3577
|
+
output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
|
|
3578
|
+
if (query !== null) output += '?' + query;
|
|
3579
|
+
if (fragment !== null) output += '#' + fragment;
|
|
3580
|
+
return output;
|
|
3581
|
+
},
|
|
3582
|
+
// https://url.spec.whatwg.org/#dom-url-href
|
|
3583
|
+
setHref: function (href) {
|
|
3584
|
+
var failure = this.parse(href);
|
|
3585
|
+
if (failure) throw TypeError$2(failure);
|
|
3586
|
+
this.searchParams.update();
|
|
3587
|
+
},
|
|
3588
|
+
// https://url.spec.whatwg.org/#dom-url-origin
|
|
3589
|
+
getOrigin: function () {
|
|
3590
|
+
var scheme = this.scheme;
|
|
3591
|
+
var port = this.port;
|
|
3592
|
+
if (scheme == 'blob') try {
|
|
3593
|
+
return new URLConstructor(scheme.path[0]).origin;
|
|
3594
|
+
} catch (error) {
|
|
3595
|
+
return 'null';
|
|
3596
|
+
}
|
|
3597
|
+
if (scheme == 'file' || !this.isSpecial()) return 'null';
|
|
3598
|
+
return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : '');
|
|
3599
|
+
},
|
|
3600
|
+
// https://url.spec.whatwg.org/#dom-url-protocol
|
|
3601
|
+
getProtocol: function () {
|
|
3602
|
+
return this.scheme + ':';
|
|
3603
|
+
},
|
|
3604
|
+
setProtocol: function (protocol) {
|
|
3605
|
+
this.parse($toString$1(protocol) + ':', SCHEME_START);
|
|
3606
|
+
},
|
|
3607
|
+
// https://url.spec.whatwg.org/#dom-url-username
|
|
3608
|
+
getUsername: function () {
|
|
3609
|
+
return this.username;
|
|
3610
|
+
},
|
|
3611
|
+
setUsername: function (username) {
|
|
3612
|
+
var codePoints = arrayFrom($toString$1(username));
|
|
3613
|
+
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
3614
|
+
this.username = '';
|
|
3615
|
+
for (var i = 0; i < codePoints.length; i++) {
|
|
3616
|
+
this.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
|
|
3617
|
+
}
|
|
3618
|
+
},
|
|
3619
|
+
// https://url.spec.whatwg.org/#dom-url-password
|
|
3620
|
+
getPassword: function () {
|
|
3621
|
+
return this.password;
|
|
3622
|
+
},
|
|
3623
|
+
setPassword: function (password) {
|
|
3624
|
+
var codePoints = arrayFrom($toString$1(password));
|
|
3625
|
+
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
3626
|
+
this.password = '';
|
|
3627
|
+
for (var i = 0; i < codePoints.length; i++) {
|
|
3628
|
+
this.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
|
|
3629
|
+
}
|
|
3630
|
+
},
|
|
3631
|
+
// https://url.spec.whatwg.org/#dom-url-host
|
|
3632
|
+
getHost: function () {
|
|
3633
|
+
var host = this.host;
|
|
3634
|
+
var port = this.port;
|
|
3635
|
+
return host === null ? ''
|
|
3636
|
+
: port === null ? serializeHost(host)
|
|
3637
|
+
: serializeHost(host) + ':' + port;
|
|
3638
|
+
},
|
|
3639
|
+
setHost: function (host) {
|
|
3640
|
+
if (this.cannotBeABaseURL) return;
|
|
3641
|
+
this.parse(host, HOST);
|
|
3642
|
+
},
|
|
3643
|
+
// https://url.spec.whatwg.org/#dom-url-hostname
|
|
3644
|
+
getHostname: function () {
|
|
3645
|
+
var host = this.host;
|
|
3646
|
+
return host === null ? '' : serializeHost(host);
|
|
3647
|
+
},
|
|
3648
|
+
setHostname: function (hostname) {
|
|
3649
|
+
if (this.cannotBeABaseURL) return;
|
|
3650
|
+
this.parse(hostname, HOSTNAME);
|
|
3651
|
+
},
|
|
3652
|
+
// https://url.spec.whatwg.org/#dom-url-port
|
|
3653
|
+
getPort: function () {
|
|
3654
|
+
var port = this.port;
|
|
3655
|
+
return port === null ? '' : $toString$1(port);
|
|
3656
|
+
},
|
|
3657
|
+
setPort: function (port) {
|
|
3658
|
+
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
3659
|
+
port = $toString$1(port);
|
|
3660
|
+
if (port == '') this.port = null;
|
|
3661
|
+
else this.parse(port, PORT);
|
|
3662
|
+
},
|
|
3663
|
+
// https://url.spec.whatwg.org/#dom-url-pathname
|
|
3664
|
+
getPathname: function () {
|
|
3665
|
+
var path = this.path;
|
|
3666
|
+
return this.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
|
|
3667
|
+
},
|
|
3668
|
+
setPathname: function (pathname) {
|
|
3669
|
+
if (this.cannotBeABaseURL) return;
|
|
3670
|
+
this.path = [];
|
|
3671
|
+
this.parse(pathname, PATH_START);
|
|
3672
|
+
},
|
|
3673
|
+
// https://url.spec.whatwg.org/#dom-url-search
|
|
3674
|
+
getSearch: function () {
|
|
3675
|
+
var query = this.query;
|
|
3676
|
+
return query ? '?' + query : '';
|
|
3677
|
+
},
|
|
3678
|
+
setSearch: function (search) {
|
|
3679
|
+
search = $toString$1(search);
|
|
3680
|
+
if (search == '') {
|
|
3681
|
+
this.query = null;
|
|
3682
|
+
} else {
|
|
3683
|
+
if ('?' == charAt(search, 0)) search = stringSlice$1(search, 1);
|
|
3684
|
+
this.query = '';
|
|
3685
|
+
this.parse(search, QUERY);
|
|
3686
|
+
}
|
|
3687
|
+
this.searchParams.update();
|
|
3688
|
+
},
|
|
3689
|
+
// https://url.spec.whatwg.org/#dom-url-searchparams
|
|
3690
|
+
getSearchParams: function () {
|
|
3691
|
+
return this.searchParams.facade;
|
|
3692
|
+
},
|
|
3693
|
+
// https://url.spec.whatwg.org/#dom-url-hash
|
|
3694
|
+
getHash: function () {
|
|
3695
|
+
var fragment = this.fragment;
|
|
3696
|
+
return fragment ? '#' + fragment : '';
|
|
3697
|
+
},
|
|
3698
|
+
setHash: function (hash) {
|
|
3699
|
+
hash = $toString$1(hash);
|
|
3700
|
+
if (hash == '') {
|
|
3701
|
+
this.fragment = null;
|
|
3702
|
+
return;
|
|
3703
|
+
}
|
|
3704
|
+
if ('#' == charAt(hash, 0)) hash = stringSlice$1(hash, 1);
|
|
3705
|
+
this.fragment = '';
|
|
3706
|
+
this.parse(hash, FRAGMENT);
|
|
3707
|
+
},
|
|
3708
|
+
update: function () {
|
|
3709
|
+
this.query = this.searchParams.serialize() || null;
|
|
3710
|
+
}
|
|
3711
|
+
};
|
|
3712
|
+
|
|
3713
|
+
// `URL` constructor
|
|
3714
|
+
// https://url.spec.whatwg.org/#url-class
|
|
3715
|
+
var URLConstructor = function URL(url /* , base */) {
|
|
3716
|
+
var that = anInstance(this, URLPrototype);
|
|
3717
|
+
var base = validateArgumentsLength(arguments.length, 1) > 1 ? arguments[1] : undefined;
|
|
3718
|
+
var state = setInternalState(that, new URLState(url, false, base));
|
|
3719
|
+
if (!DESCRIPTORS) {
|
|
3720
|
+
that.href = state.serialize();
|
|
3721
|
+
that.origin = state.getOrigin();
|
|
3722
|
+
that.protocol = state.getProtocol();
|
|
3723
|
+
that.username = state.getUsername();
|
|
3724
|
+
that.password = state.getPassword();
|
|
3725
|
+
that.host = state.getHost();
|
|
3726
|
+
that.hostname = state.getHostname();
|
|
3727
|
+
that.port = state.getPort();
|
|
3728
|
+
that.pathname = state.getPathname();
|
|
3729
|
+
that.search = state.getSearch();
|
|
3730
|
+
that.searchParams = state.getSearchParams();
|
|
3731
|
+
that.hash = state.getHash();
|
|
3732
|
+
}
|
|
3733
|
+
};
|
|
3734
|
+
|
|
3735
|
+
var URLPrototype = URLConstructor.prototype;
|
|
3736
|
+
|
|
3737
|
+
var accessorDescriptor = function (getter, setter) {
|
|
3738
|
+
return {
|
|
3739
|
+
get: function () {
|
|
3740
|
+
return getInternalURLState(this)[getter]();
|
|
3741
|
+
},
|
|
3742
|
+
set: setter && function (value) {
|
|
3743
|
+
return getInternalURLState(this)[setter](value);
|
|
3744
|
+
},
|
|
3745
|
+
configurable: true,
|
|
3746
|
+
enumerable: true
|
|
3747
|
+
};
|
|
3748
|
+
};
|
|
3749
|
+
|
|
3750
|
+
if (DESCRIPTORS) {
|
|
3751
|
+
defineProperties(URLPrototype, {
|
|
3752
|
+
// `URL.prototype.href` accessors pair
|
|
3753
|
+
// https://url.spec.whatwg.org/#dom-url-href
|
|
3754
|
+
href: accessorDescriptor('serialize', 'setHref'),
|
|
3755
|
+
// `URL.prototype.origin` getter
|
|
3756
|
+
// https://url.spec.whatwg.org/#dom-url-origin
|
|
3757
|
+
origin: accessorDescriptor('getOrigin'),
|
|
3758
|
+
// `URL.prototype.protocol` accessors pair
|
|
3759
|
+
// https://url.spec.whatwg.org/#dom-url-protocol
|
|
3760
|
+
protocol: accessorDescriptor('getProtocol', 'setProtocol'),
|
|
3761
|
+
// `URL.prototype.username` accessors pair
|
|
3762
|
+
// https://url.spec.whatwg.org/#dom-url-username
|
|
3763
|
+
username: accessorDescriptor('getUsername', 'setUsername'),
|
|
3764
|
+
// `URL.prototype.password` accessors pair
|
|
3765
|
+
// https://url.spec.whatwg.org/#dom-url-password
|
|
3766
|
+
password: accessorDescriptor('getPassword', 'setPassword'),
|
|
3767
|
+
// `URL.prototype.host` accessors pair
|
|
3768
|
+
// https://url.spec.whatwg.org/#dom-url-host
|
|
3769
|
+
host: accessorDescriptor('getHost', 'setHost'),
|
|
3770
|
+
// `URL.prototype.hostname` accessors pair
|
|
3771
|
+
// https://url.spec.whatwg.org/#dom-url-hostname
|
|
3772
|
+
hostname: accessorDescriptor('getHostname', 'setHostname'),
|
|
3773
|
+
// `URL.prototype.port` accessors pair
|
|
3774
|
+
// https://url.spec.whatwg.org/#dom-url-port
|
|
3775
|
+
port: accessorDescriptor('getPort', 'setPort'),
|
|
3776
|
+
// `URL.prototype.pathname` accessors pair
|
|
3777
|
+
// https://url.spec.whatwg.org/#dom-url-pathname
|
|
3778
|
+
pathname: accessorDescriptor('getPathname', 'setPathname'),
|
|
3779
|
+
// `URL.prototype.search` accessors pair
|
|
3780
|
+
// https://url.spec.whatwg.org/#dom-url-search
|
|
3781
|
+
search: accessorDescriptor('getSearch', 'setSearch'),
|
|
3782
|
+
// `URL.prototype.searchParams` getter
|
|
3783
|
+
// https://url.spec.whatwg.org/#dom-url-searchparams
|
|
3784
|
+
searchParams: accessorDescriptor('getSearchParams'),
|
|
3785
|
+
// `URL.prototype.hash` accessors pair
|
|
3786
|
+
// https://url.spec.whatwg.org/#dom-url-hash
|
|
3787
|
+
hash: accessorDescriptor('getHash', 'setHash')
|
|
3788
|
+
});
|
|
3789
|
+
}
|
|
3790
|
+
|
|
3791
|
+
// `URL.prototype.toJSON` method
|
|
3792
|
+
// https://url.spec.whatwg.org/#dom-url-tojson
|
|
3793
|
+
redefine$1(URLPrototype, 'toJSON', function toJSON() {
|
|
3794
|
+
return getInternalURLState(this).serialize();
|
|
3795
|
+
}, { enumerable: true });
|
|
3796
|
+
|
|
3797
|
+
// `URL.prototype.toString` method
|
|
3798
|
+
// https://url.spec.whatwg.org/#URL-stringification-behavior
|
|
3799
|
+
redefine$1(URLPrototype, 'toString', function toString() {
|
|
3800
|
+
return getInternalURLState(this).serialize();
|
|
3801
|
+
}, { enumerable: true });
|
|
3802
|
+
|
|
3803
|
+
if (NativeURL) {
|
|
3804
|
+
var nativeCreateObjectURL = NativeURL.createObjectURL;
|
|
3805
|
+
var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
|
|
3806
|
+
// `URL.createObjectURL` method
|
|
3807
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
|
|
3808
|
+
if (nativeCreateObjectURL) redefine$1(URLConstructor, 'createObjectURL', bind(nativeCreateObjectURL, NativeURL));
|
|
3809
|
+
// `URL.revokeObjectURL` method
|
|
3810
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
|
|
3811
|
+
if (nativeRevokeObjectURL) redefine$1(URLConstructor, 'revokeObjectURL', bind(nativeRevokeObjectURL, NativeURL));
|
|
3812
|
+
}
|
|
3813
|
+
|
|
3814
|
+
setToStringTag(URLConstructor, 'URL');
|
|
3815
|
+
|
|
3816
|
+
$$1({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
|
|
3817
|
+
URL: URLConstructor
|
|
3818
|
+
});
|
|
3819
|
+
|
|
3820
|
+
var isObject = isObject$7;
|
|
3821
|
+
var classof = classofRaw$1;
|
|
3822
|
+
var wellKnownSymbol$1 = wellKnownSymbol$e;
|
|
3823
|
+
|
|
3824
|
+
var MATCH$1 = wellKnownSymbol$1('match');
|
|
3825
|
+
|
|
3826
|
+
// `IsRegExp` abstract operation
|
|
3827
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
3828
|
+
var isRegexp = function (it) {
|
|
3829
|
+
var isRegExp;
|
|
3830
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
|
|
3831
|
+
};
|
|
3832
|
+
|
|
3833
|
+
var global$1 = global$C;
|
|
3834
|
+
var isRegExp = isRegexp;
|
|
3835
|
+
|
|
3836
|
+
var TypeError$1 = global$1.TypeError;
|
|
3837
|
+
|
|
3838
|
+
var notARegexp = function (it) {
|
|
3839
|
+
if (isRegExp(it)) {
|
|
3840
|
+
throw TypeError$1("The method doesn't accept regular expressions");
|
|
3841
|
+
} return it;
|
|
3842
|
+
};
|
|
3843
|
+
|
|
3844
|
+
var wellKnownSymbol = wellKnownSymbol$e;
|
|
3845
|
+
|
|
3846
|
+
var MATCH = wellKnownSymbol('match');
|
|
3847
|
+
|
|
3848
|
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
3849
|
+
var regexp = /./;
|
|
3850
|
+
try {
|
|
3851
|
+
'/./'[METHOD_NAME](regexp);
|
|
3852
|
+
} catch (error1) {
|
|
3853
|
+
try {
|
|
3854
|
+
regexp[MATCH] = false;
|
|
3855
|
+
return '/./'[METHOD_NAME](regexp);
|
|
3856
|
+
} catch (error2) { /* empty */ }
|
|
3857
|
+
} return false;
|
|
3858
|
+
};
|
|
3859
|
+
|
|
3860
|
+
var $ = _export;
|
|
3861
|
+
var uncurryThis = functionUncurryThis;
|
|
3862
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
3863
|
+
var toLength = toLength$2;
|
|
3864
|
+
var toString = toString$4;
|
|
3865
|
+
var notARegExp = notARegexp;
|
|
3866
|
+
var requireObjectCoercible = requireObjectCoercible$4;
|
|
3867
|
+
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
3868
|
+
|
|
3869
|
+
// eslint-disable-next-line es-x/no-string-prototype-startswith -- safe
|
|
3870
|
+
var un$StartsWith = uncurryThis(''.startsWith);
|
|
3871
|
+
var stringSlice = uncurryThis(''.slice);
|
|
3872
|
+
var min = Math.min;
|
|
3873
|
+
|
|
3874
|
+
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
|
|
3875
|
+
// https://github.com/zloirock/core-js/pull/702
|
|
3876
|
+
var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
|
|
3877
|
+
var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
|
|
3878
|
+
return descriptor && !descriptor.writable;
|
|
3879
|
+
}();
|
|
3880
|
+
|
|
3881
|
+
// `String.prototype.startsWith` method
|
|
3882
|
+
// https://tc39.es/ecma262/#sec-string.prototype.startswith
|
|
3883
|
+
$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
|
|
3884
|
+
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
3885
|
+
var that = toString(requireObjectCoercible(this));
|
|
3886
|
+
notARegExp(searchString);
|
|
3887
|
+
var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
3888
|
+
var search = toString(searchString);
|
|
3889
|
+
return un$StartsWith
|
|
3890
|
+
? un$StartsWith(that, search, index)
|
|
3891
|
+
: stringSlice(that, index, index + search.length) === search;
|
|
3892
|
+
}
|
|
3893
|
+
});
|
|
3894
|
+
|
|
3895
|
+
var call = functionCall;
|
|
3896
|
+
var hasOwn = hasOwnProperty_1;
|
|
3897
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
3898
|
+
var regExpFlags = regexpFlags$1;
|
|
3899
|
+
|
|
3900
|
+
var RegExpPrototype$1 = RegExp.prototype;
|
|
3901
|
+
|
|
3902
|
+
var regexpGetFlags = function (R) {
|
|
3903
|
+
var flags = R.flags;
|
|
3904
|
+
return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
|
|
3905
|
+
? call(regExpFlags, R) : flags;
|
|
3906
|
+
};
|
|
3907
|
+
|
|
3908
|
+
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
3909
|
+
var redefine = redefine$7.exports;
|
|
3910
|
+
var anObject = anObject$b;
|
|
3911
|
+
var $toString = toString$4;
|
|
3912
|
+
var fails = fails$g;
|
|
3913
|
+
var getRegExpFlags = regexpGetFlags;
|
|
3914
|
+
|
|
3915
|
+
var TO_STRING = 'toString';
|
|
3916
|
+
var RegExpPrototype = RegExp.prototype;
|
|
3917
|
+
var n$ToString = RegExpPrototype[TO_STRING];
|
|
3918
|
+
|
|
3919
|
+
var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
|
3920
|
+
// FF44- RegExp#toString has a wrong name
|
|
3921
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
|
|
3922
|
+
|
|
3923
|
+
// `RegExp.prototype.toString` method
|
|
3924
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
3925
|
+
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
3926
|
+
redefine(RegExp.prototype, TO_STRING, function toString() {
|
|
3927
|
+
var R = anObject(this);
|
|
3928
|
+
var pattern = $toString(R.source);
|
|
3929
|
+
var flags = $toString(getRegExpFlags(R));
|
|
3930
|
+
return '/' + pattern + '/' + flags;
|
|
3931
|
+
}, { unsafe: true });
|
|
3932
|
+
}
|
|
3933
|
+
|
|
3934
|
+
var Chanukah="Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights";var Pesach="Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt";var Purim="Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination";var Shavuot="Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai";var Sigd="Ethiopian Jewish holiday occurring 50 days after Yom Kippur";var Sukkot="Feast of Booths";var holidayDescription = {"Asara B'Tevet":"Fast commemorating the siege of Jerusalem",Chanukah:Chanukah,"Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Lag BaOmer":"33rd day of counting the Omer","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:Pesach,"Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:Purim,"Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":"Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes \"Adar Bet\" or \"Adar Sheni\", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Rosh Hashana LaBehemot":"New Year for Tithing Animals","Shabbat Chazon":"Shabbat before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:Shavuot,"Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities",Sigd:Sigd,"Simchat Torah":"Day of Celebrating the Torah",Sukkot:Sukkot,"Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAliyah School Observance":"Aliyah Day observed in Israeli schools","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Note that Hebcal displays modern holidays like Yom HaAtzma'ut according to the Israeli schedule. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Note that Hebcal displays modern holidays like Yom HaZikaron according to the Israeli schedule. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};
|
|
3935
|
+
|
|
3936
|
+
/**
|
|
3937
|
+
* Helper function to transform a string to make it more usable in a URL or filename.
|
|
3938
|
+
* Converts to lowercase and replaces non-word characters with hyphen ('-').
|
|
3939
|
+
* @example
|
|
3940
|
+
* makeAnchor('Rosh Chodesh Adar II') // 'rosh-chodesh-adar-ii'
|
|
3941
|
+
* @param {string} s
|
|
3942
|
+
* @return {string}
|
|
3943
|
+
*/
|
|
3944
|
+
|
|
3945
|
+
function makeAnchor(s) {
|
|
3946
|
+
return s.toLowerCase().replace(/'/g, '').replace(/[^\w]/g, '-').replace(/-+/g, '-').replace(/^-/g, '').replace(/-$/g, '');
|
|
3947
|
+
}
|
|
3948
|
+
/**
|
|
3949
|
+
* @param {HebrewCalendar.Options} options
|
|
3950
|
+
* @return {string}
|
|
3951
|
+
*/
|
|
3952
|
+
|
|
3953
|
+
function getDownloadFilename(options) {
|
|
3954
|
+
let fileName = 'hebcal_' + options.year;
|
|
3955
|
+
|
|
3956
|
+
if (options.isHebrewYear) {
|
|
3957
|
+
fileName += 'h';
|
|
3958
|
+
}
|
|
3959
|
+
|
|
3960
|
+
if (options.month) {
|
|
3961
|
+
fileName += '_' + options.month;
|
|
3962
|
+
}
|
|
3963
|
+
|
|
3964
|
+
if (options.location) {
|
|
3965
|
+
const name = options.location.zip || options.location.asciiname || options.location.getShortName();
|
|
3966
|
+
fileName += '_' + makeAnchor(name).replace(/[-]/g, '_');
|
|
3967
|
+
}
|
|
3968
|
+
|
|
3969
|
+
return fileName;
|
|
3970
|
+
}
|
|
3971
|
+
/**
|
|
3972
|
+
* @param {number} number
|
|
3973
|
+
* @return {string}
|
|
3974
|
+
*/
|
|
3975
|
+
|
|
3976
|
+
function pad2(number) {
|
|
3977
|
+
if (number < 10) {
|
|
3978
|
+
return '0' + number;
|
|
3979
|
+
}
|
|
3980
|
+
|
|
3981
|
+
return String(number);
|
|
3982
|
+
}
|
|
3983
|
+
/**
|
|
3984
|
+
* @param {number} number
|
|
3985
|
+
* @return {string}
|
|
3986
|
+
*/
|
|
3987
|
+
|
|
3988
|
+
function pad4(number) {
|
|
3989
|
+
if (number < 0) {
|
|
3990
|
+
return '-00' + pad4(-number);
|
|
3991
|
+
} else if (number < 10) {
|
|
3992
|
+
return '000' + number;
|
|
3993
|
+
} else if (number < 100) {
|
|
3994
|
+
return '00' + number;
|
|
3995
|
+
} else if (number < 1000) {
|
|
3996
|
+
return '0' + number;
|
|
3997
|
+
}
|
|
3998
|
+
|
|
3999
|
+
return String(number);
|
|
4000
|
+
}
|
|
4001
|
+
/**
|
|
4002
|
+
* Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
|
|
4003
|
+
* @deprecated
|
|
4004
|
+
* @param {string} tzid
|
|
4005
|
+
* @param {Date} date
|
|
4006
|
+
* @return {string}
|
|
4007
|
+
*/
|
|
4008
|
+
|
|
4009
|
+
function timeZoneOffsetStr(tzid, date) {
|
|
4010
|
+
return core.Zmanim.timeZoneOffset(tzid, date);
|
|
4011
|
+
}
|
|
4012
|
+
/**
|
|
4013
|
+
* Returns just the date portion as YYYY-MM-DD
|
|
4014
|
+
* @param {Date} d
|
|
4015
|
+
* @return {string}
|
|
4016
|
+
*/
|
|
4017
|
+
|
|
4018
|
+
function toISOString(d) {
|
|
4019
|
+
return pad4(d.getFullYear()) + '-' + pad2(d.getMonth() + 1) + '-' + pad2(d.getDate());
|
|
4020
|
+
}
|
|
4021
|
+
/**
|
|
4022
|
+
* Returns a string like "2018-09-01T12:30:00-05:00"
|
|
4023
|
+
* @deprecated
|
|
4024
|
+
* @param {Date} date
|
|
4025
|
+
* @param {string} timeStr must be formatted with only hours and minutes, like "17:12"
|
|
4026
|
+
* @param {string} tzid like "America/New_York"
|
|
4027
|
+
* @return {string}
|
|
4028
|
+
*/
|
|
4029
|
+
|
|
4030
|
+
function toISOStringWithTimezone(date, timeStr, tzid) {
|
|
4031
|
+
const str = toISOString(date);
|
|
4032
|
+
if (!timeStr) return str;
|
|
4033
|
+
return str + 'T' + timeStr + ':00' + core.Zmanim.timeZoneOffset(tzid, date);
|
|
4034
|
+
}
|
|
4035
|
+
/**
|
|
4036
|
+
* Returns a category and subcategory name
|
|
4037
|
+
* @param {Event} ev
|
|
4038
|
+
* @return {string[]}
|
|
4039
|
+
*/
|
|
4040
|
+
|
|
4041
|
+
function getEventCategories(ev) {
|
|
4042
|
+
const desc = ev.getDesc(); // since these use flags.MINOR_FAST or flags.MAJOR_FAST, check description first
|
|
4043
|
+
|
|
4044
|
+
if (desc === 'Fast begins' || desc === 'Fast ends') {
|
|
4045
|
+
return ['zmanim', 'fast'];
|
|
4046
|
+
}
|
|
4047
|
+
|
|
4048
|
+
switch (ev.getFlags()) {
|
|
4049
|
+
case core.flags.OMER_COUNT:
|
|
4050
|
+
return ['omer'];
|
|
4051
|
+
|
|
4052
|
+
case core.flags.HEBREW_DATE:
|
|
4053
|
+
return ['hebdate'];
|
|
4054
|
+
|
|
4055
|
+
case core.flags.PARSHA_HASHAVUA:
|
|
4056
|
+
return ['parashat'];
|
|
4057
|
+
// backwards-compat
|
|
4058
|
+
|
|
4059
|
+
case core.flags.DAF_YOMI:
|
|
4060
|
+
return ['dafyomi'];
|
|
4061
|
+
|
|
4062
|
+
case core.flags.ROSH_CHODESH:
|
|
4063
|
+
return ['roshchodesh'];
|
|
4064
|
+
|
|
4065
|
+
case core.flags.SPECIAL_SHABBAT:
|
|
4066
|
+
return ['holiday', 'shabbat'];
|
|
4067
|
+
|
|
4068
|
+
case core.flags.MINOR_FAST:
|
|
4069
|
+
return ['holiday', 'fast'];
|
|
4070
|
+
|
|
4071
|
+
case core.flags.MAJOR_FAST:
|
|
4072
|
+
return ['holiday', 'fast', 'major'];
|
|
4073
|
+
|
|
4074
|
+
case core.flags.MODERN_HOLIDAY:
|
|
4075
|
+
return ['holiday', 'modern'];
|
|
4076
|
+
|
|
4077
|
+
case core.flags.SHABBAT_MEVARCHIM:
|
|
4078
|
+
return ['mevarchim'];
|
|
4079
|
+
|
|
4080
|
+
case core.flags.MOLAD:
|
|
4081
|
+
return ['molad'];
|
|
4082
|
+
|
|
4083
|
+
case core.flags.USER_EVENT:
|
|
4084
|
+
return ['user'];
|
|
4085
|
+
|
|
4086
|
+
case core.flags.MINOR_HOLIDAY:
|
|
4087
|
+
return ['holiday', 'minor'];
|
|
4088
|
+
|
|
4089
|
+
case core.flags.MISHNA_YOMI:
|
|
4090
|
+
return ['mishnayomi'];
|
|
4091
|
+
// fall through to string-based category
|
|
4092
|
+
}
|
|
4093
|
+
|
|
4094
|
+
if (ev.cholHaMoedDay) {
|
|
4095
|
+
return ['holiday', 'major', 'cholhamoed'];
|
|
4096
|
+
}
|
|
4097
|
+
|
|
4098
|
+
switch (desc) {
|
|
4099
|
+
case 'Havdalah':
|
|
4100
|
+
return ['havdalah'];
|
|
4101
|
+
|
|
4102
|
+
case 'Candle lighting':
|
|
4103
|
+
return ['candles'];
|
|
4104
|
+
|
|
4105
|
+
case 'Lag BaOmer':
|
|
4106
|
+
case 'Leil Selichot':
|
|
4107
|
+
case 'Pesach Sheni':
|
|
4108
|
+
case 'Erev Purim':
|
|
4109
|
+
case 'Purim Katan':
|
|
4110
|
+
case 'Shushan Purim':
|
|
4111
|
+
case 'Tu B\'Av':
|
|
4112
|
+
case 'Tu BiShvat':
|
|
4113
|
+
case 'Rosh Hashana LaBehemot':
|
|
4114
|
+
return ['holiday', 'minor'];
|
|
4115
|
+
|
|
4116
|
+
case 'Erev Tish\'a B\'Av':
|
|
4117
|
+
return ['holiday', 'fast', 'major'];
|
|
4118
|
+
|
|
4119
|
+
default:
|
|
4120
|
+
return ['holiday', 'major'];
|
|
4121
|
+
}
|
|
4122
|
+
}
|
|
4123
|
+
/**
|
|
1475
4124
|
* Renders the event title in default locale, but strips off time
|
|
1476
4125
|
* @param {Event} ev
|
|
1477
4126
|
* @return {string}
|
|
@@ -1602,16 +4251,64 @@ function makeTorahMemoText(ev, il) {
|
|
|
1602
4251
|
*/
|
|
1603
4252
|
|
|
1604
4253
|
function appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign) {
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
4254
|
+
const u = new URL(url);
|
|
4255
|
+
const isHebcal = u.host === 'www.hebcal.com';
|
|
4256
|
+
|
|
4257
|
+
if (isHebcal) {
|
|
4258
|
+
if (il) {
|
|
4259
|
+
u.searchParams.set('i', 'on');
|
|
4260
|
+
}
|
|
4261
|
+
|
|
4262
|
+
const path = u.pathname;
|
|
4263
|
+
const isHolidays = path.startsWith('/holidays/');
|
|
4264
|
+
const isSedrot = path.startsWith('/sedrot/');
|
|
4265
|
+
const isOmer = path.startsWith('/omer/');
|
|
4266
|
+
|
|
4267
|
+
if (isHolidays || isSedrot || isOmer) {
|
|
4268
|
+
u.host = 'hebcal.com';
|
|
4269
|
+
|
|
4270
|
+
if (isHolidays) {
|
|
4271
|
+
u.pathname = '/h/' + path.substring(10);
|
|
4272
|
+
} else if (isSedrot) {
|
|
4273
|
+
u.pathname = '/s/' + path.substring(8);
|
|
4274
|
+
} else {
|
|
4275
|
+
// isOmer
|
|
4276
|
+
u.pathname = '/o/' + path.substring(6);
|
|
4277
|
+
}
|
|
4278
|
+
|
|
4279
|
+
if (!utmCampaign || !(utmCampaign.startsWith('ical-') || utmCampaign.startsWith('pdf-'))) {
|
|
4280
|
+
if (utmSource) {
|
|
4281
|
+
u.searchParams.set('us', utmSource);
|
|
4282
|
+
}
|
|
4283
|
+
|
|
4284
|
+
if (utmMedium) {
|
|
4285
|
+
u.searchParams.set('um', utmMedium);
|
|
4286
|
+
}
|
|
4287
|
+
}
|
|
4288
|
+
|
|
4289
|
+
if (utmCampaign) {
|
|
4290
|
+
u.searchParams.set('uc', utmCampaign);
|
|
4291
|
+
}
|
|
4292
|
+
|
|
4293
|
+
return u.toString();
|
|
4294
|
+
}
|
|
4295
|
+
}
|
|
4296
|
+
|
|
4297
|
+
utmSource = isHebcal ? utmSource : 'hebcal.com';
|
|
4298
|
+
|
|
4299
|
+
if (utmSource) {
|
|
4300
|
+
u.searchParams.set('utm_source', utmSource);
|
|
4301
|
+
}
|
|
4302
|
+
|
|
4303
|
+
if (utmMedium) {
|
|
4304
|
+
u.searchParams.set('utm_medium', utmMedium);
|
|
4305
|
+
}
|
|
4306
|
+
|
|
4307
|
+
if (utmCampaign) {
|
|
4308
|
+
u.searchParams.set('utm_campaign', utmCampaign);
|
|
1609
4309
|
}
|
|
1610
4310
|
|
|
1611
|
-
|
|
1612
|
-
const utm = "utm_source=".concat(utmSource, "&utm_medium=").concat(utmMedium);
|
|
1613
|
-
const campaign = utmCampaign ? "&utm_campaign=".concat(utmCampaign) : '';
|
|
1614
|
-
return url + sep + utm + campaign;
|
|
4311
|
+
return u.toString();
|
|
1615
4312
|
}
|
|
1616
4313
|
/**
|
|
1617
4314
|
* @private
|
|
@@ -1752,7 +4449,7 @@ function eventsToClassicApi(events, options) {
|
|
|
1752
4449
|
cc: location.getCountryCode(),
|
|
1753
4450
|
country: countryNames[location.getCountryCode()]
|
|
1754
4451
|
};
|
|
1755
|
-
['admin1', 'asciiname', 'geo', 'zip', 'state', 'geonameid'].forEach(k => {
|
|
4452
|
+
['admin1', 'asciiname', 'geo', 'zip', 'state', 'stateName', 'geonameid'].forEach(k => {
|
|
1756
4453
|
if (location[k]) {
|
|
1757
4454
|
result.location[k] = location[k];
|
|
1758
4455
|
}
|