@digipair/skill-keycloak 0.117.7 → 0.117.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +370 -171
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { snakeCase, kebabCase, camelCase } from 'case-anything/dist/index.js';
|
|
2
1
|
import require$$0$1 from 'buffer';
|
|
3
2
|
import require$$3 from 'stream';
|
|
4
3
|
import require$$5 from 'util';
|
|
@@ -8201,7 +8200,7 @@ function _create_class$v(Constructor, protoProps, staticProps) {
|
|
|
8201
8200
|
if (staticProps) _defineProperties$v(Constructor, staticProps);
|
|
8202
8201
|
return Constructor;
|
|
8203
8202
|
}
|
|
8204
|
-
function _define_property$
|
|
8203
|
+
function _define_property$5(obj, key, value) {
|
|
8205
8204
|
if (key in obj) {
|
|
8206
8205
|
Object.defineProperty(obj, key, {
|
|
8207
8206
|
value: value,
|
|
@@ -8276,7 +8275,7 @@ function _non_iterable_rest$5() {
|
|
|
8276
8275
|
function _non_iterable_spread$6() {
|
|
8277
8276
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8278
8277
|
}
|
|
8279
|
-
function _object_spread$
|
|
8278
|
+
function _object_spread$3(target) {
|
|
8280
8279
|
for(var i = 1; i < arguments.length; i++){
|
|
8281
8280
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
8282
8281
|
var ownKeys = Object.keys(source);
|
|
@@ -8286,12 +8285,12 @@ function _object_spread$2(target) {
|
|
|
8286
8285
|
}));
|
|
8287
8286
|
}
|
|
8288
8287
|
ownKeys.forEach(function(key) {
|
|
8289
|
-
_define_property$
|
|
8288
|
+
_define_property$5(target, key, source[key]);
|
|
8290
8289
|
});
|
|
8291
8290
|
}
|
|
8292
8291
|
return target;
|
|
8293
8292
|
}
|
|
8294
|
-
function ownKeys$
|
|
8293
|
+
function ownKeys$2(object, enumerableOnly) {
|
|
8295
8294
|
var keys = Object.keys(object);
|
|
8296
8295
|
if (Object.getOwnPropertySymbols) {
|
|
8297
8296
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -8299,12 +8298,12 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
8299
8298
|
}
|
|
8300
8299
|
return keys;
|
|
8301
8300
|
}
|
|
8302
|
-
function _object_spread_props$
|
|
8301
|
+
function _object_spread_props$2(target, source) {
|
|
8303
8302
|
source = source != null ? source : {};
|
|
8304
8303
|
if (Object.getOwnPropertyDescriptors) {
|
|
8305
8304
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
8306
8305
|
} else {
|
|
8307
|
-
ownKeys$
|
|
8306
|
+
ownKeys$2(Object(source)).forEach(function(key) {
|
|
8308
8307
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
8309
8308
|
});
|
|
8310
8309
|
}
|
|
@@ -9175,7 +9174,7 @@ function getCachedWeekInfo(locString) {
|
|
|
9175
9174
|
data = "getWeekInfo" in locale ? locale.getWeekInfo() : locale.weekInfo;
|
|
9176
9175
|
// minimalDays was removed from WeekInfo: https://github.com/tc39/proposal-intl-locale-info/issues/86
|
|
9177
9176
|
if (!("minimalDays" in data)) {
|
|
9178
|
-
data = _object_spread$
|
|
9177
|
+
data = _object_spread$3({}, fallbackWeekSettings, data);
|
|
9179
9178
|
}
|
|
9180
9179
|
weekInfoCache.set(locString, data);
|
|
9181
9180
|
}
|
|
@@ -9282,7 +9281,7 @@ function supportsFastNumbers(loc) {
|
|
|
9282
9281
|
"floor"
|
|
9283
9282
|
]);
|
|
9284
9283
|
if (!forceSimple || Object.keys(otherOpts).length > 0) {
|
|
9285
|
-
var intlOpts = _object_spread$
|
|
9284
|
+
var intlOpts = _object_spread$3({
|
|
9286
9285
|
useGrouping: false
|
|
9287
9286
|
}, opts);
|
|
9288
9287
|
if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;
|
|
@@ -9352,7 +9351,7 @@ function supportsFastNumbers(loc) {
|
|
|
9352
9351
|
});
|
|
9353
9352
|
this.originalZone = dt.zone;
|
|
9354
9353
|
}
|
|
9355
|
-
var intlOpts = _object_spread$
|
|
9354
|
+
var intlOpts = _object_spread$3({}, this.opts);
|
|
9356
9355
|
intlOpts.timeZone = intlOpts.timeZone || z;
|
|
9357
9356
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
9358
9357
|
}
|
|
@@ -9383,7 +9382,7 @@ function supportsFastNumbers(loc) {
|
|
|
9383
9382
|
locale: _this.dt.locale,
|
|
9384
9383
|
format: _this.opts.timeZoneName
|
|
9385
9384
|
});
|
|
9386
|
-
return _object_spread_props$
|
|
9385
|
+
return _object_spread_props$2(_object_spread$3({}, part), {
|
|
9387
9386
|
value: offsetName
|
|
9388
9387
|
});
|
|
9389
9388
|
} else {
|
|
@@ -9408,7 +9407,7 @@ function supportsFastNumbers(loc) {
|
|
|
9408
9407
|
*/ var PolyRelFormatter = /*#__PURE__*/ function() {
|
|
9409
9408
|
function PolyRelFormatter(intl, isEnglish, opts) {
|
|
9410
9409
|
_class_call_check$A(this, PolyRelFormatter);
|
|
9411
|
-
this.opts = _object_spread$
|
|
9410
|
+
this.opts = _object_spread$3({
|
|
9412
9411
|
style: "long"
|
|
9413
9412
|
}, opts);
|
|
9414
9413
|
if (!isEnglish && hasRelative()) {
|
|
@@ -9503,7 +9502,7 @@ var fallbackWeekSettings = {
|
|
|
9503
9502
|
key: "redefaultToEN",
|
|
9504
9503
|
value: function redefaultToEN() {
|
|
9505
9504
|
var alts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9506
|
-
return this.clone(_object_spread_props$
|
|
9505
|
+
return this.clone(_object_spread_props$2(_object_spread$3({}, alts), {
|
|
9507
9506
|
defaultToEN: true
|
|
9508
9507
|
}));
|
|
9509
9508
|
}
|
|
@@ -9512,7 +9511,7 @@ var fallbackWeekSettings = {
|
|
|
9512
9511
|
key: "redefaultToSystem",
|
|
9513
9512
|
value: function redefaultToSystem() {
|
|
9514
9513
|
var alts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9515
|
-
return this.clone(_object_spread_props$
|
|
9514
|
+
return this.clone(_object_spread_props$2(_object_spread$3({}, alts), {
|
|
9516
9515
|
defaultToEN: false
|
|
9517
9516
|
}));
|
|
9518
9517
|
}
|
|
@@ -10391,7 +10390,7 @@ function isoWeekdayToLocal(isoWeekday, startOfWeek) {
|
|
|
10391
10390
|
} else {
|
|
10392
10391
|
weekYear = year;
|
|
10393
10392
|
}
|
|
10394
|
-
return _object_spread$
|
|
10393
|
+
return _object_spread$3({
|
|
10395
10394
|
weekYear: weekYear,
|
|
10396
10395
|
weekNumber: weekNumber,
|
|
10397
10396
|
weekday: weekday
|
|
@@ -10411,7 +10410,7 @@ function weekToGregorian(weekData) {
|
|
|
10411
10410
|
year = weekYear;
|
|
10412
10411
|
}
|
|
10413
10412
|
var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), month = _uncomputeOrdinal.month, day = _uncomputeOrdinal.day;
|
|
10414
|
-
return _object_spread$
|
|
10413
|
+
return _object_spread$3({
|
|
10415
10414
|
year: year,
|
|
10416
10415
|
month: month,
|
|
10417
10416
|
day: day
|
|
@@ -10420,7 +10419,7 @@ function weekToGregorian(weekData) {
|
|
|
10420
10419
|
function gregorianToOrdinal(gregData) {
|
|
10421
10420
|
var year = gregData.year, month = gregData.month, day = gregData.day;
|
|
10422
10421
|
var ordinal = computeOrdinal(year, month, day);
|
|
10423
|
-
return _object_spread$
|
|
10422
|
+
return _object_spread$3({
|
|
10424
10423
|
year: year,
|
|
10425
10424
|
ordinal: ordinal
|
|
10426
10425
|
}, timeObject(gregData));
|
|
@@ -10428,7 +10427,7 @@ function gregorianToOrdinal(gregData) {
|
|
|
10428
10427
|
function ordinalToGregorian(ordinalData) {
|
|
10429
10428
|
var year = ordinalData.year, ordinal = ordinalData.ordinal;
|
|
10430
10429
|
var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), month = _uncomputeOrdinal.month, day = _uncomputeOrdinal.day;
|
|
10431
|
-
return _object_spread$
|
|
10430
|
+
return _object_spread$3({
|
|
10432
10431
|
year: year,
|
|
10433
10432
|
month: month,
|
|
10434
10433
|
day: day
|
|
@@ -10724,7 +10723,7 @@ function parseZoneInfo(ts, offsetFormat, locale) {
|
|
|
10724
10723
|
if (timeZone) {
|
|
10725
10724
|
intlOpts.timeZone = timeZone;
|
|
10726
10725
|
}
|
|
10727
|
-
var modified = _object_spread$
|
|
10726
|
+
var modified = _object_spread$3({
|
|
10728
10727
|
timeZoneName: offsetFormat
|
|
10729
10728
|
}, intlOpts);
|
|
10730
10729
|
var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function(m) {
|
|
@@ -11083,7 +11082,7 @@ var macroTokenToFormatOpts = {
|
|
|
11083
11082
|
if (this.systemLoc === null) {
|
|
11084
11083
|
this.systemLoc = this.loc.redefaultToSystem();
|
|
11085
11084
|
}
|
|
11086
|
-
var df = this.systemLoc.dtFormatter(dt, _object_spread$
|
|
11085
|
+
var df = this.systemLoc.dtFormatter(dt, _object_spread$3({}, this.opts, opts));
|
|
11087
11086
|
return df.format();
|
|
11088
11087
|
}
|
|
11089
11088
|
},
|
|
@@ -11091,7 +11090,7 @@ var macroTokenToFormatOpts = {
|
|
|
11091
11090
|
key: "dtFormatter",
|
|
11092
11091
|
value: function dtFormatter(dt) {
|
|
11093
11092
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11094
|
-
return this.loc.dtFormatter(dt, _object_spread$
|
|
11093
|
+
return this.loc.dtFormatter(dt, _object_spread$3({}, this.opts, opts));
|
|
11095
11094
|
}
|
|
11096
11095
|
},
|
|
11097
11096
|
{
|
|
@@ -11127,7 +11126,7 @@ var macroTokenToFormatOpts = {
|
|
|
11127
11126
|
if (this.opts.forceSimple) {
|
|
11128
11127
|
return padStart(n, p);
|
|
11129
11128
|
}
|
|
11130
|
-
var opts = _object_spread$
|
|
11129
|
+
var opts = _object_spread$3({}, this.opts);
|
|
11131
11130
|
if (p > 0) {
|
|
11132
11131
|
opts.padTo = p;
|
|
11133
11132
|
}
|
|
@@ -11543,7 +11542,7 @@ function combineExtractors() {
|
|
|
11543
11542
|
var _param = _sliced_to_array$5(param, 3), mergedVals = _param[0], mergedZone = _param[1], cursor = _param[2];
|
|
11544
11543
|
var _ex = _sliced_to_array$5(ex(m, cursor), 3), val = _ex[0], zone = _ex[1], next = _ex[2];
|
|
11545
11544
|
return [
|
|
11546
|
-
_object_spread$
|
|
11545
|
+
_object_spread$3({}, mergedVals, val),
|
|
11547
11546
|
zone || mergedZone,
|
|
11548
11547
|
next
|
|
11549
11548
|
];
|
|
@@ -11854,7 +11853,7 @@ var lowOrderMatrix = {
|
|
|
11854
11853
|
seconds: {
|
|
11855
11854
|
milliseconds: 1000
|
|
11856
11855
|
}
|
|
11857
|
-
}, casualMatrix = _object_spread$
|
|
11856
|
+
}, casualMatrix = _object_spread$3({
|
|
11858
11857
|
years: {
|
|
11859
11858
|
quarters: 4,
|
|
11860
11859
|
months: 12,
|
|
@@ -11882,7 +11881,7 @@ var lowOrderMatrix = {
|
|
|
11882
11881
|
seconds: 30 * 24 * 60 * 60,
|
|
11883
11882
|
milliseconds: 30 * 24 * 60 * 60 * 1000
|
|
11884
11883
|
}
|
|
11885
|
-
}, lowOrderMatrix), daysInYearAccurate = 146097.0 / 400, daysInMonthAccurate = 146097.0 / 4800, accurateMatrix = _object_spread$
|
|
11884
|
+
}, lowOrderMatrix), daysInYearAccurate = 146097.0 / 400, daysInMonthAccurate = 146097.0 / 4800, accurateMatrix = _object_spread$3({
|
|
11886
11885
|
years: {
|
|
11887
11886
|
quarters: 4,
|
|
11888
11887
|
months: 12,
|
|
@@ -11929,7 +11928,7 @@ function clone$1(dur, alts) {
|
|
|
11929
11928
|
var clear = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
11930
11929
|
// deep merge for vals
|
|
11931
11930
|
var conf = {
|
|
11932
|
-
values: clear ? alts.values : _object_spread$
|
|
11931
|
+
values: clear ? alts.values : _object_spread$3({}, dur.values, alts.values || {}),
|
|
11933
11932
|
loc: dur.loc.clone(alts.loc),
|
|
11934
11933
|
conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,
|
|
11935
11934
|
matrix: alts.matrix || dur.matrix
|
|
@@ -12128,7 +12127,7 @@ function removeZeroes(vals) {
|
|
|
12128
12127
|
value: function toFormat(fmt) {
|
|
12129
12128
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
12130
12129
|
// reverse-compat since 1.2; we always round down now, never up, and we do it by default
|
|
12131
|
-
var fmtOpts = _object_spread_props$
|
|
12130
|
+
var fmtOpts = _object_spread_props$2(_object_spread$3({}, opts), {
|
|
12132
12131
|
floor: opts.round !== false && opts.floor !== false
|
|
12133
12132
|
});
|
|
12134
12133
|
return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;
|
|
@@ -12161,7 +12160,7 @@ function removeZeroes(vals) {
|
|
|
12161
12160
|
if (isUndefined$2(val) || val === 0 && !showZeros) {
|
|
12162
12161
|
return null;
|
|
12163
12162
|
}
|
|
12164
|
-
return _this.loc.numberFormatter(_object_spread_props$
|
|
12163
|
+
return _this.loc.numberFormatter(_object_spread_props$2(_object_spread$3({
|
|
12165
12164
|
style: "unit",
|
|
12166
12165
|
unitDisplay: "long"
|
|
12167
12166
|
}, opts), {
|
|
@@ -12170,7 +12169,7 @@ function removeZeroes(vals) {
|
|
|
12170
12169
|
}).filter(function(n) {
|
|
12171
12170
|
return n;
|
|
12172
12171
|
});
|
|
12173
|
-
return this.loc.listFormatter(_object_spread$
|
|
12172
|
+
return this.loc.listFormatter(_object_spread$3({
|
|
12174
12173
|
type: "conjunction",
|
|
12175
12174
|
style: opts.listStyle || "narrow"
|
|
12176
12175
|
}, opts)).format(l);
|
|
@@ -12184,7 +12183,7 @@ function removeZeroes(vals) {
|
|
|
12184
12183
|
*/ key: "toObject",
|
|
12185
12184
|
value: function toObject() {
|
|
12186
12185
|
if (!this.isValid) return {};
|
|
12187
|
-
return _object_spread$
|
|
12186
|
+
return _object_spread$3({}, this.values);
|
|
12188
12187
|
}
|
|
12189
12188
|
},
|
|
12190
12189
|
{
|
|
@@ -12237,7 +12236,7 @@ function removeZeroes(vals) {
|
|
|
12237
12236
|
if (!this.isValid) return null;
|
|
12238
12237
|
var millis = this.toMillis();
|
|
12239
12238
|
if (millis < 0 || millis >= 86400000) return null;
|
|
12240
|
-
opts = _object_spread_props$
|
|
12239
|
+
opts = _object_spread_props$2(_object_spread$3({
|
|
12241
12240
|
suppressMilliseconds: false,
|
|
12242
12241
|
suppressSeconds: false,
|
|
12243
12242
|
includePrefix: false,
|
|
@@ -12408,7 +12407,7 @@ function removeZeroes(vals) {
|
|
|
12408
12407
|
*/ key: "set",
|
|
12409
12408
|
value: function set(values) {
|
|
12410
12409
|
if (!this.isValid) return this;
|
|
12411
|
-
var mixed = _object_spread$
|
|
12410
|
+
var mixed = _object_spread$3({}, this.values, normalizeObject(values, Duration.normalizeUnit));
|
|
12412
12411
|
return clone$1(this, {
|
|
12413
12412
|
values: mixed
|
|
12414
12413
|
});
|
|
@@ -14019,7 +14018,7 @@ function diff$2(earlier, later, units, opts) {
|
|
|
14019
14018
|
});
|
|
14020
14019
|
if (lowerOrderUnits.length === 0) {
|
|
14021
14020
|
if (highWater < later) {
|
|
14022
|
-
highWater = cursor.plus(_define_property$
|
|
14021
|
+
highWater = cursor.plus(_define_property$5({}, lowestOrder, 1));
|
|
14023
14022
|
}
|
|
14024
14023
|
if (highWater !== cursor) {
|
|
14025
14024
|
results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
|
|
@@ -14579,7 +14578,7 @@ function clone$2(inst, alts) {
|
|
|
14579
14578
|
loc: inst.loc,
|
|
14580
14579
|
invalid: inst.invalid
|
|
14581
14580
|
};
|
|
14582
|
-
return new DateTime(_object_spread_props$
|
|
14581
|
+
return new DateTime(_object_spread_props$2(_object_spread$3({}, current, alts), {
|
|
14583
14582
|
old: current
|
|
14584
14583
|
}));
|
|
14585
14584
|
}
|
|
@@ -14633,7 +14632,7 @@ function objToTS(obj, offset, zone) {
|
|
|
14633
14632
|
}
|
|
14634
14633
|
// create a new DT instance by adding a duration, adjusting for DSTs
|
|
14635
14634
|
function adjustTime(inst, dur) {
|
|
14636
|
-
var oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = _object_spread_props$
|
|
14635
|
+
var oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = _object_spread_props$2(_object_spread$3({}, inst.c), {
|
|
14637
14636
|
year: year,
|
|
14638
14637
|
month: month,
|
|
14639
14638
|
day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7
|
|
@@ -14664,7 +14663,7 @@ function adjustTime(inst, dur) {
|
|
|
14664
14663
|
function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {
|
|
14665
14664
|
var setZone = opts.setZone, zone = opts.zone;
|
|
14666
14665
|
if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {
|
|
14667
|
-
var interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, _object_spread_props$
|
|
14666
|
+
var interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, _object_spread_props$2(_object_spread$3({}, opts), {
|
|
14668
14667
|
zone: interpretationZone,
|
|
14669
14668
|
specificOffset: specificOffset
|
|
14670
14669
|
}));
|
|
@@ -15684,11 +15683,11 @@ function lastOpts(argList) {
|
|
|
15684
15683
|
}
|
|
15685
15684
|
var mixed;
|
|
15686
15685
|
if (settingWeekStuff) {
|
|
15687
|
-
mixed = weekToGregorian(_object_spread$
|
|
15686
|
+
mixed = weekToGregorian(_object_spread$3({}, gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), normalized), minDaysInFirstWeek, startOfWeek);
|
|
15688
15687
|
} else if (!isUndefined$2(normalized.ordinal)) {
|
|
15689
|
-
mixed = ordinalToGregorian(_object_spread$
|
|
15688
|
+
mixed = ordinalToGregorian(_object_spread$3({}, gregorianToOrdinal(this.c), normalized));
|
|
15690
15689
|
} else {
|
|
15691
|
-
mixed = _object_spread$
|
|
15690
|
+
mixed = _object_spread$3({}, this.toObject(), normalized);
|
|
15692
15691
|
// if we didn't set the day but we ended up on an overflow date,
|
|
15693
15692
|
// use the last day of the right month
|
|
15694
15693
|
if (isUndefined$2(normalized.day)) {
|
|
@@ -15807,7 +15806,7 @@ function lastOpts(argList) {
|
|
|
15807
15806
|
* @return {DateTime}
|
|
15808
15807
|
*/ key: "endOf",
|
|
15809
15808
|
value: function endOf(unit, opts) {
|
|
15810
|
-
return this.isValid ? this.plus(_define_property$
|
|
15809
|
+
return this.isValid ? this.plus(_define_property$5({}, unit, 1)).startOf(unit, opts).minus(1) : this;
|
|
15811
15810
|
}
|
|
15812
15811
|
},
|
|
15813
15812
|
{
|
|
@@ -16135,7 +16134,7 @@ function lastOpts(argList) {
|
|
|
16135
16134
|
value: function toObject() {
|
|
16136
16135
|
var opts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
16137
16136
|
if (!this.isValid) return {};
|
|
16138
|
-
var base = _object_spread$
|
|
16137
|
+
var base = _object_spread$3({}, this.c);
|
|
16139
16138
|
if (opts.includeConfig) {
|
|
16140
16139
|
base.outputCalendar = this.outputCalendar;
|
|
16141
16140
|
base.numberingSystem = this.loc.numberingSystem;
|
|
@@ -16175,7 +16174,7 @@ function lastOpts(argList) {
|
|
|
16175
16174
|
if (!this.isValid || !otherDateTime.isValid) {
|
|
16176
16175
|
return Duration.invalid("created by diffing an invalid DateTime");
|
|
16177
16176
|
}
|
|
16178
|
-
var durOpts = _object_spread$
|
|
16177
|
+
var durOpts = _object_spread$3({
|
|
16179
16178
|
locale: this.locale,
|
|
16180
16179
|
numberingSystem: this.numberingSystem
|
|
16181
16180
|
}, opts);
|
|
@@ -16279,7 +16278,7 @@ function lastOpts(argList) {
|
|
|
16279
16278
|
units = options.unit;
|
|
16280
16279
|
unit = undefined;
|
|
16281
16280
|
}
|
|
16282
|
-
return diffRelative(base, this.plus(padding), _object_spread_props$
|
|
16281
|
+
return diffRelative(base, this.plus(padding), _object_spread_props$2(_object_spread$3({}, options), {
|
|
16283
16282
|
numeric: "always",
|
|
16284
16283
|
units: units,
|
|
16285
16284
|
unit: unit
|
|
@@ -16305,7 +16304,7 @@ function lastOpts(argList) {
|
|
|
16305
16304
|
if (!this.isValid) return null;
|
|
16306
16305
|
return diffRelative(options.base || DateTime.fromObject({}, {
|
|
16307
16306
|
zone: this.zone
|
|
16308
|
-
}), this, _object_spread_props$
|
|
16307
|
+
}), this, _object_spread_props$2(_object_spread$3({}, options), {
|
|
16309
16308
|
numeric: "auto",
|
|
16310
16309
|
units: [
|
|
16311
16310
|
"years",
|
|
@@ -22573,7 +22572,7 @@ function _create_class$r(Constructor, protoProps, staticProps) {
|
|
|
22573
22572
|
if (staticProps) _defineProperties$r(Constructor, staticProps);
|
|
22574
22573
|
return Constructor;
|
|
22575
22574
|
}
|
|
22576
|
-
function _define_property$
|
|
22575
|
+
function _define_property$4(obj, key, value) {
|
|
22577
22576
|
if (key in obj) {
|
|
22578
22577
|
Object.defineProperty(obj, key, {
|
|
22579
22578
|
value: value,
|
|
@@ -22626,7 +22625,7 @@ function _non_iterable_rest$2() {
|
|
|
22626
22625
|
function _non_iterable_spread$4() {
|
|
22627
22626
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22628
22627
|
}
|
|
22629
|
-
function _object_spread$
|
|
22628
|
+
function _object_spread$2(target) {
|
|
22630
22629
|
for(var i = 1; i < arguments.length; i++){
|
|
22631
22630
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
22632
22631
|
var ownKeys = Object.keys(source);
|
|
@@ -22636,12 +22635,12 @@ function _object_spread$1(target) {
|
|
|
22636
22635
|
}));
|
|
22637
22636
|
}
|
|
22638
22637
|
ownKeys.forEach(function(key) {
|
|
22639
|
-
_define_property$
|
|
22638
|
+
_define_property$4(target, key, source[key]);
|
|
22640
22639
|
});
|
|
22641
22640
|
}
|
|
22642
22641
|
return target;
|
|
22643
22642
|
}
|
|
22644
|
-
function ownKeys(object, enumerableOnly) {
|
|
22643
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
22645
22644
|
var keys = Object.keys(object);
|
|
22646
22645
|
if (Object.getOwnPropertySymbols) {
|
|
22647
22646
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -22649,12 +22648,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
22649
22648
|
}
|
|
22650
22649
|
return keys;
|
|
22651
22650
|
}
|
|
22652
|
-
function _object_spread_props(target, source) {
|
|
22651
|
+
function _object_spread_props$1(target, source) {
|
|
22653
22652
|
source = source != null ? source : {};
|
|
22654
22653
|
if (Object.getOwnPropertyDescriptors) {
|
|
22655
22654
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
22656
22655
|
} else {
|
|
22657
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
22656
|
+
ownKeys$1(Object(source)).forEach(function(key) {
|
|
22658
22657
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
22659
22658
|
});
|
|
22660
22659
|
}
|
|
@@ -22847,14 +22846,14 @@ function indent(str, spaces) {
|
|
|
22847
22846
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
22848
22847
|
// match is required
|
|
22849
22848
|
if (!match) {
|
|
22850
|
-
return
|
|
22849
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
22851
22850
|
v: nextMatch1
|
|
22852
22851
|
};
|
|
22853
22852
|
}
|
|
22854
22853
|
var token = match.token, offset = match.offset;
|
|
22855
22854
|
i1 += offset;
|
|
22856
22855
|
if (token === ' ') {
|
|
22857
|
-
return
|
|
22856
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22858
22857
|
}
|
|
22859
22858
|
tokens1 = _to_consumable_array$4(tokens1).concat([
|
|
22860
22859
|
token
|
|
@@ -22873,7 +22872,7 @@ function indent(str, spaces) {
|
|
|
22873
22872
|
if (contextKeys.some(function(el) {
|
|
22874
22873
|
return el.startsWith(name);
|
|
22875
22874
|
})) {
|
|
22876
|
-
return
|
|
22875
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22877
22876
|
}
|
|
22878
22877
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22879
22878
|
return el === name;
|
|
@@ -22892,9 +22891,9 @@ function indent(str, spaces) {
|
|
|
22892
22891
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22893
22892
|
return el.startsWith(name);
|
|
22894
22893
|
})) {
|
|
22895
|
-
return
|
|
22894
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22896
22895
|
}
|
|
22897
|
-
return
|
|
22896
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
22898
22897
|
v: nextMatch1
|
|
22899
22898
|
};
|
|
22900
22899
|
};
|
|
@@ -22906,7 +22905,7 @@ function indent(str, spaces) {
|
|
|
22906
22905
|
}
|
|
22907
22906
|
}
|
|
22908
22907
|
var _obj;
|
|
22909
|
-
var identifiersMap = (_obj = {}, _define_property$
|
|
22908
|
+
var identifiersMap = (_obj = {}, _define_property$4(_obj, identifier, 'identifier'), _define_property$4(_obj, nameIdentifier, 'nameIdentifier'), _obj);
|
|
22910
22909
|
var identifiers$2 = new ExternalTokenizer(function(input, stack) {
|
|
22911
22910
|
LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
22912
22911
|
var nameMatch = parseName(input, stack.context);
|
|
@@ -22955,11 +22954,11 @@ var insertSemicolon = new ExternalTokenizer(function(input, stack) {
|
|
|
22955
22954
|
}
|
|
22956
22955
|
});
|
|
22957
22956
|
var _obj1;
|
|
22958
|
-
var prefixedContextStarts = (_obj1 = {}, _define_property$
|
|
22957
|
+
var prefixedContextStarts = (_obj1 = {}, _define_property$4(_obj1, functionInvocationStart, 'FunctionInvocation'), _define_property$4(_obj1, filterExpressionStart, 'FilterExpression'), _define_property$4(_obj1, pathExpressionStart, 'PathExpression'), _obj1);
|
|
22959
22958
|
var _obj2;
|
|
22960
|
-
var contextStarts = (_obj2 = {}, _define_property$
|
|
22959
|
+
var contextStarts = (_obj2 = {}, _define_property$4(_obj2, contextStart, 'Context'), _define_property$4(_obj2, functionDefinitionStart, 'FunctionDefinition'), _define_property$4(_obj2, forExpressionStart, 'ForExpression'), _define_property$4(_obj2, listStart, 'List'), _define_property$4(_obj2, ifExpressionStart, 'IfExpression'), _define_property$4(_obj2, quantifiedExpressionStart, 'QuantifiedExpression'), _obj2);
|
|
22961
22960
|
var _obj3;
|
|
22962
|
-
var contextEnds = (_obj3 = {}, _define_property$
|
|
22961
|
+
var contextEnds = (_obj3 = {}, _define_property$4(_obj3, Context, 'Context'), _define_property$4(_obj3, FunctionDefinition, 'FunctionDefinition'), _define_property$4(_obj3, ForExpression, 'ForExpression'), _define_property$4(_obj3, List, 'List'), _define_property$4(_obj3, IfExpression, 'IfExpression'), _define_property$4(_obj3, QuantifiedExpression, 'QuantifiedExpression'), _define_property$4(_obj3, PathExpression, 'PathExpression'), _define_property$4(_obj3, FunctionInvocation, 'FunctionInvocation'), _define_property$4(_obj3, FilterExpression, 'FilterExpression'), _define_property$4(_obj3, ArithmeticExpression, 'ArithmeticExpression'), _obj3);
|
|
22963
22962
|
/**
|
|
22964
22963
|
* A simple producer that retrievs a value from
|
|
22965
22964
|
* a given context. Used to lazily take things.
|
|
@@ -23047,7 +23046,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23047
23046
|
*/ key: "set",
|
|
23048
23047
|
value: function set(key, value) {
|
|
23049
23048
|
var constructor = /** @type { typeof VariableContext } */ this.constructor;
|
|
23050
|
-
return constructor.of(_object_spread_props(_object_spread$
|
|
23049
|
+
return constructor.of(_object_spread_props$1(_object_spread$2({}, this.value), _define_property$4({}, key, value)));
|
|
23051
23050
|
}
|
|
23052
23051
|
},
|
|
23053
23052
|
{
|
|
@@ -23111,7 +23110,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23111
23110
|
if ((typeof context === "undefined" ? "undefined" : _type_of$z(context)) !== 'object') {
|
|
23112
23111
|
return {};
|
|
23113
23112
|
}
|
|
23114
|
-
return _object_spread$
|
|
23113
|
+
return _object_spread$2({}, context);
|
|
23115
23114
|
}
|
|
23116
23115
|
},
|
|
23117
23116
|
{
|
|
@@ -23129,13 +23128,13 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23129
23128
|
return reduce$1(this.__unwrap(other), function(merged, value, key) {
|
|
23130
23129
|
if (_instanceof$f(value, ValueProducer)) {
|
|
23131
23130
|
// keep value producers in tact
|
|
23132
|
-
return _object_spread_props(_object_spread$
|
|
23131
|
+
return _object_spread_props$1(_object_spread$2({}, merged), _define_property$4({}, key, value));
|
|
23133
23132
|
}
|
|
23134
23133
|
value = _this.__unwrap(value);
|
|
23135
23134
|
if (has$2(merged, key)) {
|
|
23136
23135
|
value = _this.__merge(_this.__unwrap(merged[key]), value);
|
|
23137
23136
|
}
|
|
23138
|
-
return _object_spread_props(_object_spread$
|
|
23137
|
+
return _object_spread_props$1(_object_spread$2({}, merged), _define_property$4({}, key, value));
|
|
23139
23138
|
}, this.__unwrap(context));
|
|
23140
23139
|
}
|
|
23141
23140
|
}
|
|
@@ -23354,7 +23353,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23354
23353
|
*/ key: "assign",
|
|
23355
23354
|
value: function assign() {
|
|
23356
23355
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23357
|
-
return Variables.of(_object_spread$
|
|
23356
|
+
return Variables.of(_object_spread$2({}, this, options));
|
|
23358
23357
|
}
|
|
23359
23358
|
},
|
|
23360
23359
|
{
|
|
@@ -23369,7 +23368,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23369
23368
|
context: this.context,
|
|
23370
23369
|
parent: this.parent
|
|
23371
23370
|
};
|
|
23372
|
-
return Variables.of(_object_spread$
|
|
23371
|
+
return Variables.of(_object_spread$2({}, defaultOptions, options));
|
|
23373
23372
|
}
|
|
23374
23373
|
}
|
|
23375
23374
|
], [
|
|
@@ -23852,7 +23851,7 @@ function _create_class$q(Constructor, protoProps, staticProps) {
|
|
|
23852
23851
|
if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
|
|
23853
23852
|
return Constructor;
|
|
23854
23853
|
}
|
|
23855
|
-
function _define_property$
|
|
23854
|
+
function _define_property$3(obj, key, value) {
|
|
23856
23855
|
if (key in obj) {
|
|
23857
23856
|
Object.defineProperty(obj, key, {
|
|
23858
23857
|
value: value,
|
|
@@ -25159,7 +25158,7 @@ var builtins = {
|
|
|
25159
25158
|
if (key in context) {
|
|
25160
25159
|
return FALSE;
|
|
25161
25160
|
}
|
|
25162
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25161
|
+
return Object.assign(Object.assign({}, context), _define_property$3({}, entry.key, entry.value));
|
|
25163
25162
|
}, {});
|
|
25164
25163
|
if (context === FALSE) {
|
|
25165
25164
|
return null;
|
|
@@ -25212,7 +25211,7 @@ var builtins = {
|
|
|
25212
25211
|
return null;
|
|
25213
25212
|
}
|
|
25214
25213
|
}
|
|
25215
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25214
|
+
return Object.assign(Object.assign({}, context), _define_property$3({}, key, value));
|
|
25216
25215
|
}
|
|
25217
25216
|
function matches(a, b) {
|
|
25218
25217
|
return a === b;
|
|
@@ -25939,7 +25938,7 @@ function evalNode(node, input, args) {
|
|
|
25939
25938
|
return function(context) {
|
|
25940
25939
|
return args.slice(1, -1).reduce(function(obj, arg) {
|
|
25941
25940
|
var _arg = _sliced_to_array$1(arg(Object.assign(Object.assign({}, context), obj)), 2), key = _arg[0], value = _arg[1];
|
|
25942
|
-
return Object.assign(Object.assign({}, obj), _define_property$
|
|
25941
|
+
return Object.assign(Object.assign({}, obj), _define_property$3({}, key, value));
|
|
25943
25942
|
}, {});
|
|
25944
25943
|
};
|
|
25945
25944
|
case 'FunctionBody':
|
|
@@ -26436,7 +26435,7 @@ function extractValue(context, prop, _target) {
|
|
|
26436
26435
|
'range'
|
|
26437
26436
|
].includes(getType(target))) {
|
|
26438
26437
|
return target.map(function(t) {
|
|
26439
|
-
return _define_property$
|
|
26438
|
+
return _define_property$3({}, prop, t);
|
|
26440
26439
|
});
|
|
26441
26440
|
}
|
|
26442
26441
|
return null;
|
|
@@ -41553,7 +41552,7 @@ function _class_call_check$3(instance, Constructor) {
|
|
|
41553
41552
|
throw new TypeError("Cannot call a class as a function");
|
|
41554
41553
|
}
|
|
41555
41554
|
}
|
|
41556
|
-
function _defineProperties$1
|
|
41555
|
+
function _defineProperties$1(target, props) {
|
|
41557
41556
|
for(var i = 0; i < props.length; i++){
|
|
41558
41557
|
var descriptor = props[i];
|
|
41559
41558
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -41562,9 +41561,9 @@ function _defineProperties$1$1(target, props) {
|
|
|
41562
41561
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
41563
41562
|
}
|
|
41564
41563
|
}
|
|
41565
|
-
function _create_class$1
|
|
41566
|
-
if (protoProps) _defineProperties$1
|
|
41567
|
-
if (staticProps) _defineProperties$1
|
|
41564
|
+
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
41565
|
+
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
41566
|
+
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
41568
41567
|
return Constructor;
|
|
41569
41568
|
}
|
|
41570
41569
|
function _get_prototype_of$3(o) {
|
|
@@ -41683,7 +41682,7 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
41683
41682
|
this.skipValidations = has$1(config, "skipValidations") ? config.skipValidations // casting assumes the end user passing the correct type
|
|
41684
41683
|
: DEFAULT_PARSER_CONFIG.skipValidations;
|
|
41685
41684
|
}
|
|
41686
|
-
_create_class$1
|
|
41685
|
+
_create_class$1(Parser, [
|
|
41687
41686
|
{
|
|
41688
41687
|
key: "performSelfAnalysis",
|
|
41689
41688
|
value: function performSelfAnalysis() {
|
|
@@ -42895,12 +42894,12 @@ function _assert_this_initialized$1(self1) {
|
|
|
42895
42894
|
}
|
|
42896
42895
|
return self1;
|
|
42897
42896
|
}
|
|
42898
|
-
function _class_call_check$1
|
|
42897
|
+
function _class_call_check$1(instance, Constructor) {
|
|
42899
42898
|
if (!(instance instanceof Constructor)) {
|
|
42900
42899
|
throw new TypeError("Cannot call a class as a function");
|
|
42901
42900
|
}
|
|
42902
42901
|
}
|
|
42903
|
-
function _define_property$
|
|
42902
|
+
function _define_property$2(obj, key, value) {
|
|
42904
42903
|
if (key in obj) {
|
|
42905
42904
|
Object.defineProperty(obj, key, {
|
|
42906
42905
|
value: value,
|
|
@@ -42977,10 +42976,10 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42977
42976
|
_inherits$1(CelParser, CstParser);
|
|
42978
42977
|
var _super = _create_super$1(CelParser);
|
|
42979
42978
|
function CelParser() {
|
|
42980
|
-
_class_call_check$1
|
|
42979
|
+
_class_call_check$1(this, CelParser);
|
|
42981
42980
|
var _this;
|
|
42982
42981
|
_this = _super.call(this, allTokens);
|
|
42983
|
-
_define_property$
|
|
42982
|
+
_define_property$2(_assert_this_initialized$1(_this), "expr", _this.RULE('expr', function() {
|
|
42984
42983
|
_this.SUBRULE(_this.conditionalOr, {
|
|
42985
42984
|
LABEL: 'conditionalOr'
|
|
42986
42985
|
});
|
|
@@ -42995,7 +42994,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42995
42994
|
});
|
|
42996
42995
|
});
|
|
42997
42996
|
}));
|
|
42998
|
-
_define_property$
|
|
42997
|
+
_define_property$2(_assert_this_initialized$1(_this), "conditionalAnd", _this.RULE('conditionalAnd', function() {
|
|
42999
42998
|
_this.SUBRULE(_this.relation, {
|
|
43000
42999
|
LABEL: 'lhs'
|
|
43001
43000
|
});
|
|
@@ -43006,7 +43005,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43006
43005
|
});
|
|
43007
43006
|
});
|
|
43008
43007
|
}));
|
|
43009
|
-
_define_property$
|
|
43008
|
+
_define_property$2(_assert_this_initialized$1(_this), "conditionalOr", _this.RULE('conditionalOr', function() {
|
|
43010
43009
|
_this.SUBRULE(_this.conditionalAnd, {
|
|
43011
43010
|
LABEL: 'lhs'
|
|
43012
43011
|
});
|
|
@@ -43017,7 +43016,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43017
43016
|
});
|
|
43018
43017
|
});
|
|
43019
43018
|
}));
|
|
43020
|
-
_define_property$
|
|
43019
|
+
_define_property$2(_assert_this_initialized$1(_this), "relation", _this.RULE('relation', function() {
|
|
43021
43020
|
_this.SUBRULE(_this.addition, {
|
|
43022
43021
|
LABEL: 'lhs'
|
|
43023
43022
|
});
|
|
@@ -43028,7 +43027,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43028
43027
|
});
|
|
43029
43028
|
});
|
|
43030
43029
|
}));
|
|
43031
|
-
_define_property$
|
|
43030
|
+
_define_property$2(_assert_this_initialized$1(_this), "addition", _this.RULE('addition', function() {
|
|
43032
43031
|
_this.SUBRULE(_this.multiplication, {
|
|
43033
43032
|
LABEL: 'lhs'
|
|
43034
43033
|
});
|
|
@@ -43039,7 +43038,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43039
43038
|
});
|
|
43040
43039
|
});
|
|
43041
43040
|
}));
|
|
43042
|
-
_define_property$
|
|
43041
|
+
_define_property$2(_assert_this_initialized$1(_this), "multiplication", _this.RULE('multiplication', function() {
|
|
43043
43042
|
_this.SUBRULE(_this.unaryExpression, {
|
|
43044
43043
|
LABEL: 'lhs'
|
|
43045
43044
|
});
|
|
@@ -43050,13 +43049,13 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43050
43049
|
});
|
|
43051
43050
|
});
|
|
43052
43051
|
}));
|
|
43053
|
-
_define_property$
|
|
43052
|
+
_define_property$2(_assert_this_initialized$1(_this), "unaryExpression", _this.RULE('unaryExpression', function() {
|
|
43054
43053
|
_this.MANY(function() {
|
|
43055
43054
|
_this.CONSUME(UnaryOperator);
|
|
43056
43055
|
});
|
|
43057
43056
|
_this.SUBRULE(_this.atomicExpression);
|
|
43058
43057
|
}));
|
|
43059
|
-
_define_property$
|
|
43058
|
+
_define_property$2(_assert_this_initialized$1(_this), "parenthesisExpression", _this.RULE('parenthesisExpression', function() {
|
|
43060
43059
|
_this.CONSUME(OpenParenthesis, {
|
|
43061
43060
|
LABEL: 'open'
|
|
43062
43061
|
});
|
|
@@ -43065,7 +43064,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43065
43064
|
LABEL: 'close'
|
|
43066
43065
|
});
|
|
43067
43066
|
}));
|
|
43068
|
-
_define_property$
|
|
43067
|
+
_define_property$2(_assert_this_initialized$1(_this), "listExpression", _this.RULE('listExpression', function() {
|
|
43069
43068
|
_this.CONSUME(OpenBracket);
|
|
43070
43069
|
_this.OPTION(function() {
|
|
43071
43070
|
_this.SUBRULE(_this.expr, {
|
|
@@ -43085,7 +43084,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43085
43084
|
});
|
|
43086
43085
|
});
|
|
43087
43086
|
}));
|
|
43088
|
-
_define_property$
|
|
43087
|
+
_define_property$2(_assert_this_initialized$1(_this), "mapExpression", _this.RULE('mapExpression', function() {
|
|
43089
43088
|
_this.CONSUME(OpenCurlyBracket);
|
|
43090
43089
|
_this.MANY(function() {
|
|
43091
43090
|
_this.SUBRULE(_this.mapKeyValues, {
|
|
@@ -43110,7 +43109,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43110
43109
|
]);
|
|
43111
43110
|
});
|
|
43112
43111
|
}));
|
|
43113
|
-
_define_property$
|
|
43112
|
+
_define_property$2(_assert_this_initialized$1(_this), "mapKeyValues", _this.RULE('mapKeyValues', function() {
|
|
43114
43113
|
_this.SUBRULE(_this.expr, {
|
|
43115
43114
|
LABEL: 'key'
|
|
43116
43115
|
});
|
|
@@ -43122,7 +43121,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43122
43121
|
_this.CONSUME(Comma);
|
|
43123
43122
|
});
|
|
43124
43123
|
}));
|
|
43125
|
-
_define_property$
|
|
43124
|
+
_define_property$2(_assert_this_initialized$1(_this), "macrosExpression", _this.RULE('macrosExpression', function() {
|
|
43126
43125
|
_this.CONSUME(Identifier);
|
|
43127
43126
|
_this.CONSUME(OpenParenthesis);
|
|
43128
43127
|
_this.OPTION(function() {
|
|
@@ -43138,7 +43137,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43138
43137
|
});
|
|
43139
43138
|
_this.CONSUME(CloseParenthesis);
|
|
43140
43139
|
}));
|
|
43141
|
-
_define_property$
|
|
43140
|
+
_define_property$2(_assert_this_initialized$1(_this), "identifierExpression", _this.RULE('identifierExpression', function() {
|
|
43142
43141
|
_this.CONSUME(Identifier);
|
|
43143
43142
|
_this.MANY(function() {
|
|
43144
43143
|
_this.OR([
|
|
@@ -43157,7 +43156,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43157
43156
|
]);
|
|
43158
43157
|
});
|
|
43159
43158
|
}));
|
|
43160
|
-
_define_property$
|
|
43159
|
+
_define_property$2(_assert_this_initialized$1(_this), "identifierDotExpression", _this.RULE('identifierDotExpression', function() {
|
|
43161
43160
|
_this.CONSUME(Dot);
|
|
43162
43161
|
_this.CONSUME(Identifier);
|
|
43163
43162
|
// Optional method call with arguments (for collection macros)
|
|
@@ -43177,12 +43176,12 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43177
43176
|
_this.CONSUME(CloseParenthesis);
|
|
43178
43177
|
});
|
|
43179
43178
|
}));
|
|
43180
|
-
_define_property$
|
|
43179
|
+
_define_property$2(_assert_this_initialized$1(_this), "indexExpression", _this.RULE('indexExpression', function() {
|
|
43181
43180
|
_this.CONSUME(OpenBracket);
|
|
43182
43181
|
_this.SUBRULE(_this.expr);
|
|
43183
43182
|
_this.CONSUME(CloseBracket);
|
|
43184
43183
|
}));
|
|
43185
|
-
_define_property$
|
|
43184
|
+
_define_property$2(_assert_this_initialized$1(_this), "atomicExpression", _this.RULE('atomicExpression', function() {
|
|
43186
43185
|
_this.OR([
|
|
43187
43186
|
{
|
|
43188
43187
|
ALT: function() {
|
|
@@ -43291,7 +43290,7 @@ function _create_class$w(Constructor, protoProps, staticProps) {
|
|
|
43291
43290
|
if (protoProps) _defineProperties$w(Constructor.prototype, protoProps);
|
|
43292
43291
|
return Constructor;
|
|
43293
43292
|
}
|
|
43294
|
-
function _define_property(obj, key, value) {
|
|
43293
|
+
function _define_property$1(obj, key, value) {
|
|
43295
43294
|
if (key in obj) {
|
|
43296
43295
|
Object.defineProperty(obj, key, {
|
|
43297
43296
|
value: value,
|
|
@@ -43363,7 +43362,7 @@ function _non_iterable_rest$6() {
|
|
|
43363
43362
|
function _non_iterable_spread$7() {
|
|
43364
43363
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
43365
43364
|
}
|
|
43366
|
-
function _object_spread(target) {
|
|
43365
|
+
function _object_spread$1(target) {
|
|
43367
43366
|
for(var i = 1; i < arguments.length; i++){
|
|
43368
43367
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
43369
43368
|
var ownKeys = Object.keys(source);
|
|
@@ -43373,7 +43372,7 @@ function _object_spread(target) {
|
|
|
43373
43372
|
}));
|
|
43374
43373
|
}
|
|
43375
43374
|
ownKeys.forEach(function(key) {
|
|
43376
|
-
_define_property(target, key, source[key]);
|
|
43375
|
+
_define_property$1(target, key, source[key]);
|
|
43377
43376
|
});
|
|
43378
43377
|
}
|
|
43379
43378
|
return target;
|
|
@@ -43459,13 +43458,13 @@ var CelVisitor = /*#__PURE__*/ function(BaseCelVisitor) {
|
|
|
43459
43458
|
_class_call_check$B(this, CelVisitor);
|
|
43460
43459
|
var _this;
|
|
43461
43460
|
_this = _super.call(this);
|
|
43462
|
-
_define_property(_assert_this_initialized(_this), "context", void 0);
|
|
43461
|
+
_define_property$1(_assert_this_initialized(_this), "context", void 0);
|
|
43463
43462
|
/**
|
|
43464
43463
|
* Tracks the current mode of the visitor to handle special cases.
|
|
43465
|
-
*/ _define_property(_assert_this_initialized(_this), "mode", Mode.normal);
|
|
43466
|
-
_define_property(_assert_this_initialized(_this), "functions", void 0);
|
|
43464
|
+
*/ _define_property$1(_assert_this_initialized(_this), "mode", Mode.normal);
|
|
43465
|
+
_define_property$1(_assert_this_initialized(_this), "functions", void 0);
|
|
43467
43466
|
_this.context = context || {};
|
|
43468
|
-
_this.functions = _object_spread({}, defaultFunctions, functions || {});
|
|
43467
|
+
_this.functions = _object_spread$1({}, defaultFunctions, functions || {});
|
|
43469
43468
|
_this.validateVisitor();
|
|
43470
43469
|
return _this;
|
|
43471
43470
|
}
|
|
@@ -44206,6 +44205,198 @@ function evaluate(expression, context, functions) {
|
|
|
44206
44205
|
}
|
|
44207
44206
|
return toAstVisitorInstance.visit(result.cst);
|
|
44208
44207
|
}
|
|
44208
|
+
// Latin-1 Supplement
|
|
44209
|
+
// upper case ranges
|
|
44210
|
+
// [À-ÖØ-ß]
|
|
44211
|
+
// lower case ranges
|
|
44212
|
+
// [à-öø-ÿ]
|
|
44213
|
+
var magicSplit = /^[a-zà-öø-ÿа-я]+|[A-ZÀ-ÖØ-ßА-Я][a-zà-öø-ÿа-я]+|[a-zà-öø-ÿа-я]+|[0-9]+|[A-ZÀ-ÖØ-ßА-Я]+(?![a-zà-öø-ÿа-я])/g;
|
|
44214
|
+
var spaceSplit = /\S+/g;
|
|
44215
|
+
/**
|
|
44216
|
+
* A string.matchAll function that will return an array of "string parts" and the indexes at which it split each part
|
|
44217
|
+
*/ function getPartsAndIndexes(string, splitRegex) {
|
|
44218
|
+
var result = {
|
|
44219
|
+
parts: [],
|
|
44220
|
+
prefixes: []
|
|
44221
|
+
};
|
|
44222
|
+
var matches = string.matchAll(splitRegex);
|
|
44223
|
+
var lastWordEndIndex = 0;
|
|
44224
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
44225
|
+
try {
|
|
44226
|
+
for(var _iterator = matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
44227
|
+
var match = _step.value;
|
|
44228
|
+
if (typeof match.index !== 'number') continue;
|
|
44229
|
+
var word = match[0];
|
|
44230
|
+
result.parts.push(word);
|
|
44231
|
+
var prefix = string.slice(lastWordEndIndex, match.index).trim();
|
|
44232
|
+
result.prefixes.push(prefix);
|
|
44233
|
+
lastWordEndIndex = match.index + word.length;
|
|
44234
|
+
}
|
|
44235
|
+
} catch (err) {
|
|
44236
|
+
_didIteratorError = true;
|
|
44237
|
+
_iteratorError = err;
|
|
44238
|
+
} finally{
|
|
44239
|
+
try {
|
|
44240
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
44241
|
+
_iterator.return();
|
|
44242
|
+
}
|
|
44243
|
+
} finally{
|
|
44244
|
+
if (_didIteratorError) {
|
|
44245
|
+
throw _iteratorError;
|
|
44246
|
+
}
|
|
44247
|
+
}
|
|
44248
|
+
}
|
|
44249
|
+
var tail = string.slice(lastWordEndIndex).trim();
|
|
44250
|
+
if (tail) {
|
|
44251
|
+
result.parts.push('');
|
|
44252
|
+
result.prefixes.push(tail);
|
|
44253
|
+
}
|
|
44254
|
+
return result;
|
|
44255
|
+
}
|
|
44256
|
+
/**
|
|
44257
|
+
* A function that splits a string on words and returns an array of words.
|
|
44258
|
+
* - It can prefix each word with a given character
|
|
44259
|
+
* - It can strip or keep special characters, this affects the logic for adding a prefix as well
|
|
44260
|
+
*/ function splitAndPrefix(string, options) {
|
|
44261
|
+
var _ref = options || {}, _ref_keepSpecialCharacters = _ref.keepSpecialCharacters, keepSpecialCharacters = _ref_keepSpecialCharacters === void 0 ? false : _ref_keepSpecialCharacters, keep = _ref.keep, _ref_prefix = _ref.prefix, prefix = _ref_prefix === void 0 ? '' : _ref_prefix;
|
|
44262
|
+
var normalString = string.trim().normalize('NFC');
|
|
44263
|
+
var hasSpaces = normalString.includes(' ');
|
|
44264
|
+
var split = hasSpaces ? spaceSplit : magicSplit;
|
|
44265
|
+
var partsAndIndexes = getPartsAndIndexes(normalString, split);
|
|
44266
|
+
return partsAndIndexes.parts.map(function(_part, i) {
|
|
44267
|
+
var foundPrefix = partsAndIndexes.prefixes[i] || '';
|
|
44268
|
+
var part = _part;
|
|
44269
|
+
if (keepSpecialCharacters === false) {
|
|
44270
|
+
if (keep) {
|
|
44271
|
+
part = part.normalize('NFD').replace(new RegExp("[^a-zA-Z\xd8\xdf\xf80-9".concat(keep.join(''), "]"), 'g'), '');
|
|
44272
|
+
}
|
|
44273
|
+
if (!keep) {
|
|
44274
|
+
part = part.normalize('NFD').replace(/[^a-zA-ZØßø0-9]/g, '');
|
|
44275
|
+
foundPrefix = '';
|
|
44276
|
+
}
|
|
44277
|
+
}
|
|
44278
|
+
if (keep && foundPrefix) {
|
|
44279
|
+
foundPrefix = foundPrefix.replace(new RegExp("[^".concat(keep.join(''), "]"), 'g'), '');
|
|
44280
|
+
}
|
|
44281
|
+
// the first word doesn't need a prefix, so only return the found prefix
|
|
44282
|
+
if (i === 0) {
|
|
44283
|
+
// console.log(`foundPrefix → `, foundPrefix)
|
|
44284
|
+
return foundPrefix + part;
|
|
44285
|
+
}
|
|
44286
|
+
if (!foundPrefix && !part) return '';
|
|
44287
|
+
if (!hasSpaces) {
|
|
44288
|
+
// return the found prefix OR fall back to a given prefix
|
|
44289
|
+
return (foundPrefix || prefix) + part;
|
|
44290
|
+
}
|
|
44291
|
+
// space based sentence was split on spaces, so only return found prefixes
|
|
44292
|
+
if (!foundPrefix && prefix.match(/\s/)) {
|
|
44293
|
+
// in this case we have no more found prefix, it was trimmed, but we're looking to add a space
|
|
44294
|
+
// so let's return that space
|
|
44295
|
+
return ' ' + part;
|
|
44296
|
+
}
|
|
44297
|
+
return (foundPrefix || prefix) + part;
|
|
44298
|
+
}).filter(Boolean);
|
|
44299
|
+
}
|
|
44300
|
+
/**
|
|
44301
|
+
* Capitalises a single word
|
|
44302
|
+
* @returns the word with the first character in uppercase and the rest in lowercase
|
|
44303
|
+
*/ function capitaliseWord(string) {
|
|
44304
|
+
var match = string.matchAll(magicSplit).next().value;
|
|
44305
|
+
var firstLetterIndex = match ? match.index : 0;
|
|
44306
|
+
return string.slice(0, firstLetterIndex + 1).toUpperCase() + string.slice(firstLetterIndex + 1).toLowerCase();
|
|
44307
|
+
}
|
|
44308
|
+
function _define_property(obj, key, value) {
|
|
44309
|
+
if (key in obj) {
|
|
44310
|
+
Object.defineProperty(obj, key, {
|
|
44311
|
+
value: value,
|
|
44312
|
+
enumerable: true,
|
|
44313
|
+
configurable: true,
|
|
44314
|
+
writable: true
|
|
44315
|
+
});
|
|
44316
|
+
} else {
|
|
44317
|
+
obj[key] = value;
|
|
44318
|
+
}
|
|
44319
|
+
return obj;
|
|
44320
|
+
}
|
|
44321
|
+
function _object_spread(target) {
|
|
44322
|
+
for(var i = 1; i < arguments.length; i++){
|
|
44323
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
44324
|
+
var ownKeys = Object.keys(source);
|
|
44325
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
44326
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
44327
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
44328
|
+
}));
|
|
44329
|
+
}
|
|
44330
|
+
ownKeys.forEach(function(key) {
|
|
44331
|
+
_define_property(target, key, source[key]);
|
|
44332
|
+
});
|
|
44333
|
+
}
|
|
44334
|
+
return target;
|
|
44335
|
+
}
|
|
44336
|
+
function ownKeys(object, enumerableOnly) {
|
|
44337
|
+
var keys = Object.keys(object);
|
|
44338
|
+
if (Object.getOwnPropertySymbols) {
|
|
44339
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
44340
|
+
keys.push.apply(keys, symbols);
|
|
44341
|
+
}
|
|
44342
|
+
return keys;
|
|
44343
|
+
}
|
|
44344
|
+
function _object_spread_props(target, source) {
|
|
44345
|
+
source = source != null ? source : {};
|
|
44346
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
44347
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
44348
|
+
} else {
|
|
44349
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
44350
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
44351
|
+
});
|
|
44352
|
+
}
|
|
44353
|
+
return target;
|
|
44354
|
+
}
|
|
44355
|
+
/**
|
|
44356
|
+
* # 🐪 camelCase
|
|
44357
|
+
* converts a string to camelCase
|
|
44358
|
+
* - first lowercase then all capitalised
|
|
44359
|
+
* - *strips away* special characters by default
|
|
44360
|
+
*
|
|
44361
|
+
* @example
|
|
44362
|
+
* camelCase('$catDog') === 'catDog'
|
|
44363
|
+
* @example
|
|
44364
|
+
* camelCase('$catDog', { keepSpecialCharacters: true }) === '$catDog'
|
|
44365
|
+
*/ function camelCase(string, options) {
|
|
44366
|
+
return splitAndPrefix(string, options).reduce(function(result, word, index) {
|
|
44367
|
+
return index === 0 || !(word[0] || '').match(magicSplit) ? result + word.toLowerCase() : result + capitaliseWord(word);
|
|
44368
|
+
}, '');
|
|
44369
|
+
}
|
|
44370
|
+
/**
|
|
44371
|
+
* # 🥙 kebab-case
|
|
44372
|
+
* converts a string to kebab-case
|
|
44373
|
+
* - hyphenated lowercase
|
|
44374
|
+
* - *strips away* special characters by default
|
|
44375
|
+
*
|
|
44376
|
+
* @example
|
|
44377
|
+
* kebabCase('$catDog') === 'cat-dog'
|
|
44378
|
+
* @example
|
|
44379
|
+
* kebabCase('$catDog', { keepSpecialCharacters: true }) === '$cat-dog'
|
|
44380
|
+
*/ function kebabCase(string, options) {
|
|
44381
|
+
return splitAndPrefix(string, _object_spread_props(_object_spread({}, options), {
|
|
44382
|
+
prefix: '-'
|
|
44383
|
+
})).join('').toLowerCase();
|
|
44384
|
+
}
|
|
44385
|
+
/**
|
|
44386
|
+
* # 🐍 snake_case
|
|
44387
|
+
* converts a string to snake_case
|
|
44388
|
+
* - underscored lowercase
|
|
44389
|
+
* - *strips away* special characters by default
|
|
44390
|
+
*
|
|
44391
|
+
* @example
|
|
44392
|
+
* snakeCase('$catDog') === 'cat_dog'
|
|
44393
|
+
* @example
|
|
44394
|
+
* snakeCase('$catDog', { keepSpecialCharacters: true }) === '$cat_dog'
|
|
44395
|
+
*/ function snakeCase(string, options) {
|
|
44396
|
+
return splitAndPrefix(string, _object_spread_props(_object_spread({}, options), {
|
|
44397
|
+
prefix: '_'
|
|
44398
|
+
})).join('').toLowerCase();
|
|
44399
|
+
}
|
|
44209
44400
|
const Handlebars = handlebars_min || HandlebarsNamespace;
|
|
44210
44401
|
Handlebars.registerHelper('JSONstringify', function(value) {
|
|
44211
44402
|
return JSON.stringify(value);
|
|
@@ -45768,12 +45959,12 @@ var identifiers$1 = {
|
|
|
45768
45959
|
rcompareIdentifiers: rcompareIdentifiers
|
|
45769
45960
|
};
|
|
45770
45961
|
|
|
45771
|
-
function _class_call_check
|
|
45962
|
+
function _class_call_check(instance, Constructor) {
|
|
45772
45963
|
if (!(instance instanceof Constructor)) {
|
|
45773
45964
|
throw new TypeError("Cannot call a class as a function");
|
|
45774
45965
|
}
|
|
45775
45966
|
}
|
|
45776
|
-
function _defineProperties
|
|
45967
|
+
function _defineProperties(target, props) {
|
|
45777
45968
|
for(var i = 0; i < props.length; i++){
|
|
45778
45969
|
var descriptor = props[i];
|
|
45779
45970
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -45782,8 +45973,8 @@ function _defineProperties$1(target, props) {
|
|
|
45782
45973
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
45783
45974
|
}
|
|
45784
45975
|
}
|
|
45785
|
-
function _create_class
|
|
45786
|
-
if (protoProps) _defineProperties
|
|
45976
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
45977
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
45787
45978
|
return Constructor;
|
|
45788
45979
|
}
|
|
45789
45980
|
function _instanceof$6(left, right) {
|
|
@@ -45804,7 +45995,7 @@ var parseOptions = parseOptions_1;
|
|
|
45804
45995
|
var compareIdentifiers = identifiers$1.compareIdentifiers;
|
|
45805
45996
|
var SemVer$d = /*#__PURE__*/ function() {
|
|
45806
45997
|
function SemVer(version, options) {
|
|
45807
|
-
_class_call_check
|
|
45998
|
+
_class_call_check(this, SemVer);
|
|
45808
45999
|
options = parseOptions(options);
|
|
45809
46000
|
if (_instanceof$6(version, SemVer)) {
|
|
45810
46001
|
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
|
@@ -45859,7 +46050,7 @@ var SemVer$d = /*#__PURE__*/ function() {
|
|
|
45859
46050
|
this.build = m[5] ? m[5].split('.') : [];
|
|
45860
46051
|
this.format();
|
|
45861
46052
|
}
|
|
45862
|
-
_create_class
|
|
46053
|
+
_create_class(SemVer, [
|
|
45863
46054
|
{
|
|
45864
46055
|
key: "format",
|
|
45865
46056
|
value: function format() {
|
|
@@ -46440,70 +46631,78 @@ var coerce$1 = function(version, options) {
|
|
|
46440
46631
|
};
|
|
46441
46632
|
var coerce_1 = coerce$1;
|
|
46442
46633
|
|
|
46443
|
-
|
|
46444
|
-
|
|
46445
|
-
|
|
46446
|
-
|
|
46447
|
-
|
|
46448
|
-
|
|
46449
|
-
|
|
46450
|
-
|
|
46451
|
-
|
|
46452
|
-
|
|
46453
|
-
|
|
46454
|
-
|
|
46455
|
-
|
|
46456
|
-
|
|
46457
|
-
|
|
46458
|
-
|
|
46459
|
-
|
|
46634
|
+
var lrucache;
|
|
46635
|
+
var hasRequiredLrucache;
|
|
46636
|
+
|
|
46637
|
+
function requireLrucache () {
|
|
46638
|
+
if (hasRequiredLrucache) return lrucache;
|
|
46639
|
+
hasRequiredLrucache = 1;
|
|
46640
|
+
function _class_call_check(instance, Constructor) {
|
|
46641
|
+
if (!(instance instanceof Constructor)) {
|
|
46642
|
+
throw new TypeError("Cannot call a class as a function");
|
|
46643
|
+
}
|
|
46644
|
+
}
|
|
46645
|
+
function _defineProperties(target, props) {
|
|
46646
|
+
for(var i = 0; i < props.length; i++){
|
|
46647
|
+
var descriptor = props[i];
|
|
46648
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
46649
|
+
descriptor.configurable = true;
|
|
46650
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
46651
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
46652
|
+
}
|
|
46653
|
+
}
|
|
46654
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
46655
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
46656
|
+
return Constructor;
|
|
46657
|
+
}
|
|
46658
|
+
var LRUCache = /*#__PURE__*/ function() {
|
|
46659
|
+
function LRUCache() {
|
|
46660
|
+
_class_call_check(this, LRUCache);
|
|
46661
|
+
this.max = 1000;
|
|
46662
|
+
this.map = new Map();
|
|
46663
|
+
}
|
|
46664
|
+
_create_class(LRUCache, [
|
|
46665
|
+
{
|
|
46666
|
+
key: "get",
|
|
46667
|
+
value: function get(key) {
|
|
46668
|
+
var value = this.map.get(key);
|
|
46669
|
+
if (value === undefined) {
|
|
46670
|
+
return undefined;
|
|
46671
|
+
} else {
|
|
46672
|
+
// Remove the key from the map and add it to the end
|
|
46673
|
+
this.map.delete(key);
|
|
46674
|
+
this.map.set(key, value);
|
|
46675
|
+
return value;
|
|
46676
|
+
}
|
|
46677
|
+
}
|
|
46678
|
+
},
|
|
46679
|
+
{
|
|
46680
|
+
key: "delete",
|
|
46681
|
+
value: function _delete(key) {
|
|
46682
|
+
return this.map.delete(key);
|
|
46683
|
+
}
|
|
46684
|
+
},
|
|
46685
|
+
{
|
|
46686
|
+
key: "set",
|
|
46687
|
+
value: function set(key, value) {
|
|
46688
|
+
var deleted = this.delete(key);
|
|
46689
|
+
if (!deleted && value !== undefined) {
|
|
46690
|
+
// If cache is full, delete the least recently used item
|
|
46691
|
+
if (this.map.size >= this.max) {
|
|
46692
|
+
var firstKey = this.map.keys().next().value;
|
|
46693
|
+
this.delete(firstKey);
|
|
46694
|
+
}
|
|
46695
|
+
this.map.set(key, value);
|
|
46696
|
+
}
|
|
46697
|
+
return this;
|
|
46698
|
+
}
|
|
46699
|
+
}
|
|
46700
|
+
]);
|
|
46701
|
+
return LRUCache;
|
|
46702
|
+
}();
|
|
46703
|
+
lrucache = LRUCache;
|
|
46704
|
+
return lrucache;
|
|
46460
46705
|
}
|
|
46461
|
-
var LRUCache = /*#__PURE__*/ function() {
|
|
46462
|
-
function LRUCache() {
|
|
46463
|
-
_class_call_check(this, LRUCache);
|
|
46464
|
-
this.max = 1000;
|
|
46465
|
-
this.map = new Map();
|
|
46466
|
-
}
|
|
46467
|
-
_create_class(LRUCache, [
|
|
46468
|
-
{
|
|
46469
|
-
key: "get",
|
|
46470
|
-
value: function get(key) {
|
|
46471
|
-
var value = this.map.get(key);
|
|
46472
|
-
if (value === undefined) {
|
|
46473
|
-
return undefined;
|
|
46474
|
-
} else {
|
|
46475
|
-
// Remove the key from the map and add it to the end
|
|
46476
|
-
this.map.delete(key);
|
|
46477
|
-
this.map.set(key, value);
|
|
46478
|
-
return value;
|
|
46479
|
-
}
|
|
46480
|
-
}
|
|
46481
|
-
},
|
|
46482
|
-
{
|
|
46483
|
-
key: "delete",
|
|
46484
|
-
value: function _delete(key) {
|
|
46485
|
-
return this.map.delete(key);
|
|
46486
|
-
}
|
|
46487
|
-
},
|
|
46488
|
-
{
|
|
46489
|
-
key: "set",
|
|
46490
|
-
value: function set(key, value) {
|
|
46491
|
-
var deleted = this.delete(key);
|
|
46492
|
-
if (!deleted && value !== undefined) {
|
|
46493
|
-
// If cache is full, delete the least recently used item
|
|
46494
|
-
if (this.map.size >= this.max) {
|
|
46495
|
-
var firstKey = this.map.keys().next().value;
|
|
46496
|
-
this.delete(firstKey);
|
|
46497
|
-
}
|
|
46498
|
-
this.map.set(key, value);
|
|
46499
|
-
}
|
|
46500
|
-
return this;
|
|
46501
|
-
}
|
|
46502
|
-
}
|
|
46503
|
-
]);
|
|
46504
|
-
return LRUCache;
|
|
46505
|
-
}();
|
|
46506
|
-
var lrucache = LRUCache;
|
|
46507
46706
|
|
|
46508
46707
|
var range;
|
|
46509
46708
|
var hasRequiredRange;
|
|
@@ -46807,7 +47006,7 @@ function requireRange () {
|
|
|
46807
47006
|
return Range;
|
|
46808
47007
|
}();
|
|
46809
47008
|
range = Range;
|
|
46810
|
-
var LRU =
|
|
47009
|
+
var LRU = requireLrucache();
|
|
46811
47010
|
var cache = new LRU();
|
|
46812
47011
|
var parseOptions = parseOptions_1;
|
|
46813
47012
|
var Comparator = requireComparator();
|