@hebcal/rest-api 4.5.0 → 4.5.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 +231 -248
- package/dist/bundle.min.js +2 -2
- package/dist/fullcalendar.js +4 -42
- package/dist/fullcalendar.min.js +2 -2
- package/dist/index.js +8 -45
- package/dist/index.mjs +8 -45
- package/package.json +15 -15
package/dist/bundle.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*! @hebcal/rest-api v4.5.
|
|
1
|
+
/*! @hebcal/rest-api v4.5.2 */
|
|
2
2
|
var hebcal__rest_api = (function (exports, core, leyning, triennial) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
6
|
|
|
7
7
|
var check = function (it) {
|
|
8
|
-
return it && it.Math
|
|
8
|
+
return it && it.Math === Math && it;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
12
|
-
var global$
|
|
12
|
+
var global$h =
|
|
13
13
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
14
14
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
15
15
|
check(typeof window == 'object' && window) ||
|
|
@@ -17,7 +17,7 @@ var global$g =
|
|
|
17
17
|
check(typeof self == 'object' && self) ||
|
|
18
18
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
19
19
|
// eslint-disable-next-line no-new-func -- fallback
|
|
20
|
-
(function () { return this; })() || Function('return this')();
|
|
20
|
+
(function () { return this; })() || commonjsGlobal || Function('return this')();
|
|
21
21
|
|
|
22
22
|
var objectGetOwnPropertyDescriptor = {};
|
|
23
23
|
|
|
@@ -34,7 +34,7 @@ var fails$g = fails$h;
|
|
|
34
34
|
// Detect IE8's incomplete defineProperty implementation
|
|
35
35
|
var descriptors = !fails$g(function () {
|
|
36
36
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
37
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1]
|
|
37
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
var fails$f = fails$h;
|
|
@@ -113,7 +113,7 @@ var indexedObject = fails$e(function () {
|
|
|
113
113
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
114
114
|
return !$Object$4('z').propertyIsEnumerable(0);
|
|
115
115
|
}) ? function (it) {
|
|
116
|
-
return classof$6(it)
|
|
116
|
+
return classof$6(it) === 'String' ? split$3(it, '') : $Object$4(it);
|
|
117
117
|
} : $Object$4;
|
|
118
118
|
|
|
119
119
|
// we can't use just `it == null` since of `document.all` special case
|
|
@@ -175,7 +175,7 @@ var isObject$8 = $documentAll.IS_HTMLDDA ? function (it) {
|
|
|
175
175
|
return typeof it == 'object' ? it !== null : isCallable$g(it);
|
|
176
176
|
};
|
|
177
177
|
|
|
178
|
-
var global$
|
|
178
|
+
var global$g = global$h;
|
|
179
179
|
var isCallable$f = isCallable$h;
|
|
180
180
|
|
|
181
181
|
var aFunction = function (argument) {
|
|
@@ -183,7 +183,7 @@ var aFunction = function (argument) {
|
|
|
183
183
|
};
|
|
184
184
|
|
|
185
185
|
var getBuiltIn$4 = function (namespace, method) {
|
|
186
|
-
return arguments.length < 2 ? aFunction(global$
|
|
186
|
+
return arguments.length < 2 ? aFunction(global$g[namespace]) : global$g[namespace] && global$g[namespace][method];
|
|
187
187
|
};
|
|
188
188
|
|
|
189
189
|
var uncurryThis$h = functionUncurryThis;
|
|
@@ -192,11 +192,11 @@ var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
|
|
|
192
192
|
|
|
193
193
|
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
194
194
|
|
|
195
|
-
var global$
|
|
195
|
+
var global$f = global$h;
|
|
196
196
|
var userAgent = engineUserAgent;
|
|
197
197
|
|
|
198
|
-
var process = global$
|
|
199
|
-
var Deno = global$
|
|
198
|
+
var process = global$f.process;
|
|
199
|
+
var Deno = global$f.Deno;
|
|
200
200
|
var versions = process && process.versions || Deno && Deno.version;
|
|
201
201
|
var v8 = versions && versions.v8;
|
|
202
202
|
var match, version;
|
|
@@ -221,22 +221,25 @@ if (!version && userAgent) {
|
|
|
221
221
|
var engineV8Version = version;
|
|
222
222
|
|
|
223
223
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
224
|
-
|
|
225
224
|
var V8_VERSION = engineV8Version;
|
|
226
225
|
var fails$d = fails$h;
|
|
226
|
+
var global$e = global$h;
|
|
227
|
+
|
|
228
|
+
var $String$5 = global$e.String;
|
|
227
229
|
|
|
228
230
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
229
231
|
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
|
|
230
|
-
var symbol = Symbol();
|
|
232
|
+
var symbol = Symbol('symbol detection');
|
|
231
233
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
232
234
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
233
|
-
|
|
235
|
+
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
236
|
+
// of course, fail.
|
|
237
|
+
return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
234
238
|
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
235
239
|
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
236
240
|
});
|
|
237
241
|
|
|
238
242
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
239
|
-
|
|
240
243
|
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
241
244
|
|
|
242
245
|
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
@@ -308,7 +311,7 @@ var shared$4 = {exports: {}};
|
|
|
308
311
|
|
|
309
312
|
var isPure = false;
|
|
310
313
|
|
|
311
|
-
var global$d = global$
|
|
314
|
+
var global$d = global$h;
|
|
312
315
|
|
|
313
316
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
314
317
|
var defineProperty$6 = Object.defineProperty;
|
|
@@ -321,7 +324,7 @@ var defineGlobalProperty$3 = function (key, value) {
|
|
|
321
324
|
} return value;
|
|
322
325
|
};
|
|
323
326
|
|
|
324
|
-
var global$c = global$
|
|
327
|
+
var global$c = global$h;
|
|
325
328
|
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
326
329
|
|
|
327
330
|
var SHARED = '__core-js_shared__';
|
|
@@ -334,10 +337,10 @@ var store$2 = sharedStore;
|
|
|
334
337
|
(shared$4.exports = function (key, value) {
|
|
335
338
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
336
339
|
})('versions', []).push({
|
|
337
|
-
version: '3.
|
|
340
|
+
version: '3.32.1',
|
|
338
341
|
mode: 'global',
|
|
339
342
|
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
340
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
343
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE',
|
|
341
344
|
source: 'https://github.com/zloirock/core-js'
|
|
342
345
|
});
|
|
343
346
|
|
|
@@ -375,7 +378,7 @@ var uid$2 = function (key) {
|
|
|
375
378
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
|
|
376
379
|
};
|
|
377
380
|
|
|
378
|
-
var global$b = global$
|
|
381
|
+
var global$b = global$h;
|
|
379
382
|
var shared$3 = sharedExports;
|
|
380
383
|
var hasOwn$b = hasOwnProperty_1;
|
|
381
384
|
var uid$1 = uid$2;
|
|
@@ -430,7 +433,7 @@ var toPropertyKey$3 = function (argument) {
|
|
|
430
433
|
return isSymbol(key) ? key : key + '';
|
|
431
434
|
};
|
|
432
435
|
|
|
433
|
-
var global$a = global$
|
|
436
|
+
var global$a = global$h;
|
|
434
437
|
var isObject$5 = isObject$8;
|
|
435
438
|
|
|
436
439
|
var document$1 = global$a.document;
|
|
@@ -450,7 +453,7 @@ var ie8DomDefine = !DESCRIPTORS$c && !fails$c(function () {
|
|
|
450
453
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
451
454
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
452
455
|
get: function () { return 7; }
|
|
453
|
-
}).a
|
|
456
|
+
}).a !== 7;
|
|
454
457
|
});
|
|
455
458
|
|
|
456
459
|
var DESCRIPTORS$b = descriptors;
|
|
@@ -488,7 +491,7 @@ var v8PrototypeDefineBug = DESCRIPTORS$a && fails$b(function () {
|
|
|
488
491
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
489
492
|
value: 42,
|
|
490
493
|
writable: false
|
|
491
|
-
}).prototype
|
|
494
|
+
}).prototype !== 42;
|
|
492
495
|
});
|
|
493
496
|
|
|
494
497
|
var isObject$4 = isObject$8;
|
|
@@ -592,7 +595,7 @@ if (!isCallable$b(store$1.inspectSource)) {
|
|
|
592
595
|
|
|
593
596
|
var inspectSource$2 = store$1.inspectSource;
|
|
594
597
|
|
|
595
|
-
var global$9 = global$
|
|
598
|
+
var global$9 = global$h;
|
|
596
599
|
var isCallable$a = isCallable$h;
|
|
597
600
|
|
|
598
601
|
var WeakMap$1 = global$9.WeakMap;
|
|
@@ -611,7 +614,7 @@ var sharedKey$3 = function (key) {
|
|
|
611
614
|
var hiddenKeys$4 = {};
|
|
612
615
|
|
|
613
616
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
614
|
-
var global$8 = global$
|
|
617
|
+
var global$8 = global$h;
|
|
615
618
|
var isObject$3 = isObject$8;
|
|
616
619
|
var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
|
|
617
620
|
var hasOwn$8 = hasOwnProperty_1;
|
|
@@ -833,10 +836,10 @@ var createMethod$1 = function (IS_INCLUDES) {
|
|
|
833
836
|
var value;
|
|
834
837
|
// Array#includes uses SameValueZero equality algorithm
|
|
835
838
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
836
|
-
if (IS_INCLUDES && el
|
|
839
|
+
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
837
840
|
value = O[index++];
|
|
838
841
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
839
|
-
if (value
|
|
842
|
+
if (value !== value) return true;
|
|
840
843
|
// Array#indexOf ignores holes, Array#includes - not
|
|
841
844
|
} else for (;length > index; index++) {
|
|
842
845
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
@@ -941,8 +944,8 @@ var replacement = /#|\.prototype\./;
|
|
|
941
944
|
|
|
942
945
|
var isForced$1 = function (feature, detection) {
|
|
943
946
|
var value = data[normalize(feature)];
|
|
944
|
-
return value
|
|
945
|
-
: value
|
|
947
|
+
return value === POLYFILL ? true
|
|
948
|
+
: value === NATIVE ? false
|
|
946
949
|
: isCallable$7(detection) ? fails$9(detection)
|
|
947
950
|
: !!detection;
|
|
948
951
|
};
|
|
@@ -957,7 +960,7 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
|
957
960
|
|
|
958
961
|
var isForced_1 = isForced$1;
|
|
959
962
|
|
|
960
|
-
var global$7 = global$
|
|
963
|
+
var global$7 = global$h;
|
|
961
964
|
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
962
965
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
|
|
963
966
|
var defineBuiltIn$6 = defineBuiltIn$7;
|
|
@@ -1030,7 +1033,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol$b('toStringTag');
|
|
|
1030
1033
|
var $Object$1 = Object;
|
|
1031
1034
|
|
|
1032
1035
|
// ES3 wrong here
|
|
1033
|
-
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }())
|
|
1036
|
+
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
|
|
1034
1037
|
|
|
1035
1038
|
// fallback for IE11 Script Access Denied error
|
|
1036
1039
|
var tryGet = function (it, key) {
|
|
@@ -1048,7 +1051,7 @@ var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
|
1048
1051
|
// builtinTag case
|
|
1049
1052
|
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
1050
1053
|
// ES3 arguments fallback
|
|
1051
|
-
: (result = classofRaw$1(O))
|
|
1054
|
+
: (result = classofRaw$1(O)) === 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
|
|
1052
1055
|
};
|
|
1053
1056
|
|
|
1054
1057
|
var classof$4 = classof$5;
|
|
@@ -1079,7 +1082,7 @@ var regexpFlags$1 = function () {
|
|
|
1079
1082
|
};
|
|
1080
1083
|
|
|
1081
1084
|
var fails$8 = fails$h;
|
|
1082
|
-
var global$6 = global$
|
|
1085
|
+
var global$6 = global$h;
|
|
1083
1086
|
|
|
1084
1087
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1085
1088
|
var $RegExp$2 = global$6.RegExp;
|
|
@@ -1087,7 +1090,7 @@ var $RegExp$2 = global$6.RegExp;
|
|
|
1087
1090
|
var UNSUPPORTED_Y$1 = fails$8(function () {
|
|
1088
1091
|
var re = $RegExp$2('a', 'y');
|
|
1089
1092
|
re.lastIndex = 2;
|
|
1090
|
-
return re.exec('abcd')
|
|
1093
|
+
return re.exec('abcd') !== null;
|
|
1091
1094
|
});
|
|
1092
1095
|
|
|
1093
1096
|
// UC Browser bug
|
|
@@ -1100,7 +1103,7 @@ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$8(function () {
|
|
|
1100
1103
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1101
1104
|
var re = $RegExp$2('^r', 'gy');
|
|
1102
1105
|
re.lastIndex = 2;
|
|
1103
|
-
return re.exec('str')
|
|
1106
|
+
return re.exec('str') !== null;
|
|
1104
1107
|
});
|
|
1105
1108
|
|
|
1106
1109
|
var regexpStickyHelpers = {
|
|
@@ -1147,7 +1150,6 @@ var getBuiltIn$1 = getBuiltIn$4;
|
|
|
1147
1150
|
var html$1 = getBuiltIn$1('document', 'documentElement');
|
|
1148
1151
|
|
|
1149
1152
|
/* global ActiveXObject -- old IE, WSH */
|
|
1150
|
-
|
|
1151
1153
|
var anObject$6 = anObject$b;
|
|
1152
1154
|
var definePropertiesModule = objectDefineProperties;
|
|
1153
1155
|
var enumBugKeys = enumBugKeys$3;
|
|
@@ -1232,7 +1234,7 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
1232
1234
|
};
|
|
1233
1235
|
|
|
1234
1236
|
var fails$7 = fails$h;
|
|
1235
|
-
var global$5 = global$
|
|
1237
|
+
var global$5 = global$h;
|
|
1236
1238
|
|
|
1237
1239
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1238
1240
|
var $RegExp$1 = global$5.RegExp;
|
|
@@ -1243,7 +1245,7 @@ var regexpUnsupportedDotAll = fails$7(function () {
|
|
|
1243
1245
|
});
|
|
1244
1246
|
|
|
1245
1247
|
var fails$6 = fails$h;
|
|
1246
|
-
var global$4 = global$
|
|
1248
|
+
var global$4 = global$h;
|
|
1247
1249
|
|
|
1248
1250
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1249
1251
|
var $RegExp = global$4.RegExp;
|
|
@@ -1433,7 +1435,7 @@ var ArrayPrototype$1 = Array.prototype;
|
|
|
1433
1435
|
|
|
1434
1436
|
// Array.prototype[@@unscopables]
|
|
1435
1437
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1436
|
-
if (ArrayPrototype$1[UNSCOPABLES]
|
|
1438
|
+
if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
|
|
1437
1439
|
defineProperty$4(ArrayPrototype$1, UNSCOPABLES, {
|
|
1438
1440
|
configurable: true,
|
|
1439
1441
|
value: create$2(null)
|
|
@@ -1574,7 +1576,6 @@ var aPossiblePrototype$1 = function (argument) {
|
|
|
1574
1576
|
};
|
|
1575
1577
|
|
|
1576
1578
|
/* eslint-disable no-proto -- safe */
|
|
1577
|
-
|
|
1578
1579
|
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1579
1580
|
var anObject$5 = anObject$b;
|
|
1580
1581
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
@@ -1646,7 +1647,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1646
1647
|
|| IterablePrototype['@@iterator']
|
|
1647
1648
|
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1648
1649
|
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
1649
|
-
var anyNativeIterator = NAME
|
|
1650
|
+
var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
1650
1651
|
var CurrentIteratorPrototype, methods, KEY;
|
|
1651
1652
|
|
|
1652
1653
|
// fix native
|
|
@@ -1666,7 +1667,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1666
1667
|
}
|
|
1667
1668
|
|
|
1668
1669
|
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
1669
|
-
if (PROPER_FUNCTION_NAME$1 && DEFAULT
|
|
1670
|
+
if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1670
1671
|
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
1671
1672
|
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
1672
1673
|
} else {
|
|
@@ -1745,9 +1746,10 @@ var es_array_iterator = defineIterator$1(Array, 'Array', function (iterated, kin
|
|
|
1745
1746
|
state.target = undefined;
|
|
1746
1747
|
return createIterResultObject$1(undefined, true);
|
|
1747
1748
|
}
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1749
|
+
switch (kind) {
|
|
1750
|
+
case 'keys': return createIterResultObject$1(index, false);
|
|
1751
|
+
case 'values': return createIterResultObject$1(target[index], false);
|
|
1752
|
+
} return createIterResultObject$1([index, target[index]], false);
|
|
1751
1753
|
}, 'values');
|
|
1752
1754
|
|
|
1753
1755
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
@@ -1765,7 +1767,7 @@ if (DESCRIPTORS$4 && values.name !== 'values') try {
|
|
|
1765
1767
|
defineProperty$2(values, 'name', { value: 'values' });
|
|
1766
1768
|
} catch (error) { /* empty */ }
|
|
1767
1769
|
|
|
1768
|
-
var global$3 = global$
|
|
1770
|
+
var global$3 = global$h;
|
|
1769
1771
|
var DOMIterables = domIterables;
|
|
1770
1772
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1771
1773
|
var ArrayIteratorMethods = es_array_iterator;
|
|
@@ -1882,20 +1884,25 @@ var ITERATOR$3 = wellKnownSymbol$5('iterator');
|
|
|
1882
1884
|
var urlConstructorDetection = !fails$3(function () {
|
|
1883
1885
|
// eslint-disable-next-line unicorn/relative-url-style -- required for testing
|
|
1884
1886
|
var url = new URL('b?a=1&b=2&c=3', 'http://a');
|
|
1885
|
-
var
|
|
1887
|
+
var params = url.searchParams;
|
|
1888
|
+
var params2 = new URLSearchParams('a=1&a=2&b=3');
|
|
1886
1889
|
var result = '';
|
|
1887
1890
|
url.pathname = 'c%20d';
|
|
1888
|
-
|
|
1889
|
-
|
|
1891
|
+
params.forEach(function (value, key) {
|
|
1892
|
+
params['delete']('b');
|
|
1890
1893
|
result += key + value;
|
|
1891
1894
|
});
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
+
params2['delete']('a', 2);
|
|
1896
|
+
// `undefined` case is a Chromium 117 bug
|
|
1897
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
|
|
1898
|
+
params2['delete']('b', undefined);
|
|
1899
|
+
return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b')))
|
|
1900
|
+
|| (!params.size && (IS_PURE || !DESCRIPTORS$3))
|
|
1901
|
+
|| !params.sort
|
|
1895
1902
|
|| url.href !== 'http://a/c%20d?a=1&c=3'
|
|
1896
|
-
||
|
|
1903
|
+
|| params.get('c') !== '3'
|
|
1897
1904
|
|| String(new URLSearchParams('?a=1')) !== 'a=1'
|
|
1898
|
-
|| !
|
|
1905
|
+
|| !params[ITERATOR$3]
|
|
1899
1906
|
// throws in Edge
|
|
1900
1907
|
|| new URL('https://a@b').username !== 'a'
|
|
1901
1908
|
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
|
|
@@ -1984,11 +1991,11 @@ var objectAssign = !$assign || fails$2(function () {
|
|
|
1984
1991
|
var A = {};
|
|
1985
1992
|
var B = {};
|
|
1986
1993
|
// eslint-disable-next-line es/no-symbol -- safe
|
|
1987
|
-
var symbol = Symbol();
|
|
1994
|
+
var symbol = Symbol('assign detection');
|
|
1988
1995
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
1989
1996
|
A[symbol] = 7;
|
|
1990
1997
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1991
|
-
return $assign({}, A)[symbol]
|
|
1998
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1992
1999
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1993
2000
|
var T = toObject$1(target);
|
|
1994
2001
|
var argumentsLength = arguments.length;
|
|
@@ -2204,7 +2211,8 @@ var arraySliceSimple = function (O, start, end) {
|
|
|
2204
2211
|
var k = toAbsoluteIndex(start, length);
|
|
2205
2212
|
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
2206
2213
|
var result = $Array(max(fin - k, 0));
|
|
2207
|
-
|
|
2214
|
+
var n = 0;
|
|
2215
|
+
for (; k < fin; k++, n++) createProperty(result, n, O[k]);
|
|
2208
2216
|
result.length = n;
|
|
2209
2217
|
return result;
|
|
2210
2218
|
};
|
|
@@ -2253,7 +2261,7 @@ var ucs2decode = function (string) {
|
|
|
2253
2261
|
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
|
2254
2262
|
// It's a high surrogate, and there is a next character.
|
|
2255
2263
|
var extra = charCodeAt(string, counter++);
|
|
2256
|
-
if ((extra & 0xFC00)
|
|
2264
|
+
if ((extra & 0xFC00) === 0xDC00) { // Low surrogate.
|
|
2257
2265
|
push$2(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
|
2258
2266
|
} else {
|
|
2259
2267
|
// It's an unmatched surrogate; only append this code unit, in case the
|
|
@@ -2352,7 +2360,7 @@ var encode = function (input) {
|
|
|
2352
2360
|
if (currentValue < n && ++delta > maxInt) {
|
|
2353
2361
|
throw $RangeError(OVERFLOW_ERROR);
|
|
2354
2362
|
}
|
|
2355
|
-
if (currentValue
|
|
2363
|
+
if (currentValue === n) {
|
|
2356
2364
|
// Represent delta as a generalized variable-length integer.
|
|
2357
2365
|
var q = delta;
|
|
2358
2366
|
var k = base;
|
|
@@ -2367,7 +2375,7 @@ var encode = function (input) {
|
|
|
2367
2375
|
}
|
|
2368
2376
|
|
|
2369
2377
|
push$2(output, fromCharCode(digitToBasic(q)));
|
|
2370
|
-
bias = adapt(delta, handledCPCountPlusOne, handledCPCount
|
|
2378
|
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
|
|
2371
2379
|
delta = 0;
|
|
2372
2380
|
handledCPCount++;
|
|
2373
2381
|
}
|
|
@@ -2452,7 +2460,7 @@ var arraySort$1 = mergeSort;
|
|
|
2452
2460
|
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
2453
2461
|
|
|
2454
2462
|
var $$2 = _export;
|
|
2455
|
-
var global$2 = global$
|
|
2463
|
+
var global$2 = global$h;
|
|
2456
2464
|
var call$1 = functionCall;
|
|
2457
2465
|
var uncurryThis$2 = functionUncurryThis;
|
|
2458
2466
|
var DESCRIPTORS$1 = descriptors;
|
|
@@ -2655,7 +2663,7 @@ var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
|
|
|
2655
2663
|
anInstance$1(this, URLSearchParamsPrototype);
|
|
2656
2664
|
var init = arguments.length > 0 ? arguments[0] : undefined;
|
|
2657
2665
|
var state = setInternalState$1(this, new URLSearchParamsState(init));
|
|
2658
|
-
if (!DESCRIPTORS$1) this.
|
|
2666
|
+
if (!DESCRIPTORS$1) this.size = state.entries.length;
|
|
2659
2667
|
};
|
|
2660
2668
|
|
|
2661
2669
|
var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
|
|
@@ -2664,32 +2672,37 @@ defineBuiltIns(URLSearchParamsPrototype, {
|
|
|
2664
2672
|
// `URLSearchParams.prototype.append` method
|
|
2665
2673
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
2666
2674
|
append: function append(name, value) {
|
|
2667
|
-
validateArgumentsLength$1(arguments.length, 2);
|
|
2668
2675
|
var state = getInternalParamsState(this);
|
|
2676
|
+
validateArgumentsLength$1(arguments.length, 2);
|
|
2669
2677
|
push$1(state.entries, { key: $toString$2(name), value: $toString$2(value) });
|
|
2670
2678
|
if (!DESCRIPTORS$1) this.length++;
|
|
2671
2679
|
state.updateURL();
|
|
2672
2680
|
},
|
|
2673
2681
|
// `URLSearchParams.prototype.delete` method
|
|
2674
2682
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
|
2675
|
-
'delete': function (name) {
|
|
2676
|
-
validateArgumentsLength$1(arguments.length, 1);
|
|
2683
|
+
'delete': function (name /* , value */) {
|
|
2677
2684
|
var state = getInternalParamsState(this);
|
|
2685
|
+
var length = validateArgumentsLength$1(arguments.length, 1);
|
|
2678
2686
|
var entries = state.entries;
|
|
2679
2687
|
var key = $toString$2(name);
|
|
2688
|
+
var $value = length < 2 ? undefined : arguments[1];
|
|
2689
|
+
var value = $value === undefined ? $value : $toString$2($value);
|
|
2680
2690
|
var index = 0;
|
|
2681
2691
|
while (index < entries.length) {
|
|
2682
|
-
|
|
2683
|
-
|
|
2692
|
+
var entry = entries[index];
|
|
2693
|
+
if (entry.key === key && (value === undefined || entry.value === value)) {
|
|
2694
|
+
splice(entries, index, 1);
|
|
2695
|
+
if (value !== undefined) break;
|
|
2696
|
+
} else index++;
|
|
2684
2697
|
}
|
|
2685
|
-
if (!DESCRIPTORS$1) this.
|
|
2698
|
+
if (!DESCRIPTORS$1) this.size = entries.length;
|
|
2686
2699
|
state.updateURL();
|
|
2687
2700
|
},
|
|
2688
2701
|
// `URLSearchParams.prototype.get` method
|
|
2689
2702
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-get
|
|
2690
2703
|
get: function get(name) {
|
|
2691
|
-
validateArgumentsLength$1(arguments.length, 1);
|
|
2692
2704
|
var entries = getInternalParamsState(this).entries;
|
|
2705
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2693
2706
|
var key = $toString$2(name);
|
|
2694
2707
|
var index = 0;
|
|
2695
2708
|
for (; index < entries.length; index++) {
|
|
@@ -2700,8 +2713,8 @@ defineBuiltIns(URLSearchParamsPrototype, {
|
|
|
2700
2713
|
// `URLSearchParams.prototype.getAll` method
|
|
2701
2714
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-getall
|
|
2702
2715
|
getAll: function getAll(name) {
|
|
2703
|
-
validateArgumentsLength$1(arguments.length, 1);
|
|
2704
2716
|
var entries = getInternalParamsState(this).entries;
|
|
2717
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2705
2718
|
var key = $toString$2(name);
|
|
2706
2719
|
var result = [];
|
|
2707
2720
|
var index = 0;
|
|
@@ -2712,21 +2725,24 @@ defineBuiltIns(URLSearchParamsPrototype, {
|
|
|
2712
2725
|
},
|
|
2713
2726
|
// `URLSearchParams.prototype.has` method
|
|
2714
2727
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-has
|
|
2715
|
-
has: function has(name) {
|
|
2716
|
-
validateArgumentsLength$1(arguments.length, 1);
|
|
2728
|
+
has: function has(name /* , value */) {
|
|
2717
2729
|
var entries = getInternalParamsState(this).entries;
|
|
2730
|
+
var length = validateArgumentsLength$1(arguments.length, 1);
|
|
2718
2731
|
var key = $toString$2(name);
|
|
2732
|
+
var $value = length < 2 ? undefined : arguments[1];
|
|
2733
|
+
var value = $value === undefined ? $value : $toString$2($value);
|
|
2719
2734
|
var index = 0;
|
|
2720
2735
|
while (index < entries.length) {
|
|
2721
|
-
|
|
2736
|
+
var entry = entries[index++];
|
|
2737
|
+
if (entry.key === key && (value === undefined || entry.value === value)) return true;
|
|
2722
2738
|
}
|
|
2723
2739
|
return false;
|
|
2724
2740
|
},
|
|
2725
2741
|
// `URLSearchParams.prototype.set` method
|
|
2726
2742
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-set
|
|
2727
2743
|
set: function set(name, value) {
|
|
2728
|
-
validateArgumentsLength$1(arguments.length, 1);
|
|
2729
2744
|
var state = getInternalParamsState(this);
|
|
2745
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2730
2746
|
var entries = state.entries;
|
|
2731
2747
|
var found = false;
|
|
2732
2748
|
var key = $toString$2(name);
|
|
@@ -2744,7 +2760,7 @@ defineBuiltIns(URLSearchParamsPrototype, {
|
|
|
2744
2760
|
}
|
|
2745
2761
|
}
|
|
2746
2762
|
if (!found) push$1(entries, { key: key, value: val });
|
|
2747
|
-
if (!DESCRIPTORS$1) this.
|
|
2763
|
+
if (!DESCRIPTORS$1) this.size = entries.length;
|
|
2748
2764
|
state.updateURL();
|
|
2749
2765
|
},
|
|
2750
2766
|
// `URLSearchParams.prototype.sort` method
|
|
@@ -2861,7 +2877,7 @@ var web_urlSearchParams_constructor = {
|
|
|
2861
2877
|
var $$1 = _export;
|
|
2862
2878
|
var DESCRIPTORS = descriptors;
|
|
2863
2879
|
var USE_NATIVE_URL = urlConstructorDetection;
|
|
2864
|
-
var global$1 = global$
|
|
2880
|
+
var global$1 = global$h;
|
|
2865
2881
|
var bind = functionBindContext;
|
|
2866
2882
|
var uncurryThis$1 = functionUncurryThis;
|
|
2867
2883
|
var defineBuiltIn$1 = defineBuiltIn$7;
|
|
@@ -2928,7 +2944,7 @@ var EOF;
|
|
|
2928
2944
|
var parseIPv4 = function (input) {
|
|
2929
2945
|
var parts = split(input, '.');
|
|
2930
2946
|
var partsLength, numbers, index, part, radix, number, ipv4;
|
|
2931
|
-
if (parts.length && parts[parts.length - 1]
|
|
2947
|
+
if (parts.length && parts[parts.length - 1] === '') {
|
|
2932
2948
|
parts.length--;
|
|
2933
2949
|
}
|
|
2934
2950
|
partsLength = parts.length;
|
|
@@ -2936,23 +2952,23 @@ var parseIPv4 = function (input) {
|
|
|
2936
2952
|
numbers = [];
|
|
2937
2953
|
for (index = 0; index < partsLength; index++) {
|
|
2938
2954
|
part = parts[index];
|
|
2939
|
-
if (part
|
|
2955
|
+
if (part === '') return input;
|
|
2940
2956
|
radix = 10;
|
|
2941
|
-
if (part.length > 1 && charAt(part, 0)
|
|
2957
|
+
if (part.length > 1 && charAt(part, 0) === '0') {
|
|
2942
2958
|
radix = exec(HEX_START, part) ? 16 : 8;
|
|
2943
|
-
part = stringSlice$1(part, radix
|
|
2959
|
+
part = stringSlice$1(part, radix === 8 ? 1 : 2);
|
|
2944
2960
|
}
|
|
2945
2961
|
if (part === '') {
|
|
2946
2962
|
number = 0;
|
|
2947
2963
|
} else {
|
|
2948
|
-
if (!exec(radix
|
|
2964
|
+
if (!exec(radix === 10 ? DEC : radix === 8 ? OCT : HEX, part)) return input;
|
|
2949
2965
|
number = parseInt(part, radix);
|
|
2950
2966
|
}
|
|
2951
2967
|
push(numbers, number);
|
|
2952
2968
|
}
|
|
2953
2969
|
for (index = 0; index < partsLength; index++) {
|
|
2954
2970
|
number = numbers[index];
|
|
2955
|
-
if (index
|
|
2971
|
+
if (index === partsLength - 1) {
|
|
2956
2972
|
if (number >= pow(256, 5 - partsLength)) return null;
|
|
2957
2973
|
} else if (number > 255) return null;
|
|
2958
2974
|
}
|
|
@@ -2976,15 +2992,15 @@ var parseIPv6 = function (input) {
|
|
|
2976
2992
|
return charAt(input, pointer);
|
|
2977
2993
|
};
|
|
2978
2994
|
|
|
2979
|
-
if (chr()
|
|
2980
|
-
if (charAt(input, 1)
|
|
2995
|
+
if (chr() === ':') {
|
|
2996
|
+
if (charAt(input, 1) !== ':') return;
|
|
2981
2997
|
pointer += 2;
|
|
2982
2998
|
pieceIndex++;
|
|
2983
2999
|
compress = pieceIndex;
|
|
2984
3000
|
}
|
|
2985
3001
|
while (chr()) {
|
|
2986
|
-
if (pieceIndex
|
|
2987
|
-
if (chr()
|
|
3002
|
+
if (pieceIndex === 8) return;
|
|
3003
|
+
if (chr() === ':') {
|
|
2988
3004
|
if (compress !== null) return;
|
|
2989
3005
|
pointer++;
|
|
2990
3006
|
pieceIndex++;
|
|
@@ -2997,33 +3013,33 @@ var parseIPv6 = function (input) {
|
|
|
2997
3013
|
pointer++;
|
|
2998
3014
|
length++;
|
|
2999
3015
|
}
|
|
3000
|
-
if (chr()
|
|
3001
|
-
if (length
|
|
3016
|
+
if (chr() === '.') {
|
|
3017
|
+
if (length === 0) return;
|
|
3002
3018
|
pointer -= length;
|
|
3003
3019
|
if (pieceIndex > 6) return;
|
|
3004
3020
|
numbersSeen = 0;
|
|
3005
3021
|
while (chr()) {
|
|
3006
3022
|
ipv4Piece = null;
|
|
3007
3023
|
if (numbersSeen > 0) {
|
|
3008
|
-
if (chr()
|
|
3024
|
+
if (chr() === '.' && numbersSeen < 4) pointer++;
|
|
3009
3025
|
else return;
|
|
3010
3026
|
}
|
|
3011
3027
|
if (!exec(DIGIT, chr())) return;
|
|
3012
3028
|
while (exec(DIGIT, chr())) {
|
|
3013
3029
|
number = parseInt(chr(), 10);
|
|
3014
3030
|
if (ipv4Piece === null) ipv4Piece = number;
|
|
3015
|
-
else if (ipv4Piece
|
|
3031
|
+
else if (ipv4Piece === 0) return;
|
|
3016
3032
|
else ipv4Piece = ipv4Piece * 10 + number;
|
|
3017
3033
|
if (ipv4Piece > 255) return;
|
|
3018
3034
|
pointer++;
|
|
3019
3035
|
}
|
|
3020
3036
|
address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
|
|
3021
3037
|
numbersSeen++;
|
|
3022
|
-
if (numbersSeen
|
|
3038
|
+
if (numbersSeen === 2 || numbersSeen === 4) pieceIndex++;
|
|
3023
3039
|
}
|
|
3024
|
-
if (numbersSeen
|
|
3040
|
+
if (numbersSeen !== 4) return;
|
|
3025
3041
|
break;
|
|
3026
|
-
} else if (chr()
|
|
3042
|
+
} else if (chr() === ':') {
|
|
3027
3043
|
pointer++;
|
|
3028
3044
|
if (!chr()) return;
|
|
3029
3045
|
} else if (chr()) return;
|
|
@@ -3032,12 +3048,12 @@ var parseIPv6 = function (input) {
|
|
|
3032
3048
|
if (compress !== null) {
|
|
3033
3049
|
swaps = pieceIndex - compress;
|
|
3034
3050
|
pieceIndex = 7;
|
|
3035
|
-
while (pieceIndex
|
|
3051
|
+
while (pieceIndex !== 0 && swaps > 0) {
|
|
3036
3052
|
swap = address[pieceIndex];
|
|
3037
3053
|
address[pieceIndex--] = address[compress + swaps - 1];
|
|
3038
3054
|
address[compress + --swaps] = swap;
|
|
3039
3055
|
}
|
|
3040
|
-
} else if (pieceIndex
|
|
3056
|
+
} else if (pieceIndex !== 8) return;
|
|
3041
3057
|
return address;
|
|
3042
3058
|
};
|
|
3043
3059
|
|
|
@@ -3125,15 +3141,15 @@ var specialSchemes = {
|
|
|
3125
3141
|
// https://url.spec.whatwg.org/#windows-drive-letter
|
|
3126
3142
|
var isWindowsDriveLetter = function (string, normalized) {
|
|
3127
3143
|
var second;
|
|
3128
|
-
return string.length
|
|
3129
|
-
&& ((second = charAt(string, 1))
|
|
3144
|
+
return string.length === 2 && exec(ALPHA, charAt(string, 0))
|
|
3145
|
+
&& ((second = charAt(string, 1)) === ':' || (!normalized && second === '|'));
|
|
3130
3146
|
};
|
|
3131
3147
|
|
|
3132
3148
|
// https://url.spec.whatwg.org/#start-with-a-windows-drive-letter
|
|
3133
3149
|
var startsWithWindowsDriveLetter = function (string) {
|
|
3134
3150
|
var third;
|
|
3135
3151
|
return string.length > 1 && isWindowsDriveLetter(stringSlice$1(string, 0, 2)) && (
|
|
3136
|
-
string.length
|
|
3152
|
+
string.length === 2 ||
|
|
3137
3153
|
((third = charAt(string, 2)) === '/' || third === '\\' || third === '?' || third === '#')
|
|
3138
3154
|
);
|
|
3139
3155
|
};
|
|
@@ -3237,27 +3253,27 @@ URLState.prototype = {
|
|
|
3237
3253
|
break;
|
|
3238
3254
|
|
|
3239
3255
|
case SCHEME:
|
|
3240
|
-
if (chr && (exec(ALPHANUMERIC, chr) || chr
|
|
3256
|
+
if (chr && (exec(ALPHANUMERIC, chr) || chr === '+' || chr === '-' || chr === '.')) {
|
|
3241
3257
|
buffer += toLowerCase(chr);
|
|
3242
|
-
} else if (chr
|
|
3258
|
+
} else if (chr === ':') {
|
|
3243
3259
|
if (stateOverride && (
|
|
3244
|
-
(url.isSpecial()
|
|
3245
|
-
(buffer
|
|
3246
|
-
(url.scheme
|
|
3260
|
+
(url.isSpecial() !== hasOwn$1(specialSchemes, buffer)) ||
|
|
3261
|
+
(buffer === 'file' && (url.includesCredentials() || url.port !== null)) ||
|
|
3262
|
+
(url.scheme === 'file' && !url.host)
|
|
3247
3263
|
)) return;
|
|
3248
3264
|
url.scheme = buffer;
|
|
3249
3265
|
if (stateOverride) {
|
|
3250
|
-
if (url.isSpecial() && specialSchemes[url.scheme]
|
|
3266
|
+
if (url.isSpecial() && specialSchemes[url.scheme] === url.port) url.port = null;
|
|
3251
3267
|
return;
|
|
3252
3268
|
}
|
|
3253
3269
|
buffer = '';
|
|
3254
|
-
if (url.scheme
|
|
3270
|
+
if (url.scheme === 'file') {
|
|
3255
3271
|
state = FILE;
|
|
3256
|
-
} else if (url.isSpecial() && base && base.scheme
|
|
3272
|
+
} else if (url.isSpecial() && base && base.scheme === url.scheme) {
|
|
3257
3273
|
state = SPECIAL_RELATIVE_OR_AUTHORITY;
|
|
3258
3274
|
} else if (url.isSpecial()) {
|
|
3259
3275
|
state = SPECIAL_AUTHORITY_SLASHES;
|
|
3260
|
-
} else if (codePoints[pointer + 1]
|
|
3276
|
+
} else if (codePoints[pointer + 1] === '/') {
|
|
3261
3277
|
state = PATH_OR_AUTHORITY;
|
|
3262
3278
|
pointer++;
|
|
3263
3279
|
} else {
|
|
@@ -3274,8 +3290,8 @@ URLState.prototype = {
|
|
|
3274
3290
|
break;
|
|
3275
3291
|
|
|
3276
3292
|
case NO_SCHEME:
|
|
3277
|
-
if (!base || (base.cannotBeABaseURL && chr
|
|
3278
|
-
if (base.cannotBeABaseURL && chr
|
|
3293
|
+
if (!base || (base.cannotBeABaseURL && chr !== '#')) return INVALID_SCHEME;
|
|
3294
|
+
if (base.cannotBeABaseURL && chr === '#') {
|
|
3279
3295
|
url.scheme = base.scheme;
|
|
3280
3296
|
url.path = arraySlice(base.path);
|
|
3281
3297
|
url.query = base.query;
|
|
@@ -3284,11 +3300,11 @@ URLState.prototype = {
|
|
|
3284
3300
|
state = FRAGMENT;
|
|
3285
3301
|
break;
|
|
3286
3302
|
}
|
|
3287
|
-
state = base.scheme
|
|
3303
|
+
state = base.scheme === 'file' ? FILE : RELATIVE;
|
|
3288
3304
|
continue;
|
|
3289
3305
|
|
|
3290
3306
|
case SPECIAL_RELATIVE_OR_AUTHORITY:
|
|
3291
|
-
if (chr
|
|
3307
|
+
if (chr === '/' && codePoints[pointer + 1] === '/') {
|
|
3292
3308
|
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3293
3309
|
pointer++;
|
|
3294
3310
|
} else {
|
|
@@ -3297,7 +3313,7 @@ URLState.prototype = {
|
|
|
3297
3313
|
} break;
|
|
3298
3314
|
|
|
3299
3315
|
case PATH_OR_AUTHORITY:
|
|
3300
|
-
if (chr
|
|
3316
|
+
if (chr === '/') {
|
|
3301
3317
|
state = AUTHORITY;
|
|
3302
3318
|
break;
|
|
3303
3319
|
} else {
|
|
@@ -3307,16 +3323,16 @@ URLState.prototype = {
|
|
|
3307
3323
|
|
|
3308
3324
|
case RELATIVE:
|
|
3309
3325
|
url.scheme = base.scheme;
|
|
3310
|
-
if (chr
|
|
3326
|
+
if (chr === EOF) {
|
|
3311
3327
|
url.username = base.username;
|
|
3312
3328
|
url.password = base.password;
|
|
3313
3329
|
url.host = base.host;
|
|
3314
3330
|
url.port = base.port;
|
|
3315
3331
|
url.path = arraySlice(base.path);
|
|
3316
3332
|
url.query = base.query;
|
|
3317
|
-
} else if (chr
|
|
3333
|
+
} else if (chr === '/' || (chr === '\\' && url.isSpecial())) {
|
|
3318
3334
|
state = RELATIVE_SLASH;
|
|
3319
|
-
} else if (chr
|
|
3335
|
+
} else if (chr === '?') {
|
|
3320
3336
|
url.username = base.username;
|
|
3321
3337
|
url.password = base.password;
|
|
3322
3338
|
url.host = base.host;
|
|
@@ -3324,7 +3340,7 @@ URLState.prototype = {
|
|
|
3324
3340
|
url.path = arraySlice(base.path);
|
|
3325
3341
|
url.query = '';
|
|
3326
3342
|
state = QUERY;
|
|
3327
|
-
} else if (chr
|
|
3343
|
+
} else if (chr === '#') {
|
|
3328
3344
|
url.username = base.username;
|
|
3329
3345
|
url.password = base.password;
|
|
3330
3346
|
url.host = base.host;
|
|
@@ -3345,9 +3361,9 @@ URLState.prototype = {
|
|
|
3345
3361
|
} break;
|
|
3346
3362
|
|
|
3347
3363
|
case RELATIVE_SLASH:
|
|
3348
|
-
if (url.isSpecial() && (chr
|
|
3364
|
+
if (url.isSpecial() && (chr === '/' || chr === '\\')) {
|
|
3349
3365
|
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3350
|
-
} else if (chr
|
|
3366
|
+
} else if (chr === '/') {
|
|
3351
3367
|
state = AUTHORITY;
|
|
3352
3368
|
} else {
|
|
3353
3369
|
url.username = base.username;
|
|
@@ -3360,24 +3376,24 @@ URLState.prototype = {
|
|
|
3360
3376
|
|
|
3361
3377
|
case SPECIAL_AUTHORITY_SLASHES:
|
|
3362
3378
|
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3363
|
-
if (chr
|
|
3379
|
+
if (chr !== '/' || charAt(buffer, pointer + 1) !== '/') continue;
|
|
3364
3380
|
pointer++;
|
|
3365
3381
|
break;
|
|
3366
3382
|
|
|
3367
3383
|
case SPECIAL_AUTHORITY_IGNORE_SLASHES:
|
|
3368
|
-
if (chr
|
|
3384
|
+
if (chr !== '/' && chr !== '\\') {
|
|
3369
3385
|
state = AUTHORITY;
|
|
3370
3386
|
continue;
|
|
3371
3387
|
} break;
|
|
3372
3388
|
|
|
3373
3389
|
case AUTHORITY:
|
|
3374
|
-
if (chr
|
|
3390
|
+
if (chr === '@') {
|
|
3375
3391
|
if (seenAt) buffer = '%40' + buffer;
|
|
3376
3392
|
seenAt = true;
|
|
3377
3393
|
bufferCodePoints = arrayFrom(buffer);
|
|
3378
3394
|
for (var i = 0; i < bufferCodePoints.length; i++) {
|
|
3379
3395
|
var codePoint = bufferCodePoints[i];
|
|
3380
|
-
if (codePoint
|
|
3396
|
+
if (codePoint === ':' && !seenPasswordToken) {
|
|
3381
3397
|
seenPasswordToken = true;
|
|
3382
3398
|
continue;
|
|
3383
3399
|
}
|
|
@@ -3387,10 +3403,10 @@ URLState.prototype = {
|
|
|
3387
3403
|
}
|
|
3388
3404
|
buffer = '';
|
|
3389
3405
|
} else if (
|
|
3390
|
-
chr
|
|
3391
|
-
(chr
|
|
3406
|
+
chr === EOF || chr === '/' || chr === '?' || chr === '#' ||
|
|
3407
|
+
(chr === '\\' && url.isSpecial())
|
|
3392
3408
|
) {
|
|
3393
|
-
if (seenAt && buffer
|
|
3409
|
+
if (seenAt && buffer === '') return INVALID_AUTHORITY;
|
|
3394
3410
|
pointer -= arrayFrom(buffer).length + 1;
|
|
3395
3411
|
buffer = '';
|
|
3396
3412
|
state = HOST;
|
|
@@ -3399,22 +3415,22 @@ URLState.prototype = {
|
|
|
3399
3415
|
|
|
3400
3416
|
case HOST:
|
|
3401
3417
|
case HOSTNAME:
|
|
3402
|
-
if (stateOverride && url.scheme
|
|
3418
|
+
if (stateOverride && url.scheme === 'file') {
|
|
3403
3419
|
state = FILE_HOST;
|
|
3404
3420
|
continue;
|
|
3405
|
-
} else if (chr
|
|
3406
|
-
if (buffer
|
|
3421
|
+
} else if (chr === ':' && !seenBracket) {
|
|
3422
|
+
if (buffer === '') return INVALID_HOST;
|
|
3407
3423
|
failure = url.parseHost(buffer);
|
|
3408
3424
|
if (failure) return failure;
|
|
3409
3425
|
buffer = '';
|
|
3410
3426
|
state = PORT;
|
|
3411
|
-
if (stateOverride
|
|
3427
|
+
if (stateOverride === HOSTNAME) return;
|
|
3412
3428
|
} else if (
|
|
3413
|
-
chr
|
|
3414
|
-
(chr
|
|
3429
|
+
chr === EOF || chr === '/' || chr === '?' || chr === '#' ||
|
|
3430
|
+
(chr === '\\' && url.isSpecial())
|
|
3415
3431
|
) {
|
|
3416
|
-
if (url.isSpecial() && buffer
|
|
3417
|
-
if (stateOverride && buffer
|
|
3432
|
+
if (url.isSpecial() && buffer === '') return INVALID_HOST;
|
|
3433
|
+
if (stateOverride && buffer === '' && (url.includesCredentials() || url.port !== null)) return;
|
|
3418
3434
|
failure = url.parseHost(buffer);
|
|
3419
3435
|
if (failure) return failure;
|
|
3420
3436
|
buffer = '';
|
|
@@ -3422,8 +3438,8 @@ URLState.prototype = {
|
|
|
3422
3438
|
if (stateOverride) return;
|
|
3423
3439
|
continue;
|
|
3424
3440
|
} else {
|
|
3425
|
-
if (chr
|
|
3426
|
-
else if (chr
|
|
3441
|
+
if (chr === '[') seenBracket = true;
|
|
3442
|
+
else if (chr === ']') seenBracket = false;
|
|
3427
3443
|
buffer += chr;
|
|
3428
3444
|
} break;
|
|
3429
3445
|
|
|
@@ -3431,11 +3447,11 @@ URLState.prototype = {
|
|
|
3431
3447
|
if (exec(DIGIT, chr)) {
|
|
3432
3448
|
buffer += chr;
|
|
3433
3449
|
} else if (
|
|
3434
|
-
chr
|
|
3435
|
-
(chr
|
|
3450
|
+
chr === EOF || chr === '/' || chr === '?' || chr === '#' ||
|
|
3451
|
+
(chr === '\\' && url.isSpecial()) ||
|
|
3436
3452
|
stateOverride
|
|
3437
3453
|
) {
|
|
3438
|
-
if (buffer
|
|
3454
|
+
if (buffer !== '') {
|
|
3439
3455
|
var port = parseInt(buffer, 10);
|
|
3440
3456
|
if (port > 0xFFFF) return INVALID_PORT;
|
|
3441
3457
|
url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port;
|
|
@@ -3449,31 +3465,35 @@ URLState.prototype = {
|
|
|
3449
3465
|
|
|
3450
3466
|
case FILE:
|
|
3451
3467
|
url.scheme = 'file';
|
|
3452
|
-
if (chr
|
|
3453
|
-
else if (base && base.scheme
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
url.path = arraySlice(base.path);
|
|
3457
|
-
url.query = base.query;
|
|
3458
|
-
} else if (chr == '?') {
|
|
3459
|
-
url.host = base.host;
|
|
3460
|
-
url.path = arraySlice(base.path);
|
|
3461
|
-
url.query = '';
|
|
3462
|
-
state = QUERY;
|
|
3463
|
-
} else if (chr == '#') {
|
|
3464
|
-
url.host = base.host;
|
|
3465
|
-
url.path = arraySlice(base.path);
|
|
3466
|
-
url.query = base.query;
|
|
3467
|
-
url.fragment = '';
|
|
3468
|
-
state = FRAGMENT;
|
|
3469
|
-
} else {
|
|
3470
|
-
if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
3468
|
+
if (chr === '/' || chr === '\\') state = FILE_SLASH;
|
|
3469
|
+
else if (base && base.scheme === 'file') {
|
|
3470
|
+
switch (chr) {
|
|
3471
|
+
case EOF:
|
|
3471
3472
|
url.host = base.host;
|
|
3472
3473
|
url.path = arraySlice(base.path);
|
|
3473
|
-
url.
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3474
|
+
url.query = base.query;
|
|
3475
|
+
break;
|
|
3476
|
+
case '?':
|
|
3477
|
+
url.host = base.host;
|
|
3478
|
+
url.path = arraySlice(base.path);
|
|
3479
|
+
url.query = '';
|
|
3480
|
+
state = QUERY;
|
|
3481
|
+
break;
|
|
3482
|
+
case '#':
|
|
3483
|
+
url.host = base.host;
|
|
3484
|
+
url.path = arraySlice(base.path);
|
|
3485
|
+
url.query = base.query;
|
|
3486
|
+
url.fragment = '';
|
|
3487
|
+
state = FRAGMENT;
|
|
3488
|
+
break;
|
|
3489
|
+
default:
|
|
3490
|
+
if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
3491
|
+
url.host = base.host;
|
|
3492
|
+
url.path = arraySlice(base.path);
|
|
3493
|
+
url.shortenPath();
|
|
3494
|
+
}
|
|
3495
|
+
state = PATH;
|
|
3496
|
+
continue;
|
|
3477
3497
|
}
|
|
3478
3498
|
} else {
|
|
3479
3499
|
state = PATH;
|
|
@@ -3481,11 +3501,11 @@ URLState.prototype = {
|
|
|
3481
3501
|
} break;
|
|
3482
3502
|
|
|
3483
3503
|
case FILE_SLASH:
|
|
3484
|
-
if (chr
|
|
3504
|
+
if (chr === '/' || chr === '\\') {
|
|
3485
3505
|
state = FILE_HOST;
|
|
3486
3506
|
break;
|
|
3487
3507
|
}
|
|
3488
|
-
if (base && base.scheme
|
|
3508
|
+
if (base && base.scheme === 'file' && !startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
3489
3509
|
if (isWindowsDriveLetter(base.path[0], true)) push(url.path, base.path[0]);
|
|
3490
3510
|
else url.host = base.host;
|
|
3491
3511
|
}
|
|
@@ -3493,17 +3513,17 @@ URLState.prototype = {
|
|
|
3493
3513
|
continue;
|
|
3494
3514
|
|
|
3495
3515
|
case FILE_HOST:
|
|
3496
|
-
if (chr
|
|
3516
|
+
if (chr === EOF || chr === '/' || chr === '\\' || chr === '?' || chr === '#') {
|
|
3497
3517
|
if (!stateOverride && isWindowsDriveLetter(buffer)) {
|
|
3498
3518
|
state = PATH;
|
|
3499
|
-
} else if (buffer
|
|
3519
|
+
} else if (buffer === '') {
|
|
3500
3520
|
url.host = '';
|
|
3501
3521
|
if (stateOverride) return;
|
|
3502
3522
|
state = PATH_START;
|
|
3503
3523
|
} else {
|
|
3504
3524
|
failure = url.parseHost(buffer);
|
|
3505
3525
|
if (failure) return failure;
|
|
3506
|
-
if (url.host
|
|
3526
|
+
if (url.host === 'localhost') url.host = '';
|
|
3507
3527
|
if (stateOverride) return;
|
|
3508
3528
|
buffer = '';
|
|
3509
3529
|
state = PATH_START;
|
|
@@ -3514,50 +3534,50 @@ URLState.prototype = {
|
|
|
3514
3534
|
case PATH_START:
|
|
3515
3535
|
if (url.isSpecial()) {
|
|
3516
3536
|
state = PATH;
|
|
3517
|
-
if (chr
|
|
3518
|
-
} else if (!stateOverride && chr
|
|
3537
|
+
if (chr !== '/' && chr !== '\\') continue;
|
|
3538
|
+
} else if (!stateOverride && chr === '?') {
|
|
3519
3539
|
url.query = '';
|
|
3520
3540
|
state = QUERY;
|
|
3521
|
-
} else if (!stateOverride && chr
|
|
3541
|
+
} else if (!stateOverride && chr === '#') {
|
|
3522
3542
|
url.fragment = '';
|
|
3523
3543
|
state = FRAGMENT;
|
|
3524
|
-
} else if (chr
|
|
3544
|
+
} else if (chr !== EOF) {
|
|
3525
3545
|
state = PATH;
|
|
3526
|
-
if (chr
|
|
3546
|
+
if (chr !== '/') continue;
|
|
3527
3547
|
} break;
|
|
3528
3548
|
|
|
3529
3549
|
case PATH:
|
|
3530
3550
|
if (
|
|
3531
|
-
chr
|
|
3532
|
-
(chr
|
|
3533
|
-
(!stateOverride && (chr
|
|
3551
|
+
chr === EOF || chr === '/' ||
|
|
3552
|
+
(chr === '\\' && url.isSpecial()) ||
|
|
3553
|
+
(!stateOverride && (chr === '?' || chr === '#'))
|
|
3534
3554
|
) {
|
|
3535
3555
|
if (isDoubleDot(buffer)) {
|
|
3536
3556
|
url.shortenPath();
|
|
3537
|
-
if (chr
|
|
3557
|
+
if (chr !== '/' && !(chr === '\\' && url.isSpecial())) {
|
|
3538
3558
|
push(url.path, '');
|
|
3539
3559
|
}
|
|
3540
3560
|
} else if (isSingleDot(buffer)) {
|
|
3541
|
-
if (chr
|
|
3561
|
+
if (chr !== '/' && !(chr === '\\' && url.isSpecial())) {
|
|
3542
3562
|
push(url.path, '');
|
|
3543
3563
|
}
|
|
3544
3564
|
} else {
|
|
3545
|
-
if (url.scheme
|
|
3565
|
+
if (url.scheme === 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
|
|
3546
3566
|
if (url.host) url.host = '';
|
|
3547
3567
|
buffer = charAt(buffer, 0) + ':'; // normalize windows drive letter
|
|
3548
3568
|
}
|
|
3549
3569
|
push(url.path, buffer);
|
|
3550
3570
|
}
|
|
3551
3571
|
buffer = '';
|
|
3552
|
-
if (url.scheme
|
|
3572
|
+
if (url.scheme === 'file' && (chr === EOF || chr === '?' || chr === '#')) {
|
|
3553
3573
|
while (url.path.length > 1 && url.path[0] === '') {
|
|
3554
3574
|
shift(url.path);
|
|
3555
3575
|
}
|
|
3556
3576
|
}
|
|
3557
|
-
if (chr
|
|
3577
|
+
if (chr === '?') {
|
|
3558
3578
|
url.query = '';
|
|
3559
3579
|
state = QUERY;
|
|
3560
|
-
} else if (chr
|
|
3580
|
+
} else if (chr === '#') {
|
|
3561
3581
|
url.fragment = '';
|
|
3562
3582
|
state = FRAGMENT;
|
|
3563
3583
|
}
|
|
@@ -3566,28 +3586,28 @@ URLState.prototype = {
|
|
|
3566
3586
|
} break;
|
|
3567
3587
|
|
|
3568
3588
|
case CANNOT_BE_A_BASE_URL_PATH:
|
|
3569
|
-
if (chr
|
|
3589
|
+
if (chr === '?') {
|
|
3570
3590
|
url.query = '';
|
|
3571
3591
|
state = QUERY;
|
|
3572
|
-
} else if (chr
|
|
3592
|
+
} else if (chr === '#') {
|
|
3573
3593
|
url.fragment = '';
|
|
3574
3594
|
state = FRAGMENT;
|
|
3575
|
-
} else if (chr
|
|
3595
|
+
} else if (chr !== EOF) {
|
|
3576
3596
|
url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);
|
|
3577
3597
|
} break;
|
|
3578
3598
|
|
|
3579
3599
|
case QUERY:
|
|
3580
|
-
if (!stateOverride && chr
|
|
3600
|
+
if (!stateOverride && chr === '#') {
|
|
3581
3601
|
url.fragment = '';
|
|
3582
3602
|
state = FRAGMENT;
|
|
3583
|
-
} else if (chr
|
|
3584
|
-
if (chr
|
|
3585
|
-
else if (chr
|
|
3603
|
+
} else if (chr !== EOF) {
|
|
3604
|
+
if (chr === "'" && url.isSpecial()) url.query += '%27';
|
|
3605
|
+
else if (chr === '#') url.query += '%23';
|
|
3586
3606
|
else url.query += percentEncode(chr, C0ControlPercentEncodeSet);
|
|
3587
3607
|
} break;
|
|
3588
3608
|
|
|
3589
3609
|
case FRAGMENT:
|
|
3590
|
-
if (chr
|
|
3610
|
+
if (chr !== EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);
|
|
3591
3611
|
break;
|
|
3592
3612
|
}
|
|
3593
3613
|
|
|
@@ -3597,8 +3617,8 @@ URLState.prototype = {
|
|
|
3597
3617
|
// https://url.spec.whatwg.org/#host-parsing
|
|
3598
3618
|
parseHost: function (input) {
|
|
3599
3619
|
var result, codePoints, index;
|
|
3600
|
-
if (charAt(input, 0)
|
|
3601
|
-
if (charAt(input, input.length - 1)
|
|
3620
|
+
if (charAt(input, 0) === '[') {
|
|
3621
|
+
if (charAt(input, input.length - 1) !== ']') return INVALID_HOST;
|
|
3602
3622
|
result = parseIPv6(stringSlice$1(input, 1, -1));
|
|
3603
3623
|
if (!result) return INVALID_HOST;
|
|
3604
3624
|
this.host = result;
|
|
@@ -3621,11 +3641,11 @@ URLState.prototype = {
|
|
|
3621
3641
|
},
|
|
3622
3642
|
// https://url.spec.whatwg.org/#cannot-have-a-username-password-port
|
|
3623
3643
|
cannotHaveUsernamePasswordPort: function () {
|
|
3624
|
-
return !this.host || this.cannotBeABaseURL || this.scheme
|
|
3644
|
+
return !this.host || this.cannotBeABaseURL || this.scheme === 'file';
|
|
3625
3645
|
},
|
|
3626
3646
|
// https://url.spec.whatwg.org/#include-credentials
|
|
3627
3647
|
includesCredentials: function () {
|
|
3628
|
-
return this.username
|
|
3648
|
+
return this.username !== '' || this.password !== '';
|
|
3629
3649
|
},
|
|
3630
3650
|
// https://url.spec.whatwg.org/#is-special
|
|
3631
3651
|
isSpecial: function () {
|
|
@@ -3635,7 +3655,7 @@ URLState.prototype = {
|
|
|
3635
3655
|
shortenPath: function () {
|
|
3636
3656
|
var path = this.path;
|
|
3637
3657
|
var pathSize = path.length;
|
|
3638
|
-
if (pathSize && (this.scheme
|
|
3658
|
+
if (pathSize && (this.scheme !== 'file' || pathSize !== 1 || !isWindowsDriveLetter(path[0], true))) {
|
|
3639
3659
|
path.length--;
|
|
3640
3660
|
}
|
|
3641
3661
|
},
|
|
@@ -3658,7 +3678,7 @@ URLState.prototype = {
|
|
|
3658
3678
|
}
|
|
3659
3679
|
output += serializeHost(host);
|
|
3660
3680
|
if (port !== null) output += ':' + port;
|
|
3661
|
-
} else if (scheme
|
|
3681
|
+
} else if (scheme === 'file') output += '//';
|
|
3662
3682
|
output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
|
|
3663
3683
|
if (query !== null) output += '?' + query;
|
|
3664
3684
|
if (fragment !== null) output += '#' + fragment;
|
|
@@ -3674,12 +3694,12 @@ URLState.prototype = {
|
|
|
3674
3694
|
getOrigin: function () {
|
|
3675
3695
|
var scheme = this.scheme;
|
|
3676
3696
|
var port = this.port;
|
|
3677
|
-
if (scheme
|
|
3697
|
+
if (scheme === 'blob') try {
|
|
3678
3698
|
return new URLConstructor(scheme.path[0]).origin;
|
|
3679
3699
|
} catch (error) {
|
|
3680
3700
|
return 'null';
|
|
3681
3701
|
}
|
|
3682
|
-
if (scheme
|
|
3702
|
+
if (scheme === 'file' || !this.isSpecial()) return 'null';
|
|
3683
3703
|
return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : '');
|
|
3684
3704
|
},
|
|
3685
3705
|
// https://url.spec.whatwg.org/#dom-url-protocol
|
|
@@ -3742,7 +3762,7 @@ URLState.prototype = {
|
|
|
3742
3762
|
setPort: function (port) {
|
|
3743
3763
|
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
3744
3764
|
port = $toString$1(port);
|
|
3745
|
-
if (port
|
|
3765
|
+
if (port === '') this.port = null;
|
|
3746
3766
|
else this.parse(port, PORT);
|
|
3747
3767
|
},
|
|
3748
3768
|
// https://url.spec.whatwg.org/#dom-url-pathname
|
|
@@ -3762,10 +3782,10 @@ URLState.prototype = {
|
|
|
3762
3782
|
},
|
|
3763
3783
|
setSearch: function (search) {
|
|
3764
3784
|
search = $toString$1(search);
|
|
3765
|
-
if (search
|
|
3785
|
+
if (search === '') {
|
|
3766
3786
|
this.query = null;
|
|
3767
3787
|
} else {
|
|
3768
|
-
if (
|
|
3788
|
+
if (charAt(search, 0) === '?') search = stringSlice$1(search, 1);
|
|
3769
3789
|
this.query = '';
|
|
3770
3790
|
this.parse(search, QUERY);
|
|
3771
3791
|
}
|
|
@@ -3782,11 +3802,11 @@ URLState.prototype = {
|
|
|
3782
3802
|
},
|
|
3783
3803
|
setHash: function (hash) {
|
|
3784
3804
|
hash = $toString$1(hash);
|
|
3785
|
-
if (hash
|
|
3805
|
+
if (hash === '') {
|
|
3786
3806
|
this.fragment = null;
|
|
3787
3807
|
return;
|
|
3788
3808
|
}
|
|
3789
|
-
if (
|
|
3809
|
+
if (charAt(hash, 0) === '#') hash = stringSlice$1(hash, 1);
|
|
3790
3810
|
this.fragment = '';
|
|
3791
3811
|
this.parse(hash, FRAGMENT);
|
|
3792
3812
|
},
|
|
@@ -3910,7 +3930,7 @@ var MATCH$1 = wellKnownSymbol$1('match');
|
|
|
3910
3930
|
// https://tc39.es/ecma262/#sec-isregexp
|
|
3911
3931
|
var isRegexp = function (it) {
|
|
3912
3932
|
var isRegExp;
|
|
3913
|
-
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it)
|
|
3933
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
|
|
3914
3934
|
};
|
|
3915
3935
|
|
|
3916
3936
|
var isRegExp = isRegexp;
|
|
@@ -3998,9 +4018,9 @@ var TO_STRING = 'toString';
|
|
|
3998
4018
|
var RegExpPrototype = RegExp.prototype;
|
|
3999
4019
|
var nativeToString = RegExpPrototype[TO_STRING];
|
|
4000
4020
|
|
|
4001
|
-
var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' })
|
|
4021
|
+
var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
|
|
4002
4022
|
// FF44- RegExp#toString has a wrong name
|
|
4003
|
-
var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name
|
|
4023
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
|
|
4004
4024
|
|
|
4005
4025
|
// `RegExp.prototype.toString` method
|
|
4006
4026
|
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
@@ -4128,9 +4148,6 @@ function pad4(number) {
|
|
|
4128
4148
|
function toISOString(d) {
|
|
4129
4149
|
return pad4(d.getFullYear()) + '-' + pad2(d.getMonth() + 1) + '-' + pad2(d.getDate());
|
|
4130
4150
|
}
|
|
4131
|
-
const flagToCategory = [[core.flags.MAJOR_FAST, 'holiday', 'major', 'fast'], [core.flags.CHANUKAH_CANDLES, 'holiday', 'major'], [core.flags.DAF_YOMI, 'dafyomi'], [core.flags.HEBREW_DATE, 'hebdate'], [core.flags.MINOR_FAST, 'holiday', 'fast'], [core.flags.MINOR_HOLIDAY, 'holiday', 'minor'], [core.flags.MISHNA_YOMI, 'mishnayomi'], [core.flags.NACH_YOMI, 'nachyomi'], [core.flags.YERUSHALMI_YOMI, 'yerushalmi'], [core.flags.MODERN_HOLIDAY, 'holiday', 'modern'], [core.flags.MOLAD, 'molad'], [core.flags.OMER_COUNT, 'omer'], [core.flags.PARSHA_HASHAVUA, 'parashat'],
|
|
4132
|
-
// backwards-compat
|
|
4133
|
-
[core.flags.ROSH_CHODESH, 'roshchodesh'], [core.flags.SHABBAT_MEVARCHIM, 'mevarchim'], [core.flags.SPECIAL_SHABBAT, 'holiday', 'shabbat'], [core.flags.USER_EVENT, 'user']];
|
|
4134
4151
|
|
|
4135
4152
|
/**
|
|
4136
4153
|
* Returns a category and subcategory name
|
|
@@ -4139,45 +4156,10 @@ const flagToCategory = [[core.flags.MAJOR_FAST, 'holiday', 'major', 'fast'], [co
|
|
|
4139
4156
|
*/
|
|
4140
4157
|
function getEventCategories(ev) {
|
|
4141
4158
|
const desc = ev.getDesc();
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
case 'Candle lighting':
|
|
4145
|
-
return ['candles'];
|
|
4146
|
-
// YOM_TOV_ENDS
|
|
4147
|
-
case 'Havdalah':
|
|
4148
|
-
return ['havdalah'];
|
|
4149
|
-
// flags.MINOR_FAST or flags.MAJOR_FAST
|
|
4150
|
-
case 'Fast begins':
|
|
4151
|
-
case 'Fast ends':
|
|
4152
|
-
return ['zmanim', 'fast'];
|
|
4153
|
-
case 'Purim':
|
|
4154
|
-
return ['holiday', 'major'];
|
|
4155
|
-
}
|
|
4156
|
-
if (ev.cholHaMoedDay) {
|
|
4157
|
-
return ['holiday', 'major', 'cholhamoed'];
|
|
4158
|
-
}
|
|
4159
|
-
const mask = ev.getFlags();
|
|
4160
|
-
for (let i = 0; i < flagToCategory.length; i++) {
|
|
4161
|
-
const attrs = flagToCategory[i];
|
|
4162
|
-
if (mask & attrs[0]) {
|
|
4163
|
-
return attrs.slice(1);
|
|
4164
|
-
}
|
|
4165
|
-
}
|
|
4166
|
-
// Don't depend on flags.MINOR_HOLIDAY always being set
|
|
4167
|
-
switch (desc) {
|
|
4168
|
-
case 'Lag BaOmer':
|
|
4169
|
-
case 'Leil Selichot':
|
|
4170
|
-
case 'Pesach Sheni':
|
|
4171
|
-
case 'Erev Purim':
|
|
4172
|
-
case 'Purim Katan':
|
|
4173
|
-
case 'Shushan Purim':
|
|
4174
|
-
case 'Tu B\'Av':
|
|
4175
|
-
case 'Tu BiShvat':
|
|
4176
|
-
case 'Rosh Hashana LaBehemot':
|
|
4177
|
-
return ['holiday', 'minor'];
|
|
4178
|
-
default:
|
|
4179
|
-
return ['holiday', 'major'];
|
|
4159
|
+
if (desc === 'Purim' || desc === 'Erev Purim') {
|
|
4160
|
+
return ['holiday', 'major'];
|
|
4180
4161
|
}
|
|
4162
|
+
return ev.getCategories();
|
|
4181
4163
|
}
|
|
4182
4164
|
|
|
4183
4165
|
/**
|
|
@@ -4240,7 +4222,8 @@ function getCalendarTitle(events, options) {
|
|
|
4240
4222
|
*/
|
|
4241
4223
|
function getHolidayDescription(ev) {
|
|
4242
4224
|
let firstSentence = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4243
|
-
const
|
|
4225
|
+
const str0 = holidayDescription[ev.getDesc()] || holidayDescription[ev.basename()] || '';
|
|
4226
|
+
const str = str0.normalize();
|
|
4244
4227
|
if (firstSentence && str) {
|
|
4245
4228
|
const dot = str.indexOf('.');
|
|
4246
4229
|
if (dot != -1) {
|
|
@@ -4601,8 +4584,8 @@ function eventToClassicApiObject(ev, options) {
|
|
|
4601
4584
|
};
|
|
4602
4585
|
}
|
|
4603
4586
|
const memo = ev.memo || holidayDescription[ev.basename()];
|
|
4604
|
-
if (memo) {
|
|
4605
|
-
result.memo = memo;
|
|
4587
|
+
if (typeof memo === 'string' && memo.length !== 0) {
|
|
4588
|
+
result.memo = memo.normalize();
|
|
4606
4589
|
} else if (typeof ev.linkedEvent !== 'undefined') {
|
|
4607
4590
|
result.memo = ev.linkedEvent.render(options.locale);
|
|
4608
4591
|
}
|