@digipair/skill-canvas 0.117.6 → 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 +289 -94
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -8192,7 +8192,7 @@ function _create_class$v(Constructor, protoProps, staticProps) {
|
|
|
8192
8192
|
if (staticProps) _defineProperties$v(Constructor, staticProps);
|
|
8193
8193
|
return Constructor;
|
|
8194
8194
|
}
|
|
8195
|
-
function _define_property$
|
|
8195
|
+
function _define_property$5(obj, key, value) {
|
|
8196
8196
|
if (key in obj) {
|
|
8197
8197
|
Object.defineProperty(obj, key, {
|
|
8198
8198
|
value: value,
|
|
@@ -8267,7 +8267,7 @@ function _non_iterable_rest$5() {
|
|
|
8267
8267
|
function _non_iterable_spread$6() {
|
|
8268
8268
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8269
8269
|
}
|
|
8270
|
-
function _object_spread$
|
|
8270
|
+
function _object_spread$3(target) {
|
|
8271
8271
|
for(var i = 1; i < arguments.length; i++){
|
|
8272
8272
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
8273
8273
|
var ownKeys = Object.keys(source);
|
|
@@ -8277,12 +8277,12 @@ function _object_spread$2(target) {
|
|
|
8277
8277
|
}));
|
|
8278
8278
|
}
|
|
8279
8279
|
ownKeys.forEach(function(key) {
|
|
8280
|
-
_define_property$
|
|
8280
|
+
_define_property$5(target, key, source[key]);
|
|
8281
8281
|
});
|
|
8282
8282
|
}
|
|
8283
8283
|
return target;
|
|
8284
8284
|
}
|
|
8285
|
-
function ownKeys$
|
|
8285
|
+
function ownKeys$2(object, enumerableOnly) {
|
|
8286
8286
|
var keys = Object.keys(object);
|
|
8287
8287
|
if (Object.getOwnPropertySymbols) {
|
|
8288
8288
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -8290,12 +8290,12 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
8290
8290
|
}
|
|
8291
8291
|
return keys;
|
|
8292
8292
|
}
|
|
8293
|
-
function _object_spread_props$
|
|
8293
|
+
function _object_spread_props$2(target, source) {
|
|
8294
8294
|
source = source != null ? source : {};
|
|
8295
8295
|
if (Object.getOwnPropertyDescriptors) {
|
|
8296
8296
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
8297
8297
|
} else {
|
|
8298
|
-
ownKeys$
|
|
8298
|
+
ownKeys$2(Object(source)).forEach(function(key) {
|
|
8299
8299
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
8300
8300
|
});
|
|
8301
8301
|
}
|
|
@@ -9166,7 +9166,7 @@ function getCachedWeekInfo(locString) {
|
|
|
9166
9166
|
data = "getWeekInfo" in locale ? locale.getWeekInfo() : locale.weekInfo;
|
|
9167
9167
|
// minimalDays was removed from WeekInfo: https://github.com/tc39/proposal-intl-locale-info/issues/86
|
|
9168
9168
|
if (!("minimalDays" in data)) {
|
|
9169
|
-
data = _object_spread$
|
|
9169
|
+
data = _object_spread$3({}, fallbackWeekSettings, data);
|
|
9170
9170
|
}
|
|
9171
9171
|
weekInfoCache.set(locString, data);
|
|
9172
9172
|
}
|
|
@@ -9273,7 +9273,7 @@ function supportsFastNumbers(loc) {
|
|
|
9273
9273
|
"floor"
|
|
9274
9274
|
]);
|
|
9275
9275
|
if (!forceSimple || Object.keys(otherOpts).length > 0) {
|
|
9276
|
-
var intlOpts = _object_spread$
|
|
9276
|
+
var intlOpts = _object_spread$3({
|
|
9277
9277
|
useGrouping: false
|
|
9278
9278
|
}, opts);
|
|
9279
9279
|
if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;
|
|
@@ -9343,7 +9343,7 @@ function supportsFastNumbers(loc) {
|
|
|
9343
9343
|
});
|
|
9344
9344
|
this.originalZone = dt.zone;
|
|
9345
9345
|
}
|
|
9346
|
-
var intlOpts = _object_spread$
|
|
9346
|
+
var intlOpts = _object_spread$3({}, this.opts);
|
|
9347
9347
|
intlOpts.timeZone = intlOpts.timeZone || z;
|
|
9348
9348
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
9349
9349
|
}
|
|
@@ -9374,7 +9374,7 @@ function supportsFastNumbers(loc) {
|
|
|
9374
9374
|
locale: _this.dt.locale,
|
|
9375
9375
|
format: _this.opts.timeZoneName
|
|
9376
9376
|
});
|
|
9377
|
-
return _object_spread_props$
|
|
9377
|
+
return _object_spread_props$2(_object_spread$3({}, part), {
|
|
9378
9378
|
value: offsetName
|
|
9379
9379
|
});
|
|
9380
9380
|
} else {
|
|
@@ -9399,7 +9399,7 @@ function supportsFastNumbers(loc) {
|
|
|
9399
9399
|
*/ var PolyRelFormatter = /*#__PURE__*/ function() {
|
|
9400
9400
|
function PolyRelFormatter(intl, isEnglish, opts) {
|
|
9401
9401
|
_class_call_check$A(this, PolyRelFormatter);
|
|
9402
|
-
this.opts = _object_spread$
|
|
9402
|
+
this.opts = _object_spread$3({
|
|
9403
9403
|
style: "long"
|
|
9404
9404
|
}, opts);
|
|
9405
9405
|
if (!isEnglish && hasRelative()) {
|
|
@@ -9494,7 +9494,7 @@ var fallbackWeekSettings = {
|
|
|
9494
9494
|
key: "redefaultToEN",
|
|
9495
9495
|
value: function redefaultToEN() {
|
|
9496
9496
|
var alts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9497
|
-
return this.clone(_object_spread_props$
|
|
9497
|
+
return this.clone(_object_spread_props$2(_object_spread$3({}, alts), {
|
|
9498
9498
|
defaultToEN: true
|
|
9499
9499
|
}));
|
|
9500
9500
|
}
|
|
@@ -9503,7 +9503,7 @@ var fallbackWeekSettings = {
|
|
|
9503
9503
|
key: "redefaultToSystem",
|
|
9504
9504
|
value: function redefaultToSystem() {
|
|
9505
9505
|
var alts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9506
|
-
return this.clone(_object_spread_props$
|
|
9506
|
+
return this.clone(_object_spread_props$2(_object_spread$3({}, alts), {
|
|
9507
9507
|
defaultToEN: false
|
|
9508
9508
|
}));
|
|
9509
9509
|
}
|
|
@@ -10382,7 +10382,7 @@ function isoWeekdayToLocal(isoWeekday, startOfWeek) {
|
|
|
10382
10382
|
} else {
|
|
10383
10383
|
weekYear = year;
|
|
10384
10384
|
}
|
|
10385
|
-
return _object_spread$
|
|
10385
|
+
return _object_spread$3({
|
|
10386
10386
|
weekYear: weekYear,
|
|
10387
10387
|
weekNumber: weekNumber,
|
|
10388
10388
|
weekday: weekday
|
|
@@ -10402,7 +10402,7 @@ function weekToGregorian(weekData) {
|
|
|
10402
10402
|
year = weekYear;
|
|
10403
10403
|
}
|
|
10404
10404
|
var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), month = _uncomputeOrdinal.month, day = _uncomputeOrdinal.day;
|
|
10405
|
-
return _object_spread$
|
|
10405
|
+
return _object_spread$3({
|
|
10406
10406
|
year: year,
|
|
10407
10407
|
month: month,
|
|
10408
10408
|
day: day
|
|
@@ -10411,7 +10411,7 @@ function weekToGregorian(weekData) {
|
|
|
10411
10411
|
function gregorianToOrdinal(gregData) {
|
|
10412
10412
|
var year = gregData.year, month = gregData.month, day = gregData.day;
|
|
10413
10413
|
var ordinal = computeOrdinal(year, month, day);
|
|
10414
|
-
return _object_spread$
|
|
10414
|
+
return _object_spread$3({
|
|
10415
10415
|
year: year,
|
|
10416
10416
|
ordinal: ordinal
|
|
10417
10417
|
}, timeObject(gregData));
|
|
@@ -10419,7 +10419,7 @@ function gregorianToOrdinal(gregData) {
|
|
|
10419
10419
|
function ordinalToGregorian(ordinalData) {
|
|
10420
10420
|
var year = ordinalData.year, ordinal = ordinalData.ordinal;
|
|
10421
10421
|
var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), month = _uncomputeOrdinal.month, day = _uncomputeOrdinal.day;
|
|
10422
|
-
return _object_spread$
|
|
10422
|
+
return _object_spread$3({
|
|
10423
10423
|
year: year,
|
|
10424
10424
|
month: month,
|
|
10425
10425
|
day: day
|
|
@@ -10715,7 +10715,7 @@ function parseZoneInfo(ts, offsetFormat, locale) {
|
|
|
10715
10715
|
if (timeZone) {
|
|
10716
10716
|
intlOpts.timeZone = timeZone;
|
|
10717
10717
|
}
|
|
10718
|
-
var modified = _object_spread$
|
|
10718
|
+
var modified = _object_spread$3({
|
|
10719
10719
|
timeZoneName: offsetFormat
|
|
10720
10720
|
}, intlOpts);
|
|
10721
10721
|
var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function(m) {
|
|
@@ -11074,7 +11074,7 @@ var macroTokenToFormatOpts = {
|
|
|
11074
11074
|
if (this.systemLoc === null) {
|
|
11075
11075
|
this.systemLoc = this.loc.redefaultToSystem();
|
|
11076
11076
|
}
|
|
11077
|
-
var df = this.systemLoc.dtFormatter(dt, _object_spread$
|
|
11077
|
+
var df = this.systemLoc.dtFormatter(dt, _object_spread$3({}, this.opts, opts));
|
|
11078
11078
|
return df.format();
|
|
11079
11079
|
}
|
|
11080
11080
|
},
|
|
@@ -11082,7 +11082,7 @@ var macroTokenToFormatOpts = {
|
|
|
11082
11082
|
key: "dtFormatter",
|
|
11083
11083
|
value: function dtFormatter(dt) {
|
|
11084
11084
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11085
|
-
return this.loc.dtFormatter(dt, _object_spread$
|
|
11085
|
+
return this.loc.dtFormatter(dt, _object_spread$3({}, this.opts, opts));
|
|
11086
11086
|
}
|
|
11087
11087
|
},
|
|
11088
11088
|
{
|
|
@@ -11118,7 +11118,7 @@ var macroTokenToFormatOpts = {
|
|
|
11118
11118
|
if (this.opts.forceSimple) {
|
|
11119
11119
|
return padStart(n, p);
|
|
11120
11120
|
}
|
|
11121
|
-
var opts = _object_spread$
|
|
11121
|
+
var opts = _object_spread$3({}, this.opts);
|
|
11122
11122
|
if (p > 0) {
|
|
11123
11123
|
opts.padTo = p;
|
|
11124
11124
|
}
|
|
@@ -11534,7 +11534,7 @@ function combineExtractors() {
|
|
|
11534
11534
|
var _param = _sliced_to_array$5(param, 3), mergedVals = _param[0], mergedZone = _param[1], cursor = _param[2];
|
|
11535
11535
|
var _ex = _sliced_to_array$5(ex(m, cursor), 3), val = _ex[0], zone = _ex[1], next = _ex[2];
|
|
11536
11536
|
return [
|
|
11537
|
-
_object_spread$
|
|
11537
|
+
_object_spread$3({}, mergedVals, val),
|
|
11538
11538
|
zone || mergedZone,
|
|
11539
11539
|
next
|
|
11540
11540
|
];
|
|
@@ -11845,7 +11845,7 @@ var lowOrderMatrix = {
|
|
|
11845
11845
|
seconds: {
|
|
11846
11846
|
milliseconds: 1000
|
|
11847
11847
|
}
|
|
11848
|
-
}, casualMatrix = _object_spread$
|
|
11848
|
+
}, casualMatrix = _object_spread$3({
|
|
11849
11849
|
years: {
|
|
11850
11850
|
quarters: 4,
|
|
11851
11851
|
months: 12,
|
|
@@ -11873,7 +11873,7 @@ var lowOrderMatrix = {
|
|
|
11873
11873
|
seconds: 30 * 24 * 60 * 60,
|
|
11874
11874
|
milliseconds: 30 * 24 * 60 * 60 * 1000
|
|
11875
11875
|
}
|
|
11876
|
-
}, lowOrderMatrix), daysInYearAccurate = 146097.0 / 400, daysInMonthAccurate = 146097.0 / 4800, accurateMatrix = _object_spread$
|
|
11876
|
+
}, lowOrderMatrix), daysInYearAccurate = 146097.0 / 400, daysInMonthAccurate = 146097.0 / 4800, accurateMatrix = _object_spread$3({
|
|
11877
11877
|
years: {
|
|
11878
11878
|
quarters: 4,
|
|
11879
11879
|
months: 12,
|
|
@@ -11920,7 +11920,7 @@ function clone$1(dur, alts) {
|
|
|
11920
11920
|
var clear = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
11921
11921
|
// deep merge for vals
|
|
11922
11922
|
var conf = {
|
|
11923
|
-
values: clear ? alts.values : _object_spread$
|
|
11923
|
+
values: clear ? alts.values : _object_spread$3({}, dur.values, alts.values || {}),
|
|
11924
11924
|
loc: dur.loc.clone(alts.loc),
|
|
11925
11925
|
conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,
|
|
11926
11926
|
matrix: alts.matrix || dur.matrix
|
|
@@ -12119,7 +12119,7 @@ function removeZeroes(vals) {
|
|
|
12119
12119
|
value: function toFormat(fmt) {
|
|
12120
12120
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
12121
12121
|
// reverse-compat since 1.2; we always round down now, never up, and we do it by default
|
|
12122
|
-
var fmtOpts = _object_spread_props$
|
|
12122
|
+
var fmtOpts = _object_spread_props$2(_object_spread$3({}, opts), {
|
|
12123
12123
|
floor: opts.round !== false && opts.floor !== false
|
|
12124
12124
|
});
|
|
12125
12125
|
return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;
|
|
@@ -12152,7 +12152,7 @@ function removeZeroes(vals) {
|
|
|
12152
12152
|
if (isUndefined$2(val) || val === 0 && !showZeros) {
|
|
12153
12153
|
return null;
|
|
12154
12154
|
}
|
|
12155
|
-
return _this.loc.numberFormatter(_object_spread_props$
|
|
12155
|
+
return _this.loc.numberFormatter(_object_spread_props$2(_object_spread$3({
|
|
12156
12156
|
style: "unit",
|
|
12157
12157
|
unitDisplay: "long"
|
|
12158
12158
|
}, opts), {
|
|
@@ -12161,7 +12161,7 @@ function removeZeroes(vals) {
|
|
|
12161
12161
|
}).filter(function(n) {
|
|
12162
12162
|
return n;
|
|
12163
12163
|
});
|
|
12164
|
-
return this.loc.listFormatter(_object_spread$
|
|
12164
|
+
return this.loc.listFormatter(_object_spread$3({
|
|
12165
12165
|
type: "conjunction",
|
|
12166
12166
|
style: opts.listStyle || "narrow"
|
|
12167
12167
|
}, opts)).format(l);
|
|
@@ -12175,7 +12175,7 @@ function removeZeroes(vals) {
|
|
|
12175
12175
|
*/ key: "toObject",
|
|
12176
12176
|
value: function toObject() {
|
|
12177
12177
|
if (!this.isValid) return {};
|
|
12178
|
-
return _object_spread$
|
|
12178
|
+
return _object_spread$3({}, this.values);
|
|
12179
12179
|
}
|
|
12180
12180
|
},
|
|
12181
12181
|
{
|
|
@@ -12228,7 +12228,7 @@ function removeZeroes(vals) {
|
|
|
12228
12228
|
if (!this.isValid) return null;
|
|
12229
12229
|
var millis = this.toMillis();
|
|
12230
12230
|
if (millis < 0 || millis >= 86400000) return null;
|
|
12231
|
-
opts = _object_spread_props$
|
|
12231
|
+
opts = _object_spread_props$2(_object_spread$3({
|
|
12232
12232
|
suppressMilliseconds: false,
|
|
12233
12233
|
suppressSeconds: false,
|
|
12234
12234
|
includePrefix: false,
|
|
@@ -12399,7 +12399,7 @@ function removeZeroes(vals) {
|
|
|
12399
12399
|
*/ key: "set",
|
|
12400
12400
|
value: function set(values) {
|
|
12401
12401
|
if (!this.isValid) return this;
|
|
12402
|
-
var mixed = _object_spread$
|
|
12402
|
+
var mixed = _object_spread$3({}, this.values, normalizeObject(values, Duration.normalizeUnit));
|
|
12403
12403
|
return clone$1(this, {
|
|
12404
12404
|
values: mixed
|
|
12405
12405
|
});
|
|
@@ -14010,7 +14010,7 @@ function diff(earlier, later, units, opts) {
|
|
|
14010
14010
|
});
|
|
14011
14011
|
if (lowerOrderUnits.length === 0) {
|
|
14012
14012
|
if (highWater < later) {
|
|
14013
|
-
highWater = cursor.plus(_define_property$
|
|
14013
|
+
highWater = cursor.plus(_define_property$5({}, lowestOrder, 1));
|
|
14014
14014
|
}
|
|
14015
14015
|
if (highWater !== cursor) {
|
|
14016
14016
|
results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
|
|
@@ -14570,7 +14570,7 @@ function clone$2(inst, alts) {
|
|
|
14570
14570
|
loc: inst.loc,
|
|
14571
14571
|
invalid: inst.invalid
|
|
14572
14572
|
};
|
|
14573
|
-
return new DateTime(_object_spread_props$
|
|
14573
|
+
return new DateTime(_object_spread_props$2(_object_spread$3({}, current, alts), {
|
|
14574
14574
|
old: current
|
|
14575
14575
|
}));
|
|
14576
14576
|
}
|
|
@@ -14624,7 +14624,7 @@ function objToTS(obj, offset, zone) {
|
|
|
14624
14624
|
}
|
|
14625
14625
|
// create a new DT instance by adding a duration, adjusting for DSTs
|
|
14626
14626
|
function adjustTime(inst, dur) {
|
|
14627
|
-
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$
|
|
14627
|
+
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), {
|
|
14628
14628
|
year: year,
|
|
14629
14629
|
month: month,
|
|
14630
14630
|
day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7
|
|
@@ -14655,7 +14655,7 @@ function adjustTime(inst, dur) {
|
|
|
14655
14655
|
function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {
|
|
14656
14656
|
var setZone = opts.setZone, zone = opts.zone;
|
|
14657
14657
|
if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {
|
|
14658
|
-
var interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, _object_spread_props$
|
|
14658
|
+
var interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, _object_spread_props$2(_object_spread$3({}, opts), {
|
|
14659
14659
|
zone: interpretationZone,
|
|
14660
14660
|
specificOffset: specificOffset
|
|
14661
14661
|
}));
|
|
@@ -15675,11 +15675,11 @@ function lastOpts(argList) {
|
|
|
15675
15675
|
}
|
|
15676
15676
|
var mixed;
|
|
15677
15677
|
if (settingWeekStuff) {
|
|
15678
|
-
mixed = weekToGregorian(_object_spread$
|
|
15678
|
+
mixed = weekToGregorian(_object_spread$3({}, gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), normalized), minDaysInFirstWeek, startOfWeek);
|
|
15679
15679
|
} else if (!isUndefined$2(normalized.ordinal)) {
|
|
15680
|
-
mixed = ordinalToGregorian(_object_spread$
|
|
15680
|
+
mixed = ordinalToGregorian(_object_spread$3({}, gregorianToOrdinal(this.c), normalized));
|
|
15681
15681
|
} else {
|
|
15682
|
-
mixed = _object_spread$
|
|
15682
|
+
mixed = _object_spread$3({}, this.toObject(), normalized);
|
|
15683
15683
|
// if we didn't set the day but we ended up on an overflow date,
|
|
15684
15684
|
// use the last day of the right month
|
|
15685
15685
|
if (isUndefined$2(normalized.day)) {
|
|
@@ -15798,7 +15798,7 @@ function lastOpts(argList) {
|
|
|
15798
15798
|
* @return {DateTime}
|
|
15799
15799
|
*/ key: "endOf",
|
|
15800
15800
|
value: function endOf(unit, opts) {
|
|
15801
|
-
return this.isValid ? this.plus(_define_property$
|
|
15801
|
+
return this.isValid ? this.plus(_define_property$5({}, unit, 1)).startOf(unit, opts).minus(1) : this;
|
|
15802
15802
|
}
|
|
15803
15803
|
},
|
|
15804
15804
|
{
|
|
@@ -16126,7 +16126,7 @@ function lastOpts(argList) {
|
|
|
16126
16126
|
value: function toObject() {
|
|
16127
16127
|
var opts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
16128
16128
|
if (!this.isValid) return {};
|
|
16129
|
-
var base = _object_spread$
|
|
16129
|
+
var base = _object_spread$3({}, this.c);
|
|
16130
16130
|
if (opts.includeConfig) {
|
|
16131
16131
|
base.outputCalendar = this.outputCalendar;
|
|
16132
16132
|
base.numberingSystem = this.loc.numberingSystem;
|
|
@@ -16166,7 +16166,7 @@ function lastOpts(argList) {
|
|
|
16166
16166
|
if (!this.isValid || !otherDateTime.isValid) {
|
|
16167
16167
|
return Duration.invalid("created by diffing an invalid DateTime");
|
|
16168
16168
|
}
|
|
16169
|
-
var durOpts = _object_spread$
|
|
16169
|
+
var durOpts = _object_spread$3({
|
|
16170
16170
|
locale: this.locale,
|
|
16171
16171
|
numberingSystem: this.numberingSystem
|
|
16172
16172
|
}, opts);
|
|
@@ -16270,7 +16270,7 @@ function lastOpts(argList) {
|
|
|
16270
16270
|
units = options.unit;
|
|
16271
16271
|
unit = undefined;
|
|
16272
16272
|
}
|
|
16273
|
-
return diffRelative(base, this.plus(padding), _object_spread_props$
|
|
16273
|
+
return diffRelative(base, this.plus(padding), _object_spread_props$2(_object_spread$3({}, options), {
|
|
16274
16274
|
numeric: "always",
|
|
16275
16275
|
units: units,
|
|
16276
16276
|
unit: unit
|
|
@@ -16296,7 +16296,7 @@ function lastOpts(argList) {
|
|
|
16296
16296
|
if (!this.isValid) return null;
|
|
16297
16297
|
return diffRelative(options.base || DateTime.fromObject({}, {
|
|
16298
16298
|
zone: this.zone
|
|
16299
|
-
}), this, _object_spread_props$
|
|
16299
|
+
}), this, _object_spread_props$2(_object_spread$3({}, options), {
|
|
16300
16300
|
numeric: "auto",
|
|
16301
16301
|
units: [
|
|
16302
16302
|
"years",
|
|
@@ -22564,7 +22564,7 @@ function _create_class$r(Constructor, protoProps, staticProps) {
|
|
|
22564
22564
|
if (staticProps) _defineProperties$r(Constructor, staticProps);
|
|
22565
22565
|
return Constructor;
|
|
22566
22566
|
}
|
|
22567
|
-
function _define_property$
|
|
22567
|
+
function _define_property$4(obj, key, value) {
|
|
22568
22568
|
if (key in obj) {
|
|
22569
22569
|
Object.defineProperty(obj, key, {
|
|
22570
22570
|
value: value,
|
|
@@ -22617,7 +22617,7 @@ function _non_iterable_rest$2() {
|
|
|
22617
22617
|
function _non_iterable_spread$4() {
|
|
22618
22618
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22619
22619
|
}
|
|
22620
|
-
function _object_spread$
|
|
22620
|
+
function _object_spread$2(target) {
|
|
22621
22621
|
for(var i = 1; i < arguments.length; i++){
|
|
22622
22622
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
22623
22623
|
var ownKeys = Object.keys(source);
|
|
@@ -22627,12 +22627,12 @@ function _object_spread$1(target) {
|
|
|
22627
22627
|
}));
|
|
22628
22628
|
}
|
|
22629
22629
|
ownKeys.forEach(function(key) {
|
|
22630
|
-
_define_property$
|
|
22630
|
+
_define_property$4(target, key, source[key]);
|
|
22631
22631
|
});
|
|
22632
22632
|
}
|
|
22633
22633
|
return target;
|
|
22634
22634
|
}
|
|
22635
|
-
function ownKeys(object, enumerableOnly) {
|
|
22635
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
22636
22636
|
var keys = Object.keys(object);
|
|
22637
22637
|
if (Object.getOwnPropertySymbols) {
|
|
22638
22638
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -22640,12 +22640,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
22640
22640
|
}
|
|
22641
22641
|
return keys;
|
|
22642
22642
|
}
|
|
22643
|
-
function _object_spread_props(target, source) {
|
|
22643
|
+
function _object_spread_props$1(target, source) {
|
|
22644
22644
|
source = source != null ? source : {};
|
|
22645
22645
|
if (Object.getOwnPropertyDescriptors) {
|
|
22646
22646
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
22647
22647
|
} else {
|
|
22648
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
22648
|
+
ownKeys$1(Object(source)).forEach(function(key) {
|
|
22649
22649
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
22650
22650
|
});
|
|
22651
22651
|
}
|
|
@@ -22838,14 +22838,14 @@ function indent(str, spaces) {
|
|
|
22838
22838
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
22839
22839
|
// match is required
|
|
22840
22840
|
if (!match) {
|
|
22841
|
-
return
|
|
22841
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
22842
22842
|
v: nextMatch1
|
|
22843
22843
|
};
|
|
22844
22844
|
}
|
|
22845
22845
|
var token = match.token, offset = match.offset;
|
|
22846
22846
|
i1 += offset;
|
|
22847
22847
|
if (token === ' ') {
|
|
22848
|
-
return
|
|
22848
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22849
22849
|
}
|
|
22850
22850
|
tokens1 = _to_consumable_array$4(tokens1).concat([
|
|
22851
22851
|
token
|
|
@@ -22864,7 +22864,7 @@ function indent(str, spaces) {
|
|
|
22864
22864
|
if (contextKeys.some(function(el) {
|
|
22865
22865
|
return el.startsWith(name);
|
|
22866
22866
|
})) {
|
|
22867
|
-
return
|
|
22867
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22868
22868
|
}
|
|
22869
22869
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22870
22870
|
return el === name;
|
|
@@ -22883,9 +22883,9 @@ function indent(str, spaces) {
|
|
|
22883
22883
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22884
22884
|
return el.startsWith(name);
|
|
22885
22885
|
})) {
|
|
22886
|
-
return
|
|
22886
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
22887
22887
|
}
|
|
22888
|
-
return
|
|
22888
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
22889
22889
|
v: nextMatch1
|
|
22890
22890
|
};
|
|
22891
22891
|
};
|
|
@@ -22897,7 +22897,7 @@ function indent(str, spaces) {
|
|
|
22897
22897
|
}
|
|
22898
22898
|
}
|
|
22899
22899
|
var _obj;
|
|
22900
|
-
var identifiersMap = (_obj = {}, _define_property$
|
|
22900
|
+
var identifiersMap = (_obj = {}, _define_property$4(_obj, identifier, 'identifier'), _define_property$4(_obj, nameIdentifier, 'nameIdentifier'), _obj);
|
|
22901
22901
|
var identifiers = new ExternalTokenizer(function(input, stack) {
|
|
22902
22902
|
LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
22903
22903
|
var nameMatch = parseName(input, stack.context);
|
|
@@ -22946,11 +22946,11 @@ var insertSemicolon = new ExternalTokenizer(function(input, stack) {
|
|
|
22946
22946
|
}
|
|
22947
22947
|
});
|
|
22948
22948
|
var _obj1;
|
|
22949
|
-
var prefixedContextStarts = (_obj1 = {}, _define_property$
|
|
22949
|
+
var prefixedContextStarts = (_obj1 = {}, _define_property$4(_obj1, functionInvocationStart, 'FunctionInvocation'), _define_property$4(_obj1, filterExpressionStart, 'FilterExpression'), _define_property$4(_obj1, pathExpressionStart, 'PathExpression'), _obj1);
|
|
22950
22950
|
var _obj2;
|
|
22951
|
-
var contextStarts = (_obj2 = {}, _define_property$
|
|
22951
|
+
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);
|
|
22952
22952
|
var _obj3;
|
|
22953
|
-
var contextEnds = (_obj3 = {}, _define_property$
|
|
22953
|
+
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);
|
|
22954
22954
|
/**
|
|
22955
22955
|
* A simple producer that retrievs a value from
|
|
22956
22956
|
* a given context. Used to lazily take things.
|
|
@@ -23038,7 +23038,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23038
23038
|
*/ key: "set",
|
|
23039
23039
|
value: function set(key, value) {
|
|
23040
23040
|
var constructor = /** @type { typeof VariableContext } */ this.constructor;
|
|
23041
|
-
return constructor.of(_object_spread_props(_object_spread$
|
|
23041
|
+
return constructor.of(_object_spread_props$1(_object_spread$2({}, this.value), _define_property$4({}, key, value)));
|
|
23042
23042
|
}
|
|
23043
23043
|
},
|
|
23044
23044
|
{
|
|
@@ -23102,7 +23102,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23102
23102
|
if ((typeof context === "undefined" ? "undefined" : _type_of$z(context)) !== 'object') {
|
|
23103
23103
|
return {};
|
|
23104
23104
|
}
|
|
23105
|
-
return _object_spread$
|
|
23105
|
+
return _object_spread$2({}, context);
|
|
23106
23106
|
}
|
|
23107
23107
|
},
|
|
23108
23108
|
{
|
|
@@ -23120,13 +23120,13 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23120
23120
|
return reduce$1(this.__unwrap(other), function(merged, value, key) {
|
|
23121
23121
|
if (_instanceof$f(value, ValueProducer)) {
|
|
23122
23122
|
// keep value producers in tact
|
|
23123
|
-
return _object_spread_props(_object_spread$
|
|
23123
|
+
return _object_spread_props$1(_object_spread$2({}, merged), _define_property$4({}, key, value));
|
|
23124
23124
|
}
|
|
23125
23125
|
value = _this.__unwrap(value);
|
|
23126
23126
|
if (has$2(merged, key)) {
|
|
23127
23127
|
value = _this.__merge(_this.__unwrap(merged[key]), value);
|
|
23128
23128
|
}
|
|
23129
|
-
return _object_spread_props(_object_spread$
|
|
23129
|
+
return _object_spread_props$1(_object_spread$2({}, merged), _define_property$4({}, key, value));
|
|
23130
23130
|
}, this.__unwrap(context));
|
|
23131
23131
|
}
|
|
23132
23132
|
}
|
|
@@ -23345,7 +23345,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23345
23345
|
*/ key: "assign",
|
|
23346
23346
|
value: function assign() {
|
|
23347
23347
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23348
|
-
return Variables.of(_object_spread$
|
|
23348
|
+
return Variables.of(_object_spread$2({}, this, options));
|
|
23349
23349
|
}
|
|
23350
23350
|
},
|
|
23351
23351
|
{
|
|
@@ -23360,7 +23360,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23360
23360
|
context: this.context,
|
|
23361
23361
|
parent: this.parent
|
|
23362
23362
|
};
|
|
23363
|
-
return Variables.of(_object_spread$
|
|
23363
|
+
return Variables.of(_object_spread$2({}, defaultOptions, options));
|
|
23364
23364
|
}
|
|
23365
23365
|
}
|
|
23366
23366
|
], [
|
|
@@ -23843,7 +23843,7 @@ function _create_class$q(Constructor, protoProps, staticProps) {
|
|
|
23843
23843
|
if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
|
|
23844
23844
|
return Constructor;
|
|
23845
23845
|
}
|
|
23846
|
-
function _define_property$
|
|
23846
|
+
function _define_property$3(obj, key, value) {
|
|
23847
23847
|
if (key in obj) {
|
|
23848
23848
|
Object.defineProperty(obj, key, {
|
|
23849
23849
|
value: value,
|
|
@@ -25150,7 +25150,7 @@ var builtins = {
|
|
|
25150
25150
|
if (key in context) {
|
|
25151
25151
|
return FALSE;
|
|
25152
25152
|
}
|
|
25153
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25153
|
+
return Object.assign(Object.assign({}, context), _define_property$3({}, entry.key, entry.value));
|
|
25154
25154
|
}, {});
|
|
25155
25155
|
if (context === FALSE) {
|
|
25156
25156
|
return null;
|
|
@@ -25203,7 +25203,7 @@ var builtins = {
|
|
|
25203
25203
|
return null;
|
|
25204
25204
|
}
|
|
25205
25205
|
}
|
|
25206
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25206
|
+
return Object.assign(Object.assign({}, context), _define_property$3({}, key, value));
|
|
25207
25207
|
}
|
|
25208
25208
|
function matches(a, b) {
|
|
25209
25209
|
return a === b;
|
|
@@ -25930,7 +25930,7 @@ function evalNode(node, input, args) {
|
|
|
25930
25930
|
return function(context) {
|
|
25931
25931
|
return args.slice(1, -1).reduce(function(obj, arg) {
|
|
25932
25932
|
var _arg = _sliced_to_array$1(arg(Object.assign(Object.assign({}, context), obj)), 2), key = _arg[0], value = _arg[1];
|
|
25933
|
-
return Object.assign(Object.assign({}, obj), _define_property$
|
|
25933
|
+
return Object.assign(Object.assign({}, obj), _define_property$3({}, key, value));
|
|
25934
25934
|
}, {});
|
|
25935
25935
|
};
|
|
25936
25936
|
case 'FunctionBody':
|
|
@@ -26427,7 +26427,7 @@ function extractValue(context, prop, _target) {
|
|
|
26427
26427
|
'range'
|
|
26428
26428
|
].includes(getType(target))) {
|
|
26429
26429
|
return target.map(function(t) {
|
|
26430
|
-
return _define_property$
|
|
26430
|
+
return _define_property$3({}, prop, t);
|
|
26431
26431
|
});
|
|
26432
26432
|
}
|
|
26433
26433
|
return null;
|
|
@@ -42891,7 +42891,7 @@ function _class_call_check$1(instance, Constructor) {
|
|
|
42891
42891
|
throw new TypeError("Cannot call a class as a function");
|
|
42892
42892
|
}
|
|
42893
42893
|
}
|
|
42894
|
-
function _define_property$
|
|
42894
|
+
function _define_property$2(obj, key, value) {
|
|
42895
42895
|
if (key in obj) {
|
|
42896
42896
|
Object.defineProperty(obj, key, {
|
|
42897
42897
|
value: value,
|
|
@@ -42971,7 +42971,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42971
42971
|
_class_call_check$1(this, CelParser);
|
|
42972
42972
|
var _this;
|
|
42973
42973
|
_this = _super.call(this, allTokens);
|
|
42974
|
-
_define_property$
|
|
42974
|
+
_define_property$2(_assert_this_initialized$1(_this), "expr", _this.RULE('expr', function() {
|
|
42975
42975
|
_this.SUBRULE(_this.conditionalOr, {
|
|
42976
42976
|
LABEL: 'conditionalOr'
|
|
42977
42977
|
});
|
|
@@ -42986,7 +42986,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42986
42986
|
});
|
|
42987
42987
|
});
|
|
42988
42988
|
}));
|
|
42989
|
-
_define_property$
|
|
42989
|
+
_define_property$2(_assert_this_initialized$1(_this), "conditionalAnd", _this.RULE('conditionalAnd', function() {
|
|
42990
42990
|
_this.SUBRULE(_this.relation, {
|
|
42991
42991
|
LABEL: 'lhs'
|
|
42992
42992
|
});
|
|
@@ -42997,7 +42997,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42997
42997
|
});
|
|
42998
42998
|
});
|
|
42999
42999
|
}));
|
|
43000
|
-
_define_property$
|
|
43000
|
+
_define_property$2(_assert_this_initialized$1(_this), "conditionalOr", _this.RULE('conditionalOr', function() {
|
|
43001
43001
|
_this.SUBRULE(_this.conditionalAnd, {
|
|
43002
43002
|
LABEL: 'lhs'
|
|
43003
43003
|
});
|
|
@@ -43008,7 +43008,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43008
43008
|
});
|
|
43009
43009
|
});
|
|
43010
43010
|
}));
|
|
43011
|
-
_define_property$
|
|
43011
|
+
_define_property$2(_assert_this_initialized$1(_this), "relation", _this.RULE('relation', function() {
|
|
43012
43012
|
_this.SUBRULE(_this.addition, {
|
|
43013
43013
|
LABEL: 'lhs'
|
|
43014
43014
|
});
|
|
@@ -43019,7 +43019,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43019
43019
|
});
|
|
43020
43020
|
});
|
|
43021
43021
|
}));
|
|
43022
|
-
_define_property$
|
|
43022
|
+
_define_property$2(_assert_this_initialized$1(_this), "addition", _this.RULE('addition', function() {
|
|
43023
43023
|
_this.SUBRULE(_this.multiplication, {
|
|
43024
43024
|
LABEL: 'lhs'
|
|
43025
43025
|
});
|
|
@@ -43030,7 +43030,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43030
43030
|
});
|
|
43031
43031
|
});
|
|
43032
43032
|
}));
|
|
43033
|
-
_define_property$
|
|
43033
|
+
_define_property$2(_assert_this_initialized$1(_this), "multiplication", _this.RULE('multiplication', function() {
|
|
43034
43034
|
_this.SUBRULE(_this.unaryExpression, {
|
|
43035
43035
|
LABEL: 'lhs'
|
|
43036
43036
|
});
|
|
@@ -43041,13 +43041,13 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43041
43041
|
});
|
|
43042
43042
|
});
|
|
43043
43043
|
}));
|
|
43044
|
-
_define_property$
|
|
43044
|
+
_define_property$2(_assert_this_initialized$1(_this), "unaryExpression", _this.RULE('unaryExpression', function() {
|
|
43045
43045
|
_this.MANY(function() {
|
|
43046
43046
|
_this.CONSUME(UnaryOperator);
|
|
43047
43047
|
});
|
|
43048
43048
|
_this.SUBRULE(_this.atomicExpression);
|
|
43049
43049
|
}));
|
|
43050
|
-
_define_property$
|
|
43050
|
+
_define_property$2(_assert_this_initialized$1(_this), "parenthesisExpression", _this.RULE('parenthesisExpression', function() {
|
|
43051
43051
|
_this.CONSUME(OpenParenthesis, {
|
|
43052
43052
|
LABEL: 'open'
|
|
43053
43053
|
});
|
|
@@ -43056,7 +43056,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43056
43056
|
LABEL: 'close'
|
|
43057
43057
|
});
|
|
43058
43058
|
}));
|
|
43059
|
-
_define_property$
|
|
43059
|
+
_define_property$2(_assert_this_initialized$1(_this), "listExpression", _this.RULE('listExpression', function() {
|
|
43060
43060
|
_this.CONSUME(OpenBracket);
|
|
43061
43061
|
_this.OPTION(function() {
|
|
43062
43062
|
_this.SUBRULE(_this.expr, {
|
|
@@ -43076,7 +43076,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43076
43076
|
});
|
|
43077
43077
|
});
|
|
43078
43078
|
}));
|
|
43079
|
-
_define_property$
|
|
43079
|
+
_define_property$2(_assert_this_initialized$1(_this), "mapExpression", _this.RULE('mapExpression', function() {
|
|
43080
43080
|
_this.CONSUME(OpenCurlyBracket);
|
|
43081
43081
|
_this.MANY(function() {
|
|
43082
43082
|
_this.SUBRULE(_this.mapKeyValues, {
|
|
@@ -43101,7 +43101,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43101
43101
|
]);
|
|
43102
43102
|
});
|
|
43103
43103
|
}));
|
|
43104
|
-
_define_property$
|
|
43104
|
+
_define_property$2(_assert_this_initialized$1(_this), "mapKeyValues", _this.RULE('mapKeyValues', function() {
|
|
43105
43105
|
_this.SUBRULE(_this.expr, {
|
|
43106
43106
|
LABEL: 'key'
|
|
43107
43107
|
});
|
|
@@ -43113,7 +43113,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43113
43113
|
_this.CONSUME(Comma);
|
|
43114
43114
|
});
|
|
43115
43115
|
}));
|
|
43116
|
-
_define_property$
|
|
43116
|
+
_define_property$2(_assert_this_initialized$1(_this), "macrosExpression", _this.RULE('macrosExpression', function() {
|
|
43117
43117
|
_this.CONSUME(Identifier);
|
|
43118
43118
|
_this.CONSUME(OpenParenthesis);
|
|
43119
43119
|
_this.OPTION(function() {
|
|
@@ -43129,7 +43129,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43129
43129
|
});
|
|
43130
43130
|
_this.CONSUME(CloseParenthesis);
|
|
43131
43131
|
}));
|
|
43132
|
-
_define_property$
|
|
43132
|
+
_define_property$2(_assert_this_initialized$1(_this), "identifierExpression", _this.RULE('identifierExpression', function() {
|
|
43133
43133
|
_this.CONSUME(Identifier);
|
|
43134
43134
|
_this.MANY(function() {
|
|
43135
43135
|
_this.OR([
|
|
@@ -43148,7 +43148,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43148
43148
|
]);
|
|
43149
43149
|
});
|
|
43150
43150
|
}));
|
|
43151
|
-
_define_property$
|
|
43151
|
+
_define_property$2(_assert_this_initialized$1(_this), "identifierDotExpression", _this.RULE('identifierDotExpression', function() {
|
|
43152
43152
|
_this.CONSUME(Dot);
|
|
43153
43153
|
_this.CONSUME(Identifier);
|
|
43154
43154
|
// Optional method call with arguments (for collection macros)
|
|
@@ -43168,12 +43168,12 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43168
43168
|
_this.CONSUME(CloseParenthesis);
|
|
43169
43169
|
});
|
|
43170
43170
|
}));
|
|
43171
|
-
_define_property$
|
|
43171
|
+
_define_property$2(_assert_this_initialized$1(_this), "indexExpression", _this.RULE('indexExpression', function() {
|
|
43172
43172
|
_this.CONSUME(OpenBracket);
|
|
43173
43173
|
_this.SUBRULE(_this.expr);
|
|
43174
43174
|
_this.CONSUME(CloseBracket);
|
|
43175
43175
|
}));
|
|
43176
|
-
_define_property$
|
|
43176
|
+
_define_property$2(_assert_this_initialized$1(_this), "atomicExpression", _this.RULE('atomicExpression', function() {
|
|
43177
43177
|
_this.OR([
|
|
43178
43178
|
{
|
|
43179
43179
|
ALT: function() {
|
|
@@ -43282,7 +43282,7 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
43282
43282
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
43283
43283
|
return Constructor;
|
|
43284
43284
|
}
|
|
43285
|
-
function _define_property(obj, key, value) {
|
|
43285
|
+
function _define_property$1(obj, key, value) {
|
|
43286
43286
|
if (key in obj) {
|
|
43287
43287
|
Object.defineProperty(obj, key, {
|
|
43288
43288
|
value: value,
|
|
@@ -43354,7 +43354,7 @@ function _non_iterable_rest() {
|
|
|
43354
43354
|
function _non_iterable_spread() {
|
|
43355
43355
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
43356
43356
|
}
|
|
43357
|
-
function _object_spread(target) {
|
|
43357
|
+
function _object_spread$1(target) {
|
|
43358
43358
|
for(var i = 1; i < arguments.length; i++){
|
|
43359
43359
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
43360
43360
|
var ownKeys = Object.keys(source);
|
|
@@ -43364,7 +43364,7 @@ function _object_spread(target) {
|
|
|
43364
43364
|
}));
|
|
43365
43365
|
}
|
|
43366
43366
|
ownKeys.forEach(function(key) {
|
|
43367
|
-
_define_property(target, key, source[key]);
|
|
43367
|
+
_define_property$1(target, key, source[key]);
|
|
43368
43368
|
});
|
|
43369
43369
|
}
|
|
43370
43370
|
return target;
|
|
@@ -43450,13 +43450,13 @@ var CelVisitor = /*#__PURE__*/ function(BaseCelVisitor) {
|
|
|
43450
43450
|
_class_call_check(this, CelVisitor);
|
|
43451
43451
|
var _this;
|
|
43452
43452
|
_this = _super.call(this);
|
|
43453
|
-
_define_property(_assert_this_initialized(_this), "context", void 0);
|
|
43453
|
+
_define_property$1(_assert_this_initialized(_this), "context", void 0);
|
|
43454
43454
|
/**
|
|
43455
43455
|
* Tracks the current mode of the visitor to handle special cases.
|
|
43456
|
-
*/ _define_property(_assert_this_initialized(_this), "mode", Mode.normal);
|
|
43457
|
-
_define_property(_assert_this_initialized(_this), "functions", void 0);
|
|
43456
|
+
*/ _define_property$1(_assert_this_initialized(_this), "mode", Mode.normal);
|
|
43457
|
+
_define_property$1(_assert_this_initialized(_this), "functions", void 0);
|
|
43458
43458
|
_this.context = context || {};
|
|
43459
|
-
_this.functions = _object_spread({}, defaultFunctions, functions || {});
|
|
43459
|
+
_this.functions = _object_spread$1({}, defaultFunctions, functions || {});
|
|
43460
43460
|
_this.validateVisitor();
|
|
43461
43461
|
return _this;
|
|
43462
43462
|
}
|
|
@@ -44197,6 +44197,198 @@ function evaluate(expression, context, functions) {
|
|
|
44197
44197
|
}
|
|
44198
44198
|
return toAstVisitorInstance.visit(result.cst);
|
|
44199
44199
|
}
|
|
44200
|
+
// Latin-1 Supplement
|
|
44201
|
+
// upper case ranges
|
|
44202
|
+
// [À-ÖØ-ß]
|
|
44203
|
+
// lower case ranges
|
|
44204
|
+
// [à-öø-ÿ]
|
|
44205
|
+
var magicSplit = /^[a-zà-öø-ÿа-я]+|[A-ZÀ-ÖØ-ßА-Я][a-zà-öø-ÿа-я]+|[a-zà-öø-ÿа-я]+|[0-9]+|[A-ZÀ-ÖØ-ßА-Я]+(?![a-zà-öø-ÿа-я])/g;
|
|
44206
|
+
var spaceSplit = /\S+/g;
|
|
44207
|
+
/**
|
|
44208
|
+
* A string.matchAll function that will return an array of "string parts" and the indexes at which it split each part
|
|
44209
|
+
*/ function getPartsAndIndexes(string, splitRegex) {
|
|
44210
|
+
var result = {
|
|
44211
|
+
parts: [],
|
|
44212
|
+
prefixes: []
|
|
44213
|
+
};
|
|
44214
|
+
var matches = string.matchAll(splitRegex);
|
|
44215
|
+
var lastWordEndIndex = 0;
|
|
44216
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
44217
|
+
try {
|
|
44218
|
+
for(var _iterator = matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
44219
|
+
var match = _step.value;
|
|
44220
|
+
if (typeof match.index !== 'number') continue;
|
|
44221
|
+
var word = match[0];
|
|
44222
|
+
result.parts.push(word);
|
|
44223
|
+
var prefix = string.slice(lastWordEndIndex, match.index).trim();
|
|
44224
|
+
result.prefixes.push(prefix);
|
|
44225
|
+
lastWordEndIndex = match.index + word.length;
|
|
44226
|
+
}
|
|
44227
|
+
} catch (err) {
|
|
44228
|
+
_didIteratorError = true;
|
|
44229
|
+
_iteratorError = err;
|
|
44230
|
+
} finally{
|
|
44231
|
+
try {
|
|
44232
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
44233
|
+
_iterator.return();
|
|
44234
|
+
}
|
|
44235
|
+
} finally{
|
|
44236
|
+
if (_didIteratorError) {
|
|
44237
|
+
throw _iteratorError;
|
|
44238
|
+
}
|
|
44239
|
+
}
|
|
44240
|
+
}
|
|
44241
|
+
var tail = string.slice(lastWordEndIndex).trim();
|
|
44242
|
+
if (tail) {
|
|
44243
|
+
result.parts.push('');
|
|
44244
|
+
result.prefixes.push(tail);
|
|
44245
|
+
}
|
|
44246
|
+
return result;
|
|
44247
|
+
}
|
|
44248
|
+
/**
|
|
44249
|
+
* A function that splits a string on words and returns an array of words.
|
|
44250
|
+
* - It can prefix each word with a given character
|
|
44251
|
+
* - It can strip or keep special characters, this affects the logic for adding a prefix as well
|
|
44252
|
+
*/ function splitAndPrefix(string, options) {
|
|
44253
|
+
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;
|
|
44254
|
+
var normalString = string.trim().normalize('NFC');
|
|
44255
|
+
var hasSpaces = normalString.includes(' ');
|
|
44256
|
+
var split = hasSpaces ? spaceSplit : magicSplit;
|
|
44257
|
+
var partsAndIndexes = getPartsAndIndexes(normalString, split);
|
|
44258
|
+
return partsAndIndexes.parts.map(function(_part, i) {
|
|
44259
|
+
var foundPrefix = partsAndIndexes.prefixes[i] || '';
|
|
44260
|
+
var part = _part;
|
|
44261
|
+
if (keepSpecialCharacters === false) {
|
|
44262
|
+
if (keep) {
|
|
44263
|
+
part = part.normalize('NFD').replace(new RegExp("[^a-zA-Z\xd8\xdf\xf80-9".concat(keep.join(''), "]"), 'g'), '');
|
|
44264
|
+
}
|
|
44265
|
+
if (!keep) {
|
|
44266
|
+
part = part.normalize('NFD').replace(/[^a-zA-ZØßø0-9]/g, '');
|
|
44267
|
+
foundPrefix = '';
|
|
44268
|
+
}
|
|
44269
|
+
}
|
|
44270
|
+
if (keep && foundPrefix) {
|
|
44271
|
+
foundPrefix = foundPrefix.replace(new RegExp("[^".concat(keep.join(''), "]"), 'g'), '');
|
|
44272
|
+
}
|
|
44273
|
+
// the first word doesn't need a prefix, so only return the found prefix
|
|
44274
|
+
if (i === 0) {
|
|
44275
|
+
// console.log(`foundPrefix → `, foundPrefix)
|
|
44276
|
+
return foundPrefix + part;
|
|
44277
|
+
}
|
|
44278
|
+
if (!foundPrefix && !part) return '';
|
|
44279
|
+
if (!hasSpaces) {
|
|
44280
|
+
// return the found prefix OR fall back to a given prefix
|
|
44281
|
+
return (foundPrefix || prefix) + part;
|
|
44282
|
+
}
|
|
44283
|
+
// space based sentence was split on spaces, so only return found prefixes
|
|
44284
|
+
if (!foundPrefix && prefix.match(/\s/)) {
|
|
44285
|
+
// in this case we have no more found prefix, it was trimmed, but we're looking to add a space
|
|
44286
|
+
// so let's return that space
|
|
44287
|
+
return ' ' + part;
|
|
44288
|
+
}
|
|
44289
|
+
return (foundPrefix || prefix) + part;
|
|
44290
|
+
}).filter(Boolean);
|
|
44291
|
+
}
|
|
44292
|
+
/**
|
|
44293
|
+
* Capitalises a single word
|
|
44294
|
+
* @returns the word with the first character in uppercase and the rest in lowercase
|
|
44295
|
+
*/ function capitaliseWord(string) {
|
|
44296
|
+
var match = string.matchAll(magicSplit).next().value;
|
|
44297
|
+
var firstLetterIndex = match ? match.index : 0;
|
|
44298
|
+
return string.slice(0, firstLetterIndex + 1).toUpperCase() + string.slice(firstLetterIndex + 1).toLowerCase();
|
|
44299
|
+
}
|
|
44300
|
+
function _define_property(obj, key, value) {
|
|
44301
|
+
if (key in obj) {
|
|
44302
|
+
Object.defineProperty(obj, key, {
|
|
44303
|
+
value: value,
|
|
44304
|
+
enumerable: true,
|
|
44305
|
+
configurable: true,
|
|
44306
|
+
writable: true
|
|
44307
|
+
});
|
|
44308
|
+
} else {
|
|
44309
|
+
obj[key] = value;
|
|
44310
|
+
}
|
|
44311
|
+
return obj;
|
|
44312
|
+
}
|
|
44313
|
+
function _object_spread(target) {
|
|
44314
|
+
for(var i = 1; i < arguments.length; i++){
|
|
44315
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
44316
|
+
var ownKeys = Object.keys(source);
|
|
44317
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
44318
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
44319
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
44320
|
+
}));
|
|
44321
|
+
}
|
|
44322
|
+
ownKeys.forEach(function(key) {
|
|
44323
|
+
_define_property(target, key, source[key]);
|
|
44324
|
+
});
|
|
44325
|
+
}
|
|
44326
|
+
return target;
|
|
44327
|
+
}
|
|
44328
|
+
function ownKeys(object, enumerableOnly) {
|
|
44329
|
+
var keys = Object.keys(object);
|
|
44330
|
+
if (Object.getOwnPropertySymbols) {
|
|
44331
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
44332
|
+
keys.push.apply(keys, symbols);
|
|
44333
|
+
}
|
|
44334
|
+
return keys;
|
|
44335
|
+
}
|
|
44336
|
+
function _object_spread_props(target, source) {
|
|
44337
|
+
source = source != null ? source : {};
|
|
44338
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
44339
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
44340
|
+
} else {
|
|
44341
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
44342
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
44343
|
+
});
|
|
44344
|
+
}
|
|
44345
|
+
return target;
|
|
44346
|
+
}
|
|
44347
|
+
/**
|
|
44348
|
+
* # 🐪 camelCase
|
|
44349
|
+
* converts a string to camelCase
|
|
44350
|
+
* - first lowercase then all capitalised
|
|
44351
|
+
* - *strips away* special characters by default
|
|
44352
|
+
*
|
|
44353
|
+
* @example
|
|
44354
|
+
* camelCase('$catDog') === 'catDog'
|
|
44355
|
+
* @example
|
|
44356
|
+
* camelCase('$catDog', { keepSpecialCharacters: true }) === '$catDog'
|
|
44357
|
+
*/ function camelCase(string, options) {
|
|
44358
|
+
return splitAndPrefix(string, options).reduce(function(result, word, index) {
|
|
44359
|
+
return index === 0 || !(word[0] || '').match(magicSplit) ? result + word.toLowerCase() : result + capitaliseWord(word);
|
|
44360
|
+
}, '');
|
|
44361
|
+
}
|
|
44362
|
+
/**
|
|
44363
|
+
* # 🥙 kebab-case
|
|
44364
|
+
* converts a string to kebab-case
|
|
44365
|
+
* - hyphenated lowercase
|
|
44366
|
+
* - *strips away* special characters by default
|
|
44367
|
+
*
|
|
44368
|
+
* @example
|
|
44369
|
+
* kebabCase('$catDog') === 'cat-dog'
|
|
44370
|
+
* @example
|
|
44371
|
+
* kebabCase('$catDog', { keepSpecialCharacters: true }) === '$cat-dog'
|
|
44372
|
+
*/ function kebabCase(string, options) {
|
|
44373
|
+
return splitAndPrefix(string, _object_spread_props(_object_spread({}, options), {
|
|
44374
|
+
prefix: '-'
|
|
44375
|
+
})).join('').toLowerCase();
|
|
44376
|
+
}
|
|
44377
|
+
/**
|
|
44378
|
+
* # 🐍 snake_case
|
|
44379
|
+
* converts a string to snake_case
|
|
44380
|
+
* - underscored lowercase
|
|
44381
|
+
* - *strips away* special characters by default
|
|
44382
|
+
*
|
|
44383
|
+
* @example
|
|
44384
|
+
* snakeCase('$catDog') === 'cat_dog'
|
|
44385
|
+
* @example
|
|
44386
|
+
* snakeCase('$catDog', { keepSpecialCharacters: true }) === '$cat_dog'
|
|
44387
|
+
*/ function snakeCase(string, options) {
|
|
44388
|
+
return splitAndPrefix(string, _object_spread_props(_object_spread({}, options), {
|
|
44389
|
+
prefix: '_'
|
|
44390
|
+
})).join('').toLowerCase();
|
|
44391
|
+
}
|
|
44200
44392
|
const Handlebars = handlebars_min || HandlebarsNamespace;
|
|
44201
44393
|
Handlebars.registerHelper('JSONstringify', function(value) {
|
|
44202
44394
|
return JSON.stringify(value);
|
|
@@ -44211,7 +44403,10 @@ const DIGIPAIR_FUNCTIONS = {
|
|
|
44211
44403
|
encodeUTF8: (value)=>Array.from(new TextEncoder().encode(value)).map((b)=>String.fromCharCode(b)).join(''),
|
|
44212
44404
|
decodeUTF8: (value)=>new TextDecoder().decode(new Uint8Array(Array.from(value).map((c)=>c.charCodeAt(0)))),
|
|
44213
44405
|
JSONparse: (value)=>JSON.parse(value),
|
|
44214
|
-
JSONstringify: (value)=>JSON.stringify(value)
|
|
44406
|
+
JSONstringify: (value)=>JSON.stringify(value),
|
|
44407
|
+
camelCase: (value)=>camelCase(value),
|
|
44408
|
+
kebabCase: (value)=>kebabCase(value),
|
|
44409
|
+
snakeCase: (value)=>snakeCase(value)
|
|
44215
44410
|
};
|
|
44216
44411
|
const globalInstance = typeof window === 'undefined' ? global : window;
|
|
44217
44412
|
const _config = globalInstance.__DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__ ?? {
|