@learncard/learn-card-plugin 1.0.5 → 1.0.6

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.
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
 
4
- // ../../../node_modules/.pnpm/zod@3.20.6/node_modules/zod/lib/index.mjs
4
+ // ../../../node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs
5
5
  var util;
6
6
  (function(util2) {
7
7
  util2.assertEqual = (val) => val;
@@ -22,16 +22,16 @@ var util;
22
22
  return obj;
23
23
  };
24
24
  util2.getValidEnumValues = (obj) => {
25
- const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
25
+ const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
26
26
  const filtered = {};
27
- for (const k2 of validKeys) {
28
- filtered[k2] = obj[k2];
27
+ for (const k of validKeys) {
28
+ filtered[k] = obj[k];
29
29
  }
30
30
  return util2.objectValues(filtered);
31
31
  };
32
32
  util2.objectValues = (obj) => {
33
- return util2.objectKeys(obj).map(function(e2) {
34
- return obj[e2];
33
+ return util2.objectKeys(obj).map(function(e) {
34
+ return obj[e];
35
35
  });
36
36
  };
37
37
  util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
@@ -86,8 +86,8 @@ var ZodParsedType = util.arrayToEnum([
86
86
  "set"
87
87
  ]);
88
88
  var getParsedType = /* @__PURE__ */ __name((data) => {
89
- const t2 = typeof data;
90
- switch (t2) {
89
+ const t = typeof data;
90
+ switch (t) {
91
91
  case "undefined":
92
92
  return ZodParsedType.undefined;
93
93
  case "string":
@@ -187,10 +187,10 @@ var ZodError = class extends Error {
187
187
  fieldErrors._errors.push(mapper(issue));
188
188
  } else {
189
189
  let curr = fieldErrors;
190
- let i2 = 0;
191
- while (i2 < issue.path.length) {
192
- const el = issue.path[i2];
193
- const terminal = i2 === issue.path.length - 1;
190
+ let i = 0;
191
+ while (i < issue.path.length) {
192
+ const el = issue.path[i];
193
+ const terminal = i === issue.path.length - 1;
194
194
  if (!terminal) {
195
195
  curr[el] = curr[el] || { _errors: [] };
196
196
  } else {
@@ -198,7 +198,7 @@ var ZodError = class extends Error {
198
198
  curr[el]._errors.push(mapper(issue));
199
199
  }
200
200
  curr = curr[el];
201
- i2++;
201
+ i++;
202
202
  }
203
203
  }
204
204
  }
@@ -345,7 +345,7 @@ var makeIssue = /* @__PURE__ */ __name((params) => {
345
345
  path: fullPath
346
346
  };
347
347
  let errorMessage = "";
348
- const maps = errorMaps.filter((m3) => !!m3).slice().reverse();
348
+ const maps = errorMaps.filter((m) => !!m).slice().reverse();
349
349
  for (const map of maps) {
350
350
  errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
351
351
  }
@@ -366,7 +366,7 @@ function addIssueToContext(ctx, issueData) {
366
366
  ctx.schemaErrorMap,
367
367
  getErrorMap(),
368
368
  errorMap
369
- ].filter((x2) => !!x2)
369
+ ].filter((x) => !!x)
370
370
  });
371
371
  ctx.common.issues.push(issue);
372
372
  }
@@ -385,12 +385,12 @@ var ParseStatus = class {
385
385
  }
386
386
  static mergeArray(status, results) {
387
387
  const arrayValue = [];
388
- for (const s3 of results) {
389
- if (s3.status === "aborted")
388
+ for (const s of results) {
389
+ if (s.status === "aborted")
390
390
  return INVALID;
391
- if (s3.status === "dirty")
391
+ if (s.status === "dirty")
392
392
  status.dirty();
393
- arrayValue.push(s3.value);
393
+ arrayValue.push(s.value);
394
394
  }
395
395
  return { status: status.value, value: arrayValue };
396
396
  }
@@ -429,10 +429,10 @@ var INVALID = Object.freeze({
429
429
  });
430
430
  var DIRTY = /* @__PURE__ */ __name((value) => ({ status: "dirty", value }), "DIRTY");
431
431
  var OK = /* @__PURE__ */ __name((value) => ({ status: "valid", value }), "OK");
432
- var isAborted = /* @__PURE__ */ __name((x2) => x2.status === "aborted", "isAborted");
433
- var isDirty = /* @__PURE__ */ __name((x2) => x2.status === "dirty", "isDirty");
434
- var isValid = /* @__PURE__ */ __name((x2) => x2.status === "valid", "isValid");
435
- var isAsync = /* @__PURE__ */ __name((x2) => typeof Promise !== "undefined" && x2 instanceof Promise, "isAsync");
432
+ var isAborted = /* @__PURE__ */ __name((x) => x.status === "aborted", "isAborted");
433
+ var isDirty = /* @__PURE__ */ __name((x) => x.status === "dirty", "isDirty");
434
+ var isValid = /* @__PURE__ */ __name((x) => x.status === "valid", "isValid");
435
+ var isAsync = /* @__PURE__ */ __name((x) => typeof Promise !== void 0 && x instanceof Promise, "isAsync");
436
436
  var errorUtil;
437
437
  (function(errorUtil2) {
438
438
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
@@ -650,29 +650,28 @@ var ZodType = class {
650
650
  return this._refinement(refinement);
651
651
  }
652
652
  optional() {
653
- return ZodOptional.create(this, this._def);
653
+ return ZodOptional.create(this);
654
654
  }
655
655
  nullable() {
656
- return ZodNullable.create(this, this._def);
656
+ return ZodNullable.create(this);
657
657
  }
658
658
  nullish() {
659
- return this.nullable().optional();
659
+ return this.optional().nullable();
660
660
  }
661
661
  array() {
662
- return ZodArray.create(this, this._def);
662
+ return ZodArray.create(this);
663
663
  }
664
664
  promise() {
665
- return ZodPromise.create(this, this._def);
665
+ return ZodPromise.create(this);
666
666
  }
667
667
  or(option) {
668
- return ZodUnion.create([this, option], this._def);
668
+ return ZodUnion.create([this, option]);
669
669
  }
670
670
  and(incoming) {
671
- return ZodIntersection.create(this, incoming, this._def);
671
+ return ZodIntersection.create(this, incoming);
672
672
  }
673
673
  transform(transform) {
674
674
  return new ZodEffects({
675
- ...processCreateParams(this._def),
676
675
  schema: this,
677
676
  typeName: ZodFirstPartyTypeKind.ZodEffects,
678
677
  effect: { type: "transform", transform }
@@ -681,7 +680,6 @@ var ZodType = class {
681
680
  default(def) {
682
681
  const defaultValueFunc = typeof def === "function" ? def : () => def;
683
682
  return new ZodDefault({
684
- ...processCreateParams(this._def),
685
683
  innerType: this,
686
684
  defaultValue: defaultValueFunc,
687
685
  typeName: ZodFirstPartyTypeKind.ZodDefault
@@ -691,15 +689,14 @@ var ZodType = class {
691
689
  return new ZodBranded({
692
690
  typeName: ZodFirstPartyTypeKind.ZodBranded,
693
691
  type: this,
694
- ...processCreateParams(this._def)
692
+ ...processCreateParams(void 0)
695
693
  });
696
694
  }
697
695
  catch(def) {
698
- const catchValueFunc = typeof def === "function" ? def : () => def;
696
+ const defaultValueFunc = typeof def === "function" ? def : () => def;
699
697
  return new ZodCatch({
700
- ...processCreateParams(this._def),
701
698
  innerType: this,
702
- catchValue: catchValueFunc,
699
+ defaultValue: defaultValueFunc,
703
700
  typeName: ZodFirstPartyTypeKind.ZodCatch
704
701
  });
705
702
  }
@@ -722,25 +719,24 @@ var ZodType = class {
722
719
  };
723
720
  __name(ZodType, "ZodType");
724
721
  var cuidRegex = /^c[^\s-]{8,}$/i;
725
- var cuid2Regex = /^[a-z][a-z0-9]*$/;
726
722
  var uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
727
- var emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|([^-]([a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}))$/;
723
+ var emailRegex = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
728
724
  var datetimeRegex = /* @__PURE__ */ __name((args) => {
729
725
  if (args.precision) {
730
726
  if (args.offset) {
731
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
727
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}:\\d{2})|Z)$`);
732
728
  } else {
733
729
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
734
730
  }
735
731
  } else if (args.precision === 0) {
736
732
  if (args.offset) {
737
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
733
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$`);
738
734
  } else {
739
735
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
740
736
  }
741
737
  } else {
742
738
  if (args.offset) {
743
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
739
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$`);
744
740
  } else {
745
741
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
746
742
  }
@@ -767,14 +763,11 @@ var ZodString = class extends ZodType {
767
763
  const parsedType = this._getType(input);
768
764
  if (parsedType !== ZodParsedType.string) {
769
765
  const ctx2 = this._getOrReturnCtx(input);
770
- addIssueToContext(
771
- ctx2,
772
- {
773
- code: ZodIssueCode.invalid_type,
774
- expected: ZodParsedType.string,
775
- received: ctx2.parsedType
776
- }
777
- );
766
+ addIssueToContext(ctx2, {
767
+ code: ZodIssueCode.invalid_type,
768
+ expected: ZodParsedType.string,
769
+ received: ctx2.parsedType
770
+ });
778
771
  return INVALID;
779
772
  }
780
773
  const status = new ParseStatus();
@@ -862,16 +855,6 @@ var ZodString = class extends ZodType {
862
855
  });
863
856
  status.dirty();
864
857
  }
865
- } else if (check.kind === "cuid2") {
866
- if (!cuid2Regex.test(input.data)) {
867
- ctx = this._getOrReturnCtx(input, ctx);
868
- addIssueToContext(ctx, {
869
- validation: "cuid2",
870
- code: ZodIssueCode.invalid_string,
871
- message: check.message
872
- });
873
- status.dirty();
874
- }
875
858
  } else if (check.kind === "url") {
876
859
  try {
877
860
  new URL(input.data);
@@ -953,9 +936,6 @@ var ZodString = class extends ZodType {
953
936
  cuid(message) {
954
937
  return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
955
938
  }
956
- cuid2(message) {
957
- return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
958
- }
959
939
  datetime(options) {
960
940
  var _a;
961
941
  if (typeof options === "string") {
@@ -1030,9 +1010,6 @@ var ZodString = class extends ZodType {
1030
1010
  get isCUID() {
1031
1011
  return !!this._def.checks.find((ch) => ch.kind === "cuid");
1032
1012
  }
1033
- get isCUID2() {
1034
- return !!this._def.checks.find((ch) => ch.kind === "cuid2");
1035
- }
1036
1013
  get minLength() {
1037
1014
  let min = null;
1038
1015
  for (const ch of this._def.checks) {
@@ -1265,22 +1242,7 @@ var ZodNumber = class extends ZodType {
1265
1242
  return max;
1266
1243
  }
1267
1244
  get isInt() {
1268
- return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
1269
- }
1270
- get isFinite() {
1271
- let max = null, min = null;
1272
- for (const ch of this._def.checks) {
1273
- if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1274
- return true;
1275
- } else if (ch.kind === "min") {
1276
- if (min === null || ch.value > min)
1277
- min = ch.value;
1278
- } else if (ch.kind === "max") {
1279
- if (max === null || ch.value < max)
1280
- max = ch.value;
1281
- }
1282
- }
1283
- return Number.isFinite(min) && Number.isFinite(max);
1245
+ return !!this._def.checks.find((ch) => ch.kind === "int");
1284
1246
  }
1285
1247
  };
1286
1248
  __name(ZodNumber, "ZodNumber");
@@ -1648,14 +1610,14 @@ var ZodArray = class extends ZodType {
1648
1610
  }
1649
1611
  }
1650
1612
  if (ctx.common.async) {
1651
- return Promise.all([...ctx.data].map((item, i2) => {
1652
- return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
1613
+ return Promise.all(ctx.data.map((item, i) => {
1614
+ return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
1653
1615
  })).then((result2) => {
1654
1616
  return ParseStatus.mergeArray(status, result2);
1655
1617
  });
1656
1618
  }
1657
- const result = [...ctx.data].map((item, i2) => {
1658
- return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
1619
+ const result = ctx.data.map((item, i) => {
1620
+ return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
1659
1621
  });
1660
1622
  return ParseStatus.mergeArray(status, result);
1661
1623
  }
@@ -1704,6 +1666,15 @@ var objectUtil;
1704
1666
  };
1705
1667
  };
1706
1668
  })(objectUtil || (objectUtil = {}));
1669
+ var AugmentFactory = /* @__PURE__ */ __name((def) => (augmentation) => {
1670
+ return new ZodObject({
1671
+ ...def,
1672
+ shape: () => ({
1673
+ ...def.shape(),
1674
+ ...augmentation
1675
+ })
1676
+ });
1677
+ }, "AugmentFactory");
1707
1678
  function deepPartialify(schema) {
1708
1679
  if (schema instanceof ZodObject) {
1709
1680
  const newShape = {};
@@ -1733,7 +1704,8 @@ var ZodObject = class extends ZodType {
1733
1704
  super(...arguments);
1734
1705
  this._cached = null;
1735
1706
  this.nonstrict = this.passthrough;
1736
- this.augment = this.extend;
1707
+ this.augment = AugmentFactory(this._def);
1708
+ this.extend = AugmentFactory(this._def);
1737
1709
  }
1738
1710
  _getCached() {
1739
1711
  if (this._cached !== null)
@@ -1801,9 +1773,7 @@ var ZodObject = class extends ZodType {
1801
1773
  const value = ctx.data[key];
1802
1774
  pairs.push({
1803
1775
  key: { status: "valid", value: key },
1804
- value: catchall._parse(
1805
- new ParseInputLazyPath(ctx, value, ctx.path, key)
1806
- ),
1776
+ value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
1807
1777
  alwaysSet: key in ctx.data
1808
1778
  });
1809
1779
  }
@@ -1862,14 +1832,8 @@ var ZodObject = class extends ZodType {
1862
1832
  unknownKeys: "passthrough"
1863
1833
  });
1864
1834
  }
1865
- extend(augmentation) {
1866
- return new ZodObject({
1867
- ...this._def,
1868
- shape: () => ({
1869
- ...this._def.shape(),
1870
- ...augmentation
1871
- })
1872
- });
1835
+ setKey(key, schema) {
1836
+ return this.augment({ [key]: schema });
1873
1837
  }
1874
1838
  merge(merging) {
1875
1839
  const merged = new ZodObject({
@@ -1880,9 +1844,6 @@ var ZodObject = class extends ZodType {
1880
1844
  });
1881
1845
  return merged;
1882
1846
  }
1883
- setKey(key, schema) {
1884
- return this.augment({ [key]: schema });
1885
- }
1886
1847
  catchall(index) {
1887
1848
  return new ZodObject({
1888
1849
  ...this._def,
@@ -1891,10 +1852,9 @@ var ZodObject = class extends ZodType {
1891
1852
  }
1892
1853
  pick(mask) {
1893
1854
  const shape = {};
1894
- util.objectKeys(mask).forEach((key) => {
1895
- if (mask[key] && this.shape[key]) {
1855
+ util.objectKeys(mask).map((key) => {
1856
+ if (this.shape[key])
1896
1857
  shape[key] = this.shape[key];
1897
- }
1898
1858
  });
1899
1859
  return new ZodObject({
1900
1860
  ...this._def,
@@ -1903,8 +1863,8 @@ var ZodObject = class extends ZodType {
1903
1863
  }
1904
1864
  omit(mask) {
1905
1865
  const shape = {};
1906
- util.objectKeys(this.shape).forEach((key) => {
1907
- if (!mask[key]) {
1866
+ util.objectKeys(this.shape).map((key) => {
1867
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1908
1868
  shape[key] = this.shape[key];
1909
1869
  }
1910
1870
  });
@@ -1918,14 +1878,24 @@ var ZodObject = class extends ZodType {
1918
1878
  }
1919
1879
  partial(mask) {
1920
1880
  const newShape = {};
1921
- util.objectKeys(this.shape).forEach((key) => {
1922
- const fieldSchema = this.shape[key];
1923
- if (mask && !mask[key]) {
1924
- newShape[key] = fieldSchema;
1925
- } else {
1881
+ if (mask) {
1882
+ util.objectKeys(this.shape).map((key) => {
1883
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1884
+ newShape[key] = this.shape[key];
1885
+ } else {
1886
+ newShape[key] = this.shape[key].optional();
1887
+ }
1888
+ });
1889
+ return new ZodObject({
1890
+ ...this._def,
1891
+ shape: () => newShape
1892
+ });
1893
+ } else {
1894
+ for (const key in this.shape) {
1895
+ const fieldSchema = this.shape[key];
1926
1896
  newShape[key] = fieldSchema.optional();
1927
1897
  }
1928
- });
1898
+ }
1929
1899
  return new ZodObject({
1930
1900
  ...this._def,
1931
1901
  shape: () => newShape
@@ -1933,10 +1903,21 @@ var ZodObject = class extends ZodType {
1933
1903
  }
1934
1904
  required(mask) {
1935
1905
  const newShape = {};
1936
- util.objectKeys(this.shape).forEach((key) => {
1937
- if (mask && !mask[key]) {
1938
- newShape[key] = this.shape[key];
1939
- } else {
1906
+ if (mask) {
1907
+ util.objectKeys(this.shape).map((key) => {
1908
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1909
+ newShape[key] = this.shape[key];
1910
+ } else {
1911
+ const fieldSchema = this.shape[key];
1912
+ let newField = fieldSchema;
1913
+ while (newField instanceof ZodOptional) {
1914
+ newField = newField._def.innerType;
1915
+ }
1916
+ newShape[key] = newField;
1917
+ }
1918
+ });
1919
+ } else {
1920
+ for (const key in this.shape) {
1940
1921
  const fieldSchema = this.shape[key];
1941
1922
  let newField = fieldSchema;
1942
1923
  while (newField instanceof ZodOptional) {
@@ -1944,7 +1925,7 @@ var ZodObject = class extends ZodType {
1944
1925
  }
1945
1926
  newShape[key] = newField;
1946
1927
  }
1947
- });
1928
+ }
1948
1929
  return new ZodObject({
1949
1930
  ...this._def,
1950
1931
  shape: () => newShape
@@ -2165,17 +2146,17 @@ var ZodDiscriminatedUnion = class extends ZodType {
2165
2146
  }
2166
2147
  };
2167
2148
  __name(ZodDiscriminatedUnion, "ZodDiscriminatedUnion");
2168
- function mergeValues(a3, b2) {
2169
- const aType = getParsedType(a3);
2170
- const bType = getParsedType(b2);
2171
- if (a3 === b2) {
2172
- return { valid: true, data: a3 };
2149
+ function mergeValues(a, b) {
2150
+ const aType = getParsedType(a);
2151
+ const bType = getParsedType(b);
2152
+ if (a === b) {
2153
+ return { valid: true, data: a };
2173
2154
  } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
2174
- const bKeys = util.objectKeys(b2);
2175
- const sharedKeys = util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);
2176
- const newObj = { ...a3, ...b2 };
2155
+ const bKeys = util.objectKeys(b);
2156
+ const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
2157
+ const newObj = { ...a, ...b };
2177
2158
  for (const key of sharedKeys) {
2178
- const sharedValue = mergeValues(a3[key], b2[key]);
2159
+ const sharedValue = mergeValues(a[key], b[key]);
2179
2160
  if (!sharedValue.valid) {
2180
2161
  return { valid: false };
2181
2162
  }
@@ -2183,13 +2164,13 @@ function mergeValues(a3, b2) {
2183
2164
  }
2184
2165
  return { valid: true, data: newObj };
2185
2166
  } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
2186
- if (a3.length !== b2.length) {
2167
+ if (a.length !== b.length) {
2187
2168
  return { valid: false };
2188
2169
  }
2189
2170
  const newArray = [];
2190
- for (let index = 0; index < a3.length; index++) {
2191
- const itemA = a3[index];
2192
- const itemB = b2[index];
2171
+ for (let index = 0; index < a.length; index++) {
2172
+ const itemA = a[index];
2173
+ const itemB = b[index];
2193
2174
  const sharedValue = mergeValues(itemA, itemB);
2194
2175
  if (!sharedValue.valid) {
2195
2176
  return { valid: false };
@@ -2197,8 +2178,8 @@ function mergeValues(a3, b2) {
2197
2178
  newArray.push(sharedValue.data);
2198
2179
  }
2199
2180
  return { valid: true, data: newArray };
2200
- } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a3 === +b2) {
2201
- return { valid: true, data: a3 };
2181
+ } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
2182
+ return { valid: true, data: a };
2202
2183
  } else {
2203
2184
  return { valid: false };
2204
2185
  }
@@ -2290,12 +2271,12 @@ var ZodTuple = class extends ZodType {
2290
2271
  });
2291
2272
  status.dirty();
2292
2273
  }
2293
- const items = [...ctx.data].map((item, itemIndex) => {
2274
+ const items = ctx.data.map((item, itemIndex) => {
2294
2275
  const schema = this._def.items[itemIndex] || this._def.rest;
2295
2276
  if (!schema)
2296
2277
  return null;
2297
2278
  return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
2298
- }).filter((x2) => !!x2);
2279
+ }).filter((x) => !!x);
2299
2280
  if (ctx.common.async) {
2300
2281
  return Promise.all(items).then((results) => {
2301
2282
  return ParseStatus.mergeArray(status, results);
@@ -2491,7 +2472,7 @@ var ZodSet = class extends ZodType {
2491
2472
  return { status: status.value, value: parsedSet };
2492
2473
  }
2493
2474
  __name(finalizeSet, "finalizeSet");
2494
- const elements = [...ctx.data.values()].map((item, i2) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i2)));
2475
+ const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
2495
2476
  if (ctx.common.async) {
2496
2477
  return Promise.all(elements).then((elements2) => finalizeSet(elements2));
2497
2478
  } else {
@@ -2551,7 +2532,7 @@ var ZodFunction = class extends ZodType {
2551
2532
  ctx.schemaErrorMap,
2552
2533
  getErrorMap(),
2553
2534
  errorMap
2554
- ].filter((x2) => !!x2),
2535
+ ].filter((x) => !!x),
2555
2536
  issueData: {
2556
2537
  code: ZodIssueCode.invalid_arguments,
2557
2538
  argumentsError: error
@@ -2568,7 +2549,7 @@ var ZodFunction = class extends ZodType {
2568
2549
  ctx.schemaErrorMap,
2569
2550
  getErrorMap(),
2570
2551
  errorMap
2571
- ].filter((x2) => !!x2),
2552
+ ].filter((x) => !!x),
2572
2553
  issueData: {
2573
2554
  code: ZodIssueCode.invalid_return_type,
2574
2555
  returnTypeError: error
@@ -2581,13 +2562,13 @@ var ZodFunction = class extends ZodType {
2581
2562
  if (this._def.returns instanceof ZodPromise) {
2582
2563
  return OK(async (...args) => {
2583
2564
  const error = new ZodError([]);
2584
- const parsedArgs = await this._def.args.parseAsync(args, params).catch((e2) => {
2585
- error.addIssue(makeArgsIssue(args, e2));
2565
+ const parsedArgs = await this._def.args.parseAsync(args, params).catch((e) => {
2566
+ error.addIssue(makeArgsIssue(args, e));
2586
2567
  throw error;
2587
2568
  });
2588
2569
  const result = await fn(...parsedArgs);
2589
- const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e2) => {
2590
- error.addIssue(makeReturnsIssue(result, e2));
2570
+ const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e) => {
2571
+ error.addIssue(makeReturnsIssue(result, e));
2591
2572
  throw error;
2592
2573
  });
2593
2574
  return parsedReturns;
@@ -2666,7 +2647,6 @@ var ZodLiteral = class extends ZodType {
2666
2647
  if (input.data !== this._def.value) {
2667
2648
  const ctx = this._getOrReturnCtx(input);
2668
2649
  addIssueToContext(ctx, {
2669
- received: ctx.data,
2670
2650
  code: ZodIssueCode.invalid_literal,
2671
2651
  expected: this._def.value
2672
2652
  });
@@ -2742,12 +2722,6 @@ var ZodEnum = class extends ZodType {
2742
2722
  }
2743
2723
  return enumValues;
2744
2724
  }
2745
- extract(values) {
2746
- return ZodEnum.create(values);
2747
- }
2748
- exclude(values) {
2749
- return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));
2750
- }
2751
2725
  };
2752
2726
  __name(ZodEnum, "ZodEnum");
2753
2727
  ZodEnum.create = createZodEnum;
@@ -2788,9 +2762,6 @@ ZodNativeEnum.create = (values, params) => {
2788
2762
  });
2789
2763
  };
2790
2764
  var ZodPromise = class extends ZodType {
2791
- unwrap() {
2792
- return this._def.type;
2793
- }
2794
2765
  _parse(input) {
2795
2766
  const { ctx } = this._processInputParams(input);
2796
2767
  if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
@@ -3009,29 +2980,23 @@ var ZodCatch = class extends ZodType {
3009
2980
  const result = this._def.innerType._parse({
3010
2981
  data: ctx.data,
3011
2982
  path: ctx.path,
3012
- parent: {
3013
- ...ctx,
3014
- common: {
3015
- ...ctx.common,
3016
- issues: []
3017
- }
3018
- }
2983
+ parent: ctx
3019
2984
  });
3020
2985
  if (isAsync(result)) {
3021
2986
  return result.then((result2) => {
3022
2987
  return {
3023
2988
  status: "valid",
3024
- value: result2.status === "valid" ? result2.value : this._def.catchValue()
2989
+ value: result2.status === "valid" ? result2.value : this._def.defaultValue()
3025
2990
  };
3026
2991
  });
3027
2992
  } else {
3028
2993
  return {
3029
2994
  status: "valid",
3030
- value: result.status === "valid" ? result.value : this._def.catchValue()
2995
+ value: result.status === "valid" ? result.value : this._def.defaultValue()
3031
2996
  };
3032
2997
  }
3033
2998
  }
3034
- removeCatch() {
2999
+ removeDefault() {
3035
3000
  return this._def.innerType;
3036
3001
  }
3037
3002
  };
@@ -3040,7 +3005,7 @@ ZodCatch.create = (type, params) => {
3040
3005
  return new ZodCatch({
3041
3006
  innerType: type,
3042
3007
  typeName: ZodFirstPartyTypeKind.ZodCatch,
3043
- catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
3008
+ defaultValue: typeof params.default === "function" ? params.default : () => params.default,
3044
3009
  ...processCreateParams(params)
3045
3010
  });
3046
3011
  };
@@ -3129,10 +3094,10 @@ var ZodPipeline = class extends ZodType {
3129
3094
  }
3130
3095
  }
3131
3096
  }
3132
- static create(a3, b2) {
3097
+ static create(a, b) {
3133
3098
  return new ZodPipeline({
3134
- in: a3,
3135
- out: b2,
3099
+ in: a,
3100
+ out: b,
3136
3101
  typeName: ZodFirstPartyTypeKind.ZodPipeline
3137
3102
  });
3138
3103
  }
@@ -3233,10 +3198,7 @@ var oboolean = /* @__PURE__ */ __name(() => booleanType().optional(), "oboolean"
3233
3198
  var coerce = {
3234
3199
  string: (arg) => ZodString.create({ ...arg, coerce: true }),
3235
3200
  number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
3236
- boolean: (arg) => ZodBoolean.create({
3237
- ...arg,
3238
- coerce: true
3239
- }),
3201
+ boolean: (arg) => ZodBoolean.create({ ...arg, coerce: true }),
3240
3202
  bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
3241
3203
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3242
3204
  };
@@ -3362,13 +3324,11 @@ var AchievementCriteriaValidator = mod.object({
3362
3324
  type: mod.string().optional(),
3363
3325
  narrative: mod.string().optional()
3364
3326
  });
3365
- var ImageValidator = mod.string().or(
3366
- mod.object({
3367
- id: mod.string(),
3368
- type: mod.string(),
3369
- caption: mod.string().optional()
3370
- })
3371
- );
3327
+ var ImageValidator = mod.string().or(mod.object({
3328
+ id: mod.string(),
3329
+ type: mod.string(),
3330
+ caption: mod.string().optional()
3331
+ }));
3372
3332
  var GeoCoordinatesValidator = mod.object({
3373
3333
  type: mod.string().min(1).or(mod.string().array().nonempty()),
3374
3334
  latitude: mod.number(),
@@ -3410,31 +3370,29 @@ var IdentifierEntryValidator = mod.object({
3410
3370
  identifier: mod.string(),
3411
3371
  identifierType: IdentifierTypeValidator
3412
3372
  });
3413
- var ProfileValidator = mod.string().or(
3414
- mod.object({
3415
- id: mod.string().optional(),
3416
- type: mod.string().or(mod.string().array().nonempty().optional()),
3417
- name: mod.string().optional(),
3418
- url: mod.string().optional(),
3419
- phone: mod.string().optional(),
3420
- description: mod.string().optional(),
3421
- endorsement: mod.any().array().optional(),
3422
- image: ImageValidator.optional(),
3423
- email: mod.string().email().optional(),
3424
- address: AddressValidator.optional(),
3425
- otherIdentifier: IdentifierEntryValidator.array().optional(),
3426
- official: mod.string().optional(),
3427
- parentOrg: mod.any().optional(),
3428
- familyName: mod.string().optional(),
3429
- givenName: mod.string().optional(),
3430
- additionalName: mod.string().optional(),
3431
- patronymicName: mod.string().optional(),
3432
- honorificPrefix: mod.string().optional(),
3433
- honorificSuffix: mod.string().optional(),
3434
- familyNamePrefix: mod.string().optional(),
3435
- dateOfBirth: mod.string().optional()
3436
- }).catchall(mod.any())
3437
- );
3373
+ var ProfileValidator = mod.string().or(mod.object({
3374
+ id: mod.string().optional(),
3375
+ type: mod.string().or(mod.string().array().nonempty().optional()),
3376
+ name: mod.string().optional(),
3377
+ url: mod.string().optional(),
3378
+ phone: mod.string().optional(),
3379
+ description: mod.string().optional(),
3380
+ endorsement: mod.any().array().optional(),
3381
+ image: ImageValidator.optional(),
3382
+ email: mod.string().email().optional(),
3383
+ address: AddressValidator.optional(),
3384
+ otherIdentifier: IdentifierEntryValidator.array().optional(),
3385
+ official: mod.string().optional(),
3386
+ parentOrg: mod.any().optional(),
3387
+ familyName: mod.string().optional(),
3388
+ givenName: mod.string().optional(),
3389
+ additionalName: mod.string().optional(),
3390
+ patronymicName: mod.string().optional(),
3391
+ honorificPrefix: mod.string().optional(),
3392
+ honorificSuffix: mod.string().optional(),
3393
+ familyNamePrefix: mod.string().optional(),
3394
+ dateOfBirth: mod.string().optional()
3395
+ }).catchall(mod.any()));
3438
3396
  var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
3439
3397
  var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() });
3440
3398
  var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() });
@@ -3809,7 +3767,7 @@ var LCNSigningAuthorityForUserValidator = mod.object({
3809
3767
  })
3810
3768
  });
3811
3769
 
3812
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/toInteger/index.js
3770
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/toInteger/index.js
3813
3771
  function toInteger(dirtyNumber) {
3814
3772
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
3815
3773
  return NaN;
@@ -3822,7 +3780,7 @@ function toInteger(dirtyNumber) {
3822
3780
  }
3823
3781
  __name(toInteger, "toInteger");
3824
3782
 
3825
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/requiredArgs/index.js
3783
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/requiredArgs/index.js
3826
3784
  function requiredArgs(required, args) {
3827
3785
  if (args.length < required) {
3828
3786
  throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
@@ -3830,31 +3788,17 @@ function requiredArgs(required, args) {
3830
3788
  }
3831
3789
  __name(requiredArgs, "requiredArgs");
3832
3790
 
3833
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/toDate/index.js
3834
- function _typeof(obj) {
3835
- "@babel/helpers - typeof";
3836
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
3837
- _typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
3838
- return typeof obj2;
3839
- }, "_typeof");
3840
- } else {
3841
- _typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
3842
- return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
3843
- }, "_typeof");
3844
- }
3845
- return _typeof(obj);
3846
- }
3847
- __name(_typeof, "_typeof");
3791
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/toDate/index.js
3848
3792
  function toDate(argument) {
3849
3793
  requiredArgs(1, arguments);
3850
3794
  var argStr = Object.prototype.toString.call(argument);
3851
- if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") {
3795
+ if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
3852
3796
  return new Date(argument.getTime());
3853
3797
  } else if (typeof argument === "number" || argStr === "[object Number]") {
3854
3798
  return new Date(argument);
3855
3799
  } else {
3856
3800
  if ((typeof argument === "string" || argStr === "[object String]") && typeof console !== "undefined") {
3857
- console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
3801
+ console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule");
3858
3802
  console.warn(new Error().stack);
3859
3803
  }
3860
3804
  return new Date(NaN);
@@ -3862,7 +3806,7 @@ function toDate(argument) {
3862
3806
  }
3863
3807
  __name(toDate, "toDate");
3864
3808
 
3865
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/addMilliseconds/index.js
3809
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addMilliseconds/index.js
3866
3810
  function addMilliseconds(dirtyDate, dirtyAmount) {
3867
3811
  requiredArgs(2, arguments);
3868
3812
  var timestamp = toDate(dirtyDate).getTime();
@@ -3871,14 +3815,7 @@ function addMilliseconds(dirtyDate, dirtyAmount) {
3871
3815
  }
3872
3816
  __name(addMilliseconds, "addMilliseconds");
3873
3817
 
3874
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/defaultOptions/index.js
3875
- var defaultOptions = {};
3876
- function getDefaultOptions() {
3877
- return defaultOptions;
3878
- }
3879
- __name(getDefaultOptions, "getDefaultOptions");
3880
-
3881
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
3818
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
3882
3819
  function getTimezoneOffsetInMilliseconds(date) {
3883
3820
  var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
3884
3821
  utcDate.setUTCFullYear(date.getFullYear());
@@ -3886,28 +3823,14 @@ function getTimezoneOffsetInMilliseconds(date) {
3886
3823
  }
3887
3824
  __name(getTimezoneOffsetInMilliseconds, "getTimezoneOffsetInMilliseconds");
3888
3825
 
3889
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isDate/index.js
3890
- function _typeof2(obj) {
3891
- "@babel/helpers - typeof";
3892
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
3893
- _typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
3894
- return typeof obj2;
3895
- }, "_typeof");
3896
- } else {
3897
- _typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
3898
- return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
3899
- }, "_typeof");
3900
- }
3901
- return _typeof2(obj);
3902
- }
3903
- __name(_typeof2, "_typeof");
3826
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isDate/index.js
3904
3827
  function isDate(value) {
3905
3828
  requiredArgs(1, arguments);
3906
- return value instanceof Date || _typeof2(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
3829
+ return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
3907
3830
  }
3908
3831
  __name(isDate, "isDate");
3909
3832
 
3910
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isValid/index.js
3833
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isValid/index.js
3911
3834
  function isValid2(dirtyDate) {
3912
3835
  requiredArgs(1, arguments);
3913
3836
  if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
@@ -3918,1425 +3841,1435 @@ function isValid2(dirtyDate) {
3918
3841
  }
3919
3842
  __name(isValid2, "isValid");
3920
3843
 
3921
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/subMilliseconds/index.js
3922
- function subMilliseconds(dirtyDate, dirtyAmount) {
3923
- requiredArgs(2, arguments);
3924
- var amount = toInteger(dirtyAmount);
3925
- return addMilliseconds(dirtyDate, -amount);
3926
- }
3927
- __name(subMilliseconds, "subMilliseconds");
3928
-
3929
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
3930
- var MILLISECONDS_IN_DAY = 864e5;
3931
- function getUTCDayOfYear(dirtyDate) {
3932
- requiredArgs(1, arguments);
3933
- var date = toDate(dirtyDate);
3934
- var timestamp = date.getTime();
3935
- date.setUTCMonth(0, 1);
3936
- date.setUTCHours(0, 0, 0, 0);
3937
- var startOfYearTimestamp = date.getTime();
3938
- var difference = timestamp - startOfYearTimestamp;
3939
- return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
3940
- }
3941
- __name(getUTCDayOfYear, "getUTCDayOfYear");
3942
-
3943
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
3944
- function startOfUTCISOWeek(dirtyDate) {
3945
- requiredArgs(1, arguments);
3946
- var weekStartsOn = 1;
3947
- var date = toDate(dirtyDate);
3948
- var day = date.getUTCDay();
3949
- var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
3950
- date.setUTCDate(date.getUTCDate() - diff);
3951
- date.setUTCHours(0, 0, 0, 0);
3952
- return date;
3953
- }
3954
- __name(startOfUTCISOWeek, "startOfUTCISOWeek");
3955
-
3956
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
3957
- function getUTCISOWeekYear(dirtyDate) {
3958
- requiredArgs(1, arguments);
3959
- var date = toDate(dirtyDate);
3960
- var year = date.getUTCFullYear();
3961
- var fourthOfJanuaryOfNextYear = new Date(0);
3962
- fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
3963
- fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
3964
- var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
3965
- var fourthOfJanuaryOfThisYear = new Date(0);
3966
- fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
3967
- fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
3968
- var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
3969
- if (date.getTime() >= startOfNextYear.getTime()) {
3970
- return year + 1;
3971
- } else if (date.getTime() >= startOfThisYear.getTime()) {
3972
- return year;
3844
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
3845
+ var formatDistanceLocale = {
3846
+ lessThanXSeconds: {
3847
+ one: "less than a second",
3848
+ other: "less than {{count}} seconds"
3849
+ },
3850
+ xSeconds: {
3851
+ one: "1 second",
3852
+ other: "{{count}} seconds"
3853
+ },
3854
+ halfAMinute: "half a minute",
3855
+ lessThanXMinutes: {
3856
+ one: "less than a minute",
3857
+ other: "less than {{count}} minutes"
3858
+ },
3859
+ xMinutes: {
3860
+ one: "1 minute",
3861
+ other: "{{count}} minutes"
3862
+ },
3863
+ aboutXHours: {
3864
+ one: "about 1 hour",
3865
+ other: "about {{count}} hours"
3866
+ },
3867
+ xHours: {
3868
+ one: "1 hour",
3869
+ other: "{{count}} hours"
3870
+ },
3871
+ xDays: {
3872
+ one: "1 day",
3873
+ other: "{{count}} days"
3874
+ },
3875
+ aboutXWeeks: {
3876
+ one: "about 1 week",
3877
+ other: "about {{count}} weeks"
3878
+ },
3879
+ xWeeks: {
3880
+ one: "1 week",
3881
+ other: "{{count}} weeks"
3882
+ },
3883
+ aboutXMonths: {
3884
+ one: "about 1 month",
3885
+ other: "about {{count}} months"
3886
+ },
3887
+ xMonths: {
3888
+ one: "1 month",
3889
+ other: "{{count}} months"
3890
+ },
3891
+ aboutXYears: {
3892
+ one: "about 1 year",
3893
+ other: "about {{count}} years"
3894
+ },
3895
+ xYears: {
3896
+ one: "1 year",
3897
+ other: "{{count}} years"
3898
+ },
3899
+ overXYears: {
3900
+ one: "over 1 year",
3901
+ other: "over {{count}} years"
3902
+ },
3903
+ almostXYears: {
3904
+ one: "almost 1 year",
3905
+ other: "almost {{count}} years"
3906
+ }
3907
+ };
3908
+ var formatDistance = /* @__PURE__ */ __name(function(token, count, options) {
3909
+ var result;
3910
+ var tokenValue = formatDistanceLocale[token];
3911
+ if (typeof tokenValue === "string") {
3912
+ result = tokenValue;
3913
+ } else if (count === 1) {
3914
+ result = tokenValue.one;
3973
3915
  } else {
3974
- return year - 1;
3916
+ result = tokenValue.other.replace("{{count}}", count.toString());
3975
3917
  }
3976
- }
3977
- __name(getUTCISOWeekYear, "getUTCISOWeekYear");
3978
-
3979
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
3980
- function startOfUTCISOWeekYear(dirtyDate) {
3981
- requiredArgs(1, arguments);
3982
- var year = getUTCISOWeekYear(dirtyDate);
3983
- var fourthOfJanuary = new Date(0);
3984
- fourthOfJanuary.setUTCFullYear(year, 0, 4);
3985
- fourthOfJanuary.setUTCHours(0, 0, 0, 0);
3986
- var date = startOfUTCISOWeek(fourthOfJanuary);
3987
- return date;
3988
- }
3989
- __name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
3990
-
3991
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
3992
- var MILLISECONDS_IN_WEEK = 6048e5;
3993
- function getUTCISOWeek(dirtyDate) {
3994
- requiredArgs(1, arguments);
3995
- var date = toDate(dirtyDate);
3996
- var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
3997
- return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
3998
- }
3999
- __name(getUTCISOWeek, "getUTCISOWeek");
4000
-
4001
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
4002
- function startOfUTCWeek(dirtyDate, options) {
4003
- var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
4004
- requiredArgs(1, arguments);
4005
- var defaultOptions2 = getDefaultOptions();
4006
- var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
4007
- if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
4008
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
3918
+ if (options !== null && options !== void 0 && options.addSuffix) {
3919
+ if (options.comparison && options.comparison > 0) {
3920
+ return "in " + result;
3921
+ } else {
3922
+ return result + " ago";
3923
+ }
4009
3924
  }
4010
- var date = toDate(dirtyDate);
4011
- var day = date.getUTCDay();
4012
- var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
4013
- date.setUTCDate(date.getUTCDate() - diff);
4014
- date.setUTCHours(0, 0, 0, 0);
4015
- return date;
3925
+ return result;
3926
+ }, "formatDistance");
3927
+ var formatDistance_default = formatDistance;
3928
+
3929
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
3930
+ function buildFormatLongFn(args) {
3931
+ return function() {
3932
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3933
+ var width = options.width ? String(options.width) : args.defaultWidth;
3934
+ var format2 = args.formats[width] || args.formats[args.defaultWidth];
3935
+ return format2;
3936
+ };
4016
3937
  }
4017
- __name(startOfUTCWeek, "startOfUTCWeek");
3938
+ __name(buildFormatLongFn, "buildFormatLongFn");
4018
3939
 
4019
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
4020
- function getUTCWeekYear(dirtyDate, options) {
4021
- var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
4022
- requiredArgs(1, arguments);
4023
- var date = toDate(dirtyDate);
4024
- var year = date.getUTCFullYear();
4025
- var defaultOptions2 = getDefaultOptions();
4026
- var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
4027
- if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
4028
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
4029
- }
4030
- var firstWeekOfNextYear = new Date(0);
4031
- firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
4032
- firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
4033
- var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
4034
- var firstWeekOfThisYear = new Date(0);
4035
- firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
4036
- firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
4037
- var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
4038
- if (date.getTime() >= startOfNextYear.getTime()) {
4039
- return year + 1;
4040
- } else if (date.getTime() >= startOfThisYear.getTime()) {
4041
- return year;
4042
- } else {
4043
- return year - 1;
4044
- }
4045
- }
4046
- __name(getUTCWeekYear, "getUTCWeekYear");
3940
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
3941
+ var dateFormats = {
3942
+ full: "EEEE, MMMM do, y",
3943
+ long: "MMMM do, y",
3944
+ medium: "MMM d, y",
3945
+ short: "MM/dd/yyyy"
3946
+ };
3947
+ var timeFormats = {
3948
+ full: "h:mm:ss a zzzz",
3949
+ long: "h:mm:ss a z",
3950
+ medium: "h:mm:ss a",
3951
+ short: "h:mm a"
3952
+ };
3953
+ var dateTimeFormats = {
3954
+ full: "{{date}} 'at' {{time}}",
3955
+ long: "{{date}} 'at' {{time}}",
3956
+ medium: "{{date}}, {{time}}",
3957
+ short: "{{date}}, {{time}}"
3958
+ };
3959
+ var formatLong = {
3960
+ date: buildFormatLongFn({
3961
+ formats: dateFormats,
3962
+ defaultWidth: "full"
3963
+ }),
3964
+ time: buildFormatLongFn({
3965
+ formats: timeFormats,
3966
+ defaultWidth: "full"
3967
+ }),
3968
+ dateTime: buildFormatLongFn({
3969
+ formats: dateTimeFormats,
3970
+ defaultWidth: "full"
3971
+ })
3972
+ };
3973
+ var formatLong_default = formatLong;
4047
3974
 
4048
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
4049
- function startOfUTCWeekYear(dirtyDate, options) {
4050
- var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
4051
- requiredArgs(1, arguments);
4052
- var defaultOptions2 = getDefaultOptions();
4053
- var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
4054
- var year = getUTCWeekYear(dirtyDate, options);
4055
- var firstWeek = new Date(0);
4056
- firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
4057
- firstWeek.setUTCHours(0, 0, 0, 0);
4058
- var date = startOfUTCWeek(firstWeek, options);
4059
- return date;
4060
- }
4061
- __name(startOfUTCWeekYear, "startOfUTCWeekYear");
3975
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
3976
+ var formatRelativeLocale = {
3977
+ lastWeek: "'last' eeee 'at' p",
3978
+ yesterday: "'yesterday at' p",
3979
+ today: "'today at' p",
3980
+ tomorrow: "'tomorrow at' p",
3981
+ nextWeek: "eeee 'at' p",
3982
+ other: "P"
3983
+ };
3984
+ var formatRelative = /* @__PURE__ */ __name(function(token, _date, _baseDate, _options) {
3985
+ return formatRelativeLocale[token];
3986
+ }, "formatRelative");
3987
+ var formatRelative_default = formatRelative;
4062
3988
 
4063
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCWeek/index.js
4064
- var MILLISECONDS_IN_WEEK2 = 6048e5;
4065
- function getUTCWeek(dirtyDate, options) {
4066
- requiredArgs(1, arguments);
4067
- var date = toDate(dirtyDate);
4068
- var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
4069
- return Math.round(diff / MILLISECONDS_IN_WEEK2) + 1;
3989
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
3990
+ function buildLocalizeFn(args) {
3991
+ return function(dirtyIndex, dirtyOptions) {
3992
+ var options = dirtyOptions || {};
3993
+ var context = options.context ? String(options.context) : "standalone";
3994
+ var valuesArray;
3995
+ if (context === "formatting" && args.formattingValues) {
3996
+ var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
3997
+ var width = options.width ? String(options.width) : defaultWidth;
3998
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
3999
+ } else {
4000
+ var _defaultWidth = args.defaultWidth;
4001
+ var _width = options.width ? String(options.width) : args.defaultWidth;
4002
+ valuesArray = args.values[_width] || args.values[_defaultWidth];
4003
+ }
4004
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
4005
+ return valuesArray[index];
4006
+ };
4070
4007
  }
4071
- __name(getUTCWeek, "getUTCWeek");
4008
+ __name(buildLocalizeFn, "buildLocalizeFn");
4072
4009
 
4073
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
4074
- function addLeadingZeros(number, targetLength) {
4075
- var sign = number < 0 ? "-" : "";
4076
- var output = Math.abs(number).toString();
4077
- while (output.length < targetLength) {
4078
- output = "0" + output;
4010
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
4011
+ var eraValues = {
4012
+ narrow: ["B", "A"],
4013
+ abbreviated: ["BC", "AD"],
4014
+ wide: ["Before Christ", "Anno Domini"]
4015
+ };
4016
+ var quarterValues = {
4017
+ narrow: ["1", "2", "3", "4"],
4018
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
4019
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
4020
+ };
4021
+ var monthValues = {
4022
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
4023
+ abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
4024
+ wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
4025
+ };
4026
+ var dayValues = {
4027
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
4028
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
4029
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
4030
+ wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
4031
+ };
4032
+ var dayPeriodValues = {
4033
+ narrow: {
4034
+ am: "a",
4035
+ pm: "p",
4036
+ midnight: "mi",
4037
+ noon: "n",
4038
+ morning: "morning",
4039
+ afternoon: "afternoon",
4040
+ evening: "evening",
4041
+ night: "night"
4042
+ },
4043
+ abbreviated: {
4044
+ am: "AM",
4045
+ pm: "PM",
4046
+ midnight: "midnight",
4047
+ noon: "noon",
4048
+ morning: "morning",
4049
+ afternoon: "afternoon",
4050
+ evening: "evening",
4051
+ night: "night"
4052
+ },
4053
+ wide: {
4054
+ am: "a.m.",
4055
+ pm: "p.m.",
4056
+ midnight: "midnight",
4057
+ noon: "noon",
4058
+ morning: "morning",
4059
+ afternoon: "afternoon",
4060
+ evening: "evening",
4061
+ night: "night"
4079
4062
  }
4080
- return sign + output;
4081
- }
4082
- __name(addLeadingZeros, "addLeadingZeros");
4083
-
4084
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
4085
- var formatters = {
4086
- y: /* @__PURE__ */ __name(function y(date, token) {
4087
- var signedYear = date.getUTCFullYear();
4088
- var year = signedYear > 0 ? signedYear : 1 - signedYear;
4089
- return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
4090
- }, "y"),
4091
- M: /* @__PURE__ */ __name(function M(date, token) {
4092
- var month = date.getUTCMonth();
4093
- return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
4094
- }, "M"),
4095
- d: /* @__PURE__ */ __name(function d(date, token) {
4096
- return addLeadingZeros(date.getUTCDate(), token.length);
4097
- }, "d"),
4098
- a: /* @__PURE__ */ __name(function a(date, token) {
4099
- var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
4100
- switch (token) {
4101
- case "a":
4102
- case "aa":
4103
- return dayPeriodEnumValue.toUpperCase();
4104
- case "aaa":
4105
- return dayPeriodEnumValue;
4106
- case "aaaaa":
4107
- return dayPeriodEnumValue[0];
4108
- case "aaaa":
4109
- default:
4110
- return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
4111
- }
4112
- }, "a"),
4113
- h: /* @__PURE__ */ __name(function h(date, token) {
4114
- return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
4115
- }, "h"),
4116
- H: /* @__PURE__ */ __name(function H(date, token) {
4117
- return addLeadingZeros(date.getUTCHours(), token.length);
4118
- }, "H"),
4119
- m: /* @__PURE__ */ __name(function m(date, token) {
4120
- return addLeadingZeros(date.getUTCMinutes(), token.length);
4121
- }, "m"),
4122
- s: /* @__PURE__ */ __name(function s(date, token) {
4123
- return addLeadingZeros(date.getUTCSeconds(), token.length);
4124
- }, "s"),
4125
- S: /* @__PURE__ */ __name(function S(date, token) {
4126
- var numberOfDigits = token.length;
4127
- var milliseconds = date.getUTCMilliseconds();
4128
- var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
4129
- return addLeadingZeros(fractionalSeconds, token.length);
4130
- }, "S")
4131
4063
  };
4132
- var lightFormatters_default = formatters;
4133
-
4134
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/formatters/index.js
4135
- var dayPeriodEnum = {
4136
- am: "am",
4137
- pm: "pm",
4138
- midnight: "midnight",
4139
- noon: "noon",
4140
- morning: "morning",
4141
- afternoon: "afternoon",
4142
- evening: "evening",
4143
- night: "night"
4064
+ var formattingDayPeriodValues = {
4065
+ narrow: {
4066
+ am: "a",
4067
+ pm: "p",
4068
+ midnight: "mi",
4069
+ noon: "n",
4070
+ morning: "in the morning",
4071
+ afternoon: "in the afternoon",
4072
+ evening: "in the evening",
4073
+ night: "at night"
4074
+ },
4075
+ abbreviated: {
4076
+ am: "AM",
4077
+ pm: "PM",
4078
+ midnight: "midnight",
4079
+ noon: "noon",
4080
+ morning: "in the morning",
4081
+ afternoon: "in the afternoon",
4082
+ evening: "in the evening",
4083
+ night: "at night"
4084
+ },
4085
+ wide: {
4086
+ am: "a.m.",
4087
+ pm: "p.m.",
4088
+ midnight: "midnight",
4089
+ noon: "noon",
4090
+ morning: "in the morning",
4091
+ afternoon: "in the afternoon",
4092
+ evening: "in the evening",
4093
+ night: "at night"
4094
+ }
4144
4095
  };
4145
- var formatters2 = {
4146
- G: /* @__PURE__ */ __name(function G(date, token, localize2) {
4147
- var era = date.getUTCFullYear() > 0 ? 1 : 0;
4148
- switch (token) {
4149
- case "G":
4150
- case "GG":
4151
- case "GGG":
4152
- return localize2.era(era, {
4153
- width: "abbreviated"
4154
- });
4155
- case "GGGGG":
4156
- return localize2.era(era, {
4157
- width: "narrow"
4158
- });
4159
- case "GGGG":
4160
- default:
4161
- return localize2.era(era, {
4162
- width: "wide"
4163
- });
4164
- }
4165
- }, "G"),
4166
- y: /* @__PURE__ */ __name(function y2(date, token, localize2) {
4167
- if (token === "yo") {
4168
- var signedYear = date.getUTCFullYear();
4169
- var year = signedYear > 0 ? signedYear : 1 - signedYear;
4170
- return localize2.ordinalNumber(year, {
4171
- unit: "year"
4172
- });
4096
+ var ordinalNumber = /* @__PURE__ */ __name(function(dirtyNumber, _options) {
4097
+ var number = Number(dirtyNumber);
4098
+ var rem100 = number % 100;
4099
+ if (rem100 > 20 || rem100 < 10) {
4100
+ switch (rem100 % 10) {
4101
+ case 1:
4102
+ return number + "st";
4103
+ case 2:
4104
+ return number + "nd";
4105
+ case 3:
4106
+ return number + "rd";
4173
4107
  }
4174
- return lightFormatters_default.y(date, token);
4175
- }, "y"),
4176
- Y: /* @__PURE__ */ __name(function Y(date, token, localize2, options) {
4177
- var signedWeekYear = getUTCWeekYear(date, options);
4178
- var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
4179
- if (token === "YY") {
4180
- var twoDigitYear = weekYear % 100;
4181
- return addLeadingZeros(twoDigitYear, 2);
4182
- }
4183
- if (token === "Yo") {
4184
- return localize2.ordinalNumber(weekYear, {
4185
- unit: "year"
4186
- });
4187
- }
4188
- return addLeadingZeros(weekYear, token.length);
4189
- }, "Y"),
4190
- R: /* @__PURE__ */ __name(function R(date, token) {
4191
- var isoWeekYear = getUTCISOWeekYear(date);
4192
- return addLeadingZeros(isoWeekYear, token.length);
4193
- }, "R"),
4194
- u: /* @__PURE__ */ __name(function u(date, token) {
4195
- var year = date.getUTCFullYear();
4196
- return addLeadingZeros(year, token.length);
4197
- }, "u"),
4198
- Q: /* @__PURE__ */ __name(function Q(date, token, localize2) {
4199
- var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4200
- switch (token) {
4201
- case "Q":
4202
- return String(quarter);
4203
- case "QQ":
4204
- return addLeadingZeros(quarter, 2);
4205
- case "Qo":
4206
- return localize2.ordinalNumber(quarter, {
4207
- unit: "quarter"
4208
- });
4209
- case "QQQ":
4210
- return localize2.quarter(quarter, {
4211
- width: "abbreviated",
4212
- context: "formatting"
4213
- });
4214
- case "QQQQQ":
4215
- return localize2.quarter(quarter, {
4216
- width: "narrow",
4217
- context: "formatting"
4218
- });
4219
- case "QQQQ":
4220
- default:
4221
- return localize2.quarter(quarter, {
4222
- width: "wide",
4223
- context: "formatting"
4224
- });
4225
- }
4226
- }, "Q"),
4227
- q: /* @__PURE__ */ __name(function q(date, token, localize2) {
4228
- var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4229
- switch (token) {
4230
- case "q":
4231
- return String(quarter);
4232
- case "qq":
4233
- return addLeadingZeros(quarter, 2);
4234
- case "qo":
4235
- return localize2.ordinalNumber(quarter, {
4236
- unit: "quarter"
4237
- });
4238
- case "qqq":
4239
- return localize2.quarter(quarter, {
4240
- width: "abbreviated",
4241
- context: "standalone"
4242
- });
4243
- case "qqqqq":
4244
- return localize2.quarter(quarter, {
4245
- width: "narrow",
4246
- context: "standalone"
4247
- });
4248
- case "qqqq":
4249
- default:
4250
- return localize2.quarter(quarter, {
4251
- width: "wide",
4252
- context: "standalone"
4253
- });
4254
- }
4255
- }, "q"),
4256
- M: /* @__PURE__ */ __name(function M2(date, token, localize2) {
4257
- var month = date.getUTCMonth();
4258
- switch (token) {
4259
- case "M":
4260
- case "MM":
4261
- return lightFormatters_default.M(date, token);
4262
- case "Mo":
4263
- return localize2.ordinalNumber(month + 1, {
4264
- unit: "month"
4265
- });
4266
- case "MMM":
4267
- return localize2.month(month, {
4268
- width: "abbreviated",
4269
- context: "formatting"
4270
- });
4271
- case "MMMMM":
4272
- return localize2.month(month, {
4273
- width: "narrow",
4274
- context: "formatting"
4275
- });
4276
- case "MMMM":
4277
- default:
4278
- return localize2.month(month, {
4279
- width: "wide",
4280
- context: "formatting"
4281
- });
4282
- }
4283
- }, "M"),
4284
- L: /* @__PURE__ */ __name(function L(date, token, localize2) {
4285
- var month = date.getUTCMonth();
4286
- switch (token) {
4287
- case "L":
4288
- return String(month + 1);
4289
- case "LL":
4290
- return addLeadingZeros(month + 1, 2);
4291
- case "Lo":
4292
- return localize2.ordinalNumber(month + 1, {
4293
- unit: "month"
4294
- });
4295
- case "LLL":
4296
- return localize2.month(month, {
4297
- width: "abbreviated",
4298
- context: "standalone"
4299
- });
4300
- case "LLLLL":
4301
- return localize2.month(month, {
4302
- width: "narrow",
4303
- context: "standalone"
4304
- });
4305
- case "LLLL":
4306
- default:
4307
- return localize2.month(month, {
4308
- width: "wide",
4309
- context: "standalone"
4310
- });
4311
- }
4312
- }, "L"),
4313
- w: /* @__PURE__ */ __name(function w(date, token, localize2, options) {
4314
- var week = getUTCWeek(date, options);
4315
- if (token === "wo") {
4316
- return localize2.ordinalNumber(week, {
4317
- unit: "week"
4318
- });
4319
- }
4320
- return addLeadingZeros(week, token.length);
4321
- }, "w"),
4322
- I: /* @__PURE__ */ __name(function I(date, token, localize2) {
4323
- var isoWeek = getUTCISOWeek(date);
4324
- if (token === "Io") {
4325
- return localize2.ordinalNumber(isoWeek, {
4326
- unit: "week"
4327
- });
4328
- }
4329
- return addLeadingZeros(isoWeek, token.length);
4330
- }, "I"),
4331
- d: /* @__PURE__ */ __name(function d2(date, token, localize2) {
4332
- if (token === "do") {
4333
- return localize2.ordinalNumber(date.getUTCDate(), {
4334
- unit: "date"
4335
- });
4336
- }
4337
- return lightFormatters_default.d(date, token);
4338
- }, "d"),
4339
- D: /* @__PURE__ */ __name(function D(date, token, localize2) {
4340
- var dayOfYear = getUTCDayOfYear(date);
4341
- if (token === "Do") {
4342
- return localize2.ordinalNumber(dayOfYear, {
4343
- unit: "dayOfYear"
4344
- });
4345
- }
4346
- return addLeadingZeros(dayOfYear, token.length);
4347
- }, "D"),
4348
- E: /* @__PURE__ */ __name(function E(date, token, localize2) {
4349
- var dayOfWeek = date.getUTCDay();
4350
- switch (token) {
4351
- case "E":
4352
- case "EE":
4353
- case "EEE":
4354
- return localize2.day(dayOfWeek, {
4355
- width: "abbreviated",
4356
- context: "formatting"
4357
- });
4358
- case "EEEEE":
4359
- return localize2.day(dayOfWeek, {
4360
- width: "narrow",
4361
- context: "formatting"
4362
- });
4363
- case "EEEEEE":
4364
- return localize2.day(dayOfWeek, {
4365
- width: "short",
4366
- context: "formatting"
4367
- });
4368
- case "EEEE":
4369
- default:
4370
- return localize2.day(dayOfWeek, {
4371
- width: "wide",
4372
- context: "formatting"
4373
- });
4374
- }
4375
- }, "E"),
4376
- e: /* @__PURE__ */ __name(function e(date, token, localize2, options) {
4377
- var dayOfWeek = date.getUTCDay();
4378
- var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4379
- switch (token) {
4380
- case "e":
4381
- return String(localDayOfWeek);
4382
- case "ee":
4383
- return addLeadingZeros(localDayOfWeek, 2);
4384
- case "eo":
4385
- return localize2.ordinalNumber(localDayOfWeek, {
4386
- unit: "day"
4387
- });
4388
- case "eee":
4389
- return localize2.day(dayOfWeek, {
4390
- width: "abbreviated",
4391
- context: "formatting"
4392
- });
4393
- case "eeeee":
4394
- return localize2.day(dayOfWeek, {
4395
- width: "narrow",
4396
- context: "formatting"
4397
- });
4398
- case "eeeeee":
4399
- return localize2.day(dayOfWeek, {
4400
- width: "short",
4401
- context: "formatting"
4402
- });
4403
- case "eeee":
4404
- default:
4405
- return localize2.day(dayOfWeek, {
4406
- width: "wide",
4407
- context: "formatting"
4408
- });
4409
- }
4410
- }, "e"),
4411
- c: /* @__PURE__ */ __name(function c(date, token, localize2, options) {
4412
- var dayOfWeek = date.getUTCDay();
4413
- var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4414
- switch (token) {
4415
- case "c":
4416
- return String(localDayOfWeek);
4417
- case "cc":
4418
- return addLeadingZeros(localDayOfWeek, token.length);
4419
- case "co":
4420
- return localize2.ordinalNumber(localDayOfWeek, {
4421
- unit: "day"
4422
- });
4423
- case "ccc":
4424
- return localize2.day(dayOfWeek, {
4425
- width: "abbreviated",
4426
- context: "standalone"
4427
- });
4428
- case "ccccc":
4429
- return localize2.day(dayOfWeek, {
4430
- width: "narrow",
4431
- context: "standalone"
4432
- });
4433
- case "cccccc":
4434
- return localize2.day(dayOfWeek, {
4435
- width: "short",
4436
- context: "standalone"
4437
- });
4438
- case "cccc":
4439
- default:
4440
- return localize2.day(dayOfWeek, {
4441
- width: "wide",
4442
- context: "standalone"
4443
- });
4444
- }
4445
- }, "c"),
4446
- i: /* @__PURE__ */ __name(function i(date, token, localize2) {
4447
- var dayOfWeek = date.getUTCDay();
4448
- var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
4449
- switch (token) {
4450
- case "i":
4451
- return String(isoDayOfWeek);
4452
- case "ii":
4453
- return addLeadingZeros(isoDayOfWeek, token.length);
4454
- case "io":
4455
- return localize2.ordinalNumber(isoDayOfWeek, {
4456
- unit: "day"
4457
- });
4458
- case "iii":
4459
- return localize2.day(dayOfWeek, {
4460
- width: "abbreviated",
4461
- context: "formatting"
4462
- });
4463
- case "iiiii":
4464
- return localize2.day(dayOfWeek, {
4465
- width: "narrow",
4466
- context: "formatting"
4467
- });
4468
- case "iiiiii":
4469
- return localize2.day(dayOfWeek, {
4470
- width: "short",
4471
- context: "formatting"
4472
- });
4473
- case "iiii":
4474
- default:
4475
- return localize2.day(dayOfWeek, {
4476
- width: "wide",
4477
- context: "formatting"
4478
- });
4479
- }
4480
- }, "i"),
4481
- a: /* @__PURE__ */ __name(function a2(date, token, localize2) {
4482
- var hours = date.getUTCHours();
4483
- var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4484
- switch (token) {
4485
- case "a":
4486
- case "aa":
4487
- return localize2.dayPeriod(dayPeriodEnumValue, {
4488
- width: "abbreviated",
4489
- context: "formatting"
4490
- });
4491
- case "aaa":
4492
- return localize2.dayPeriod(dayPeriodEnumValue, {
4493
- width: "abbreviated",
4494
- context: "formatting"
4495
- }).toLowerCase();
4496
- case "aaaaa":
4497
- return localize2.dayPeriod(dayPeriodEnumValue, {
4498
- width: "narrow",
4499
- context: "formatting"
4500
- });
4501
- case "aaaa":
4502
- default:
4503
- return localize2.dayPeriod(dayPeriodEnumValue, {
4504
- width: "wide",
4505
- context: "formatting"
4506
- });
4507
- }
4508
- }, "a"),
4509
- b: /* @__PURE__ */ __name(function b(date, token, localize2) {
4510
- var hours = date.getUTCHours();
4511
- var dayPeriodEnumValue;
4512
- if (hours === 12) {
4513
- dayPeriodEnumValue = dayPeriodEnum.noon;
4514
- } else if (hours === 0) {
4515
- dayPeriodEnumValue = dayPeriodEnum.midnight;
4516
- } else {
4517
- dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4518
- }
4519
- switch (token) {
4520
- case "b":
4521
- case "bb":
4522
- return localize2.dayPeriod(dayPeriodEnumValue, {
4523
- width: "abbreviated",
4524
- context: "formatting"
4525
- });
4526
- case "bbb":
4527
- return localize2.dayPeriod(dayPeriodEnumValue, {
4528
- width: "abbreviated",
4529
- context: "formatting"
4530
- }).toLowerCase();
4531
- case "bbbbb":
4532
- return localize2.dayPeriod(dayPeriodEnumValue, {
4533
- width: "narrow",
4534
- context: "formatting"
4535
- });
4536
- case "bbbb":
4537
- default:
4538
- return localize2.dayPeriod(dayPeriodEnumValue, {
4539
- width: "wide",
4540
- context: "formatting"
4541
- });
4542
- }
4543
- }, "b"),
4544
- B: /* @__PURE__ */ __name(function B(date, token, localize2) {
4545
- var hours = date.getUTCHours();
4546
- var dayPeriodEnumValue;
4547
- if (hours >= 17) {
4548
- dayPeriodEnumValue = dayPeriodEnum.evening;
4549
- } else if (hours >= 12) {
4550
- dayPeriodEnumValue = dayPeriodEnum.afternoon;
4551
- } else if (hours >= 4) {
4552
- dayPeriodEnumValue = dayPeriodEnum.morning;
4553
- } else {
4554
- dayPeriodEnumValue = dayPeriodEnum.night;
4555
- }
4556
- switch (token) {
4557
- case "B":
4558
- case "BB":
4559
- case "BBB":
4560
- return localize2.dayPeriod(dayPeriodEnumValue, {
4561
- width: "abbreviated",
4562
- context: "formatting"
4563
- });
4564
- case "BBBBB":
4565
- return localize2.dayPeriod(dayPeriodEnumValue, {
4566
- width: "narrow",
4567
- context: "formatting"
4568
- });
4569
- case "BBBB":
4570
- default:
4571
- return localize2.dayPeriod(dayPeriodEnumValue, {
4572
- width: "wide",
4573
- context: "formatting"
4574
- });
4575
- }
4576
- }, "B"),
4577
- h: /* @__PURE__ */ __name(function h2(date, token, localize2) {
4578
- if (token === "ho") {
4579
- var hours = date.getUTCHours() % 12;
4580
- if (hours === 0)
4581
- hours = 12;
4582
- return localize2.ordinalNumber(hours, {
4583
- unit: "hour"
4584
- });
4585
- }
4586
- return lightFormatters_default.h(date, token);
4587
- }, "h"),
4588
- H: /* @__PURE__ */ __name(function H2(date, token, localize2) {
4589
- if (token === "Ho") {
4590
- return localize2.ordinalNumber(date.getUTCHours(), {
4591
- unit: "hour"
4592
- });
4593
- }
4594
- return lightFormatters_default.H(date, token);
4595
- }, "H"),
4596
- K: /* @__PURE__ */ __name(function K(date, token, localize2) {
4597
- var hours = date.getUTCHours() % 12;
4598
- if (token === "Ko") {
4599
- return localize2.ordinalNumber(hours, {
4600
- unit: "hour"
4601
- });
4602
- }
4603
- return addLeadingZeros(hours, token.length);
4604
- }, "K"),
4605
- k: /* @__PURE__ */ __name(function k(date, token, localize2) {
4606
- var hours = date.getUTCHours();
4607
- if (hours === 0)
4608
- hours = 24;
4609
- if (token === "ko") {
4610
- return localize2.ordinalNumber(hours, {
4611
- unit: "hour"
4612
- });
4613
- }
4614
- return addLeadingZeros(hours, token.length);
4615
- }, "k"),
4616
- m: /* @__PURE__ */ __name(function m2(date, token, localize2) {
4617
- if (token === "mo") {
4618
- return localize2.ordinalNumber(date.getUTCMinutes(), {
4619
- unit: "minute"
4620
- });
4621
- }
4622
- return lightFormatters_default.m(date, token);
4623
- }, "m"),
4624
- s: /* @__PURE__ */ __name(function s2(date, token, localize2) {
4625
- if (token === "so") {
4626
- return localize2.ordinalNumber(date.getUTCSeconds(), {
4627
- unit: "second"
4628
- });
4108
+ }
4109
+ return number + "th";
4110
+ }, "ordinalNumber");
4111
+ var localize = {
4112
+ ordinalNumber,
4113
+ era: buildLocalizeFn({
4114
+ values: eraValues,
4115
+ defaultWidth: "wide"
4116
+ }),
4117
+ quarter: buildLocalizeFn({
4118
+ values: quarterValues,
4119
+ defaultWidth: "wide",
4120
+ argumentCallback: function(quarter) {
4121
+ return quarter - 1;
4629
4122
  }
4630
- return lightFormatters_default.s(date, token);
4631
- }, "s"),
4632
- S: /* @__PURE__ */ __name(function S2(date, token) {
4633
- return lightFormatters_default.S(date, token);
4634
- }, "S"),
4635
- X: /* @__PURE__ */ __name(function X(date, token, _localize, options) {
4636
- var originalDate = options._originalDate || date;
4637
- var timezoneOffset = originalDate.getTimezoneOffset();
4638
- if (timezoneOffset === 0) {
4639
- return "Z";
4123
+ }),
4124
+ month: buildLocalizeFn({
4125
+ values: monthValues,
4126
+ defaultWidth: "wide"
4127
+ }),
4128
+ day: buildLocalizeFn({
4129
+ values: dayValues,
4130
+ defaultWidth: "wide"
4131
+ }),
4132
+ dayPeriod: buildLocalizeFn({
4133
+ values: dayPeriodValues,
4134
+ defaultWidth: "wide",
4135
+ formattingValues: formattingDayPeriodValues,
4136
+ defaultFormattingWidth: "wide"
4137
+ })
4138
+ };
4139
+ var localize_default = localize;
4140
+
4141
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
4142
+ function buildMatchFn(args) {
4143
+ return function(string) {
4144
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4145
+ var width = options.width;
4146
+ var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
4147
+ var matchResult = string.match(matchPattern);
4148
+ if (!matchResult) {
4149
+ return null;
4640
4150
  }
4641
- switch (token) {
4642
- case "X":
4643
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
4644
- case "XXXX":
4645
- case "XX":
4646
- return formatTimezone(timezoneOffset);
4647
- case "XXXXX":
4648
- case "XXX":
4649
- default:
4650
- return formatTimezone(timezoneOffset, ":");
4151
+ var matchedString = matchResult[0];
4152
+ var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
4153
+ var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
4154
+ return pattern.test(matchedString);
4155
+ }) : findKey(parsePatterns, function(pattern) {
4156
+ return pattern.test(matchedString);
4157
+ });
4158
+ var value;
4159
+ value = args.valueCallback ? args.valueCallback(key) : key;
4160
+ value = options.valueCallback ? options.valueCallback(value) : value;
4161
+ var rest = string.slice(matchedString.length);
4162
+ return {
4163
+ value,
4164
+ rest
4165
+ };
4166
+ };
4167
+ }
4168
+ __name(buildMatchFn, "buildMatchFn");
4169
+ function findKey(object, predicate) {
4170
+ for (var key in object) {
4171
+ if (object.hasOwnProperty(key) && predicate(object[key])) {
4172
+ return key;
4651
4173
  }
4652
- }, "X"),
4653
- x: /* @__PURE__ */ __name(function x(date, token, _localize, options) {
4654
- var originalDate = options._originalDate || date;
4655
- var timezoneOffset = originalDate.getTimezoneOffset();
4656
- switch (token) {
4657
- case "x":
4658
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
4659
- case "xxxx":
4660
- case "xx":
4661
- return formatTimezone(timezoneOffset);
4662
- case "xxxxx":
4663
- case "xxx":
4664
- default:
4665
- return formatTimezone(timezoneOffset, ":");
4174
+ }
4175
+ return void 0;
4176
+ }
4177
+ __name(findKey, "findKey");
4178
+ function findIndex(array, predicate) {
4179
+ for (var key = 0; key < array.length; key++) {
4180
+ if (predicate(array[key])) {
4181
+ return key;
4666
4182
  }
4667
- }, "x"),
4668
- O: /* @__PURE__ */ __name(function O(date, token, _localize, options) {
4669
- var originalDate = options._originalDate || date;
4670
- var timezoneOffset = originalDate.getTimezoneOffset();
4671
- switch (token) {
4672
- case "O":
4673
- case "OO":
4674
- case "OOO":
4675
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
4676
- case "OOOO":
4677
- default:
4678
- return "GMT" + formatTimezone(timezoneOffset, ":");
4183
+ }
4184
+ return void 0;
4185
+ }
4186
+ __name(findIndex, "findIndex");
4187
+
4188
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
4189
+ function buildMatchPatternFn(args) {
4190
+ return function(string) {
4191
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4192
+ var matchResult = string.match(args.matchPattern);
4193
+ if (!matchResult)
4194
+ return null;
4195
+ var matchedString = matchResult[0];
4196
+ var parseResult = string.match(args.parsePattern);
4197
+ if (!parseResult)
4198
+ return null;
4199
+ var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
4200
+ value = options.valueCallback ? options.valueCallback(value) : value;
4201
+ var rest = string.slice(matchedString.length);
4202
+ return {
4203
+ value,
4204
+ rest
4205
+ };
4206
+ };
4207
+ }
4208
+ __name(buildMatchPatternFn, "buildMatchPatternFn");
4209
+
4210
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
4211
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
4212
+ var parseOrdinalNumberPattern = /\d+/i;
4213
+ var matchEraPatterns = {
4214
+ narrow: /^(b|a)/i,
4215
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
4216
+ wide: /^(before christ|before common era|anno domini|common era)/i
4217
+ };
4218
+ var parseEraPatterns = {
4219
+ any: [/^b/i, /^(a|c)/i]
4220
+ };
4221
+ var matchQuarterPatterns = {
4222
+ narrow: /^[1234]/i,
4223
+ abbreviated: /^q[1234]/i,
4224
+ wide: /^[1234](th|st|nd|rd)? quarter/i
4225
+ };
4226
+ var parseQuarterPatterns = {
4227
+ any: [/1/i, /2/i, /3/i, /4/i]
4228
+ };
4229
+ var matchMonthPatterns = {
4230
+ narrow: /^[jfmasond]/i,
4231
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
4232
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
4233
+ };
4234
+ var parseMonthPatterns = {
4235
+ narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
4236
+ any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
4237
+ };
4238
+ var matchDayPatterns = {
4239
+ narrow: /^[smtwf]/i,
4240
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
4241
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
4242
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
4243
+ };
4244
+ var parseDayPatterns = {
4245
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
4246
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
4247
+ };
4248
+ var matchDayPeriodPatterns = {
4249
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
4250
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
4251
+ };
4252
+ var parseDayPeriodPatterns = {
4253
+ any: {
4254
+ am: /^a/i,
4255
+ pm: /^p/i,
4256
+ midnight: /^mi/i,
4257
+ noon: /^no/i,
4258
+ morning: /morning/i,
4259
+ afternoon: /afternoon/i,
4260
+ evening: /evening/i,
4261
+ night: /night/i
4262
+ }
4263
+ };
4264
+ var match = {
4265
+ ordinalNumber: buildMatchPatternFn({
4266
+ matchPattern: matchOrdinalNumberPattern,
4267
+ parsePattern: parseOrdinalNumberPattern,
4268
+ valueCallback: function(value) {
4269
+ return parseInt(value, 10);
4679
4270
  }
4680
- }, "O"),
4681
- z: /* @__PURE__ */ __name(function z(date, token, _localize, options) {
4682
- var originalDate = options._originalDate || date;
4683
- var timezoneOffset = originalDate.getTimezoneOffset();
4684
- switch (token) {
4685
- case "z":
4686
- case "zz":
4687
- case "zzz":
4688
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
4689
- case "zzzz":
4690
- default:
4691
- return "GMT" + formatTimezone(timezoneOffset, ":");
4271
+ }),
4272
+ era: buildMatchFn({
4273
+ matchPatterns: matchEraPatterns,
4274
+ defaultMatchWidth: "wide",
4275
+ parsePatterns: parseEraPatterns,
4276
+ defaultParseWidth: "any"
4277
+ }),
4278
+ quarter: buildMatchFn({
4279
+ matchPatterns: matchQuarterPatterns,
4280
+ defaultMatchWidth: "wide",
4281
+ parsePatterns: parseQuarterPatterns,
4282
+ defaultParseWidth: "any",
4283
+ valueCallback: function(index) {
4284
+ return index + 1;
4692
4285
  }
4693
- }, "z"),
4694
- t: /* @__PURE__ */ __name(function t(date, token, _localize, options) {
4695
- var originalDate = options._originalDate || date;
4696
- var timestamp = Math.floor(originalDate.getTime() / 1e3);
4697
- return addLeadingZeros(timestamp, token.length);
4698
- }, "t"),
4699
- T: /* @__PURE__ */ __name(function T(date, token, _localize, options) {
4700
- var originalDate = options._originalDate || date;
4701
- var timestamp = originalDate.getTime();
4702
- return addLeadingZeros(timestamp, token.length);
4703
- }, "T")
4286
+ }),
4287
+ month: buildMatchFn({
4288
+ matchPatterns: matchMonthPatterns,
4289
+ defaultMatchWidth: "wide",
4290
+ parsePatterns: parseMonthPatterns,
4291
+ defaultParseWidth: "any"
4292
+ }),
4293
+ day: buildMatchFn({
4294
+ matchPatterns: matchDayPatterns,
4295
+ defaultMatchWidth: "wide",
4296
+ parsePatterns: parseDayPatterns,
4297
+ defaultParseWidth: "any"
4298
+ }),
4299
+ dayPeriod: buildMatchFn({
4300
+ matchPatterns: matchDayPeriodPatterns,
4301
+ defaultMatchWidth: "any",
4302
+ parsePatterns: parseDayPeriodPatterns,
4303
+ defaultParseWidth: "any"
4304
+ })
4704
4305
  };
4705
- function formatTimezoneShort(offset, dirtyDelimiter) {
4706
- var sign = offset > 0 ? "-" : "+";
4707
- var absOffset = Math.abs(offset);
4708
- var hours = Math.floor(absOffset / 60);
4709
- var minutes = absOffset % 60;
4710
- if (minutes === 0) {
4711
- return sign + String(hours);
4306
+ var match_default = match;
4307
+
4308
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/index.js
4309
+ var locale = {
4310
+ code: "en-US",
4311
+ formatDistance: formatDistance_default,
4312
+ formatLong: formatLong_default,
4313
+ formatRelative: formatRelative_default,
4314
+ localize: localize_default,
4315
+ match: match_default,
4316
+ options: {
4317
+ weekStartsOn: 0,
4318
+ firstWeekContainsDate: 1
4319
+ }
4320
+ };
4321
+ var en_US_default = locale;
4322
+
4323
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subMilliseconds/index.js
4324
+ function subMilliseconds(dirtyDate, dirtyAmount) {
4325
+ requiredArgs(2, arguments);
4326
+ var amount = toInteger(dirtyAmount);
4327
+ return addMilliseconds(dirtyDate, -amount);
4328
+ }
4329
+ __name(subMilliseconds, "subMilliseconds");
4330
+
4331
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
4332
+ var MILLISECONDS_IN_DAY = 864e5;
4333
+ function getUTCDayOfYear(dirtyDate) {
4334
+ requiredArgs(1, arguments);
4335
+ var date = toDate(dirtyDate);
4336
+ var timestamp = date.getTime();
4337
+ date.setUTCMonth(0, 1);
4338
+ date.setUTCHours(0, 0, 0, 0);
4339
+ var startOfYearTimestamp = date.getTime();
4340
+ var difference = timestamp - startOfYearTimestamp;
4341
+ return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
4342
+ }
4343
+ __name(getUTCDayOfYear, "getUTCDayOfYear");
4344
+
4345
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
4346
+ function startOfUTCISOWeek(dirtyDate) {
4347
+ requiredArgs(1, arguments);
4348
+ var weekStartsOn = 1;
4349
+ var date = toDate(dirtyDate);
4350
+ var day = date.getUTCDay();
4351
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
4352
+ date.setUTCDate(date.getUTCDate() - diff);
4353
+ date.setUTCHours(0, 0, 0, 0);
4354
+ return date;
4355
+ }
4356
+ __name(startOfUTCISOWeek, "startOfUTCISOWeek");
4357
+
4358
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
4359
+ function getUTCISOWeekYear(dirtyDate) {
4360
+ requiredArgs(1, arguments);
4361
+ var date = toDate(dirtyDate);
4362
+ var year = date.getUTCFullYear();
4363
+ var fourthOfJanuaryOfNextYear = new Date(0);
4364
+ fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
4365
+ fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
4366
+ var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
4367
+ var fourthOfJanuaryOfThisYear = new Date(0);
4368
+ fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
4369
+ fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
4370
+ var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
4371
+ if (date.getTime() >= startOfNextYear.getTime()) {
4372
+ return year + 1;
4373
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
4374
+ return year;
4375
+ } else {
4376
+ return year - 1;
4712
4377
  }
4713
- var delimiter = dirtyDelimiter || "";
4714
- return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
4715
4378
  }
4716
- __name(formatTimezoneShort, "formatTimezoneShort");
4717
- function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
4718
- if (offset % 60 === 0) {
4719
- var sign = offset > 0 ? "-" : "+";
4720
- return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
4721
- }
4722
- return formatTimezone(offset, dirtyDelimiter);
4379
+ __name(getUTCISOWeekYear, "getUTCISOWeekYear");
4380
+
4381
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
4382
+ function startOfUTCISOWeekYear(dirtyDate) {
4383
+ requiredArgs(1, arguments);
4384
+ var year = getUTCISOWeekYear(dirtyDate);
4385
+ var fourthOfJanuary = new Date(0);
4386
+ fourthOfJanuary.setUTCFullYear(year, 0, 4);
4387
+ fourthOfJanuary.setUTCHours(0, 0, 0, 0);
4388
+ var date = startOfUTCISOWeek(fourthOfJanuary);
4389
+ return date;
4723
4390
  }
4724
- __name(formatTimezoneWithOptionalMinutes, "formatTimezoneWithOptionalMinutes");
4725
- function formatTimezone(offset, dirtyDelimiter) {
4726
- var delimiter = dirtyDelimiter || "";
4727
- var sign = offset > 0 ? "-" : "+";
4728
- var absOffset = Math.abs(offset);
4729
- var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
4730
- var minutes = addLeadingZeros(absOffset % 60, 2);
4731
- return sign + hours + delimiter + minutes;
4391
+ __name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
4392
+
4393
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
4394
+ var MILLISECONDS_IN_WEEK = 6048e5;
4395
+ function getUTCISOWeek(dirtyDate) {
4396
+ requiredArgs(1, arguments);
4397
+ var date = toDate(dirtyDate);
4398
+ var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
4399
+ return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
4732
4400
  }
4733
- __name(formatTimezone, "formatTimezone");
4734
- var formatters_default = formatters2;
4401
+ __name(getUTCISOWeek, "getUTCISOWeek");
4735
4402
 
4736
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/longFormatters/index.js
4737
- var dateLongFormatter = /* @__PURE__ */ __name(function dateLongFormatter2(pattern, formatLong2) {
4738
- switch (pattern) {
4739
- case "P":
4740
- return formatLong2.date({
4741
- width: "short"
4742
- });
4743
- case "PP":
4744
- return formatLong2.date({
4745
- width: "medium"
4746
- });
4747
- case "PPP":
4748
- return formatLong2.date({
4749
- width: "long"
4750
- });
4751
- case "PPPP":
4752
- default:
4753
- return formatLong2.date({
4754
- width: "full"
4755
- });
4756
- }
4757
- }, "dateLongFormatter");
4758
- var timeLongFormatter = /* @__PURE__ */ __name(function timeLongFormatter2(pattern, formatLong2) {
4759
- switch (pattern) {
4760
- case "p":
4761
- return formatLong2.time({
4762
- width: "short"
4763
- });
4764
- case "pp":
4765
- return formatLong2.time({
4766
- width: "medium"
4767
- });
4768
- case "ppp":
4769
- return formatLong2.time({
4770
- width: "long"
4771
- });
4772
- case "pppp":
4773
- default:
4774
- return formatLong2.time({
4775
- width: "full"
4776
- });
4403
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
4404
+ function startOfUTCWeek(dirtyDate, dirtyOptions) {
4405
+ requiredArgs(1, arguments);
4406
+ var options = dirtyOptions || {};
4407
+ var locale2 = options.locale;
4408
+ var localeWeekStartsOn = locale2 && locale2.options && locale2.options.weekStartsOn;
4409
+ var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
4410
+ var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
4411
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
4412
+ throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
4777
4413
  }
4778
- }, "timeLongFormatter");
4779
- var dateTimeLongFormatter = /* @__PURE__ */ __name(function dateTimeLongFormatter2(pattern, formatLong2) {
4780
- var matchResult = pattern.match(/(P+)(p+)?/) || [];
4781
- var datePattern = matchResult[1];
4782
- var timePattern = matchResult[2];
4783
- if (!timePattern) {
4784
- return dateLongFormatter(pattern, formatLong2);
4414
+ var date = toDate(dirtyDate);
4415
+ var day = date.getUTCDay();
4416
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
4417
+ date.setUTCDate(date.getUTCDate() - diff);
4418
+ date.setUTCHours(0, 0, 0, 0);
4419
+ return date;
4420
+ }
4421
+ __name(startOfUTCWeek, "startOfUTCWeek");
4422
+
4423
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
4424
+ function getUTCWeekYear(dirtyDate, dirtyOptions) {
4425
+ requiredArgs(1, arguments);
4426
+ var date = toDate(dirtyDate);
4427
+ var year = date.getUTCFullYear();
4428
+ var options = dirtyOptions || {};
4429
+ var locale2 = options.locale;
4430
+ var localeFirstWeekContainsDate = locale2 && locale2.options && locale2.options.firstWeekContainsDate;
4431
+ var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
4432
+ var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
4433
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
4434
+ throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
4785
4435
  }
4786
- var dateTimeFormat;
4787
- switch (datePattern) {
4788
- case "P":
4789
- dateTimeFormat = formatLong2.dateTime({
4790
- width: "short"
4791
- });
4792
- break;
4793
- case "PP":
4794
- dateTimeFormat = formatLong2.dateTime({
4795
- width: "medium"
4796
- });
4797
- break;
4798
- case "PPP":
4799
- dateTimeFormat = formatLong2.dateTime({
4800
- width: "long"
4801
- });
4802
- break;
4803
- case "PPPP":
4804
- default:
4805
- dateTimeFormat = formatLong2.dateTime({
4806
- width: "full"
4807
- });
4808
- break;
4436
+ var firstWeekOfNextYear = new Date(0);
4437
+ firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
4438
+ firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
4439
+ var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions);
4440
+ var firstWeekOfThisYear = new Date(0);
4441
+ firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
4442
+ firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
4443
+ var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, dirtyOptions);
4444
+ if (date.getTime() >= startOfNextYear.getTime()) {
4445
+ return year + 1;
4446
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
4447
+ return year;
4448
+ } else {
4449
+ return year - 1;
4809
4450
  }
4810
- return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
4811
- }, "dateTimeLongFormatter");
4812
- var longFormatters = {
4813
- p: timeLongFormatter,
4814
- P: dateTimeLongFormatter
4815
- };
4816
- var longFormatters_default = longFormatters;
4451
+ }
4452
+ __name(getUTCWeekYear, "getUTCWeekYear");
4817
4453
 
4818
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/protectedTokens/index.js
4819
- var protectedDayOfYearTokens = ["D", "DD"];
4820
- var protectedWeekYearTokens = ["YY", "YYYY"];
4821
- function isProtectedDayOfYearToken(token) {
4822
- return protectedDayOfYearTokens.indexOf(token) !== -1;
4454
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
4455
+ function startOfUTCWeekYear(dirtyDate, dirtyOptions) {
4456
+ requiredArgs(1, arguments);
4457
+ var options = dirtyOptions || {};
4458
+ var locale2 = options.locale;
4459
+ var localeFirstWeekContainsDate = locale2 && locale2.options && locale2.options.firstWeekContainsDate;
4460
+ var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
4461
+ var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
4462
+ var year = getUTCWeekYear(dirtyDate, dirtyOptions);
4463
+ var firstWeek = new Date(0);
4464
+ firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
4465
+ firstWeek.setUTCHours(0, 0, 0, 0);
4466
+ var date = startOfUTCWeek(firstWeek, dirtyOptions);
4467
+ return date;
4823
4468
  }
4824
- __name(isProtectedDayOfYearToken, "isProtectedDayOfYearToken");
4825
- function isProtectedWeekYearToken(token) {
4826
- return protectedWeekYearTokens.indexOf(token) !== -1;
4469
+ __name(startOfUTCWeekYear, "startOfUTCWeekYear");
4470
+
4471
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeek/index.js
4472
+ var MILLISECONDS_IN_WEEK2 = 6048e5;
4473
+ function getUTCWeek(dirtyDate, options) {
4474
+ requiredArgs(1, arguments);
4475
+ var date = toDate(dirtyDate);
4476
+ var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
4477
+ return Math.round(diff / MILLISECONDS_IN_WEEK2) + 1;
4827
4478
  }
4828
- __name(isProtectedWeekYearToken, "isProtectedWeekYearToken");
4829
- function throwProtectedError(token, format2, input) {
4830
- if (token === "YYYY") {
4831
- throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
4832
- } else if (token === "YY") {
4833
- throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
4834
- } else if (token === "D") {
4835
- throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
4836
- } else if (token === "DD") {
4837
- throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
4479
+ __name(getUTCWeek, "getUTCWeek");
4480
+
4481
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
4482
+ function addLeadingZeros(number, targetLength) {
4483
+ var sign = number < 0 ? "-" : "";
4484
+ var output = Math.abs(number).toString();
4485
+ while (output.length < targetLength) {
4486
+ output = "0" + output;
4838
4487
  }
4488
+ return sign + output;
4839
4489
  }
4840
- __name(throwProtectedError, "throwProtectedError");
4490
+ __name(addLeadingZeros, "addLeadingZeros");
4841
4491
 
4842
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
4843
- var formatDistanceLocale = {
4844
- lessThanXSeconds: {
4845
- one: "less than a second",
4846
- other: "less than {{count}} seconds"
4492
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
4493
+ var formatters = {
4494
+ y: function(date, token) {
4495
+ var signedYear = date.getUTCFullYear();
4496
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
4497
+ return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
4498
+ },
4499
+ M: function(date, token) {
4500
+ var month = date.getUTCMonth();
4501
+ return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
4502
+ },
4503
+ d: function(date, token) {
4504
+ return addLeadingZeros(date.getUTCDate(), token.length);
4505
+ },
4506
+ a: function(date, token) {
4507
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
4508
+ switch (token) {
4509
+ case "a":
4510
+ case "aa":
4511
+ return dayPeriodEnumValue.toUpperCase();
4512
+ case "aaa":
4513
+ return dayPeriodEnumValue;
4514
+ case "aaaaa":
4515
+ return dayPeriodEnumValue[0];
4516
+ case "aaaa":
4517
+ default:
4518
+ return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
4519
+ }
4520
+ },
4521
+ h: function(date, token) {
4522
+ return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
4523
+ },
4524
+ H: function(date, token) {
4525
+ return addLeadingZeros(date.getUTCHours(), token.length);
4526
+ },
4527
+ m: function(date, token) {
4528
+ return addLeadingZeros(date.getUTCMinutes(), token.length);
4529
+ },
4530
+ s: function(date, token) {
4531
+ return addLeadingZeros(date.getUTCSeconds(), token.length);
4532
+ },
4533
+ S: function(date, token) {
4534
+ var numberOfDigits = token.length;
4535
+ var milliseconds = date.getUTCMilliseconds();
4536
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
4537
+ return addLeadingZeros(fractionalSeconds, token.length);
4538
+ }
4539
+ };
4540
+ var lightFormatters_default = formatters;
4541
+
4542
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/formatters/index.js
4543
+ var dayPeriodEnum = {
4544
+ am: "am",
4545
+ pm: "pm",
4546
+ midnight: "midnight",
4547
+ noon: "noon",
4548
+ morning: "morning",
4549
+ afternoon: "afternoon",
4550
+ evening: "evening",
4551
+ night: "night"
4552
+ };
4553
+ var formatters2 = {
4554
+ G: function(date, token, localize2) {
4555
+ var era = date.getUTCFullYear() > 0 ? 1 : 0;
4556
+ switch (token) {
4557
+ case "G":
4558
+ case "GG":
4559
+ case "GGG":
4560
+ return localize2.era(era, {
4561
+ width: "abbreviated"
4562
+ });
4563
+ case "GGGGG":
4564
+ return localize2.era(era, {
4565
+ width: "narrow"
4566
+ });
4567
+ case "GGGG":
4568
+ default:
4569
+ return localize2.era(era, {
4570
+ width: "wide"
4571
+ });
4572
+ }
4847
4573
  },
4848
- xSeconds: {
4849
- one: "1 second",
4850
- other: "{{count}} seconds"
4574
+ y: function(date, token, localize2) {
4575
+ if (token === "yo") {
4576
+ var signedYear = date.getUTCFullYear();
4577
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
4578
+ return localize2.ordinalNumber(year, {
4579
+ unit: "year"
4580
+ });
4581
+ }
4582
+ return lightFormatters_default.y(date, token);
4851
4583
  },
4852
- halfAMinute: "half a minute",
4853
- lessThanXMinutes: {
4854
- one: "less than a minute",
4855
- other: "less than {{count}} minutes"
4584
+ Y: function(date, token, localize2, options) {
4585
+ var signedWeekYear = getUTCWeekYear(date, options);
4586
+ var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
4587
+ if (token === "YY") {
4588
+ var twoDigitYear = weekYear % 100;
4589
+ return addLeadingZeros(twoDigitYear, 2);
4590
+ }
4591
+ if (token === "Yo") {
4592
+ return localize2.ordinalNumber(weekYear, {
4593
+ unit: "year"
4594
+ });
4595
+ }
4596
+ return addLeadingZeros(weekYear, token.length);
4856
4597
  },
4857
- xMinutes: {
4858
- one: "1 minute",
4859
- other: "{{count}} minutes"
4598
+ R: function(date, token) {
4599
+ var isoWeekYear = getUTCISOWeekYear(date);
4600
+ return addLeadingZeros(isoWeekYear, token.length);
4860
4601
  },
4861
- aboutXHours: {
4862
- one: "about 1 hour",
4863
- other: "about {{count}} hours"
4602
+ u: function(date, token) {
4603
+ var year = date.getUTCFullYear();
4604
+ return addLeadingZeros(year, token.length);
4864
4605
  },
4865
- xHours: {
4866
- one: "1 hour",
4867
- other: "{{count}} hours"
4606
+ Q: function(date, token, localize2) {
4607
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4608
+ switch (token) {
4609
+ case "Q":
4610
+ return String(quarter);
4611
+ case "QQ":
4612
+ return addLeadingZeros(quarter, 2);
4613
+ case "Qo":
4614
+ return localize2.ordinalNumber(quarter, {
4615
+ unit: "quarter"
4616
+ });
4617
+ case "QQQ":
4618
+ return localize2.quarter(quarter, {
4619
+ width: "abbreviated",
4620
+ context: "formatting"
4621
+ });
4622
+ case "QQQQQ":
4623
+ return localize2.quarter(quarter, {
4624
+ width: "narrow",
4625
+ context: "formatting"
4626
+ });
4627
+ case "QQQQ":
4628
+ default:
4629
+ return localize2.quarter(quarter, {
4630
+ width: "wide",
4631
+ context: "formatting"
4632
+ });
4633
+ }
4868
4634
  },
4869
- xDays: {
4870
- one: "1 day",
4871
- other: "{{count}} days"
4635
+ q: function(date, token, localize2) {
4636
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4637
+ switch (token) {
4638
+ case "q":
4639
+ return String(quarter);
4640
+ case "qq":
4641
+ return addLeadingZeros(quarter, 2);
4642
+ case "qo":
4643
+ return localize2.ordinalNumber(quarter, {
4644
+ unit: "quarter"
4645
+ });
4646
+ case "qqq":
4647
+ return localize2.quarter(quarter, {
4648
+ width: "abbreviated",
4649
+ context: "standalone"
4650
+ });
4651
+ case "qqqqq":
4652
+ return localize2.quarter(quarter, {
4653
+ width: "narrow",
4654
+ context: "standalone"
4655
+ });
4656
+ case "qqqq":
4657
+ default:
4658
+ return localize2.quarter(quarter, {
4659
+ width: "wide",
4660
+ context: "standalone"
4661
+ });
4662
+ }
4872
4663
  },
4873
- aboutXWeeks: {
4874
- one: "about 1 week",
4875
- other: "about {{count}} weeks"
4664
+ M: function(date, token, localize2) {
4665
+ var month = date.getUTCMonth();
4666
+ switch (token) {
4667
+ case "M":
4668
+ case "MM":
4669
+ return lightFormatters_default.M(date, token);
4670
+ case "Mo":
4671
+ return localize2.ordinalNumber(month + 1, {
4672
+ unit: "month"
4673
+ });
4674
+ case "MMM":
4675
+ return localize2.month(month, {
4676
+ width: "abbreviated",
4677
+ context: "formatting"
4678
+ });
4679
+ case "MMMMM":
4680
+ return localize2.month(month, {
4681
+ width: "narrow",
4682
+ context: "formatting"
4683
+ });
4684
+ case "MMMM":
4685
+ default:
4686
+ return localize2.month(month, {
4687
+ width: "wide",
4688
+ context: "formatting"
4689
+ });
4690
+ }
4876
4691
  },
4877
- xWeeks: {
4878
- one: "1 week",
4879
- other: "{{count}} weeks"
4692
+ L: function(date, token, localize2) {
4693
+ var month = date.getUTCMonth();
4694
+ switch (token) {
4695
+ case "L":
4696
+ return String(month + 1);
4697
+ case "LL":
4698
+ return addLeadingZeros(month + 1, 2);
4699
+ case "Lo":
4700
+ return localize2.ordinalNumber(month + 1, {
4701
+ unit: "month"
4702
+ });
4703
+ case "LLL":
4704
+ return localize2.month(month, {
4705
+ width: "abbreviated",
4706
+ context: "standalone"
4707
+ });
4708
+ case "LLLLL":
4709
+ return localize2.month(month, {
4710
+ width: "narrow",
4711
+ context: "standalone"
4712
+ });
4713
+ case "LLLL":
4714
+ default:
4715
+ return localize2.month(month, {
4716
+ width: "wide",
4717
+ context: "standalone"
4718
+ });
4719
+ }
4880
4720
  },
4881
- aboutXMonths: {
4882
- one: "about 1 month",
4883
- other: "about {{count}} months"
4721
+ w: function(date, token, localize2, options) {
4722
+ var week = getUTCWeek(date, options);
4723
+ if (token === "wo") {
4724
+ return localize2.ordinalNumber(week, {
4725
+ unit: "week"
4726
+ });
4727
+ }
4728
+ return addLeadingZeros(week, token.length);
4884
4729
  },
4885
- xMonths: {
4886
- one: "1 month",
4887
- other: "{{count}} months"
4730
+ I: function(date, token, localize2) {
4731
+ var isoWeek = getUTCISOWeek(date);
4732
+ if (token === "Io") {
4733
+ return localize2.ordinalNumber(isoWeek, {
4734
+ unit: "week"
4735
+ });
4736
+ }
4737
+ return addLeadingZeros(isoWeek, token.length);
4738
+ },
4739
+ d: function(date, token, localize2) {
4740
+ if (token === "do") {
4741
+ return localize2.ordinalNumber(date.getUTCDate(), {
4742
+ unit: "date"
4743
+ });
4744
+ }
4745
+ return lightFormatters_default.d(date, token);
4746
+ },
4747
+ D: function(date, token, localize2) {
4748
+ var dayOfYear = getUTCDayOfYear(date);
4749
+ if (token === "Do") {
4750
+ return localize2.ordinalNumber(dayOfYear, {
4751
+ unit: "dayOfYear"
4752
+ });
4753
+ }
4754
+ return addLeadingZeros(dayOfYear, token.length);
4755
+ },
4756
+ E: function(date, token, localize2) {
4757
+ var dayOfWeek = date.getUTCDay();
4758
+ switch (token) {
4759
+ case "E":
4760
+ case "EE":
4761
+ case "EEE":
4762
+ return localize2.day(dayOfWeek, {
4763
+ width: "abbreviated",
4764
+ context: "formatting"
4765
+ });
4766
+ case "EEEEE":
4767
+ return localize2.day(dayOfWeek, {
4768
+ width: "narrow",
4769
+ context: "formatting"
4770
+ });
4771
+ case "EEEEEE":
4772
+ return localize2.day(dayOfWeek, {
4773
+ width: "short",
4774
+ context: "formatting"
4775
+ });
4776
+ case "EEEE":
4777
+ default:
4778
+ return localize2.day(dayOfWeek, {
4779
+ width: "wide",
4780
+ context: "formatting"
4781
+ });
4782
+ }
4783
+ },
4784
+ e: function(date, token, localize2, options) {
4785
+ var dayOfWeek = date.getUTCDay();
4786
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4787
+ switch (token) {
4788
+ case "e":
4789
+ return String(localDayOfWeek);
4790
+ case "ee":
4791
+ return addLeadingZeros(localDayOfWeek, 2);
4792
+ case "eo":
4793
+ return localize2.ordinalNumber(localDayOfWeek, {
4794
+ unit: "day"
4795
+ });
4796
+ case "eee":
4797
+ return localize2.day(dayOfWeek, {
4798
+ width: "abbreviated",
4799
+ context: "formatting"
4800
+ });
4801
+ case "eeeee":
4802
+ return localize2.day(dayOfWeek, {
4803
+ width: "narrow",
4804
+ context: "formatting"
4805
+ });
4806
+ case "eeeeee":
4807
+ return localize2.day(dayOfWeek, {
4808
+ width: "short",
4809
+ context: "formatting"
4810
+ });
4811
+ case "eeee":
4812
+ default:
4813
+ return localize2.day(dayOfWeek, {
4814
+ width: "wide",
4815
+ context: "formatting"
4816
+ });
4817
+ }
4888
4818
  },
4889
- aboutXYears: {
4890
- one: "about 1 year",
4891
- other: "about {{count}} years"
4819
+ c: function(date, token, localize2, options) {
4820
+ var dayOfWeek = date.getUTCDay();
4821
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4822
+ switch (token) {
4823
+ case "c":
4824
+ return String(localDayOfWeek);
4825
+ case "cc":
4826
+ return addLeadingZeros(localDayOfWeek, token.length);
4827
+ case "co":
4828
+ return localize2.ordinalNumber(localDayOfWeek, {
4829
+ unit: "day"
4830
+ });
4831
+ case "ccc":
4832
+ return localize2.day(dayOfWeek, {
4833
+ width: "abbreviated",
4834
+ context: "standalone"
4835
+ });
4836
+ case "ccccc":
4837
+ return localize2.day(dayOfWeek, {
4838
+ width: "narrow",
4839
+ context: "standalone"
4840
+ });
4841
+ case "cccccc":
4842
+ return localize2.day(dayOfWeek, {
4843
+ width: "short",
4844
+ context: "standalone"
4845
+ });
4846
+ case "cccc":
4847
+ default:
4848
+ return localize2.day(dayOfWeek, {
4849
+ width: "wide",
4850
+ context: "standalone"
4851
+ });
4852
+ }
4892
4853
  },
4893
- xYears: {
4894
- one: "1 year",
4895
- other: "{{count}} years"
4854
+ i: function(date, token, localize2) {
4855
+ var dayOfWeek = date.getUTCDay();
4856
+ var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
4857
+ switch (token) {
4858
+ case "i":
4859
+ return String(isoDayOfWeek);
4860
+ case "ii":
4861
+ return addLeadingZeros(isoDayOfWeek, token.length);
4862
+ case "io":
4863
+ return localize2.ordinalNumber(isoDayOfWeek, {
4864
+ unit: "day"
4865
+ });
4866
+ case "iii":
4867
+ return localize2.day(dayOfWeek, {
4868
+ width: "abbreviated",
4869
+ context: "formatting"
4870
+ });
4871
+ case "iiiii":
4872
+ return localize2.day(dayOfWeek, {
4873
+ width: "narrow",
4874
+ context: "formatting"
4875
+ });
4876
+ case "iiiiii":
4877
+ return localize2.day(dayOfWeek, {
4878
+ width: "short",
4879
+ context: "formatting"
4880
+ });
4881
+ case "iiii":
4882
+ default:
4883
+ return localize2.day(dayOfWeek, {
4884
+ width: "wide",
4885
+ context: "formatting"
4886
+ });
4887
+ }
4896
4888
  },
4897
- overXYears: {
4898
- one: "over 1 year",
4899
- other: "over {{count}} years"
4889
+ a: function(date, token, localize2) {
4890
+ var hours = date.getUTCHours();
4891
+ var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4892
+ switch (token) {
4893
+ case "a":
4894
+ case "aa":
4895
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4896
+ width: "abbreviated",
4897
+ context: "formatting"
4898
+ });
4899
+ case "aaa":
4900
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4901
+ width: "abbreviated",
4902
+ context: "formatting"
4903
+ }).toLowerCase();
4904
+ case "aaaaa":
4905
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4906
+ width: "narrow",
4907
+ context: "formatting"
4908
+ });
4909
+ case "aaaa":
4910
+ default:
4911
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4912
+ width: "wide",
4913
+ context: "formatting"
4914
+ });
4915
+ }
4900
4916
  },
4901
- almostXYears: {
4902
- one: "almost 1 year",
4903
- other: "almost {{count}} years"
4904
- }
4905
- };
4906
- var formatDistance = /* @__PURE__ */ __name(function formatDistance2(token, count, options) {
4907
- var result;
4908
- var tokenValue = formatDistanceLocale[token];
4909
- if (typeof tokenValue === "string") {
4910
- result = tokenValue;
4911
- } else if (count === 1) {
4912
- result = tokenValue.one;
4913
- } else {
4914
- result = tokenValue.other.replace("{{count}}", count.toString());
4915
- }
4916
- if (options !== null && options !== void 0 && options.addSuffix) {
4917
- if (options.comparison && options.comparison > 0) {
4918
- return "in " + result;
4917
+ b: function(date, token, localize2) {
4918
+ var hours = date.getUTCHours();
4919
+ var dayPeriodEnumValue;
4920
+ if (hours === 12) {
4921
+ dayPeriodEnumValue = dayPeriodEnum.noon;
4922
+ } else if (hours === 0) {
4923
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
4919
4924
  } else {
4920
- return result + " ago";
4925
+ dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4921
4926
  }
4922
- }
4923
- return result;
4924
- }, "formatDistance");
4925
- var formatDistance_default = formatDistance;
4926
-
4927
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
4928
- function buildFormatLongFn(args) {
4929
- return function() {
4930
- var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4931
- var width = options.width ? String(options.width) : args.defaultWidth;
4932
- var format2 = args.formats[width] || args.formats[args.defaultWidth];
4933
- return format2;
4934
- };
4935
- }
4936
- __name(buildFormatLongFn, "buildFormatLongFn");
4937
-
4938
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
4939
- var dateFormats = {
4940
- full: "EEEE, MMMM do, y",
4941
- long: "MMMM do, y",
4942
- medium: "MMM d, y",
4943
- short: "MM/dd/yyyy"
4944
- };
4945
- var timeFormats = {
4946
- full: "h:mm:ss a zzzz",
4947
- long: "h:mm:ss a z",
4948
- medium: "h:mm:ss a",
4949
- short: "h:mm a"
4950
- };
4951
- var dateTimeFormats = {
4952
- full: "{{date}} 'at' {{time}}",
4953
- long: "{{date}} 'at' {{time}}",
4954
- medium: "{{date}}, {{time}}",
4955
- short: "{{date}}, {{time}}"
4956
- };
4957
- var formatLong = {
4958
- date: buildFormatLongFn({
4959
- formats: dateFormats,
4960
- defaultWidth: "full"
4961
- }),
4962
- time: buildFormatLongFn({
4963
- formats: timeFormats,
4964
- defaultWidth: "full"
4965
- }),
4966
- dateTime: buildFormatLongFn({
4967
- formats: dateTimeFormats,
4968
- defaultWidth: "full"
4969
- })
4970
- };
4971
- var formatLong_default = formatLong;
4972
-
4973
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
4974
- var formatRelativeLocale = {
4975
- lastWeek: "'last' eeee 'at' p",
4976
- yesterday: "'yesterday at' p",
4977
- today: "'today at' p",
4978
- tomorrow: "'tomorrow at' p",
4979
- nextWeek: "eeee 'at' p",
4980
- other: "P"
4981
- };
4982
- var formatRelative = /* @__PURE__ */ __name(function formatRelative2(token, _date, _baseDate, _options) {
4983
- return formatRelativeLocale[token];
4984
- }, "formatRelative");
4985
- var formatRelative_default = formatRelative;
4986
-
4987
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
4988
- function buildLocalizeFn(args) {
4989
- return function(dirtyIndex, options) {
4990
- var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
4991
- var valuesArray;
4992
- if (context === "formatting" && args.formattingValues) {
4993
- var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
4994
- var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
4995
- valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
4927
+ switch (token) {
4928
+ case "b":
4929
+ case "bb":
4930
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4931
+ width: "abbreviated",
4932
+ context: "formatting"
4933
+ });
4934
+ case "bbb":
4935
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4936
+ width: "abbreviated",
4937
+ context: "formatting"
4938
+ }).toLowerCase();
4939
+ case "bbbbb":
4940
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4941
+ width: "narrow",
4942
+ context: "formatting"
4943
+ });
4944
+ case "bbbb":
4945
+ default:
4946
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4947
+ width: "wide",
4948
+ context: "formatting"
4949
+ });
4950
+ }
4951
+ },
4952
+ B: function(date, token, localize2) {
4953
+ var hours = date.getUTCHours();
4954
+ var dayPeriodEnumValue;
4955
+ if (hours >= 17) {
4956
+ dayPeriodEnumValue = dayPeriodEnum.evening;
4957
+ } else if (hours >= 12) {
4958
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
4959
+ } else if (hours >= 4) {
4960
+ dayPeriodEnumValue = dayPeriodEnum.morning;
4996
4961
  } else {
4997
- var _defaultWidth = args.defaultWidth;
4998
- var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
4999
- valuesArray = args.values[_width] || args.values[_defaultWidth];
4962
+ dayPeriodEnumValue = dayPeriodEnum.night;
4963
+ }
4964
+ switch (token) {
4965
+ case "B":
4966
+ case "BB":
4967
+ case "BBB":
4968
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4969
+ width: "abbreviated",
4970
+ context: "formatting"
4971
+ });
4972
+ case "BBBBB":
4973
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4974
+ width: "narrow",
4975
+ context: "formatting"
4976
+ });
4977
+ case "BBBB":
4978
+ default:
4979
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4980
+ width: "wide",
4981
+ context: "formatting"
4982
+ });
4983
+ }
4984
+ },
4985
+ h: function(date, token, localize2) {
4986
+ if (token === "ho") {
4987
+ var hours = date.getUTCHours() % 12;
4988
+ if (hours === 0)
4989
+ hours = 12;
4990
+ return localize2.ordinalNumber(hours, {
4991
+ unit: "hour"
4992
+ });
5000
4993
  }
5001
- var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
5002
- return valuesArray[index];
5003
- };
5004
- }
5005
- __name(buildLocalizeFn, "buildLocalizeFn");
5006
-
5007
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
5008
- var eraValues = {
5009
- narrow: ["B", "A"],
5010
- abbreviated: ["BC", "AD"],
5011
- wide: ["Before Christ", "Anno Domini"]
5012
- };
5013
- var quarterValues = {
5014
- narrow: ["1", "2", "3", "4"],
5015
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
5016
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
5017
- };
5018
- var monthValues = {
5019
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
5020
- abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
5021
- wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
5022
- };
5023
- var dayValues = {
5024
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
5025
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
5026
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
5027
- wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
5028
- };
5029
- var dayPeriodValues = {
5030
- narrow: {
5031
- am: "a",
5032
- pm: "p",
5033
- midnight: "mi",
5034
- noon: "n",
5035
- morning: "morning",
5036
- afternoon: "afternoon",
5037
- evening: "evening",
5038
- night: "night"
4994
+ return lightFormatters_default.h(date, token);
5039
4995
  },
5040
- abbreviated: {
5041
- am: "AM",
5042
- pm: "PM",
5043
- midnight: "midnight",
5044
- noon: "noon",
5045
- morning: "morning",
5046
- afternoon: "afternoon",
5047
- evening: "evening",
5048
- night: "night"
4996
+ H: function(date, token, localize2) {
4997
+ if (token === "Ho") {
4998
+ return localize2.ordinalNumber(date.getUTCHours(), {
4999
+ unit: "hour"
5000
+ });
5001
+ }
5002
+ return lightFormatters_default.H(date, token);
5049
5003
  },
5050
- wide: {
5051
- am: "a.m.",
5052
- pm: "p.m.",
5053
- midnight: "midnight",
5054
- noon: "noon",
5055
- morning: "morning",
5056
- afternoon: "afternoon",
5057
- evening: "evening",
5058
- night: "night"
5059
- }
5060
- };
5061
- var formattingDayPeriodValues = {
5062
- narrow: {
5063
- am: "a",
5064
- pm: "p",
5065
- midnight: "mi",
5066
- noon: "n",
5067
- morning: "in the morning",
5068
- afternoon: "in the afternoon",
5069
- evening: "in the evening",
5070
- night: "at night"
5004
+ K: function(date, token, localize2) {
5005
+ var hours = date.getUTCHours() % 12;
5006
+ if (token === "Ko") {
5007
+ return localize2.ordinalNumber(hours, {
5008
+ unit: "hour"
5009
+ });
5010
+ }
5011
+ return addLeadingZeros(hours, token.length);
5071
5012
  },
5072
- abbreviated: {
5073
- am: "AM",
5074
- pm: "PM",
5075
- midnight: "midnight",
5076
- noon: "noon",
5077
- morning: "in the morning",
5078
- afternoon: "in the afternoon",
5079
- evening: "in the evening",
5080
- night: "at night"
5013
+ k: function(date, token, localize2) {
5014
+ var hours = date.getUTCHours();
5015
+ if (hours === 0)
5016
+ hours = 24;
5017
+ if (token === "ko") {
5018
+ return localize2.ordinalNumber(hours, {
5019
+ unit: "hour"
5020
+ });
5021
+ }
5022
+ return addLeadingZeros(hours, token.length);
5081
5023
  },
5082
- wide: {
5083
- am: "a.m.",
5084
- pm: "p.m.",
5085
- midnight: "midnight",
5086
- noon: "noon",
5087
- morning: "in the morning",
5088
- afternoon: "in the afternoon",
5089
- evening: "in the evening",
5090
- night: "at night"
5091
- }
5092
- };
5093
- var ordinalNumber = /* @__PURE__ */ __name(function ordinalNumber2(dirtyNumber, _options) {
5094
- var number = Number(dirtyNumber);
5095
- var rem100 = number % 100;
5096
- if (rem100 > 20 || rem100 < 10) {
5097
- switch (rem100 % 10) {
5098
- case 1:
5099
- return number + "st";
5100
- case 2:
5101
- return number + "nd";
5102
- case 3:
5103
- return number + "rd";
5024
+ m: function(date, token, localize2) {
5025
+ if (token === "mo") {
5026
+ return localize2.ordinalNumber(date.getUTCMinutes(), {
5027
+ unit: "minute"
5028
+ });
5104
5029
  }
5105
- }
5106
- return number + "th";
5107
- }, "ordinalNumber");
5108
- var localize = {
5109
- ordinalNumber,
5110
- era: buildLocalizeFn({
5111
- values: eraValues,
5112
- defaultWidth: "wide"
5113
- }),
5114
- quarter: buildLocalizeFn({
5115
- values: quarterValues,
5116
- defaultWidth: "wide",
5117
- argumentCallback: /* @__PURE__ */ __name(function argumentCallback(quarter) {
5118
- return quarter - 1;
5119
- }, "argumentCallback")
5120
- }),
5121
- month: buildLocalizeFn({
5122
- values: monthValues,
5123
- defaultWidth: "wide"
5124
- }),
5125
- day: buildLocalizeFn({
5126
- values: dayValues,
5127
- defaultWidth: "wide"
5128
- }),
5129
- dayPeriod: buildLocalizeFn({
5130
- values: dayPeriodValues,
5131
- defaultWidth: "wide",
5132
- formattingValues: formattingDayPeriodValues,
5133
- defaultFormattingWidth: "wide"
5134
- })
5135
- };
5136
- var localize_default = localize;
5137
-
5138
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
5139
- function buildMatchFn(args) {
5140
- return function(string) {
5141
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5142
- var width = options.width;
5143
- var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
5144
- var matchResult = string.match(matchPattern);
5145
- if (!matchResult) {
5146
- return null;
5030
+ return lightFormatters_default.m(date, token);
5031
+ },
5032
+ s: function(date, token, localize2) {
5033
+ if (token === "so") {
5034
+ return localize2.ordinalNumber(date.getUTCSeconds(), {
5035
+ unit: "second"
5036
+ });
5147
5037
  }
5148
- var matchedString = matchResult[0];
5149
- var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
5150
- var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
5151
- return pattern.test(matchedString);
5152
- }) : findKey(parsePatterns, function(pattern) {
5153
- return pattern.test(matchedString);
5154
- });
5155
- var value;
5156
- value = args.valueCallback ? args.valueCallback(key) : key;
5157
- value = options.valueCallback ? options.valueCallback(value) : value;
5158
- var rest = string.slice(matchedString.length);
5159
- return {
5160
- value,
5161
- rest
5162
- };
5163
- };
5164
- }
5165
- __name(buildMatchFn, "buildMatchFn");
5166
- function findKey(object, predicate) {
5167
- for (var key in object) {
5168
- if (object.hasOwnProperty(key) && predicate(object[key])) {
5169
- return key;
5038
+ return lightFormatters_default.s(date, token);
5039
+ },
5040
+ S: function(date, token) {
5041
+ return lightFormatters_default.S(date, token);
5042
+ },
5043
+ X: function(date, token, _localize, options) {
5044
+ var originalDate = options._originalDate || date;
5045
+ var timezoneOffset = originalDate.getTimezoneOffset();
5046
+ if (timezoneOffset === 0) {
5047
+ return "Z";
5048
+ }
5049
+ switch (token) {
5050
+ case "X":
5051
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
5052
+ case "XXXX":
5053
+ case "XX":
5054
+ return formatTimezone(timezoneOffset);
5055
+ case "XXXXX":
5056
+ case "XXX":
5057
+ default:
5058
+ return formatTimezone(timezoneOffset, ":");
5059
+ }
5060
+ },
5061
+ x: function(date, token, _localize, options) {
5062
+ var originalDate = options._originalDate || date;
5063
+ var timezoneOffset = originalDate.getTimezoneOffset();
5064
+ switch (token) {
5065
+ case "x":
5066
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
5067
+ case "xxxx":
5068
+ case "xx":
5069
+ return formatTimezone(timezoneOffset);
5070
+ case "xxxxx":
5071
+ case "xxx":
5072
+ default:
5073
+ return formatTimezone(timezoneOffset, ":");
5074
+ }
5075
+ },
5076
+ O: function(date, token, _localize, options) {
5077
+ var originalDate = options._originalDate || date;
5078
+ var timezoneOffset = originalDate.getTimezoneOffset();
5079
+ switch (token) {
5080
+ case "O":
5081
+ case "OO":
5082
+ case "OOO":
5083
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
5084
+ case "OOOO":
5085
+ default:
5086
+ return "GMT" + formatTimezone(timezoneOffset, ":");
5170
5087
  }
5088
+ },
5089
+ z: function(date, token, _localize, options) {
5090
+ var originalDate = options._originalDate || date;
5091
+ var timezoneOffset = originalDate.getTimezoneOffset();
5092
+ switch (token) {
5093
+ case "z":
5094
+ case "zz":
5095
+ case "zzz":
5096
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
5097
+ case "zzzz":
5098
+ default:
5099
+ return "GMT" + formatTimezone(timezoneOffset, ":");
5100
+ }
5101
+ },
5102
+ t: function(date, token, _localize, options) {
5103
+ var originalDate = options._originalDate || date;
5104
+ var timestamp = Math.floor(originalDate.getTime() / 1e3);
5105
+ return addLeadingZeros(timestamp, token.length);
5106
+ },
5107
+ T: function(date, token, _localize, options) {
5108
+ var originalDate = options._originalDate || date;
5109
+ var timestamp = originalDate.getTime();
5110
+ return addLeadingZeros(timestamp, token.length);
5171
5111
  }
5172
- return void 0;
5112
+ };
5113
+ function formatTimezoneShort(offset, dirtyDelimiter) {
5114
+ var sign = offset > 0 ? "-" : "+";
5115
+ var absOffset = Math.abs(offset);
5116
+ var hours = Math.floor(absOffset / 60);
5117
+ var minutes = absOffset % 60;
5118
+ if (minutes === 0) {
5119
+ return sign + String(hours);
5120
+ }
5121
+ var delimiter = dirtyDelimiter || "";
5122
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
5173
5123
  }
5174
- __name(findKey, "findKey");
5175
- function findIndex(array, predicate) {
5176
- for (var key = 0; key < array.length; key++) {
5177
- if (predicate(array[key])) {
5178
- return key;
5179
- }
5124
+ __name(formatTimezoneShort, "formatTimezoneShort");
5125
+ function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
5126
+ if (offset % 60 === 0) {
5127
+ var sign = offset > 0 ? "-" : "+";
5128
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
5180
5129
  }
5181
- return void 0;
5130
+ return formatTimezone(offset, dirtyDelimiter);
5182
5131
  }
5183
- __name(findIndex, "findIndex");
5184
-
5185
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
5186
- function buildMatchPatternFn(args) {
5187
- return function(string) {
5188
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5189
- var matchResult = string.match(args.matchPattern);
5190
- if (!matchResult)
5191
- return null;
5192
- var matchedString = matchResult[0];
5193
- var parseResult = string.match(args.parsePattern);
5194
- if (!parseResult)
5195
- return null;
5196
- var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
5197
- value = options.valueCallback ? options.valueCallback(value) : value;
5198
- var rest = string.slice(matchedString.length);
5199
- return {
5200
- value,
5201
- rest
5202
- };
5203
- };
5132
+ __name(formatTimezoneWithOptionalMinutes, "formatTimezoneWithOptionalMinutes");
5133
+ function formatTimezone(offset, dirtyDelimiter) {
5134
+ var delimiter = dirtyDelimiter || "";
5135
+ var sign = offset > 0 ? "-" : "+";
5136
+ var absOffset = Math.abs(offset);
5137
+ var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
5138
+ var minutes = addLeadingZeros(absOffset % 60, 2);
5139
+ return sign + hours + delimiter + minutes;
5204
5140
  }
5205
- __name(buildMatchPatternFn, "buildMatchPatternFn");
5141
+ __name(formatTimezone, "formatTimezone");
5142
+ var formatters_default = formatters2;
5206
5143
 
5207
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
5208
- var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
5209
- var parseOrdinalNumberPattern = /\d+/i;
5210
- var matchEraPatterns = {
5211
- narrow: /^(b|a)/i,
5212
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
5213
- wide: /^(before christ|before common era|anno domini|common era)/i
5214
- };
5215
- var parseEraPatterns = {
5216
- any: [/^b/i, /^(a|c)/i]
5217
- };
5218
- var matchQuarterPatterns = {
5219
- narrow: /^[1234]/i,
5220
- abbreviated: /^q[1234]/i,
5221
- wide: /^[1234](th|st|nd|rd)? quarter/i
5222
- };
5223
- var parseQuarterPatterns = {
5224
- any: [/1/i, /2/i, /3/i, /4/i]
5225
- };
5226
- var matchMonthPatterns = {
5227
- narrow: /^[jfmasond]/i,
5228
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
5229
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
5230
- };
5231
- var parseMonthPatterns = {
5232
- narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
5233
- any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
5234
- };
5235
- var matchDayPatterns = {
5236
- narrow: /^[smtwf]/i,
5237
- short: /^(su|mo|tu|we|th|fr|sa)/i,
5238
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
5239
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
5240
- };
5241
- var parseDayPatterns = {
5242
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
5243
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
5244
- };
5245
- var matchDayPeriodPatterns = {
5246
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
5247
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
5248
- };
5249
- var parseDayPeriodPatterns = {
5250
- any: {
5251
- am: /^a/i,
5252
- pm: /^p/i,
5253
- midnight: /^mi/i,
5254
- noon: /^no/i,
5255
- morning: /morning/i,
5256
- afternoon: /afternoon/i,
5257
- evening: /evening/i,
5258
- night: /night/i
5144
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/longFormatters/index.js
5145
+ function dateLongFormatter(pattern, formatLong2) {
5146
+ switch (pattern) {
5147
+ case "P":
5148
+ return formatLong2.date({
5149
+ width: "short"
5150
+ });
5151
+ case "PP":
5152
+ return formatLong2.date({
5153
+ width: "medium"
5154
+ });
5155
+ case "PPP":
5156
+ return formatLong2.date({
5157
+ width: "long"
5158
+ });
5159
+ case "PPPP":
5160
+ default:
5161
+ return formatLong2.date({
5162
+ width: "full"
5163
+ });
5259
5164
  }
5260
- };
5261
- var match = {
5262
- ordinalNumber: buildMatchPatternFn({
5263
- matchPattern: matchOrdinalNumberPattern,
5264
- parsePattern: parseOrdinalNumberPattern,
5265
- valueCallback: /* @__PURE__ */ __name(function valueCallback(value) {
5266
- return parseInt(value, 10);
5267
- }, "valueCallback")
5268
- }),
5269
- era: buildMatchFn({
5270
- matchPatterns: matchEraPatterns,
5271
- defaultMatchWidth: "wide",
5272
- parsePatterns: parseEraPatterns,
5273
- defaultParseWidth: "any"
5274
- }),
5275
- quarter: buildMatchFn({
5276
- matchPatterns: matchQuarterPatterns,
5277
- defaultMatchWidth: "wide",
5278
- parsePatterns: parseQuarterPatterns,
5279
- defaultParseWidth: "any",
5280
- valueCallback: /* @__PURE__ */ __name(function valueCallback2(index) {
5281
- return index + 1;
5282
- }, "valueCallback")
5283
- }),
5284
- month: buildMatchFn({
5285
- matchPatterns: matchMonthPatterns,
5286
- defaultMatchWidth: "wide",
5287
- parsePatterns: parseMonthPatterns,
5288
- defaultParseWidth: "any"
5289
- }),
5290
- day: buildMatchFn({
5291
- matchPatterns: matchDayPatterns,
5292
- defaultMatchWidth: "wide",
5293
- parsePatterns: parseDayPatterns,
5294
- defaultParseWidth: "any"
5295
- }),
5296
- dayPeriod: buildMatchFn({
5297
- matchPatterns: matchDayPeriodPatterns,
5298
- defaultMatchWidth: "any",
5299
- parsePatterns: parseDayPeriodPatterns,
5300
- defaultParseWidth: "any"
5301
- })
5302
- };
5303
- var match_default = match;
5304
-
5305
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/index.js
5306
- var locale = {
5307
- code: "en-US",
5308
- formatDistance: formatDistance_default,
5309
- formatLong: formatLong_default,
5310
- formatRelative: formatRelative_default,
5311
- localize: localize_default,
5312
- match: match_default,
5313
- options: {
5314
- weekStartsOn: 0,
5315
- firstWeekContainsDate: 1
5165
+ }
5166
+ __name(dateLongFormatter, "dateLongFormatter");
5167
+ function timeLongFormatter(pattern, formatLong2) {
5168
+ switch (pattern) {
5169
+ case "p":
5170
+ return formatLong2.time({
5171
+ width: "short"
5172
+ });
5173
+ case "pp":
5174
+ return formatLong2.time({
5175
+ width: "medium"
5176
+ });
5177
+ case "ppp":
5178
+ return formatLong2.time({
5179
+ width: "long"
5180
+ });
5181
+ case "pppp":
5182
+ default:
5183
+ return formatLong2.time({
5184
+ width: "full"
5185
+ });
5186
+ }
5187
+ }
5188
+ __name(timeLongFormatter, "timeLongFormatter");
5189
+ function dateTimeLongFormatter(pattern, formatLong2) {
5190
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
5191
+ var datePattern = matchResult[1];
5192
+ var timePattern = matchResult[2];
5193
+ if (!timePattern) {
5194
+ return dateLongFormatter(pattern, formatLong2);
5195
+ }
5196
+ var dateTimeFormat;
5197
+ switch (datePattern) {
5198
+ case "P":
5199
+ dateTimeFormat = formatLong2.dateTime({
5200
+ width: "short"
5201
+ });
5202
+ break;
5203
+ case "PP":
5204
+ dateTimeFormat = formatLong2.dateTime({
5205
+ width: "medium"
5206
+ });
5207
+ break;
5208
+ case "PPP":
5209
+ dateTimeFormat = formatLong2.dateTime({
5210
+ width: "long"
5211
+ });
5212
+ break;
5213
+ case "PPPP":
5214
+ default:
5215
+ dateTimeFormat = formatLong2.dateTime({
5216
+ width: "full"
5217
+ });
5218
+ break;
5316
5219
  }
5220
+ return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
5221
+ }
5222
+ __name(dateTimeLongFormatter, "dateTimeLongFormatter");
5223
+ var longFormatters = {
5224
+ p: timeLongFormatter,
5225
+ P: dateTimeLongFormatter
5317
5226
  };
5318
- var en_US_default = locale;
5227
+ var longFormatters_default = longFormatters;
5319
5228
 
5320
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/defaultLocale/index.js
5321
- var defaultLocale_default = en_US_default;
5229
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/protectedTokens/index.js
5230
+ var protectedDayOfYearTokens = ["D", "DD"];
5231
+ var protectedWeekYearTokens = ["YY", "YYYY"];
5232
+ function isProtectedDayOfYearToken(token) {
5233
+ return protectedDayOfYearTokens.indexOf(token) !== -1;
5234
+ }
5235
+ __name(isProtectedDayOfYearToken, "isProtectedDayOfYearToken");
5236
+ function isProtectedWeekYearToken(token) {
5237
+ return protectedWeekYearTokens.indexOf(token) !== -1;
5238
+ }
5239
+ __name(isProtectedWeekYearToken, "isProtectedWeekYearToken");
5240
+ function throwProtectedError(token, format2, input) {
5241
+ if (token === "YYYY") {
5242
+ throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
5243
+ } else if (token === "YY") {
5244
+ throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
5245
+ } else if (token === "D") {
5246
+ throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
5247
+ } else if (token === "DD") {
5248
+ throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
5249
+ }
5250
+ }
5251
+ __name(throwProtectedError, "throwProtectedError");
5322
5252
 
5323
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/format/index.js
5253
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/format/index.js
5324
5254
  var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
5325
5255
  var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
5326
5256
  var escapedStringRegExp = /^'([^]*?)'?$/;
5327
5257
  var doubleQuoteRegExp = /''/g;
5328
5258
  var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
5329
- function format(dirtyDate, dirtyFormatStr, options) {
5330
- var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
5259
+ function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
5331
5260
  requiredArgs(2, arguments);
5332
5261
  var formatStr = String(dirtyFormatStr);
5333
- var defaultOptions2 = getDefaultOptions();
5334
- var locale2 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions2.locale) !== null && _ref !== void 0 ? _ref : defaultLocale_default;
5335
- var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions2.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
5262
+ var options = dirtyOptions || {};
5263
+ var locale2 = options.locale || en_US_default;
5264
+ var localeFirstWeekContainsDate = locale2.options && locale2.options.firstWeekContainsDate;
5265
+ var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
5266
+ var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
5336
5267
  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
5337
5268
  throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
5338
5269
  }
5339
- var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions2.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions2.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
5270
+ var localeWeekStartsOn = locale2.options && locale2.options.weekStartsOn;
5271
+ var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
5272
+ var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
5340
5273
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
5341
5274
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
5342
5275
  }
@@ -5362,7 +5295,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
5362
5295
  var firstCharacter = substring[0];
5363
5296
  if (firstCharacter === "p" || firstCharacter === "P") {
5364
5297
  var longFormatter = longFormatters_default[firstCharacter];
5365
- return longFormatter(substring, locale2.formatLong);
5298
+ return longFormatter(substring, locale2.formatLong, formatterOptions);
5366
5299
  }
5367
5300
  return substring;
5368
5301
  }).join("").match(formattingTokensRegExp).map(function(substring) {
@@ -5375,11 +5308,11 @@ function format(dirtyDate, dirtyFormatStr, options) {
5375
5308
  }
5376
5309
  var formatter = formatters_default[firstCharacter];
5377
5310
  if (formatter) {
5378
- if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
5379
- throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
5311
+ if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {
5312
+ throwProtectedError(substring, dirtyFormatStr, dirtyDate);
5380
5313
  }
5381
- if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
5382
- throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
5314
+ if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {
5315
+ throwProtectedError(substring, dirtyFormatStr, dirtyDate);
5383
5316
  }
5384
5317
  return formatter(utcDate, substring, locale2.localize, formatterOptions);
5385
5318
  }
@@ -5392,11 +5325,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
5392
5325
  }
5393
5326
  __name(format, "format");
5394
5327
  function cleanEscapedString(input) {
5395
- var matched = input.match(escapedStringRegExp);
5396
- if (!matched) {
5397
- return input;
5398
- }
5399
- return matched[1].replace(doubleQuoteRegExp, "'");
5328
+ return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
5400
5329
  }
5401
5330
  __name(cleanEscapedString, "cleanEscapedString");
5402
5331
 
@@ -5407,20 +5336,14 @@ var transformErrorCheck = /* @__PURE__ */ __name((error, _credential) => {
5407
5336
  }, "transformErrorCheck");
5408
5337
  var transformErrorMessage = /* @__PURE__ */ __name((error, credential) => {
5409
5338
  if (error.startsWith("expiration")) {
5410
- return credential.expirationDate ? `Invalid \u2022 Expired ${format(
5411
- new Date(credential.expirationDate),
5412
- "dd MMM yyyy"
5413
- ).toUpperCase()}` : "Invalid \u2022 Expired";
5339
+ return credential.expirationDate ? `Invalid \u2022 Expired ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Invalid \u2022 Expired";
5414
5340
  }
5415
5341
  return error;
5416
5342
  }, "transformErrorMessage");
5417
5343
  var transformCheckMessage = /* @__PURE__ */ __name((check, credential) => {
5418
5344
  return {
5419
5345
  proof: "Valid",
5420
- expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(
5421
- new Date(credential.expirationDate),
5422
- "dd MMM yyyy"
5423
- ).toUpperCase()}` : "Valid \u2022 Does Not Expire"
5346
+ expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Valid \u2022 Does Not Expire"
5424
5347
  }[check] || check;
5425
5348
  }, "transformCheckMessage");
5426
5349
  var verifyCredential = /* @__PURE__ */ __name((learnCard) => {