@digipair/skill-canvas 0.42.0 → 0.43.1

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/index.esm.js CHANGED
@@ -8135,7 +8135,7 @@ function _type_of(obj) {
8135
8135
  }
8136
8136
  return self;
8137
8137
  }
8138
- function _class_call_check$i(instance, Constructor) {
8138
+ function _class_call_check$j(instance, Constructor) {
8139
8139
  if (!(instance instanceof Constructor)) {
8140
8140
  throw new TypeError("Cannot call a class as a function");
8141
8141
  }
@@ -8250,7 +8250,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8250
8250
  _inherits$7(LuxonError, Error1);
8251
8251
  var _super = _create_super$7(LuxonError);
8252
8252
  function LuxonError() {
8253
- _class_call_check$i(this, LuxonError);
8253
+ _class_call_check$j(this, LuxonError);
8254
8254
  return _super.apply(this, arguments);
8255
8255
  }
8256
8256
  return LuxonError;
@@ -8261,7 +8261,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8261
8261
  _inherits$7(InvalidDateTimeError, LuxonError);
8262
8262
  var _super = _create_super$7(InvalidDateTimeError);
8263
8263
  function InvalidDateTimeError(reason) {
8264
- _class_call_check$i(this, InvalidDateTimeError);
8264
+ _class_call_check$j(this, InvalidDateTimeError);
8265
8265
  return _super.call(this, "Invalid DateTime: ".concat(reason.toMessage()));
8266
8266
  }
8267
8267
  return InvalidDateTimeError;
@@ -8272,7 +8272,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8272
8272
  _inherits$7(InvalidIntervalError, LuxonError);
8273
8273
  var _super = _create_super$7(InvalidIntervalError);
8274
8274
  function InvalidIntervalError(reason) {
8275
- _class_call_check$i(this, InvalidIntervalError);
8275
+ _class_call_check$j(this, InvalidIntervalError);
8276
8276
  return _super.call(this, "Invalid Interval: ".concat(reason.toMessage()));
8277
8277
  }
8278
8278
  return InvalidIntervalError;
@@ -8283,7 +8283,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8283
8283
  _inherits$7(InvalidDurationError, LuxonError);
8284
8284
  var _super = _create_super$7(InvalidDurationError);
8285
8285
  function InvalidDurationError(reason) {
8286
- _class_call_check$i(this, InvalidDurationError);
8286
+ _class_call_check$j(this, InvalidDurationError);
8287
8287
  return _super.call(this, "Invalid Duration: ".concat(reason.toMessage()));
8288
8288
  }
8289
8289
  return InvalidDurationError;
@@ -8294,7 +8294,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8294
8294
  _inherits$7(ConflictingSpecificationError, LuxonError);
8295
8295
  var _super = _create_super$7(ConflictingSpecificationError);
8296
8296
  function ConflictingSpecificationError() {
8297
- _class_call_check$i(this, ConflictingSpecificationError);
8297
+ _class_call_check$j(this, ConflictingSpecificationError);
8298
8298
  return _super.apply(this, arguments);
8299
8299
  }
8300
8300
  return ConflictingSpecificationError;
@@ -8305,7 +8305,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8305
8305
  _inherits$7(InvalidUnitError, LuxonError);
8306
8306
  var _super = _create_super$7(InvalidUnitError);
8307
8307
  function InvalidUnitError(unit) {
8308
- _class_call_check$i(this, InvalidUnitError);
8308
+ _class_call_check$j(this, InvalidUnitError);
8309
8309
  return _super.call(this, "Invalid unit ".concat(unit));
8310
8310
  }
8311
8311
  return InvalidUnitError;
@@ -8316,7 +8316,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8316
8316
  _inherits$7(InvalidArgumentError, LuxonError);
8317
8317
  var _super = _create_super$7(InvalidArgumentError);
8318
8318
  function InvalidArgumentError() {
8319
- _class_call_check$i(this, InvalidArgumentError);
8319
+ _class_call_check$j(this, InvalidArgumentError);
8320
8320
  return _super.apply(this, arguments);
8321
8321
  }
8322
8322
  return InvalidArgumentError;
@@ -8327,7 +8327,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8327
8327
  _inherits$7(ZoneIsAbstractError, LuxonError);
8328
8328
  var _super = _create_super$7(ZoneIsAbstractError);
8329
8329
  function ZoneIsAbstractError() {
8330
- _class_call_check$i(this, ZoneIsAbstractError);
8330
+ _class_call_check$j(this, ZoneIsAbstractError);
8331
8331
  return _super.call(this, "Zone is an abstract class");
8332
8332
  }
8333
8333
  return ZoneIsAbstractError;
@@ -8484,12 +8484,12 @@ var DATETIME_HUGE_WITH_SECONDS = {
8484
8484
  timeZoneName: l
8485
8485
  };
8486
8486
 
8487
- function _class_call_check$h(instance, Constructor) {
8487
+ function _class_call_check$i(instance, Constructor) {
8488
8488
  if (!(instance instanceof Constructor)) {
8489
8489
  throw new TypeError("Cannot call a class as a function");
8490
8490
  }
8491
8491
  }
8492
- function _defineProperties$h(target, props) {
8492
+ function _defineProperties$i(target, props) {
8493
8493
  for(var i = 0; i < props.length; i++){
8494
8494
  var descriptor = props[i];
8495
8495
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8498,16 +8498,16 @@ function _defineProperties$h(target, props) {
8498
8498
  Object.defineProperty(target, descriptor.key, descriptor);
8499
8499
  }
8500
8500
  }
8501
- function _create_class$h(Constructor, protoProps, staticProps) {
8502
- if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
8503
- if (staticProps) _defineProperties$h(Constructor, staticProps);
8501
+ function _create_class$i(Constructor, protoProps, staticProps) {
8502
+ if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
8503
+ if (staticProps) _defineProperties$i(Constructor, staticProps);
8504
8504
  return Constructor;
8505
8505
  }
8506
8506
  var Zone = /*#__PURE__*/ function() {
8507
8507
  function Zone() {
8508
- _class_call_check$h(this, Zone);
8508
+ _class_call_check$i(this, Zone);
8509
8509
  }
8510
- _create_class$h(Zone, [
8510
+ _create_class$i(Zone, [
8511
8511
  {
8512
8512
  key: "type",
8513
8513
  get: /**
@@ -8530,7 +8530,12 @@ var Zone = /*#__PURE__*/ function() {
8530
8530
  },
8531
8531
  {
8532
8532
  key: "ianaName",
8533
- get: function get() {
8533
+ get: /**
8534
+ * The IANA name of this zone.
8535
+ * Defaults to `name` if not overwritten by a subclass.
8536
+ * @abstract
8537
+ * @type {string}
8538
+ */ function get() {
8534
8539
  return this.name;
8535
8540
  }
8536
8541
  },
@@ -8613,12 +8618,12 @@ function _assert_this_initialized$6(self) {
8613
8618
  }
8614
8619
  return self;
8615
8620
  }
8616
- function _class_call_check$g(instance, Constructor) {
8621
+ function _class_call_check$h(instance, Constructor) {
8617
8622
  if (!(instance instanceof Constructor)) {
8618
8623
  throw new TypeError("Cannot call a class as a function");
8619
8624
  }
8620
8625
  }
8621
- function _defineProperties$g(target, props) {
8626
+ function _defineProperties$h(target, props) {
8622
8627
  for(var i = 0; i < props.length; i++){
8623
8628
  var descriptor = props[i];
8624
8629
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8627,9 +8632,9 @@ function _defineProperties$g(target, props) {
8627
8632
  Object.defineProperty(target, descriptor.key, descriptor);
8628
8633
  }
8629
8634
  }
8630
- function _create_class$g(Constructor, protoProps, staticProps) {
8631
- if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
8632
- if (staticProps) _defineProperties$g(Constructor, staticProps);
8635
+ function _create_class$h(Constructor, protoProps, staticProps) {
8636
+ if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
8637
+ if (staticProps) _defineProperties$h(Constructor, staticProps);
8633
8638
  return Constructor;
8634
8639
  }
8635
8640
  function _get_prototype_of$6(o) {
@@ -8697,10 +8702,10 @@ var SystemZone = /*#__PURE__*/ function(Zone) {
8697
8702
  _inherits$6(SystemZone, Zone);
8698
8703
  var _super = _create_super$6(SystemZone);
8699
8704
  function SystemZone() {
8700
- _class_call_check$g(this, SystemZone);
8705
+ _class_call_check$h(this, SystemZone);
8701
8706
  return _super.apply(this, arguments);
8702
8707
  }
8703
- _create_class$g(SystemZone, [
8708
+ _create_class$h(SystemZone, [
8704
8709
  {
8705
8710
  key: "type",
8706
8711
  get: /** @override **/ function get() {
@@ -8781,12 +8786,12 @@ function _assert_this_initialized$5(self) {
8781
8786
  }
8782
8787
  return self;
8783
8788
  }
8784
- function _class_call_check$f(instance, Constructor) {
8789
+ function _class_call_check$g(instance, Constructor) {
8785
8790
  if (!(instance instanceof Constructor)) {
8786
8791
  throw new TypeError("Cannot call a class as a function");
8787
8792
  }
8788
8793
  }
8789
- function _defineProperties$f(target, props) {
8794
+ function _defineProperties$g(target, props) {
8790
8795
  for(var i = 0; i < props.length; i++){
8791
8796
  var descriptor = props[i];
8792
8797
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8795,9 +8800,9 @@ function _defineProperties$f(target, props) {
8795
8800
  Object.defineProperty(target, descriptor.key, descriptor);
8796
8801
  }
8797
8802
  }
8798
- function _create_class$f(Constructor, protoProps, staticProps) {
8799
- if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
8800
- if (staticProps) _defineProperties$f(Constructor, staticProps);
8803
+ function _create_class$g(Constructor, protoProps, staticProps) {
8804
+ if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
8805
+ if (staticProps) _defineProperties$g(Constructor, staticProps);
8801
8806
  return Constructor;
8802
8807
  }
8803
8808
  function _get_prototype_of$5(o) {
@@ -8944,7 +8949,7 @@ function partsOffset(dtf, date) {
8944
8949
  var pos = typeToPos[type];
8945
8950
  if (type === "era") {
8946
8951
  filled[pos] = value;
8947
- } else if (!isUndefined(pos)) {
8952
+ } else if (!isUndefined$1(pos)) {
8948
8953
  filled[pos] = parseInt(value, 10);
8949
8954
  }
8950
8955
  }
@@ -8955,47 +8960,80 @@ var IANAZone = /*#__PURE__*/ function(Zone) {
8955
8960
  _inherits$5(IANAZone, Zone);
8956
8961
  var _super = _create_super$5(IANAZone);
8957
8962
  function IANAZone(name) {
8958
- _class_call_check$f(this, IANAZone);
8963
+ _class_call_check$g(this, IANAZone);
8959
8964
  var _this;
8960
8965
  _this = _super.call(this);
8961
8966
  /** @private **/ _this.zoneName = name;
8962
8967
  /** @private **/ _this.valid = IANAZone.isValidZone(name);
8963
8968
  return _this;
8964
8969
  }
8965
- _create_class$f(IANAZone, [
8970
+ _create_class$g(IANAZone, [
8966
8971
  {
8967
8972
  key: "type",
8968
- get: /** @override **/ function get() {
8973
+ get: /**
8974
+ * The type of zone. `iana` for all instances of `IANAZone`.
8975
+ * @override
8976
+ * @type {string}
8977
+ */ function get() {
8969
8978
  return "iana";
8970
8979
  }
8971
8980
  },
8972
8981
  {
8973
8982
  key: "name",
8974
- get: /** @override **/ function get() {
8983
+ get: /**
8984
+ * The name of this zone (i.e. the IANA zone name).
8985
+ * @override
8986
+ * @type {string}
8987
+ */ function get() {
8975
8988
  return this.zoneName;
8976
8989
  }
8977
8990
  },
8978
8991
  {
8979
8992
  key: "isUniversal",
8980
- get: /** @override **/ function get() {
8993
+ get: /**
8994
+ * Returns whether the offset is known to be fixed for the whole year:
8995
+ * Always returns false for all IANA zones.
8996
+ * @override
8997
+ * @type {boolean}
8998
+ */ function get() {
8981
8999
  return false;
8982
9000
  }
8983
9001
  },
8984
9002
  {
8985
- /** @override **/ key: "offsetName",
9003
+ /**
9004
+ * Returns the offset's common name (such as EST) at the specified timestamp
9005
+ * @override
9006
+ * @param {number} ts - Epoch milliseconds for which to get the name
9007
+ * @param {Object} opts - Options to affect the format
9008
+ * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
9009
+ * @param {string} opts.locale - What locale to return the offset name in.
9010
+ * @return {string}
9011
+ */ key: "offsetName",
8986
9012
  value: function offsetName(ts, param) {
8987
9013
  var format = param.format, locale = param.locale;
8988
9014
  return parseZoneInfo(ts, format, locale, this.name);
8989
9015
  }
8990
9016
  },
8991
9017
  {
8992
- /** @override **/ key: "formatOffset",
9018
+ /**
9019
+ * Returns the offset's value as a string
9020
+ * @override
9021
+ * @param {number} ts - Epoch milliseconds for which to get the offset
9022
+ * @param {string} format - What style of offset to return.
9023
+ * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
9024
+ * @return {string}
9025
+ */ key: "formatOffset",
8993
9026
  value: function formatOffset1(ts, format) {
8994
9027
  return formatOffset(this.offset(ts), format);
8995
9028
  }
8996
9029
  },
8997
9030
  {
8998
- /** @override **/ key: "offset",
9031
+ /**
9032
+ * Return the offset in minutes for this zone at the specified timestamp.
9033
+ * @override
9034
+ * @param {number} ts - Epoch milliseconds for which to compute the offset
9035
+ * @return {number}
9036
+ */ key: "offset",
8999
9037
  value: function offset(ts) {
9000
9038
  var date = new Date(ts);
9001
9039
  if (isNaN(date)) return NaN;
@@ -9022,14 +9060,23 @@ var IANAZone = /*#__PURE__*/ function(Zone) {
9022
9060
  }
9023
9061
  },
9024
9062
  {
9025
- /** @override **/ key: "equals",
9063
+ /**
9064
+ * Return whether this Zone is equal to another zone
9065
+ * @override
9066
+ * @param {Zone} otherZone - the zone to compare
9067
+ * @return {boolean}
9068
+ */ key: "equals",
9026
9069
  value: function equals(otherZone) {
9027
9070
  return otherZone.type === "iana" && otherZone.name === this.name;
9028
9071
  }
9029
9072
  },
9030
9073
  {
9031
9074
  key: "isValid",
9032
- get: /** @override **/ function get() {
9075
+ get: /**
9076
+ * Return whether this Zone is valid.
9077
+ * @override
9078
+ * @type {boolean}
9079
+ */ function get() {
9033
9080
  return this.valid;
9034
9081
  }
9035
9082
  }
@@ -9063,7 +9110,7 @@ var IANAZone = /*#__PURE__*/ function(Zone) {
9063
9110
  * @param {string} s - The string to check validity on
9064
9111
  * @example IANAZone.isValidSpecifier("America/New_York") //=> true
9065
9112
  * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false
9066
- * @deprecated This method returns false for some valid IANA names. Use isValidZone instead.
9113
+ * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.
9067
9114
  * @return {boolean}
9068
9115
  */ function isValidSpecifier(s) {
9069
9116
  return this.isValidZone(s);
@@ -9104,12 +9151,12 @@ function _array_like_to_array$d(arr, len) {
9104
9151
  function _array_with_holes$b(arr) {
9105
9152
  if (Array.isArray(arr)) return arr;
9106
9153
  }
9107
- function _class_call_check$e(instance, Constructor) {
9154
+ function _class_call_check$f(instance, Constructor) {
9108
9155
  if (!(instance instanceof Constructor)) {
9109
9156
  throw new TypeError("Cannot call a class as a function");
9110
9157
  }
9111
9158
  }
9112
- function _defineProperties$e(target, props) {
9159
+ function _defineProperties$f(target, props) {
9113
9160
  for(var i = 0; i < props.length; i++){
9114
9161
  var descriptor = props[i];
9115
9162
  descriptor.enumerable = descriptor.enumerable || false;
@@ -9118,9 +9165,9 @@ function _defineProperties$e(target, props) {
9118
9165
  Object.defineProperty(target, descriptor.key, descriptor);
9119
9166
  }
9120
9167
  }
9121
- function _create_class$e(Constructor, protoProps, staticProps) {
9122
- if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
9123
- if (staticProps) _defineProperties$e(Constructor, staticProps);
9168
+ function _create_class$f(Constructor, protoProps, staticProps) {
9169
+ if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
9170
+ if (staticProps) _defineProperties$f(Constructor, staticProps);
9124
9171
  return Constructor;
9125
9172
  }
9126
9173
  function _define_property$9(obj, key, value) {
@@ -9411,7 +9458,7 @@ function supportsFastNumbers(loc) {
9411
9458
  * @private
9412
9459
  */ var PolyNumberFormatter = /*#__PURE__*/ function() {
9413
9460
  function PolyNumberFormatter(intl, forceSimple, opts) {
9414
- _class_call_check$e(this, PolyNumberFormatter);
9461
+ _class_call_check$f(this, PolyNumberFormatter);
9415
9462
  this.padTo = opts.padTo || 0;
9416
9463
  this.floor = opts.floor || false;
9417
9464
  opts.padTo; opts.floor; var otherOpts = _object_without_properties(opts, [
@@ -9426,7 +9473,7 @@ function supportsFastNumbers(loc) {
9426
9473
  this.inf = getCachedINF(intl, intlOpts);
9427
9474
  }
9428
9475
  }
9429
- _create_class$e(PolyNumberFormatter, [
9476
+ _create_class$f(PolyNumberFormatter, [
9430
9477
  {
9431
9478
  key: "format",
9432
9479
  value: function format(i) {
@@ -9447,7 +9494,7 @@ function supportsFastNumbers(loc) {
9447
9494
  * @private
9448
9495
  */ var PolyDateFormatter = /*#__PURE__*/ function() {
9449
9496
  function PolyDateFormatter(dt, intl, opts) {
9450
- _class_call_check$e(this, PolyDateFormatter);
9497
+ _class_call_check$f(this, PolyDateFormatter);
9451
9498
  this.opts = opts;
9452
9499
  this.originalZone = undefined;
9453
9500
  var z = undefined;
@@ -9493,7 +9540,7 @@ function supportsFastNumbers(loc) {
9493
9540
  intlOpts.timeZone = intlOpts.timeZone || z;
9494
9541
  this.dtf = getCachedDTF(intl, intlOpts);
9495
9542
  }
9496
- _create_class$e(PolyDateFormatter, [
9543
+ _create_class$f(PolyDateFormatter, [
9497
9544
  {
9498
9545
  key: "format",
9499
9546
  value: function format() {
@@ -9544,7 +9591,7 @@ function supportsFastNumbers(loc) {
9544
9591
  * @private
9545
9592
  */ var PolyRelFormatter = /*#__PURE__*/ function() {
9546
9593
  function PolyRelFormatter(intl, isEnglish, opts) {
9547
- _class_call_check$e(this, PolyRelFormatter);
9594
+ _class_call_check$f(this, PolyRelFormatter);
9548
9595
  this.opts = _object_spread$7({
9549
9596
  style: "long"
9550
9597
  }, opts);
@@ -9552,7 +9599,7 @@ function supportsFastNumbers(loc) {
9552
9599
  this.rtf = getCachedRTF(intl, opts);
9553
9600
  }
9554
9601
  }
9555
- _create_class$e(PolyRelFormatter, [
9602
+ _create_class$f(PolyRelFormatter, [
9556
9603
  {
9557
9604
  key: "format",
9558
9605
  value: function format(count, unit) {
@@ -9586,7 +9633,7 @@ var fallbackWeekSettings = {
9586
9633
  };
9587
9634
  var Locale = /*#__PURE__*/ function() {
9588
9635
  function Locale(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {
9589
- _class_call_check$e(this, Locale);
9636
+ _class_call_check$f(this, Locale);
9590
9637
  var _parseLocaleString = _sliced_to_array$b(parseLocaleString(locale), 3), parsedLocale = _parseLocaleString[0], parsedNumberingSystem = _parseLocaleString[1], parsedOutputCalendar = _parseLocaleString[2];
9591
9638
  this.locale = parsedLocale;
9592
9639
  this.numberingSystem = numbering || parsedNumberingSystem || null;
@@ -9606,7 +9653,7 @@ var Locale = /*#__PURE__*/ function() {
9606
9653
  this.specifiedLocale = specifiedLocale;
9607
9654
  this.fastNumbersCached = null;
9608
9655
  }
9609
- _create_class$e(Locale, [
9656
+ _create_class$f(Locale, [
9610
9657
  {
9611
9658
  key: "fastNumbers",
9612
9659
  get: function get() {
@@ -9823,6 +9870,12 @@ var Locale = /*#__PURE__*/ function() {
9823
9870
  value: function equals(other) {
9824
9871
  return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar;
9825
9872
  }
9873
+ },
9874
+ {
9875
+ key: "toString",
9876
+ value: function toString() {
9877
+ return "Locale(".concat(this.locale, ", ").concat(this.numberingSystem, ", ").concat(this.outputCalendar, ")");
9878
+ }
9826
9879
  }
9827
9880
  ], [
9828
9881
  {
@@ -9836,7 +9889,7 @@ var Locale = /*#__PURE__*/ function() {
9836
9889
  value: function create(locale, numberingSystem, outputCalendar, weekSettings) {
9837
9890
  var defaultToEN = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
9838
9891
  var specifiedLocale = locale || Settings.defaultLocale;
9839
- // the system locale is useful for human readable strings but annoying for parsing/formatting known formats
9892
+ // the system locale is useful for human-readable strings but annoying for parsing/formatting known formats
9840
9893
  var localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale());
9841
9894
  var numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;
9842
9895
  var outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;
@@ -9870,12 +9923,12 @@ function _assert_this_initialized$4(self) {
9870
9923
  }
9871
9924
  return self;
9872
9925
  }
9873
- function _class_call_check$d(instance, Constructor) {
9926
+ function _class_call_check$e(instance, Constructor) {
9874
9927
  if (!(instance instanceof Constructor)) {
9875
9928
  throw new TypeError("Cannot call a class as a function");
9876
9929
  }
9877
9930
  }
9878
- function _defineProperties$d(target, props) {
9931
+ function _defineProperties$e(target, props) {
9879
9932
  for(var i = 0; i < props.length; i++){
9880
9933
  var descriptor = props[i];
9881
9934
  descriptor.enumerable = descriptor.enumerable || false;
@@ -9884,9 +9937,9 @@ function _defineProperties$d(target, props) {
9884
9937
  Object.defineProperty(target, descriptor.key, descriptor);
9885
9938
  }
9886
9939
  }
9887
- function _create_class$d(Constructor, protoProps, staticProps) {
9888
- if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
9889
- if (staticProps) _defineProperties$d(Constructor, staticProps);
9940
+ function _create_class$e(Constructor, protoProps, staticProps) {
9941
+ if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
9942
+ if (staticProps) _defineProperties$e(Constructor, staticProps);
9890
9943
  return Constructor;
9891
9944
  }
9892
9945
  function _get_prototype_of$4(o) {
@@ -9954,28 +10007,42 @@ var FixedOffsetZone = /*#__PURE__*/ function(Zone) {
9954
10007
  _inherits$4(FixedOffsetZone, Zone);
9955
10008
  var _super = _create_super$4(FixedOffsetZone);
9956
10009
  function FixedOffsetZone(offset) {
9957
- _class_call_check$d(this, FixedOffsetZone);
10010
+ _class_call_check$e(this, FixedOffsetZone);
9958
10011
  var _this;
9959
10012
  _this = _super.call(this);
9960
10013
  /** @private **/ _this.fixed = offset;
9961
10014
  return _this;
9962
10015
  }
9963
- _create_class$d(FixedOffsetZone, [
10016
+ _create_class$e(FixedOffsetZone, [
9964
10017
  {
9965
10018
  key: "type",
9966
- get: /** @override **/ function get() {
10019
+ get: /**
10020
+ * The type of zone. `fixed` for all instances of `FixedOffsetZone`.
10021
+ * @override
10022
+ * @type {string}
10023
+ */ function get() {
9967
10024
  return "fixed";
9968
10025
  }
9969
10026
  },
9970
10027
  {
9971
10028
  key: "name",
9972
- get: /** @override **/ function get() {
10029
+ get: /**
10030
+ * The name of this zone.
10031
+ * All fixed zones' names always start with "UTC" (plus optional offset)
10032
+ * @override
10033
+ * @type {string}
10034
+ */ function get() {
9973
10035
  return this.fixed === 0 ? "UTC" : "UTC".concat(formatOffset(this.fixed, "narrow"));
9974
10036
  }
9975
10037
  },
9976
10038
  {
9977
10039
  key: "ianaName",
9978
- get: function get() {
10040
+ get: /**
10041
+ * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`
10042
+ *
10043
+ * @override
10044
+ * @type {string}
10045
+ */ function get() {
9979
10046
  if (this.fixed === 0) {
9980
10047
  return "Etc/UTC";
9981
10048
  } else {
@@ -9984,38 +10051,71 @@ var FixedOffsetZone = /*#__PURE__*/ function(Zone) {
9984
10051
  }
9985
10052
  },
9986
10053
  {
9987
- /** @override **/ key: "offsetName",
10054
+ /**
10055
+ * Returns the offset's common name at the specified timestamp.
10056
+ *
10057
+ * For fixed offset zones this equals to the zone name.
10058
+ * @override
10059
+ */ key: "offsetName",
9988
10060
  value: function offsetName() {
9989
10061
  return this.name;
9990
10062
  }
9991
10063
  },
9992
10064
  {
9993
- /** @override **/ key: "formatOffset",
10065
+ /**
10066
+ * Returns the offset's value as a string
10067
+ * @override
10068
+ * @param {number} ts - Epoch milliseconds for which to get the offset
10069
+ * @param {string} format - What style of offset to return.
10070
+ * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
10071
+ * @return {string}
10072
+ */ key: "formatOffset",
9994
10073
  value: function formatOffset1(ts, format) {
9995
10074
  return formatOffset(this.fixed, format);
9996
10075
  }
9997
10076
  },
9998
10077
  {
9999
10078
  key: "isUniversal",
10000
- get: /** @override **/ function get() {
10079
+ get: /**
10080
+ * Returns whether the offset is known to be fixed for the whole year:
10081
+ * Always returns true for all fixed offset zones.
10082
+ * @override
10083
+ * @type {boolean}
10084
+ */ function get() {
10001
10085
  return true;
10002
10086
  }
10003
10087
  },
10004
10088
  {
10005
- /** @override **/ key: "offset",
10089
+ /**
10090
+ * Return the offset in minutes for this zone at the specified timestamp.
10091
+ *
10092
+ * For fixed offset zones, this is constant and does not depend on a timestamp.
10093
+ * @override
10094
+ * @return {number}
10095
+ */ key: "offset",
10006
10096
  value: function offset() {
10007
10097
  return this.fixed;
10008
10098
  }
10009
10099
  },
10010
10100
  {
10011
- /** @override **/ key: "equals",
10101
+ /**
10102
+ * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)
10103
+ * @override
10104
+ * @param {Zone} otherZone - the zone to compare
10105
+ * @return {boolean}
10106
+ */ key: "equals",
10012
10107
  value: function equals(otherZone) {
10013
10108
  return otherZone.type === "fixed" && otherZone.fixed === this.fixed;
10014
10109
  }
10015
10110
  },
10016
10111
  {
10017
10112
  key: "isValid",
10018
- get: /** @override **/ function get() {
10113
+ get: /**
10114
+ * Return whether this Zone is valid:
10115
+ * All fixed offset zones are valid.
10116
+ * @override
10117
+ * @type {boolean}
10118
+ */ function get() {
10019
10119
  return true;
10020
10120
  }
10021
10121
  }
@@ -10071,12 +10171,12 @@ function _assert_this_initialized$3(self) {
10071
10171
  }
10072
10172
  return self;
10073
10173
  }
10074
- function _class_call_check$c(instance, Constructor) {
10174
+ function _class_call_check$d(instance, Constructor) {
10075
10175
  if (!(instance instanceof Constructor)) {
10076
10176
  throw new TypeError("Cannot call a class as a function");
10077
10177
  }
10078
10178
  }
10079
- function _defineProperties$c(target, props) {
10179
+ function _defineProperties$d(target, props) {
10080
10180
  for(var i = 0; i < props.length; i++){
10081
10181
  var descriptor = props[i];
10082
10182
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10085,9 +10185,9 @@ function _defineProperties$c(target, props) {
10085
10185
  Object.defineProperty(target, descriptor.key, descriptor);
10086
10186
  }
10087
10187
  }
10088
- function _create_class$c(Constructor, protoProps, staticProps) {
10089
- if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
10090
- if (staticProps) _defineProperties$c(Constructor, staticProps);
10188
+ function _create_class$d(Constructor, protoProps, staticProps) {
10189
+ if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
10190
+ if (staticProps) _defineProperties$d(Constructor, staticProps);
10091
10191
  return Constructor;
10092
10192
  }
10093
10193
  function _get_prototype_of$3(o) {
@@ -10154,13 +10254,13 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
10154
10254
  _inherits$3(InvalidZone, Zone);
10155
10255
  var _super = _create_super$3(InvalidZone);
10156
10256
  function InvalidZone(zoneName) {
10157
- _class_call_check$c(this, InvalidZone);
10257
+ _class_call_check$d(this, InvalidZone);
10158
10258
  var _this;
10159
10259
  _this = _super.call(this);
10160
10260
  /** @private */ _this.zoneName = zoneName;
10161
10261
  return _this;
10162
10262
  }
10163
- _create_class$c(InvalidZone, [
10263
+ _create_class$d(InvalidZone, [
10164
10264
  {
10165
10265
  key: "type",
10166
10266
  get: /** @override **/ function get() {
@@ -10215,7 +10315,7 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
10215
10315
 
10216
10316
  /**
10217
10317
  * @private
10218
- */ function _instanceof$7(left, right) {
10318
+ */ function _instanceof$8(left, right) {
10219
10319
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
10220
10320
  return !!right[Symbol.hasInstance](left);
10221
10321
  } else {
@@ -10223,9 +10323,9 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
10223
10323
  }
10224
10324
  }
10225
10325
  function normalizeZone(input, defaultZone) {
10226
- if (isUndefined(input) || input === null) {
10326
+ if (isUndefined$1(input) || input === null) {
10227
10327
  return defaultZone;
10228
- } else if (_instanceof$7(input, Zone)) {
10328
+ } else if (_instanceof$8(input, Zone)) {
10229
10329
  return input;
10230
10330
  } else if (isString$1(input)) {
10231
10331
  var lowered = input.toLowerCase();
@@ -10244,80 +10344,267 @@ function normalizeZone(input, defaultZone) {
10244
10344
  }
10245
10345
  }
10246
10346
 
10247
- function _class_call_check$b(instance, Constructor) {
10248
- if (!(instance instanceof Constructor)) {
10249
- throw new TypeError("Cannot call a class as a function");
10250
- }
10347
+ function _array_like_to_array$c(arr, len) {
10348
+ if (len == null || len > arr.length) len = arr.length;
10349
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
10350
+ return arr2;
10251
10351
  }
10252
- function _defineProperties$b(target, props) {
10253
- for(var i = 0; i < props.length; i++){
10254
- var descriptor = props[i];
10255
- descriptor.enumerable = descriptor.enumerable || false;
10256
- descriptor.configurable = true;
10257
- if ("value" in descriptor) descriptor.writable = true;
10258
- Object.defineProperty(target, descriptor.key, descriptor);
10352
+ function _array_with_holes$a(arr) {
10353
+ if (Array.isArray(arr)) return arr;
10354
+ }
10355
+ function _iterable_to_array_limit$a(arr, i) {
10356
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
10357
+ if (_i == null) return;
10358
+ var _arr = [];
10359
+ var _n = true;
10360
+ var _d = false;
10361
+ var _s, _e;
10362
+ try {
10363
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
10364
+ _arr.push(_s.value);
10365
+ if (i && _arr.length === i) break;
10366
+ }
10367
+ } catch (err) {
10368
+ _d = true;
10369
+ _e = err;
10370
+ } finally{
10371
+ try {
10372
+ if (!_n && _i["return"] != null) _i["return"]();
10373
+ } finally{
10374
+ if (_d) throw _e;
10375
+ }
10259
10376
  }
10377
+ return _arr;
10260
10378
  }
10261
- function _create_class$b(Constructor, protoProps, staticProps) {
10262
- if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
10263
- if (staticProps) _defineProperties$b(Constructor, staticProps);
10264
- return Constructor;
10379
+ function _non_iterable_rest$a() {
10380
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
10265
10381
  }
10266
- var now = function() {
10267
- return Date.now();
10268
- }, defaultZone = "system", defaultLocale = null, defaultNumberingSystem = null, defaultOutputCalendar = null, twoDigitCutoffYear = 60, throwOnInvalid, defaultWeekSettings = null;
10269
- var Settings = /*#__PURE__*/ function() {
10270
- function Settings() {
10271
- _class_call_check$b(this, Settings);
10272
- }
10273
- _create_class$b(Settings, null, [
10274
- {
10275
- key: "now",
10276
- get: /**
10277
- * Get the callback for returning the current timestamp.
10278
- * @type {function}
10279
- */ function get() {
10280
- return now;
10281
- },
10282
- set: /**
10283
- * Set the callback for returning the current timestamp.
10284
- * The function should return a number, which will be interpreted as an Epoch millisecond count
10285
- * @type {function}
10286
- * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future
10287
- * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
10288
- */ function set(n) {
10289
- now = n;
10290
- }
10291
- },
10292
- {
10293
- key: "defaultZone",
10294
- get: /**
10295
- * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
10296
- * The default value is the system's time zone (the one set on the machine that runs this code).
10297
- * @type {Zone}
10298
- */ function get() {
10299
- return normalizeZone(defaultZone, SystemZone.instance);
10300
- },
10301
- set: /**
10302
- * Set the default time zone to create DateTimes in. Does not affect existing instances.
10303
- * Use the value "system" to reset this value to the system's time zone.
10304
- * @type {string}
10305
- */ function set(zone) {
10306
- defaultZone = zone;
10307
- }
10308
- },
10309
- {
10310
- key: "defaultLocale",
10311
- get: /**
10312
- * Get the default locale to create DateTimes with. Does not affect existing instances.
10313
- * @type {string}
10314
- */ function get() {
10315
- return defaultLocale;
10316
- },
10317
- set: /**
10318
- * Set the default locale to create DateTimes with. Does not affect existing instances.
10319
- * @type {string}
10320
- */ function set(locale) {
10382
+ function _sliced_to_array$a(arr, i) {
10383
+ return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$a();
10384
+ }
10385
+ function _unsupported_iterable_to_array$c(o, minLen) {
10386
+ if (!o) return;
10387
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
10388
+ var n = Object.prototype.toString.call(o).slice(8, -1);
10389
+ if (n === "Object" && o.constructor) n = o.constructor.name;
10390
+ if (n === "Map" || n === "Set") return Array.from(n);
10391
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
10392
+ }
10393
+ var numberingSystems = {
10394
+ arab: "[٠-٩]",
10395
+ arabext: "[۰-۹]",
10396
+ bali: "[᭐-᭙]",
10397
+ beng: "[০-৯]",
10398
+ deva: "[०-९]",
10399
+ fullwide: "[0-9]",
10400
+ gujr: "[૦-૯]",
10401
+ hanidec: "[〇|一|二|三|四|五|六|七|八|九]",
10402
+ khmr: "[០-៩]",
10403
+ knda: "[೦-೯]",
10404
+ laoo: "[໐-໙]",
10405
+ limb: "[᥆-᥏]",
10406
+ mlym: "[൦-൯]",
10407
+ mong: "[᠐-᠙]",
10408
+ mymr: "[၀-၉]",
10409
+ orya: "[୦-୯]",
10410
+ tamldec: "[௦-௯]",
10411
+ telu: "[౦-౯]",
10412
+ thai: "[๐-๙]",
10413
+ tibt: "[༠-༩]",
10414
+ latn: "\\d"
10415
+ };
10416
+ var numberingSystemsUTF16 = {
10417
+ arab: [
10418
+ 1632,
10419
+ 1641
10420
+ ],
10421
+ arabext: [
10422
+ 1776,
10423
+ 1785
10424
+ ],
10425
+ bali: [
10426
+ 6992,
10427
+ 7001
10428
+ ],
10429
+ beng: [
10430
+ 2534,
10431
+ 2543
10432
+ ],
10433
+ deva: [
10434
+ 2406,
10435
+ 2415
10436
+ ],
10437
+ fullwide: [
10438
+ 65296,
10439
+ 65303
10440
+ ],
10441
+ gujr: [
10442
+ 2790,
10443
+ 2799
10444
+ ],
10445
+ khmr: [
10446
+ 6112,
10447
+ 6121
10448
+ ],
10449
+ knda: [
10450
+ 3302,
10451
+ 3311
10452
+ ],
10453
+ laoo: [
10454
+ 3792,
10455
+ 3801
10456
+ ],
10457
+ limb: [
10458
+ 6470,
10459
+ 6479
10460
+ ],
10461
+ mlym: [
10462
+ 3430,
10463
+ 3439
10464
+ ],
10465
+ mong: [
10466
+ 6160,
10467
+ 6169
10468
+ ],
10469
+ mymr: [
10470
+ 4160,
10471
+ 4169
10472
+ ],
10473
+ orya: [
10474
+ 2918,
10475
+ 2927
10476
+ ],
10477
+ tamldec: [
10478
+ 3046,
10479
+ 3055
10480
+ ],
10481
+ telu: [
10482
+ 3174,
10483
+ 3183
10484
+ ],
10485
+ thai: [
10486
+ 3664,
10487
+ 3673
10488
+ ],
10489
+ tibt: [
10490
+ 3872,
10491
+ 3881
10492
+ ]
10493
+ };
10494
+ var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split("");
10495
+ function parseDigits(str) {
10496
+ var value = parseInt(str, 10);
10497
+ if (isNaN(value)) {
10498
+ value = "";
10499
+ for(var i = 0; i < str.length; i++){
10500
+ var code = str.charCodeAt(i);
10501
+ if (str[i].search(numberingSystems.hanidec) !== -1) {
10502
+ value += hanidecChars.indexOf(str[i]);
10503
+ } else {
10504
+ for(var key in numberingSystemsUTF16){
10505
+ var _numberingSystemsUTF16_key = _sliced_to_array$a(numberingSystemsUTF16[key], 2), min = _numberingSystemsUTF16_key[0], max = _numberingSystemsUTF16_key[1];
10506
+ if (code >= min && code <= max) {
10507
+ value += code - min;
10508
+ }
10509
+ }
10510
+ }
10511
+ }
10512
+ return parseInt(value, 10);
10513
+ } else {
10514
+ return value;
10515
+ }
10516
+ }
10517
+ // cache of {numberingSystem: {append: regex}}
10518
+ var digitRegexCache = {};
10519
+ function resetDigitRegexCache() {
10520
+ digitRegexCache = {};
10521
+ }
10522
+ function digitRegex(param) {
10523
+ var numberingSystem = param.numberingSystem, append = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
10524
+ var ns = numberingSystem || "latn";
10525
+ if (!digitRegexCache[ns]) {
10526
+ digitRegexCache[ns] = {};
10527
+ }
10528
+ if (!digitRegexCache[ns][append]) {
10529
+ digitRegexCache[ns][append] = new RegExp("".concat(numberingSystems[ns]).concat(append));
10530
+ }
10531
+ return digitRegexCache[ns][append];
10532
+ }
10533
+
10534
+ function _class_call_check$c(instance, Constructor) {
10535
+ if (!(instance instanceof Constructor)) {
10536
+ throw new TypeError("Cannot call a class as a function");
10537
+ }
10538
+ }
10539
+ function _defineProperties$c(target, props) {
10540
+ for(var i = 0; i < props.length; i++){
10541
+ var descriptor = props[i];
10542
+ descriptor.enumerable = descriptor.enumerable || false;
10543
+ descriptor.configurable = true;
10544
+ if ("value" in descriptor) descriptor.writable = true;
10545
+ Object.defineProperty(target, descriptor.key, descriptor);
10546
+ }
10547
+ }
10548
+ function _create_class$c(Constructor, protoProps, staticProps) {
10549
+ if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
10550
+ if (staticProps) _defineProperties$c(Constructor, staticProps);
10551
+ return Constructor;
10552
+ }
10553
+ var now = function() {
10554
+ return Date.now();
10555
+ }, defaultZone = "system", defaultLocale = null, defaultNumberingSystem = null, defaultOutputCalendar = null, twoDigitCutoffYear = 60, throwOnInvalid, defaultWeekSettings = null;
10556
+ var Settings = /*#__PURE__*/ function() {
10557
+ function Settings() {
10558
+ _class_call_check$c(this, Settings);
10559
+ }
10560
+ _create_class$c(Settings, null, [
10561
+ {
10562
+ key: "now",
10563
+ get: /**
10564
+ * Get the callback for returning the current timestamp.
10565
+ * @type {function}
10566
+ */ function get() {
10567
+ return now;
10568
+ },
10569
+ set: /**
10570
+ * Set the callback for returning the current timestamp.
10571
+ * The function should return a number, which will be interpreted as an Epoch millisecond count
10572
+ * @type {function}
10573
+ * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future
10574
+ * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
10575
+ */ function set(n) {
10576
+ now = n;
10577
+ }
10578
+ },
10579
+ {
10580
+ key: "defaultZone",
10581
+ get: /**
10582
+ * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
10583
+ * The default value is the system's time zone (the one set on the machine that runs this code).
10584
+ * @type {Zone}
10585
+ */ function get() {
10586
+ return normalizeZone(defaultZone, SystemZone.instance);
10587
+ },
10588
+ set: /**
10589
+ * Set the default time zone to create DateTimes in. Does not affect existing instances.
10590
+ * Use the value "system" to reset this value to the system's time zone.
10591
+ * @type {string}
10592
+ */ function set(zone) {
10593
+ defaultZone = zone;
10594
+ }
10595
+ },
10596
+ {
10597
+ key: "defaultLocale",
10598
+ get: /**
10599
+ * Get the default locale to create DateTimes with. Does not affect existing instances.
10600
+ * @type {string}
10601
+ */ function get() {
10602
+ return defaultLocale;
10603
+ },
10604
+ set: /**
10605
+ * Set the default locale to create DateTimes with. Does not affect existing instances.
10606
+ * @type {string}
10607
+ */ function set(locale) {
10321
10608
  defaultLocale = locale;
10322
10609
  }
10323
10610
  },
@@ -10376,16 +10663,17 @@ var Settings = /*#__PURE__*/ function() {
10376
10663
  {
10377
10664
  key: "twoDigitCutoffYear",
10378
10665
  get: /**
10379
- * Get the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
10666
+ * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
10380
10667
  * @type {number}
10381
10668
  */ function get() {
10382
10669
  return twoDigitCutoffYear;
10383
10670
  },
10384
10671
  set: /**
10385
- * Set the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
10672
+ * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
10386
10673
  * @type {number}
10387
- * @example Settings.twoDigitCutoffYear = 0 // cut-off year is 0, so all 'yy' are interpreted as current century
10388
- * @example Settings.twoDigitCutoffYear = 50 // '49' -> 1949; '50' -> 2050
10674
+ * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century
10675
+ * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century
10676
+ * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950
10389
10677
  * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50
10390
10678
  * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
10391
10679
  */ function set(cutoffYear) {
@@ -10415,18 +10703,20 @@ var Settings = /*#__PURE__*/ function() {
10415
10703
  */ function resetCaches() {
10416
10704
  Locale.resetCache();
10417
10705
  IANAZone.resetCache();
10706
+ DateTime.resetCache();
10707
+ resetDigitRegexCache();
10418
10708
  }
10419
10709
  }
10420
10710
  ]);
10421
10711
  return Settings;
10422
10712
  }();
10423
10713
 
10424
- function _class_call_check$a(instance, Constructor) {
10714
+ function _class_call_check$b(instance, Constructor) {
10425
10715
  if (!(instance instanceof Constructor)) {
10426
10716
  throw new TypeError("Cannot call a class as a function");
10427
10717
  }
10428
10718
  }
10429
- function _defineProperties$a(target, props) {
10719
+ function _defineProperties$b(target, props) {
10430
10720
  for(var i = 0; i < props.length; i++){
10431
10721
  var descriptor = props[i];
10432
10722
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10435,18 +10725,18 @@ function _defineProperties$a(target, props) {
10435
10725
  Object.defineProperty(target, descriptor.key, descriptor);
10436
10726
  }
10437
10727
  }
10438
- function _create_class$a(Constructor, protoProps, staticProps) {
10439
- if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
10440
- if (staticProps) _defineProperties$a(Constructor, staticProps);
10728
+ function _create_class$b(Constructor, protoProps, staticProps) {
10729
+ if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
10730
+ if (staticProps) _defineProperties$b(Constructor, staticProps);
10441
10731
  return Constructor;
10442
10732
  }
10443
10733
  var Invalid = /*#__PURE__*/ function() {
10444
10734
  function Invalid(reason, explanation) {
10445
- _class_call_check$a(this, Invalid);
10735
+ _class_call_check$b(this, Invalid);
10446
10736
  this.reason = reason;
10447
10737
  this.explanation = explanation;
10448
10738
  }
10449
- _create_class$a(Invalid, [
10739
+ _create_class$b(Invalid, [
10450
10740
  {
10451
10741
  key: "toMessage",
10452
10742
  value: function toMessage() {
@@ -10610,15 +10900,15 @@ function ordinalToGregorian(ordinalData) {
10610
10900
  * Modifies obj in-place!
10611
10901
  * @param obj the object values
10612
10902
  */ function usesLocalWeekValues(obj, loc) {
10613
- var hasLocaleWeekData = !isUndefined(obj.localWeekday) || !isUndefined(obj.localWeekNumber) || !isUndefined(obj.localWeekYear);
10903
+ var hasLocaleWeekData = !isUndefined$1(obj.localWeekday) || !isUndefined$1(obj.localWeekNumber) || !isUndefined$1(obj.localWeekYear);
10614
10904
  if (hasLocaleWeekData) {
10615
- var hasIsoWeekData = !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);
10905
+ var hasIsoWeekData = !isUndefined$1(obj.weekday) || !isUndefined$1(obj.weekNumber) || !isUndefined$1(obj.weekYear);
10616
10906
  if (hasIsoWeekData) {
10617
10907
  throw new ConflictingSpecificationError("Cannot mix locale-based week fields with ISO-based week fields");
10618
10908
  }
10619
- if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;
10620
- if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;
10621
- if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;
10909
+ if (!isUndefined$1(obj.localWeekday)) obj.weekday = obj.localWeekday;
10910
+ if (!isUndefined$1(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;
10911
+ if (!isUndefined$1(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;
10622
10912
  delete obj.localWeekday;
10623
10913
  delete obj.localWeekNumber;
10624
10914
  delete obj.localWeekYear;
@@ -10711,7 +11001,7 @@ function _object_spread$5(target) {
10711
11001
  /**
10712
11002
  * @private
10713
11003
  */ // TYPES
10714
- function isUndefined(o) {
11004
+ function isUndefined$1(o) {
10715
11005
  return typeof o === "undefined";
10716
11006
  }
10717
11007
  function isNumber$1(o) {
@@ -10812,14 +11102,14 @@ function padStart(input) {
10812
11102
  return padded;
10813
11103
  }
10814
11104
  function parseInteger(string) {
10815
- if (isUndefined(string) || string === null || string === "") {
11105
+ if (isUndefined$1(string) || string === null || string === "") {
10816
11106
  return undefined;
10817
11107
  } else {
10818
11108
  return parseInt(string, 10);
10819
11109
  }
10820
11110
  }
10821
11111
  function parseFloating(string) {
10822
- if (isUndefined(string) || string === null || string === "") {
11112
+ if (isUndefined$1(string) || string === null || string === "") {
10823
11113
  return undefined;
10824
11114
  } else {
10825
11115
  return parseFloat(string);
@@ -10827,7 +11117,7 @@ function parseFloating(string) {
10827
11117
  }
10828
11118
  function parseMillis(fraction) {
10829
11119
  // Return undefined (instead of 0) in these cases, where fraction is not set
10830
- if (isUndefined(fraction) || fraction === null || fraction === "") {
11120
+ if (isUndefined$1(fraction) || fraction === null || fraction === "") {
10831
11121
  return undefined;
10832
11122
  } else {
10833
11123
  var f = parseFloat("0." + fraction) * 1000;
@@ -10945,7 +11235,13 @@ function normalizeObject(obj, normalizer) {
10945
11235
  }
10946
11236
  return normalized;
10947
11237
  }
10948
- function formatOffset(offset, format) {
11238
+ /**
11239
+ * Returns the offset's value as a string
11240
+ * @param {number} ts - Epoch milliseconds for which to get the offset
11241
+ * @param {string} format - What style of offset to return.
11242
+ * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
11243
+ * @return {string}
11244
+ */ function formatOffset(offset, format) {
10949
11245
  var hours = Math.trunc(Math.abs(offset / 60)), minutes = Math.trunc(Math.abs(offset % 60)), sign = offset >= 0 ? "+" : "-";
10950
11246
  switch(format){
10951
11247
  case "short":
@@ -10967,13 +11263,13 @@ function timeObject(obj) {
10967
11263
  ]);
10968
11264
  }
10969
11265
 
10970
- function _array_like_to_array$c(arr, len) {
11266
+ function _array_like_to_array$b(arr, len) {
10971
11267
  if (len == null || len > arr.length) len = arr.length;
10972
11268
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
10973
11269
  return arr2;
10974
11270
  }
10975
11271
  function _array_without_holes$7(arr) {
10976
- if (Array.isArray(arr)) return _array_like_to_array$c(arr);
11272
+ if (Array.isArray(arr)) return _array_like_to_array$b(arr);
10977
11273
  }
10978
11274
  function _iterable_to_array$7(iter) {
10979
11275
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -10982,15 +11278,15 @@ function _non_iterable_spread$7() {
10982
11278
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
10983
11279
  }
10984
11280
  function _to_consumable_array$7(arr) {
10985
- return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$7();
11281
+ return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$7();
10986
11282
  }
10987
- function _unsupported_iterable_to_array$c(o, minLen) {
11283
+ function _unsupported_iterable_to_array$b(o, minLen) {
10988
11284
  if (!o) return;
10989
- if (typeof o === "string") return _array_like_to_array$c(o, minLen);
11285
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
10990
11286
  var n = Object.prototype.toString.call(o).slice(8, -1);
10991
11287
  if (n === "Object" && o.constructor) n = o.constructor.name;
10992
11288
  if (n === "Map" || n === "Set") return Array.from(n);
10993
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
11289
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
10994
11290
  }
10995
11291
  /**
10996
11292
  * @private
@@ -11224,20 +11520,20 @@ function formatRelativeTime(unit, count) {
11224
11520
  return isInPast ? "".concat(fmtValue, " ").concat(fmtUnit, " ago") : "in ".concat(fmtValue, " ").concat(fmtUnit);
11225
11521
  }
11226
11522
 
11227
- function _array_like_to_array$b(arr, len) {
11523
+ function _array_like_to_array$a(arr, len) {
11228
11524
  if (len == null || len > arr.length) len = arr.length;
11229
11525
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11230
11526
  return arr2;
11231
11527
  }
11232
11528
  function _array_without_holes$6(arr) {
11233
- if (Array.isArray(arr)) return _array_like_to_array$b(arr);
11529
+ if (Array.isArray(arr)) return _array_like_to_array$a(arr);
11234
11530
  }
11235
- function _class_call_check$9(instance, Constructor) {
11531
+ function _class_call_check$a(instance, Constructor) {
11236
11532
  if (!(instance instanceof Constructor)) {
11237
11533
  throw new TypeError("Cannot call a class as a function");
11238
11534
  }
11239
11535
  }
11240
- function _defineProperties$9(target, props) {
11536
+ function _defineProperties$a(target, props) {
11241
11537
  for(var i = 0; i < props.length; i++){
11242
11538
  var descriptor = props[i];
11243
11539
  descriptor.enumerable = descriptor.enumerable || false;
@@ -11246,9 +11542,9 @@ function _defineProperties$9(target, props) {
11246
11542
  Object.defineProperty(target, descriptor.key, descriptor);
11247
11543
  }
11248
11544
  }
11249
- function _create_class$9(Constructor, protoProps, staticProps) {
11250
- if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
11251
- if (staticProps) _defineProperties$9(Constructor, staticProps);
11545
+ function _create_class$a(Constructor, protoProps, staticProps) {
11546
+ if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
11547
+ if (staticProps) _defineProperties$a(Constructor, staticProps);
11252
11548
  return Constructor;
11253
11549
  }
11254
11550
  function _define_property$6(obj, key, value) {
@@ -11286,15 +11582,15 @@ function _object_spread$4(target) {
11286
11582
  return target;
11287
11583
  }
11288
11584
  function _to_consumable_array$6(arr) {
11289
- return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$6();
11585
+ return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$6();
11290
11586
  }
11291
- function _unsupported_iterable_to_array$b(o, minLen) {
11587
+ function _unsupported_iterable_to_array$a(o, minLen) {
11292
11588
  if (!o) return;
11293
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
11589
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
11294
11590
  var n = Object.prototype.toString.call(o).slice(8, -1);
11295
11591
  if (n === "Object" && o.constructor) n = o.constructor.name;
11296
11592
  if (n === "Map" || n === "Set") return Array.from(n);
11297
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
11593
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
11298
11594
  }
11299
11595
  function stringifyTokens(splits, tokenToString) {
11300
11596
  var s = "";
@@ -11348,12 +11644,12 @@ var macroTokenToFormatOpts = {
11348
11644
  };
11349
11645
  var Formatter = /*#__PURE__*/ function() {
11350
11646
  function Formatter(locale, formatOpts) {
11351
- _class_call_check$9(this, Formatter);
11647
+ _class_call_check$a(this, Formatter);
11352
11648
  this.opts = formatOpts;
11353
11649
  this.loc = locale;
11354
11650
  this.systemLoc = null;
11355
11651
  }
11356
- _create_class$9(Formatter, [
11652
+ _create_class$a(Formatter, [
11357
11653
  {
11358
11654
  key: "formatWithSystemDefault",
11359
11655
  value: function formatWithSystemDefault(dt, opts) {
@@ -11774,12 +12070,12 @@ var Formatter = /*#__PURE__*/ function() {
11774
12070
  return Formatter;
11775
12071
  }();
11776
12072
 
11777
- function _array_like_to_array$a(arr, len) {
12073
+ function _array_like_to_array$9(arr, len) {
11778
12074
  if (len == null || len > arr.length) len = arr.length;
11779
12075
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11780
12076
  return arr2;
11781
12077
  }
11782
- function _array_with_holes$a(arr) {
12078
+ function _array_with_holes$9(arr) {
11783
12079
  if (Array.isArray(arr)) return arr;
11784
12080
  }
11785
12081
  function _define_property$5(obj, key, value) {
@@ -11795,7 +12091,7 @@ function _define_property$5(obj, key, value) {
11795
12091
  }
11796
12092
  return obj;
11797
12093
  }
11798
- function _iterable_to_array_limit$a(arr, i) {
12094
+ function _iterable_to_array_limit$9(arr, i) {
11799
12095
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
11800
12096
  if (_i == null) return;
11801
12097
  var _arr = [];
@@ -11819,7 +12115,7 @@ function _iterable_to_array_limit$a(arr, i) {
11819
12115
  }
11820
12116
  return _arr;
11821
12117
  }
11822
- function _non_iterable_rest$a() {
12118
+ function _non_iterable_rest$9() {
11823
12119
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11824
12120
  }
11825
12121
  function _object_spread$3(target) {
@@ -11837,16 +12133,16 @@ function _object_spread$3(target) {
11837
12133
  }
11838
12134
  return target;
11839
12135
  }
11840
- function _sliced_to_array$a(arr, i) {
11841
- return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$a();
12136
+ function _sliced_to_array$9(arr, i) {
12137
+ return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$9();
11842
12138
  }
11843
- function _unsupported_iterable_to_array$a(o, minLen) {
12139
+ function _unsupported_iterable_to_array$9(o, minLen) {
11844
12140
  if (!o) return;
11845
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
12141
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
11846
12142
  var n = Object.prototype.toString.call(o).slice(8, -1);
11847
12143
  if (n === "Object" && o.constructor) n = o.constructor.name;
11848
12144
  if (n === "Map" || n === "Set") return Array.from(n);
11849
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
12145
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
11850
12146
  }
11851
12147
  /*
11852
12148
  * This file handles parsing for well-specified formats. Here's how it works:
@@ -11872,8 +12168,8 @@ function combineExtractors() {
11872
12168
  }
11873
12169
  return function(m) {
11874
12170
  return extractors.reduce(function(param, ex) {
11875
- var _param = _sliced_to_array$a(param, 3), mergedVals = _param[0], mergedZone = _param[1], cursor = _param[2];
11876
- var _ex = _sliced_to_array$a(ex(m, cursor), 3), val = _ex[0], zone = _ex[1], next = _ex[2];
12171
+ var _param = _sliced_to_array$9(param, 3), mergedVals = _param[0], mergedZone = _param[1], cursor = _param[2];
12172
+ var _ex = _sliced_to_array$9(ex(m, cursor), 3), val = _ex[0], zone = _ex[1], next = _ex[2];
11877
12173
  return [
11878
12174
  _object_spread$3({}, mergedVals, val),
11879
12175
  zone || mergedZone,
@@ -11899,7 +12195,7 @@ function parse(s) {
11899
12195
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
11900
12196
  try {
11901
12197
  for(var _iterator = patterns[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
11902
- var _step_value = _sliced_to_array$a(_step.value, 2), regex = _step_value[0], extractor = _step_value[1];
12198
+ var _step_value = _sliced_to_array$9(_step.value, 2), regex = _step_value[0], extractor = _step_value[1];
11903
12199
  var m = regex.exec(s);
11904
12200
  if (m) {
11905
12201
  return extractor(m);
@@ -11957,7 +12253,7 @@ var sqlTimeRegex = RegExp("".concat(isoTimeBaseRegex.source, " ?(?:").concat(off
11957
12253
  var sqlTimeExtensionRegex = RegExp("(?: ".concat(sqlTimeRegex.source, ")?"));
11958
12254
  function int(match, pos, fallback) {
11959
12255
  var m = match[pos];
11960
- return isUndefined(m) ? fallback : parseInteger(m);
12256
+ return isUndefined$1(m) ? fallback : parseInteger(m);
11961
12257
  }
11962
12258
  function extractISOYmd(match, cursor) {
11963
12259
  var item = {
@@ -12005,7 +12301,7 @@ var isoTimeOnly = RegExp("^T?".concat(isoTimeBaseRegex.source, "$"));
12005
12301
  // ISO duration parsing
12006
12302
  var isoDuration = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
12007
12303
  function extractISODuration(match) {
12008
- var _match = _sliced_to_array$a(match, 9), s = _match[0], yearStr = _match[1], monthStr = _match[2], weekStr = _match[3], dayStr = _match[4], hourStr = _match[5], minuteStr = _match[6], secondStr = _match[7], millisecondsStr = _match[8];
12304
+ var _match = _sliced_to_array$9(match, 9), s = _match[0], yearStr = _match[1], monthStr = _match[2], weekStr = _match[3], dayStr = _match[4], hourStr = _match[5], minuteStr = _match[6], secondStr = _match[7], millisecondsStr = _match[8];
12009
12305
  var hasNegativePrefix = s[0] === "-";
12010
12306
  var negativeSeconds = secondStr && secondStr[0] === "-";
12011
12307
  var maybeNegate = function(num) {
@@ -12056,7 +12352,7 @@ function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr,
12056
12352
  // RFC 2822/5322
12057
12353
  var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
12058
12354
  function extractRFC2822(match) {
12059
- var _match = _sliced_to_array$a(match, 12), weekdayStr = _match[1], dayStr = _match[2], monthStr = _match[3], yearStr = _match[4], hourStr = _match[5], minuteStr = _match[6], secondStr = _match[7], obsOffset = _match[8], milOffset = _match[9], offHourStr = _match[10], offMinuteStr = _match[11], result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
12355
+ var _match = _sliced_to_array$9(match, 12), weekdayStr = _match[1], dayStr = _match[2], monthStr = _match[3], yearStr = _match[4], hourStr = _match[5], minuteStr = _match[6], secondStr = _match[7], obsOffset = _match[8], milOffset = _match[9], offHourStr = _match[10], offMinuteStr = _match[11], result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
12060
12356
  var offset;
12061
12357
  if (obsOffset) {
12062
12358
  offset = obsOffsets[obsOffset];
@@ -12077,14 +12373,14 @@ function preprocessRFC2822(s) {
12077
12373
  // http date
12078
12374
  var rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
12079
12375
  function extractRFC1123Or850(match) {
12080
- var _match = _sliced_to_array$a(match, 8), weekdayStr = _match[1], dayStr = _match[2], monthStr = _match[3], yearStr = _match[4], hourStr = _match[5], minuteStr = _match[6], secondStr = _match[7], result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
12376
+ var _match = _sliced_to_array$9(match, 8), weekdayStr = _match[1], dayStr = _match[2], monthStr = _match[3], yearStr = _match[4], hourStr = _match[5], minuteStr = _match[6], secondStr = _match[7], result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
12081
12377
  return [
12082
12378
  result,
12083
12379
  FixedOffsetZone.utcInstance
12084
12380
  ];
12085
12381
  }
12086
12382
  function extractASCII(match) {
12087
- var _match = _sliced_to_array$a(match, 8), weekdayStr = _match[1], monthStr = _match[2], dayStr = _match[3], hourStr = _match[4], minuteStr = _match[5], secondStr = _match[6], yearStr = _match[7], result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
12383
+ var _match = _sliced_to_array$9(match, 8), weekdayStr = _match[1], monthStr = _match[2], dayStr = _match[3], hourStr = _match[4], minuteStr = _match[5], secondStr = _match[6], yearStr = _match[7], result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
12088
12384
  return [
12089
12385
  result,
12090
12386
  FixedOffsetZone.utcInstance
@@ -12159,20 +12455,20 @@ function parseSQL(s) {
12159
12455
  ]);
12160
12456
  }
12161
12457
 
12162
- function _array_like_to_array$9(arr, len) {
12458
+ function _array_like_to_array$8(arr, len) {
12163
12459
  if (len == null || len > arr.length) len = arr.length;
12164
12460
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
12165
12461
  return arr2;
12166
12462
  }
12167
- function _array_with_holes$9(arr) {
12463
+ function _array_with_holes$8(arr) {
12168
12464
  if (Array.isArray(arr)) return arr;
12169
12465
  }
12170
- function _class_call_check$8(instance, Constructor) {
12466
+ function _class_call_check$9(instance, Constructor) {
12171
12467
  if (!(instance instanceof Constructor)) {
12172
12468
  throw new TypeError("Cannot call a class as a function");
12173
12469
  }
12174
12470
  }
12175
- function _defineProperties$8(target, props) {
12471
+ function _defineProperties$9(target, props) {
12176
12472
  for(var i = 0; i < props.length; i++){
12177
12473
  var descriptor = props[i];
12178
12474
  descriptor.enumerable = descriptor.enumerable || false;
@@ -12181,9 +12477,9 @@ function _defineProperties$8(target, props) {
12181
12477
  Object.defineProperty(target, descriptor.key, descriptor);
12182
12478
  }
12183
12479
  }
12184
- function _create_class$8(Constructor, protoProps, staticProps) {
12185
- if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
12186
- if (staticProps) _defineProperties$8(Constructor, staticProps);
12480
+ function _create_class$9(Constructor, protoProps, staticProps) {
12481
+ if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
12482
+ if (staticProps) _defineProperties$9(Constructor, staticProps);
12187
12483
  return Constructor;
12188
12484
  }
12189
12485
  function _define_property$4(obj, key, value) {
@@ -12199,14 +12495,14 @@ function _define_property$4(obj, key, value) {
12199
12495
  }
12200
12496
  return obj;
12201
12497
  }
12202
- function _instanceof$6(left, right) {
12498
+ function _instanceof$7(left, right) {
12203
12499
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
12204
12500
  return !!right[Symbol.hasInstance](left);
12205
12501
  } else {
12206
12502
  return left instanceof right;
12207
12503
  }
12208
12504
  }
12209
- function _iterable_to_array_limit$9(arr, i) {
12505
+ function _iterable_to_array_limit$8(arr, i) {
12210
12506
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
12211
12507
  if (_i == null) return;
12212
12508
  var _arr = [];
@@ -12230,7 +12526,7 @@ function _iterable_to_array_limit$9(arr, i) {
12230
12526
  }
12231
12527
  return _arr;
12232
12528
  }
12233
- function _non_iterable_rest$9() {
12529
+ function _non_iterable_rest$8() {
12234
12530
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12235
12531
  }
12236
12532
  function _object_spread$2(target) {
@@ -12272,20 +12568,20 @@ function _object_spread_props$2(target, source) {
12272
12568
  }
12273
12569
  return target;
12274
12570
  }
12275
- function _sliced_to_array$9(arr, i) {
12276
- return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$9();
12571
+ function _sliced_to_array$8(arr, i) {
12572
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
12277
12573
  }
12278
12574
  function _type_of$5(obj) {
12279
12575
  "@swc/helpers - typeof";
12280
12576
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
12281
12577
  }
12282
- function _unsupported_iterable_to_array$9(o, minLen) {
12578
+ function _unsupported_iterable_to_array$8(o, minLen) {
12283
12579
  if (!o) return;
12284
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
12580
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
12285
12581
  var n = Object.prototype.toString.call(o).slice(8, -1);
12286
12582
  if (n === "Object" && o.constructor) n = o.constructor.name;
12287
12583
  if (n === "Map" || n === "Set") return Array.from(n);
12288
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
12584
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
12289
12585
  }
12290
12586
  var INVALID$2 = "Invalid Duration";
12291
12587
  // unit conversion constants
@@ -12430,7 +12726,7 @@ function normalizeValues(matrix, vals) {
12430
12726
  // if this is not the case, factor is used to make it so
12431
12727
  var factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;
12432
12728
  orderedUnits$1.reduceRight(function(previous, current) {
12433
- if (!isUndefined(vals[current])) {
12729
+ if (!isUndefined$1(vals[current])) {
12434
12730
  if (previous) {
12435
12731
  var previousVal = vals[previous] * factor;
12436
12732
  var conv = matrix[current][previous];
@@ -12461,7 +12757,7 @@ function normalizeValues(matrix, vals) {
12461
12757
  // try to convert any decimals into smaller units if possible
12462
12758
  // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }
12463
12759
  orderedUnits$1.reduce(function(previous, current) {
12464
- if (!isUndefined(vals[current])) {
12760
+ if (!isUndefined$1(vals[current])) {
12465
12761
  if (previous) {
12466
12762
  var fraction = vals[previous] % 1;
12467
12763
  vals[previous] -= fraction;
@@ -12479,7 +12775,7 @@ function removeZeroes(vals) {
12479
12775
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
12480
12776
  try {
12481
12777
  for(var _iterator = Object.entries(vals)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
12482
- var _step_value = _sliced_to_array$9(_step.value, 2), key = _step_value[0], value = _step_value[1];
12778
+ var _step_value = _sliced_to_array$8(_step.value, 2), key = _step_value[0], value = _step_value[1];
12483
12779
  if (value !== 0) {
12484
12780
  newVals[key] = value;
12485
12781
  }
@@ -12502,7 +12798,7 @@ function removeZeroes(vals) {
12502
12798
  }
12503
12799
  var Duration = /*#__PURE__*/ function() {
12504
12800
  function Duration(config) {
12505
- _class_call_check$8(this, Duration);
12801
+ _class_call_check$9(this, Duration);
12506
12802
  var accurate = config.conversionAccuracy === "longterm" || false;
12507
12803
  var matrix = accurate ? accurateMatrix : casualMatrix;
12508
12804
  if (config.matrix) {
@@ -12527,7 +12823,7 @@ var Duration = /*#__PURE__*/ function() {
12527
12823
  * @access private
12528
12824
  */ this.isLuxonDuration = true;
12529
12825
  }
12530
- _create_class$8(Duration, [
12826
+ _create_class$9(Duration, [
12531
12827
  {
12532
12828
  key: "locale",
12533
12829
  get: /**
@@ -12600,7 +12896,7 @@ var Duration = /*#__PURE__*/ function() {
12600
12896
  if (!this.isValid) return INVALID$2;
12601
12897
  var l = orderedUnits$1.map(function(unit) {
12602
12898
  var val = _this.values[unit];
12603
- if (isUndefined(val)) {
12899
+ if (isUndefined$1(val)) {
12604
12900
  return null;
12605
12901
  }
12606
12902
  return _this.loc.numberFormatter(_object_spread_props$2(_object_spread$2({
@@ -13289,7 +13585,7 @@ var Duration = /*#__PURE__*/ function() {
13289
13585
  * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }
13290
13586
  * @return {Duration}
13291
13587
  */ function fromISO(text, opts) {
13292
- var _parseISODuration = _sliced_to_array$9(parseISODuration(text), 1), parsed = _parseISODuration[0];
13588
+ var _parseISODuration = _sliced_to_array$8(parseISODuration(text), 1), parsed = _parseISODuration[0];
13293
13589
  if (parsed) {
13294
13590
  return Duration.fromObject(parsed, opts);
13295
13591
  } else {
@@ -13315,7 +13611,7 @@ var Duration = /*#__PURE__*/ function() {
13315
13611
  * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
13316
13612
  * @return {Duration}
13317
13613
  */ function fromISOTime(text, opts) {
13318
- var _parseISOTimeOnly = _sliced_to_array$9(parseISOTimeOnly(text), 1), parsed = _parseISOTimeOnly[0];
13614
+ var _parseISOTimeOnly = _sliced_to_array$8(parseISOTimeOnly(text), 1), parsed = _parseISOTimeOnly[0];
13319
13615
  if (parsed) {
13320
13616
  return Duration.fromObject(parsed, opts);
13321
13617
  } else {
@@ -13335,7 +13631,7 @@ var Duration = /*#__PURE__*/ function() {
13335
13631
  if (!reason) {
13336
13632
  throw new InvalidArgumentError("need to specify a reason the Duration is invalid");
13337
13633
  }
13338
- var invalid = _instanceof$6(reason, Invalid) ? reason : new Invalid(reason, explanation);
13634
+ var invalid = _instanceof$7(reason, Invalid) ? reason : new Invalid(reason, explanation);
13339
13635
  if (Settings.throwOnInvalid) {
13340
13636
  throw new InvalidDurationError(invalid);
13341
13637
  } else {
@@ -13388,23 +13684,23 @@ var Duration = /*#__PURE__*/ function() {
13388
13684
  return Duration;
13389
13685
  }();
13390
13686
 
13391
- function _array_like_to_array$8(arr, len) {
13687
+ function _array_like_to_array$7(arr, len) {
13392
13688
  if (len == null || len > arr.length) len = arr.length;
13393
13689
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
13394
13690
  return arr2;
13395
13691
  }
13396
- function _array_with_holes$8(arr) {
13692
+ function _array_with_holes$7(arr) {
13397
13693
  if (Array.isArray(arr)) return arr;
13398
13694
  }
13399
13695
  function _array_without_holes$5(arr) {
13400
- if (Array.isArray(arr)) return _array_like_to_array$8(arr);
13696
+ if (Array.isArray(arr)) return _array_like_to_array$7(arr);
13401
13697
  }
13402
- function _class_call_check$7(instance, Constructor) {
13698
+ function _class_call_check$8(instance, Constructor) {
13403
13699
  if (!(instance instanceof Constructor)) {
13404
13700
  throw new TypeError("Cannot call a class as a function");
13405
13701
  }
13406
13702
  }
13407
- function _defineProperties$7(target, props) {
13703
+ function _defineProperties$8(target, props) {
13408
13704
  for(var i = 0; i < props.length; i++){
13409
13705
  var descriptor = props[i];
13410
13706
  descriptor.enumerable = descriptor.enumerable || false;
@@ -13413,12 +13709,12 @@ function _defineProperties$7(target, props) {
13413
13709
  Object.defineProperty(target, descriptor.key, descriptor);
13414
13710
  }
13415
13711
  }
13416
- function _create_class$7(Constructor, protoProps, staticProps) {
13417
- if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
13418
- if (staticProps) _defineProperties$7(Constructor, staticProps);
13712
+ function _create_class$8(Constructor, protoProps, staticProps) {
13713
+ if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
13714
+ if (staticProps) _defineProperties$8(Constructor, staticProps);
13419
13715
  return Constructor;
13420
13716
  }
13421
- function _instanceof$5(left, right) {
13717
+ function _instanceof$6(left, right) {
13422
13718
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
13423
13719
  return !!right[Symbol.hasInstance](left);
13424
13720
  } else {
@@ -13428,7 +13724,7 @@ function _instanceof$5(left, right) {
13428
13724
  function _iterable_to_array$5(iter) {
13429
13725
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
13430
13726
  }
13431
- function _iterable_to_array_limit$8(arr, i) {
13727
+ function _iterable_to_array_limit$7(arr, i) {
13432
13728
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
13433
13729
  if (_i == null) return;
13434
13730
  var _arr = [];
@@ -13452,25 +13748,25 @@ function _iterable_to_array_limit$8(arr, i) {
13452
13748
  }
13453
13749
  return _arr;
13454
13750
  }
13455
- function _non_iterable_rest$8() {
13751
+ function _non_iterable_rest$7() {
13456
13752
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13457
13753
  }
13458
13754
  function _non_iterable_spread$5() {
13459
13755
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13460
13756
  }
13461
- function _sliced_to_array$8(arr, i) {
13462
- return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
13757
+ function _sliced_to_array$7(arr, i) {
13758
+ return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$7();
13463
13759
  }
13464
13760
  function _to_consumable_array$5(arr) {
13465
- return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$5();
13761
+ return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$5();
13466
13762
  }
13467
- function _unsupported_iterable_to_array$8(o, minLen) {
13763
+ function _unsupported_iterable_to_array$7(o, minLen) {
13468
13764
  if (!o) return;
13469
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
13765
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
13470
13766
  var n = Object.prototype.toString.call(o).slice(8, -1);
13471
13767
  if (n === "Object" && o.constructor) n = o.constructor.name;
13472
13768
  if (n === "Map" || n === "Set") return Array.from(n);
13473
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
13769
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
13474
13770
  }
13475
13771
  var INVALID$1 = "Invalid Interval";
13476
13772
  // checks if the start is equal to or before the end
@@ -13487,7 +13783,7 @@ function validateStartEnd(start, end) {
13487
13783
  }
13488
13784
  var Interval = /*#__PURE__*/ function() {
13489
13785
  function Interval(config) {
13490
- _class_call_check$7(this, Interval);
13786
+ _class_call_check$8(this, Interval);
13491
13787
  /**
13492
13788
  * @access private
13493
13789
  */ this.s = config.start;
@@ -13501,7 +13797,7 @@ var Interval = /*#__PURE__*/ function() {
13501
13797
  * @access private
13502
13798
  */ this.isLuxonInterval = true;
13503
13799
  }
13504
- _create_class$7(Interval, [
13800
+ _create_class$8(Interval, [
13505
13801
  {
13506
13802
  key: "start",
13507
13803
  get: /**
@@ -13750,7 +14046,7 @@ var Interval = /*#__PURE__*/ function() {
13750
14046
  },
13751
14047
  {
13752
14048
  /**
13753
- * Return whether this Interval engulfs the start and end of the specified Interval.
14049
+ * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.
13754
14050
  * @param {Interval} other
13755
14051
  * @return {boolean}
13756
14052
  */ key: "engulfs",
@@ -13970,7 +14266,7 @@ var Interval = /*#__PURE__*/ function() {
13970
14266
  if (!reason) {
13971
14267
  throw new InvalidArgumentError("need to specify a reason the Interval is invalid");
13972
14268
  }
13973
- var invalid = _instanceof$5(reason, Invalid) ? reason : new Invalid(reason, explanation);
14269
+ var invalid = _instanceof$6(reason, Invalid) ? reason : new Invalid(reason, explanation);
13974
14270
  if (Settings.throwOnInvalid) {
13975
14271
  throw new InvalidIntervalError(invalid);
13976
14272
  } else {
@@ -14034,7 +14330,7 @@ var Interval = /*#__PURE__*/ function() {
14034
14330
  * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
14035
14331
  * @return {Interval}
14036
14332
  */ function fromISO(text, opts) {
14037
- var _split = _sliced_to_array$8((text || "").split("/", 2), 2), s = _split[0], e = _split[1];
14333
+ var _split = _sliced_to_array$7((text || "").split("/", 2), 2), s = _split[0], e = _split[1];
14038
14334
  if (s && e) {
14039
14335
  var start, startIsValid;
14040
14336
  try {
@@ -14086,10 +14382,10 @@ var Interval = /*#__PURE__*/ function() {
14086
14382
  * @param {Array} intervals
14087
14383
  * @return {Array}
14088
14384
  */ function merge(intervals) {
14089
- var _intervals_sort_reduce = _sliced_to_array$8(intervals.sort(function(a, b) {
14385
+ var _intervals_sort_reduce = _sliced_to_array$7(intervals.sort(function(a, b) {
14090
14386
  return a.s - b.s;
14091
14387
  }).reduce(function(param, item) {
14092
- var _param = _sliced_to_array$8(param, 2), sofar = _param[0], current = _param[1];
14388
+ var _param = _sliced_to_array$7(param, 2), sofar = _param[0], current = _param[1];
14093
14389
  if (!current) {
14094
14390
  return [
14095
14391
  sofar,
@@ -14176,12 +14472,12 @@ var Interval = /*#__PURE__*/ function() {
14176
14472
  return Interval;
14177
14473
  }();
14178
14474
 
14179
- function _class_call_check$6(instance, Constructor) {
14475
+ function _class_call_check$7(instance, Constructor) {
14180
14476
  if (!(instance instanceof Constructor)) {
14181
14477
  throw new TypeError("Cannot call a class as a function");
14182
14478
  }
14183
14479
  }
14184
- function _defineProperties$6(target, props) {
14480
+ function _defineProperties$7(target, props) {
14185
14481
  for(var i = 0; i < props.length; i++){
14186
14482
  var descriptor = props[i];
14187
14483
  descriptor.enumerable = descriptor.enumerable || false;
@@ -14190,16 +14486,16 @@ function _defineProperties$6(target, props) {
14190
14486
  Object.defineProperty(target, descriptor.key, descriptor);
14191
14487
  }
14192
14488
  }
14193
- function _create_class$6(Constructor, protoProps, staticProps) {
14194
- if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
14195
- if (staticProps) _defineProperties$6(Constructor, staticProps);
14489
+ function _create_class$7(Constructor, protoProps, staticProps) {
14490
+ if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
14491
+ if (staticProps) _defineProperties$7(Constructor, staticProps);
14196
14492
  return Constructor;
14197
14493
  }
14198
14494
  var Info = /*#__PURE__*/ function() {
14199
14495
  function Info() {
14200
- _class_call_check$6(this, Info);
14496
+ _class_call_check$7(this, Info);
14201
14497
  }
14202
- _create_class$6(Info, null, [
14498
+ _create_class$7(Info, null, [
14203
14499
  {
14204
14500
  key: "hasDST",
14205
14501
  value: /**
@@ -14417,16 +14713,16 @@ var Info = /*#__PURE__*/ function() {
14417
14713
  return Info;
14418
14714
  }();
14419
14715
 
14420
- function _array_like_to_array$7(arr, len) {
14716
+ function _array_like_to_array$6(arr, len) {
14421
14717
  if (len == null || len > arr.length) len = arr.length;
14422
14718
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14423
14719
  return arr2;
14424
14720
  }
14425
- function _array_with_holes$7(arr) {
14721
+ function _array_with_holes$6(arr) {
14426
14722
  if (Array.isArray(arr)) return arr;
14427
14723
  }
14428
14724
  function _array_without_holes$4(arr) {
14429
- if (Array.isArray(arr)) return _array_like_to_array$7(arr);
14725
+ if (Array.isArray(arr)) return _array_like_to_array$6(arr);
14430
14726
  }
14431
14727
  function _define_property$3(obj, key, value) {
14432
14728
  if (key in obj) {
@@ -14444,7 +14740,7 @@ function _define_property$3(obj, key, value) {
14444
14740
  function _iterable_to_array$4(iter) {
14445
14741
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14446
14742
  }
14447
- function _iterable_to_array_limit$7(arr, i) {
14743
+ function _iterable_to_array_limit$6(arr, i) {
14448
14744
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
14449
14745
  if (_i == null) return;
14450
14746
  var _arr = [];
@@ -14468,25 +14764,25 @@ function _iterable_to_array_limit$7(arr, i) {
14468
14764
  }
14469
14765
  return _arr;
14470
14766
  }
14471
- function _non_iterable_rest$7() {
14767
+ function _non_iterable_rest$6() {
14472
14768
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14473
14769
  }
14474
14770
  function _non_iterable_spread$4() {
14475
14771
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14476
14772
  }
14477
- function _sliced_to_array$7(arr, i) {
14478
- return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$7();
14773
+ function _sliced_to_array$6(arr, i) {
14774
+ return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$6();
14479
14775
  }
14480
14776
  function _to_consumable_array$4(arr) {
14481
- return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$4();
14777
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$4();
14482
14778
  }
14483
- function _unsupported_iterable_to_array$7(o, minLen) {
14779
+ function _unsupported_iterable_to_array$6(o, minLen) {
14484
14780
  if (!o) return;
14485
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
14781
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
14486
14782
  var n = Object.prototype.toString.call(o).slice(8, -1);
14487
14783
  if (n === "Object" && o.constructor) n = o.constructor.name;
14488
14784
  if (n === "Map" || n === "Set") return Array.from(n);
14489
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
14785
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
14490
14786
  }
14491
14787
  function dayDiff(earlier, later) {
14492
14788
  var utcDayStart = function(dt) {
@@ -14541,7 +14837,7 @@ function highOrderDiffs(cursor, later, units) {
14541
14837
  this is used later to potentially convert any difference smaller than the smallest higher order unit
14542
14838
  into a fraction of that smallest higher order unit
14543
14839
  */ for(var _iterator = differs[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
14544
- var _step_value = _sliced_to_array$7(_step.value, 2), unit = _step_value[0], differ = _step_value[1];
14840
+ var _step_value = _sliced_to_array$6(_step.value, 2), unit = _step_value[0], differ = _step_value[1];
14545
14841
  if (units.indexOf(unit) >= 0) {
14546
14842
  lowestOrder = unit;
14547
14843
  results[unit] = differ(cursor, later);
@@ -14566,227 +14862,52 @@ function highOrderDiffs(cursor, later, units) {
14566
14862
  }
14567
14863
  }
14568
14864
  } catch (err) {
14569
- _didIteratorError = true;
14570
- _iteratorError = err;
14571
- } finally{
14572
- try {
14573
- if (!_iteratorNormalCompletion && _iterator.return != null) {
14574
- _iterator.return();
14575
- }
14576
- } finally{
14577
- if (_didIteratorError) {
14578
- throw _iteratorError;
14579
- }
14580
- }
14581
- }
14582
- return [
14583
- cursor,
14584
- results,
14585
- highWater,
14586
- lowestOrder
14587
- ];
14588
- }
14589
- function diff(earlier, later, units, opts) {
14590
- var _highOrderDiffs = _sliced_to_array$7(highOrderDiffs(earlier, later, units), 4), cursor = _highOrderDiffs[0], results = _highOrderDiffs[1], highWater = _highOrderDiffs[2], lowestOrder = _highOrderDiffs[3];
14591
- var remainingMillis = later - cursor;
14592
- var lowerOrderUnits = units.filter(function(u) {
14593
- return [
14594
- "hours",
14595
- "minutes",
14596
- "seconds",
14597
- "milliseconds"
14598
- ].indexOf(u) >= 0;
14599
- });
14600
- if (lowerOrderUnits.length === 0) {
14601
- if (highWater < later) {
14602
- highWater = cursor.plus(_define_property$3({}, lowestOrder, 1));
14603
- }
14604
- if (highWater !== cursor) {
14605
- results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
14606
- }
14607
- }
14608
- var duration = Duration.fromObject(results, opts);
14609
- if (lowerOrderUnits.length > 0) {
14610
- var _Duration_fromMillis;
14611
- return (_Duration_fromMillis = Duration.fromMillis(remainingMillis, opts)).shiftTo.apply(_Duration_fromMillis, _to_consumable_array$4(lowerOrderUnits)).plus(duration);
14612
- } else {
14613
- return duration;
14614
- }
14615
- }
14616
-
14617
- function _array_like_to_array$6(arr, len) {
14618
- if (len == null || len > arr.length) len = arr.length;
14619
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14620
- return arr2;
14621
- }
14622
- function _array_with_holes$6(arr) {
14623
- if (Array.isArray(arr)) return arr;
14624
- }
14625
- function _iterable_to_array_limit$6(arr, i) {
14626
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
14627
- if (_i == null) return;
14628
- var _arr = [];
14629
- var _n = true;
14630
- var _d = false;
14631
- var _s, _e;
14632
- try {
14633
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
14634
- _arr.push(_s.value);
14635
- if (i && _arr.length === i) break;
14636
- }
14637
- } catch (err) {
14638
- _d = true;
14639
- _e = err;
14640
- } finally{
14641
- try {
14642
- if (!_n && _i["return"] != null) _i["return"]();
14643
- } finally{
14644
- if (_d) throw _e;
14645
- }
14646
- }
14647
- return _arr;
14648
- }
14649
- function _non_iterable_rest$6() {
14650
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14651
- }
14652
- function _sliced_to_array$6(arr, i) {
14653
- return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$6();
14654
- }
14655
- function _unsupported_iterable_to_array$6(o, minLen) {
14656
- if (!o) return;
14657
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
14658
- var n = Object.prototype.toString.call(o).slice(8, -1);
14659
- if (n === "Object" && o.constructor) n = o.constructor.name;
14660
- if (n === "Map" || n === "Set") return Array.from(n);
14661
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
14662
- }
14663
- var numberingSystems = {
14664
- arab: "[٠-٩]",
14665
- arabext: "[۰-۹]",
14666
- bali: "[᭐-᭙]",
14667
- beng: "[০-৯]",
14668
- deva: "[०-९]",
14669
- fullwide: "[0-9]",
14670
- gujr: "[૦-૯]",
14671
- hanidec: "[〇|一|二|三|四|五|六|七|八|九]",
14672
- khmr: "[០-៩]",
14673
- knda: "[೦-೯]",
14674
- laoo: "[໐-໙]",
14675
- limb: "[᥆-᥏]",
14676
- mlym: "[൦-൯]",
14677
- mong: "[᠐-᠙]",
14678
- mymr: "[၀-၉]",
14679
- orya: "[୦-୯]",
14680
- tamldec: "[௦-௯]",
14681
- telu: "[౦-౯]",
14682
- thai: "[๐-๙]",
14683
- tibt: "[༠-༩]",
14684
- latn: "\\d"
14685
- };
14686
- var numberingSystemsUTF16 = {
14687
- arab: [
14688
- 1632,
14689
- 1641
14690
- ],
14691
- arabext: [
14692
- 1776,
14693
- 1785
14694
- ],
14695
- bali: [
14696
- 6992,
14697
- 7001
14698
- ],
14699
- beng: [
14700
- 2534,
14701
- 2543
14702
- ],
14703
- deva: [
14704
- 2406,
14705
- 2415
14706
- ],
14707
- fullwide: [
14708
- 65296,
14709
- 65303
14710
- ],
14711
- gujr: [
14712
- 2790,
14713
- 2799
14714
- ],
14715
- khmr: [
14716
- 6112,
14717
- 6121
14718
- ],
14719
- knda: [
14720
- 3302,
14721
- 3311
14722
- ],
14723
- laoo: [
14724
- 3792,
14725
- 3801
14726
- ],
14727
- limb: [
14728
- 6470,
14729
- 6479
14730
- ],
14731
- mlym: [
14732
- 3430,
14733
- 3439
14734
- ],
14735
- mong: [
14736
- 6160,
14737
- 6169
14738
- ],
14739
- mymr: [
14740
- 4160,
14741
- 4169
14742
- ],
14743
- orya: [
14744
- 2918,
14745
- 2927
14746
- ],
14747
- tamldec: [
14748
- 3046,
14749
- 3055
14750
- ],
14751
- telu: [
14752
- 3174,
14753
- 3183
14754
- ],
14755
- thai: [
14756
- 3664,
14757
- 3673
14758
- ],
14759
- tibt: [
14760
- 3872,
14761
- 3881
14762
- ]
14763
- };
14764
- var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split("");
14765
- function parseDigits(str) {
14766
- var value = parseInt(str, 10);
14767
- if (isNaN(value)) {
14768
- value = "";
14769
- for(var i = 0; i < str.length; i++){
14770
- var code = str.charCodeAt(i);
14771
- if (str[i].search(numberingSystems.hanidec) !== -1) {
14772
- value += hanidecChars.indexOf(str[i]);
14773
- } else {
14774
- for(var key in numberingSystemsUTF16){
14775
- var _numberingSystemsUTF16_key = _sliced_to_array$6(numberingSystemsUTF16[key], 2), min = _numberingSystemsUTF16_key[0], max = _numberingSystemsUTF16_key[1];
14776
- if (code >= min && code <= max) {
14777
- value += code - min;
14778
- }
14779
- }
14865
+ _didIteratorError = true;
14866
+ _iteratorError = err;
14867
+ } finally{
14868
+ try {
14869
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
14870
+ _iterator.return();
14871
+ }
14872
+ } finally{
14873
+ if (_didIteratorError) {
14874
+ throw _iteratorError;
14780
14875
  }
14781
14876
  }
14782
- return parseInt(value, 10);
14783
- } else {
14784
- return value;
14785
14877
  }
14878
+ return [
14879
+ cursor,
14880
+ results,
14881
+ highWater,
14882
+ lowestOrder
14883
+ ];
14786
14884
  }
14787
- function digitRegex(param) {
14788
- var numberingSystem = param.numberingSystem, append = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
14789
- return new RegExp("".concat(numberingSystems[numberingSystem || "latn"]).concat(append));
14885
+ function diff(earlier, later, units, opts) {
14886
+ var _highOrderDiffs = _sliced_to_array$6(highOrderDiffs(earlier, later, units), 4), cursor = _highOrderDiffs[0], results = _highOrderDiffs[1], highWater = _highOrderDiffs[2], lowestOrder = _highOrderDiffs[3];
14887
+ var remainingMillis = later - cursor;
14888
+ var lowerOrderUnits = units.filter(function(u) {
14889
+ return [
14890
+ "hours",
14891
+ "minutes",
14892
+ "seconds",
14893
+ "milliseconds"
14894
+ ].indexOf(u) >= 0;
14895
+ });
14896
+ if (lowerOrderUnits.length === 0) {
14897
+ if (highWater < later) {
14898
+ highWater = cursor.plus(_define_property$3({}, lowestOrder, 1));
14899
+ }
14900
+ if (highWater !== cursor) {
14901
+ results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
14902
+ }
14903
+ }
14904
+ var duration = Duration.fromObject(results, opts);
14905
+ if (lowerOrderUnits.length > 0) {
14906
+ var _Duration_fromMillis;
14907
+ return (_Duration_fromMillis = Duration.fromMillis(remainingMillis, opts)).shiftTo.apply(_Duration_fromMillis, _to_consumable_array$4(lowerOrderUnits)).plus(duration);
14908
+ } else {
14909
+ return duration;
14910
+ }
14790
14911
  }
14791
14912
 
14792
14913
  function _array_like_to_array$5(arr, len) {
@@ -14800,6 +14921,25 @@ function _array_with_holes$5(arr) {
14800
14921
  function _array_without_holes$3(arr) {
14801
14922
  if (Array.isArray(arr)) return _array_like_to_array$5(arr);
14802
14923
  }
14924
+ function _class_call_check$6(instance, Constructor) {
14925
+ if (!(instance instanceof Constructor)) {
14926
+ throw new TypeError("Cannot call a class as a function");
14927
+ }
14928
+ }
14929
+ function _defineProperties$6(target, props) {
14930
+ for(var i = 0; i < props.length; i++){
14931
+ var descriptor = props[i];
14932
+ descriptor.enumerable = descriptor.enumerable || false;
14933
+ descriptor.configurable = true;
14934
+ if ("value" in descriptor) descriptor.writable = true;
14935
+ Object.defineProperty(target, descriptor.key, descriptor);
14936
+ }
14937
+ }
14938
+ function _create_class$6(Constructor, protoProps, staticProps) {
14939
+ if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
14940
+ if (staticProps) _defineProperties$6(Constructor, staticProps);
14941
+ return Constructor;
14942
+ }
14803
14943
  function _iterable_to_array$3(iter) {
14804
14944
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14805
14945
  }
@@ -15206,19 +15346,19 @@ function dateTimeFromMatches(matches) {
15206
15346
  };
15207
15347
  var zone = null;
15208
15348
  var specificOffset;
15209
- if (!isUndefined(matches.z)) {
15349
+ if (!isUndefined$1(matches.z)) {
15210
15350
  zone = IANAZone.create(matches.z);
15211
15351
  }
15212
- if (!isUndefined(matches.Z)) {
15352
+ if (!isUndefined$1(matches.Z)) {
15213
15353
  if (!zone) {
15214
15354
  zone = new FixedOffsetZone(matches.Z);
15215
15355
  }
15216
15356
  specificOffset = matches.Z;
15217
15357
  }
15218
- if (!isUndefined(matches.q)) {
15358
+ if (!isUndefined$1(matches.q)) {
15219
15359
  matches.M = (matches.q - 1) * 3 + 1;
15220
15360
  }
15221
- if (!isUndefined(matches.h)) {
15361
+ if (!isUndefined$1(matches.h)) {
15222
15362
  if (matches.h < 12 && matches.a === 1) {
15223
15363
  matches.h += 12;
15224
15364
  } else if (matches.h === 12 && matches.a === 0) {
@@ -15228,7 +15368,7 @@ function dateTimeFromMatches(matches) {
15228
15368
  if (matches.G === 0 && matches.y) {
15229
15369
  matches.y = -matches.y;
15230
15370
  }
15231
- if (!isUndefined(matches.u)) {
15371
+ if (!isUndefined$1(matches.u)) {
15232
15372
  matches.S = parseMillis(matches.u);
15233
15373
  }
15234
15374
  var vals = Object.keys(matches).reduce(function(r, k) {
@@ -15270,38 +15410,74 @@ function expandMacroTokens(tokens, locale) {
15270
15410
  }
15271
15411
  /**
15272
15412
  * @private
15273
- */ function explainFromTokens(locale, input, format) {
15274
- var tokens = expandMacroTokens(Formatter.parseFormat(format), locale), units = tokens.map(function(t) {
15275
- return unitForToken(t, locale);
15276
- }), disqualifyingUnit = units.find(function(t) {
15277
- return t.invalidReason;
15278
- });
15279
- if (disqualifyingUnit) {
15280
- return {
15281
- input: input,
15282
- tokens: tokens,
15283
- invalidReason: disqualifyingUnit.invalidReason
15284
- };
15285
- } else {
15286
- var _buildRegex = _sliced_to_array$5(buildRegex(units), 2), regexString = _buildRegex[0], handlers = _buildRegex[1], regex = RegExp(regexString, "i"), _match = _sliced_to_array$5(match(input, regex, handlers), 2), rawMatches = _match[0], matches = _match[1], _ref = _sliced_to_array$5(matches ? dateTimeFromMatches(matches) : [
15287
- null,
15288
- null,
15289
- undefined
15290
- ], 3), result = _ref[0], zone = _ref[1], specificOffset = _ref[2];
15291
- if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) {
15292
- throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");
15413
+ */ var TokenParser = /*#__PURE__*/ function() {
15414
+ function TokenParser(locale, format) {
15415
+ _class_call_check$6(this, TokenParser);
15416
+ this.locale = locale;
15417
+ this.format = format;
15418
+ this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale);
15419
+ this.units = this.tokens.map(function(t) {
15420
+ return unitForToken(t, locale);
15421
+ });
15422
+ this.disqualifyingUnit = this.units.find(function(t) {
15423
+ return t.invalidReason;
15424
+ });
15425
+ if (!this.disqualifyingUnit) {
15426
+ var _buildRegex = _sliced_to_array$5(buildRegex(this.units), 2), regexString = _buildRegex[0], handlers = _buildRegex[1];
15427
+ this.regex = RegExp(regexString, "i");
15428
+ this.handlers = handlers;
15293
15429
  }
15294
- return {
15295
- input: input,
15296
- tokens: tokens,
15297
- regex: regex,
15298
- rawMatches: rawMatches,
15299
- matches: matches,
15300
- result: result,
15301
- zone: zone,
15302
- specificOffset: specificOffset
15303
- };
15304
15430
  }
15431
+ _create_class$6(TokenParser, [
15432
+ {
15433
+ key: "explainFromTokens",
15434
+ value: function explainFromTokens(input) {
15435
+ if (!this.isValid) {
15436
+ return {
15437
+ input: input,
15438
+ tokens: this.tokens,
15439
+ invalidReason: this.invalidReason
15440
+ };
15441
+ } else {
15442
+ var _match = _sliced_to_array$5(match(input, this.regex, this.handlers), 2), rawMatches = _match[0], matches = _match[1], _ref = _sliced_to_array$5(matches ? dateTimeFromMatches(matches) : [
15443
+ null,
15444
+ null,
15445
+ undefined
15446
+ ], 3), result = _ref[0], zone = _ref[1], specificOffset = _ref[2];
15447
+ if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) {
15448
+ throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");
15449
+ }
15450
+ return {
15451
+ input: input,
15452
+ tokens: this.tokens,
15453
+ regex: this.regex,
15454
+ rawMatches: rawMatches,
15455
+ matches: matches,
15456
+ result: result,
15457
+ zone: zone,
15458
+ specificOffset: specificOffset
15459
+ };
15460
+ }
15461
+ }
15462
+ },
15463
+ {
15464
+ key: "isValid",
15465
+ get: function get() {
15466
+ return !this.disqualifyingUnit;
15467
+ }
15468
+ },
15469
+ {
15470
+ key: "invalidReason",
15471
+ get: function get() {
15472
+ return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;
15473
+ }
15474
+ }
15475
+ ]);
15476
+ return TokenParser;
15477
+ }();
15478
+ function explainFromTokens(locale, input, format) {
15479
+ var parser = new TokenParser(locale, format);
15480
+ return parser.explainFromTokens(input);
15305
15481
  }
15306
15482
  function parseFromTokens(locale, input, format) {
15307
15483
  var _explainFromTokens = explainFromTokens(locale, input, format), result = _explainFromTokens.result, zone = _explainFromTokens.zone, specificOffset = _explainFromTokens.specificOffset, invalidReason = _explainFromTokens.invalidReason;
@@ -15365,7 +15541,7 @@ function _define_property$2(obj, key, value) {
15365
15541
  }
15366
15542
  return obj;
15367
15543
  }
15368
- function _instanceof$4(left, right) {
15544
+ function _instanceof$5(left, right) {
15369
15545
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
15370
15546
  return !!right[Symbol.hasInstance](left);
15371
15547
  } else {
@@ -15736,19 +15912,51 @@ function normalizeUnitWithLocalWeeks(unit) {
15736
15912
  return normalizeUnit(unit);
15737
15913
  }
15738
15914
  }
15915
+ // cache offsets for zones based on the current timestamp when this function is
15916
+ // first called. When we are handling a datetime from components like (year,
15917
+ // month, day, hour) in a time zone, we need a guess about what the timezone
15918
+ // offset is so that we can convert into a UTC timestamp. One way is to find the
15919
+ // offset of now in the zone. The actual date may have a different offset (for
15920
+ // example, if we handle a date in June while we're in December in a zone that
15921
+ // observes DST), but we can check and adjust that.
15922
+ //
15923
+ // When handling many dates, calculating the offset for now every time is
15924
+ // expensive. It's just a guess, so we can cache the offset to use even if we
15925
+ // are right on a time change boundary (we'll just correct in the other
15926
+ // direction). Using a timestamp from first read is a slight optimization for
15927
+ // handling dates close to the current date, since those dates will usually be
15928
+ // in the same offset (we could set the timestamp statically, instead). We use a
15929
+ // single timestamp for all zones to make things a bit more predictable.
15930
+ //
15931
+ // This is safe for quickDT (used by local() and utc()) because we don't fill in
15932
+ // higher-order units from tsNow (as we do in fromObject, this requires that
15933
+ // offset is calculated from tsNow).
15934
+ function guessOffsetForZone(zone) {
15935
+ if (!zoneOffsetGuessCache[zone]) {
15936
+ if (zoneOffsetTs === undefined) {
15937
+ zoneOffsetTs = Settings.now();
15938
+ }
15939
+ zoneOffsetGuessCache[zone] = zone.offset(zoneOffsetTs);
15940
+ }
15941
+ return zoneOffsetGuessCache[zone];
15942
+ }
15739
15943
  // this is a dumbed down version of fromObject() that runs about 60% faster
15740
15944
  // but doesn't do any validation, makes a bunch of assumptions about what units
15741
15945
  // are present, and so on.
15742
15946
  function quickDT(obj, opts) {
15743
- var zone = normalizeZone(opts.zone, Settings.defaultZone), loc = Locale.fromObject(opts), tsNow = Settings.now();
15947
+ var zone = normalizeZone(opts.zone, Settings.defaultZone);
15948
+ if (!zone.isValid) {
15949
+ return DateTime.invalid(unsupportedZone(zone));
15950
+ }
15951
+ var loc = Locale.fromObject(opts);
15744
15952
  var ts, o;
15745
15953
  // assume we have the higher-order units
15746
- if (!isUndefined(obj.year)) {
15954
+ if (!isUndefined$1(obj.year)) {
15747
15955
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
15748
15956
  try {
15749
15957
  for(var _iterator = orderedUnits[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
15750
15958
  var u = _step.value;
15751
- if (isUndefined(obj[u])) {
15959
+ if (isUndefined$1(obj[u])) {
15752
15960
  obj[u] = defaultUnitValues[u];
15753
15961
  }
15754
15962
  }
@@ -15770,11 +15978,11 @@ function quickDT(obj, opts) {
15770
15978
  if (invalid) {
15771
15979
  return DateTime.invalid(invalid);
15772
15980
  }
15773
- var offsetProvis = zone.offset(tsNow);
15981
+ var offsetProvis = guessOffsetForZone(zone);
15774
15982
  var ref;
15775
15983
  ref = _sliced_to_array$4(objToTS(obj, offsetProvis, zone), 2), ts = ref[0], o = ref[1];
15776
15984
  } else {
15777
- ts = tsNow;
15985
+ ts = Settings.now();
15778
15986
  }
15779
15987
  return new DateTime({
15780
15988
  ts: ts,
@@ -15784,7 +15992,7 @@ function quickDT(obj, opts) {
15784
15992
  });
15785
15993
  }
15786
15994
  function diffRelative(start, end, opts) {
15787
- var round = isUndefined(opts.round) ? true : opts.round, format = function(c, unit) {
15995
+ var round = isUndefined$1(opts.round) ? true : opts.round, format = function(c, unit) {
15788
15996
  c = roundTo(c, round || opts.calendary ? 0 : 2, true);
15789
15997
  var formatter = end.loc.clone(opts).relFormatter(opts);
15790
15998
  return formatter.format(c, unit);
@@ -15838,6 +16046,15 @@ function lastOpts(argList) {
15838
16046
  args
15839
16047
  ];
15840
16048
  }
16049
+ /**
16050
+ * Timestamp to use for cached zone offset guesses (exposed for test)
16051
+ */ var zoneOffsetTs;
16052
+ /**
16053
+ * Cache for zone offset guesses (exposed for test).
16054
+ *
16055
+ * This optimizes quickDT via guessOffsetForZone to avoid repeated calls of
16056
+ * zone.offset().
16057
+ */ var zoneOffsetGuessCache = {};
15841
16058
  var DateTime = /*#__PURE__*/ function() {
15842
16059
  function DateTime(config) {
15843
16060
  _class_call_check$5(this, DateTime);
@@ -15845,7 +16062,7 @@ var DateTime = /*#__PURE__*/ function() {
15845
16062
  var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null);
15846
16063
  /**
15847
16064
  * @access private
15848
- */ this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;
16065
+ */ this.ts = isUndefined$1(config.ts) ? Settings.now() : config.ts;
15849
16066
  var c = null, o = null;
15850
16067
  if (!invalid) {
15851
16068
  var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);
@@ -15856,7 +16073,9 @@ var DateTime = /*#__PURE__*/ function() {
15856
16073
  config.old.o
15857
16074
  ], c = ref[0], o = ref[1];
15858
16075
  } else {
15859
- var ot = zone.offset(this.ts);
16076
+ // If an offset has been passed and we have not been called from
16077
+ // clone(), we can trust it and avoid the offset calculation.
16078
+ var ot = isNumber$1(config.o) && !config.old ? config.o : zone.offset(this.ts);
15860
16079
  c = tsToObj(this.ts, ot);
15861
16080
  invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null;
15862
16081
  c = invalid ? null : c;
@@ -16494,7 +16713,7 @@ var DateTime = /*#__PURE__*/ function() {
16494
16713
  if (!this.isValid) return this;
16495
16714
  var normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);
16496
16715
  var _usesLocalWeekValues = usesLocalWeekValues(normalized, this.loc), minDaysInFirstWeek = _usesLocalWeekValues.minDaysInFirstWeek, startOfWeek = _usesLocalWeekValues.startOfWeek;
16497
- var settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;
16716
+ var settingWeekStuff = !isUndefined$1(normalized.weekYear) || !isUndefined$1(normalized.weekNumber) || !isUndefined$1(normalized.weekday), containsOrdinal = !isUndefined$1(normalized.ordinal), containsGregorYear = !isUndefined$1(normalized.year), containsGregorMD = !isUndefined$1(normalized.month) || !isUndefined$1(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;
16498
16717
  if ((containsGregor || containsOrdinal) && definiteWeekDef) {
16499
16718
  throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");
16500
16719
  }
@@ -16504,13 +16723,13 @@ var DateTime = /*#__PURE__*/ function() {
16504
16723
  var mixed;
16505
16724
  if (settingWeekStuff) {
16506
16725
  mixed = weekToGregorian(_object_spread$1({}, gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), normalized), minDaysInFirstWeek, startOfWeek);
16507
- } else if (!isUndefined(normalized.ordinal)) {
16726
+ } else if (!isUndefined$1(normalized.ordinal)) {
16508
16727
  mixed = ordinalToGregorian(_object_spread$1({}, gregorianToOrdinal(this.c), normalized));
16509
16728
  } else {
16510
16729
  mixed = _object_spread$1({}, this.toObject(), normalized);
16511
16730
  // if we didn't set the day but we ended up on an overflow date,
16512
16731
  // use the last day of the right month
16513
- if (isUndefined(normalized.day)) {
16732
+ if (isUndefined$1(normalized.day)) {
16514
16733
  mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);
16515
16734
  }
16516
16735
  }
@@ -17189,6 +17408,7 @@ var DateTime = /*#__PURE__*/ function() {
17189
17408
  * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
17190
17409
  * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance
17191
17410
  * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance
17411
+ * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance
17192
17412
  * @example DateTime.utc() //~> now
17193
17413
  * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z
17194
17414
  * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z
@@ -17248,13 +17468,14 @@ var DateTime = /*#__PURE__*/ function() {
17248
17468
  * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
17249
17469
  * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
17250
17470
  * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
17471
+ * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
17251
17472
  * @return {DateTime}
17252
17473
  */ function fromMillis(milliseconds) {
17253
17474
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
17254
17475
  if (!isNumber$1(milliseconds)) {
17255
17476
  throw new InvalidArgumentError("fromMillis requires a numerical input, but received a ".concat(typeof milliseconds === "undefined" ? "undefined" : _type_of$4(milliseconds), " with value ").concat(milliseconds));
17256
17477
  } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {
17257
- // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start
17478
+ // this isn't perfect because we can still end up out of range because of additional shifting, but it's a start
17258
17479
  return DateTime.invalid("Timestamp out of range");
17259
17480
  } else {
17260
17481
  return new DateTime({
@@ -17275,6 +17496,7 @@ var DateTime = /*#__PURE__*/ function() {
17275
17496
  * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
17276
17497
  * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
17277
17498
  * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
17499
+ * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
17278
17500
  * @return {DateTime}
17279
17501
  */ function fromSeconds(seconds) {
17280
17502
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -17313,6 +17535,7 @@ var DateTime = /*#__PURE__*/ function() {
17313
17535
  * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance
17314
17536
  * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
17315
17537
  * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
17538
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
17316
17539
  * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'
17317
17540
  * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'
17318
17541
  * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06
@@ -17332,7 +17555,7 @@ var DateTime = /*#__PURE__*/ function() {
17332
17555
  var loc = Locale.fromObject(opts);
17333
17556
  var normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);
17334
17557
  var _usesLocalWeekValues = usesLocalWeekValues(normalized, loc), minDaysInFirstWeek = _usesLocalWeekValues.minDaysInFirstWeek, startOfWeek = _usesLocalWeekValues.startOfWeek;
17335
- var tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;
17558
+ var tsNow = Settings.now(), offsetProvis = !isUndefined$1(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), containsOrdinal = !isUndefined$1(normalized.ordinal), containsGregorYear = !isUndefined$1(normalized.year), containsGregorMD = !isUndefined$1(normalized.month) || !isUndefined$1(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;
17336
17559
  // cases:
17337
17560
  // just a weekday -> this week's instance of that weekday, no worries
17338
17561
  // (gregorian data or ordinal) + (weekYear or weekNumber) -> error
@@ -17366,7 +17589,7 @@ var DateTime = /*#__PURE__*/ function() {
17366
17589
  for(var _iterator = units[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
17367
17590
  var u = _step.value;
17368
17591
  var v = normalized[u];
17369
- if (!isUndefined(v)) {
17592
+ if (!isUndefined$1(v)) {
17370
17593
  foundFirst = true;
17371
17594
  } else if (foundFirst) {
17372
17595
  normalized[u] = defaultValues[u];
@@ -17404,6 +17627,9 @@ var DateTime = /*#__PURE__*/ function() {
17404
17627
  if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {
17405
17628
  return DateTime.invalid("mismatched weekday", "you can't specify both a weekday of ".concat(normalized.weekday, " and a date of ").concat(inst.toISO()));
17406
17629
  }
17630
+ if (!inst.isValid) {
17631
+ return DateTime.invalid(inst.invalid);
17632
+ }
17407
17633
  return inst;
17408
17634
  }
17409
17635
  },
@@ -17418,6 +17644,7 @@ var DateTime = /*#__PURE__*/ function() {
17418
17644
  * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
17419
17645
  * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance
17420
17646
  * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance
17647
+ * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance
17421
17648
  * @example DateTime.fromISO('2016-05-25T09:08:34.123')
17422
17649
  * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')
17423
17650
  * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})
@@ -17441,6 +17668,7 @@ var DateTime = /*#__PURE__*/ function() {
17441
17668
  * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
17442
17669
  * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
17443
17670
  * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
17671
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
17444
17672
  * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')
17445
17673
  * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')
17446
17674
  * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')
@@ -17463,6 +17691,7 @@ var DateTime = /*#__PURE__*/ function() {
17463
17691
  * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
17464
17692
  * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
17465
17693
  * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
17694
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
17466
17695
  * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')
17467
17696
  * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')
17468
17697
  * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')
@@ -17485,11 +17714,12 @@ var DateTime = /*#__PURE__*/ function() {
17485
17714
  * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
17486
17715
  * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
17487
17716
  * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
17717
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
17488
17718
  * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
17489
17719
  * @return {DateTime}
17490
17720
  */ function fromFormat(text, fmt) {
17491
17721
  var opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
17492
- if (isUndefined(text) || isUndefined(fmt)) {
17722
+ if (isUndefined$1(text) || isUndefined$1(fmt)) {
17493
17723
  throw new InvalidArgumentError("fromFormat requires an input string and a format");
17494
17724
  }
17495
17725
  var _opts_locale = opts.locale, locale = _opts_locale === void 0 ? null : _opts_locale, _opts_numberingSystem = opts.numberingSystem, numberingSystem = _opts_numberingSystem === void 0 ? null : _opts_numberingSystem, localeToUse = Locale.fromOpts({
@@ -17524,6 +17754,7 @@ var DateTime = /*#__PURE__*/ function() {
17524
17754
  * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
17525
17755
  * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
17526
17756
  * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
17757
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
17527
17758
  * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
17528
17759
  * @example DateTime.fromSQL('2017-05-15')
17529
17760
  * @example DateTime.fromSQL('2017-05-15 09:12:34')
@@ -17552,7 +17783,7 @@ var DateTime = /*#__PURE__*/ function() {
17552
17783
  if (!reason) {
17553
17784
  throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");
17554
17785
  }
17555
- var invalid = _instanceof$4(reason, Invalid) ? reason : new Invalid(reason, explanation);
17786
+ var invalid = _instanceof$5(reason, Invalid) ? reason : new Invalid(reason, explanation);
17556
17787
  if (Settings.throwOnInvalid) {
17557
17788
  throw new InvalidDateTimeError(invalid);
17558
17789
  } else {
@@ -17603,6 +17834,13 @@ var DateTime = /*#__PURE__*/ function() {
17603
17834
  }).join("");
17604
17835
  }
17605
17836
  },
17837
+ {
17838
+ key: "resetCache",
17839
+ value: function resetCache() {
17840
+ zoneOffsetTs = undefined;
17841
+ zoneOffsetGuessCache = {};
17842
+ }
17843
+ },
17606
17844
  {
17607
17845
  key: "min",
17608
17846
  value: /**
@@ -17667,6 +17905,61 @@ var DateTime = /*#__PURE__*/ function() {
17667
17905
  return DateTime.fromFormatExplain(text, fmt, options);
17668
17906
  }
17669
17907
  },
17908
+ {
17909
+ key: "buildFormatParser",
17910
+ value: /**
17911
+ * Build a parser for `fmt` using the given locale. This parser can be passed
17912
+ * to {@link DateTime.fromFormatParser} to a parse a date in this format. This
17913
+ * can be used to optimize cases where many dates need to be parsed in a
17914
+ * specific format.
17915
+ *
17916
+ * @param {String} fmt - the format the string is expected to be in (see
17917
+ * description)
17918
+ * @param {Object} options - options used to set locale and numberingSystem
17919
+ * for parser
17920
+ * @returns {TokenParser} - opaque object to be used
17921
+ */ function buildFormatParser(fmt) {
17922
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
17923
+ var _options_locale = options.locale, locale = _options_locale === void 0 ? null : _options_locale, _options_numberingSystem = options.numberingSystem, numberingSystem = _options_numberingSystem === void 0 ? null : _options_numberingSystem, localeToUse = Locale.fromOpts({
17924
+ locale: locale,
17925
+ numberingSystem: numberingSystem,
17926
+ defaultToEN: true
17927
+ });
17928
+ return new TokenParser(localeToUse, fmt);
17929
+ }
17930
+ },
17931
+ {
17932
+ key: "fromFormatParser",
17933
+ value: /**
17934
+ * Create a DateTime from an input string and format parser.
17935
+ *
17936
+ * The format parser must have been created with the same locale as this call.
17937
+ *
17938
+ * @param {String} text - the string to parse
17939
+ * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}
17940
+ * @param {Object} opts - options taken by fromFormat()
17941
+ * @returns {DateTime}
17942
+ */ function fromFormatParser(text, formatParser) {
17943
+ var opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
17944
+ if (isUndefined$1(text) || isUndefined$1(formatParser)) {
17945
+ throw new InvalidArgumentError("fromFormatParser requires an input string and a format parser");
17946
+ }
17947
+ var _opts_locale = opts.locale, locale = _opts_locale === void 0 ? null : _opts_locale, _opts_numberingSystem = opts.numberingSystem, numberingSystem = _opts_numberingSystem === void 0 ? null : _opts_numberingSystem, localeToUse = Locale.fromOpts({
17948
+ locale: locale,
17949
+ numberingSystem: numberingSystem,
17950
+ defaultToEN: true
17951
+ });
17952
+ if (!localeToUse.equals(formatParser.locale)) {
17953
+ throw new InvalidArgumentError("fromFormatParser called with a locale of ".concat(localeToUse, ", ") + "but the format parser was created for ".concat(formatParser.locale));
17954
+ }
17955
+ var _formatParser_explainFromTokens = formatParser.explainFromTokens(text), result = _formatParser_explainFromTokens.result, zone = _formatParser_explainFromTokens.zone, specificOffset = _formatParser_explainFromTokens.specificOffset, invalidReason = _formatParser_explainFromTokens.invalidReason;
17956
+ if (invalidReason) {
17957
+ return DateTime.invalid(invalidReason);
17958
+ } else {
17959
+ return parseDataToDateTime(result, zone, opts, "format ".concat(formatParser.format), text, specificOffset);
17960
+ }
17961
+ }
17962
+ },
17670
17963
  {
17671
17964
  key: "DATE_SHORT",
17672
17965
  get: // FORMAT PRESETS
@@ -17937,7 +18230,7 @@ function _inherits$2(subClass, superClass) {
17937
18230
  });
17938
18231
  if (superClass) _set_prototype_of$2(subClass, superClass);
17939
18232
  }
17940
- function _instanceof$3(left, right) {
18233
+ function _instanceof$4(left, right) {
17941
18234
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17942
18235
  return !!right[Symbol.hasInstance](left);
17943
18236
  } else {
@@ -18866,14 +19159,14 @@ function resolveNode(node, pos, side, overlays) {
18866
19159
  var _a;
18867
19160
  // Move up to a node that actually holds the position, if possible
18868
19161
  while(node.from == node.to || (side < 1 ? node.from >= pos : node.from > pos) || (side > -1 ? node.to <= pos : node.to < pos)){
18869
- var parent = !overlays && _instanceof$3(node, TreeNode) && node.index < 0 ? null : node.parent;
19162
+ var parent = !overlays && _instanceof$4(node, TreeNode) && node.index < 0 ? null : node.parent;
18870
19163
  if (!parent) return node;
18871
19164
  node = parent;
18872
19165
  }
18873
19166
  var mode = overlays ? 0 : IterMode.IgnoreOverlays;
18874
19167
  // Must go up out of overlays when those do not overlap with pos
18875
19168
  if (overlays) for(var scan = node, parent1 = scan.parent; parent1; scan = parent1, parent1 = scan.parent){
18876
- if (_instanceof$3(scan, TreeNode) && scan.index < 0 && ((_a = parent1.enter(pos, side, mode)) === null || _a === void 0 ? void 0 : _a.from) != scan.from) node = parent1;
19169
+ if (_instanceof$4(scan, TreeNode) && scan.index < 0 && ((_a = parent1.enter(pos, side, mode)) === null || _a === void 0 ? void 0 : _a.from) != scan.from) node = parent1;
18877
19170
  }
18878
19171
  for(;;){
18879
19172
  var inner = node.enter(pos, side, mode);
@@ -18925,7 +19218,7 @@ var BaseNode = /*#__PURE__*/ function() {
18925
19218
  {
18926
19219
  key: "matchContext",
18927
19220
  value: function matchContext(context) {
18928
- return matchNodeContext(this, context);
19221
+ return matchNodeContext(this.parent, context);
18929
19222
  }
18930
19223
  },
18931
19224
  {
@@ -19001,7 +19294,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
19001
19294
  for(var _parent__tree = parent._tree, children = _parent__tree.children, positions = _parent__tree.positions, e = dir > 0 ? children.length : -1; i != e; i += dir){
19002
19295
  var next = children[i], start = positions[i] + parent.from;
19003
19296
  if (!checkSide(side, pos, start, start + next.length)) continue;
19004
- if (_instanceof$3(next, TreeBuffer)) {
19297
+ if (_instanceof$4(next, TreeBuffer)) {
19005
19298
  if (mode & IterMode.ExcludeBuffers) continue;
19006
19299
  var index = next.findChild(0, next.buffer.length, dir, pos - start, side);
19007
19300
  if (index > -1) return new BufferNode(new BufferContext(parent, next, i, start), null, index);
@@ -19139,7 +19432,7 @@ function getChildren(node, type, before, after) {
19139
19432
  }
19140
19433
  function matchNodeContext(node, context) {
19141
19434
  var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : context.length - 1;
19142
- for(var p = node.parent; i >= 0; p = p.parent){
19435
+ for(var p = node; i >= 0; p = p.parent){
19143
19436
  if (!p) return false;
19144
19437
  if (!p.type.isAnonymous) {
19145
19438
  if (context[i] && context[i] != p.name) return false;
@@ -19300,7 +19593,7 @@ function iterStack(heads) {
19300
19593
  pick = i;
19301
19594
  }
19302
19595
  }
19303
- var next = _instanceof$3(picked, TreeNode) && picked.index < 0 ? null : picked.parent;
19596
+ var next = _instanceof$4(picked, TreeNode) && picked.index < 0 ? null : picked.parent;
19304
19597
  var newHeads = heads.slice();
19305
19598
  if (next) newHeads[pick] = next;
19306
19599
  else newHeads.splice(pick, 1);
@@ -19324,7 +19617,7 @@ var StackIterator = /*#__PURE__*/ function() {
19324
19617
  }();
19325
19618
  function stackIterator(tree, pos, side) {
19326
19619
  var inner = tree.resolveInner(pos, side), layers = null;
19327
- for(var scan = _instanceof$3(inner, TreeNode) ? inner : inner.context.parent; scan; scan = scan.parent){
19620
+ for(var scan = _instanceof$4(inner, TreeNode) ? inner : inner.context.parent; scan; scan = scan.parent){
19328
19621
  if (scan.index < 0) {
19329
19622
  var parent = scan.parent;
19330
19623
  (layers || (layers = [
@@ -19362,7 +19655,7 @@ allows you to move to adjacent nodes.
19362
19655
  @internal
19363
19656
  */ this.index = 0;
19364
19657
  this.bufferNode = null;
19365
- if (_instanceof$3(node, TreeNode)) {
19658
+ if (_instanceof$4(node, TreeNode)) {
19366
19659
  this.yieldNode(node);
19367
19660
  } else {
19368
19661
  this._tree = node.context.parent;
@@ -19409,7 +19702,7 @@ allows you to move to adjacent nodes.
19409
19702
  */ key: "yield",
19410
19703
  value: function _yield(node) {
19411
19704
  if (!node) return false;
19412
- if (_instanceof$3(node, TreeNode)) {
19705
+ if (_instanceof$4(node, TreeNode)) {
19413
19706
  this.buffer = null;
19414
19707
  return this.yieldNode(node);
19415
19708
  }
@@ -19550,7 +19843,7 @@ allows you to move to adjacent nodes.
19550
19843
  for(; parent; ref2 = parent, index = ref2.index, parent = ref2._parent, ref2){
19551
19844
  if (index > -1) for(var i1 = index + dir, e = dir < 0 ? -1 : parent._tree.children.length; i1 != e; i1 += dir){
19552
19845
  var child = parent._tree.children[i1];
19553
- if (this.mode & IterMode.IncludeAnonymous || _instanceof$3(child, TreeBuffer) || !child.type.isAnonymous || hasChild(child)) return false;
19846
+ if (this.mode & IterMode.IncludeAnonymous || _instanceof$4(child, TreeBuffer) || !child.type.isAnonymous || hasChild(child)) return false;
19554
19847
  }
19555
19848
  }
19556
19849
  return true;
@@ -19581,7 +19874,7 @@ allows you to move to adjacent nodes.
19581
19874
  },
19582
19875
  {
19583
19876
  /**
19584
- Move to the next node in a last-to-first pre-order traveral. A
19877
+ Move to the next node in a last-to-first pre-order traversal. A
19585
19878
  node is followed by its last child or, if it has none, its
19586
19879
  previous sibling or the previous sibling of the first parent
19587
19880
  node that has one.
@@ -19659,8 +19952,8 @@ allows you to move to adjacent nodes.
19659
19952
  for(;;){
19660
19953
  if (mustLeave && leave) leave(this);
19661
19954
  mustLeave = this.type.isAnonymous;
19662
- if (this.nextSibling()) break;
19663
19955
  if (!depth) return;
19956
+ if (this.nextSibling()) break;
19664
19957
  this.parent();
19665
19958
  depth--;
19666
19959
  mustLeave = true;
@@ -19675,10 +19968,10 @@ allows you to move to adjacent nodes.
19675
19968
  are treated as wildcards.
19676
19969
  */ key: "matchContext",
19677
19970
  value: function matchContext(context) {
19678
- if (!this.buffer) return matchNodeContext(this.node, context);
19971
+ if (!this.buffer) return matchNodeContext(this.node.parent, context);
19679
19972
  var buffer = this.buffer.buffer, types = buffer.set.types;
19680
19973
  for(var i = context.length - 1, d = this.stack.length - 1; i >= 0; d--){
19681
- if (d < 0) return matchNodeContext(this.node, context, i);
19974
+ if (d < 0) return matchNodeContext(this._tree, context, i);
19682
19975
  var type = types[buffer.buffer[this.stack[d]]];
19683
19976
  if (!type.isAnonymous) {
19684
19977
  if (context[i] && context[i] != type.name) return false;
@@ -19693,7 +19986,7 @@ allows you to move to adjacent nodes.
19693
19986
  }();
19694
19987
  function hasChild(tree) {
19695
19988
  return tree.children.some(function(ch) {
19696
- return _instanceof$3(ch, TreeBuffer) || !ch.type.isAnonymous || hasChild(ch);
19989
+ return _instanceof$4(ch, TreeBuffer) || !ch.type.isAnonymous || hasChild(ch);
19697
19990
  });
19698
19991
  }
19699
19992
  function buildTree(data) {
@@ -19704,7 +19997,7 @@ function buildTree(data) {
19704
19997
  var contextHash = 0, lookAhead = 0;
19705
19998
  function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {
19706
19999
  var id = cursor.id, start = cursor.start, end = cursor.end, size = cursor.size;
19707
- var lookAheadAtStart = lookAhead;
20000
+ var lookAheadAtStart = lookAhead, contextAtStart = contextHash;
19708
20001
  while(size < 0){
19709
20002
  cursor.next();
19710
20003
  if (size == -1 /* SpecialRecord.Reuse */ ) {
@@ -19740,7 +20033,7 @@ function buildTree(data) {
19740
20033
  while(cursor.pos > endPos1){
19741
20034
  if (localInRepeat >= 0 && cursor.id == localInRepeat && cursor.size >= 0) {
19742
20035
  if (cursor.end <= lastEnd - maxBufferLength) {
19743
- makeRepeatLeaf(localChildren, localPositions, start, lastGroup, cursor.end, lastEnd, localInRepeat, lookAheadAtStart);
20036
+ makeRepeatLeaf(localChildren, localPositions, start, lastGroup, cursor.end, lastEnd, localInRepeat, lookAheadAtStart, contextAtStart);
19744
20037
  lastGroup = localChildren.length;
19745
20038
  lastEnd = cursor.end;
19746
20039
  }
@@ -19751,14 +20044,14 @@ function buildTree(data) {
19751
20044
  takeNode(start, endPos1, localChildren, localPositions, localInRepeat, depth + 1);
19752
20045
  }
19753
20046
  }
19754
- if (localInRepeat >= 0 && lastGroup > 0 && lastGroup < localChildren.length) makeRepeatLeaf(localChildren, localPositions, start, lastGroup, start, lastEnd, localInRepeat, lookAheadAtStart);
20047
+ if (localInRepeat >= 0 && lastGroup > 0 && lastGroup < localChildren.length) makeRepeatLeaf(localChildren, localPositions, start, lastGroup, start, lastEnd, localInRepeat, lookAheadAtStart, contextAtStart);
19755
20048
  localChildren.reverse();
19756
20049
  localPositions.reverse();
19757
20050
  if (localInRepeat > -1 && lastGroup > 0) {
19758
- var make = makeBalanced(type);
20051
+ var make = makeBalanced(type, contextAtStart);
19759
20052
  node1 = balanceRange(type, localChildren, localPositions, 0, localChildren.length, 0, end - start, make, make);
19760
20053
  } else {
19761
- node1 = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end);
20054
+ node1 = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end, contextAtStart);
19762
20055
  }
19763
20056
  }
19764
20057
  children.push(node1);
@@ -19793,27 +20086,26 @@ function buildTree(data) {
19793
20086
  positions.push(start1 - parentStart);
19794
20087
  }
19795
20088
  }
19796
- function makeBalanced(type) {
20089
+ function makeBalanced(type, contextHash) {
19797
20090
  return function(children, positions, length) {
19798
20091
  var lookAhead = 0, lastI = children.length - 1, last, lookAheadProp;
19799
- if (lastI >= 0 && _instanceof$3(last = children[lastI], Tree)) {
20092
+ if (lastI >= 0 && _instanceof$4(last = children[lastI], Tree)) {
19800
20093
  if (!lastI && last.type == type && last.length == length) return last;
19801
20094
  if (lookAheadProp = last.prop(NodeProp.lookAhead)) lookAhead = positions[lastI] + last.length + lookAheadProp;
19802
20095
  }
19803
- return makeTree(type, children, positions, length, lookAhead);
20096
+ return makeTree(type, children, positions, length, lookAhead, contextHash);
19804
20097
  };
19805
20098
  }
19806
- function makeRepeatLeaf(children, positions, base, i, from, to, type, lookAhead) {
20099
+ function makeRepeatLeaf(children, positions, base, i, from, to, type, lookAhead, contextHash) {
19807
20100
  var localChildren = [], localPositions = [];
19808
20101
  while(children.length > i){
19809
20102
  localChildren.push(children.pop());
19810
20103
  localPositions.push(positions.pop() + base - from);
19811
20104
  }
19812
- children.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead - to));
20105
+ children.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead - to, contextHash));
19813
20106
  positions.push(from - base);
19814
20107
  }
19815
- function makeTree(type, children, positions, length) {
19816
- var lookAhead = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, props = arguments.length > 5 ? arguments[5] : void 0;
20108
+ function makeTree(type, children, positions, length, lookAhead, contextHash, props) {
19817
20109
  if (contextHash) {
19818
20110
  var pair = [
19819
20111
  NodeProp.contextHash,
@@ -19918,7 +20210,7 @@ function buildTree(data) {
19918
20210
  }
19919
20211
  var nodeSizeCache = new WeakMap;
19920
20212
  function nodeSize(balanceType, node) {
19921
- if (!balanceType.isAnonymous || _instanceof$3(node, TreeBuffer) || node.type != balanceType) return 1;
20213
+ if (!balanceType.isAnonymous || _instanceof$4(node, TreeBuffer) || node.type != balanceType) return 1;
19922
20214
  var size = nodeSizeCache.get(node);
19923
20215
  if (size == null) {
19924
20216
  size = 1;
@@ -19926,7 +20218,7 @@ function nodeSize(balanceType, node) {
19926
20218
  try {
19927
20219
  for(var _iterator = node.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
19928
20220
  var child = _step.value;
19929
- if (child.type != balanceType || !_instanceof$3(child, Tree)) {
20221
+ if (child.type != balanceType || !_instanceof$4(child, Tree)) {
19930
20222
  size = 1;
19931
20223
  break;
19932
20224
  }
@@ -20125,7 +20417,7 @@ function _inherits$1(subClass, superClass) {
20125
20417
  });
20126
20418
  if (superClass) _set_prototype_of$1(subClass, superClass);
20127
20419
  }
20128
- function _instanceof$2(left, right) {
20420
+ function _instanceof$3(left, right) {
20129
20421
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
20130
20422
  return !!right[Symbol.hasInstance](left);
20131
20423
  } else {
@@ -20324,14 +20616,15 @@ about the parse state.
20324
20616
  var _a;
20325
20617
  var depth = action >> 19 /* Action.ReduceDepthShift */ , type = action & 65535 /* Action.ValueMask */ ;
20326
20618
  var parser = this.p.parser;
20327
- if (this.reducePos < this.pos - 25 /* Lookahead.Margin */ ) this.setLookAhead(this.pos);
20619
+ var lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */ ;
20620
+ if (lookaheadRecord) this.setLookAhead(this.pos);
20328
20621
  var dPrec = parser.dynamicPrecedence(type);
20329
20622
  if (dPrec) this.score += dPrec;
20330
20623
  if (depth == 0) {
20331
20624
  this.pushState(parser.getGoto(this.state, type, true), this.reducePos);
20332
20625
  // Zero-depth reductions are a special case—they add stuff to
20333
20626
  // the stack without popping anything off.
20334
- if (type < parser.minRepeatTerm) this.storeNode(type, this.reducePos, this.reducePos, 4, true);
20627
+ if (type < parser.minRepeatTerm) this.storeNode(type, this.reducePos, this.reducePos, lookaheadRecord ? 8 : 4, true);
20335
20628
  this.reduceContext(type, this.reducePos);
20336
20629
  return;
20337
20630
  }
@@ -20377,7 +20670,7 @@ about the parse state.
20377
20670
  @internal
20378
20671
  */ key: "storeNode",
20379
20672
  value: function storeNode(term, start, end) {
20380
- var size = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 4, isReduce = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
20673
+ var size = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 4, mustSink = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
20381
20674
  if (term == 0 /* Term.Err */ && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
20382
20675
  // Try to omit/merge adjacent error nodes
20383
20676
  var cur = this, top = this.buffer.length;
@@ -20393,18 +20686,27 @@ about the parse state.
20393
20686
  }
20394
20687
  }
20395
20688
  }
20396
- if (!isReduce || this.pos == end) {
20689
+ if (!mustSink || this.pos == end) {
20397
20690
  this.buffer.push(term, start, end, size);
20398
20691
  } else {
20399
20692
  var index = this.buffer.length;
20400
- if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */ ) while(index > 0 && this.buffer[index - 2] > end){
20401
- // Move this record forward
20402
- this.buffer[index] = this.buffer[index - 4];
20403
- this.buffer[index + 1] = this.buffer[index - 3];
20404
- this.buffer[index + 2] = this.buffer[index - 2];
20405
- this.buffer[index + 3] = this.buffer[index - 1];
20406
- index -= 4;
20407
- if (size > 4) size -= 4;
20693
+ if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */ ) {
20694
+ var mustMove = false;
20695
+ for(var scan = index; scan > 0 && this.buffer[scan - 2] > end; scan -= 4){
20696
+ if (this.buffer[scan - 1] >= 0) {
20697
+ mustMove = true;
20698
+ break;
20699
+ }
20700
+ }
20701
+ if (mustMove) while(index > 0 && this.buffer[index - 2] > end){
20702
+ // Move this record forward
20703
+ this.buffer[index] = this.buffer[index - 4];
20704
+ this.buffer[index + 1] = this.buffer[index - 3];
20705
+ this.buffer[index + 2] = this.buffer[index - 2];
20706
+ this.buffer[index + 3] = this.buffer[index - 1];
20707
+ index -= 4;
20708
+ if (size > 4) size -= 4;
20709
+ }
20408
20710
  }
20409
20711
  this.buffer[index] = term;
20410
20712
  this.buffer[index + 1] = start;
@@ -21345,7 +21647,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
21345
21647
  this.nextStart = start;
21346
21648
  return null;
21347
21649
  }
21348
- if (_instanceof$2(next, Tree)) {
21650
+ if (_instanceof$3(next, Tree)) {
21349
21651
  if (start == pos) {
21350
21652
  if (start < this.safeFrom) return null;
21351
21653
  var end = start + next.length;
@@ -21648,9 +21950,9 @@ var Parse = /*#__PURE__*/ function() {
21648
21950
  if (verbose) console.log(base + this.stackID(stack) + " (via reuse of ".concat(parser.getName(cached.type.id), ")"));
21649
21951
  return true;
21650
21952
  }
21651
- if (!_instanceof$2(cached, Tree) || cached.children.length == 0 || cached.positions[0] > 0) break;
21953
+ if (!_instanceof$3(cached, Tree) || cached.children.length == 0 || cached.positions[0] > 0) break;
21652
21954
  var inner = cached.children[0];
21653
- if (_instanceof$2(inner, Tree) && cached.positions[0] == 0) cached = inner;
21955
+ if (_instanceof$3(inner, Tree) && cached.positions[0] == 0) cached = inner;
21654
21956
  else break;
21655
21957
  }
21656
21958
  }
@@ -22241,6 +22543,76 @@ function getSpecializer(spec) {
22241
22543
  return spec.get;
22242
22544
  }
22243
22545
 
22546
+ var nativeToString = Object.prototype.toString;
22547
+ var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
22548
+ function isUndefined(obj) {
22549
+ return obj === undefined;
22550
+ }
22551
+ function isNil(obj) {
22552
+ return obj == null;
22553
+ }
22554
+ function isArray$1(obj) {
22555
+ return nativeToString.call(obj) === "[object Array]";
22556
+ }
22557
+ /**
22558
+ * Return true, if target owns a property with the given key.
22559
+ *
22560
+ * @param {Object} target
22561
+ * @param {String} key
22562
+ *
22563
+ * @return {Boolean}
22564
+ */ function has(target, key) {
22565
+ return !isNil(target) && nativeHasOwnProperty.call(target, key);
22566
+ }
22567
+ /**
22568
+ * Iterate over collection; returning something
22569
+ * (non-undefined) will stop iteration.
22570
+ *
22571
+ * @template T
22572
+ * @param {Collection<T>} collection
22573
+ * @param { ((item: T, idx: number) => (boolean|void)) | ((item: T, key: string) => (boolean|void)) } iterator
22574
+ *
22575
+ * @return {T} return result that stopped the iteration
22576
+ */ function forEach(collection, iterator) {
22577
+ var val, result;
22578
+ if (isUndefined(collection)) {
22579
+ return;
22580
+ }
22581
+ var convertKey = isArray$1(collection) ? toNum : identity;
22582
+ for(var key in collection){
22583
+ if (has(collection, key)) {
22584
+ val = collection[key];
22585
+ result = iterator(val, convertKey(key));
22586
+ if (result === false) {
22587
+ return val;
22588
+ }
22589
+ }
22590
+ }
22591
+ }
22592
+ /**
22593
+ * Reduce collection, returning a single result.
22594
+ *
22595
+ * @template T
22596
+ * @template V
22597
+ *
22598
+ * @param {Collection<T>} collection
22599
+ * @param {(result: V, entry: T, index: any) => V} iterator
22600
+ * @param {V} result
22601
+ *
22602
+ * @return {V} result returned from last iterator
22603
+ */ function reduce(collection, iterator, result) {
22604
+ forEach(collection, function(value, idx) {
22605
+ result = iterator(result, value, idx);
22606
+ });
22607
+ return result;
22608
+ }
22609
+ function identity(arg) {
22610
+ return arg;
22611
+ }
22612
+ function toNum(arg) {
22613
+ return Number(arg);
22614
+ }
22615
+
22244
22616
  function _class_call_check$2(instance, Constructor) {
22245
22617
  if (!(instance instanceof Constructor)) {
22246
22618
  throw new TypeError("Cannot call a class as a function");
@@ -22260,6 +22632,13 @@ function _create_class$2(Constructor, protoProps, staticProps) {
22260
22632
  if (staticProps) _defineProperties$2(Constructor, staticProps);
22261
22633
  return Constructor;
22262
22634
  }
22635
+ function _instanceof$2(left, right) {
22636
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
22637
+ return !!right[Symbol.hasInstance](left);
22638
+ } else {
22639
+ return left instanceof right;
22640
+ }
22641
+ }
22263
22642
  var nextTagID = 0;
22264
22643
  /**
22265
22644
  Highlighting tags are markers that denote a highlighting category.
@@ -22281,6 +22660,8 @@ be picked up by regular highlighters (though you can derive them
22281
22660
  from standard tags to allow highlighters to fall back to those).
22282
22661
  */ var Tag = /*#__PURE__*/ function() {
22283
22662
  function Tag(/**
22663
+ The optional name of the base tag @internal
22664
+ */ name, /**
22284
22665
  The set of this tag and all its parent tags, starting with
22285
22666
  this one itself and sorted in order of decreasing specificity.
22286
22667
  */ set, /**
@@ -22290,6 +22671,7 @@ from standard tags to allow highlighters to fall back to those).
22290
22671
  The modifiers applied to this.base @internal
22291
22672
  */ modified) {
22292
22673
  _class_call_check$2(this, Tag);
22674
+ this.name = name;
22293
22675
  this.set = set;
22294
22676
  this.base = base;
22295
22677
  this.modified = modified;
@@ -22297,18 +22679,42 @@ from standard tags to allow highlighters to fall back to those).
22297
22679
  @internal
22298
22680
  */ this.id = nextTagID++;
22299
22681
  }
22300
- _create_class$2(Tag, null, [
22682
+ _create_class$2(Tag, [
22683
+ {
22684
+ key: "toString",
22685
+ value: function toString() {
22686
+ var name = this.name;
22687
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
22688
+ try {
22689
+ for(var _iterator = this.modified[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
22690
+ var mod = _step.value;
22691
+ if (mod.name) name = "".concat(mod.name, "(").concat(name, ")");
22692
+ }
22693
+ } catch (err) {
22694
+ _didIteratorError = true;
22695
+ _iteratorError = err;
22696
+ } finally{
22697
+ try {
22698
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
22699
+ _iterator.return();
22700
+ }
22701
+ } finally{
22702
+ if (_didIteratorError) {
22703
+ throw _iteratorError;
22704
+ }
22705
+ }
22706
+ }
22707
+ return name;
22708
+ }
22709
+ }
22710
+ ], [
22301
22711
  {
22302
22712
  key: "define",
22303
- value: /**
22304
- Define a new tag. If `parent` is given, the tag is treated as a
22305
- sub-tag of that parent, and
22306
- [highlighters](#highlight.tagHighlighter) that don't mention
22307
- this tag will try to fall back to the parent tag (or grandparent
22308
- tag, etc).
22309
- */ function define(parent) {
22713
+ value: function define(nameOrParent, parent) {
22714
+ var name = typeof nameOrParent == "string" ? nameOrParent : "?";
22715
+ if (_instanceof$2(nameOrParent, Tag)) parent = nameOrParent;
22310
22716
  if (parent === null || parent === void 0 ? void 0 : parent.base) throw new Error("Can not derive from a modified tag");
22311
- var tag = new Tag([], null, []);
22717
+ var tag = new Tag(name, [], null, []);
22312
22718
  tag.set.push(tag);
22313
22719
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
22314
22720
  if (parent) try {
@@ -22346,8 +22752,8 @@ from standard tags to allow highlighters to fall back to those).
22346
22752
  smaller set of modifiers is registered as a parent, so that for
22347
22753
  example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
22348
22754
  `m1(m3(t1)`, and so on.
22349
- */ function defineModifier() {
22350
- var mod = new Modifier;
22755
+ */ function defineModifier(name) {
22756
+ var mod = new Modifier(name);
22351
22757
  return function(tag) {
22352
22758
  if (tag.modified.indexOf(mod) > -1) return tag;
22353
22759
  return Modifier.get(tag.base || tag, tag.modified.concat(mod).sort(function(a, b) {
@@ -22361,8 +22767,9 @@ from standard tags to allow highlighters to fall back to those).
22361
22767
  }();
22362
22768
  var nextModifierID = 0;
22363
22769
  var Modifier = /*#__PURE__*/ function() {
22364
- function Modifier() {
22770
+ function Modifier(name) {
22365
22771
  _class_call_check$2(this, Modifier);
22772
+ this.name = name;
22366
22773
  this.instances = [];
22367
22774
  this.id = nextModifierID++;
22368
22775
  }
@@ -22375,7 +22782,7 @@ var Modifier = /*#__PURE__*/ function() {
22375
22782
  return t.base == base && sameArray(mods, t.modified);
22376
22783
  });
22377
22784
  if (exists) return exists;
22378
- var set = [], tag = new Tag(set, base, mods);
22785
+ var set = [], tag = new Tag(base.name, set, base, mods);
22379
22786
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
22380
22787
  try {
22381
22788
  for(var _iterator = mods[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
@@ -22921,7 +23328,7 @@ the parent.
22921
23328
  A level 6 [heading](#highlight.tags.heading).
22922
23329
  */ heading6: t(heading),
22923
23330
  /**
22924
- A prose separator (such as a horizontal rule).
23331
+ A prose [content](#highlight.tags.content) separator (such as a horizontal rule).
22925
23332
  */ contentSeparator: t(content),
22926
23333
  /**
22927
23334
  [Content](#highlight.tags.content) that represents a list.
@@ -22977,27 +23384,27 @@ the parent.
22977
23384
  [Modifier](#highlight.Tag^defineModifier) that indicates that a
22978
23385
  given element is being defined. Expected to be used with the
22979
23386
  various [name](#highlight.tags.name) tags.
22980
- */ definition: Tag.defineModifier(),
23387
+ */ definition: Tag.defineModifier("definition"),
22981
23388
  /**
22982
23389
  [Modifier](#highlight.Tag^defineModifier) that indicates that
22983
23390
  something is constant. Mostly expected to be used with
22984
23391
  [variable names](#highlight.tags.variableName).
22985
- */ constant: Tag.defineModifier(),
23392
+ */ constant: Tag.defineModifier("constant"),
22986
23393
  /**
22987
23394
  [Modifier](#highlight.Tag^defineModifier) used to indicate that
22988
23395
  a [variable](#highlight.tags.variableName) or [property
22989
23396
  name](#highlight.tags.propertyName) is being called or defined
22990
23397
  as a function.
22991
- */ function: Tag.defineModifier(),
23398
+ */ function: Tag.defineModifier("function"),
22992
23399
  /**
22993
23400
  [Modifier](#highlight.Tag^defineModifier) that can be applied to
22994
23401
  [names](#highlight.tags.name) to indicate that they belong to
22995
23402
  the language's standard environment.
22996
- */ standard: Tag.defineModifier(),
23403
+ */ standard: Tag.defineModifier("standard"),
22997
23404
  /**
22998
23405
  [Modifier](#highlight.Tag^defineModifier) that indicates a given
22999
23406
  [names](#highlight.tags.name) is local to some scope.
23000
- */ local: Tag.defineModifier(),
23407
+ */ local: Tag.defineModifier("local"),
23001
23408
  /**
23002
23409
  A generic variant [modifier](#highlight.Tag^defineModifier) that
23003
23410
  can be used to tag language-specific alternative variants of
@@ -23005,8 +23412,12 @@ the parent.
23005
23412
  forms of at least the [string](#highlight.tags.string) and
23006
23413
  [variable name](#highlight.tags.variableName) tags, since those
23007
23414
  come up a lot.
23008
- */ special: Tag.defineModifier()
23415
+ */ special: Tag.defineModifier("special")
23009
23416
  };
23417
+ for(var name1 in tags){
23418
+ var val = tags[name1];
23419
+ if (_instanceof$2(val, Tag)) val.name = name1;
23420
+ }
23010
23421
  /**
23011
23422
  This is a highlighter that adds stable, predictable classes to
23012
23423
  tokens, for styling with external CSS.
@@ -23325,7 +23736,7 @@ function _unsupported_iterable_to_array$1(o, minLen) {
23325
23736
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
23326
23737
  }
23327
23738
  // This file was generated by lezer-generator. You probably shouldn't edit it.
23328
- var propertyIdentifier = 120, identifier = 121, nameIdentifier = 122, insertSemi = 123, expression0 = 127, ForExpression = 4, forExpressionStart = 130, ForInExpression = 7, Name = 8, Identifier = 9, AdditionalIdentifier = 10, forExpressionBodyStart = 138, IfExpression = 19, ifExpressionStart = 139, QuantifiedExpression = 23, quantifiedExpressionStart = 140, QuantifiedInExpression = 27, PositiveUnaryTest = 37, ArithmeticExpression = 41, arithmeticPlusStart = 144, arithmeticTimesStart = 145, arithmeticExpStart = 146, arithmeticUnaryStart = 147, VariableName = 47, PathExpression = 67, pathExpressionStart = 152, FilterExpression = 69, filterExpressionStart = 153, FunctionInvocation = 71, functionInvocationStart = 154, ParameterName = 75, nil = 159, NumericLiteral = 78, StringLiteral = 79, BooleanLiteral = 80, listStart = 165, List = 88, FunctionDefinition = 89, functionDefinitionStart = 167, Context = 96, contextStart = 169, ContextEntry = 97, PropertyName = 99, PropertyIdentifier = 100;
23739
+ var propertyIdentifier = 121, identifier = 122, nameIdentifier = 123, insertSemi = 124, expression0 = 128, ForExpression = 4, forExpressionStart = 131, ForInExpression = 7, Name = 8, Identifier = 9, AdditionalIdentifier = 10, forExpressionBodyStart = 139, IfExpression = 19, ifExpressionStart = 140, QuantifiedExpression = 23, quantifiedExpressionStart = 141, QuantifiedInExpression = 27, PositiveUnaryTest = 37, ArithmeticExpression = 41, arithmeticPlusStart = 145, arithmeticTimesStart = 146, arithmeticExpStart = 147, arithmeticUnaryStart = 148, VariableName = 47, PathExpression = 68, pathExpressionStart = 154, FilterExpression = 70, filterExpressionStart = 155, FunctionInvocation = 72, functionInvocationStart = 156, ParameterName = 76, nil = 161, NumericLiteral = 79, StringLiteral = 80, BooleanLiteral = 81, listStart = 167, List = 89, FunctionDefinition = 90, functionDefinitionStart = 169, Context = 97, contextStart = 171, ContextEntry = 98, PropertyName = 100, PropertyIdentifier = 101;
23329
23740
  /* global console,process */ // @ts-expect-error env access
23330
23741
  var LOG_PARSE = typeof process != "undefined" && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
23331
23742
  // @ts-expect-error env access
@@ -23401,7 +23812,6 @@ var additionalNameChars = chars$1("'./-+*^");
23401
23812
  */ function isSpace(ch) {
23402
23813
  return spaceChars.includes(ch);
23403
23814
  }
23404
- // eslint-disable-next-line
23405
23815
  function indent(str, spaces) {
23406
23816
  return spaces.concat(str.split(/\n/g).join("\n" + spaces));
23407
23817
  }
@@ -23491,14 +23901,14 @@ function indent(str, spaces) {
23491
23901
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23492
23902
  // match is required
23493
23903
  if (!match) {
23494
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23904
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23495
23905
  v: nextMatch1
23496
23906
  };
23497
23907
  }
23498
23908
  var token = match.token, offset = match.offset;
23499
23909
  i1 += offset;
23500
23910
  if (token === " ") {
23501
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23911
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23502
23912
  }
23503
23913
  tokens1 = _to_consumable_array$1(tokens1).concat([
23504
23914
  token
@@ -23517,7 +23927,7 @@ function indent(str, spaces) {
23517
23927
  if (contextKeys.some(function(el) {
23518
23928
  return el.startsWith(name);
23519
23929
  })) {
23520
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23930
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23521
23931
  }
23522
23932
  if (dateTimeIdentifiers.some(function(el) {
23523
23933
  return el === name;
@@ -23536,9 +23946,9 @@ function indent(str, spaces) {
23536
23946
  if (dateTimeIdentifiers.some(function(el) {
23537
23947
  return el.startsWith(name);
23538
23948
  })) {
23539
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23949
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23540
23950
  }
23541
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23951
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23542
23952
  v: nextMatch1
23543
23953
  };
23544
23954
  };
@@ -23604,7 +24014,10 @@ var _obj2;
23604
24014
  var contextStarts = (_obj2 = {}, _define_property$1(_obj2, contextStart, "Context"), _define_property$1(_obj2, functionDefinitionStart, "FunctionDefinition"), _define_property$1(_obj2, forExpressionStart, "ForExpression"), _define_property$1(_obj2, listStart, "List"), _define_property$1(_obj2, ifExpressionStart, "IfExpression"), _define_property$1(_obj2, quantifiedExpressionStart, "QuantifiedExpression"), _obj2);
23605
24015
  var _obj3;
23606
24016
  var contextEnds = (_obj3 = {}, _define_property$1(_obj3, Context, "Context"), _define_property$1(_obj3, FunctionDefinition, "FunctionDefinition"), _define_property$1(_obj3, ForExpression, "ForExpression"), _define_property$1(_obj3, List, "List"), _define_property$1(_obj3, IfExpression, "IfExpression"), _define_property$1(_obj3, QuantifiedExpression, "QuantifiedExpression"), _define_property$1(_obj3, PathExpression, "PathExpression"), _define_property$1(_obj3, FunctionInvocation, "FunctionInvocation"), _define_property$1(_obj3, FilterExpression, "FilterExpression"), _define_property$1(_obj3, ArithmeticExpression, "ArithmeticExpression"), _obj3);
23607
- var ValueProducer = /*#__PURE__*/ function() {
24017
+ /**
24018
+ * A simple producer that retrievs a value from
24019
+ * a given context. Used to lazily take things.
24020
+ */ var ValueProducer = /*#__PURE__*/ function() {
23608
24021
  function ValueProducer(fn) {
23609
24022
  _class_call_check$1(this, ValueProducer);
23610
24023
  this.fn = fn;
@@ -23690,6 +24103,20 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23690
24103
  var constructor = /** @type { typeof VariableContext } */ this.constructor;
23691
24104
  return constructor.of(_object_spread_props(_object_spread({}, this.value), _define_property$1({}, key, value)));
23692
24105
  }
24106
+ },
24107
+ {
24108
+ /**
24109
+ * Non-destructively merge another context into this one,
24110
+ * and return the result.
24111
+ *
24112
+ * @param {ContextValue} other
24113
+ *
24114
+ * @return {VariableContext}
24115
+ */ key: "merge",
24116
+ value: function merge(other) {
24117
+ var constructor = /** @type { typeof VariableContext } */ this.constructor;
24118
+ return new constructor(constructor.__merge(this.value, other));
24119
+ }
23693
24120
  }
23694
24121
  ], [
23695
24122
  {
@@ -23707,36 +24134,71 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23707
24134
  {
23708
24135
  key: "of",
23709
24136
  value: /**
23710
- * Takes any number of Contexts and merges them into a single Context.
24137
+ * Takes any number of Contexts and merges them into a single context.
23711
24138
  *
23712
- * @param {...Context} contexts
23713
- * @returns {VariableContext}
24139
+ * @param { ...VariableContext } contexts
24140
+ * @returns { VariableContext }
23714
24141
  */ function of() {
23715
- var _this = this;
23716
24142
  for(var _len = arguments.length, contexts = new Array(_len), _key = 0; _key < _len; _key++){
23717
24143
  contexts[_key] = arguments[_key];
23718
24144
  }
23719
- var unwrap = function(context) {
23720
- if (!context || typeof context !== "object") {
23721
- return {};
24145
+ return contexts.reduce(function(context, otherContext) {
24146
+ return context.merge(otherContext);
24147
+ }, new this({}));
24148
+ }
24149
+ },
24150
+ {
24151
+ key: "__unwrap",
24152
+ value: /**
24153
+ * Returns the raw representation of the given context.
24154
+ *
24155
+ * @param {VariableContext | any} context
24156
+ *
24157
+ * @return {any}
24158
+ */ function __unwrap(context) {
24159
+ if (!context) {
24160
+ return {};
24161
+ }
24162
+ if (_instanceof$1(context, this)) {
24163
+ return context.value;
24164
+ }
24165
+ if (typeof context !== "object") {
24166
+ return {};
24167
+ }
24168
+ return _object_spread({}, context);
24169
+ }
24170
+ },
24171
+ {
24172
+ key: "__merge",
24173
+ value: /**
24174
+ * Non-destructively merges two contexts (or their values)
24175
+ * with each other, returning the result.
24176
+ *
24177
+ * @param {ContextValue} context
24178
+ * @param {ContextValue} other
24179
+ *
24180
+ * @return {any}
24181
+ */ function __merge(context, other) {
24182
+ var _this = this;
24183
+ return reduce(this.__unwrap(other), function(merged, value, key) {
24184
+ if (_instanceof$1(value, ValueProducer)) {
24185
+ // keep value producers in tact
24186
+ return _object_spread_props(_object_spread({}, merged), _define_property$1({}, key, value));
23722
24187
  }
23723
- if (_instanceof$1(context, _this)) {
23724
- return context.value;
24188
+ value = _this.__unwrap(value);
24189
+ if (has(merged, key)) {
24190
+ value = _this.__merge(_this.__unwrap(merged[key]), value);
23725
24191
  }
23726
- return _object_spread({}, context);
23727
- };
23728
- var merged = contexts.reduce(function(merged, context) {
23729
- return _object_spread({}, merged, unwrap(context));
23730
- }, {});
23731
- return new this(merged);
24192
+ return _object_spread_props(_object_spread({}, merged), _define_property$1({}, key, value));
24193
+ }, this.__unwrap(context));
23732
24194
  }
23733
24195
  }
23734
24196
  ]);
23735
24197
  return VariableContext;
23736
24198
  }();
23737
24199
  var Variables = /*#__PURE__*/ function() {
23738
- function Variables() {
23739
- var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_name = _ref.name, name = _ref_name === void 0 ? "Expressions" : _ref_name, _ref_tokens = _ref.tokens, tokens = _ref_tokens === void 0 ? [] : _ref_tokens, _ref_children = _ref.children, children = _ref_children === void 0 ? [] : _ref_children, _ref_parent = _ref.parent, parent = _ref_parent === void 0 ? null : _ref_parent, _ref_context = _ref.context, context = _ref_context === void 0 ? null : _ref_context, _ref_value = _ref.value, value = _ref_value === void 0 ? null : _ref_value, _ref_raw = _ref.raw, raw = _ref_raw === void 0 ? null : _ref_raw;
24200
+ function Variables(param) {
24201
+ var _param_name = param.name, name = _param_name === void 0 ? "Expressions" : _param_name, _param_tokens = param.tokens, tokens = _param_tokens === void 0 ? [] : _param_tokens, _param_children = param.children, children = _param_children === void 0 ? [] : _param_children, _param_parent = param.parent, parent = _param_parent === void 0 ? null : _param_parent, context = param.context, value = param.value, raw = param.raw;
23740
24202
  _class_call_check$1(this, Variables);
23741
24203
  this.name = name;
23742
24204
  this.tokens = tokens;
@@ -23967,7 +24429,19 @@ var Variables = /*#__PURE__*/ function() {
23967
24429
  ], [
23968
24430
  {
23969
24431
  key: "of",
23970
- value: function of(options) {
24432
+ value: /**
24433
+ * @param { {
24434
+ * name?: string,
24435
+ * tokens?: string[],
24436
+ * children?: Variables[],
24437
+ * parent?: Variables | null
24438
+ * context: VariableContext,
24439
+ * value?: any,
24440
+ * raw?: any
24441
+ * } } options
24442
+ *
24443
+ * @return {Variables}
24444
+ */ function of(options) {
23971
24445
  var name = options.name, _options_tokens = options.tokens, tokens = _options_tokens === void 0 ? [] : _options_tokens, _options_children = options.children, children = _options_children === void 0 ? [] : _options_children, _options_parent = options.parent, parent = _options_parent === void 0 ? null : _options_parent, context = options.context, value = options.value, raw = options.raw;
23972
24446
  if (!context) {
23973
24447
  throw new Error("must provide <context>");
@@ -24254,57 +24728,57 @@ var spec_identifier = {
24254
24728
  between: 72,
24255
24729
  instance: 86,
24256
24730
  of: 89,
24257
- days: 99,
24258
- time: 101,
24259
- duration: 103,
24260
- years: 105,
24261
- months: 107,
24262
- date: 109,
24263
- list: 115,
24264
- context: 121,
24265
- function: 128,
24266
- null: 154,
24267
- true: 326,
24268
- false: 326,
24269
- "?": 168,
24270
- external: 184,
24271
- not: 209
24731
+ days: 101,
24732
+ time: 103,
24733
+ duration: 105,
24734
+ years: 107,
24735
+ months: 109,
24736
+ date: 111,
24737
+ list: 117,
24738
+ context: 123,
24739
+ function: 130,
24740
+ null: 156,
24741
+ true: 330,
24742
+ false: 330,
24743
+ "?": 170,
24744
+ external: 186,
24745
+ not: 211
24272
24746
  };
24273
24747
  var parser = LRParser.deserialize({
24274
24748
  version: 14,
24275
- states: "CpO`QYOOO`QYOOO$gQYOOOOQU'#Ce'#CeO$qQYO'#C`O%zQYO'#FPOOQQ'#Fe'#FeO&UQYO'#FeO`QYO'#DVOOQU'#Em'#EmO'rQ^O'#D]OOQO'#Fl'#FlO)oQWO'#DuOOQQ'#D|'#D|OOQQ'#D}'#D}OOQQ'#EO'#EOO)tOWO'#ERO)oQWO'#EPOOQQ'#EP'#EPOOQQ'#Fr'#FrOOQQ'#Fp'#FpOOQQ'#Fw'#FwOOQQ'#ET'#ETO`QYO'#EVOOQQ'#FR'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#n#o#t$i$m$p%P%Q%X%[%]%`%c%m%u%y&[!Z!`T!O!r!t!}#V#W#g#h#l#m#n#o#t$i$m$p%P%Q%X%[%]%`%c%m%u%y&[!]!aT!O!r!t!}#V#W#g#h#i#l#m#n#o#t$i$m$p%P%Q%X%[%]%`%c%m%u%y&[!mWOPQWgjsz{!Z!_!`!a!e!f!g!h!i!n#X#Z#]#a#e#p#|#}$W$[$]$`$o${%V%b%w%xR&T%kT&X%l&r!a!cT!O!l!r!t!}#V#W#g#h#i#j#l#m#n#o#t$i$m$p%P%Q%X%[%]%`%c%m%u%y&[!a!eT!O!l!r!t!}#V#W#g#h#i#j#l#m#n#o#t$i$m$p%P%Q%X%[%]%`%c%m%u%y&[!m[OPQWgjsz{!Z!_!`!a!e!f!g!h!i!n#X#Z#]#a#e#p#|#}$W$[$]$`$o${%V%b%w%xQ!o[R!qaR#x!nQ!ujR#y!n!mdOPQWgjsz{!Z!_!`!a!e!f!g!h!i!n#X#Z#]#a#e#p#|#}$W$[$]$`$o${%V%b%w%x!mjOPQWgjsz{!Z!_!`!a!e!f!g!h!i!n#X#Z#]#a#e#p#|#}$W$[$]$`$o${%V%b%w%x!mkOPQWgjsz{!Z!_!`!a!e!f!g!h!i!n#X#Z#]#a#e#p#|#}$W$[$]$`$o${%V%b%w%xR$S!v!mmOPQWgjsz{!Z!_!`!a!e!f!g!h!i!n#X#Z#]#a#e#p#|#}$W$[$]$`$o${%V%b%w%xR!|m",
24278
- nodeNames: "⚠ LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not",
24279
- maxTerm: 171,
24749
+ states: "C|O`QYOOO`QYOOO$mQYOOOOQU'#Ce'#CeO$wQYO'#C`O&QQYO'#FQOOQQ'#Ff'#FfO&[QYO'#FfO`QYO'#DVOOQU'#En'#EnO'{Q^O'#D]OOQU'#D^'#D^OOQU'#D]'#D]OOQO'#Fn'#FnO)xQWO'#DvOOQQ'#D}'#D}OOQQ'#EO'#EOOOQQ'#EP'#EPO)}OWO'#ESO)xQWO'#EQOOQQ'#EQ'#EQOOQQ'#Ft'#FtOOQQ'#Fr'#FrOOQQ'#Fy'#FyOOQQ'#EU'#EUO`QYO'#EWOOQQ'#FS'#FSO*SQ^O'#FSO+yQYO'#EXO,QQWO'#EYOOQP'#F}'#F}O,VQXO'#EaOOQQ'#Fz'#FzOOQQ'#FR'#FRQOQWOOOOQQ'#FT'#FTOOQQ'#F^'#F^O`QYO'#CoOOQQ'#F_'#F_O$wQYO'#CsO,bQYO'#DwOOQQ'#Fs'#FsO,gQYO'#EROOQO'#ER'#ERO`QYO'#EVO`QYO'#EUOOQO'#F{'#F{Q,oQWOOO,tQYO'#DRO-kQWO'#FbOOQO'#DT'#DTO-vQYO'#FfO-}QWOOO.tQYO'#CdO/RQYO'#FVOOQQ'#Cc'#CcO/WQYO'#FUOOQQ'#Cb'#CbO/`QYO,58zO`QYO,59iOOQQ'#Fc'#FcOOQQ'#Fd'#FdOOQQ'#Fe'#FeO`QYO,59qO`QYO,59qO`QYO,59qOOQQ'#Fl'#FlO/eQYO,5:^OOQQ'#Fm'#FmO`QYO,5:`O`QYO,59eO`QYO,59gO`QYO,59iO1^QYO,59iO1eQYO,59rOOQQ,5:i,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e%o%w%{&^!m^OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zQ!q^R!scR#z!pQ!wlR#{!p!mfOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mlOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR$U!x!moOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR#Oo",
24752
+ nodeNames: "⚠ LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName BacktickIdentifier SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not",
24753
+ maxTerm: 173,
24280
24754
  context: variableTracker,
24281
24755
  nodeProps: [
24282
24756
  [
24283
24757
  "closedBy",
24284
24758
  38,
24285
24759
  ")",
24286
- 70,
24760
+ 71,
24287
24761
  "]",
24288
- 95,
24762
+ 96,
24289
24763
  "}"
24290
24764
  ],
24291
24765
  [
24292
24766
  "openedBy",
24293
24767
  40,
24294
24768
  "(",
24295
- 68,
24769
+ 69,
24296
24770
  "[",
24297
- 94,
24771
+ 95,
24298
24772
  "{"
24299
24773
  ],
24300
24774
  [
24301
24775
  "group",
24302
24776
  -5,
24303
- 77,
24304
24777
  78,
24305
24778
  79,
24306
24779
  80,
24307
24780
  81,
24781
+ 82,
24308
24782
  "Literal"
24309
24783
  ]
24310
24784
  ],
@@ -24317,7 +24791,7 @@ var parser = LRParser.deserialize({
24317
24791
  2
24318
24792
  ],
24319
24793
  repeatNodeCount: 14,
24320
- tokenData: "+l~RuXY#fYZ$ZZ[#f]^$Zpq#fqr$`rs$kwx&cxy&hyz&mz{&r{|'P|}'U}!O'Z!O!P'h!P!Q(Q!Q![){![!]*^!]!^*c!^!_*h!_!`$f!`!a*w!b!c+R!}#O+W#P#Q+]#Q#R&z#o#p+b#q#r+g$f$g#f#BY#BZ#f$IS$I_#f$I|$I}$Z$I}$JO$Z$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~#kY#q~XY#fZ[#fpq#f$f$g#f#BY#BZ#f$IS$I_#f$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~$`O#r~~$cP!_!`$f~$kOr~~$pW$h~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&]<%lO$k~%_O$h~~%bRO;'S$k;'S;=`%k;=`O$k~%pX$h~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&];=`<%l$k<%lO$k~&`P;=`<%l$k~&hO#z~~&mOv~~&rOx~~&wP^~z{&z~'PO_~~'UO[~~'ZO#}~R'`PZP!`!a'cQ'hO$]Q~'mQ#y~!O!P's!Q!['x~'xO#|~~'}P$g~!Q!['x~(VQ]~z{(]!P!Q)d~(`TOz(]z{(o{;'S(];'S;=`)^<%lO(]~(rVOz(]z{(o{!P(]!P!Q)X!Q;'S(];'S;=`)^<%lO(]~)^OQ~~)aP;=`<%l(]~)iSP~OY)dZ;'S)d;'S;=`)u<%lO)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;'S+e;'S;=`-R<%lO+e~,TRO;'S+e;'S;=`,^;=`O+e~,aXOY+eZ#O+e#O#P,Q#P#S+e#S#T,|#T;'S+e;'S;=`-R;=`<%l+e<%lO+e~-RO$Z~~-UP;=`<%l+e~-^O#S~~-cO#R~",
24321
24795
  tokenizers: [
24322
24796
  propertyIdentifiers,
24323
24797
  identifiers,
@@ -24332,28 +24806,31 @@ var parser = LRParser.deserialize({
24332
24806
  ],
24333
24807
  "Expressions": [
24334
24808
  1,
24335
- 101
24809
+ 102
24336
24810
  ],
24337
24811
  "UnaryTests": [
24338
24812
  2,
24339
- 102
24813
+ 103
24340
24814
  ]
24341
24815
  },
24816
+ dialects: {
24817
+ camunda: 2532
24818
+ },
24342
24819
  dynamicPrecedences: {
24343
24820
  "31": -1,
24344
- "67": 1,
24345
- "71": -1,
24346
- "73": -1
24821
+ "68": 1,
24822
+ "72": -1,
24823
+ "74": -1
24347
24824
  },
24348
24825
  specialized: [
24349
24826
  {
24350
- term: 121,
24827
+ term: 122,
24351
24828
  get: function(value) {
24352
24829
  return spec_identifier[value] || -1;
24353
24830
  }
24354
24831
  }
24355
24832
  ],
24356
- tokenPrec: 2500
24833
+ tokenPrec: 2534
24357
24834
  });
24358
24835
 
24359
24836
  function _array_like_to_array(arr, len) {
@@ -25428,10 +25905,10 @@ var builtins = {
25428
25905
  // 10.3.4.5 Numeric functions
25429
25906
  "decimal": fn(function(n, scale) {
25430
25907
  if (!scale) {
25431
- return round(n);
25908
+ return bankersRound(n);
25432
25909
  }
25433
25910
  var offset = Math.pow(10, scale);
25434
- return round(n * offset) / offset;
25911
+ return bankersRound(n * offset) / offset;
25435
25912
  }, [
25436
25913
  "number",
25437
25914
  "number"
@@ -25660,7 +26137,8 @@ var builtins = {
25660
26137
  ]),
25661
26138
  // 10.3.4.10 Context function
25662
26139
  "get value": fn(function(m, key) {
25663
- return getFromContext(key, m) || null;
26140
+ var value = getFromContext(key, m);
26141
+ return value != undefined ? value : null;
25664
26142
  }, [
25665
26143
  "context",
25666
26144
  "string"
@@ -25987,13 +26465,13 @@ function countSymbols(str) {
25987
26465
  // cf. https://mathiasbynens.be/notes/javascript-unicode
25988
26466
  return str.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length;
25989
26467
  }
25990
- function round(n) {
25991
- var integral = Math.trunc(n);
25992
- if (n - integral > .5) {
25993
- return integral + 1;
25994
- } else {
25995
- return integral;
26468
+ function bankersRound(n) {
26469
+ var floored = Math.floor(n);
26470
+ var decimalPart = n - floored;
26471
+ if (decimalPart === 0.5) {
26472
+ return floored % 2 === 0 ? floored : floored + 1;
25996
26473
  }
26474
+ return Math.round(n);
25997
26475
  }
25998
26476
  // adapted from https://stackoverflow.com/a/53577159
25999
26477
  function stddev(array) {
@@ -26074,17 +26552,19 @@ function ifValid(o) {
26074
26552
  return o.isValid ? o : null;
26075
26553
  }
26076
26554
  function parseExpression(expression) {
26077
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
26555
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
26078
26556
  return parser.configure({
26079
26557
  top: "Expression",
26080
- contextTracker: trackVariables(context)
26558
+ contextTracker: trackVariables(context),
26559
+ dialect: dialect
26081
26560
  }).parse(expression);
26082
26561
  }
26083
26562
  function parseUnaryTests(expression) {
26084
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
26563
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
26085
26564
  return parser.configure({
26086
26565
  top: "UnaryTests",
26087
- contextTracker: trackVariables(context)
26566
+ contextTracker: trackVariables(context),
26567
+ dialect: dialect
26088
26568
  }).parse(expression);
26089
26569
  }
26090
26570
  var SyntaxError$1 = /*#__PURE__*/ function(Error1) {
@@ -26153,8 +26633,8 @@ var Interpreter = /*#__PURE__*/ function() {
26153
26633
  {
26154
26634
  key: "evaluate",
26155
26635
  value: function evaluate(expression) {
26156
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
26157
- var parseTree = parseExpression(expression, context);
26636
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
26637
+ var parseTree = parseExpression(expression, context, dialect);
26158
26638
  var root = this._buildExecutionTree(parseTree, expression);
26159
26639
  return {
26160
26640
  parseTree: parseTree,
@@ -26165,8 +26645,8 @@ var Interpreter = /*#__PURE__*/ function() {
26165
26645
  {
26166
26646
  key: "unaryTest",
26167
26647
  value: function unaryTest(expression) {
26168
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
26169
- var parseTree = parseUnaryTests(expression, context);
26648
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
26649
+ var parseTree = parseUnaryTests(expression, context, dialect);
26170
26650
  var root = this._buildExecutionTree(parseTree, expression);
26171
26651
  return {
26172
26652
  parseTree: parseTree,
@@ -26180,8 +26660,8 @@ var Interpreter = /*#__PURE__*/ function() {
26180
26660
  var interpreter = new Interpreter();
26181
26661
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
26182
26662
  function evaluate(expression) {
26183
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
26184
- var root = interpreter.evaluate(expression, context).root;
26663
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
26664
+ var root = interpreter.evaluate(expression, context, dialect).root;
26185
26665
  // root = Expression :: fn(ctx)
26186
26666
  return root(context);
26187
26667
  }
@@ -26224,6 +26704,12 @@ function evalNode(node, input, args) {
26224
26704
  switch(input){
26225
26705
  case "+":
26226
26706
  return nullable(function(a, b) {
26707
+ // flip these as luxon operations with durations aren't commutative
26708
+ if (isDuration(a) && !isDuration(b)) {
26709
+ var tmp = a;
26710
+ a = b;
26711
+ b = tmp;
26712
+ }
26227
26713
  if (isType(a, "time") && isDuration(b)) {
26228
26714
  return a.plus(b).set({
26229
26715
  year: 1900,
@@ -26317,6 +26803,8 @@ function evalNode(node, input, args) {
26317
26803
  };
26318
26804
  }
26319
26805
  }, Test("boolean"));
26806
+ case "BacktickIdentifier":
26807
+ return input.replace(/`/g, "");
26320
26808
  case "Wildcard":
26321
26809
  return function(_context) {
26322
26810
  return true;
@@ -26790,7 +27278,7 @@ function evalNode(node, input, args) {
26790
27278
  if (isNumber(value)) {
26791
27279
  filterFn.type = "number";
26792
27280
  }
26793
- } catch (err) {
27281
+ } catch (_err) {
26794
27282
  // ignore
26795
27283
  }
26796
27284
  }
@@ -27253,7 +27741,6 @@ function parseString(str) {
27253
27741
  if (str.endsWith('"')) {
27254
27742
  str = str.slice(0, -1);
27255
27743
  }
27256
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
27257
27744
  return str.replace(/(\\")|(\\\\)|(\\u[a-fA-F0-9]{5,6})|((?:\\u[a-fA-F0-9]{1,4})+)/ig, function(substring) {
27258
27745
  for(var _len = arguments.length, groups = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
27259
27746
  groups[_key - 1] = arguments[_key];