@digipair/skill-mongodb 0.41.4 → 0.43.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.esm.js +1309 -753
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -8175,7 +8175,7 @@ function _type_of(obj) {
8175
8175
  }
8176
8176
  return self;
8177
8177
  }
8178
- function _class_call_check$1R(instance, Constructor) {
8178
+ function _class_call_check$1S(instance, Constructor) {
8179
8179
  if (!(instance instanceof Constructor)) {
8180
8180
  throw new TypeError("Cannot call a class as a function");
8181
8181
  }
@@ -8290,7 +8290,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8290
8290
  _inherits$1d(LuxonError, Error1);
8291
8291
  var _super = _create_super$1d(LuxonError);
8292
8292
  function LuxonError() {
8293
- _class_call_check$1R(this, LuxonError);
8293
+ _class_call_check$1S(this, LuxonError);
8294
8294
  return _super.apply(this, arguments);
8295
8295
  }
8296
8296
  return LuxonError;
@@ -8301,7 +8301,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8301
8301
  _inherits$1d(InvalidDateTimeError, LuxonError);
8302
8302
  var _super = _create_super$1d(InvalidDateTimeError);
8303
8303
  function InvalidDateTimeError(reason) {
8304
- _class_call_check$1R(this, InvalidDateTimeError);
8304
+ _class_call_check$1S(this, InvalidDateTimeError);
8305
8305
  return _super.call(this, "Invalid DateTime: ".concat(reason.toMessage()));
8306
8306
  }
8307
8307
  return InvalidDateTimeError;
@@ -8312,7 +8312,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8312
8312
  _inherits$1d(InvalidIntervalError, LuxonError);
8313
8313
  var _super = _create_super$1d(InvalidIntervalError);
8314
8314
  function InvalidIntervalError(reason) {
8315
- _class_call_check$1R(this, InvalidIntervalError);
8315
+ _class_call_check$1S(this, InvalidIntervalError);
8316
8316
  return _super.call(this, "Invalid Interval: ".concat(reason.toMessage()));
8317
8317
  }
8318
8318
  return InvalidIntervalError;
@@ -8323,7 +8323,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8323
8323
  _inherits$1d(InvalidDurationError, LuxonError);
8324
8324
  var _super = _create_super$1d(InvalidDurationError);
8325
8325
  function InvalidDurationError(reason) {
8326
- _class_call_check$1R(this, InvalidDurationError);
8326
+ _class_call_check$1S(this, InvalidDurationError);
8327
8327
  return _super.call(this, "Invalid Duration: ".concat(reason.toMessage()));
8328
8328
  }
8329
8329
  return InvalidDurationError;
@@ -8334,7 +8334,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8334
8334
  _inherits$1d(ConflictingSpecificationError, LuxonError);
8335
8335
  var _super = _create_super$1d(ConflictingSpecificationError);
8336
8336
  function ConflictingSpecificationError() {
8337
- _class_call_check$1R(this, ConflictingSpecificationError);
8337
+ _class_call_check$1S(this, ConflictingSpecificationError);
8338
8338
  return _super.apply(this, arguments);
8339
8339
  }
8340
8340
  return ConflictingSpecificationError;
@@ -8345,7 +8345,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8345
8345
  _inherits$1d(InvalidUnitError, LuxonError);
8346
8346
  var _super = _create_super$1d(InvalidUnitError);
8347
8347
  function InvalidUnitError(unit) {
8348
- _class_call_check$1R(this, InvalidUnitError);
8348
+ _class_call_check$1S(this, InvalidUnitError);
8349
8349
  return _super.call(this, "Invalid unit ".concat(unit));
8350
8350
  }
8351
8351
  return InvalidUnitError;
@@ -8356,7 +8356,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8356
8356
  _inherits$1d(InvalidArgumentError, LuxonError);
8357
8357
  var _super = _create_super$1d(InvalidArgumentError);
8358
8358
  function InvalidArgumentError() {
8359
- _class_call_check$1R(this, InvalidArgumentError);
8359
+ _class_call_check$1S(this, InvalidArgumentError);
8360
8360
  return _super.apply(this, arguments);
8361
8361
  }
8362
8362
  return InvalidArgumentError;
@@ -8367,7 +8367,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8367
8367
  _inherits$1d(ZoneIsAbstractError, LuxonError);
8368
8368
  var _super = _create_super$1d(ZoneIsAbstractError);
8369
8369
  function ZoneIsAbstractError() {
8370
- _class_call_check$1R(this, ZoneIsAbstractError);
8370
+ _class_call_check$1S(this, ZoneIsAbstractError);
8371
8371
  return _super.call(this, "Zone is an abstract class");
8372
8372
  }
8373
8373
  return ZoneIsAbstractError;
@@ -8524,12 +8524,12 @@ var DATETIME_HUGE_WITH_SECONDS = {
8524
8524
  timeZoneName: l
8525
8525
  };
8526
8526
 
8527
- function _class_call_check$1Q(instance, Constructor) {
8527
+ function _class_call_check$1R(instance, Constructor) {
8528
8528
  if (!(instance instanceof Constructor)) {
8529
8529
  throw new TypeError("Cannot call a class as a function");
8530
8530
  }
8531
8531
  }
8532
- function _defineProperties$1K(target, props) {
8532
+ function _defineProperties$1L(target, props) {
8533
8533
  for(var i = 0; i < props.length; i++){
8534
8534
  var descriptor = props[i];
8535
8535
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8538,16 +8538,16 @@ function _defineProperties$1K(target, props) {
8538
8538
  Object.defineProperty(target, descriptor.key, descriptor);
8539
8539
  }
8540
8540
  }
8541
- function _create_class$1K(Constructor, protoProps, staticProps) {
8542
- if (protoProps) _defineProperties$1K(Constructor.prototype, protoProps);
8543
- if (staticProps) _defineProperties$1K(Constructor, staticProps);
8541
+ function _create_class$1L(Constructor, protoProps, staticProps) {
8542
+ if (protoProps) _defineProperties$1L(Constructor.prototype, protoProps);
8543
+ if (staticProps) _defineProperties$1L(Constructor, staticProps);
8544
8544
  return Constructor;
8545
8545
  }
8546
8546
  var Zone = /*#__PURE__*/ function() {
8547
8547
  function Zone() {
8548
- _class_call_check$1Q(this, Zone);
8548
+ _class_call_check$1R(this, Zone);
8549
8549
  }
8550
- _create_class$1K(Zone, [
8550
+ _create_class$1L(Zone, [
8551
8551
  {
8552
8552
  key: "type",
8553
8553
  get: /**
@@ -8570,7 +8570,12 @@ var Zone = /*#__PURE__*/ function() {
8570
8570
  },
8571
8571
  {
8572
8572
  key: "ianaName",
8573
- get: function get() {
8573
+ get: /**
8574
+ * The IANA name of this zone.
8575
+ * Defaults to `name` if not overwritten by a subclass.
8576
+ * @abstract
8577
+ * @type {string}
8578
+ */ function get() {
8574
8579
  return this.name;
8575
8580
  }
8576
8581
  },
@@ -8653,12 +8658,12 @@ function _assert_this_initialized$1c(self) {
8653
8658
  }
8654
8659
  return self;
8655
8660
  }
8656
- function _class_call_check$1P(instance, Constructor) {
8661
+ function _class_call_check$1Q(instance, Constructor) {
8657
8662
  if (!(instance instanceof Constructor)) {
8658
8663
  throw new TypeError("Cannot call a class as a function");
8659
8664
  }
8660
8665
  }
8661
- function _defineProperties$1J(target, props) {
8666
+ function _defineProperties$1K(target, props) {
8662
8667
  for(var i = 0; i < props.length; i++){
8663
8668
  var descriptor = props[i];
8664
8669
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8667,9 +8672,9 @@ function _defineProperties$1J(target, props) {
8667
8672
  Object.defineProperty(target, descriptor.key, descriptor);
8668
8673
  }
8669
8674
  }
8670
- function _create_class$1J(Constructor, protoProps, staticProps) {
8671
- if (protoProps) _defineProperties$1J(Constructor.prototype, protoProps);
8672
- if (staticProps) _defineProperties$1J(Constructor, staticProps);
8675
+ function _create_class$1K(Constructor, protoProps, staticProps) {
8676
+ if (protoProps) _defineProperties$1K(Constructor.prototype, protoProps);
8677
+ if (staticProps) _defineProperties$1K(Constructor, staticProps);
8673
8678
  return Constructor;
8674
8679
  }
8675
8680
  function _get_prototype_of$1c(o) {
@@ -8737,10 +8742,10 @@ var SystemZone = /*#__PURE__*/ function(Zone) {
8737
8742
  _inherits$1c(SystemZone, Zone);
8738
8743
  var _super = _create_super$1c(SystemZone);
8739
8744
  function SystemZone() {
8740
- _class_call_check$1P(this, SystemZone);
8745
+ _class_call_check$1Q(this, SystemZone);
8741
8746
  return _super.apply(this, arguments);
8742
8747
  }
8743
- _create_class$1J(SystemZone, [
8748
+ _create_class$1K(SystemZone, [
8744
8749
  {
8745
8750
  key: "type",
8746
8751
  get: /** @override **/ function get() {
@@ -8821,12 +8826,12 @@ function _assert_this_initialized$1b(self) {
8821
8826
  }
8822
8827
  return self;
8823
8828
  }
8824
- function _class_call_check$1O(instance, Constructor) {
8829
+ function _class_call_check$1P(instance, Constructor) {
8825
8830
  if (!(instance instanceof Constructor)) {
8826
8831
  throw new TypeError("Cannot call a class as a function");
8827
8832
  }
8828
8833
  }
8829
- function _defineProperties$1I(target, props) {
8834
+ function _defineProperties$1J(target, props) {
8830
8835
  for(var i = 0; i < props.length; i++){
8831
8836
  var descriptor = props[i];
8832
8837
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8835,9 +8840,9 @@ function _defineProperties$1I(target, props) {
8835
8840
  Object.defineProperty(target, descriptor.key, descriptor);
8836
8841
  }
8837
8842
  }
8838
- function _create_class$1I(Constructor, protoProps, staticProps) {
8839
- if (protoProps) _defineProperties$1I(Constructor.prototype, protoProps);
8840
- if (staticProps) _defineProperties$1I(Constructor, staticProps);
8843
+ function _create_class$1J(Constructor, protoProps, staticProps) {
8844
+ if (protoProps) _defineProperties$1J(Constructor.prototype, protoProps);
8845
+ if (staticProps) _defineProperties$1J(Constructor, staticProps);
8841
8846
  return Constructor;
8842
8847
  }
8843
8848
  function _get_prototype_of$1b(o) {
@@ -8984,7 +8989,7 @@ function partsOffset(dtf, date) {
8984
8989
  var pos = typeToPos[type];
8985
8990
  if (type === "era") {
8986
8991
  filled[pos] = value;
8987
- } else if (!isUndefined(pos)) {
8992
+ } else if (!isUndefined$1(pos)) {
8988
8993
  filled[pos] = parseInt(value, 10);
8989
8994
  }
8990
8995
  }
@@ -8995,47 +9000,80 @@ var IANAZone = /*#__PURE__*/ function(Zone) {
8995
9000
  _inherits$1b(IANAZone, Zone);
8996
9001
  var _super = _create_super$1b(IANAZone);
8997
9002
  function IANAZone(name) {
8998
- _class_call_check$1O(this, IANAZone);
9003
+ _class_call_check$1P(this, IANAZone);
8999
9004
  var _this;
9000
9005
  _this = _super.call(this);
9001
9006
  /** @private **/ _this.zoneName = name;
9002
9007
  /** @private **/ _this.valid = IANAZone.isValidZone(name);
9003
9008
  return _this;
9004
9009
  }
9005
- _create_class$1I(IANAZone, [
9010
+ _create_class$1J(IANAZone, [
9006
9011
  {
9007
9012
  key: "type",
9008
- get: /** @override **/ function get() {
9013
+ get: /**
9014
+ * The type of zone. `iana` for all instances of `IANAZone`.
9015
+ * @override
9016
+ * @type {string}
9017
+ */ function get() {
9009
9018
  return "iana";
9010
9019
  }
9011
9020
  },
9012
9021
  {
9013
9022
  key: "name",
9014
- get: /** @override **/ function get() {
9023
+ get: /**
9024
+ * The name of this zone (i.e. the IANA zone name).
9025
+ * @override
9026
+ * @type {string}
9027
+ */ function get() {
9015
9028
  return this.zoneName;
9016
9029
  }
9017
9030
  },
9018
9031
  {
9019
9032
  key: "isUniversal",
9020
- get: /** @override **/ function get() {
9033
+ get: /**
9034
+ * Returns whether the offset is known to be fixed for the whole year:
9035
+ * Always returns false for all IANA zones.
9036
+ * @override
9037
+ * @type {boolean}
9038
+ */ function get() {
9021
9039
  return false;
9022
9040
  }
9023
9041
  },
9024
9042
  {
9025
- /** @override **/ key: "offsetName",
9043
+ /**
9044
+ * Returns the offset's common name (such as EST) at the specified timestamp
9045
+ * @override
9046
+ * @param {number} ts - Epoch milliseconds for which to get the name
9047
+ * @param {Object} opts - Options to affect the format
9048
+ * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
9049
+ * @param {string} opts.locale - What locale to return the offset name in.
9050
+ * @return {string}
9051
+ */ key: "offsetName",
9026
9052
  value: function offsetName(ts, param) {
9027
9053
  var format = param.format, locale = param.locale;
9028
9054
  return parseZoneInfo(ts, format, locale, this.name);
9029
9055
  }
9030
9056
  },
9031
9057
  {
9032
- /** @override **/ key: "formatOffset",
9058
+ /**
9059
+ * Returns the offset's value as a string
9060
+ * @override
9061
+ * @param {number} ts - Epoch milliseconds for which to get the offset
9062
+ * @param {string} format - What style of offset to return.
9063
+ * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
9064
+ * @return {string}
9065
+ */ key: "formatOffset",
9033
9066
  value: function formatOffset1(ts, format) {
9034
9067
  return formatOffset(this.offset(ts), format);
9035
9068
  }
9036
9069
  },
9037
9070
  {
9038
- /** @override **/ key: "offset",
9071
+ /**
9072
+ * Return the offset in minutes for this zone at the specified timestamp.
9073
+ * @override
9074
+ * @param {number} ts - Epoch milliseconds for which to compute the offset
9075
+ * @return {number}
9076
+ */ key: "offset",
9039
9077
  value: function offset(ts) {
9040
9078
  var date = new Date(ts);
9041
9079
  if (isNaN(date)) return NaN;
@@ -9062,14 +9100,23 @@ var IANAZone = /*#__PURE__*/ function(Zone) {
9062
9100
  }
9063
9101
  },
9064
9102
  {
9065
- /** @override **/ key: "equals",
9103
+ /**
9104
+ * Return whether this Zone is equal to another zone
9105
+ * @override
9106
+ * @param {Zone} otherZone - the zone to compare
9107
+ * @return {boolean}
9108
+ */ key: "equals",
9066
9109
  value: function equals(otherZone) {
9067
9110
  return otherZone.type === "iana" && otherZone.name === this.name;
9068
9111
  }
9069
9112
  },
9070
9113
  {
9071
9114
  key: "isValid",
9072
- get: /** @override **/ function get() {
9115
+ get: /**
9116
+ * Return whether this Zone is valid.
9117
+ * @override
9118
+ * @type {boolean}
9119
+ */ function get() {
9073
9120
  return this.valid;
9074
9121
  }
9075
9122
  }
@@ -9103,7 +9150,7 @@ var IANAZone = /*#__PURE__*/ function(Zone) {
9103
9150
  * @param {string} s - The string to check validity on
9104
9151
  * @example IANAZone.isValidSpecifier("America/New_York") //=> true
9105
9152
  * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false
9106
- * @deprecated This method returns false for some valid IANA names. Use isValidZone instead.
9153
+ * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.
9107
9154
  * @return {boolean}
9108
9155
  */ function isValidSpecifier(s) {
9109
9156
  return this.isValidZone(s);
@@ -9144,12 +9191,12 @@ function _array_like_to_array$x(arr, len) {
9144
9191
  function _array_with_holes$q(arr) {
9145
9192
  if (Array.isArray(arr)) return arr;
9146
9193
  }
9147
- function _class_call_check$1N(instance, Constructor) {
9194
+ function _class_call_check$1O(instance, Constructor) {
9148
9195
  if (!(instance instanceof Constructor)) {
9149
9196
  throw new TypeError("Cannot call a class as a function");
9150
9197
  }
9151
9198
  }
9152
- function _defineProperties$1H(target, props) {
9199
+ function _defineProperties$1I(target, props) {
9153
9200
  for(var i = 0; i < props.length; i++){
9154
9201
  var descriptor = props[i];
9155
9202
  descriptor.enumerable = descriptor.enumerable || false;
@@ -9158,9 +9205,9 @@ function _defineProperties$1H(target, props) {
9158
9205
  Object.defineProperty(target, descriptor.key, descriptor);
9159
9206
  }
9160
9207
  }
9161
- function _create_class$1H(Constructor, protoProps, staticProps) {
9162
- if (protoProps) _defineProperties$1H(Constructor.prototype, protoProps);
9163
- if (staticProps) _defineProperties$1H(Constructor, staticProps);
9208
+ function _create_class$1I(Constructor, protoProps, staticProps) {
9209
+ if (protoProps) _defineProperties$1I(Constructor.prototype, protoProps);
9210
+ if (staticProps) _defineProperties$1I(Constructor, staticProps);
9164
9211
  return Constructor;
9165
9212
  }
9166
9213
  function _define_property$X(obj, key, value) {
@@ -9451,7 +9498,7 @@ function supportsFastNumbers(loc) {
9451
9498
  * @private
9452
9499
  */ var PolyNumberFormatter = /*#__PURE__*/ function() {
9453
9500
  function PolyNumberFormatter(intl, forceSimple, opts) {
9454
- _class_call_check$1N(this, PolyNumberFormatter);
9501
+ _class_call_check$1O(this, PolyNumberFormatter);
9455
9502
  this.padTo = opts.padTo || 0;
9456
9503
  this.floor = opts.floor || false;
9457
9504
  opts.padTo; opts.floor; var otherOpts = _object_without_properties$1(opts, [
@@ -9466,7 +9513,7 @@ function supportsFastNumbers(loc) {
9466
9513
  this.inf = getCachedINF(intl, intlOpts);
9467
9514
  }
9468
9515
  }
9469
- _create_class$1H(PolyNumberFormatter, [
9516
+ _create_class$1I(PolyNumberFormatter, [
9470
9517
  {
9471
9518
  key: "format",
9472
9519
  value: function format(i) {
@@ -9487,7 +9534,7 @@ function supportsFastNumbers(loc) {
9487
9534
  * @private
9488
9535
  */ var PolyDateFormatter = /*#__PURE__*/ function() {
9489
9536
  function PolyDateFormatter(dt, intl, opts) {
9490
- _class_call_check$1N(this, PolyDateFormatter);
9537
+ _class_call_check$1O(this, PolyDateFormatter);
9491
9538
  this.opts = opts;
9492
9539
  this.originalZone = undefined;
9493
9540
  var z = undefined;
@@ -9533,7 +9580,7 @@ function supportsFastNumbers(loc) {
9533
9580
  intlOpts.timeZone = intlOpts.timeZone || z;
9534
9581
  this.dtf = getCachedDTF(intl, intlOpts);
9535
9582
  }
9536
- _create_class$1H(PolyDateFormatter, [
9583
+ _create_class$1I(PolyDateFormatter, [
9537
9584
  {
9538
9585
  key: "format",
9539
9586
  value: function format() {
@@ -9584,7 +9631,7 @@ function supportsFastNumbers(loc) {
9584
9631
  * @private
9585
9632
  */ var PolyRelFormatter = /*#__PURE__*/ function() {
9586
9633
  function PolyRelFormatter(intl, isEnglish, opts) {
9587
- _class_call_check$1N(this, PolyRelFormatter);
9634
+ _class_call_check$1O(this, PolyRelFormatter);
9588
9635
  this.opts = _object_spread$U({
9589
9636
  style: "long"
9590
9637
  }, opts);
@@ -9592,7 +9639,7 @@ function supportsFastNumbers(loc) {
9592
9639
  this.rtf = getCachedRTF(intl, opts);
9593
9640
  }
9594
9641
  }
9595
- _create_class$1H(PolyRelFormatter, [
9642
+ _create_class$1I(PolyRelFormatter, [
9596
9643
  {
9597
9644
  key: "format",
9598
9645
  value: function format(count, unit) {
@@ -9626,7 +9673,7 @@ var fallbackWeekSettings = {
9626
9673
  };
9627
9674
  var Locale = /*#__PURE__*/ function() {
9628
9675
  function Locale(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {
9629
- _class_call_check$1N(this, Locale);
9676
+ _class_call_check$1O(this, Locale);
9630
9677
  var _parseLocaleString = _sliced_to_array$q(parseLocaleString(locale), 3), parsedLocale = _parseLocaleString[0], parsedNumberingSystem = _parseLocaleString[1], parsedOutputCalendar = _parseLocaleString[2];
9631
9678
  this.locale = parsedLocale;
9632
9679
  this.numberingSystem = numbering || parsedNumberingSystem || null;
@@ -9646,7 +9693,7 @@ var Locale = /*#__PURE__*/ function() {
9646
9693
  this.specifiedLocale = specifiedLocale;
9647
9694
  this.fastNumbersCached = null;
9648
9695
  }
9649
- _create_class$1H(Locale, [
9696
+ _create_class$1I(Locale, [
9650
9697
  {
9651
9698
  key: "fastNumbers",
9652
9699
  get: function get() {
@@ -9863,6 +9910,12 @@ var Locale = /*#__PURE__*/ function() {
9863
9910
  value: function equals(other) {
9864
9911
  return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar;
9865
9912
  }
9913
+ },
9914
+ {
9915
+ key: "toString",
9916
+ value: function toString() {
9917
+ return "Locale(".concat(this.locale, ", ").concat(this.numberingSystem, ", ").concat(this.outputCalendar, ")");
9918
+ }
9866
9919
  }
9867
9920
  ], [
9868
9921
  {
@@ -9876,7 +9929,7 @@ var Locale = /*#__PURE__*/ function() {
9876
9929
  value: function create(locale, numberingSystem, outputCalendar, weekSettings) {
9877
9930
  var defaultToEN = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
9878
9931
  var specifiedLocale = locale || Settings.defaultLocale;
9879
- // the system locale is useful for human readable strings but annoying for parsing/formatting known formats
9932
+ // the system locale is useful for human-readable strings but annoying for parsing/formatting known formats
9880
9933
  var localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale());
9881
9934
  var numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;
9882
9935
  var outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;
@@ -9910,12 +9963,12 @@ function _assert_this_initialized$1a(self) {
9910
9963
  }
9911
9964
  return self;
9912
9965
  }
9913
- function _class_call_check$1M(instance, Constructor) {
9966
+ function _class_call_check$1N(instance, Constructor) {
9914
9967
  if (!(instance instanceof Constructor)) {
9915
9968
  throw new TypeError("Cannot call a class as a function");
9916
9969
  }
9917
9970
  }
9918
- function _defineProperties$1G(target, props) {
9971
+ function _defineProperties$1H(target, props) {
9919
9972
  for(var i = 0; i < props.length; i++){
9920
9973
  var descriptor = props[i];
9921
9974
  descriptor.enumerable = descriptor.enumerable || false;
@@ -9924,9 +9977,9 @@ function _defineProperties$1G(target, props) {
9924
9977
  Object.defineProperty(target, descriptor.key, descriptor);
9925
9978
  }
9926
9979
  }
9927
- function _create_class$1G(Constructor, protoProps, staticProps) {
9928
- if (protoProps) _defineProperties$1G(Constructor.prototype, protoProps);
9929
- if (staticProps) _defineProperties$1G(Constructor, staticProps);
9980
+ function _create_class$1H(Constructor, protoProps, staticProps) {
9981
+ if (protoProps) _defineProperties$1H(Constructor.prototype, protoProps);
9982
+ if (staticProps) _defineProperties$1H(Constructor, staticProps);
9930
9983
  return Constructor;
9931
9984
  }
9932
9985
  function _get_prototype_of$1a(o) {
@@ -9994,28 +10047,42 @@ var FixedOffsetZone = /*#__PURE__*/ function(Zone) {
9994
10047
  _inherits$1a(FixedOffsetZone, Zone);
9995
10048
  var _super = _create_super$1a(FixedOffsetZone);
9996
10049
  function FixedOffsetZone(offset) {
9997
- _class_call_check$1M(this, FixedOffsetZone);
10050
+ _class_call_check$1N(this, FixedOffsetZone);
9998
10051
  var _this;
9999
10052
  _this = _super.call(this);
10000
10053
  /** @private **/ _this.fixed = offset;
10001
10054
  return _this;
10002
10055
  }
10003
- _create_class$1G(FixedOffsetZone, [
10056
+ _create_class$1H(FixedOffsetZone, [
10004
10057
  {
10005
10058
  key: "type",
10006
- get: /** @override **/ function get() {
10059
+ get: /**
10060
+ * The type of zone. `fixed` for all instances of `FixedOffsetZone`.
10061
+ * @override
10062
+ * @type {string}
10063
+ */ function get() {
10007
10064
  return "fixed";
10008
10065
  }
10009
10066
  },
10010
10067
  {
10011
10068
  key: "name",
10012
- get: /** @override **/ function get() {
10069
+ get: /**
10070
+ * The name of this zone.
10071
+ * All fixed zones' names always start with "UTC" (plus optional offset)
10072
+ * @override
10073
+ * @type {string}
10074
+ */ function get() {
10013
10075
  return this.fixed === 0 ? "UTC" : "UTC".concat(formatOffset(this.fixed, "narrow"));
10014
10076
  }
10015
10077
  },
10016
10078
  {
10017
10079
  key: "ianaName",
10018
- get: function get() {
10080
+ get: /**
10081
+ * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`
10082
+ *
10083
+ * @override
10084
+ * @type {string}
10085
+ */ function get() {
10019
10086
  if (this.fixed === 0) {
10020
10087
  return "Etc/UTC";
10021
10088
  } else {
@@ -10024,38 +10091,71 @@ var FixedOffsetZone = /*#__PURE__*/ function(Zone) {
10024
10091
  }
10025
10092
  },
10026
10093
  {
10027
- /** @override **/ key: "offsetName",
10094
+ /**
10095
+ * Returns the offset's common name at the specified timestamp.
10096
+ *
10097
+ * For fixed offset zones this equals to the zone name.
10098
+ * @override
10099
+ */ key: "offsetName",
10028
10100
  value: function offsetName() {
10029
10101
  return this.name;
10030
10102
  }
10031
10103
  },
10032
10104
  {
10033
- /** @override **/ key: "formatOffset",
10105
+ /**
10106
+ * Returns the offset's value as a string
10107
+ * @override
10108
+ * @param {number} ts - Epoch milliseconds for which to get the offset
10109
+ * @param {string} format - What style of offset to return.
10110
+ * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
10111
+ * @return {string}
10112
+ */ key: "formatOffset",
10034
10113
  value: function formatOffset1(ts, format) {
10035
10114
  return formatOffset(this.fixed, format);
10036
10115
  }
10037
10116
  },
10038
10117
  {
10039
10118
  key: "isUniversal",
10040
- get: /** @override **/ function get() {
10119
+ get: /**
10120
+ * Returns whether the offset is known to be fixed for the whole year:
10121
+ * Always returns true for all fixed offset zones.
10122
+ * @override
10123
+ * @type {boolean}
10124
+ */ function get() {
10041
10125
  return true;
10042
10126
  }
10043
10127
  },
10044
10128
  {
10045
- /** @override **/ key: "offset",
10129
+ /**
10130
+ * Return the offset in minutes for this zone at the specified timestamp.
10131
+ *
10132
+ * For fixed offset zones, this is constant and does not depend on a timestamp.
10133
+ * @override
10134
+ * @return {number}
10135
+ */ key: "offset",
10046
10136
  value: function offset() {
10047
10137
  return this.fixed;
10048
10138
  }
10049
10139
  },
10050
10140
  {
10051
- /** @override **/ key: "equals",
10141
+ /**
10142
+ * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)
10143
+ * @override
10144
+ * @param {Zone} otherZone - the zone to compare
10145
+ * @return {boolean}
10146
+ */ key: "equals",
10052
10147
  value: function equals(otherZone) {
10053
10148
  return otherZone.type === "fixed" && otherZone.fixed === this.fixed;
10054
10149
  }
10055
10150
  },
10056
10151
  {
10057
10152
  key: "isValid",
10058
- get: /** @override **/ function get() {
10153
+ get: /**
10154
+ * Return whether this Zone is valid:
10155
+ * All fixed offset zones are valid.
10156
+ * @override
10157
+ * @type {boolean}
10158
+ */ function get() {
10059
10159
  return true;
10060
10160
  }
10061
10161
  }
@@ -10111,12 +10211,12 @@ function _assert_this_initialized$19(self) {
10111
10211
  }
10112
10212
  return self;
10113
10213
  }
10114
- function _class_call_check$1L(instance, Constructor) {
10214
+ function _class_call_check$1M(instance, Constructor) {
10115
10215
  if (!(instance instanceof Constructor)) {
10116
10216
  throw new TypeError("Cannot call a class as a function");
10117
10217
  }
10118
10218
  }
10119
- function _defineProperties$1F(target, props) {
10219
+ function _defineProperties$1G(target, props) {
10120
10220
  for(var i = 0; i < props.length; i++){
10121
10221
  var descriptor = props[i];
10122
10222
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10125,9 +10225,9 @@ function _defineProperties$1F(target, props) {
10125
10225
  Object.defineProperty(target, descriptor.key, descriptor);
10126
10226
  }
10127
10227
  }
10128
- function _create_class$1F(Constructor, protoProps, staticProps) {
10129
- if (protoProps) _defineProperties$1F(Constructor.prototype, protoProps);
10130
- if (staticProps) _defineProperties$1F(Constructor, staticProps);
10228
+ function _create_class$1G(Constructor, protoProps, staticProps) {
10229
+ if (protoProps) _defineProperties$1G(Constructor.prototype, protoProps);
10230
+ if (staticProps) _defineProperties$1G(Constructor, staticProps);
10131
10231
  return Constructor;
10132
10232
  }
10133
10233
  function _get_prototype_of$19(o) {
@@ -10194,13 +10294,13 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
10194
10294
  _inherits$19(InvalidZone, Zone);
10195
10295
  var _super = _create_super$19(InvalidZone);
10196
10296
  function InvalidZone(zoneName) {
10197
- _class_call_check$1L(this, InvalidZone);
10297
+ _class_call_check$1M(this, InvalidZone);
10198
10298
  var _this;
10199
10299
  _this = _super.call(this);
10200
10300
  /** @private */ _this.zoneName = zoneName;
10201
10301
  return _this;
10202
10302
  }
10203
- _create_class$1F(InvalidZone, [
10303
+ _create_class$1G(InvalidZone, [
10204
10304
  {
10205
10305
  key: "type",
10206
10306
  get: /** @override **/ function get() {
@@ -10255,7 +10355,7 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
10255
10355
 
10256
10356
  /**
10257
10357
  * @private
10258
- */ function _instanceof$w(left, right) {
10358
+ */ function _instanceof$x(left, right) {
10259
10359
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
10260
10360
  return !!right[Symbol.hasInstance](left);
10261
10361
  } else {
@@ -10263,9 +10363,9 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
10263
10363
  }
10264
10364
  }
10265
10365
  function normalizeZone(input, defaultZone) {
10266
- if (isUndefined(input) || input === null) {
10366
+ if (isUndefined$1(input) || input === null) {
10267
10367
  return defaultZone;
10268
- } else if (_instanceof$w(input, Zone)) {
10368
+ } else if (_instanceof$x(input, Zone)) {
10269
10369
  return input;
10270
10370
  } else if (isString$1(input)) {
10271
10371
  var lowered = input.toLowerCase();
@@ -10284,12 +10384,199 @@ function normalizeZone(input, defaultZone) {
10284
10384
  }
10285
10385
  }
10286
10386
 
10287
- function _class_call_check$1K(instance, Constructor) {
10387
+ function _array_like_to_array$w(arr, len) {
10388
+ if (len == null || len > arr.length) len = arr.length;
10389
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
10390
+ return arr2;
10391
+ }
10392
+ function _array_with_holes$p(arr) {
10393
+ if (Array.isArray(arr)) return arr;
10394
+ }
10395
+ function _iterable_to_array_limit$p(arr, i) {
10396
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
10397
+ if (_i == null) return;
10398
+ var _arr = [];
10399
+ var _n = true;
10400
+ var _d = false;
10401
+ var _s, _e;
10402
+ try {
10403
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
10404
+ _arr.push(_s.value);
10405
+ if (i && _arr.length === i) break;
10406
+ }
10407
+ } catch (err) {
10408
+ _d = true;
10409
+ _e = err;
10410
+ } finally{
10411
+ try {
10412
+ if (!_n && _i["return"] != null) _i["return"]();
10413
+ } finally{
10414
+ if (_d) throw _e;
10415
+ }
10416
+ }
10417
+ return _arr;
10418
+ }
10419
+ function _non_iterable_rest$p() {
10420
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
10421
+ }
10422
+ function _sliced_to_array$p(arr, i) {
10423
+ return _array_with_holes$p(arr) || _iterable_to_array_limit$p(arr, i) || _unsupported_iterable_to_array$w(arr, i) || _non_iterable_rest$p();
10424
+ }
10425
+ function _unsupported_iterable_to_array$w(o, minLen) {
10426
+ if (!o) return;
10427
+ if (typeof o === "string") return _array_like_to_array$w(o, minLen);
10428
+ var n = Object.prototype.toString.call(o).slice(8, -1);
10429
+ if (n === "Object" && o.constructor) n = o.constructor.name;
10430
+ if (n === "Map" || n === "Set") return Array.from(n);
10431
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$w(o, minLen);
10432
+ }
10433
+ var numberingSystems = {
10434
+ arab: "[٠-٩]",
10435
+ arabext: "[۰-۹]",
10436
+ bali: "[᭐-᭙]",
10437
+ beng: "[০-৯]",
10438
+ deva: "[०-९]",
10439
+ fullwide: "[0-9]",
10440
+ gujr: "[૦-૯]",
10441
+ hanidec: "[〇|一|二|三|四|五|六|七|八|九]",
10442
+ khmr: "[០-៩]",
10443
+ knda: "[೦-೯]",
10444
+ laoo: "[໐-໙]",
10445
+ limb: "[᥆-᥏]",
10446
+ mlym: "[൦-൯]",
10447
+ mong: "[᠐-᠙]",
10448
+ mymr: "[၀-၉]",
10449
+ orya: "[୦-୯]",
10450
+ tamldec: "[௦-௯]",
10451
+ telu: "[౦-౯]",
10452
+ thai: "[๐-๙]",
10453
+ tibt: "[༠-༩]",
10454
+ latn: "\\d"
10455
+ };
10456
+ var numberingSystemsUTF16 = {
10457
+ arab: [
10458
+ 1632,
10459
+ 1641
10460
+ ],
10461
+ arabext: [
10462
+ 1776,
10463
+ 1785
10464
+ ],
10465
+ bali: [
10466
+ 6992,
10467
+ 7001
10468
+ ],
10469
+ beng: [
10470
+ 2534,
10471
+ 2543
10472
+ ],
10473
+ deva: [
10474
+ 2406,
10475
+ 2415
10476
+ ],
10477
+ fullwide: [
10478
+ 65296,
10479
+ 65303
10480
+ ],
10481
+ gujr: [
10482
+ 2790,
10483
+ 2799
10484
+ ],
10485
+ khmr: [
10486
+ 6112,
10487
+ 6121
10488
+ ],
10489
+ knda: [
10490
+ 3302,
10491
+ 3311
10492
+ ],
10493
+ laoo: [
10494
+ 3792,
10495
+ 3801
10496
+ ],
10497
+ limb: [
10498
+ 6470,
10499
+ 6479
10500
+ ],
10501
+ mlym: [
10502
+ 3430,
10503
+ 3439
10504
+ ],
10505
+ mong: [
10506
+ 6160,
10507
+ 6169
10508
+ ],
10509
+ mymr: [
10510
+ 4160,
10511
+ 4169
10512
+ ],
10513
+ orya: [
10514
+ 2918,
10515
+ 2927
10516
+ ],
10517
+ tamldec: [
10518
+ 3046,
10519
+ 3055
10520
+ ],
10521
+ telu: [
10522
+ 3174,
10523
+ 3183
10524
+ ],
10525
+ thai: [
10526
+ 3664,
10527
+ 3673
10528
+ ],
10529
+ tibt: [
10530
+ 3872,
10531
+ 3881
10532
+ ]
10533
+ };
10534
+ var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split("");
10535
+ function parseDigits(str) {
10536
+ var value = parseInt(str, 10);
10537
+ if (isNaN(value)) {
10538
+ value = "";
10539
+ for(var i = 0; i < str.length; i++){
10540
+ var code = str.charCodeAt(i);
10541
+ if (str[i].search(numberingSystems.hanidec) !== -1) {
10542
+ value += hanidecChars.indexOf(str[i]);
10543
+ } else {
10544
+ for(var key in numberingSystemsUTF16){
10545
+ var _numberingSystemsUTF16_key = _sliced_to_array$p(numberingSystemsUTF16[key], 2), min = _numberingSystemsUTF16_key[0], max = _numberingSystemsUTF16_key[1];
10546
+ if (code >= min && code <= max) {
10547
+ value += code - min;
10548
+ }
10549
+ }
10550
+ }
10551
+ }
10552
+ return parseInt(value, 10);
10553
+ } else {
10554
+ return value;
10555
+ }
10556
+ }
10557
+ // cache of {numberingSystem: {append: regex}}
10558
+ var digitRegexCache = {};
10559
+ function resetDigitRegexCache() {
10560
+ digitRegexCache = {};
10561
+ }
10562
+ function digitRegex(param) {
10563
+ var numberingSystem = param.numberingSystem, append = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
10564
+ var ns = numberingSystem || "latn";
10565
+ if (!digitRegexCache[ns]) {
10566
+ digitRegexCache[ns] = {};
10567
+ }
10568
+ if (!digitRegexCache[ns][append]) {
10569
+ digitRegexCache[ns][append] = new RegExp("".concat(numberingSystems[ns]).concat(append));
10570
+ }
10571
+ return digitRegexCache[ns][append];
10572
+ }
10573
+
10574
+ function _class_call_check$1L(instance, Constructor) {
10288
10575
  if (!(instance instanceof Constructor)) {
10289
10576
  throw new TypeError("Cannot call a class as a function");
10290
10577
  }
10291
10578
  }
10292
- function _defineProperties$1E(target, props) {
10579
+ function _defineProperties$1F(target, props) {
10293
10580
  for(var i = 0; i < props.length; i++){
10294
10581
  var descriptor = props[i];
10295
10582
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10298,9 +10585,9 @@ function _defineProperties$1E(target, props) {
10298
10585
  Object.defineProperty(target, descriptor.key, descriptor);
10299
10586
  }
10300
10587
  }
10301
- function _create_class$1E(Constructor, protoProps, staticProps) {
10302
- if (protoProps) _defineProperties$1E(Constructor.prototype, protoProps);
10303
- if (staticProps) _defineProperties$1E(Constructor, staticProps);
10588
+ function _create_class$1F(Constructor, protoProps, staticProps) {
10589
+ if (protoProps) _defineProperties$1F(Constructor.prototype, protoProps);
10590
+ if (staticProps) _defineProperties$1F(Constructor, staticProps);
10304
10591
  return Constructor;
10305
10592
  }
10306
10593
  var now = function() {
@@ -10308,9 +10595,9 @@ var now = function() {
10308
10595
  }, defaultZone = "system", defaultLocale = null, defaultNumberingSystem = null, defaultOutputCalendar = null, twoDigitCutoffYear = 60, throwOnInvalid, defaultWeekSettings = null;
10309
10596
  var Settings = /*#__PURE__*/ function() {
10310
10597
  function Settings() {
10311
- _class_call_check$1K(this, Settings);
10598
+ _class_call_check$1L(this, Settings);
10312
10599
  }
10313
- _create_class$1E(Settings, null, [
10600
+ _create_class$1F(Settings, null, [
10314
10601
  {
10315
10602
  key: "now",
10316
10603
  get: /**
@@ -10416,16 +10703,17 @@ var Settings = /*#__PURE__*/ function() {
10416
10703
  {
10417
10704
  key: "twoDigitCutoffYear",
10418
10705
  get: /**
10419
- * Get the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
10706
+ * 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.
10420
10707
  * @type {number}
10421
10708
  */ function get() {
10422
10709
  return twoDigitCutoffYear;
10423
10710
  },
10424
10711
  set: /**
10425
- * Set the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
10712
+ * 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.
10426
10713
  * @type {number}
10427
- * @example Settings.twoDigitCutoffYear = 0 // cut-off year is 0, so all 'yy' are interpreted as current century
10428
- * @example Settings.twoDigitCutoffYear = 50 // '49' -> 1949; '50' -> 2050
10714
+ * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century
10715
+ * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century
10716
+ * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950
10429
10717
  * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50
10430
10718
  * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
10431
10719
  */ function set(cutoffYear) {
@@ -10455,18 +10743,20 @@ var Settings = /*#__PURE__*/ function() {
10455
10743
  */ function resetCaches() {
10456
10744
  Locale.resetCache();
10457
10745
  IANAZone.resetCache();
10746
+ DateTime.resetCache();
10747
+ resetDigitRegexCache();
10458
10748
  }
10459
10749
  }
10460
10750
  ]);
10461
10751
  return Settings;
10462
10752
  }();
10463
10753
 
10464
- function _class_call_check$1J(instance, Constructor) {
10754
+ function _class_call_check$1K(instance, Constructor) {
10465
10755
  if (!(instance instanceof Constructor)) {
10466
10756
  throw new TypeError("Cannot call a class as a function");
10467
10757
  }
10468
10758
  }
10469
- function _defineProperties$1D(target, props) {
10759
+ function _defineProperties$1E(target, props) {
10470
10760
  for(var i = 0; i < props.length; i++){
10471
10761
  var descriptor = props[i];
10472
10762
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10475,18 +10765,18 @@ function _defineProperties$1D(target, props) {
10475
10765
  Object.defineProperty(target, descriptor.key, descriptor);
10476
10766
  }
10477
10767
  }
10478
- function _create_class$1D(Constructor, protoProps, staticProps) {
10479
- if (protoProps) _defineProperties$1D(Constructor.prototype, protoProps);
10480
- if (staticProps) _defineProperties$1D(Constructor, staticProps);
10768
+ function _create_class$1E(Constructor, protoProps, staticProps) {
10769
+ if (protoProps) _defineProperties$1E(Constructor.prototype, protoProps);
10770
+ if (staticProps) _defineProperties$1E(Constructor, staticProps);
10481
10771
  return Constructor;
10482
10772
  }
10483
10773
  var Invalid = /*#__PURE__*/ function() {
10484
10774
  function Invalid(reason, explanation) {
10485
- _class_call_check$1J(this, Invalid);
10775
+ _class_call_check$1K(this, Invalid);
10486
10776
  this.reason = reason;
10487
10777
  this.explanation = explanation;
10488
10778
  }
10489
- _create_class$1D(Invalid, [
10779
+ _create_class$1E(Invalid, [
10490
10780
  {
10491
10781
  key: "toMessage",
10492
10782
  value: function toMessage() {
@@ -10650,15 +10940,15 @@ function ordinalToGregorian(ordinalData) {
10650
10940
  * Modifies obj in-place!
10651
10941
  * @param obj the object values
10652
10942
  */ function usesLocalWeekValues(obj, loc) {
10653
- var hasLocaleWeekData = !isUndefined(obj.localWeekday) || !isUndefined(obj.localWeekNumber) || !isUndefined(obj.localWeekYear);
10943
+ var hasLocaleWeekData = !isUndefined$1(obj.localWeekday) || !isUndefined$1(obj.localWeekNumber) || !isUndefined$1(obj.localWeekYear);
10654
10944
  if (hasLocaleWeekData) {
10655
- var hasIsoWeekData = !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);
10945
+ var hasIsoWeekData = !isUndefined$1(obj.weekday) || !isUndefined$1(obj.weekNumber) || !isUndefined$1(obj.weekYear);
10656
10946
  if (hasIsoWeekData) {
10657
10947
  throw new ConflictingSpecificationError("Cannot mix locale-based week fields with ISO-based week fields");
10658
10948
  }
10659
- if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;
10660
- if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;
10661
- if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;
10949
+ if (!isUndefined$1(obj.localWeekday)) obj.weekday = obj.localWeekday;
10950
+ if (!isUndefined$1(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;
10951
+ if (!isUndefined$1(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;
10662
10952
  delete obj.localWeekday;
10663
10953
  delete obj.localWeekNumber;
10664
10954
  delete obj.localWeekYear;
@@ -10751,7 +11041,7 @@ function _object_spread$S(target) {
10751
11041
  /**
10752
11042
  * @private
10753
11043
  */ // TYPES
10754
- function isUndefined(o) {
11044
+ function isUndefined$1(o) {
10755
11045
  return typeof o === "undefined";
10756
11046
  }
10757
11047
  function isNumber$1(o) {
@@ -10852,14 +11142,14 @@ function padStart(input) {
10852
11142
  return padded;
10853
11143
  }
10854
11144
  function parseInteger(string) {
10855
- if (isUndefined(string) || string === null || string === "") {
11145
+ if (isUndefined$1(string) || string === null || string === "") {
10856
11146
  return undefined;
10857
11147
  } else {
10858
11148
  return parseInt(string, 10);
10859
11149
  }
10860
11150
  }
10861
11151
  function parseFloating(string) {
10862
- if (isUndefined(string) || string === null || string === "") {
11152
+ if (isUndefined$1(string) || string === null || string === "") {
10863
11153
  return undefined;
10864
11154
  } else {
10865
11155
  return parseFloat(string);
@@ -10867,7 +11157,7 @@ function parseFloating(string) {
10867
11157
  }
10868
11158
  function parseMillis(fraction) {
10869
11159
  // Return undefined (instead of 0) in these cases, where fraction is not set
10870
- if (isUndefined(fraction) || fraction === null || fraction === "") {
11160
+ if (isUndefined$1(fraction) || fraction === null || fraction === "") {
10871
11161
  return undefined;
10872
11162
  } else {
10873
11163
  var f = parseFloat("0." + fraction) * 1000;
@@ -10985,7 +11275,13 @@ function normalizeObject(obj, normalizer) {
10985
11275
  }
10986
11276
  return normalized;
10987
11277
  }
10988
- function formatOffset(offset, format) {
11278
+ /**
11279
+ * Returns the offset's value as a string
11280
+ * @param {number} ts - Epoch milliseconds for which to get the offset
11281
+ * @param {string} format - What style of offset to return.
11282
+ * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
11283
+ * @return {string}
11284
+ */ function formatOffset(offset, format) {
10989
11285
  var hours = Math.trunc(Math.abs(offset / 60)), minutes = Math.trunc(Math.abs(offset % 60)), sign = offset >= 0 ? "+" : "-";
10990
11286
  switch(format){
10991
11287
  case "short":
@@ -11007,13 +11303,13 @@ function timeObject(obj) {
11007
11303
  ]);
11008
11304
  }
11009
11305
 
11010
- function _array_like_to_array$w(arr, len) {
11306
+ function _array_like_to_array$v(arr, len) {
11011
11307
  if (len == null || len > arr.length) len = arr.length;
11012
11308
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11013
11309
  return arr2;
11014
11310
  }
11015
11311
  function _array_without_holes$g(arr) {
11016
- if (Array.isArray(arr)) return _array_like_to_array$w(arr);
11312
+ if (Array.isArray(arr)) return _array_like_to_array$v(arr);
11017
11313
  }
11018
11314
  function _iterable_to_array$g(iter) {
11019
11315
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -11022,15 +11318,15 @@ function _non_iterable_spread$g() {
11022
11318
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11023
11319
  }
11024
11320
  function _to_consumable_array$g(arr) {
11025
- return _array_without_holes$g(arr) || _iterable_to_array$g(arr) || _unsupported_iterable_to_array$w(arr) || _non_iterable_spread$g();
11321
+ return _array_without_holes$g(arr) || _iterable_to_array$g(arr) || _unsupported_iterable_to_array$v(arr) || _non_iterable_spread$g();
11026
11322
  }
11027
- function _unsupported_iterable_to_array$w(o, minLen) {
11323
+ function _unsupported_iterable_to_array$v(o, minLen) {
11028
11324
  if (!o) return;
11029
- if (typeof o === "string") return _array_like_to_array$w(o, minLen);
11325
+ if (typeof o === "string") return _array_like_to_array$v(o, minLen);
11030
11326
  var n = Object.prototype.toString.call(o).slice(8, -1);
11031
11327
  if (n === "Object" && o.constructor) n = o.constructor.name;
11032
11328
  if (n === "Map" || n === "Set") return Array.from(n);
11033
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$w(o, minLen);
11329
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$v(o, minLen);
11034
11330
  }
11035
11331
  /**
11036
11332
  * @private
@@ -11264,20 +11560,20 @@ function formatRelativeTime(unit, count) {
11264
11560
  return isInPast ? "".concat(fmtValue, " ").concat(fmtUnit, " ago") : "in ".concat(fmtValue, " ").concat(fmtUnit);
11265
11561
  }
11266
11562
 
11267
- function _array_like_to_array$v(arr, len) {
11563
+ function _array_like_to_array$u(arr, len) {
11268
11564
  if (len == null || len > arr.length) len = arr.length;
11269
11565
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11270
11566
  return arr2;
11271
11567
  }
11272
11568
  function _array_without_holes$f(arr) {
11273
- if (Array.isArray(arr)) return _array_like_to_array$v(arr);
11569
+ if (Array.isArray(arr)) return _array_like_to_array$u(arr);
11274
11570
  }
11275
- function _class_call_check$1I(instance, Constructor) {
11571
+ function _class_call_check$1J(instance, Constructor) {
11276
11572
  if (!(instance instanceof Constructor)) {
11277
11573
  throw new TypeError("Cannot call a class as a function");
11278
11574
  }
11279
11575
  }
11280
- function _defineProperties$1C(target, props) {
11576
+ function _defineProperties$1D(target, props) {
11281
11577
  for(var i = 0; i < props.length; i++){
11282
11578
  var descriptor = props[i];
11283
11579
  descriptor.enumerable = descriptor.enumerable || false;
@@ -11286,9 +11582,9 @@ function _defineProperties$1C(target, props) {
11286
11582
  Object.defineProperty(target, descriptor.key, descriptor);
11287
11583
  }
11288
11584
  }
11289
- function _create_class$1C(Constructor, protoProps, staticProps) {
11290
- if (protoProps) _defineProperties$1C(Constructor.prototype, protoProps);
11291
- if (staticProps) _defineProperties$1C(Constructor, staticProps);
11585
+ function _create_class$1D(Constructor, protoProps, staticProps) {
11586
+ if (protoProps) _defineProperties$1D(Constructor.prototype, protoProps);
11587
+ if (staticProps) _defineProperties$1D(Constructor, staticProps);
11292
11588
  return Constructor;
11293
11589
  }
11294
11590
  function _define_property$U(obj, key, value) {
@@ -11326,15 +11622,15 @@ function _object_spread$R(target) {
11326
11622
  return target;
11327
11623
  }
11328
11624
  function _to_consumable_array$f(arr) {
11329
- return _array_without_holes$f(arr) || _iterable_to_array$f(arr) || _unsupported_iterable_to_array$v(arr) || _non_iterable_spread$f();
11625
+ return _array_without_holes$f(arr) || _iterable_to_array$f(arr) || _unsupported_iterable_to_array$u(arr) || _non_iterable_spread$f();
11330
11626
  }
11331
- function _unsupported_iterable_to_array$v(o, minLen) {
11627
+ function _unsupported_iterable_to_array$u(o, minLen) {
11332
11628
  if (!o) return;
11333
- if (typeof o === "string") return _array_like_to_array$v(o, minLen);
11629
+ if (typeof o === "string") return _array_like_to_array$u(o, minLen);
11334
11630
  var n = Object.prototype.toString.call(o).slice(8, -1);
11335
11631
  if (n === "Object" && o.constructor) n = o.constructor.name;
11336
11632
  if (n === "Map" || n === "Set") return Array.from(n);
11337
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$v(o, minLen);
11633
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$u(o, minLen);
11338
11634
  }
11339
11635
  function stringifyTokens(splits, tokenToString) {
11340
11636
  var s = "";
@@ -11388,12 +11684,12 @@ var macroTokenToFormatOpts = {
11388
11684
  };
11389
11685
  var Formatter = /*#__PURE__*/ function() {
11390
11686
  function Formatter(locale, formatOpts) {
11391
- _class_call_check$1I(this, Formatter);
11687
+ _class_call_check$1J(this, Formatter);
11392
11688
  this.opts = formatOpts;
11393
11689
  this.loc = locale;
11394
11690
  this.systemLoc = null;
11395
11691
  }
11396
- _create_class$1C(Formatter, [
11692
+ _create_class$1D(Formatter, [
11397
11693
  {
11398
11694
  key: "formatWithSystemDefault",
11399
11695
  value: function formatWithSystemDefault(dt, opts) {
@@ -11814,12 +12110,12 @@ var Formatter = /*#__PURE__*/ function() {
11814
12110
  return Formatter;
11815
12111
  }();
11816
12112
 
11817
- function _array_like_to_array$u(arr, len) {
12113
+ function _array_like_to_array$t(arr, len) {
11818
12114
  if (len == null || len > arr.length) len = arr.length;
11819
12115
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11820
12116
  return arr2;
11821
12117
  }
11822
- function _array_with_holes$p(arr) {
12118
+ function _array_with_holes$o(arr) {
11823
12119
  if (Array.isArray(arr)) return arr;
11824
12120
  }
11825
12121
  function _define_property$T(obj, key, value) {
@@ -11835,7 +12131,7 @@ function _define_property$T(obj, key, value) {
11835
12131
  }
11836
12132
  return obj;
11837
12133
  }
11838
- function _iterable_to_array_limit$p(arr, i) {
12134
+ function _iterable_to_array_limit$o(arr, i) {
11839
12135
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
11840
12136
  if (_i == null) return;
11841
12137
  var _arr = [];
@@ -11859,7 +12155,7 @@ function _iterable_to_array_limit$p(arr, i) {
11859
12155
  }
11860
12156
  return _arr;
11861
12157
  }
11862
- function _non_iterable_rest$p() {
12158
+ function _non_iterable_rest$o() {
11863
12159
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11864
12160
  }
11865
12161
  function _object_spread$Q(target) {
@@ -11877,16 +12173,16 @@ function _object_spread$Q(target) {
11877
12173
  }
11878
12174
  return target;
11879
12175
  }
11880
- function _sliced_to_array$p(arr, i) {
11881
- return _array_with_holes$p(arr) || _iterable_to_array_limit$p(arr, i) || _unsupported_iterable_to_array$u(arr, i) || _non_iterable_rest$p();
12176
+ function _sliced_to_array$o(arr, i) {
12177
+ return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$t(arr, i) || _non_iterable_rest$o();
11882
12178
  }
11883
- function _unsupported_iterable_to_array$u(o, minLen) {
12179
+ function _unsupported_iterable_to_array$t(o, minLen) {
11884
12180
  if (!o) return;
11885
- if (typeof o === "string") return _array_like_to_array$u(o, minLen);
12181
+ if (typeof o === "string") return _array_like_to_array$t(o, minLen);
11886
12182
  var n = Object.prototype.toString.call(o).slice(8, -1);
11887
12183
  if (n === "Object" && o.constructor) n = o.constructor.name;
11888
12184
  if (n === "Map" || n === "Set") return Array.from(n);
11889
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$u(o, minLen);
12185
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$t(o, minLen);
11890
12186
  }
11891
12187
  /*
11892
12188
  * This file handles parsing for well-specified formats. Here's how it works:
@@ -11912,8 +12208,8 @@ function combineExtractors() {
11912
12208
  }
11913
12209
  return function(m) {
11914
12210
  return extractors.reduce(function(param, ex) {
11915
- var _param = _sliced_to_array$p(param, 3), mergedVals = _param[0], mergedZone = _param[1], cursor = _param[2];
11916
- var _ex = _sliced_to_array$p(ex(m, cursor), 3), val = _ex[0], zone = _ex[1], next = _ex[2];
12211
+ var _param = _sliced_to_array$o(param, 3), mergedVals = _param[0], mergedZone = _param[1], cursor = _param[2];
12212
+ var _ex = _sliced_to_array$o(ex(m, cursor), 3), val = _ex[0], zone = _ex[1], next = _ex[2];
11917
12213
  return [
11918
12214
  _object_spread$Q({}, mergedVals, val),
11919
12215
  zone || mergedZone,
@@ -11939,7 +12235,7 @@ function parse$1(s) {
11939
12235
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
11940
12236
  try {
11941
12237
  for(var _iterator = patterns[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
11942
- var _step_value = _sliced_to_array$p(_step.value, 2), regex = _step_value[0], extractor = _step_value[1];
12238
+ var _step_value = _sliced_to_array$o(_step.value, 2), regex = _step_value[0], extractor = _step_value[1];
11943
12239
  var m = regex.exec(s);
11944
12240
  if (m) {
11945
12241
  return extractor(m);
@@ -11997,7 +12293,7 @@ var sqlTimeRegex = RegExp("".concat(isoTimeBaseRegex.source, " ?(?:").concat(off
11997
12293
  var sqlTimeExtensionRegex = RegExp("(?: ".concat(sqlTimeRegex.source, ")?"));
11998
12294
  function int(match, pos, fallback) {
11999
12295
  var m = match[pos];
12000
- return isUndefined(m) ? fallback : parseInteger(m);
12296
+ return isUndefined$1(m) ? fallback : parseInteger(m);
12001
12297
  }
12002
12298
  function extractISOYmd(match, cursor) {
12003
12299
  var item = {
@@ -12045,7 +12341,7 @@ var isoTimeOnly = RegExp("^T?".concat(isoTimeBaseRegex.source, "$"));
12045
12341
  // ISO duration parsing
12046
12342
  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)?)?)$/;
12047
12343
  function extractISODuration(match) {
12048
- var _match = _sliced_to_array$p(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];
12344
+ var _match = _sliced_to_array$o(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];
12049
12345
  var hasNegativePrefix = s[0] === "-";
12050
12346
  var negativeSeconds = secondStr && secondStr[0] === "-";
12051
12347
  var maybeNegate = function(num) {
@@ -12096,7 +12392,7 @@ function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr,
12096
12392
  // RFC 2822/5322
12097
12393
  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)))$/;
12098
12394
  function extractRFC2822(match) {
12099
- var _match = _sliced_to_array$p(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);
12395
+ var _match = _sliced_to_array$o(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);
12100
12396
  var offset;
12101
12397
  if (obsOffset) {
12102
12398
  offset = obsOffsets[obsOffset];
@@ -12117,14 +12413,14 @@ function preprocessRFC2822(s) {
12117
12413
  // http date
12118
12414
  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})$/;
12119
12415
  function extractRFC1123Or850(match) {
12120
- var _match = _sliced_to_array$p(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);
12416
+ var _match = _sliced_to_array$o(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);
12121
12417
  return [
12122
12418
  result,
12123
12419
  FixedOffsetZone.utcInstance
12124
12420
  ];
12125
12421
  }
12126
12422
  function extractASCII(match) {
12127
- var _match = _sliced_to_array$p(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);
12423
+ var _match = _sliced_to_array$o(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);
12128
12424
  return [
12129
12425
  result,
12130
12426
  FixedOffsetZone.utcInstance
@@ -12199,20 +12495,20 @@ function parseSQL(s) {
12199
12495
  ]);
12200
12496
  }
12201
12497
 
12202
- function _array_like_to_array$t(arr, len) {
12498
+ function _array_like_to_array$s(arr, len) {
12203
12499
  if (len == null || len > arr.length) len = arr.length;
12204
12500
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
12205
12501
  return arr2;
12206
12502
  }
12207
- function _array_with_holes$o(arr) {
12503
+ function _array_with_holes$n(arr) {
12208
12504
  if (Array.isArray(arr)) return arr;
12209
12505
  }
12210
- function _class_call_check$1H(instance, Constructor) {
12506
+ function _class_call_check$1I(instance, Constructor) {
12211
12507
  if (!(instance instanceof Constructor)) {
12212
12508
  throw new TypeError("Cannot call a class as a function");
12213
12509
  }
12214
12510
  }
12215
- function _defineProperties$1B(target, props) {
12511
+ function _defineProperties$1C(target, props) {
12216
12512
  for(var i = 0; i < props.length; i++){
12217
12513
  var descriptor = props[i];
12218
12514
  descriptor.enumerable = descriptor.enumerable || false;
@@ -12221,9 +12517,9 @@ function _defineProperties$1B(target, props) {
12221
12517
  Object.defineProperty(target, descriptor.key, descriptor);
12222
12518
  }
12223
12519
  }
12224
- function _create_class$1B(Constructor, protoProps, staticProps) {
12225
- if (protoProps) _defineProperties$1B(Constructor.prototype, protoProps);
12226
- if (staticProps) _defineProperties$1B(Constructor, staticProps);
12520
+ function _create_class$1C(Constructor, protoProps, staticProps) {
12521
+ if (protoProps) _defineProperties$1C(Constructor.prototype, protoProps);
12522
+ if (staticProps) _defineProperties$1C(Constructor, staticProps);
12227
12523
  return Constructor;
12228
12524
  }
12229
12525
  function _define_property$S(obj, key, value) {
@@ -12239,14 +12535,14 @@ function _define_property$S(obj, key, value) {
12239
12535
  }
12240
12536
  return obj;
12241
12537
  }
12242
- function _instanceof$v(left, right) {
12538
+ function _instanceof$w(left, right) {
12243
12539
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
12244
12540
  return !!right[Symbol.hasInstance](left);
12245
12541
  } else {
12246
12542
  return left instanceof right;
12247
12543
  }
12248
12544
  }
12249
- function _iterable_to_array_limit$o(arr, i) {
12545
+ function _iterable_to_array_limit$n(arr, i) {
12250
12546
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
12251
12547
  if (_i == null) return;
12252
12548
  var _arr = [];
@@ -12270,7 +12566,7 @@ function _iterable_to_array_limit$o(arr, i) {
12270
12566
  }
12271
12567
  return _arr;
12272
12568
  }
12273
- function _non_iterable_rest$o() {
12569
+ function _non_iterable_rest$n() {
12274
12570
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12275
12571
  }
12276
12572
  function _object_spread$P(target) {
@@ -12312,20 +12608,20 @@ function _object_spread_props$E(target, source) {
12312
12608
  }
12313
12609
  return target;
12314
12610
  }
12315
- function _sliced_to_array$o(arr, i) {
12316
- return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$t(arr, i) || _non_iterable_rest$o();
12611
+ function _sliced_to_array$n(arr, i) {
12612
+ return _array_with_holes$n(arr) || _iterable_to_array_limit$n(arr, i) || _unsupported_iterable_to_array$s(arr, i) || _non_iterable_rest$n();
12317
12613
  }
12318
12614
  function _type_of$1d(obj) {
12319
12615
  "@swc/helpers - typeof";
12320
12616
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
12321
12617
  }
12322
- function _unsupported_iterable_to_array$t(o, minLen) {
12618
+ function _unsupported_iterable_to_array$s(o, minLen) {
12323
12619
  if (!o) return;
12324
- if (typeof o === "string") return _array_like_to_array$t(o, minLen);
12620
+ if (typeof o === "string") return _array_like_to_array$s(o, minLen);
12325
12621
  var n = Object.prototype.toString.call(o).slice(8, -1);
12326
12622
  if (n === "Object" && o.constructor) n = o.constructor.name;
12327
12623
  if (n === "Map" || n === "Set") return Array.from(n);
12328
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$t(o, minLen);
12624
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$s(o, minLen);
12329
12625
  }
12330
12626
  var INVALID$2 = "Invalid Duration";
12331
12627
  // unit conversion constants
@@ -12470,7 +12766,7 @@ function normalizeValues(matrix, vals) {
12470
12766
  // if this is not the case, factor is used to make it so
12471
12767
  var factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;
12472
12768
  orderedUnits$1.reduceRight(function(previous, current) {
12473
- if (!isUndefined(vals[current])) {
12769
+ if (!isUndefined$1(vals[current])) {
12474
12770
  if (previous) {
12475
12771
  var previousVal = vals[previous] * factor;
12476
12772
  var conv = matrix[current][previous];
@@ -12501,7 +12797,7 @@ function normalizeValues(matrix, vals) {
12501
12797
  // try to convert any decimals into smaller units if possible
12502
12798
  // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }
12503
12799
  orderedUnits$1.reduce(function(previous, current) {
12504
- if (!isUndefined(vals[current])) {
12800
+ if (!isUndefined$1(vals[current])) {
12505
12801
  if (previous) {
12506
12802
  var fraction = vals[previous] % 1;
12507
12803
  vals[previous] -= fraction;
@@ -12519,7 +12815,7 @@ function removeZeroes(vals) {
12519
12815
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
12520
12816
  try {
12521
12817
  for(var _iterator = Object.entries(vals)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
12522
- var _step_value = _sliced_to_array$o(_step.value, 2), key = _step_value[0], value = _step_value[1];
12818
+ var _step_value = _sliced_to_array$n(_step.value, 2), key = _step_value[0], value = _step_value[1];
12523
12819
  if (value !== 0) {
12524
12820
  newVals[key] = value;
12525
12821
  }
@@ -12542,7 +12838,7 @@ function removeZeroes(vals) {
12542
12838
  }
12543
12839
  var Duration = /*#__PURE__*/ function() {
12544
12840
  function Duration(config) {
12545
- _class_call_check$1H(this, Duration);
12841
+ _class_call_check$1I(this, Duration);
12546
12842
  var accurate = config.conversionAccuracy === "longterm" || false;
12547
12843
  var matrix = accurate ? accurateMatrix : casualMatrix;
12548
12844
  if (config.matrix) {
@@ -12567,7 +12863,7 @@ var Duration = /*#__PURE__*/ function() {
12567
12863
  * @access private
12568
12864
  */ this.isLuxonDuration = true;
12569
12865
  }
12570
- _create_class$1B(Duration, [
12866
+ _create_class$1C(Duration, [
12571
12867
  {
12572
12868
  key: "locale",
12573
12869
  get: /**
@@ -12640,7 +12936,7 @@ var Duration = /*#__PURE__*/ function() {
12640
12936
  if (!this.isValid) return INVALID$2;
12641
12937
  var l = orderedUnits$1.map(function(unit) {
12642
12938
  var val = _this.values[unit];
12643
- if (isUndefined(val)) {
12939
+ if (isUndefined$1(val)) {
12644
12940
  return null;
12645
12941
  }
12646
12942
  return _this.loc.numberFormatter(_object_spread_props$E(_object_spread$P({
@@ -13329,7 +13625,7 @@ var Duration = /*#__PURE__*/ function() {
13329
13625
  * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }
13330
13626
  * @return {Duration}
13331
13627
  */ function fromISO(text, opts) {
13332
- var _parseISODuration = _sliced_to_array$o(parseISODuration(text), 1), parsed = _parseISODuration[0];
13628
+ var _parseISODuration = _sliced_to_array$n(parseISODuration(text), 1), parsed = _parseISODuration[0];
13333
13629
  if (parsed) {
13334
13630
  return Duration.fromObject(parsed, opts);
13335
13631
  } else {
@@ -13355,7 +13651,7 @@ var Duration = /*#__PURE__*/ function() {
13355
13651
  * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
13356
13652
  * @return {Duration}
13357
13653
  */ function fromISOTime(text, opts) {
13358
- var _parseISOTimeOnly = _sliced_to_array$o(parseISOTimeOnly(text), 1), parsed = _parseISOTimeOnly[0];
13654
+ var _parseISOTimeOnly = _sliced_to_array$n(parseISOTimeOnly(text), 1), parsed = _parseISOTimeOnly[0];
13359
13655
  if (parsed) {
13360
13656
  return Duration.fromObject(parsed, opts);
13361
13657
  } else {
@@ -13375,7 +13671,7 @@ var Duration = /*#__PURE__*/ function() {
13375
13671
  if (!reason) {
13376
13672
  throw new InvalidArgumentError("need to specify a reason the Duration is invalid");
13377
13673
  }
13378
- var invalid = _instanceof$v(reason, Invalid) ? reason : new Invalid(reason, explanation);
13674
+ var invalid = _instanceof$w(reason, Invalid) ? reason : new Invalid(reason, explanation);
13379
13675
  if (Settings.throwOnInvalid) {
13380
13676
  throw new InvalidDurationError(invalid);
13381
13677
  } else {
@@ -13428,23 +13724,23 @@ var Duration = /*#__PURE__*/ function() {
13428
13724
  return Duration;
13429
13725
  }();
13430
13726
 
13431
- function _array_like_to_array$s(arr, len) {
13727
+ function _array_like_to_array$r(arr, len) {
13432
13728
  if (len == null || len > arr.length) len = arr.length;
13433
13729
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
13434
13730
  return arr2;
13435
13731
  }
13436
- function _array_with_holes$n(arr) {
13732
+ function _array_with_holes$m(arr) {
13437
13733
  if (Array.isArray(arr)) return arr;
13438
13734
  }
13439
13735
  function _array_without_holes$e(arr) {
13440
- if (Array.isArray(arr)) return _array_like_to_array$s(arr);
13736
+ if (Array.isArray(arr)) return _array_like_to_array$r(arr);
13441
13737
  }
13442
- function _class_call_check$1G(instance, Constructor) {
13738
+ function _class_call_check$1H(instance, Constructor) {
13443
13739
  if (!(instance instanceof Constructor)) {
13444
13740
  throw new TypeError("Cannot call a class as a function");
13445
13741
  }
13446
13742
  }
13447
- function _defineProperties$1A(target, props) {
13743
+ function _defineProperties$1B(target, props) {
13448
13744
  for(var i = 0; i < props.length; i++){
13449
13745
  var descriptor = props[i];
13450
13746
  descriptor.enumerable = descriptor.enumerable || false;
@@ -13453,12 +13749,12 @@ function _defineProperties$1A(target, props) {
13453
13749
  Object.defineProperty(target, descriptor.key, descriptor);
13454
13750
  }
13455
13751
  }
13456
- function _create_class$1A(Constructor, protoProps, staticProps) {
13457
- if (protoProps) _defineProperties$1A(Constructor.prototype, protoProps);
13458
- if (staticProps) _defineProperties$1A(Constructor, staticProps);
13752
+ function _create_class$1B(Constructor, protoProps, staticProps) {
13753
+ if (protoProps) _defineProperties$1B(Constructor.prototype, protoProps);
13754
+ if (staticProps) _defineProperties$1B(Constructor, staticProps);
13459
13755
  return Constructor;
13460
13756
  }
13461
- function _instanceof$u(left, right) {
13757
+ function _instanceof$v(left, right) {
13462
13758
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
13463
13759
  return !!right[Symbol.hasInstance](left);
13464
13760
  } else {
@@ -13468,7 +13764,7 @@ function _instanceof$u(left, right) {
13468
13764
  function _iterable_to_array$e(iter) {
13469
13765
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
13470
13766
  }
13471
- function _iterable_to_array_limit$n(arr, i) {
13767
+ function _iterable_to_array_limit$m(arr, i) {
13472
13768
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
13473
13769
  if (_i == null) return;
13474
13770
  var _arr = [];
@@ -13492,25 +13788,25 @@ function _iterable_to_array_limit$n(arr, i) {
13492
13788
  }
13493
13789
  return _arr;
13494
13790
  }
13495
- function _non_iterable_rest$n() {
13791
+ function _non_iterable_rest$m() {
13496
13792
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13497
13793
  }
13498
13794
  function _non_iterable_spread$e() {
13499
13795
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13500
13796
  }
13501
- function _sliced_to_array$n(arr, i) {
13502
- return _array_with_holes$n(arr) || _iterable_to_array_limit$n(arr, i) || _unsupported_iterable_to_array$s(arr, i) || _non_iterable_rest$n();
13797
+ function _sliced_to_array$m(arr, i) {
13798
+ return _array_with_holes$m(arr) || _iterable_to_array_limit$m(arr, i) || _unsupported_iterable_to_array$r(arr, i) || _non_iterable_rest$m();
13503
13799
  }
13504
13800
  function _to_consumable_array$e(arr) {
13505
- return _array_without_holes$e(arr) || _iterable_to_array$e(arr) || _unsupported_iterable_to_array$s(arr) || _non_iterable_spread$e();
13801
+ return _array_without_holes$e(arr) || _iterable_to_array$e(arr) || _unsupported_iterable_to_array$r(arr) || _non_iterable_spread$e();
13506
13802
  }
13507
- function _unsupported_iterable_to_array$s(o, minLen) {
13803
+ function _unsupported_iterable_to_array$r(o, minLen) {
13508
13804
  if (!o) return;
13509
- if (typeof o === "string") return _array_like_to_array$s(o, minLen);
13805
+ if (typeof o === "string") return _array_like_to_array$r(o, minLen);
13510
13806
  var n = Object.prototype.toString.call(o).slice(8, -1);
13511
13807
  if (n === "Object" && o.constructor) n = o.constructor.name;
13512
13808
  if (n === "Map" || n === "Set") return Array.from(n);
13513
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$s(o, minLen);
13809
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$r(o, minLen);
13514
13810
  }
13515
13811
  var INVALID$1 = "Invalid Interval";
13516
13812
  // checks if the start is equal to or before the end
@@ -13527,7 +13823,7 @@ function validateStartEnd(start, end) {
13527
13823
  }
13528
13824
  var Interval = /*#__PURE__*/ function() {
13529
13825
  function Interval(config) {
13530
- _class_call_check$1G(this, Interval);
13826
+ _class_call_check$1H(this, Interval);
13531
13827
  /**
13532
13828
  * @access private
13533
13829
  */ this.s = config.start;
@@ -13541,7 +13837,7 @@ var Interval = /*#__PURE__*/ function() {
13541
13837
  * @access private
13542
13838
  */ this.isLuxonInterval = true;
13543
13839
  }
13544
- _create_class$1A(Interval, [
13840
+ _create_class$1B(Interval, [
13545
13841
  {
13546
13842
  key: "start",
13547
13843
  get: /**
@@ -13790,7 +14086,7 @@ var Interval = /*#__PURE__*/ function() {
13790
14086
  },
13791
14087
  {
13792
14088
  /**
13793
- * Return whether this Interval engulfs the start and end of the specified Interval.
14089
+ * 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.
13794
14090
  * @param {Interval} other
13795
14091
  * @return {boolean}
13796
14092
  */ key: "engulfs",
@@ -14010,7 +14306,7 @@ var Interval = /*#__PURE__*/ function() {
14010
14306
  if (!reason) {
14011
14307
  throw new InvalidArgumentError("need to specify a reason the Interval is invalid");
14012
14308
  }
14013
- var invalid = _instanceof$u(reason, Invalid) ? reason : new Invalid(reason, explanation);
14309
+ var invalid = _instanceof$v(reason, Invalid) ? reason : new Invalid(reason, explanation);
14014
14310
  if (Settings.throwOnInvalid) {
14015
14311
  throw new InvalidIntervalError(invalid);
14016
14312
  } else {
@@ -14074,7 +14370,7 @@ var Interval = /*#__PURE__*/ function() {
14074
14370
  * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
14075
14371
  * @return {Interval}
14076
14372
  */ function fromISO(text, opts) {
14077
- var _split = _sliced_to_array$n((text || "").split("/", 2), 2), s = _split[0], e = _split[1];
14373
+ var _split = _sliced_to_array$m((text || "").split("/", 2), 2), s = _split[0], e = _split[1];
14078
14374
  if (s && e) {
14079
14375
  var start, startIsValid;
14080
14376
  try {
@@ -14126,10 +14422,10 @@ var Interval = /*#__PURE__*/ function() {
14126
14422
  * @param {Array} intervals
14127
14423
  * @return {Array}
14128
14424
  */ function merge(intervals) {
14129
- var _intervals_sort_reduce = _sliced_to_array$n(intervals.sort(function(a, b) {
14425
+ var _intervals_sort_reduce = _sliced_to_array$m(intervals.sort(function(a, b) {
14130
14426
  return a.s - b.s;
14131
14427
  }).reduce(function(param, item) {
14132
- var _param = _sliced_to_array$n(param, 2), sofar = _param[0], current = _param[1];
14428
+ var _param = _sliced_to_array$m(param, 2), sofar = _param[0], current = _param[1];
14133
14429
  if (!current) {
14134
14430
  return [
14135
14431
  sofar,
@@ -14216,12 +14512,12 @@ var Interval = /*#__PURE__*/ function() {
14216
14512
  return Interval;
14217
14513
  }();
14218
14514
 
14219
- function _class_call_check$1F(instance, Constructor) {
14515
+ function _class_call_check$1G(instance, Constructor) {
14220
14516
  if (!(instance instanceof Constructor)) {
14221
14517
  throw new TypeError("Cannot call a class as a function");
14222
14518
  }
14223
14519
  }
14224
- function _defineProperties$1z(target, props) {
14520
+ function _defineProperties$1A(target, props) {
14225
14521
  for(var i = 0; i < props.length; i++){
14226
14522
  var descriptor = props[i];
14227
14523
  descriptor.enumerable = descriptor.enumerable || false;
@@ -14230,16 +14526,16 @@ function _defineProperties$1z(target, props) {
14230
14526
  Object.defineProperty(target, descriptor.key, descriptor);
14231
14527
  }
14232
14528
  }
14233
- function _create_class$1z(Constructor, protoProps, staticProps) {
14234
- if (protoProps) _defineProperties$1z(Constructor.prototype, protoProps);
14235
- if (staticProps) _defineProperties$1z(Constructor, staticProps);
14529
+ function _create_class$1A(Constructor, protoProps, staticProps) {
14530
+ if (protoProps) _defineProperties$1A(Constructor.prototype, protoProps);
14531
+ if (staticProps) _defineProperties$1A(Constructor, staticProps);
14236
14532
  return Constructor;
14237
14533
  }
14238
14534
  var Info = /*#__PURE__*/ function() {
14239
14535
  function Info() {
14240
- _class_call_check$1F(this, Info);
14536
+ _class_call_check$1G(this, Info);
14241
14537
  }
14242
- _create_class$1z(Info, null, [
14538
+ _create_class$1A(Info, null, [
14243
14539
  {
14244
14540
  key: "hasDST",
14245
14541
  value: /**
@@ -14457,16 +14753,16 @@ var Info = /*#__PURE__*/ function() {
14457
14753
  return Info;
14458
14754
  }();
14459
14755
 
14460
- function _array_like_to_array$r(arr, len) {
14756
+ function _array_like_to_array$q(arr, len) {
14461
14757
  if (len == null || len > arr.length) len = arr.length;
14462
14758
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14463
14759
  return arr2;
14464
14760
  }
14465
- function _array_with_holes$m(arr) {
14761
+ function _array_with_holes$l(arr) {
14466
14762
  if (Array.isArray(arr)) return arr;
14467
14763
  }
14468
14764
  function _array_without_holes$d(arr) {
14469
- if (Array.isArray(arr)) return _array_like_to_array$r(arr);
14765
+ if (Array.isArray(arr)) return _array_like_to_array$q(arr);
14470
14766
  }
14471
14767
  function _define_property$R(obj, key, value) {
14472
14768
  if (key in obj) {
@@ -14484,7 +14780,7 @@ function _define_property$R(obj, key, value) {
14484
14780
  function _iterable_to_array$d(iter) {
14485
14781
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14486
14782
  }
14487
- function _iterable_to_array_limit$m(arr, i) {
14783
+ function _iterable_to_array_limit$l(arr, i) {
14488
14784
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
14489
14785
  if (_i == null) return;
14490
14786
  var _arr = [];
@@ -14508,25 +14804,25 @@ function _iterable_to_array_limit$m(arr, i) {
14508
14804
  }
14509
14805
  return _arr;
14510
14806
  }
14511
- function _non_iterable_rest$m() {
14807
+ function _non_iterable_rest$l() {
14512
14808
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14513
14809
  }
14514
14810
  function _non_iterable_spread$d() {
14515
14811
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14516
14812
  }
14517
- function _sliced_to_array$m(arr, i) {
14518
- return _array_with_holes$m(arr) || _iterable_to_array_limit$m(arr, i) || _unsupported_iterable_to_array$r(arr, i) || _non_iterable_rest$m();
14813
+ function _sliced_to_array$l(arr, i) {
14814
+ return _array_with_holes$l(arr) || _iterable_to_array_limit$l(arr, i) || _unsupported_iterable_to_array$q(arr, i) || _non_iterable_rest$l();
14519
14815
  }
14520
14816
  function _to_consumable_array$d(arr) {
14521
- return _array_without_holes$d(arr) || _iterable_to_array$d(arr) || _unsupported_iterable_to_array$r(arr) || _non_iterable_spread$d();
14817
+ return _array_without_holes$d(arr) || _iterable_to_array$d(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$d();
14522
14818
  }
14523
- function _unsupported_iterable_to_array$r(o, minLen) {
14819
+ function _unsupported_iterable_to_array$q(o, minLen) {
14524
14820
  if (!o) return;
14525
- if (typeof o === "string") return _array_like_to_array$r(o, minLen);
14821
+ if (typeof o === "string") return _array_like_to_array$q(o, minLen);
14526
14822
  var n = Object.prototype.toString.call(o).slice(8, -1);
14527
14823
  if (n === "Object" && o.constructor) n = o.constructor.name;
14528
14824
  if (n === "Map" || n === "Set") return Array.from(n);
14529
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$r(o, minLen);
14825
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$q(o, minLen);
14530
14826
  }
14531
14827
  function dayDiff(earlier, later) {
14532
14828
  var utcDayStart = function(dt) {
@@ -14581,7 +14877,7 @@ function highOrderDiffs(cursor, later, units) {
14581
14877
  this is used later to potentially convert any difference smaller than the smallest higher order unit
14582
14878
  into a fraction of that smallest higher order unit
14583
14879
  */ for(var _iterator = differs[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
14584
- var _step_value = _sliced_to_array$m(_step.value, 2), unit = _step_value[0], differ = _step_value[1];
14880
+ var _step_value = _sliced_to_array$l(_step.value, 2), unit = _step_value[0], differ = _step_value[1];
14585
14881
  if (units.indexOf(unit) >= 0) {
14586
14882
  lowestOrder = unit;
14587
14883
  results[unit] = differ(cursor, later);
@@ -14627,7 +14923,7 @@ function highOrderDiffs(cursor, later, units) {
14627
14923
  ];
14628
14924
  }
14629
14925
  function diff(earlier, later, units, opts) {
14630
- var _highOrderDiffs = _sliced_to_array$m(highOrderDiffs(earlier, later, units), 4), cursor = _highOrderDiffs[0], results = _highOrderDiffs[1], highWater = _highOrderDiffs[2], lowestOrder = _highOrderDiffs[3];
14926
+ var _highOrderDiffs = _sliced_to_array$l(highOrderDiffs(earlier, later, units), 4), cursor = _highOrderDiffs[0], results = _highOrderDiffs[1], highWater = _highOrderDiffs[2], lowestOrder = _highOrderDiffs[3];
14631
14927
  var remainingMillis = later - cursor;
14632
14928
  var lowerOrderUnits = units.filter(function(u) {
14633
14929
  return [
@@ -14654,181 +14950,6 @@ function diff(earlier, later, units, opts) {
14654
14950
  }
14655
14951
  }
14656
14952
 
14657
- function _array_like_to_array$q(arr, len) {
14658
- if (len == null || len > arr.length) len = arr.length;
14659
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14660
- return arr2;
14661
- }
14662
- function _array_with_holes$l(arr) {
14663
- if (Array.isArray(arr)) return arr;
14664
- }
14665
- function _iterable_to_array_limit$l(arr, i) {
14666
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
14667
- if (_i == null) return;
14668
- var _arr = [];
14669
- var _n = true;
14670
- var _d = false;
14671
- var _s, _e;
14672
- try {
14673
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
14674
- _arr.push(_s.value);
14675
- if (i && _arr.length === i) break;
14676
- }
14677
- } catch (err) {
14678
- _d = true;
14679
- _e = err;
14680
- } finally{
14681
- try {
14682
- if (!_n && _i["return"] != null) _i["return"]();
14683
- } finally{
14684
- if (_d) throw _e;
14685
- }
14686
- }
14687
- return _arr;
14688
- }
14689
- function _non_iterable_rest$l() {
14690
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14691
- }
14692
- function _sliced_to_array$l(arr, i) {
14693
- return _array_with_holes$l(arr) || _iterable_to_array_limit$l(arr, i) || _unsupported_iterable_to_array$q(arr, i) || _non_iterable_rest$l();
14694
- }
14695
- function _unsupported_iterable_to_array$q(o, minLen) {
14696
- if (!o) return;
14697
- if (typeof o === "string") return _array_like_to_array$q(o, minLen);
14698
- var n = Object.prototype.toString.call(o).slice(8, -1);
14699
- if (n === "Object" && o.constructor) n = o.constructor.name;
14700
- if (n === "Map" || n === "Set") return Array.from(n);
14701
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$q(o, minLen);
14702
- }
14703
- var numberingSystems = {
14704
- arab: "[٠-٩]",
14705
- arabext: "[۰-۹]",
14706
- bali: "[᭐-᭙]",
14707
- beng: "[০-৯]",
14708
- deva: "[०-९]",
14709
- fullwide: "[0-9]",
14710
- gujr: "[૦-૯]",
14711
- hanidec: "[〇|一|二|三|四|五|六|七|八|九]",
14712
- khmr: "[០-៩]",
14713
- knda: "[೦-೯]",
14714
- laoo: "[໐-໙]",
14715
- limb: "[᥆-᥏]",
14716
- mlym: "[൦-൯]",
14717
- mong: "[᠐-᠙]",
14718
- mymr: "[၀-၉]",
14719
- orya: "[୦-୯]",
14720
- tamldec: "[௦-௯]",
14721
- telu: "[౦-౯]",
14722
- thai: "[๐-๙]",
14723
- tibt: "[༠-༩]",
14724
- latn: "\\d"
14725
- };
14726
- var numberingSystemsUTF16 = {
14727
- arab: [
14728
- 1632,
14729
- 1641
14730
- ],
14731
- arabext: [
14732
- 1776,
14733
- 1785
14734
- ],
14735
- bali: [
14736
- 6992,
14737
- 7001
14738
- ],
14739
- beng: [
14740
- 2534,
14741
- 2543
14742
- ],
14743
- deva: [
14744
- 2406,
14745
- 2415
14746
- ],
14747
- fullwide: [
14748
- 65296,
14749
- 65303
14750
- ],
14751
- gujr: [
14752
- 2790,
14753
- 2799
14754
- ],
14755
- khmr: [
14756
- 6112,
14757
- 6121
14758
- ],
14759
- knda: [
14760
- 3302,
14761
- 3311
14762
- ],
14763
- laoo: [
14764
- 3792,
14765
- 3801
14766
- ],
14767
- limb: [
14768
- 6470,
14769
- 6479
14770
- ],
14771
- mlym: [
14772
- 3430,
14773
- 3439
14774
- ],
14775
- mong: [
14776
- 6160,
14777
- 6169
14778
- ],
14779
- mymr: [
14780
- 4160,
14781
- 4169
14782
- ],
14783
- orya: [
14784
- 2918,
14785
- 2927
14786
- ],
14787
- tamldec: [
14788
- 3046,
14789
- 3055
14790
- ],
14791
- telu: [
14792
- 3174,
14793
- 3183
14794
- ],
14795
- thai: [
14796
- 3664,
14797
- 3673
14798
- ],
14799
- tibt: [
14800
- 3872,
14801
- 3881
14802
- ]
14803
- };
14804
- var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split("");
14805
- function parseDigits(str) {
14806
- var value = parseInt(str, 10);
14807
- if (isNaN(value)) {
14808
- value = "";
14809
- for(var i = 0; i < str.length; i++){
14810
- var code = str.charCodeAt(i);
14811
- if (str[i].search(numberingSystems.hanidec) !== -1) {
14812
- value += hanidecChars.indexOf(str[i]);
14813
- } else {
14814
- for(var key in numberingSystemsUTF16){
14815
- var _numberingSystemsUTF16_key = _sliced_to_array$l(numberingSystemsUTF16[key], 2), min = _numberingSystemsUTF16_key[0], max = _numberingSystemsUTF16_key[1];
14816
- if (code >= min && code <= max) {
14817
- value += code - min;
14818
- }
14819
- }
14820
- }
14821
- }
14822
- return parseInt(value, 10);
14823
- } else {
14824
- return value;
14825
- }
14826
- }
14827
- function digitRegex(param) {
14828
- var numberingSystem = param.numberingSystem, append = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
14829
- return new RegExp("".concat(numberingSystems[numberingSystem || "latn"]).concat(append));
14830
- }
14831
-
14832
14953
  function _array_like_to_array$p(arr, len) {
14833
14954
  if (len == null || len > arr.length) len = arr.length;
14834
14955
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -14840,6 +14961,25 @@ function _array_with_holes$k(arr) {
14840
14961
  function _array_without_holes$c(arr) {
14841
14962
  if (Array.isArray(arr)) return _array_like_to_array$p(arr);
14842
14963
  }
14964
+ function _class_call_check$1F(instance, Constructor) {
14965
+ if (!(instance instanceof Constructor)) {
14966
+ throw new TypeError("Cannot call a class as a function");
14967
+ }
14968
+ }
14969
+ function _defineProperties$1z(target, props) {
14970
+ for(var i = 0; i < props.length; i++){
14971
+ var descriptor = props[i];
14972
+ descriptor.enumerable = descriptor.enumerable || false;
14973
+ descriptor.configurable = true;
14974
+ if ("value" in descriptor) descriptor.writable = true;
14975
+ Object.defineProperty(target, descriptor.key, descriptor);
14976
+ }
14977
+ }
14978
+ function _create_class$1z(Constructor, protoProps, staticProps) {
14979
+ if (protoProps) _defineProperties$1z(Constructor.prototype, protoProps);
14980
+ if (staticProps) _defineProperties$1z(Constructor, staticProps);
14981
+ return Constructor;
14982
+ }
14843
14983
  function _iterable_to_array$c(iter) {
14844
14984
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14845
14985
  }
@@ -15246,19 +15386,19 @@ function dateTimeFromMatches(matches) {
15246
15386
  };
15247
15387
  var zone = null;
15248
15388
  var specificOffset;
15249
- if (!isUndefined(matches.z)) {
15389
+ if (!isUndefined$1(matches.z)) {
15250
15390
  zone = IANAZone.create(matches.z);
15251
15391
  }
15252
- if (!isUndefined(matches.Z)) {
15392
+ if (!isUndefined$1(matches.Z)) {
15253
15393
  if (!zone) {
15254
15394
  zone = new FixedOffsetZone(matches.Z);
15255
15395
  }
15256
15396
  specificOffset = matches.Z;
15257
15397
  }
15258
- if (!isUndefined(matches.q)) {
15398
+ if (!isUndefined$1(matches.q)) {
15259
15399
  matches.M = (matches.q - 1) * 3 + 1;
15260
15400
  }
15261
- if (!isUndefined(matches.h)) {
15401
+ if (!isUndefined$1(matches.h)) {
15262
15402
  if (matches.h < 12 && matches.a === 1) {
15263
15403
  matches.h += 12;
15264
15404
  } else if (matches.h === 12 && matches.a === 0) {
@@ -15268,7 +15408,7 @@ function dateTimeFromMatches(matches) {
15268
15408
  if (matches.G === 0 && matches.y) {
15269
15409
  matches.y = -matches.y;
15270
15410
  }
15271
- if (!isUndefined(matches.u)) {
15411
+ if (!isUndefined$1(matches.u)) {
15272
15412
  matches.S = parseMillis(matches.u);
15273
15413
  }
15274
15414
  var vals = Object.keys(matches).reduce(function(r, k) {
@@ -15310,38 +15450,74 @@ function expandMacroTokens(tokens, locale) {
15310
15450
  }
15311
15451
  /**
15312
15452
  * @private
15313
- */ function explainFromTokens(locale, input, format) {
15314
- var tokens = expandMacroTokens(Formatter.parseFormat(format), locale), units = tokens.map(function(t) {
15315
- return unitForToken(t, locale);
15316
- }), disqualifyingUnit = units.find(function(t) {
15317
- return t.invalidReason;
15318
- });
15319
- if (disqualifyingUnit) {
15320
- return {
15321
- input: input,
15322
- tokens: tokens,
15323
- invalidReason: disqualifyingUnit.invalidReason
15324
- };
15325
- } else {
15326
- var _buildRegex = _sliced_to_array$k(buildRegex(units), 2), regexString = _buildRegex[0], handlers = _buildRegex[1], regex = RegExp(regexString, "i"), _match = _sliced_to_array$k(match(input, regex, handlers), 2), rawMatches = _match[0], matches = _match[1], _ref = _sliced_to_array$k(matches ? dateTimeFromMatches(matches) : [
15327
- null,
15328
- null,
15329
- undefined
15330
- ], 3), result = _ref[0], zone = _ref[1], specificOffset = _ref[2];
15331
- if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) {
15332
- throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");
15453
+ */ var TokenParser = /*#__PURE__*/ function() {
15454
+ function TokenParser(locale, format) {
15455
+ _class_call_check$1F(this, TokenParser);
15456
+ this.locale = locale;
15457
+ this.format = format;
15458
+ this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale);
15459
+ this.units = this.tokens.map(function(t) {
15460
+ return unitForToken(t, locale);
15461
+ });
15462
+ this.disqualifyingUnit = this.units.find(function(t) {
15463
+ return t.invalidReason;
15464
+ });
15465
+ if (!this.disqualifyingUnit) {
15466
+ var _buildRegex = _sliced_to_array$k(buildRegex(this.units), 2), regexString = _buildRegex[0], handlers = _buildRegex[1];
15467
+ this.regex = RegExp(regexString, "i");
15468
+ this.handlers = handlers;
15333
15469
  }
15334
- return {
15335
- input: input,
15336
- tokens: tokens,
15337
- regex: regex,
15338
- rawMatches: rawMatches,
15339
- matches: matches,
15340
- result: result,
15341
- zone: zone,
15342
- specificOffset: specificOffset
15343
- };
15344
15470
  }
15471
+ _create_class$1z(TokenParser, [
15472
+ {
15473
+ key: "explainFromTokens",
15474
+ value: function explainFromTokens(input) {
15475
+ if (!this.isValid) {
15476
+ return {
15477
+ input: input,
15478
+ tokens: this.tokens,
15479
+ invalidReason: this.invalidReason
15480
+ };
15481
+ } else {
15482
+ var _match = _sliced_to_array$k(match(input, this.regex, this.handlers), 2), rawMatches = _match[0], matches = _match[1], _ref = _sliced_to_array$k(matches ? dateTimeFromMatches(matches) : [
15483
+ null,
15484
+ null,
15485
+ undefined
15486
+ ], 3), result = _ref[0], zone = _ref[1], specificOffset = _ref[2];
15487
+ if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) {
15488
+ throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");
15489
+ }
15490
+ return {
15491
+ input: input,
15492
+ tokens: this.tokens,
15493
+ regex: this.regex,
15494
+ rawMatches: rawMatches,
15495
+ matches: matches,
15496
+ result: result,
15497
+ zone: zone,
15498
+ specificOffset: specificOffset
15499
+ };
15500
+ }
15501
+ }
15502
+ },
15503
+ {
15504
+ key: "isValid",
15505
+ get: function get() {
15506
+ return !this.disqualifyingUnit;
15507
+ }
15508
+ },
15509
+ {
15510
+ key: "invalidReason",
15511
+ get: function get() {
15512
+ return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;
15513
+ }
15514
+ }
15515
+ ]);
15516
+ return TokenParser;
15517
+ }();
15518
+ function explainFromTokens(locale, input, format) {
15519
+ var parser = new TokenParser(locale, format);
15520
+ return parser.explainFromTokens(input);
15345
15521
  }
15346
15522
  function parseFromTokens(locale, input, format) {
15347
15523
  var _explainFromTokens = explainFromTokens(locale, input, format), result = _explainFromTokens.result, zone = _explainFromTokens.zone, specificOffset = _explainFromTokens.specificOffset, invalidReason = _explainFromTokens.invalidReason;
@@ -15405,7 +15581,7 @@ function _define_property$Q(obj, key, value) {
15405
15581
  }
15406
15582
  return obj;
15407
15583
  }
15408
- function _instanceof$t(left, right) {
15584
+ function _instanceof$u(left, right) {
15409
15585
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
15410
15586
  return !!right[Symbol.hasInstance](left);
15411
15587
  } else {
@@ -15776,19 +15952,51 @@ function normalizeUnitWithLocalWeeks(unit) {
15776
15952
  return normalizeUnit(unit);
15777
15953
  }
15778
15954
  }
15955
+ // cache offsets for zones based on the current timestamp when this function is
15956
+ // first called. When we are handling a datetime from components like (year,
15957
+ // month, day, hour) in a time zone, we need a guess about what the timezone
15958
+ // offset is so that we can convert into a UTC timestamp. One way is to find the
15959
+ // offset of now in the zone. The actual date may have a different offset (for
15960
+ // example, if we handle a date in June while we're in December in a zone that
15961
+ // observes DST), but we can check and adjust that.
15962
+ //
15963
+ // When handling many dates, calculating the offset for now every time is
15964
+ // expensive. It's just a guess, so we can cache the offset to use even if we
15965
+ // are right on a time change boundary (we'll just correct in the other
15966
+ // direction). Using a timestamp from first read is a slight optimization for
15967
+ // handling dates close to the current date, since those dates will usually be
15968
+ // in the same offset (we could set the timestamp statically, instead). We use a
15969
+ // single timestamp for all zones to make things a bit more predictable.
15970
+ //
15971
+ // This is safe for quickDT (used by local() and utc()) because we don't fill in
15972
+ // higher-order units from tsNow (as we do in fromObject, this requires that
15973
+ // offset is calculated from tsNow).
15974
+ function guessOffsetForZone(zone) {
15975
+ if (!zoneOffsetGuessCache[zone]) {
15976
+ if (zoneOffsetTs === undefined) {
15977
+ zoneOffsetTs = Settings.now();
15978
+ }
15979
+ zoneOffsetGuessCache[zone] = zone.offset(zoneOffsetTs);
15980
+ }
15981
+ return zoneOffsetGuessCache[zone];
15982
+ }
15779
15983
  // this is a dumbed down version of fromObject() that runs about 60% faster
15780
15984
  // but doesn't do any validation, makes a bunch of assumptions about what units
15781
15985
  // are present, and so on.
15782
15986
  function quickDT(obj, opts) {
15783
- var zone = normalizeZone(opts.zone, Settings.defaultZone), loc = Locale.fromObject(opts), tsNow = Settings.now();
15987
+ var zone = normalizeZone(opts.zone, Settings.defaultZone);
15988
+ if (!zone.isValid) {
15989
+ return DateTime.invalid(unsupportedZone(zone));
15990
+ }
15991
+ var loc = Locale.fromObject(opts);
15784
15992
  var ts, o;
15785
15993
  // assume we have the higher-order units
15786
- if (!isUndefined(obj.year)) {
15994
+ if (!isUndefined$1(obj.year)) {
15787
15995
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
15788
15996
  try {
15789
15997
  for(var _iterator = orderedUnits[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
15790
15998
  var u = _step.value;
15791
- if (isUndefined(obj[u])) {
15999
+ if (isUndefined$1(obj[u])) {
15792
16000
  obj[u] = defaultUnitValues[u];
15793
16001
  }
15794
16002
  }
@@ -15810,11 +16018,11 @@ function quickDT(obj, opts) {
15810
16018
  if (invalid) {
15811
16019
  return DateTime.invalid(invalid);
15812
16020
  }
15813
- var offsetProvis = zone.offset(tsNow);
16021
+ var offsetProvis = guessOffsetForZone(zone);
15814
16022
  var ref;
15815
16023
  ref = _sliced_to_array$j(objToTS(obj, offsetProvis, zone), 2), ts = ref[0], o = ref[1];
15816
16024
  } else {
15817
- ts = tsNow;
16025
+ ts = Settings.now();
15818
16026
  }
15819
16027
  return new DateTime({
15820
16028
  ts: ts,
@@ -15824,7 +16032,7 @@ function quickDT(obj, opts) {
15824
16032
  });
15825
16033
  }
15826
16034
  function diffRelative(start, end, opts) {
15827
- var round = isUndefined(opts.round) ? true : opts.round, format = function(c, unit) {
16035
+ var round = isUndefined$1(opts.round) ? true : opts.round, format = function(c, unit) {
15828
16036
  c = roundTo(c, round || opts.calendary ? 0 : 2, true);
15829
16037
  var formatter = end.loc.clone(opts).relFormatter(opts);
15830
16038
  return formatter.format(c, unit);
@@ -15878,6 +16086,15 @@ function lastOpts(argList) {
15878
16086
  args
15879
16087
  ];
15880
16088
  }
16089
+ /**
16090
+ * Timestamp to use for cached zone offset guesses (exposed for test)
16091
+ */ var zoneOffsetTs;
16092
+ /**
16093
+ * Cache for zone offset guesses (exposed for test).
16094
+ *
16095
+ * This optimizes quickDT via guessOffsetForZone to avoid repeated calls of
16096
+ * zone.offset().
16097
+ */ var zoneOffsetGuessCache = {};
15881
16098
  var DateTime = /*#__PURE__*/ function() {
15882
16099
  function DateTime(config) {
15883
16100
  _class_call_check$1E(this, DateTime);
@@ -15885,7 +16102,7 @@ var DateTime = /*#__PURE__*/ function() {
15885
16102
  var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null);
15886
16103
  /**
15887
16104
  * @access private
15888
- */ this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;
16105
+ */ this.ts = isUndefined$1(config.ts) ? Settings.now() : config.ts;
15889
16106
  var c = null, o = null;
15890
16107
  if (!invalid) {
15891
16108
  var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);
@@ -15896,7 +16113,9 @@ var DateTime = /*#__PURE__*/ function() {
15896
16113
  config.old.o
15897
16114
  ], c = ref[0], o = ref[1];
15898
16115
  } else {
15899
- var ot = zone.offset(this.ts);
16116
+ // If an offset has been passed and we have not been called from
16117
+ // clone(), we can trust it and avoid the offset calculation.
16118
+ var ot = isNumber$1(config.o) && !config.old ? config.o : zone.offset(this.ts);
15900
16119
  c = tsToObj(this.ts, ot);
15901
16120
  invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null;
15902
16121
  c = invalid ? null : c;
@@ -16534,7 +16753,7 @@ var DateTime = /*#__PURE__*/ function() {
16534
16753
  if (!this.isValid) return this;
16535
16754
  var normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);
16536
16755
  var _usesLocalWeekValues = usesLocalWeekValues(normalized, this.loc), minDaysInFirstWeek = _usesLocalWeekValues.minDaysInFirstWeek, startOfWeek = _usesLocalWeekValues.startOfWeek;
16537
- 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;
16756
+ 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;
16538
16757
  if ((containsGregor || containsOrdinal) && definiteWeekDef) {
16539
16758
  throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");
16540
16759
  }
@@ -16544,13 +16763,13 @@ var DateTime = /*#__PURE__*/ function() {
16544
16763
  var mixed;
16545
16764
  if (settingWeekStuff) {
16546
16765
  mixed = weekToGregorian(_object_spread$O({}, gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), normalized), minDaysInFirstWeek, startOfWeek);
16547
- } else if (!isUndefined(normalized.ordinal)) {
16766
+ } else if (!isUndefined$1(normalized.ordinal)) {
16548
16767
  mixed = ordinalToGregorian(_object_spread$O({}, gregorianToOrdinal(this.c), normalized));
16549
16768
  } else {
16550
16769
  mixed = _object_spread$O({}, this.toObject(), normalized);
16551
16770
  // if we didn't set the day but we ended up on an overflow date,
16552
16771
  // use the last day of the right month
16553
- if (isUndefined(normalized.day)) {
16772
+ if (isUndefined$1(normalized.day)) {
16554
16773
  mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);
16555
16774
  }
16556
16775
  }
@@ -17229,6 +17448,7 @@ var DateTime = /*#__PURE__*/ function() {
17229
17448
  * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
17230
17449
  * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance
17231
17450
  * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance
17451
+ * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance
17232
17452
  * @example DateTime.utc() //~> now
17233
17453
  * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z
17234
17454
  * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z
@@ -17288,13 +17508,14 @@ var DateTime = /*#__PURE__*/ function() {
17288
17508
  * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
17289
17509
  * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
17290
17510
  * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
17511
+ * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
17291
17512
  * @return {DateTime}
17292
17513
  */ function fromMillis(milliseconds) {
17293
17514
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
17294
17515
  if (!isNumber$1(milliseconds)) {
17295
17516
  throw new InvalidArgumentError("fromMillis requires a numerical input, but received a ".concat(typeof milliseconds === "undefined" ? "undefined" : _type_of$1c(milliseconds), " with value ").concat(milliseconds));
17296
17517
  } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {
17297
- // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start
17518
+ // this isn't perfect because we can still end up out of range because of additional shifting, but it's a start
17298
17519
  return DateTime.invalid("Timestamp out of range");
17299
17520
  } else {
17300
17521
  return new DateTime({
@@ -17315,6 +17536,7 @@ var DateTime = /*#__PURE__*/ function() {
17315
17536
  * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
17316
17537
  * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
17317
17538
  * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
17539
+ * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
17318
17540
  * @return {DateTime}
17319
17541
  */ function fromSeconds(seconds) {
17320
17542
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -17353,6 +17575,7 @@ var DateTime = /*#__PURE__*/ function() {
17353
17575
  * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance
17354
17576
  * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
17355
17577
  * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
17578
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
17356
17579
  * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'
17357
17580
  * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'
17358
17581
  * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06
@@ -17372,7 +17595,7 @@ var DateTime = /*#__PURE__*/ function() {
17372
17595
  var loc = Locale.fromObject(opts);
17373
17596
  var normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);
17374
17597
  var _usesLocalWeekValues = usesLocalWeekValues(normalized, loc), minDaysInFirstWeek = _usesLocalWeekValues.minDaysInFirstWeek, startOfWeek = _usesLocalWeekValues.startOfWeek;
17375
- 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;
17598
+ 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;
17376
17599
  // cases:
17377
17600
  // just a weekday -> this week's instance of that weekday, no worries
17378
17601
  // (gregorian data or ordinal) + (weekYear or weekNumber) -> error
@@ -17406,7 +17629,7 @@ var DateTime = /*#__PURE__*/ function() {
17406
17629
  for(var _iterator = units[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
17407
17630
  var u = _step.value;
17408
17631
  var v = normalized[u];
17409
- if (!isUndefined(v)) {
17632
+ if (!isUndefined$1(v)) {
17410
17633
  foundFirst = true;
17411
17634
  } else if (foundFirst) {
17412
17635
  normalized[u] = defaultValues[u];
@@ -17444,6 +17667,9 @@ var DateTime = /*#__PURE__*/ function() {
17444
17667
  if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {
17445
17668
  return DateTime.invalid("mismatched weekday", "you can't specify both a weekday of ".concat(normalized.weekday, " and a date of ").concat(inst.toISO()));
17446
17669
  }
17670
+ if (!inst.isValid) {
17671
+ return DateTime.invalid(inst.invalid);
17672
+ }
17447
17673
  return inst;
17448
17674
  }
17449
17675
  },
@@ -17458,6 +17684,7 @@ var DateTime = /*#__PURE__*/ function() {
17458
17684
  * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
17459
17685
  * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance
17460
17686
  * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance
17687
+ * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance
17461
17688
  * @example DateTime.fromISO('2016-05-25T09:08:34.123')
17462
17689
  * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')
17463
17690
  * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})
@@ -17481,6 +17708,7 @@ var DateTime = /*#__PURE__*/ function() {
17481
17708
  * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
17482
17709
  * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
17483
17710
  * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
17711
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
17484
17712
  * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')
17485
17713
  * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')
17486
17714
  * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')
@@ -17503,6 +17731,7 @@ var DateTime = /*#__PURE__*/ function() {
17503
17731
  * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
17504
17732
  * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
17505
17733
  * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
17734
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
17506
17735
  * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')
17507
17736
  * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')
17508
17737
  * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')
@@ -17525,11 +17754,12 @@ var DateTime = /*#__PURE__*/ function() {
17525
17754
  * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
17526
17755
  * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
17527
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
17528
17758
  * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
17529
17759
  * @return {DateTime}
17530
17760
  */ function fromFormat(text, fmt) {
17531
17761
  var opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
17532
- if (isUndefined(text) || isUndefined(fmt)) {
17762
+ if (isUndefined$1(text) || isUndefined$1(fmt)) {
17533
17763
  throw new InvalidArgumentError("fromFormat requires an input string and a format");
17534
17764
  }
17535
17765
  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({
@@ -17564,6 +17794,7 @@ var DateTime = /*#__PURE__*/ function() {
17564
17794
  * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
17565
17795
  * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
17566
17796
  * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
17797
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
17567
17798
  * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
17568
17799
  * @example DateTime.fromSQL('2017-05-15')
17569
17800
  * @example DateTime.fromSQL('2017-05-15 09:12:34')
@@ -17592,7 +17823,7 @@ var DateTime = /*#__PURE__*/ function() {
17592
17823
  if (!reason) {
17593
17824
  throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");
17594
17825
  }
17595
- var invalid = _instanceof$t(reason, Invalid) ? reason : new Invalid(reason, explanation);
17826
+ var invalid = _instanceof$u(reason, Invalid) ? reason : new Invalid(reason, explanation);
17596
17827
  if (Settings.throwOnInvalid) {
17597
17828
  throw new InvalidDateTimeError(invalid);
17598
17829
  } else {
@@ -17643,6 +17874,13 @@ var DateTime = /*#__PURE__*/ function() {
17643
17874
  }).join("");
17644
17875
  }
17645
17876
  },
17877
+ {
17878
+ key: "resetCache",
17879
+ value: function resetCache() {
17880
+ zoneOffsetTs = undefined;
17881
+ zoneOffsetGuessCache = {};
17882
+ }
17883
+ },
17646
17884
  {
17647
17885
  key: "min",
17648
17886
  value: /**
@@ -17707,6 +17945,61 @@ var DateTime = /*#__PURE__*/ function() {
17707
17945
  return DateTime.fromFormatExplain(text, fmt, options);
17708
17946
  }
17709
17947
  },
17948
+ {
17949
+ key: "buildFormatParser",
17950
+ value: /**
17951
+ * Build a parser for `fmt` using the given locale. This parser can be passed
17952
+ * to {@link DateTime.fromFormatParser} to a parse a date in this format. This
17953
+ * can be used to optimize cases where many dates need to be parsed in a
17954
+ * specific format.
17955
+ *
17956
+ * @param {String} fmt - the format the string is expected to be in (see
17957
+ * description)
17958
+ * @param {Object} options - options used to set locale and numberingSystem
17959
+ * for parser
17960
+ * @returns {TokenParser} - opaque object to be used
17961
+ */ function buildFormatParser(fmt) {
17962
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
17963
+ 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({
17964
+ locale: locale,
17965
+ numberingSystem: numberingSystem,
17966
+ defaultToEN: true
17967
+ });
17968
+ return new TokenParser(localeToUse, fmt);
17969
+ }
17970
+ },
17971
+ {
17972
+ key: "fromFormatParser",
17973
+ value: /**
17974
+ * Create a DateTime from an input string and format parser.
17975
+ *
17976
+ * The format parser must have been created with the same locale as this call.
17977
+ *
17978
+ * @param {String} text - the string to parse
17979
+ * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}
17980
+ * @param {Object} opts - options taken by fromFormat()
17981
+ * @returns {DateTime}
17982
+ */ function fromFormatParser(text, formatParser) {
17983
+ var opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
17984
+ if (isUndefined$1(text) || isUndefined$1(formatParser)) {
17985
+ throw new InvalidArgumentError("fromFormatParser requires an input string and a format parser");
17986
+ }
17987
+ 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({
17988
+ locale: locale,
17989
+ numberingSystem: numberingSystem,
17990
+ defaultToEN: true
17991
+ });
17992
+ if (!localeToUse.equals(formatParser.locale)) {
17993
+ throw new InvalidArgumentError("fromFormatParser called with a locale of ".concat(localeToUse, ", ") + "but the format parser was created for ".concat(formatParser.locale));
17994
+ }
17995
+ var _formatParser_explainFromTokens = formatParser.explainFromTokens(text), result = _formatParser_explainFromTokens.result, zone = _formatParser_explainFromTokens.zone, specificOffset = _formatParser_explainFromTokens.specificOffset, invalidReason = _formatParser_explainFromTokens.invalidReason;
17996
+ if (invalidReason) {
17997
+ return DateTime.invalid(invalidReason);
17998
+ } else {
17999
+ return parseDataToDateTime(result, zone, opts, "format ".concat(formatParser.format), text, specificOffset);
18000
+ }
18001
+ }
18002
+ },
17710
18003
  {
17711
18004
  key: "DATE_SHORT",
17712
18005
  get: // FORMAT PRESETS
@@ -17977,7 +18270,7 @@ function _inherits$18(subClass, superClass) {
17977
18270
  });
17978
18271
  if (superClass) _set_prototype_of$18(subClass, superClass);
17979
18272
  }
17980
- function _instanceof$s(left, right) {
18273
+ function _instanceof$t(left, right) {
17981
18274
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17982
18275
  return !!right[Symbol.hasInstance](left);
17983
18276
  } else {
@@ -18906,14 +19199,14 @@ function resolveNode(node, pos, side, overlays) {
18906
19199
  var _a;
18907
19200
  // Move up to a node that actually holds the position, if possible
18908
19201
  while(node.from == node.to || (side < 1 ? node.from >= pos : node.from > pos) || (side > -1 ? node.to <= pos : node.to < pos)){
18909
- var parent = !overlays && _instanceof$s(node, TreeNode) && node.index < 0 ? null : node.parent;
19202
+ var parent = !overlays && _instanceof$t(node, TreeNode) && node.index < 0 ? null : node.parent;
18910
19203
  if (!parent) return node;
18911
19204
  node = parent;
18912
19205
  }
18913
19206
  var mode = overlays ? 0 : IterMode.IgnoreOverlays;
18914
19207
  // Must go up out of overlays when those do not overlap with pos
18915
19208
  if (overlays) for(var scan = node, parent1 = scan.parent; parent1; scan = parent1, parent1 = scan.parent){
18916
- if (_instanceof$s(scan, TreeNode) && scan.index < 0 && ((_a = parent1.enter(pos, side, mode)) === null || _a === void 0 ? void 0 : _a.from) != scan.from) node = parent1;
19209
+ if (_instanceof$t(scan, TreeNode) && scan.index < 0 && ((_a = parent1.enter(pos, side, mode)) === null || _a === void 0 ? void 0 : _a.from) != scan.from) node = parent1;
18917
19210
  }
18918
19211
  for(;;){
18919
19212
  var inner = node.enter(pos, side, mode);
@@ -18965,7 +19258,7 @@ var BaseNode = /*#__PURE__*/ function() {
18965
19258
  {
18966
19259
  key: "matchContext",
18967
19260
  value: function matchContext(context) {
18968
- return matchNodeContext(this, context);
19261
+ return matchNodeContext(this.parent, context);
18969
19262
  }
18970
19263
  },
18971
19264
  {
@@ -19041,7 +19334,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
19041
19334
  for(var _parent__tree = parent._tree, children = _parent__tree.children, positions = _parent__tree.positions, e = dir > 0 ? children.length : -1; i != e; i += dir){
19042
19335
  var next = children[i], start = positions[i] + parent.from;
19043
19336
  if (!checkSide(side, pos, start, start + next.length)) continue;
19044
- if (_instanceof$s(next, TreeBuffer)) {
19337
+ if (_instanceof$t(next, TreeBuffer)) {
19045
19338
  if (mode & IterMode.ExcludeBuffers) continue;
19046
19339
  var index = next.findChild(0, next.buffer.length, dir, pos - start, side);
19047
19340
  if (index > -1) return new BufferNode(new BufferContext(parent, next, i, start), null, index);
@@ -19179,7 +19472,7 @@ function getChildren(node, type, before, after) {
19179
19472
  }
19180
19473
  function matchNodeContext(node, context) {
19181
19474
  var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : context.length - 1;
19182
- for(var p = node.parent; i >= 0; p = p.parent){
19475
+ for(var p = node; i >= 0; p = p.parent){
19183
19476
  if (!p) return false;
19184
19477
  if (!p.type.isAnonymous) {
19185
19478
  if (context[i] && context[i] != p.name) return false;
@@ -19340,7 +19633,7 @@ function iterStack(heads) {
19340
19633
  pick = i;
19341
19634
  }
19342
19635
  }
19343
- var next = _instanceof$s(picked, TreeNode) && picked.index < 0 ? null : picked.parent;
19636
+ var next = _instanceof$t(picked, TreeNode) && picked.index < 0 ? null : picked.parent;
19344
19637
  var newHeads = heads.slice();
19345
19638
  if (next) newHeads[pick] = next;
19346
19639
  else newHeads.splice(pick, 1);
@@ -19364,7 +19657,7 @@ var StackIterator = /*#__PURE__*/ function() {
19364
19657
  }();
19365
19658
  function stackIterator(tree, pos, side) {
19366
19659
  var inner = tree.resolveInner(pos, side), layers = null;
19367
- for(var scan = _instanceof$s(inner, TreeNode) ? inner : inner.context.parent; scan; scan = scan.parent){
19660
+ for(var scan = _instanceof$t(inner, TreeNode) ? inner : inner.context.parent; scan; scan = scan.parent){
19368
19661
  if (scan.index < 0) {
19369
19662
  var parent = scan.parent;
19370
19663
  (layers || (layers = [
@@ -19402,7 +19695,7 @@ allows you to move to adjacent nodes.
19402
19695
  @internal
19403
19696
  */ this.index = 0;
19404
19697
  this.bufferNode = null;
19405
- if (_instanceof$s(node, TreeNode)) {
19698
+ if (_instanceof$t(node, TreeNode)) {
19406
19699
  this.yieldNode(node);
19407
19700
  } else {
19408
19701
  this._tree = node.context.parent;
@@ -19449,7 +19742,7 @@ allows you to move to adjacent nodes.
19449
19742
  */ key: "yield",
19450
19743
  value: function _yield(node) {
19451
19744
  if (!node) return false;
19452
- if (_instanceof$s(node, TreeNode)) {
19745
+ if (_instanceof$t(node, TreeNode)) {
19453
19746
  this.buffer = null;
19454
19747
  return this.yieldNode(node);
19455
19748
  }
@@ -19590,7 +19883,7 @@ allows you to move to adjacent nodes.
19590
19883
  for(; parent; ref2 = parent, index = ref2.index, parent = ref2._parent, ref2){
19591
19884
  if (index > -1) for(var i1 = index + dir, e = dir < 0 ? -1 : parent._tree.children.length; i1 != e; i1 += dir){
19592
19885
  var child = parent._tree.children[i1];
19593
- if (this.mode & IterMode.IncludeAnonymous || _instanceof$s(child, TreeBuffer) || !child.type.isAnonymous || hasChild(child)) return false;
19886
+ if (this.mode & IterMode.IncludeAnonymous || _instanceof$t(child, TreeBuffer) || !child.type.isAnonymous || hasChild(child)) return false;
19594
19887
  }
19595
19888
  }
19596
19889
  return true;
@@ -19621,7 +19914,7 @@ allows you to move to adjacent nodes.
19621
19914
  },
19622
19915
  {
19623
19916
  /**
19624
- Move to the next node in a last-to-first pre-order traveral. A
19917
+ Move to the next node in a last-to-first pre-order traversal. A
19625
19918
  node is followed by its last child or, if it has none, its
19626
19919
  previous sibling or the previous sibling of the first parent
19627
19920
  node that has one.
@@ -19699,8 +19992,8 @@ allows you to move to adjacent nodes.
19699
19992
  for(;;){
19700
19993
  if (mustLeave && leave) leave(this);
19701
19994
  mustLeave = this.type.isAnonymous;
19702
- if (this.nextSibling()) break;
19703
19995
  if (!depth) return;
19996
+ if (this.nextSibling()) break;
19704
19997
  this.parent();
19705
19998
  depth--;
19706
19999
  mustLeave = true;
@@ -19715,10 +20008,10 @@ allows you to move to adjacent nodes.
19715
20008
  are treated as wildcards.
19716
20009
  */ key: "matchContext",
19717
20010
  value: function matchContext(context) {
19718
- if (!this.buffer) return matchNodeContext(this.node, context);
20011
+ if (!this.buffer) return matchNodeContext(this.node.parent, context);
19719
20012
  var buffer = this.buffer.buffer, types = buffer.set.types;
19720
20013
  for(var i = context.length - 1, d = this.stack.length - 1; i >= 0; d--){
19721
- if (d < 0) return matchNodeContext(this.node, context, i);
20014
+ if (d < 0) return matchNodeContext(this._tree, context, i);
19722
20015
  var type = types[buffer.buffer[this.stack[d]]];
19723
20016
  if (!type.isAnonymous) {
19724
20017
  if (context[i] && context[i] != type.name) return false;
@@ -19733,7 +20026,7 @@ allows you to move to adjacent nodes.
19733
20026
  }();
19734
20027
  function hasChild(tree) {
19735
20028
  return tree.children.some(function(ch) {
19736
- return _instanceof$s(ch, TreeBuffer) || !ch.type.isAnonymous || hasChild(ch);
20029
+ return _instanceof$t(ch, TreeBuffer) || !ch.type.isAnonymous || hasChild(ch);
19737
20030
  });
19738
20031
  }
19739
20032
  function buildTree(data) {
@@ -19744,7 +20037,7 @@ function buildTree(data) {
19744
20037
  var contextHash = 0, lookAhead = 0;
19745
20038
  function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {
19746
20039
  var id = cursor.id, start = cursor.start, end = cursor.end, size = cursor.size;
19747
- var lookAheadAtStart = lookAhead;
20040
+ var lookAheadAtStart = lookAhead, contextAtStart = contextHash;
19748
20041
  while(size < 0){
19749
20042
  cursor.next();
19750
20043
  if (size == -1 /* SpecialRecord.Reuse */ ) {
@@ -19780,7 +20073,7 @@ function buildTree(data) {
19780
20073
  while(cursor.pos > endPos1){
19781
20074
  if (localInRepeat >= 0 && cursor.id == localInRepeat && cursor.size >= 0) {
19782
20075
  if (cursor.end <= lastEnd - maxBufferLength) {
19783
- makeRepeatLeaf(localChildren, localPositions, start, lastGroup, cursor.end, lastEnd, localInRepeat, lookAheadAtStart);
20076
+ makeRepeatLeaf(localChildren, localPositions, start, lastGroup, cursor.end, lastEnd, localInRepeat, lookAheadAtStart, contextAtStart);
19784
20077
  lastGroup = localChildren.length;
19785
20078
  lastEnd = cursor.end;
19786
20079
  }
@@ -19791,14 +20084,14 @@ function buildTree(data) {
19791
20084
  takeNode(start, endPos1, localChildren, localPositions, localInRepeat, depth + 1);
19792
20085
  }
19793
20086
  }
19794
- if (localInRepeat >= 0 && lastGroup > 0 && lastGroup < localChildren.length) makeRepeatLeaf(localChildren, localPositions, start, lastGroup, start, lastEnd, localInRepeat, lookAheadAtStart);
20087
+ if (localInRepeat >= 0 && lastGroup > 0 && lastGroup < localChildren.length) makeRepeatLeaf(localChildren, localPositions, start, lastGroup, start, lastEnd, localInRepeat, lookAheadAtStart, contextAtStart);
19795
20088
  localChildren.reverse();
19796
20089
  localPositions.reverse();
19797
20090
  if (localInRepeat > -1 && lastGroup > 0) {
19798
- var make = makeBalanced(type);
20091
+ var make = makeBalanced(type, contextAtStart);
19799
20092
  node1 = balanceRange(type, localChildren, localPositions, 0, localChildren.length, 0, end - start, make, make);
19800
20093
  } else {
19801
- node1 = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end);
20094
+ node1 = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end, contextAtStart);
19802
20095
  }
19803
20096
  }
19804
20097
  children.push(node1);
@@ -19833,27 +20126,26 @@ function buildTree(data) {
19833
20126
  positions.push(start1 - parentStart);
19834
20127
  }
19835
20128
  }
19836
- function makeBalanced(type) {
20129
+ function makeBalanced(type, contextHash) {
19837
20130
  return function(children, positions, length) {
19838
20131
  var lookAhead = 0, lastI = children.length - 1, last, lookAheadProp;
19839
- if (lastI >= 0 && _instanceof$s(last = children[lastI], Tree)) {
20132
+ if (lastI >= 0 && _instanceof$t(last = children[lastI], Tree)) {
19840
20133
  if (!lastI && last.type == type && last.length == length) return last;
19841
20134
  if (lookAheadProp = last.prop(NodeProp.lookAhead)) lookAhead = positions[lastI] + last.length + lookAheadProp;
19842
20135
  }
19843
- return makeTree(type, children, positions, length, lookAhead);
20136
+ return makeTree(type, children, positions, length, lookAhead, contextHash);
19844
20137
  };
19845
20138
  }
19846
- function makeRepeatLeaf(children, positions, base, i, from, to, type, lookAhead) {
20139
+ function makeRepeatLeaf(children, positions, base, i, from, to, type, lookAhead, contextHash) {
19847
20140
  var localChildren = [], localPositions = [];
19848
20141
  while(children.length > i){
19849
20142
  localChildren.push(children.pop());
19850
20143
  localPositions.push(positions.pop() + base - from);
19851
20144
  }
19852
- children.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead - to));
20145
+ children.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead - to, contextHash));
19853
20146
  positions.push(from - base);
19854
20147
  }
19855
- function makeTree(type, children, positions, length) {
19856
- var lookAhead = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, props = arguments.length > 5 ? arguments[5] : void 0;
20148
+ function makeTree(type, children, positions, length, lookAhead, contextHash, props) {
19857
20149
  if (contextHash) {
19858
20150
  var pair = [
19859
20151
  NodeProp.contextHash,
@@ -19958,7 +20250,7 @@ function buildTree(data) {
19958
20250
  }
19959
20251
  var nodeSizeCache = new WeakMap;
19960
20252
  function nodeSize(balanceType, node) {
19961
- if (!balanceType.isAnonymous || _instanceof$s(node, TreeBuffer) || node.type != balanceType) return 1;
20253
+ if (!balanceType.isAnonymous || _instanceof$t(node, TreeBuffer) || node.type != balanceType) return 1;
19962
20254
  var size = nodeSizeCache.get(node);
19963
20255
  if (size == null) {
19964
20256
  size = 1;
@@ -19966,7 +20258,7 @@ function nodeSize(balanceType, node) {
19966
20258
  try {
19967
20259
  for(var _iterator = node.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
19968
20260
  var child = _step.value;
19969
- if (child.type != balanceType || !_instanceof$s(child, Tree)) {
20261
+ if (child.type != balanceType || !_instanceof$t(child, Tree)) {
19970
20262
  size = 1;
19971
20263
  break;
19972
20264
  }
@@ -20165,7 +20457,7 @@ function _inherits$17(subClass, superClass) {
20165
20457
  });
20166
20458
  if (superClass) _set_prototype_of$17(subClass, superClass);
20167
20459
  }
20168
- function _instanceof$r(left, right) {
20460
+ function _instanceof$s(left, right) {
20169
20461
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
20170
20462
  return !!right[Symbol.hasInstance](left);
20171
20463
  } else {
@@ -20364,14 +20656,15 @@ about the parse state.
20364
20656
  var _a;
20365
20657
  var depth = action >> 19 /* Action.ReduceDepthShift */ , type = action & 65535 /* Action.ValueMask */ ;
20366
20658
  var parser = this.p.parser;
20367
- if (this.reducePos < this.pos - 25 /* Lookahead.Margin */ ) this.setLookAhead(this.pos);
20659
+ var lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */ ;
20660
+ if (lookaheadRecord) this.setLookAhead(this.pos);
20368
20661
  var dPrec = parser.dynamicPrecedence(type);
20369
20662
  if (dPrec) this.score += dPrec;
20370
20663
  if (depth == 0) {
20371
20664
  this.pushState(parser.getGoto(this.state, type, true), this.reducePos);
20372
20665
  // Zero-depth reductions are a special case—they add stuff to
20373
20666
  // the stack without popping anything off.
20374
- if (type < parser.minRepeatTerm) this.storeNode(type, this.reducePos, this.reducePos, 4, true);
20667
+ if (type < parser.minRepeatTerm) this.storeNode(type, this.reducePos, this.reducePos, lookaheadRecord ? 8 : 4, true);
20375
20668
  this.reduceContext(type, this.reducePos);
20376
20669
  return;
20377
20670
  }
@@ -20417,7 +20710,7 @@ about the parse state.
20417
20710
  @internal
20418
20711
  */ key: "storeNode",
20419
20712
  value: function storeNode(term, start, end) {
20420
- var size = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 4, isReduce = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
20713
+ var size = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 4, mustSink = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
20421
20714
  if (term == 0 /* Term.Err */ && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
20422
20715
  // Try to omit/merge adjacent error nodes
20423
20716
  var cur = this, top = this.buffer.length;
@@ -20433,18 +20726,27 @@ about the parse state.
20433
20726
  }
20434
20727
  }
20435
20728
  }
20436
- if (!isReduce || this.pos == end) {
20729
+ if (!mustSink || this.pos == end) {
20437
20730
  this.buffer.push(term, start, end, size);
20438
20731
  } else {
20439
20732
  var index = this.buffer.length;
20440
- if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */ ) while(index > 0 && this.buffer[index - 2] > end){
20441
- // Move this record forward
20442
- this.buffer[index] = this.buffer[index - 4];
20443
- this.buffer[index + 1] = this.buffer[index - 3];
20444
- this.buffer[index + 2] = this.buffer[index - 2];
20445
- this.buffer[index + 3] = this.buffer[index - 1];
20446
- index -= 4;
20447
- if (size > 4) size -= 4;
20733
+ if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */ ) {
20734
+ var mustMove = false;
20735
+ for(var scan = index; scan > 0 && this.buffer[scan - 2] > end; scan -= 4){
20736
+ if (this.buffer[scan - 1] >= 0) {
20737
+ mustMove = true;
20738
+ break;
20739
+ }
20740
+ }
20741
+ if (mustMove) while(index > 0 && this.buffer[index - 2] > end){
20742
+ // Move this record forward
20743
+ this.buffer[index] = this.buffer[index - 4];
20744
+ this.buffer[index + 1] = this.buffer[index - 3];
20745
+ this.buffer[index + 2] = this.buffer[index - 2];
20746
+ this.buffer[index + 3] = this.buffer[index - 1];
20747
+ index -= 4;
20748
+ if (size > 4) size -= 4;
20749
+ }
20448
20750
  }
20449
20751
  this.buffer[index] = term;
20450
20752
  this.buffer[index + 1] = start;
@@ -21385,7 +21687,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
21385
21687
  this.nextStart = start;
21386
21688
  return null;
21387
21689
  }
21388
- if (_instanceof$r(next, Tree)) {
21690
+ if (_instanceof$s(next, Tree)) {
21389
21691
  if (start == pos) {
21390
21692
  if (start < this.safeFrom) return null;
21391
21693
  var end = start + next.length;
@@ -21688,9 +21990,9 @@ var Parse = /*#__PURE__*/ function() {
21688
21990
  if (verbose) console.log(base + this.stackID(stack) + " (via reuse of ".concat(parser.getName(cached.type.id), ")"));
21689
21991
  return true;
21690
21992
  }
21691
- if (!_instanceof$r(cached, Tree) || cached.children.length == 0 || cached.positions[0] > 0) break;
21993
+ if (!_instanceof$s(cached, Tree) || cached.children.length == 0 || cached.positions[0] > 0) break;
21692
21994
  var inner = cached.children[0];
21693
- if (_instanceof$r(inner, Tree) && cached.positions[0] == 0) cached = inner;
21995
+ if (_instanceof$s(inner, Tree) && cached.positions[0] == 0) cached = inner;
21694
21996
  else break;
21695
21997
  }
21696
21998
  }
@@ -22281,6 +22583,76 @@ function getSpecializer(spec) {
22281
22583
  return spec.get;
22282
22584
  }
22283
22585
 
22586
+ var nativeToString = Object.prototype.toString;
22587
+ var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
22588
+ function isUndefined(obj) {
22589
+ return obj === undefined;
22590
+ }
22591
+ function isNil(obj) {
22592
+ return obj == null;
22593
+ }
22594
+ function isArray$1(obj) {
22595
+ return nativeToString.call(obj) === "[object Array]";
22596
+ }
22597
+ /**
22598
+ * Return true, if target owns a property with the given key.
22599
+ *
22600
+ * @param {Object} target
22601
+ * @param {String} key
22602
+ *
22603
+ * @return {Boolean}
22604
+ */ function has(target, key) {
22605
+ return !isNil(target) && nativeHasOwnProperty.call(target, key);
22606
+ }
22607
+ /**
22608
+ * Iterate over collection; returning something
22609
+ * (non-undefined) will stop iteration.
22610
+ *
22611
+ * @template T
22612
+ * @param {Collection<T>} collection
22613
+ * @param { ((item: T, idx: number) => (boolean|void)) | ((item: T, key: string) => (boolean|void)) } iterator
22614
+ *
22615
+ * @return {T} return result that stopped the iteration
22616
+ */ function forEach(collection, iterator) {
22617
+ var val, result;
22618
+ if (isUndefined(collection)) {
22619
+ return;
22620
+ }
22621
+ var convertKey = isArray$1(collection) ? toNum : identity;
22622
+ for(var key in collection){
22623
+ if (has(collection, key)) {
22624
+ val = collection[key];
22625
+ result = iterator(val, convertKey(key));
22626
+ if (result === false) {
22627
+ return val;
22628
+ }
22629
+ }
22630
+ }
22631
+ }
22632
+ /**
22633
+ * Reduce collection, returning a single result.
22634
+ *
22635
+ * @template T
22636
+ * @template V
22637
+ *
22638
+ * @param {Collection<T>} collection
22639
+ * @param {(result: V, entry: T, index: any) => V} iterator
22640
+ * @param {V} result
22641
+ *
22642
+ * @return {V} result returned from last iterator
22643
+ */ function reduce(collection, iterator, result) {
22644
+ forEach(collection, function(value, idx) {
22645
+ result = iterator(result, value, idx);
22646
+ });
22647
+ return result;
22648
+ }
22649
+ function identity(arg) {
22650
+ return arg;
22651
+ }
22652
+ function toNum(arg) {
22653
+ return Number(arg);
22654
+ }
22655
+
22284
22656
  function _class_call_check$1B(instance, Constructor) {
22285
22657
  if (!(instance instanceof Constructor)) {
22286
22658
  throw new TypeError("Cannot call a class as a function");
@@ -22300,6 +22672,13 @@ function _create_class$1v(Constructor, protoProps, staticProps) {
22300
22672
  if (staticProps) _defineProperties$1v(Constructor, staticProps);
22301
22673
  return Constructor;
22302
22674
  }
22675
+ function _instanceof$r(left, right) {
22676
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
22677
+ return !!right[Symbol.hasInstance](left);
22678
+ } else {
22679
+ return left instanceof right;
22680
+ }
22681
+ }
22303
22682
  var nextTagID = 0;
22304
22683
  /**
22305
22684
  Highlighting tags are markers that denote a highlighting category.
@@ -22321,6 +22700,8 @@ be picked up by regular highlighters (though you can derive them
22321
22700
  from standard tags to allow highlighters to fall back to those).
22322
22701
  */ var Tag = /*#__PURE__*/ function() {
22323
22702
  function Tag(/**
22703
+ The optional name of the base tag @internal
22704
+ */ name, /**
22324
22705
  The set of this tag and all its parent tags, starting with
22325
22706
  this one itself and sorted in order of decreasing specificity.
22326
22707
  */ set, /**
@@ -22330,6 +22711,7 @@ from standard tags to allow highlighters to fall back to those).
22330
22711
  The modifiers applied to this.base @internal
22331
22712
  */ modified) {
22332
22713
  _class_call_check$1B(this, Tag);
22714
+ this.name = name;
22333
22715
  this.set = set;
22334
22716
  this.base = base;
22335
22717
  this.modified = modified;
@@ -22337,18 +22719,42 @@ from standard tags to allow highlighters to fall back to those).
22337
22719
  @internal
22338
22720
  */ this.id = nextTagID++;
22339
22721
  }
22340
- _create_class$1v(Tag, null, [
22722
+ _create_class$1v(Tag, [
22723
+ {
22724
+ key: "toString",
22725
+ value: function toString() {
22726
+ var name = this.name;
22727
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
22728
+ try {
22729
+ for(var _iterator = this.modified[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
22730
+ var mod = _step.value;
22731
+ if (mod.name) name = "".concat(mod.name, "(").concat(name, ")");
22732
+ }
22733
+ } catch (err) {
22734
+ _didIteratorError = true;
22735
+ _iteratorError = err;
22736
+ } finally{
22737
+ try {
22738
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
22739
+ _iterator.return();
22740
+ }
22741
+ } finally{
22742
+ if (_didIteratorError) {
22743
+ throw _iteratorError;
22744
+ }
22745
+ }
22746
+ }
22747
+ return name;
22748
+ }
22749
+ }
22750
+ ], [
22341
22751
  {
22342
22752
  key: "define",
22343
- value: /**
22344
- Define a new tag. If `parent` is given, the tag is treated as a
22345
- sub-tag of that parent, and
22346
- [highlighters](#highlight.tagHighlighter) that don't mention
22347
- this tag will try to fall back to the parent tag (or grandparent
22348
- tag, etc).
22349
- */ function define(parent) {
22753
+ value: function define(nameOrParent, parent) {
22754
+ var name = typeof nameOrParent == "string" ? nameOrParent : "?";
22755
+ if (_instanceof$r(nameOrParent, Tag)) parent = nameOrParent;
22350
22756
  if (parent === null || parent === void 0 ? void 0 : parent.base) throw new Error("Can not derive from a modified tag");
22351
- var tag = new Tag([], null, []);
22757
+ var tag = new Tag(name, [], null, []);
22352
22758
  tag.set.push(tag);
22353
22759
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
22354
22760
  if (parent) try {
@@ -22386,8 +22792,8 @@ from standard tags to allow highlighters to fall back to those).
22386
22792
  smaller set of modifiers is registered as a parent, so that for
22387
22793
  example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
22388
22794
  `m1(m3(t1)`, and so on.
22389
- */ function defineModifier() {
22390
- var mod = new Modifier;
22795
+ */ function defineModifier(name) {
22796
+ var mod = new Modifier(name);
22391
22797
  return function(tag) {
22392
22798
  if (tag.modified.indexOf(mod) > -1) return tag;
22393
22799
  return Modifier.get(tag.base || tag, tag.modified.concat(mod).sort(function(a, b) {
@@ -22401,8 +22807,9 @@ from standard tags to allow highlighters to fall back to those).
22401
22807
  }();
22402
22808
  var nextModifierID = 0;
22403
22809
  var Modifier = /*#__PURE__*/ function() {
22404
- function Modifier() {
22810
+ function Modifier(name) {
22405
22811
  _class_call_check$1B(this, Modifier);
22812
+ this.name = name;
22406
22813
  this.instances = [];
22407
22814
  this.id = nextModifierID++;
22408
22815
  }
@@ -22415,7 +22822,7 @@ var Modifier = /*#__PURE__*/ function() {
22415
22822
  return t.base == base && sameArray(mods, t.modified);
22416
22823
  });
22417
22824
  if (exists) return exists;
22418
- var set = [], tag = new Tag(set, base, mods);
22825
+ var set = [], tag = new Tag(base.name, set, base, mods);
22419
22826
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
22420
22827
  try {
22421
22828
  for(var _iterator = mods[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
@@ -22961,7 +23368,7 @@ the parent.
22961
23368
  A level 6 [heading](#highlight.tags.heading).
22962
23369
  */ heading6: t(heading),
22963
23370
  /**
22964
- A prose separator (such as a horizontal rule).
23371
+ A prose [content](#highlight.tags.content) separator (such as a horizontal rule).
22965
23372
  */ contentSeparator: t(content),
22966
23373
  /**
22967
23374
  [Content](#highlight.tags.content) that represents a list.
@@ -23017,27 +23424,27 @@ the parent.
23017
23424
  [Modifier](#highlight.Tag^defineModifier) that indicates that a
23018
23425
  given element is being defined. Expected to be used with the
23019
23426
  various [name](#highlight.tags.name) tags.
23020
- */ definition: Tag.defineModifier(),
23427
+ */ definition: Tag.defineModifier("definition"),
23021
23428
  /**
23022
23429
  [Modifier](#highlight.Tag^defineModifier) that indicates that
23023
23430
  something is constant. Mostly expected to be used with
23024
23431
  [variable names](#highlight.tags.variableName).
23025
- */ constant: Tag.defineModifier(),
23432
+ */ constant: Tag.defineModifier("constant"),
23026
23433
  /**
23027
23434
  [Modifier](#highlight.Tag^defineModifier) used to indicate that
23028
23435
  a [variable](#highlight.tags.variableName) or [property
23029
23436
  name](#highlight.tags.propertyName) is being called or defined
23030
23437
  as a function.
23031
- */ function: Tag.defineModifier(),
23438
+ */ function: Tag.defineModifier("function"),
23032
23439
  /**
23033
23440
  [Modifier](#highlight.Tag^defineModifier) that can be applied to
23034
23441
  [names](#highlight.tags.name) to indicate that they belong to
23035
23442
  the language's standard environment.
23036
- */ standard: Tag.defineModifier(),
23443
+ */ standard: Tag.defineModifier("standard"),
23037
23444
  /**
23038
23445
  [Modifier](#highlight.Tag^defineModifier) that indicates a given
23039
23446
  [names](#highlight.tags.name) is local to some scope.
23040
- */ local: Tag.defineModifier(),
23447
+ */ local: Tag.defineModifier("local"),
23041
23448
  /**
23042
23449
  A generic variant [modifier](#highlight.Tag^defineModifier) that
23043
23450
  can be used to tag language-specific alternative variants of
@@ -23045,8 +23452,12 @@ the parent.
23045
23452
  forms of at least the [string](#highlight.tags.string) and
23046
23453
  [variable name](#highlight.tags.variableName) tags, since those
23047
23454
  come up a lot.
23048
- */ special: Tag.defineModifier()
23455
+ */ special: Tag.defineModifier("special")
23049
23456
  };
23457
+ for(var name1 in tags){
23458
+ var val = tags[name1];
23459
+ if (_instanceof$r(val, Tag)) val.name = name1;
23460
+ }
23050
23461
  /**
23051
23462
  This is a highlighter that adds stable, predictable classes to
23052
23463
  tokens, for styling with external CSS.
@@ -23365,7 +23776,7 @@ function _unsupported_iterable_to_array$l(o, minLen) {
23365
23776
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$l(o, minLen);
23366
23777
  }
23367
23778
  // This file was generated by lezer-generator. You probably shouldn't edit it.
23368
- 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;
23779
+ 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;
23369
23780
  /* global console,process */ // @ts-expect-error env access
23370
23781
  var LOG_PARSE = typeof process != "undefined" && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
23371
23782
  // @ts-expect-error env access
@@ -23441,7 +23852,6 @@ var additionalNameChars = chars$1("'./-+*^");
23441
23852
  */ function isSpace(ch) {
23442
23853
  return spaceChars.includes(ch);
23443
23854
  }
23444
- // eslint-disable-next-line
23445
23855
  function indent(str, spaces) {
23446
23856
  return spaces.concat(str.split(/\n/g).join("\n" + spaces));
23447
23857
  }
@@ -23531,14 +23941,14 @@ function indent(str, spaces) {
23531
23941
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23532
23942
  // match is required
23533
23943
  if (!match) {
23534
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23944
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23535
23945
  v: nextMatch1
23536
23946
  };
23537
23947
  }
23538
23948
  var token = match.token, offset = match.offset;
23539
23949
  i1 += offset;
23540
23950
  if (token === " ") {
23541
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23951
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23542
23952
  }
23543
23953
  tokens1 = _to_consumable_array$a(tokens1).concat([
23544
23954
  token
@@ -23557,7 +23967,7 @@ function indent(str, spaces) {
23557
23967
  if (contextKeys.some(function(el) {
23558
23968
  return el.startsWith(name);
23559
23969
  })) {
23560
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23970
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23561
23971
  }
23562
23972
  if (dateTimeIdentifiers.some(function(el) {
23563
23973
  return el === name;
@@ -23576,9 +23986,9 @@ function indent(str, spaces) {
23576
23986
  if (dateTimeIdentifiers.some(function(el) {
23577
23987
  return el.startsWith(name);
23578
23988
  })) {
23579
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23989
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23580
23990
  }
23581
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23991
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23582
23992
  v: nextMatch1
23583
23993
  };
23584
23994
  };
@@ -23644,7 +24054,10 @@ var _obj2;
23644
24054
  var contextStarts = (_obj2 = {}, _define_property$P(_obj2, contextStart, "Context"), _define_property$P(_obj2, functionDefinitionStart, "FunctionDefinition"), _define_property$P(_obj2, forExpressionStart, "ForExpression"), _define_property$P(_obj2, listStart, "List"), _define_property$P(_obj2, ifExpressionStart, "IfExpression"), _define_property$P(_obj2, quantifiedExpressionStart, "QuantifiedExpression"), _obj2);
23645
24055
  var _obj3;
23646
24056
  var contextEnds = (_obj3 = {}, _define_property$P(_obj3, Context, "Context"), _define_property$P(_obj3, FunctionDefinition, "FunctionDefinition"), _define_property$P(_obj3, ForExpression, "ForExpression"), _define_property$P(_obj3, List, "List"), _define_property$P(_obj3, IfExpression, "IfExpression"), _define_property$P(_obj3, QuantifiedExpression, "QuantifiedExpression"), _define_property$P(_obj3, PathExpression, "PathExpression"), _define_property$P(_obj3, FunctionInvocation, "FunctionInvocation"), _define_property$P(_obj3, FilterExpression, "FilterExpression"), _define_property$P(_obj3, ArithmeticExpression, "ArithmeticExpression"), _obj3);
23647
- var ValueProducer = /*#__PURE__*/ function() {
24057
+ /**
24058
+ * A simple producer that retrievs a value from
24059
+ * a given context. Used to lazily take things.
24060
+ */ var ValueProducer = /*#__PURE__*/ function() {
23648
24061
  function ValueProducer(fn) {
23649
24062
  _class_call_check$1A(this, ValueProducer);
23650
24063
  this.fn = fn;
@@ -23730,6 +24143,20 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23730
24143
  var constructor = /** @type { typeof VariableContext } */ this.constructor;
23731
24144
  return constructor.of(_object_spread_props$C(_object_spread$N({}, this.value), _define_property$P({}, key, value)));
23732
24145
  }
24146
+ },
24147
+ {
24148
+ /**
24149
+ * Non-destructively merge another context into this one,
24150
+ * and return the result.
24151
+ *
24152
+ * @param {ContextValue} other
24153
+ *
24154
+ * @return {VariableContext}
24155
+ */ key: "merge",
24156
+ value: function merge(other) {
24157
+ var constructor = /** @type { typeof VariableContext } */ this.constructor;
24158
+ return new constructor(constructor.__merge(this.value, other));
24159
+ }
23733
24160
  }
23734
24161
  ], [
23735
24162
  {
@@ -23747,36 +24174,71 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23747
24174
  {
23748
24175
  key: "of",
23749
24176
  value: /**
23750
- * Takes any number of Contexts and merges them into a single Context.
24177
+ * Takes any number of Contexts and merges them into a single context.
23751
24178
  *
23752
- * @param {...Context} contexts
23753
- * @returns {VariableContext}
24179
+ * @param { ...VariableContext } contexts
24180
+ * @returns { VariableContext }
23754
24181
  */ function of() {
23755
- var _this = this;
23756
24182
  for(var _len = arguments.length, contexts = new Array(_len), _key = 0; _key < _len; _key++){
23757
24183
  contexts[_key] = arguments[_key];
23758
24184
  }
23759
- var unwrap = function(context) {
23760
- if (!context || typeof context !== "object") {
23761
- return {};
24185
+ return contexts.reduce(function(context, otherContext) {
24186
+ return context.merge(otherContext);
24187
+ }, new this({}));
24188
+ }
24189
+ },
24190
+ {
24191
+ key: "__unwrap",
24192
+ value: /**
24193
+ * Returns the raw representation of the given context.
24194
+ *
24195
+ * @param {VariableContext | any} context
24196
+ *
24197
+ * @return {any}
24198
+ */ function __unwrap(context) {
24199
+ if (!context) {
24200
+ return {};
24201
+ }
24202
+ if (_instanceof$q(context, this)) {
24203
+ return context.value;
24204
+ }
24205
+ if (typeof context !== "object") {
24206
+ return {};
24207
+ }
24208
+ return _object_spread$N({}, context);
24209
+ }
24210
+ },
24211
+ {
24212
+ key: "__merge",
24213
+ value: /**
24214
+ * Non-destructively merges two contexts (or their values)
24215
+ * with each other, returning the result.
24216
+ *
24217
+ * @param {ContextValue} context
24218
+ * @param {ContextValue} other
24219
+ *
24220
+ * @return {any}
24221
+ */ function __merge(context, other) {
24222
+ var _this = this;
24223
+ return reduce(this.__unwrap(other), function(merged, value, key) {
24224
+ if (_instanceof$q(value, ValueProducer)) {
24225
+ // keep value producers in tact
24226
+ return _object_spread_props$C(_object_spread$N({}, merged), _define_property$P({}, key, value));
23762
24227
  }
23763
- if (_instanceof$q(context, _this)) {
23764
- return context.value;
24228
+ value = _this.__unwrap(value);
24229
+ if (has(merged, key)) {
24230
+ value = _this.__merge(_this.__unwrap(merged[key]), value);
23765
24231
  }
23766
- return _object_spread$N({}, context);
23767
- };
23768
- var merged = contexts.reduce(function(merged, context) {
23769
- return _object_spread$N({}, merged, unwrap(context));
23770
- }, {});
23771
- return new this(merged);
24232
+ return _object_spread_props$C(_object_spread$N({}, merged), _define_property$P({}, key, value));
24233
+ }, this.__unwrap(context));
23772
24234
  }
23773
24235
  }
23774
24236
  ]);
23775
24237
  return VariableContext;
23776
24238
  }();
23777
24239
  var Variables = /*#__PURE__*/ function() {
23778
- function Variables() {
23779
- 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;
24240
+ function Variables(param) {
24241
+ 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;
23780
24242
  _class_call_check$1A(this, Variables);
23781
24243
  this.name = name;
23782
24244
  this.tokens = tokens;
@@ -24007,7 +24469,19 @@ var Variables = /*#__PURE__*/ function() {
24007
24469
  ], [
24008
24470
  {
24009
24471
  key: "of",
24010
- value: function of(options) {
24472
+ value: /**
24473
+ * @param { {
24474
+ * name?: string,
24475
+ * tokens?: string[],
24476
+ * children?: Variables[],
24477
+ * parent?: Variables | null
24478
+ * context: VariableContext,
24479
+ * value?: any,
24480
+ * raw?: any
24481
+ * } } options
24482
+ *
24483
+ * @return {Variables}
24484
+ */ function of(options) {
24011
24485
  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;
24012
24486
  if (!context) {
24013
24487
  throw new Error("must provide <context>");
@@ -24294,57 +24768,57 @@ var spec_identifier = {
24294
24768
  between: 72,
24295
24769
  instance: 86,
24296
24770
  of: 89,
24297
- days: 99,
24298
- time: 101,
24299
- duration: 103,
24300
- years: 105,
24301
- months: 107,
24302
- date: 109,
24303
- list: 115,
24304
- context: 121,
24305
- function: 128,
24306
- null: 154,
24307
- true: 326,
24308
- false: 326,
24309
- "?": 168,
24310
- external: 184,
24311
- not: 209
24771
+ days: 101,
24772
+ time: 103,
24773
+ duration: 105,
24774
+ years: 107,
24775
+ months: 109,
24776
+ date: 111,
24777
+ list: 117,
24778
+ context: 123,
24779
+ function: 130,
24780
+ null: 156,
24781
+ true: 330,
24782
+ false: 330,
24783
+ "?": 170,
24784
+ external: 186,
24785
+ not: 211
24312
24786
  };
24313
24787
  var parser = LRParser.deserialize({
24314
24788
  version: 14,
24315
- 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'#FRO)yQ^O'#FRO+pQYO'#EWO+wQWO'#EXOOQP'#F{'#F{O+|QXO'#E`OOQQ'#Fx'#FxOOQQ'#FQ'#FQQOQWOOOOQQ'#FS'#FSOOQQ'#F]'#F]O`QYO'#CoOOQQ'#F^'#F^O$qQYO'#CsO,XQYO'#DvOOQQ'#Fq'#FqO,^QYO'#EQOOQO'#EQ'#EQO`QYO'#EUO`QYO'#ETOOQO'#Fy'#FyQ,fQWOOO,kQYO'#DRO-bQWO'#FaOOQO'#DT'#DTO-mQYO'#FeO-tQWOOO.kQYO'#CdO.xQYO'#FUOOQQ'#Cc'#CcO.}QYO'#FTOOQQ'#Cb'#CbO/VQYO,58zO`QYO,59iOOQQ'#Fb'#FbOOQQ'#Fc'#FcOOQQ'#Fd'#FdO`QYO,59qO`QYO,59qO`QYO,59qOOQQ'#Fj'#FjO$qQYO,5:]OOQQ'#Fk'#FkO`QYO,5:_O`QYO,59eO`QYO,59gO`QYO,59iO0uQYO,59iO0|QYO,59rOOQQ,5:h,5:hO1RQYO,59qOOQU-E8k-E8kO2uQYO'#FmOOQQ,5:a,5:aOOQQ,5:m,5:mOOQQ,5:k,5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%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",
24318
- 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",
24319
- maxTerm: 171,
24789
+ 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'#FRQOQWOO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$b$q$}%X%d%y%zR#TwT#Rw$`V!SQ#_#r!X!aT!Q!t!v#P#X#Y#i#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!Z!bT!Q!t!v#P#X#Y#i#j#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!]!cT!Q!t!v#P#X#Y#i#j#k#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!mWOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR&V%mT&Z%n&t!a!eT!Q!n!t!v#P#X#Y#i#j#k#l#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!a!gT!Q!n!t!v#P#X#Y#i#j#k#l#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%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",
24792
+ 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",
24793
+ maxTerm: 173,
24320
24794
  context: variableTracker,
24321
24795
  nodeProps: [
24322
24796
  [
24323
24797
  "closedBy",
24324
24798
  38,
24325
24799
  ")",
24326
- 70,
24800
+ 71,
24327
24801
  "]",
24328
- 95,
24802
+ 96,
24329
24803
  "}"
24330
24804
  ],
24331
24805
  [
24332
24806
  "openedBy",
24333
24807
  40,
24334
24808
  "(",
24335
- 68,
24809
+ 69,
24336
24810
  "[",
24337
- 94,
24811
+ 95,
24338
24812
  "{"
24339
24813
  ],
24340
24814
  [
24341
24815
  "group",
24342
24816
  -5,
24343
- 77,
24344
24817
  78,
24345
24818
  79,
24346
24819
  80,
24347
24820
  81,
24821
+ 82,
24348
24822
  "Literal"
24349
24823
  ]
24350
24824
  ],
@@ -24357,7 +24831,7 @@ var parser = LRParser.deserialize({
24357
24831
  2
24358
24832
  ],
24359
24833
  repeatNodeCount: 14,
24360
- 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?H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;=`<%l$n<%lO$n~&cP;=`<%l$n~&kO#{~~&pOv~~&uOx~~&zP^~z{&}~'SO_~~'XO[~~'^O$O~R'cPZP!`!a'fQ'kO$_Q~'pQ#z~!O!P'v!Q!['{~'{O#}~~(QP$i~!Q!['{~(YQ]~z{(`!P!Q)g~(cTOz(`z{(r{;'S(`;'S;=`)a<%lO(`~(uVOz(`z{(r{!P(`!P!Q)[!Q;'S(`;'S;=`)a<%lO(`~)aOQ~~)dP;=`<%l(`~)lSP~OY)gZ;'S)g;'S;=`)x<%lO)g~){P;=`<%l)g~*TQ$i~!O!P*Z!Q![*O~*^P!Q!['{~*fO$]~~*kO$s~R*rP!]QsP!_!`*uP*zOsPR+RP!YQsP!_!`*u~+ZO$l~~+`O!i~~+eO!g~~+hWOY+eZ#O+e#O#P,Q#P#S+e#S#T,|#T;'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~",
24361
24835
  tokenizers: [
24362
24836
  propertyIdentifiers,
24363
24837
  identifiers,
@@ -24372,28 +24846,31 @@ var parser = LRParser.deserialize({
24372
24846
  ],
24373
24847
  "Expressions": [
24374
24848
  1,
24375
- 101
24849
+ 102
24376
24850
  ],
24377
24851
  "UnaryTests": [
24378
24852
  2,
24379
- 102
24853
+ 103
24380
24854
  ]
24381
24855
  },
24856
+ dialects: {
24857
+ camunda: 2532
24858
+ },
24382
24859
  dynamicPrecedences: {
24383
24860
  "31": -1,
24384
- "67": 1,
24385
- "71": -1,
24386
- "73": -1
24861
+ "68": 1,
24862
+ "72": -1,
24863
+ "74": -1
24387
24864
  },
24388
24865
  specialized: [
24389
24866
  {
24390
- term: 121,
24867
+ term: 122,
24391
24868
  get: function(value) {
24392
24869
  return spec_identifier[value] || -1;
24393
24870
  }
24394
24871
  }
24395
24872
  ],
24396
- tokenPrec: 2500
24873
+ tokenPrec: 2534
24397
24874
  });
24398
24875
 
24399
24876
  function _array_like_to_array$k(arr, len) {
@@ -25468,10 +25945,10 @@ var builtins = {
25468
25945
  // 10.3.4.5 Numeric functions
25469
25946
  "decimal": fn(function(n, scale) {
25470
25947
  if (!scale) {
25471
- return round(n);
25948
+ return bankersRound(n);
25472
25949
  }
25473
25950
  var offset = Math.pow(10, scale);
25474
- return round(n * offset) / offset;
25951
+ return bankersRound(n * offset) / offset;
25475
25952
  }, [
25476
25953
  "number",
25477
25954
  "number"
@@ -25700,7 +26177,8 @@ var builtins = {
25700
26177
  ]),
25701
26178
  // 10.3.4.10 Context function
25702
26179
  "get value": fn(function(m, key) {
25703
- return getFromContext(key, m) || null;
26180
+ var value = getFromContext(key, m);
26181
+ return value != undefined ? value : null;
25704
26182
  }, [
25705
26183
  "context",
25706
26184
  "string"
@@ -26027,13 +26505,13 @@ function countSymbols(str) {
26027
26505
  // cf. https://mathiasbynens.be/notes/javascript-unicode
26028
26506
  return str.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length;
26029
26507
  }
26030
- function round(n) {
26031
- var integral = Math.trunc(n);
26032
- if (n - integral > .5) {
26033
- return integral + 1;
26034
- } else {
26035
- return integral;
26508
+ function bankersRound(n) {
26509
+ var floored = Math.floor(n);
26510
+ var decimalPart = n - floored;
26511
+ if (decimalPart === 0.5) {
26512
+ return floored % 2 === 0 ? floored : floored + 1;
26036
26513
  }
26514
+ return Math.round(n);
26037
26515
  }
26038
26516
  // adapted from https://stackoverflow.com/a/53577159
26039
26517
  function stddev(array) {
@@ -26114,17 +26592,19 @@ function ifValid(o) {
26114
26592
  return o.isValid ? o : null;
26115
26593
  }
26116
26594
  function parseExpression(expression) {
26117
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
26595
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
26118
26596
  return parser.configure({
26119
26597
  top: "Expression",
26120
- contextTracker: trackVariables(context)
26598
+ contextTracker: trackVariables(context),
26599
+ dialect: dialect
26121
26600
  }).parse(expression);
26122
26601
  }
26123
26602
  function parseUnaryTests(expression) {
26124
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
26603
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
26125
26604
  return parser.configure({
26126
26605
  top: "UnaryTests",
26127
- contextTracker: trackVariables(context)
26606
+ contextTracker: trackVariables(context),
26607
+ dialect: dialect
26128
26608
  }).parse(expression);
26129
26609
  }
26130
26610
  var SyntaxError$1 = /*#__PURE__*/ function(Error1) {
@@ -26193,8 +26673,8 @@ var Interpreter = /*#__PURE__*/ function() {
26193
26673
  {
26194
26674
  key: "evaluate",
26195
26675
  value: function evaluate(expression) {
26196
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
26197
- var parseTree = parseExpression(expression, context);
26676
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
26677
+ var parseTree = parseExpression(expression, context, dialect);
26198
26678
  var root = this._buildExecutionTree(parseTree, expression);
26199
26679
  return {
26200
26680
  parseTree: parseTree,
@@ -26205,8 +26685,8 @@ var Interpreter = /*#__PURE__*/ function() {
26205
26685
  {
26206
26686
  key: "unaryTest",
26207
26687
  value: function unaryTest(expression) {
26208
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
26209
- var parseTree = parseUnaryTests(expression, context);
26688
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
26689
+ var parseTree = parseUnaryTests(expression, context, dialect);
26210
26690
  var root = this._buildExecutionTree(parseTree, expression);
26211
26691
  return {
26212
26692
  parseTree: parseTree,
@@ -26220,8 +26700,8 @@ var Interpreter = /*#__PURE__*/ function() {
26220
26700
  var interpreter = new Interpreter();
26221
26701
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
26222
26702
  function evaluate(expression) {
26223
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
26224
- var root = interpreter.evaluate(expression, context).root;
26703
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
26704
+ var root = interpreter.evaluate(expression, context, dialect).root;
26225
26705
  // root = Expression :: fn(ctx)
26226
26706
  return root(context);
26227
26707
  }
@@ -26264,6 +26744,12 @@ function evalNode(node, input, args) {
26264
26744
  switch(input){
26265
26745
  case "+":
26266
26746
  return nullable(function(a, b) {
26747
+ // flip these as luxon operations with durations aren't commutative
26748
+ if (isDuration(a) && !isDuration(b)) {
26749
+ var tmp = a;
26750
+ a = b;
26751
+ b = tmp;
26752
+ }
26267
26753
  if (isType(a, "time") && isDuration(b)) {
26268
26754
  return a.plus(b).set({
26269
26755
  year: 1900,
@@ -26357,6 +26843,8 @@ function evalNode(node, input, args) {
26357
26843
  };
26358
26844
  }
26359
26845
  }, Test("boolean"));
26846
+ case "BacktickIdentifier":
26847
+ return input.replace(/`/g, "");
26360
26848
  case "Wildcard":
26361
26849
  return function(_context) {
26362
26850
  return true;
@@ -26830,7 +27318,7 @@ function evalNode(node, input, args) {
26830
27318
  if (isNumber(value)) {
26831
27319
  filterFn.type = "number";
26832
27320
  }
26833
- } catch (err) {
27321
+ } catch (_err) {
26834
27322
  // ignore
26835
27323
  }
26836
27324
  }
@@ -27293,7 +27781,6 @@ function parseString(str) {
27293
27781
  if (str.endsWith('"')) {
27294
27782
  str = str.slice(0, -1);
27295
27783
  }
27296
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
27297
27784
  return str.replace(/(\\")|(\\\\)|(\\u[a-fA-F0-9]{5,6})|((?:\\u[a-fA-F0-9]{1,4})+)/ig, function(substring) {
27298
27785
  for(var _len = arguments.length, groups = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
27299
27786
  groups[_key - 1] = arguments[_key];
@@ -27765,23 +28252,46 @@ function _create_super$15(Derived) {
27765
28252
  };
27766
28253
  }
27767
28254
  var _Buffer_prototype;
28255
+ var map$1 = new WeakMap();
28256
+ var TYPES = {
28257
+ ArrayBuffer: "[object ArrayBuffer]",
28258
+ SharedArrayBuffer: "[object SharedArrayBuffer]",
28259
+ Uint8Array: "[object Uint8Array]",
28260
+ BigInt64Array: "[object BigInt64Array]",
28261
+ BigUint64Array: "[object BigUint64Array]",
28262
+ RegExp: "[object RegExp]",
28263
+ Map: "[object Map]",
28264
+ Date: "[object Date]"
28265
+ };
28266
+ function getPrototypeString(value) {
28267
+ var str = map$1.get(value);
28268
+ if (!str) {
28269
+ str = Object.prototype.toString.call(value);
28270
+ if (value !== null && typeof value === "object") {
28271
+ map$1.set(value, str);
28272
+ }
28273
+ }
28274
+ return str;
28275
+ }
27768
28276
  function isAnyArrayBuffer(value) {
27769
- return [
27770
- "[object ArrayBuffer]",
27771
- "[object SharedArrayBuffer]"
27772
- ].includes(Object.prototype.toString.call(value));
28277
+ var type = getPrototypeString(value);
28278
+ return type === TYPES.ArrayBuffer || type === TYPES.SharedArrayBuffer;
27773
28279
  }
27774
28280
  function isUint8Array(value) {
27775
- return Object.prototype.toString.call(value) === "[object Uint8Array]";
28281
+ var type = getPrototypeString(value);
28282
+ return type === TYPES.Uint8Array;
27776
28283
  }
27777
28284
  function isRegExp(d) {
27778
- return Object.prototype.toString.call(d) === "[object RegExp]";
28285
+ var type = getPrototypeString(d);
28286
+ return type === TYPES.RegExp;
27779
28287
  }
27780
28288
  function isMap$1(d) {
27781
- return Object.prototype.toString.call(d) === "[object Map]";
28289
+ var type = getPrototypeString(d);
28290
+ return type === TYPES.Map;
27782
28291
  }
27783
28292
  function isDate(d) {
27784
- return Object.prototype.toString.call(d) === "[object Date]";
28293
+ var type = getPrototypeString(d);
28294
+ return type === TYPES.Date;
27785
28295
  }
27786
28296
  function defaultInspect(x, _options) {
27787
28297
  return JSON.stringify(x, function(k, v) {
@@ -27802,6 +28312,7 @@ function getStylizeFunction(options) {
27802
28312
  }
27803
28313
  }
27804
28314
  var BSON_MAJOR_VERSION = 6;
28315
+ var BSON_VERSION_SYMBOL = Symbol.for("@@mdb.bson.version");
27805
28316
  var BSON_INT32_MAX = 0x7fffffff;
27806
28317
  var BSON_INT32_MIN = -0x80000000;
27807
28318
  var BSON_INT64_MAX = Math.pow(2, 63) - 1;
@@ -28220,7 +28731,7 @@ var BSONValue = /*#__PURE__*/ function() {
28220
28731
  }
28221
28732
  _create_class$1s(BSONValue, [
28222
28733
  {
28223
- key: Symbol.for("@@mdb.bson.version"),
28734
+ key: BSON_VERSION_SYMBOL,
28224
28735
  get: function get() {
28225
28736
  return BSON_MAJOR_VERSION;
28226
28737
  }
@@ -30007,7 +30518,7 @@ var Decimal128 = /*#__PURE__*/ function(BSONValue) {
30007
30518
  _this = _super.call(this);
30008
30519
  if (typeof bytes === "string") {
30009
30520
  _this.bytes = Decimal128.fromString(bytes).bytes;
30010
- } else if (isUint8Array(bytes)) {
30521
+ } else if (_instanceof$o(bytes, Uint8Array) || isUint8Array(bytes)) {
30011
30522
  if (bytes.byteLength !== 16) {
30012
30523
  throw new BSONError("Decimal128 must take a Buffer of 16 bytes");
30013
30524
  }
@@ -30806,7 +31317,7 @@ var NumberUtils = {
30806
31317
  return 4;
30807
31318
  },
30808
31319
  setBigInt64LE: function setBigInt64LE(destination, offset, value) {
30809
- var mask32bits = BigInt(4294967295);
31320
+ var mask32bits = BigInt(0xffffffff);
30810
31321
  var lo = Number(value & mask32bits);
30811
31322
  destination[offset] = lo;
30812
31323
  lo >>= 8;
@@ -30849,7 +31360,6 @@ var NumberUtils = {
30849
31360
  return 8;
30850
31361
  }
30851
31362
  };
30852
- var checkForHexRegExp = new RegExp("^[0-9a-fA-F]{24}$");
30853
31363
  var PROCESS_UNIQUE = null;
30854
31364
  var ObjectId = /*#__PURE__*/ function(BSONValue) {
30855
31365
  _inherits$15(ObjectId, BSONValue);
@@ -30876,7 +31386,7 @@ var ObjectId = /*#__PURE__*/ function(BSONValue) {
30876
31386
  } else if (ArrayBuffer.isView(workingId) && workingId.byteLength === 12) {
30877
31387
  _this.buffer = ByteUtils.toLocalBufferType(workingId);
30878
31388
  } else if (typeof workingId === "string") {
30879
- if (workingId.length === 24 && checkForHexRegExp.test(workingId)) {
31389
+ if (ObjectId.validateHexString(workingId)) {
30880
31390
  _this.buffer = ByteUtils.fromHex(workingId);
30881
31391
  } else {
30882
31392
  throw new BSONError("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");
@@ -31001,6 +31511,20 @@ var ObjectId = /*#__PURE__*/ function(BSONValue) {
31001
31511
  }
31002
31512
  }
31003
31513
  ], [
31514
+ {
31515
+ key: "validateHexString",
31516
+ value: function validateHexString(string) {
31517
+ if ((string === null || string === void 0 ? void 0 : string.length) !== 24) return false;
31518
+ for(var i = 0; i < 24; i++){
31519
+ var char = string.charCodeAt(i);
31520
+ if (char >= 48 && char <= 57 || char >= 97 && char <= 102 || char >= 65 && char <= 70) {
31521
+ continue;
31522
+ }
31523
+ return false;
31524
+ }
31525
+ return true;
31526
+ }
31527
+ },
31004
31528
  {
31005
31529
  key: "getInc",
31006
31530
  value: function getInc() {
@@ -31073,6 +31597,7 @@ var ObjectId = /*#__PURE__*/ function(BSONValue) {
31073
31597
  key: "isValid",
31074
31598
  value: function isValid(id) {
31075
31599
  if (id == null) return false;
31600
+ if (typeof id === "string") return ObjectId.validateHexString(id);
31076
31601
  try {
31077
31602
  new ObjectId(id);
31078
31603
  return true;
@@ -31148,7 +31673,7 @@ function calculateElement(name, value) {
31148
31673
  case "boolean":
31149
31674
  return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 1);
31150
31675
  case "object":
31151
- if (value != null && typeof value._bsontype === "string" && value[Symbol.for("@@mdb.bson.version")] !== BSON_MAJOR_VERSION) {
31676
+ if (value != null && typeof value._bsontype === "string" && value[BSON_VERSION_SYMBOL] !== BSON_MAJOR_VERSION) {
31152
31677
  throw new BSONVersionError();
31153
31678
  } else if (value == null || value._bsontype === "MinKey" || value._bsontype === "MaxKey") {
31154
31679
  return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
@@ -31379,10 +31904,10 @@ var Timestamp = /*#__PURE__*/ function(LongWithoutOverridesClass) {
31379
31904
  if (i < 0 || Number.isNaN(i)) {
31380
31905
  throw new BSONError("Timestamp constructed from { t, i } must provide a positive i");
31381
31906
  }
31382
- if (t > 4294967295) {
31907
+ if (t > 0xffffffff) {
31383
31908
  throw new BSONError("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");
31384
31909
  }
31385
- if (i > 4294967295) {
31910
+ if (i > 0xffffffff) {
31386
31911
  throw new BSONError("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");
31387
31912
  }
31388
31913
  _this = _super.call(this, i, t, true);
@@ -31398,6 +31923,18 @@ var Timestamp = /*#__PURE__*/ function(LongWithoutOverridesClass) {
31398
31923
  return "Timestamp";
31399
31924
  }
31400
31925
  },
31926
+ {
31927
+ key: "i",
31928
+ get: function get() {
31929
+ return this.low >>> 0;
31930
+ }
31931
+ },
31932
+ {
31933
+ key: "t",
31934
+ get: function get() {
31935
+ return this.high >>> 0;
31936
+ }
31937
+ },
31401
31938
  {
31402
31939
  key: "toJSON",
31403
31940
  value: function toJSON() {
@@ -31411,8 +31948,8 @@ var Timestamp = /*#__PURE__*/ function(LongWithoutOverridesClass) {
31411
31948
  value: function toExtendedJSON() {
31412
31949
  return {
31413
31950
  $timestamp: {
31414
- t: this.high >>> 0,
31415
- i: this.low >>> 0
31951
+ t: this.t,
31952
+ i: this.i
31416
31953
  }
31417
31954
  };
31418
31955
  }
@@ -31421,8 +31958,8 @@ var Timestamp = /*#__PURE__*/ function(LongWithoutOverridesClass) {
31421
31958
  key: "inspect",
31422
31959
  value: function inspect(depth, options, inspect) {
31423
31960
  inspect !== null && inspect !== void 0 ? inspect : inspect = defaultInspect;
31424
- var t = inspect(this.high >>> 0, options);
31425
- var i = inspect(this.low >>> 0, options);
31961
+ var t = inspect(this.t, options);
31962
+ var i = inspect(this.i, options);
31426
31963
  return "new Timestamp({ t: ".concat(t, ", i: ").concat(i, " })");
31427
31964
  }
31428
31965
  }
@@ -32177,54 +32714,59 @@ function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializ
32177
32714
  if (typeof (value === null || value === void 0 ? void 0 : value.toBSON) === "function") {
32178
32715
  value = value.toBSON();
32179
32716
  }
32180
- if (typeof value === "string") {
32717
+ var type = typeof value === "undefined" ? "undefined" : _type_of$17(value);
32718
+ if (value === undefined) {
32719
+ index = serializeNull(buffer, key, value, index);
32720
+ } else if (value === null) {
32721
+ index = serializeNull(buffer, key, value, index);
32722
+ } else if (type === "string") {
32181
32723
  index = serializeString(buffer, key, value, index);
32182
- } else if (typeof value === "number") {
32724
+ } else if (type === "number") {
32183
32725
  index = serializeNumber(buffer, key, value, index);
32184
- } else if ((typeof value === "undefined" ? "undefined" : _type_of$17(value)) === "bigint") {
32726
+ } else if (type === "bigint") {
32185
32727
  index = serializeBigInt(buffer, key, value, index);
32186
- } else if (typeof value === "boolean") {
32728
+ } else if (type === "boolean") {
32187
32729
  index = serializeBoolean(buffer, key, value, index);
32188
- } else if (_instanceof$o(value, Date) || isDate(value)) {
32189
- index = serializeDate(buffer, key, value, index);
32190
- } else if (value === undefined) {
32191
- index = serializeNull(buffer, key, value, index);
32192
- } else if (value === null) {
32193
- index = serializeNull(buffer, key, value, index);
32194
- } else if (isUint8Array(value)) {
32195
- index = serializeBuffer(buffer, key, value, index);
32196
- } else if (_instanceof$o(value, RegExp) || isRegExp(value)) {
32197
- index = serializeRegExp(buffer, key, value, index);
32198
- } else if (typeof value === "object" && value._bsontype == null) {
32199
- index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32200
- } else if (typeof value === "object" && value[Symbol.for("@@mdb.bson.version")] !== BSON_MAJOR_VERSION) {
32201
- throw new BSONVersionError();
32202
- } else if (value._bsontype === "ObjectId") {
32203
- index = serializeObjectId(buffer, key, value, index);
32204
- } else if (value._bsontype === "Decimal128") {
32205
- index = serializeDecimal128(buffer, key, value, index);
32206
- } else if (value._bsontype === "Long" || value._bsontype === "Timestamp") {
32207
- index = serializeLong(buffer, key, value, index);
32208
- } else if (value._bsontype === "Double") {
32209
- index = serializeDouble(buffer, key, value, index);
32210
- } else if (typeof value === "function" && serializeFunctions) {
32730
+ } else if (type === "object" && value._bsontype == null) {
32731
+ if (_instanceof$o(value, Date) || isDate(value)) {
32732
+ index = serializeDate(buffer, key, value, index);
32733
+ } else if (_instanceof$o(value, Uint8Array) || isUint8Array(value)) {
32734
+ index = serializeBuffer(buffer, key, value, index);
32735
+ } else if (_instanceof$o(value, RegExp) || isRegExp(value)) {
32736
+ index = serializeRegExp(buffer, key, value, index);
32737
+ } else {
32738
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32739
+ }
32740
+ } else if (type === "object") {
32741
+ if (value[BSON_VERSION_SYMBOL] !== BSON_MAJOR_VERSION) {
32742
+ throw new BSONVersionError();
32743
+ } else if (value._bsontype === "ObjectId") {
32744
+ index = serializeObjectId(buffer, key, value, index);
32745
+ } else if (value._bsontype === "Decimal128") {
32746
+ index = serializeDecimal128(buffer, key, value, index);
32747
+ } else if (value._bsontype === "Long" || value._bsontype === "Timestamp") {
32748
+ index = serializeLong(buffer, key, value, index);
32749
+ } else if (value._bsontype === "Double") {
32750
+ index = serializeDouble(buffer, key, value, index);
32751
+ } else if (value._bsontype === "Code") {
32752
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32753
+ } else if (value._bsontype === "Binary") {
32754
+ index = serializeBinary(buffer, key, value, index);
32755
+ } else if (value._bsontype === "BSONSymbol") {
32756
+ index = serializeSymbol(buffer, key, value, index);
32757
+ } else if (value._bsontype === "DBRef") {
32758
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
32759
+ } else if (value._bsontype === "BSONRegExp") {
32760
+ index = serializeBSONRegExp(buffer, key, value, index);
32761
+ } else if (value._bsontype === "Int32") {
32762
+ index = serializeInt32(buffer, key, value, index);
32763
+ } else if (value._bsontype === "MinKey" || value._bsontype === "MaxKey") {
32764
+ index = serializeMinMax(buffer, key, value, index);
32765
+ } else if (typeof value._bsontype !== "undefined") {
32766
+ throw new BSONError("Unrecognized or invalid _bsontype: ".concat(String(value._bsontype)));
32767
+ }
32768
+ } else if (type === "function" && serializeFunctions) {
32211
32769
  index = serializeFunction(buffer, key, value, index);
32212
- } else if (value._bsontype === "Code") {
32213
- index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32214
- } else if (value._bsontype === "Binary") {
32215
- index = serializeBinary(buffer, key, value, index);
32216
- } else if (value._bsontype === "BSONSymbol") {
32217
- index = serializeSymbol(buffer, key, value, index);
32218
- } else if (value._bsontype === "DBRef") {
32219
- index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
32220
- } else if (value._bsontype === "BSONRegExp") {
32221
- index = serializeBSONRegExp(buffer, key, value, index);
32222
- } else if (value._bsontype === "Int32") {
32223
- index = serializeInt32(buffer, key, value, index);
32224
- } else if (value._bsontype === "MinKey" || value._bsontype === "MaxKey") {
32225
- index = serializeMinMax(buffer, key, value, index);
32226
- } else if (typeof value._bsontype !== "undefined") {
32227
- throw new BSONError("Unrecognized or invalid _bsontype: ".concat(String(value._bsontype)));
32228
32770
  }
32229
32771
  }
32230
32772
  } else if (_instanceof$o(object, Map) || isMap$1(object)) {
@@ -32239,7 +32781,7 @@ function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializ
32239
32781
  if (typeof (value1 === null || value1 === void 0 ? void 0 : value1.toBSON) === "function") {
32240
32782
  value1 = value1.toBSON();
32241
32783
  }
32242
- var type = typeof value1 === "undefined" ? "undefined" : _type_of$17(value1);
32784
+ var type1 = typeof value1 === "undefined" ? "undefined" : _type_of$17(value1);
32243
32785
  if (typeof key1 === "string" && !ignoreKeys.has(key1)) {
32244
32786
  if (key1.match(regexp) != null) {
32245
32787
  throw new BSONError("key " + key1 + " must not contain null bytes");
@@ -32252,52 +32794,58 @@ function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializ
32252
32794
  }
32253
32795
  }
32254
32796
  }
32255
- if (type === "string") {
32797
+ if (value1 === undefined) {
32798
+ if (ignoreUndefined === false) index = serializeNull(buffer, key1, value1, index);
32799
+ } else if (value1 === null) {
32800
+ index = serializeNull(buffer, key1, value1, index);
32801
+ } else if (type1 === "string") {
32256
32802
  index = serializeString(buffer, key1, value1, index);
32257
- } else if (type === "number") {
32803
+ } else if (type1 === "number") {
32258
32804
  index = serializeNumber(buffer, key1, value1, index);
32259
- } else if (type === "bigint") {
32805
+ } else if (type1 === "bigint") {
32260
32806
  index = serializeBigInt(buffer, key1, value1, index);
32261
- } else if (type === "boolean") {
32807
+ } else if (type1 === "boolean") {
32262
32808
  index = serializeBoolean(buffer, key1, value1, index);
32263
- } else if (_instanceof$o(value1, Date) || isDate(value1)) {
32264
- index = serializeDate(buffer, key1, value1, index);
32265
- } else if (value1 === null || value1 === undefined && ignoreUndefined === false) {
32266
- index = serializeNull(buffer, key1, value1, index);
32267
- } else if (isUint8Array(value1)) {
32268
- index = serializeBuffer(buffer, key1, value1, index);
32269
- } else if (_instanceof$o(value1, RegExp) || isRegExp(value1)) {
32270
- index = serializeRegExp(buffer, key1, value1, index);
32271
- } else if (type === "object" && value1._bsontype == null) {
32272
- index = serializeObject(buffer, key1, value1, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32273
- } else if (typeof value1 === "object" && value1[Symbol.for("@@mdb.bson.version")] !== BSON_MAJOR_VERSION) {
32274
- throw new BSONVersionError();
32275
- } else if (value1._bsontype === "ObjectId") {
32276
- index = serializeObjectId(buffer, key1, value1, index);
32277
- } else if (type === "object" && value1._bsontype === "Decimal128") {
32278
- index = serializeDecimal128(buffer, key1, value1, index);
32279
- } else if (value1._bsontype === "Long" || value1._bsontype === "Timestamp") {
32280
- index = serializeLong(buffer, key1, value1, index);
32281
- } else if (value1._bsontype === "Double") {
32282
- index = serializeDouble(buffer, key1, value1, index);
32283
- } else if (value1._bsontype === "Code") {
32284
- index = serializeCode(buffer, key1, value1, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32285
- } else if (typeof value1 === "function" && serializeFunctions) {
32809
+ } else if (type1 === "object" && value1._bsontype == null) {
32810
+ if (_instanceof$o(value1, Date) || isDate(value1)) {
32811
+ index = serializeDate(buffer, key1, value1, index);
32812
+ } else if (_instanceof$o(value1, Uint8Array) || isUint8Array(value1)) {
32813
+ index = serializeBuffer(buffer, key1, value1, index);
32814
+ } else if (_instanceof$o(value1, RegExp) || isRegExp(value1)) {
32815
+ index = serializeRegExp(buffer, key1, value1, index);
32816
+ } else {
32817
+ index = serializeObject(buffer, key1, value1, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32818
+ }
32819
+ } else if (type1 === "object") {
32820
+ if (value1[BSON_VERSION_SYMBOL] !== BSON_MAJOR_VERSION) {
32821
+ throw new BSONVersionError();
32822
+ } else if (value1._bsontype === "ObjectId") {
32823
+ index = serializeObjectId(buffer, key1, value1, index);
32824
+ } else if (value1._bsontype === "Decimal128") {
32825
+ index = serializeDecimal128(buffer, key1, value1, index);
32826
+ } else if (value1._bsontype === "Long" || value1._bsontype === "Timestamp") {
32827
+ index = serializeLong(buffer, key1, value1, index);
32828
+ } else if (value1._bsontype === "Double") {
32829
+ index = serializeDouble(buffer, key1, value1, index);
32830
+ } else if (value1._bsontype === "Code") {
32831
+ index = serializeCode(buffer, key1, value1, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32832
+ } else if (value1._bsontype === "Binary") {
32833
+ index = serializeBinary(buffer, key1, value1, index);
32834
+ } else if (value1._bsontype === "BSONSymbol") {
32835
+ index = serializeSymbol(buffer, key1, value1, index);
32836
+ } else if (value1._bsontype === "DBRef") {
32837
+ index = serializeDBRef(buffer, key1, value1, index, depth, serializeFunctions, path);
32838
+ } else if (value1._bsontype === "BSONRegExp") {
32839
+ index = serializeBSONRegExp(buffer, key1, value1, index);
32840
+ } else if (value1._bsontype === "Int32") {
32841
+ index = serializeInt32(buffer, key1, value1, index);
32842
+ } else if (value1._bsontype === "MinKey" || value1._bsontype === "MaxKey") {
32843
+ index = serializeMinMax(buffer, key1, value1, index);
32844
+ } else if (typeof value1._bsontype !== "undefined") {
32845
+ throw new BSONError("Unrecognized or invalid _bsontype: ".concat(String(value1._bsontype)));
32846
+ }
32847
+ } else if (type1 === "function" && serializeFunctions) {
32286
32848
  index = serializeFunction(buffer, key1, value1, index);
32287
- } else if (value1._bsontype === "Binary") {
32288
- index = serializeBinary(buffer, key1, value1, index);
32289
- } else if (value1._bsontype === "BSONSymbol") {
32290
- index = serializeSymbol(buffer, key1, value1, index);
32291
- } else if (value1._bsontype === "DBRef") {
32292
- index = serializeDBRef(buffer, key1, value1, index, depth, serializeFunctions, path);
32293
- } else if (value1._bsontype === "BSONRegExp") {
32294
- index = serializeBSONRegExp(buffer, key1, value1, index);
32295
- } else if (value1._bsontype === "Int32") {
32296
- index = serializeInt32(buffer, key1, value1, index);
32297
- } else if (value1._bsontype === "MinKey" || value1._bsontype === "MaxKey") {
32298
- index = serializeMinMax(buffer, key1, value1, index);
32299
- } else if (typeof value1._bsontype !== "undefined") {
32300
- throw new BSONError("Unrecognized or invalid _bsontype: ".concat(String(value1._bsontype)));
32301
32849
  }
32302
32850
  }
32303
32851
  } else {
@@ -32315,7 +32863,7 @@ function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializ
32315
32863
  if (typeof (value2 === null || value2 === void 0 ? void 0 : value2.toBSON) === "function") {
32316
32864
  value2 = value2.toBSON();
32317
32865
  }
32318
- var type1 = typeof value2 === "undefined" ? "undefined" : _type_of$17(value2);
32866
+ var type2 = typeof value2 === "undefined" ? "undefined" : _type_of$17(value2);
32319
32867
  if (typeof key2 === "string" && !ignoreKeys.has(key2)) {
32320
32868
  if (key2.match(regexp) != null) {
32321
32869
  throw new BSONError("key " + key2 + " must not contain null bytes");
@@ -32328,54 +32876,58 @@ function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializ
32328
32876
  }
32329
32877
  }
32330
32878
  }
32331
- if (type1 === "string") {
32879
+ if (value2 === undefined) {
32880
+ if (ignoreUndefined === false) index = serializeNull(buffer, key2, value2, index);
32881
+ } else if (value2 === null) {
32882
+ index = serializeNull(buffer, key2, value2, index);
32883
+ } else if (type2 === "string") {
32332
32884
  index = serializeString(buffer, key2, value2, index);
32333
- } else if (type1 === "number") {
32885
+ } else if (type2 === "number") {
32334
32886
  index = serializeNumber(buffer, key2, value2, index);
32335
- } else if (type1 === "bigint") {
32887
+ } else if (type2 === "bigint") {
32336
32888
  index = serializeBigInt(buffer, key2, value2, index);
32337
- } else if (type1 === "boolean") {
32889
+ } else if (type2 === "boolean") {
32338
32890
  index = serializeBoolean(buffer, key2, value2, index);
32339
- } else if (_instanceof$o(value2, Date) || isDate(value2)) {
32340
- index = serializeDate(buffer, key2, value2, index);
32341
- } else if (value2 === undefined) {
32342
- if (ignoreUndefined === false) index = serializeNull(buffer, key2, value2, index);
32343
- } else if (value2 === null) {
32344
- index = serializeNull(buffer, key2, value2, index);
32345
- } else if (isUint8Array(value2)) {
32346
- index = serializeBuffer(buffer, key2, value2, index);
32347
- } else if (_instanceof$o(value2, RegExp) || isRegExp(value2)) {
32348
- index = serializeRegExp(buffer, key2, value2, index);
32349
- } else if (type1 === "object" && value2._bsontype == null) {
32350
- index = serializeObject(buffer, key2, value2, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32351
- } else if (typeof value2 === "object" && value2[Symbol.for("@@mdb.bson.version")] !== BSON_MAJOR_VERSION) {
32352
- throw new BSONVersionError();
32353
- } else if (value2._bsontype === "ObjectId") {
32354
- index = serializeObjectId(buffer, key2, value2, index);
32355
- } else if (type1 === "object" && value2._bsontype === "Decimal128") {
32356
- index = serializeDecimal128(buffer, key2, value2, index);
32357
- } else if (value2._bsontype === "Long" || value2._bsontype === "Timestamp") {
32358
- index = serializeLong(buffer, key2, value2, index);
32359
- } else if (value2._bsontype === "Double") {
32360
- index = serializeDouble(buffer, key2, value2, index);
32361
- } else if (value2._bsontype === "Code") {
32362
- index = serializeCode(buffer, key2, value2, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32363
- } else if (typeof value2 === "function" && serializeFunctions) {
32891
+ } else if (type2 === "object" && value2._bsontype == null) {
32892
+ if (_instanceof$o(value2, Date) || isDate(value2)) {
32893
+ index = serializeDate(buffer, key2, value2, index);
32894
+ } else if (_instanceof$o(value2, Uint8Array) || isUint8Array(value2)) {
32895
+ index = serializeBuffer(buffer, key2, value2, index);
32896
+ } else if (_instanceof$o(value2, RegExp) || isRegExp(value2)) {
32897
+ index = serializeRegExp(buffer, key2, value2, index);
32898
+ } else {
32899
+ index = serializeObject(buffer, key2, value2, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32900
+ }
32901
+ } else if (type2 === "object") {
32902
+ if (value2[BSON_VERSION_SYMBOL] !== BSON_MAJOR_VERSION) {
32903
+ throw new BSONVersionError();
32904
+ } else if (value2._bsontype === "ObjectId") {
32905
+ index = serializeObjectId(buffer, key2, value2, index);
32906
+ } else if (value2._bsontype === "Decimal128") {
32907
+ index = serializeDecimal128(buffer, key2, value2, index);
32908
+ } else if (value2._bsontype === "Long" || value2._bsontype === "Timestamp") {
32909
+ index = serializeLong(buffer, key2, value2, index);
32910
+ } else if (value2._bsontype === "Double") {
32911
+ index = serializeDouble(buffer, key2, value2, index);
32912
+ } else if (value2._bsontype === "Code") {
32913
+ index = serializeCode(buffer, key2, value2, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
32914
+ } else if (value2._bsontype === "Binary") {
32915
+ index = serializeBinary(buffer, key2, value2, index);
32916
+ } else if (value2._bsontype === "BSONSymbol") {
32917
+ index = serializeSymbol(buffer, key2, value2, index);
32918
+ } else if (value2._bsontype === "DBRef") {
32919
+ index = serializeDBRef(buffer, key2, value2, index, depth, serializeFunctions, path);
32920
+ } else if (value2._bsontype === "BSONRegExp") {
32921
+ index = serializeBSONRegExp(buffer, key2, value2, index);
32922
+ } else if (value2._bsontype === "Int32") {
32923
+ index = serializeInt32(buffer, key2, value2, index);
32924
+ } else if (value2._bsontype === "MinKey" || value2._bsontype === "MaxKey") {
32925
+ index = serializeMinMax(buffer, key2, value2, index);
32926
+ } else if (typeof value2._bsontype !== "undefined") {
32927
+ throw new BSONError("Unrecognized or invalid _bsontype: ".concat(String(value2._bsontype)));
32928
+ }
32929
+ } else if (type2 === "function" && serializeFunctions) {
32364
32930
  index = serializeFunction(buffer, key2, value2, index);
32365
- } else if (value2._bsontype === "Binary") {
32366
- index = serializeBinary(buffer, key2, value2, index);
32367
- } else if (value2._bsontype === "BSONSymbol") {
32368
- index = serializeSymbol(buffer, key2, value2, index);
32369
- } else if (value2._bsontype === "DBRef") {
32370
- index = serializeDBRef(buffer, key2, value2, index, depth, serializeFunctions, path);
32371
- } else if (value2._bsontype === "BSONRegExp") {
32372
- index = serializeBSONRegExp(buffer, key2, value2, index);
32373
- } else if (value2._bsontype === "Int32") {
32374
- index = serializeInt32(buffer, key2, value2, index);
32375
- } else if (value2._bsontype === "MinKey" || value2._bsontype === "MaxKey") {
32376
- index = serializeMinMax(buffer, key2, value2, index);
32377
- } else if (typeof value2._bsontype !== "undefined") {
32378
- throw new BSONError("Unrecognized or invalid _bsontype: ".concat(String(value2._bsontype)));
32379
32931
  }
32380
32932
  }
32381
32933
  } catch (err) {
@@ -32699,7 +33251,7 @@ function serializeDocument(doc, options) {
32699
33251
  }
32700
33252
  }
32701
33253
  return _doc;
32702
- } else if (doc != null && typeof doc === "object" && typeof doc._bsontype === "string" && doc[Symbol.for("@@mdb.bson.version")] !== BSON_MAJOR_VERSION) {
33254
+ } else if (doc != null && typeof doc === "object" && typeof doc._bsontype === "string" && doc[BSON_VERSION_SYMBOL] !== BSON_MAJOR_VERSION) {
32703
33255
  throw new BSONVersionError();
32704
33256
  } else if (isBSONType(doc)) {
32705
33257
  var outDoc = doc;
@@ -54463,7 +55015,7 @@ function RequestSigner(request, credentials) {
54463
55015
  this.extraHeadersToInclude = request.extraHeadersToInclude || Object.create(null);
54464
55016
  }
54465
55017
  RequestSigner.prototype.matchHost = function(host) {
54466
- var match = (host || "").match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/);
55018
+ var match = (host || "").match(/([^\.]{1,63})\.(?:([^\.]{0,63})\.)?amazonaws\.com(\.cn)?$/);
54467
55019
  var hostParts = (match || []).slice(1, 3);
54468
55020
  // ES's hostParts are sometimes the other way round, if the value that is expected
54469
55021
  // to be region equals ‘es’ switch them back
@@ -54632,26 +55184,30 @@ RequestSigner.prototype.canonicalString = function() {
54632
55184
  bodyHash
54633
55185
  ].join("\n");
54634
55186
  };
54635
- RequestSigner.prototype.canonicalHeaders = function() {
54636
- var headers = this.request.headers;
54637
- function trimAll(header) {
54638
- return header.toString().trim().replace(/\s+/g, " ");
54639
- }
54640
- return Object.keys(headers).filter(function(key) {
54641
- return HEADERS_TO_IGNORE[key.toLowerCase()] == null;
55187
+ RequestSigner.prototype.filterHeaders = function() {
55188
+ var headers = this.request.headers, extraHeadersToInclude = this.extraHeadersToInclude, extraHeadersToIgnore = this.extraHeadersToIgnore;
55189
+ this.filteredHeaders = Object.keys(headers).map(function(key) {
55190
+ return [
55191
+ key.toLowerCase(),
55192
+ headers[key]
55193
+ ];
55194
+ }).filter(function(entry) {
55195
+ return extraHeadersToInclude[entry[0]] || HEADERS_TO_IGNORE[entry[0]] == null && !extraHeadersToIgnore[entry[0]];
54642
55196
  }).sort(function(a, b) {
54643
- return a.toLowerCase() < b.toLowerCase() ? -1 : 1;
54644
- }).map(function(key) {
54645
- return key.toLowerCase() + ":" + trimAll(headers[key]);
55197
+ return a[0] < b[0] ? -1 : 1;
55198
+ });
55199
+ };
55200
+ RequestSigner.prototype.canonicalHeaders = function() {
55201
+ if (!this.filteredHeaders) this.filterHeaders();
55202
+ return this.filteredHeaders.map(function(entry) {
55203
+ return entry[0] + ":" + entry[1].toString().trim().replace(/\s+/g, " ");
54646
55204
  }).join("\n");
54647
55205
  };
54648
55206
  RequestSigner.prototype.signedHeaders = function() {
54649
- var extraHeadersToInclude = this.extraHeadersToInclude, extraHeadersToIgnore = this.extraHeadersToIgnore;
54650
- return Object.keys(this.request.headers).map(function(key) {
54651
- return key.toLowerCase();
54652
- }).filter(function(key) {
54653
- return extraHeadersToInclude[key] || HEADERS_TO_IGNORE[key] == null && !extraHeadersToIgnore[key];
54654
- }).sort().join(";");
55207
+ if (!this.filteredHeaders) this.filterHeaders();
55208
+ return this.filteredHeaders.map(function(entry) {
55209
+ return entry[0];
55210
+ }).join(";");
54655
55211
  };
54656
55212
  RequestSigner.prototype.credentialString = function() {
54657
55213
  return [