@learncard/learn-card-plugin 1.0.5 → 1.0.7

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,4 +1,3 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -25,7 +24,7 @@ __export(src_exports, {
25
24
  });
26
25
  module.exports = __toCommonJS(src_exports);
27
26
 
28
- // ../../../node_modules/.pnpm/zod@3.20.6/node_modules/zod/lib/index.mjs
27
+ // ../../../node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs
29
28
  var util;
30
29
  (function(util2) {
31
30
  util2.assertEqual = (val) => val;
@@ -46,16 +45,16 @@ var util;
46
45
  return obj;
47
46
  };
48
47
  util2.getValidEnumValues = (obj) => {
49
- const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
48
+ const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
50
49
  const filtered = {};
51
- for (const k2 of validKeys) {
52
- filtered[k2] = obj[k2];
50
+ for (const k of validKeys) {
51
+ filtered[k] = obj[k];
53
52
  }
54
53
  return util2.objectValues(filtered);
55
54
  };
56
55
  util2.objectValues = (obj) => {
57
- return util2.objectKeys(obj).map(function(e2) {
58
- return obj[e2];
56
+ return util2.objectKeys(obj).map(function(e) {
57
+ return obj[e];
59
58
  });
60
59
  };
61
60
  util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
@@ -110,8 +109,8 @@ var ZodParsedType = util.arrayToEnum([
110
109
  "set"
111
110
  ]);
112
111
  var getParsedType = /* @__PURE__ */ __name((data) => {
113
- const t2 = typeof data;
114
- switch (t2) {
112
+ const t = typeof data;
113
+ switch (t) {
115
114
  case "undefined":
116
115
  return ZodParsedType.undefined;
117
116
  case "string":
@@ -211,10 +210,10 @@ var ZodError = class extends Error {
211
210
  fieldErrors._errors.push(mapper(issue));
212
211
  } else {
213
212
  let curr = fieldErrors;
214
- let i2 = 0;
215
- while (i2 < issue.path.length) {
216
- const el = issue.path[i2];
217
- const terminal = i2 === issue.path.length - 1;
213
+ let i = 0;
214
+ while (i < issue.path.length) {
215
+ const el = issue.path[i];
216
+ const terminal = i === issue.path.length - 1;
218
217
  if (!terminal) {
219
218
  curr[el] = curr[el] || { _errors: [] };
220
219
  } else {
@@ -222,7 +221,7 @@ var ZodError = class extends Error {
222
221
  curr[el]._errors.push(mapper(issue));
223
222
  }
224
223
  curr = curr[el];
225
- i2++;
224
+ i++;
226
225
  }
227
226
  }
228
227
  }
@@ -369,7 +368,7 @@ var makeIssue = /* @__PURE__ */ __name((params) => {
369
368
  path: fullPath
370
369
  };
371
370
  let errorMessage = "";
372
- const maps = errorMaps.filter((m3) => !!m3).slice().reverse();
371
+ const maps = errorMaps.filter((m) => !!m).slice().reverse();
373
372
  for (const map of maps) {
374
373
  errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
375
374
  }
@@ -390,7 +389,7 @@ function addIssueToContext(ctx, issueData) {
390
389
  ctx.schemaErrorMap,
391
390
  getErrorMap(),
392
391
  errorMap
393
- ].filter((x2) => !!x2)
392
+ ].filter((x) => !!x)
394
393
  });
395
394
  ctx.common.issues.push(issue);
396
395
  }
@@ -409,12 +408,12 @@ var ParseStatus = class {
409
408
  }
410
409
  static mergeArray(status, results) {
411
410
  const arrayValue = [];
412
- for (const s3 of results) {
413
- if (s3.status === "aborted")
411
+ for (const s of results) {
412
+ if (s.status === "aborted")
414
413
  return INVALID;
415
- if (s3.status === "dirty")
414
+ if (s.status === "dirty")
416
415
  status.dirty();
417
- arrayValue.push(s3.value);
416
+ arrayValue.push(s.value);
418
417
  }
419
418
  return { status: status.value, value: arrayValue };
420
419
  }
@@ -453,10 +452,10 @@ var INVALID = Object.freeze({
453
452
  });
454
453
  var DIRTY = /* @__PURE__ */ __name((value) => ({ status: "dirty", value }), "DIRTY");
455
454
  var OK = /* @__PURE__ */ __name((value) => ({ status: "valid", value }), "OK");
456
- var isAborted = /* @__PURE__ */ __name((x2) => x2.status === "aborted", "isAborted");
457
- var isDirty = /* @__PURE__ */ __name((x2) => x2.status === "dirty", "isDirty");
458
- var isValid = /* @__PURE__ */ __name((x2) => x2.status === "valid", "isValid");
459
- var isAsync = /* @__PURE__ */ __name((x2) => typeof Promise !== "undefined" && x2 instanceof Promise, "isAsync");
455
+ var isAborted = /* @__PURE__ */ __name((x) => x.status === "aborted", "isAborted");
456
+ var isDirty = /* @__PURE__ */ __name((x) => x.status === "dirty", "isDirty");
457
+ var isValid = /* @__PURE__ */ __name((x) => x.status === "valid", "isValid");
458
+ var isAsync = /* @__PURE__ */ __name((x) => typeof Promise !== void 0 && x instanceof Promise, "isAsync");
460
459
  var errorUtil;
461
460
  (function(errorUtil2) {
462
461
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
@@ -674,29 +673,28 @@ var ZodType = class {
674
673
  return this._refinement(refinement);
675
674
  }
676
675
  optional() {
677
- return ZodOptional.create(this, this._def);
676
+ return ZodOptional.create(this);
678
677
  }
679
678
  nullable() {
680
- return ZodNullable.create(this, this._def);
679
+ return ZodNullable.create(this);
681
680
  }
682
681
  nullish() {
683
- return this.nullable().optional();
682
+ return this.optional().nullable();
684
683
  }
685
684
  array() {
686
- return ZodArray.create(this, this._def);
685
+ return ZodArray.create(this);
687
686
  }
688
687
  promise() {
689
- return ZodPromise.create(this, this._def);
688
+ return ZodPromise.create(this);
690
689
  }
691
690
  or(option) {
692
- return ZodUnion.create([this, option], this._def);
691
+ return ZodUnion.create([this, option]);
693
692
  }
694
693
  and(incoming) {
695
- return ZodIntersection.create(this, incoming, this._def);
694
+ return ZodIntersection.create(this, incoming);
696
695
  }
697
696
  transform(transform) {
698
697
  return new ZodEffects({
699
- ...processCreateParams(this._def),
700
698
  schema: this,
701
699
  typeName: ZodFirstPartyTypeKind.ZodEffects,
702
700
  effect: { type: "transform", transform }
@@ -705,7 +703,6 @@ var ZodType = class {
705
703
  default(def) {
706
704
  const defaultValueFunc = typeof def === "function" ? def : () => def;
707
705
  return new ZodDefault({
708
- ...processCreateParams(this._def),
709
706
  innerType: this,
710
707
  defaultValue: defaultValueFunc,
711
708
  typeName: ZodFirstPartyTypeKind.ZodDefault
@@ -715,15 +712,14 @@ var ZodType = class {
715
712
  return new ZodBranded({
716
713
  typeName: ZodFirstPartyTypeKind.ZodBranded,
717
714
  type: this,
718
- ...processCreateParams(this._def)
715
+ ...processCreateParams(void 0)
719
716
  });
720
717
  }
721
718
  catch(def) {
722
- const catchValueFunc = typeof def === "function" ? def : () => def;
719
+ const defaultValueFunc = typeof def === "function" ? def : () => def;
723
720
  return new ZodCatch({
724
- ...processCreateParams(this._def),
725
721
  innerType: this,
726
- catchValue: catchValueFunc,
722
+ defaultValue: defaultValueFunc,
727
723
  typeName: ZodFirstPartyTypeKind.ZodCatch
728
724
  });
729
725
  }
@@ -746,25 +742,24 @@ var ZodType = class {
746
742
  };
747
743
  __name(ZodType, "ZodType");
748
744
  var cuidRegex = /^c[^\s-]{8,}$/i;
749
- var cuid2Regex = /^[a-z][a-z0-9]*$/;
750
745
  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;
751
- 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,}))$/;
746
+ var emailRegex = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
752
747
  var datetimeRegex = /* @__PURE__ */ __name((args) => {
753
748
  if (args.precision) {
754
749
  if (args.offset) {
755
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
750
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}:\\d{2})|Z)$`);
756
751
  } else {
757
752
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
758
753
  }
759
754
  } else if (args.precision === 0) {
760
755
  if (args.offset) {
761
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
756
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$`);
762
757
  } else {
763
758
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
764
759
  }
765
760
  } else {
766
761
  if (args.offset) {
767
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
762
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$`);
768
763
  } else {
769
764
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
770
765
  }
@@ -791,14 +786,11 @@ var ZodString = class extends ZodType {
791
786
  const parsedType = this._getType(input);
792
787
  if (parsedType !== ZodParsedType.string) {
793
788
  const ctx2 = this._getOrReturnCtx(input);
794
- addIssueToContext(
795
- ctx2,
796
- {
797
- code: ZodIssueCode.invalid_type,
798
- expected: ZodParsedType.string,
799
- received: ctx2.parsedType
800
- }
801
- );
789
+ addIssueToContext(ctx2, {
790
+ code: ZodIssueCode.invalid_type,
791
+ expected: ZodParsedType.string,
792
+ received: ctx2.parsedType
793
+ });
802
794
  return INVALID;
803
795
  }
804
796
  const status = new ParseStatus();
@@ -886,16 +878,6 @@ var ZodString = class extends ZodType {
886
878
  });
887
879
  status.dirty();
888
880
  }
889
- } else if (check.kind === "cuid2") {
890
- if (!cuid2Regex.test(input.data)) {
891
- ctx = this._getOrReturnCtx(input, ctx);
892
- addIssueToContext(ctx, {
893
- validation: "cuid2",
894
- code: ZodIssueCode.invalid_string,
895
- message: check.message
896
- });
897
- status.dirty();
898
- }
899
881
  } else if (check.kind === "url") {
900
882
  try {
901
883
  new URL(input.data);
@@ -977,9 +959,6 @@ var ZodString = class extends ZodType {
977
959
  cuid(message) {
978
960
  return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
979
961
  }
980
- cuid2(message) {
981
- return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
982
- }
983
962
  datetime(options) {
984
963
  var _a;
985
964
  if (typeof options === "string") {
@@ -1054,9 +1033,6 @@ var ZodString = class extends ZodType {
1054
1033
  get isCUID() {
1055
1034
  return !!this._def.checks.find((ch) => ch.kind === "cuid");
1056
1035
  }
1057
- get isCUID2() {
1058
- return !!this._def.checks.find((ch) => ch.kind === "cuid2");
1059
- }
1060
1036
  get minLength() {
1061
1037
  let min = null;
1062
1038
  for (const ch of this._def.checks) {
@@ -1289,22 +1265,7 @@ var ZodNumber = class extends ZodType {
1289
1265
  return max;
1290
1266
  }
1291
1267
  get isInt() {
1292
- return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
1293
- }
1294
- get isFinite() {
1295
- let max = null, min = null;
1296
- for (const ch of this._def.checks) {
1297
- if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1298
- return true;
1299
- } else if (ch.kind === "min") {
1300
- if (min === null || ch.value > min)
1301
- min = ch.value;
1302
- } else if (ch.kind === "max") {
1303
- if (max === null || ch.value < max)
1304
- max = ch.value;
1305
- }
1306
- }
1307
- return Number.isFinite(min) && Number.isFinite(max);
1268
+ return !!this._def.checks.find((ch) => ch.kind === "int");
1308
1269
  }
1309
1270
  };
1310
1271
  __name(ZodNumber, "ZodNumber");
@@ -1672,14 +1633,14 @@ var ZodArray = class extends ZodType {
1672
1633
  }
1673
1634
  }
1674
1635
  if (ctx.common.async) {
1675
- return Promise.all([...ctx.data].map((item, i2) => {
1676
- return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
1636
+ return Promise.all(ctx.data.map((item, i) => {
1637
+ return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
1677
1638
  })).then((result2) => {
1678
1639
  return ParseStatus.mergeArray(status, result2);
1679
1640
  });
1680
1641
  }
1681
- const result = [...ctx.data].map((item, i2) => {
1682
- return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
1642
+ const result = ctx.data.map((item, i) => {
1643
+ return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
1683
1644
  });
1684
1645
  return ParseStatus.mergeArray(status, result);
1685
1646
  }
@@ -1728,6 +1689,15 @@ var objectUtil;
1728
1689
  };
1729
1690
  };
1730
1691
  })(objectUtil || (objectUtil = {}));
1692
+ var AugmentFactory = /* @__PURE__ */ __name((def) => (augmentation) => {
1693
+ return new ZodObject({
1694
+ ...def,
1695
+ shape: () => ({
1696
+ ...def.shape(),
1697
+ ...augmentation
1698
+ })
1699
+ });
1700
+ }, "AugmentFactory");
1731
1701
  function deepPartialify(schema) {
1732
1702
  if (schema instanceof ZodObject) {
1733
1703
  const newShape = {};
@@ -1757,7 +1727,8 @@ var ZodObject = class extends ZodType {
1757
1727
  super(...arguments);
1758
1728
  this._cached = null;
1759
1729
  this.nonstrict = this.passthrough;
1760
- this.augment = this.extend;
1730
+ this.augment = AugmentFactory(this._def);
1731
+ this.extend = AugmentFactory(this._def);
1761
1732
  }
1762
1733
  _getCached() {
1763
1734
  if (this._cached !== null)
@@ -1825,9 +1796,7 @@ var ZodObject = class extends ZodType {
1825
1796
  const value = ctx.data[key];
1826
1797
  pairs.push({
1827
1798
  key: { status: "valid", value: key },
1828
- value: catchall._parse(
1829
- new ParseInputLazyPath(ctx, value, ctx.path, key)
1830
- ),
1799
+ value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
1831
1800
  alwaysSet: key in ctx.data
1832
1801
  });
1833
1802
  }
@@ -1886,14 +1855,8 @@ var ZodObject = class extends ZodType {
1886
1855
  unknownKeys: "passthrough"
1887
1856
  });
1888
1857
  }
1889
- extend(augmentation) {
1890
- return new ZodObject({
1891
- ...this._def,
1892
- shape: () => ({
1893
- ...this._def.shape(),
1894
- ...augmentation
1895
- })
1896
- });
1858
+ setKey(key, schema) {
1859
+ return this.augment({ [key]: schema });
1897
1860
  }
1898
1861
  merge(merging) {
1899
1862
  const merged = new ZodObject({
@@ -1904,9 +1867,6 @@ var ZodObject = class extends ZodType {
1904
1867
  });
1905
1868
  return merged;
1906
1869
  }
1907
- setKey(key, schema) {
1908
- return this.augment({ [key]: schema });
1909
- }
1910
1870
  catchall(index) {
1911
1871
  return new ZodObject({
1912
1872
  ...this._def,
@@ -1915,10 +1875,9 @@ var ZodObject = class extends ZodType {
1915
1875
  }
1916
1876
  pick(mask) {
1917
1877
  const shape = {};
1918
- util.objectKeys(mask).forEach((key) => {
1919
- if (mask[key] && this.shape[key]) {
1878
+ util.objectKeys(mask).map((key) => {
1879
+ if (this.shape[key])
1920
1880
  shape[key] = this.shape[key];
1921
- }
1922
1881
  });
1923
1882
  return new ZodObject({
1924
1883
  ...this._def,
@@ -1927,8 +1886,8 @@ var ZodObject = class extends ZodType {
1927
1886
  }
1928
1887
  omit(mask) {
1929
1888
  const shape = {};
1930
- util.objectKeys(this.shape).forEach((key) => {
1931
- if (!mask[key]) {
1889
+ util.objectKeys(this.shape).map((key) => {
1890
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1932
1891
  shape[key] = this.shape[key];
1933
1892
  }
1934
1893
  });
@@ -1942,14 +1901,24 @@ var ZodObject = class extends ZodType {
1942
1901
  }
1943
1902
  partial(mask) {
1944
1903
  const newShape = {};
1945
- util.objectKeys(this.shape).forEach((key) => {
1946
- const fieldSchema = this.shape[key];
1947
- if (mask && !mask[key]) {
1948
- newShape[key] = fieldSchema;
1949
- } else {
1904
+ if (mask) {
1905
+ util.objectKeys(this.shape).map((key) => {
1906
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1907
+ newShape[key] = this.shape[key];
1908
+ } else {
1909
+ newShape[key] = this.shape[key].optional();
1910
+ }
1911
+ });
1912
+ return new ZodObject({
1913
+ ...this._def,
1914
+ shape: () => newShape
1915
+ });
1916
+ } else {
1917
+ for (const key in this.shape) {
1918
+ const fieldSchema = this.shape[key];
1950
1919
  newShape[key] = fieldSchema.optional();
1951
1920
  }
1952
- });
1921
+ }
1953
1922
  return new ZodObject({
1954
1923
  ...this._def,
1955
1924
  shape: () => newShape
@@ -1957,10 +1926,21 @@ var ZodObject = class extends ZodType {
1957
1926
  }
1958
1927
  required(mask) {
1959
1928
  const newShape = {};
1960
- util.objectKeys(this.shape).forEach((key) => {
1961
- if (mask && !mask[key]) {
1962
- newShape[key] = this.shape[key];
1963
- } else {
1929
+ if (mask) {
1930
+ util.objectKeys(this.shape).map((key) => {
1931
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1932
+ newShape[key] = this.shape[key];
1933
+ } else {
1934
+ const fieldSchema = this.shape[key];
1935
+ let newField = fieldSchema;
1936
+ while (newField instanceof ZodOptional) {
1937
+ newField = newField._def.innerType;
1938
+ }
1939
+ newShape[key] = newField;
1940
+ }
1941
+ });
1942
+ } else {
1943
+ for (const key in this.shape) {
1964
1944
  const fieldSchema = this.shape[key];
1965
1945
  let newField = fieldSchema;
1966
1946
  while (newField instanceof ZodOptional) {
@@ -1968,7 +1948,7 @@ var ZodObject = class extends ZodType {
1968
1948
  }
1969
1949
  newShape[key] = newField;
1970
1950
  }
1971
- });
1951
+ }
1972
1952
  return new ZodObject({
1973
1953
  ...this._def,
1974
1954
  shape: () => newShape
@@ -2189,17 +2169,17 @@ var ZodDiscriminatedUnion = class extends ZodType {
2189
2169
  }
2190
2170
  };
2191
2171
  __name(ZodDiscriminatedUnion, "ZodDiscriminatedUnion");
2192
- function mergeValues(a3, b2) {
2193
- const aType = getParsedType(a3);
2194
- const bType = getParsedType(b2);
2195
- if (a3 === b2) {
2196
- return { valid: true, data: a3 };
2172
+ function mergeValues(a, b) {
2173
+ const aType = getParsedType(a);
2174
+ const bType = getParsedType(b);
2175
+ if (a === b) {
2176
+ return { valid: true, data: a };
2197
2177
  } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
2198
- const bKeys = util.objectKeys(b2);
2199
- const sharedKeys = util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);
2200
- const newObj = { ...a3, ...b2 };
2178
+ const bKeys = util.objectKeys(b);
2179
+ const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
2180
+ const newObj = { ...a, ...b };
2201
2181
  for (const key of sharedKeys) {
2202
- const sharedValue = mergeValues(a3[key], b2[key]);
2182
+ const sharedValue = mergeValues(a[key], b[key]);
2203
2183
  if (!sharedValue.valid) {
2204
2184
  return { valid: false };
2205
2185
  }
@@ -2207,13 +2187,13 @@ function mergeValues(a3, b2) {
2207
2187
  }
2208
2188
  return { valid: true, data: newObj };
2209
2189
  } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
2210
- if (a3.length !== b2.length) {
2190
+ if (a.length !== b.length) {
2211
2191
  return { valid: false };
2212
2192
  }
2213
2193
  const newArray = [];
2214
- for (let index = 0; index < a3.length; index++) {
2215
- const itemA = a3[index];
2216
- const itemB = b2[index];
2194
+ for (let index = 0; index < a.length; index++) {
2195
+ const itemA = a[index];
2196
+ const itemB = b[index];
2217
2197
  const sharedValue = mergeValues(itemA, itemB);
2218
2198
  if (!sharedValue.valid) {
2219
2199
  return { valid: false };
@@ -2221,8 +2201,8 @@ function mergeValues(a3, b2) {
2221
2201
  newArray.push(sharedValue.data);
2222
2202
  }
2223
2203
  return { valid: true, data: newArray };
2224
- } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a3 === +b2) {
2225
- return { valid: true, data: a3 };
2204
+ } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
2205
+ return { valid: true, data: a };
2226
2206
  } else {
2227
2207
  return { valid: false };
2228
2208
  }
@@ -2314,12 +2294,12 @@ var ZodTuple = class extends ZodType {
2314
2294
  });
2315
2295
  status.dirty();
2316
2296
  }
2317
- const items = [...ctx.data].map((item, itemIndex) => {
2297
+ const items = ctx.data.map((item, itemIndex) => {
2318
2298
  const schema = this._def.items[itemIndex] || this._def.rest;
2319
2299
  if (!schema)
2320
2300
  return null;
2321
2301
  return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
2322
- }).filter((x2) => !!x2);
2302
+ }).filter((x) => !!x);
2323
2303
  if (ctx.common.async) {
2324
2304
  return Promise.all(items).then((results) => {
2325
2305
  return ParseStatus.mergeArray(status, results);
@@ -2515,7 +2495,7 @@ var ZodSet = class extends ZodType {
2515
2495
  return { status: status.value, value: parsedSet };
2516
2496
  }
2517
2497
  __name(finalizeSet, "finalizeSet");
2518
- const elements = [...ctx.data.values()].map((item, i2) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i2)));
2498
+ const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
2519
2499
  if (ctx.common.async) {
2520
2500
  return Promise.all(elements).then((elements2) => finalizeSet(elements2));
2521
2501
  } else {
@@ -2575,7 +2555,7 @@ var ZodFunction = class extends ZodType {
2575
2555
  ctx.schemaErrorMap,
2576
2556
  getErrorMap(),
2577
2557
  errorMap
2578
- ].filter((x2) => !!x2),
2558
+ ].filter((x) => !!x),
2579
2559
  issueData: {
2580
2560
  code: ZodIssueCode.invalid_arguments,
2581
2561
  argumentsError: error
@@ -2592,7 +2572,7 @@ var ZodFunction = class extends ZodType {
2592
2572
  ctx.schemaErrorMap,
2593
2573
  getErrorMap(),
2594
2574
  errorMap
2595
- ].filter((x2) => !!x2),
2575
+ ].filter((x) => !!x),
2596
2576
  issueData: {
2597
2577
  code: ZodIssueCode.invalid_return_type,
2598
2578
  returnTypeError: error
@@ -2605,13 +2585,13 @@ var ZodFunction = class extends ZodType {
2605
2585
  if (this._def.returns instanceof ZodPromise) {
2606
2586
  return OK(async (...args) => {
2607
2587
  const error = new ZodError([]);
2608
- const parsedArgs = await this._def.args.parseAsync(args, params).catch((e2) => {
2609
- error.addIssue(makeArgsIssue(args, e2));
2588
+ const parsedArgs = await this._def.args.parseAsync(args, params).catch((e) => {
2589
+ error.addIssue(makeArgsIssue(args, e));
2610
2590
  throw error;
2611
2591
  });
2612
2592
  const result = await fn(...parsedArgs);
2613
- const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e2) => {
2614
- error.addIssue(makeReturnsIssue(result, e2));
2593
+ const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e) => {
2594
+ error.addIssue(makeReturnsIssue(result, e));
2615
2595
  throw error;
2616
2596
  });
2617
2597
  return parsedReturns;
@@ -2690,7 +2670,6 @@ var ZodLiteral = class extends ZodType {
2690
2670
  if (input.data !== this._def.value) {
2691
2671
  const ctx = this._getOrReturnCtx(input);
2692
2672
  addIssueToContext(ctx, {
2693
- received: ctx.data,
2694
2673
  code: ZodIssueCode.invalid_literal,
2695
2674
  expected: this._def.value
2696
2675
  });
@@ -2766,12 +2745,6 @@ var ZodEnum = class extends ZodType {
2766
2745
  }
2767
2746
  return enumValues;
2768
2747
  }
2769
- extract(values) {
2770
- return ZodEnum.create(values);
2771
- }
2772
- exclude(values) {
2773
- return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));
2774
- }
2775
2748
  };
2776
2749
  __name(ZodEnum, "ZodEnum");
2777
2750
  ZodEnum.create = createZodEnum;
@@ -2812,9 +2785,6 @@ ZodNativeEnum.create = (values, params) => {
2812
2785
  });
2813
2786
  };
2814
2787
  var ZodPromise = class extends ZodType {
2815
- unwrap() {
2816
- return this._def.type;
2817
- }
2818
2788
  _parse(input) {
2819
2789
  const { ctx } = this._processInputParams(input);
2820
2790
  if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
@@ -3033,29 +3003,23 @@ var ZodCatch = class extends ZodType {
3033
3003
  const result = this._def.innerType._parse({
3034
3004
  data: ctx.data,
3035
3005
  path: ctx.path,
3036
- parent: {
3037
- ...ctx,
3038
- common: {
3039
- ...ctx.common,
3040
- issues: []
3041
- }
3042
- }
3006
+ parent: ctx
3043
3007
  });
3044
3008
  if (isAsync(result)) {
3045
3009
  return result.then((result2) => {
3046
3010
  return {
3047
3011
  status: "valid",
3048
- value: result2.status === "valid" ? result2.value : this._def.catchValue()
3012
+ value: result2.status === "valid" ? result2.value : this._def.defaultValue()
3049
3013
  };
3050
3014
  });
3051
3015
  } else {
3052
3016
  return {
3053
3017
  status: "valid",
3054
- value: result.status === "valid" ? result.value : this._def.catchValue()
3018
+ value: result.status === "valid" ? result.value : this._def.defaultValue()
3055
3019
  };
3056
3020
  }
3057
3021
  }
3058
- removeCatch() {
3022
+ removeDefault() {
3059
3023
  return this._def.innerType;
3060
3024
  }
3061
3025
  };
@@ -3064,7 +3028,7 @@ ZodCatch.create = (type, params) => {
3064
3028
  return new ZodCatch({
3065
3029
  innerType: type,
3066
3030
  typeName: ZodFirstPartyTypeKind.ZodCatch,
3067
- catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
3031
+ defaultValue: typeof params.default === "function" ? params.default : () => params.default,
3068
3032
  ...processCreateParams(params)
3069
3033
  });
3070
3034
  };
@@ -3153,10 +3117,10 @@ var ZodPipeline = class extends ZodType {
3153
3117
  }
3154
3118
  }
3155
3119
  }
3156
- static create(a3, b2) {
3120
+ static create(a, b) {
3157
3121
  return new ZodPipeline({
3158
- in: a3,
3159
- out: b2,
3122
+ in: a,
3123
+ out: b,
3160
3124
  typeName: ZodFirstPartyTypeKind.ZodPipeline
3161
3125
  });
3162
3126
  }
@@ -3257,10 +3221,7 @@ var oboolean = /* @__PURE__ */ __name(() => booleanType().optional(), "oboolean"
3257
3221
  var coerce = {
3258
3222
  string: (arg) => ZodString.create({ ...arg, coerce: true }),
3259
3223
  number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
3260
- boolean: (arg) => ZodBoolean.create({
3261
- ...arg,
3262
- coerce: true
3263
- }),
3224
+ boolean: (arg) => ZodBoolean.create({ ...arg, coerce: true }),
3264
3225
  bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
3265
3226
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3266
3227
  };
@@ -3386,13 +3347,11 @@ var AchievementCriteriaValidator = mod.object({
3386
3347
  type: mod.string().optional(),
3387
3348
  narrative: mod.string().optional()
3388
3349
  });
3389
- var ImageValidator = mod.string().or(
3390
- mod.object({
3391
- id: mod.string(),
3392
- type: mod.string(),
3393
- caption: mod.string().optional()
3394
- })
3395
- );
3350
+ var ImageValidator = mod.string().or(mod.object({
3351
+ id: mod.string(),
3352
+ type: mod.string(),
3353
+ caption: mod.string().optional()
3354
+ }));
3396
3355
  var GeoCoordinatesValidator = mod.object({
3397
3356
  type: mod.string().min(1).or(mod.string().array().nonempty()),
3398
3357
  latitude: mod.number(),
@@ -3434,31 +3393,29 @@ var IdentifierEntryValidator = mod.object({
3434
3393
  identifier: mod.string(),
3435
3394
  identifierType: IdentifierTypeValidator
3436
3395
  });
3437
- var ProfileValidator = mod.string().or(
3438
- mod.object({
3439
- id: mod.string().optional(),
3440
- type: mod.string().or(mod.string().array().nonempty().optional()),
3441
- name: mod.string().optional(),
3442
- url: mod.string().optional(),
3443
- phone: mod.string().optional(),
3444
- description: mod.string().optional(),
3445
- endorsement: mod.any().array().optional(),
3446
- image: ImageValidator.optional(),
3447
- email: mod.string().email().optional(),
3448
- address: AddressValidator.optional(),
3449
- otherIdentifier: IdentifierEntryValidator.array().optional(),
3450
- official: mod.string().optional(),
3451
- parentOrg: mod.any().optional(),
3452
- familyName: mod.string().optional(),
3453
- givenName: mod.string().optional(),
3454
- additionalName: mod.string().optional(),
3455
- patronymicName: mod.string().optional(),
3456
- honorificPrefix: mod.string().optional(),
3457
- honorificSuffix: mod.string().optional(),
3458
- familyNamePrefix: mod.string().optional(),
3459
- dateOfBirth: mod.string().optional()
3460
- }).catchall(mod.any())
3461
- );
3396
+ var ProfileValidator = mod.string().or(mod.object({
3397
+ id: mod.string().optional(),
3398
+ type: mod.string().or(mod.string().array().nonempty().optional()),
3399
+ name: mod.string().optional(),
3400
+ url: mod.string().optional(),
3401
+ phone: mod.string().optional(),
3402
+ description: mod.string().optional(),
3403
+ endorsement: mod.any().array().optional(),
3404
+ image: ImageValidator.optional(),
3405
+ email: mod.string().email().optional(),
3406
+ address: AddressValidator.optional(),
3407
+ otherIdentifier: IdentifierEntryValidator.array().optional(),
3408
+ official: mod.string().optional(),
3409
+ parentOrg: mod.any().optional(),
3410
+ familyName: mod.string().optional(),
3411
+ givenName: mod.string().optional(),
3412
+ additionalName: mod.string().optional(),
3413
+ patronymicName: mod.string().optional(),
3414
+ honorificPrefix: mod.string().optional(),
3415
+ honorificSuffix: mod.string().optional(),
3416
+ familyNamePrefix: mod.string().optional(),
3417
+ dateOfBirth: mod.string().optional()
3418
+ }).catchall(mod.any()));
3462
3419
  var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
3463
3420
  var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() });
3464
3421
  var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() });
@@ -3833,7 +3790,7 @@ var LCNSigningAuthorityForUserValidator = mod.object({
3833
3790
  })
3834
3791
  });
3835
3792
 
3836
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/toInteger/index.js
3793
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/toInteger/index.js
3837
3794
  function toInteger(dirtyNumber) {
3838
3795
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
3839
3796
  return NaN;
@@ -3846,7 +3803,7 @@ function toInteger(dirtyNumber) {
3846
3803
  }
3847
3804
  __name(toInteger, "toInteger");
3848
3805
 
3849
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/requiredArgs/index.js
3806
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/requiredArgs/index.js
3850
3807
  function requiredArgs(required, args) {
3851
3808
  if (args.length < required) {
3852
3809
  throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
@@ -3854,31 +3811,17 @@ function requiredArgs(required, args) {
3854
3811
  }
3855
3812
  __name(requiredArgs, "requiredArgs");
3856
3813
 
3857
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/toDate/index.js
3858
- function _typeof(obj) {
3859
- "@babel/helpers - typeof";
3860
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
3861
- _typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
3862
- return typeof obj2;
3863
- }, "_typeof");
3864
- } else {
3865
- _typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
3866
- return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
3867
- }, "_typeof");
3868
- }
3869
- return _typeof(obj);
3870
- }
3871
- __name(_typeof, "_typeof");
3814
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/toDate/index.js
3872
3815
  function toDate(argument) {
3873
3816
  requiredArgs(1, arguments);
3874
3817
  var argStr = Object.prototype.toString.call(argument);
3875
- if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") {
3818
+ if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
3876
3819
  return new Date(argument.getTime());
3877
3820
  } else if (typeof argument === "number" || argStr === "[object Number]") {
3878
3821
  return new Date(argument);
3879
3822
  } else {
3880
3823
  if ((typeof argument === "string" || argStr === "[object String]") && typeof console !== "undefined") {
3881
- 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");
3824
+ 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");
3882
3825
  console.warn(new Error().stack);
3883
3826
  }
3884
3827
  return new Date(NaN);
@@ -3886,7 +3829,7 @@ function toDate(argument) {
3886
3829
  }
3887
3830
  __name(toDate, "toDate");
3888
3831
 
3889
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/addMilliseconds/index.js
3832
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addMilliseconds/index.js
3890
3833
  function addMilliseconds(dirtyDate, dirtyAmount) {
3891
3834
  requiredArgs(2, arguments);
3892
3835
  var timestamp = toDate(dirtyDate).getTime();
@@ -3895,14 +3838,7 @@ function addMilliseconds(dirtyDate, dirtyAmount) {
3895
3838
  }
3896
3839
  __name(addMilliseconds, "addMilliseconds");
3897
3840
 
3898
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/defaultOptions/index.js
3899
- var defaultOptions = {};
3900
- function getDefaultOptions() {
3901
- return defaultOptions;
3902
- }
3903
- __name(getDefaultOptions, "getDefaultOptions");
3904
-
3905
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
3841
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
3906
3842
  function getTimezoneOffsetInMilliseconds(date) {
3907
3843
  var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
3908
3844
  utcDate.setUTCFullYear(date.getFullYear());
@@ -3910,28 +3846,14 @@ function getTimezoneOffsetInMilliseconds(date) {
3910
3846
  }
3911
3847
  __name(getTimezoneOffsetInMilliseconds, "getTimezoneOffsetInMilliseconds");
3912
3848
 
3913
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isDate/index.js
3914
- function _typeof2(obj) {
3915
- "@babel/helpers - typeof";
3916
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
3917
- _typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
3918
- return typeof obj2;
3919
- }, "_typeof");
3920
- } else {
3921
- _typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
3922
- return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
3923
- }, "_typeof");
3924
- }
3925
- return _typeof2(obj);
3926
- }
3927
- __name(_typeof2, "_typeof");
3849
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isDate/index.js
3928
3850
  function isDate(value) {
3929
3851
  requiredArgs(1, arguments);
3930
- return value instanceof Date || _typeof2(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
3852
+ return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
3931
3853
  }
3932
3854
  __name(isDate, "isDate");
3933
3855
 
3934
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isValid/index.js
3856
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isValid/index.js
3935
3857
  function isValid2(dirtyDate) {
3936
3858
  requiredArgs(1, arguments);
3937
3859
  if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
@@ -3942,1425 +3864,1435 @@ function isValid2(dirtyDate) {
3942
3864
  }
3943
3865
  __name(isValid2, "isValid");
3944
3866
 
3945
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/subMilliseconds/index.js
3946
- function subMilliseconds(dirtyDate, dirtyAmount) {
3947
- requiredArgs(2, arguments);
3948
- var amount = toInteger(dirtyAmount);
3949
- return addMilliseconds(dirtyDate, -amount);
3950
- }
3951
- __name(subMilliseconds, "subMilliseconds");
3952
-
3953
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
3954
- var MILLISECONDS_IN_DAY = 864e5;
3955
- function getUTCDayOfYear(dirtyDate) {
3956
- requiredArgs(1, arguments);
3957
- var date = toDate(dirtyDate);
3958
- var timestamp = date.getTime();
3959
- date.setUTCMonth(0, 1);
3960
- date.setUTCHours(0, 0, 0, 0);
3961
- var startOfYearTimestamp = date.getTime();
3962
- var difference = timestamp - startOfYearTimestamp;
3963
- return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
3964
- }
3965
- __name(getUTCDayOfYear, "getUTCDayOfYear");
3966
-
3967
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
3968
- function startOfUTCISOWeek(dirtyDate) {
3969
- requiredArgs(1, arguments);
3970
- var weekStartsOn = 1;
3971
- var date = toDate(dirtyDate);
3972
- var day = date.getUTCDay();
3973
- var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
3974
- date.setUTCDate(date.getUTCDate() - diff);
3975
- date.setUTCHours(0, 0, 0, 0);
3976
- return date;
3977
- }
3978
- __name(startOfUTCISOWeek, "startOfUTCISOWeek");
3979
-
3980
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
3981
- function getUTCISOWeekYear(dirtyDate) {
3982
- requiredArgs(1, arguments);
3983
- var date = toDate(dirtyDate);
3984
- var year = date.getUTCFullYear();
3985
- var fourthOfJanuaryOfNextYear = new Date(0);
3986
- fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
3987
- fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
3988
- var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
3989
- var fourthOfJanuaryOfThisYear = new Date(0);
3990
- fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
3991
- fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
3992
- var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
3993
- if (date.getTime() >= startOfNextYear.getTime()) {
3994
- return year + 1;
3995
- } else if (date.getTime() >= startOfThisYear.getTime()) {
3996
- return year;
3867
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
3868
+ var formatDistanceLocale = {
3869
+ lessThanXSeconds: {
3870
+ one: "less than a second",
3871
+ other: "less than {{count}} seconds"
3872
+ },
3873
+ xSeconds: {
3874
+ one: "1 second",
3875
+ other: "{{count}} seconds"
3876
+ },
3877
+ halfAMinute: "half a minute",
3878
+ lessThanXMinutes: {
3879
+ one: "less than a minute",
3880
+ other: "less than {{count}} minutes"
3881
+ },
3882
+ xMinutes: {
3883
+ one: "1 minute",
3884
+ other: "{{count}} minutes"
3885
+ },
3886
+ aboutXHours: {
3887
+ one: "about 1 hour",
3888
+ other: "about {{count}} hours"
3889
+ },
3890
+ xHours: {
3891
+ one: "1 hour",
3892
+ other: "{{count}} hours"
3893
+ },
3894
+ xDays: {
3895
+ one: "1 day",
3896
+ other: "{{count}} days"
3897
+ },
3898
+ aboutXWeeks: {
3899
+ one: "about 1 week",
3900
+ other: "about {{count}} weeks"
3901
+ },
3902
+ xWeeks: {
3903
+ one: "1 week",
3904
+ other: "{{count}} weeks"
3905
+ },
3906
+ aboutXMonths: {
3907
+ one: "about 1 month",
3908
+ other: "about {{count}} months"
3909
+ },
3910
+ xMonths: {
3911
+ one: "1 month",
3912
+ other: "{{count}} months"
3913
+ },
3914
+ aboutXYears: {
3915
+ one: "about 1 year",
3916
+ other: "about {{count}} years"
3917
+ },
3918
+ xYears: {
3919
+ one: "1 year",
3920
+ other: "{{count}} years"
3921
+ },
3922
+ overXYears: {
3923
+ one: "over 1 year",
3924
+ other: "over {{count}} years"
3925
+ },
3926
+ almostXYears: {
3927
+ one: "almost 1 year",
3928
+ other: "almost {{count}} years"
3929
+ }
3930
+ };
3931
+ var formatDistance = /* @__PURE__ */ __name(function(token, count, options) {
3932
+ var result;
3933
+ var tokenValue = formatDistanceLocale[token];
3934
+ if (typeof tokenValue === "string") {
3935
+ result = tokenValue;
3936
+ } else if (count === 1) {
3937
+ result = tokenValue.one;
3997
3938
  } else {
3998
- return year - 1;
3939
+ result = tokenValue.other.replace("{{count}}", count.toString());
3999
3940
  }
4000
- }
4001
- __name(getUTCISOWeekYear, "getUTCISOWeekYear");
4002
-
4003
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
4004
- function startOfUTCISOWeekYear(dirtyDate) {
4005
- requiredArgs(1, arguments);
4006
- var year = getUTCISOWeekYear(dirtyDate);
4007
- var fourthOfJanuary = new Date(0);
4008
- fourthOfJanuary.setUTCFullYear(year, 0, 4);
4009
- fourthOfJanuary.setUTCHours(0, 0, 0, 0);
4010
- var date = startOfUTCISOWeek(fourthOfJanuary);
4011
- return date;
4012
- }
4013
- __name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
4014
-
4015
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
4016
- var MILLISECONDS_IN_WEEK = 6048e5;
4017
- function getUTCISOWeek(dirtyDate) {
4018
- requiredArgs(1, arguments);
4019
- var date = toDate(dirtyDate);
4020
- var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
4021
- return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
4022
- }
4023
- __name(getUTCISOWeek, "getUTCISOWeek");
4024
-
4025
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
4026
- function startOfUTCWeek(dirtyDate, options) {
4027
- var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
4028
- requiredArgs(1, arguments);
4029
- var defaultOptions2 = getDefaultOptions();
4030
- 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);
4031
- if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
4032
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
3941
+ if (options !== null && options !== void 0 && options.addSuffix) {
3942
+ if (options.comparison && options.comparison > 0) {
3943
+ return "in " + result;
3944
+ } else {
3945
+ return result + " ago";
3946
+ }
4033
3947
  }
4034
- var date = toDate(dirtyDate);
4035
- var day = date.getUTCDay();
4036
- var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
4037
- date.setUTCDate(date.getUTCDate() - diff);
4038
- date.setUTCHours(0, 0, 0, 0);
4039
- return date;
3948
+ return result;
3949
+ }, "formatDistance");
3950
+ var formatDistance_default = formatDistance;
3951
+
3952
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
3953
+ function buildFormatLongFn(args) {
3954
+ return function() {
3955
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3956
+ var width = options.width ? String(options.width) : args.defaultWidth;
3957
+ var format2 = args.formats[width] || args.formats[args.defaultWidth];
3958
+ return format2;
3959
+ };
4040
3960
  }
4041
- __name(startOfUTCWeek, "startOfUTCWeek");
3961
+ __name(buildFormatLongFn, "buildFormatLongFn");
4042
3962
 
4043
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
4044
- function getUTCWeekYear(dirtyDate, options) {
4045
- var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
4046
- requiredArgs(1, arguments);
4047
- var date = toDate(dirtyDate);
4048
- var year = date.getUTCFullYear();
4049
- var defaultOptions2 = getDefaultOptions();
4050
- 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);
4051
- if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
4052
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
4053
- }
4054
- var firstWeekOfNextYear = new Date(0);
4055
- firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
4056
- firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
4057
- var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
4058
- var firstWeekOfThisYear = new Date(0);
4059
- firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
4060
- firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
4061
- var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
4062
- if (date.getTime() >= startOfNextYear.getTime()) {
4063
- return year + 1;
4064
- } else if (date.getTime() >= startOfThisYear.getTime()) {
4065
- return year;
4066
- } else {
4067
- return year - 1;
4068
- }
4069
- }
4070
- __name(getUTCWeekYear, "getUTCWeekYear");
3963
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
3964
+ var dateFormats = {
3965
+ full: "EEEE, MMMM do, y",
3966
+ long: "MMMM do, y",
3967
+ medium: "MMM d, y",
3968
+ short: "MM/dd/yyyy"
3969
+ };
3970
+ var timeFormats = {
3971
+ full: "h:mm:ss a zzzz",
3972
+ long: "h:mm:ss a z",
3973
+ medium: "h:mm:ss a",
3974
+ short: "h:mm a"
3975
+ };
3976
+ var dateTimeFormats = {
3977
+ full: "{{date}} 'at' {{time}}",
3978
+ long: "{{date}} 'at' {{time}}",
3979
+ medium: "{{date}}, {{time}}",
3980
+ short: "{{date}}, {{time}}"
3981
+ };
3982
+ var formatLong = {
3983
+ date: buildFormatLongFn({
3984
+ formats: dateFormats,
3985
+ defaultWidth: "full"
3986
+ }),
3987
+ time: buildFormatLongFn({
3988
+ formats: timeFormats,
3989
+ defaultWidth: "full"
3990
+ }),
3991
+ dateTime: buildFormatLongFn({
3992
+ formats: dateTimeFormats,
3993
+ defaultWidth: "full"
3994
+ })
3995
+ };
3996
+ var formatLong_default = formatLong;
4071
3997
 
4072
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
4073
- function startOfUTCWeekYear(dirtyDate, options) {
4074
- var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
4075
- requiredArgs(1, arguments);
4076
- var defaultOptions2 = getDefaultOptions();
4077
- 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);
4078
- var year = getUTCWeekYear(dirtyDate, options);
4079
- var firstWeek = new Date(0);
4080
- firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
4081
- firstWeek.setUTCHours(0, 0, 0, 0);
4082
- var date = startOfUTCWeek(firstWeek, options);
4083
- return date;
4084
- }
4085
- __name(startOfUTCWeekYear, "startOfUTCWeekYear");
3998
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
3999
+ var formatRelativeLocale = {
4000
+ lastWeek: "'last' eeee 'at' p",
4001
+ yesterday: "'yesterday at' p",
4002
+ today: "'today at' p",
4003
+ tomorrow: "'tomorrow at' p",
4004
+ nextWeek: "eeee 'at' p",
4005
+ other: "P"
4006
+ };
4007
+ var formatRelative = /* @__PURE__ */ __name(function(token, _date, _baseDate, _options) {
4008
+ return formatRelativeLocale[token];
4009
+ }, "formatRelative");
4010
+ var formatRelative_default = formatRelative;
4086
4011
 
4087
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCWeek/index.js
4088
- var MILLISECONDS_IN_WEEK2 = 6048e5;
4089
- function getUTCWeek(dirtyDate, options) {
4090
- requiredArgs(1, arguments);
4091
- var date = toDate(dirtyDate);
4092
- var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
4093
- return Math.round(diff / MILLISECONDS_IN_WEEK2) + 1;
4012
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
4013
+ function buildLocalizeFn(args) {
4014
+ return function(dirtyIndex, dirtyOptions) {
4015
+ var options = dirtyOptions || {};
4016
+ var context = options.context ? String(options.context) : "standalone";
4017
+ var valuesArray;
4018
+ if (context === "formatting" && args.formattingValues) {
4019
+ var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
4020
+ var width = options.width ? String(options.width) : defaultWidth;
4021
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
4022
+ } else {
4023
+ var _defaultWidth = args.defaultWidth;
4024
+ var _width = options.width ? String(options.width) : args.defaultWidth;
4025
+ valuesArray = args.values[_width] || args.values[_defaultWidth];
4026
+ }
4027
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
4028
+ return valuesArray[index];
4029
+ };
4094
4030
  }
4095
- __name(getUTCWeek, "getUTCWeek");
4031
+ __name(buildLocalizeFn, "buildLocalizeFn");
4096
4032
 
4097
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
4098
- function addLeadingZeros(number, targetLength) {
4099
- var sign = number < 0 ? "-" : "";
4100
- var output = Math.abs(number).toString();
4101
- while (output.length < targetLength) {
4102
- output = "0" + output;
4033
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
4034
+ var eraValues = {
4035
+ narrow: ["B", "A"],
4036
+ abbreviated: ["BC", "AD"],
4037
+ wide: ["Before Christ", "Anno Domini"]
4038
+ };
4039
+ var quarterValues = {
4040
+ narrow: ["1", "2", "3", "4"],
4041
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
4042
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
4043
+ };
4044
+ var monthValues = {
4045
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
4046
+ abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
4047
+ wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
4048
+ };
4049
+ var dayValues = {
4050
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
4051
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
4052
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
4053
+ wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
4054
+ };
4055
+ var dayPeriodValues = {
4056
+ narrow: {
4057
+ am: "a",
4058
+ pm: "p",
4059
+ midnight: "mi",
4060
+ noon: "n",
4061
+ morning: "morning",
4062
+ afternoon: "afternoon",
4063
+ evening: "evening",
4064
+ night: "night"
4065
+ },
4066
+ abbreviated: {
4067
+ am: "AM",
4068
+ pm: "PM",
4069
+ midnight: "midnight",
4070
+ noon: "noon",
4071
+ morning: "morning",
4072
+ afternoon: "afternoon",
4073
+ evening: "evening",
4074
+ night: "night"
4075
+ },
4076
+ wide: {
4077
+ am: "a.m.",
4078
+ pm: "p.m.",
4079
+ midnight: "midnight",
4080
+ noon: "noon",
4081
+ morning: "morning",
4082
+ afternoon: "afternoon",
4083
+ evening: "evening",
4084
+ night: "night"
4103
4085
  }
4104
- return sign + output;
4105
- }
4106
- __name(addLeadingZeros, "addLeadingZeros");
4107
-
4108
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
4109
- var formatters = {
4110
- y: /* @__PURE__ */ __name(function y(date, token) {
4111
- var signedYear = date.getUTCFullYear();
4112
- var year = signedYear > 0 ? signedYear : 1 - signedYear;
4113
- return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
4114
- }, "y"),
4115
- M: /* @__PURE__ */ __name(function M(date, token) {
4116
- var month = date.getUTCMonth();
4117
- return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
4118
- }, "M"),
4119
- d: /* @__PURE__ */ __name(function d(date, token) {
4120
- return addLeadingZeros(date.getUTCDate(), token.length);
4121
- }, "d"),
4122
- a: /* @__PURE__ */ __name(function a(date, token) {
4123
- var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
4124
- switch (token) {
4125
- case "a":
4126
- case "aa":
4127
- return dayPeriodEnumValue.toUpperCase();
4128
- case "aaa":
4129
- return dayPeriodEnumValue;
4130
- case "aaaaa":
4131
- return dayPeriodEnumValue[0];
4132
- case "aaaa":
4133
- default:
4134
- return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
4135
- }
4136
- }, "a"),
4137
- h: /* @__PURE__ */ __name(function h(date, token) {
4138
- return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
4139
- }, "h"),
4140
- H: /* @__PURE__ */ __name(function H(date, token) {
4141
- return addLeadingZeros(date.getUTCHours(), token.length);
4142
- }, "H"),
4143
- m: /* @__PURE__ */ __name(function m(date, token) {
4144
- return addLeadingZeros(date.getUTCMinutes(), token.length);
4145
- }, "m"),
4146
- s: /* @__PURE__ */ __name(function s(date, token) {
4147
- return addLeadingZeros(date.getUTCSeconds(), token.length);
4148
- }, "s"),
4149
- S: /* @__PURE__ */ __name(function S(date, token) {
4150
- var numberOfDigits = token.length;
4151
- var milliseconds = date.getUTCMilliseconds();
4152
- var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
4153
- return addLeadingZeros(fractionalSeconds, token.length);
4154
- }, "S")
4155
4086
  };
4156
- var lightFormatters_default = formatters;
4157
-
4158
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/formatters/index.js
4159
- var dayPeriodEnum = {
4160
- am: "am",
4161
- pm: "pm",
4162
- midnight: "midnight",
4163
- noon: "noon",
4164
- morning: "morning",
4165
- afternoon: "afternoon",
4166
- evening: "evening",
4167
- night: "night"
4087
+ var formattingDayPeriodValues = {
4088
+ narrow: {
4089
+ am: "a",
4090
+ pm: "p",
4091
+ midnight: "mi",
4092
+ noon: "n",
4093
+ morning: "in the morning",
4094
+ afternoon: "in the afternoon",
4095
+ evening: "in the evening",
4096
+ night: "at night"
4097
+ },
4098
+ abbreviated: {
4099
+ am: "AM",
4100
+ pm: "PM",
4101
+ midnight: "midnight",
4102
+ noon: "noon",
4103
+ morning: "in the morning",
4104
+ afternoon: "in the afternoon",
4105
+ evening: "in the evening",
4106
+ night: "at night"
4107
+ },
4108
+ wide: {
4109
+ am: "a.m.",
4110
+ pm: "p.m.",
4111
+ midnight: "midnight",
4112
+ noon: "noon",
4113
+ morning: "in the morning",
4114
+ afternoon: "in the afternoon",
4115
+ evening: "in the evening",
4116
+ night: "at night"
4117
+ }
4168
4118
  };
4169
- var formatters2 = {
4170
- G: /* @__PURE__ */ __name(function G(date, token, localize2) {
4171
- var era = date.getUTCFullYear() > 0 ? 1 : 0;
4172
- switch (token) {
4173
- case "G":
4174
- case "GG":
4175
- case "GGG":
4176
- return localize2.era(era, {
4177
- width: "abbreviated"
4178
- });
4179
- case "GGGGG":
4180
- return localize2.era(era, {
4181
- width: "narrow"
4182
- });
4183
- case "GGGG":
4184
- default:
4185
- return localize2.era(era, {
4186
- width: "wide"
4187
- });
4188
- }
4189
- }, "G"),
4190
- y: /* @__PURE__ */ __name(function y2(date, token, localize2) {
4191
- if (token === "yo") {
4192
- var signedYear = date.getUTCFullYear();
4193
- var year = signedYear > 0 ? signedYear : 1 - signedYear;
4194
- return localize2.ordinalNumber(year, {
4195
- unit: "year"
4196
- });
4119
+ var ordinalNumber = /* @__PURE__ */ __name(function(dirtyNumber, _options) {
4120
+ var number = Number(dirtyNumber);
4121
+ var rem100 = number % 100;
4122
+ if (rem100 > 20 || rem100 < 10) {
4123
+ switch (rem100 % 10) {
4124
+ case 1:
4125
+ return number + "st";
4126
+ case 2:
4127
+ return number + "nd";
4128
+ case 3:
4129
+ return number + "rd";
4197
4130
  }
4198
- return lightFormatters_default.y(date, token);
4199
- }, "y"),
4200
- Y: /* @__PURE__ */ __name(function Y(date, token, localize2, options) {
4201
- var signedWeekYear = getUTCWeekYear(date, options);
4202
- var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
4203
- if (token === "YY") {
4204
- var twoDigitYear = weekYear % 100;
4205
- return addLeadingZeros(twoDigitYear, 2);
4206
- }
4207
- if (token === "Yo") {
4208
- return localize2.ordinalNumber(weekYear, {
4209
- unit: "year"
4210
- });
4211
- }
4212
- return addLeadingZeros(weekYear, token.length);
4213
- }, "Y"),
4214
- R: /* @__PURE__ */ __name(function R(date, token) {
4215
- var isoWeekYear = getUTCISOWeekYear(date);
4216
- return addLeadingZeros(isoWeekYear, token.length);
4217
- }, "R"),
4218
- u: /* @__PURE__ */ __name(function u(date, token) {
4219
- var year = date.getUTCFullYear();
4220
- return addLeadingZeros(year, token.length);
4221
- }, "u"),
4222
- Q: /* @__PURE__ */ __name(function Q(date, token, localize2) {
4223
- var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4224
- switch (token) {
4225
- case "Q":
4226
- return String(quarter);
4227
- case "QQ":
4228
- return addLeadingZeros(quarter, 2);
4229
- case "Qo":
4230
- return localize2.ordinalNumber(quarter, {
4231
- unit: "quarter"
4232
- });
4233
- case "QQQ":
4234
- return localize2.quarter(quarter, {
4235
- width: "abbreviated",
4236
- context: "formatting"
4237
- });
4238
- case "QQQQQ":
4239
- return localize2.quarter(quarter, {
4240
- width: "narrow",
4241
- context: "formatting"
4242
- });
4243
- case "QQQQ":
4244
- default:
4245
- return localize2.quarter(quarter, {
4246
- width: "wide",
4247
- context: "formatting"
4248
- });
4249
- }
4250
- }, "Q"),
4251
- q: /* @__PURE__ */ __name(function q(date, token, localize2) {
4252
- var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4253
- switch (token) {
4254
- case "q":
4255
- return String(quarter);
4256
- case "qq":
4257
- return addLeadingZeros(quarter, 2);
4258
- case "qo":
4259
- return localize2.ordinalNumber(quarter, {
4260
- unit: "quarter"
4261
- });
4262
- case "qqq":
4263
- return localize2.quarter(quarter, {
4264
- width: "abbreviated",
4265
- context: "standalone"
4266
- });
4267
- case "qqqqq":
4268
- return localize2.quarter(quarter, {
4269
- width: "narrow",
4270
- context: "standalone"
4271
- });
4272
- case "qqqq":
4273
- default:
4274
- return localize2.quarter(quarter, {
4275
- width: "wide",
4276
- context: "standalone"
4277
- });
4278
- }
4279
- }, "q"),
4280
- M: /* @__PURE__ */ __name(function M2(date, token, localize2) {
4281
- var month = date.getUTCMonth();
4282
- switch (token) {
4283
- case "M":
4284
- case "MM":
4285
- return lightFormatters_default.M(date, token);
4286
- case "Mo":
4287
- return localize2.ordinalNumber(month + 1, {
4288
- unit: "month"
4289
- });
4290
- case "MMM":
4291
- return localize2.month(month, {
4292
- width: "abbreviated",
4293
- context: "formatting"
4294
- });
4295
- case "MMMMM":
4296
- return localize2.month(month, {
4297
- width: "narrow",
4298
- context: "formatting"
4299
- });
4300
- case "MMMM":
4301
- default:
4302
- return localize2.month(month, {
4303
- width: "wide",
4304
- context: "formatting"
4305
- });
4306
- }
4307
- }, "M"),
4308
- L: /* @__PURE__ */ __name(function L(date, token, localize2) {
4309
- var month = date.getUTCMonth();
4310
- switch (token) {
4311
- case "L":
4312
- return String(month + 1);
4313
- case "LL":
4314
- return addLeadingZeros(month + 1, 2);
4315
- case "Lo":
4316
- return localize2.ordinalNumber(month + 1, {
4317
- unit: "month"
4318
- });
4319
- case "LLL":
4320
- return localize2.month(month, {
4321
- width: "abbreviated",
4322
- context: "standalone"
4323
- });
4324
- case "LLLLL":
4325
- return localize2.month(month, {
4326
- width: "narrow",
4327
- context: "standalone"
4328
- });
4329
- case "LLLL":
4330
- default:
4331
- return localize2.month(month, {
4332
- width: "wide",
4333
- context: "standalone"
4334
- });
4335
- }
4336
- }, "L"),
4337
- w: /* @__PURE__ */ __name(function w(date, token, localize2, options) {
4338
- var week = getUTCWeek(date, options);
4339
- if (token === "wo") {
4340
- return localize2.ordinalNumber(week, {
4341
- unit: "week"
4342
- });
4343
- }
4344
- return addLeadingZeros(week, token.length);
4345
- }, "w"),
4346
- I: /* @__PURE__ */ __name(function I(date, token, localize2) {
4347
- var isoWeek = getUTCISOWeek(date);
4348
- if (token === "Io") {
4349
- return localize2.ordinalNumber(isoWeek, {
4350
- unit: "week"
4351
- });
4352
- }
4353
- return addLeadingZeros(isoWeek, token.length);
4354
- }, "I"),
4355
- d: /* @__PURE__ */ __name(function d2(date, token, localize2) {
4356
- if (token === "do") {
4357
- return localize2.ordinalNumber(date.getUTCDate(), {
4358
- unit: "date"
4359
- });
4360
- }
4361
- return lightFormatters_default.d(date, token);
4362
- }, "d"),
4363
- D: /* @__PURE__ */ __name(function D(date, token, localize2) {
4364
- var dayOfYear = getUTCDayOfYear(date);
4365
- if (token === "Do") {
4366
- return localize2.ordinalNumber(dayOfYear, {
4367
- unit: "dayOfYear"
4368
- });
4369
- }
4370
- return addLeadingZeros(dayOfYear, token.length);
4371
- }, "D"),
4372
- E: /* @__PURE__ */ __name(function E(date, token, localize2) {
4373
- var dayOfWeek = date.getUTCDay();
4374
- switch (token) {
4375
- case "E":
4376
- case "EE":
4377
- case "EEE":
4378
- return localize2.day(dayOfWeek, {
4379
- width: "abbreviated",
4380
- context: "formatting"
4381
- });
4382
- case "EEEEE":
4383
- return localize2.day(dayOfWeek, {
4384
- width: "narrow",
4385
- context: "formatting"
4386
- });
4387
- case "EEEEEE":
4388
- return localize2.day(dayOfWeek, {
4389
- width: "short",
4390
- context: "formatting"
4391
- });
4392
- case "EEEE":
4393
- default:
4394
- return localize2.day(dayOfWeek, {
4395
- width: "wide",
4396
- context: "formatting"
4397
- });
4398
- }
4399
- }, "E"),
4400
- e: /* @__PURE__ */ __name(function e(date, token, localize2, options) {
4401
- var dayOfWeek = date.getUTCDay();
4402
- var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4403
- switch (token) {
4404
- case "e":
4405
- return String(localDayOfWeek);
4406
- case "ee":
4407
- return addLeadingZeros(localDayOfWeek, 2);
4408
- case "eo":
4409
- return localize2.ordinalNumber(localDayOfWeek, {
4410
- unit: "day"
4411
- });
4412
- case "eee":
4413
- return localize2.day(dayOfWeek, {
4414
- width: "abbreviated",
4415
- context: "formatting"
4416
- });
4417
- case "eeeee":
4418
- return localize2.day(dayOfWeek, {
4419
- width: "narrow",
4420
- context: "formatting"
4421
- });
4422
- case "eeeeee":
4423
- return localize2.day(dayOfWeek, {
4424
- width: "short",
4425
- context: "formatting"
4426
- });
4427
- case "eeee":
4428
- default:
4429
- return localize2.day(dayOfWeek, {
4430
- width: "wide",
4431
- context: "formatting"
4432
- });
4433
- }
4434
- }, "e"),
4435
- c: /* @__PURE__ */ __name(function c(date, token, localize2, options) {
4436
- var dayOfWeek = date.getUTCDay();
4437
- var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4438
- switch (token) {
4439
- case "c":
4440
- return String(localDayOfWeek);
4441
- case "cc":
4442
- return addLeadingZeros(localDayOfWeek, token.length);
4443
- case "co":
4444
- return localize2.ordinalNumber(localDayOfWeek, {
4445
- unit: "day"
4446
- });
4447
- case "ccc":
4448
- return localize2.day(dayOfWeek, {
4449
- width: "abbreviated",
4450
- context: "standalone"
4451
- });
4452
- case "ccccc":
4453
- return localize2.day(dayOfWeek, {
4454
- width: "narrow",
4455
- context: "standalone"
4456
- });
4457
- case "cccccc":
4458
- return localize2.day(dayOfWeek, {
4459
- width: "short",
4460
- context: "standalone"
4461
- });
4462
- case "cccc":
4463
- default:
4464
- return localize2.day(dayOfWeek, {
4465
- width: "wide",
4466
- context: "standalone"
4467
- });
4468
- }
4469
- }, "c"),
4470
- i: /* @__PURE__ */ __name(function i(date, token, localize2) {
4471
- var dayOfWeek = date.getUTCDay();
4472
- var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
4473
- switch (token) {
4474
- case "i":
4475
- return String(isoDayOfWeek);
4476
- case "ii":
4477
- return addLeadingZeros(isoDayOfWeek, token.length);
4478
- case "io":
4479
- return localize2.ordinalNumber(isoDayOfWeek, {
4480
- unit: "day"
4481
- });
4482
- case "iii":
4483
- return localize2.day(dayOfWeek, {
4484
- width: "abbreviated",
4485
- context: "formatting"
4486
- });
4487
- case "iiiii":
4488
- return localize2.day(dayOfWeek, {
4489
- width: "narrow",
4490
- context: "formatting"
4491
- });
4492
- case "iiiiii":
4493
- return localize2.day(dayOfWeek, {
4494
- width: "short",
4495
- context: "formatting"
4496
- });
4497
- case "iiii":
4498
- default:
4499
- return localize2.day(dayOfWeek, {
4500
- width: "wide",
4501
- context: "formatting"
4502
- });
4503
- }
4504
- }, "i"),
4505
- a: /* @__PURE__ */ __name(function a2(date, token, localize2) {
4506
- var hours = date.getUTCHours();
4507
- var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4508
- switch (token) {
4509
- case "a":
4510
- case "aa":
4511
- return localize2.dayPeriod(dayPeriodEnumValue, {
4512
- width: "abbreviated",
4513
- context: "formatting"
4514
- });
4515
- case "aaa":
4516
- return localize2.dayPeriod(dayPeriodEnumValue, {
4517
- width: "abbreviated",
4518
- context: "formatting"
4519
- }).toLowerCase();
4520
- case "aaaaa":
4521
- return localize2.dayPeriod(dayPeriodEnumValue, {
4522
- width: "narrow",
4523
- context: "formatting"
4524
- });
4525
- case "aaaa":
4526
- default:
4527
- return localize2.dayPeriod(dayPeriodEnumValue, {
4528
- width: "wide",
4529
- context: "formatting"
4530
- });
4531
- }
4532
- }, "a"),
4533
- b: /* @__PURE__ */ __name(function b(date, token, localize2) {
4534
- var hours = date.getUTCHours();
4535
- var dayPeriodEnumValue;
4536
- if (hours === 12) {
4537
- dayPeriodEnumValue = dayPeriodEnum.noon;
4538
- } else if (hours === 0) {
4539
- dayPeriodEnumValue = dayPeriodEnum.midnight;
4540
- } else {
4541
- dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4542
- }
4543
- switch (token) {
4544
- case "b":
4545
- case "bb":
4546
- return localize2.dayPeriod(dayPeriodEnumValue, {
4547
- width: "abbreviated",
4548
- context: "formatting"
4549
- });
4550
- case "bbb":
4551
- return localize2.dayPeriod(dayPeriodEnumValue, {
4552
- width: "abbreviated",
4553
- context: "formatting"
4554
- }).toLowerCase();
4555
- case "bbbbb":
4556
- return localize2.dayPeriod(dayPeriodEnumValue, {
4557
- width: "narrow",
4558
- context: "formatting"
4559
- });
4560
- case "bbbb":
4561
- default:
4562
- return localize2.dayPeriod(dayPeriodEnumValue, {
4563
- width: "wide",
4564
- context: "formatting"
4565
- });
4566
- }
4567
- }, "b"),
4568
- B: /* @__PURE__ */ __name(function B(date, token, localize2) {
4569
- var hours = date.getUTCHours();
4570
- var dayPeriodEnumValue;
4571
- if (hours >= 17) {
4572
- dayPeriodEnumValue = dayPeriodEnum.evening;
4573
- } else if (hours >= 12) {
4574
- dayPeriodEnumValue = dayPeriodEnum.afternoon;
4575
- } else if (hours >= 4) {
4576
- dayPeriodEnumValue = dayPeriodEnum.morning;
4577
- } else {
4578
- dayPeriodEnumValue = dayPeriodEnum.night;
4579
- }
4580
- switch (token) {
4581
- case "B":
4582
- case "BB":
4583
- case "BBB":
4584
- return localize2.dayPeriod(dayPeriodEnumValue, {
4585
- width: "abbreviated",
4586
- context: "formatting"
4587
- });
4588
- case "BBBBB":
4589
- return localize2.dayPeriod(dayPeriodEnumValue, {
4590
- width: "narrow",
4591
- context: "formatting"
4592
- });
4593
- case "BBBB":
4594
- default:
4595
- return localize2.dayPeriod(dayPeriodEnumValue, {
4596
- width: "wide",
4597
- context: "formatting"
4598
- });
4599
- }
4600
- }, "B"),
4601
- h: /* @__PURE__ */ __name(function h2(date, token, localize2) {
4602
- if (token === "ho") {
4603
- var hours = date.getUTCHours() % 12;
4604
- if (hours === 0)
4605
- hours = 12;
4606
- return localize2.ordinalNumber(hours, {
4607
- unit: "hour"
4608
- });
4609
- }
4610
- return lightFormatters_default.h(date, token);
4611
- }, "h"),
4612
- H: /* @__PURE__ */ __name(function H2(date, token, localize2) {
4613
- if (token === "Ho") {
4614
- return localize2.ordinalNumber(date.getUTCHours(), {
4615
- unit: "hour"
4616
- });
4617
- }
4618
- return lightFormatters_default.H(date, token);
4619
- }, "H"),
4620
- K: /* @__PURE__ */ __name(function K(date, token, localize2) {
4621
- var hours = date.getUTCHours() % 12;
4622
- if (token === "Ko") {
4623
- return localize2.ordinalNumber(hours, {
4624
- unit: "hour"
4625
- });
4626
- }
4627
- return addLeadingZeros(hours, token.length);
4628
- }, "K"),
4629
- k: /* @__PURE__ */ __name(function k(date, token, localize2) {
4630
- var hours = date.getUTCHours();
4631
- if (hours === 0)
4632
- hours = 24;
4633
- if (token === "ko") {
4634
- return localize2.ordinalNumber(hours, {
4635
- unit: "hour"
4636
- });
4637
- }
4638
- return addLeadingZeros(hours, token.length);
4639
- }, "k"),
4640
- m: /* @__PURE__ */ __name(function m2(date, token, localize2) {
4641
- if (token === "mo") {
4642
- return localize2.ordinalNumber(date.getUTCMinutes(), {
4643
- unit: "minute"
4644
- });
4645
- }
4646
- return lightFormatters_default.m(date, token);
4647
- }, "m"),
4648
- s: /* @__PURE__ */ __name(function s2(date, token, localize2) {
4649
- if (token === "so") {
4650
- return localize2.ordinalNumber(date.getUTCSeconds(), {
4651
- unit: "second"
4652
- });
4131
+ }
4132
+ return number + "th";
4133
+ }, "ordinalNumber");
4134
+ var localize = {
4135
+ ordinalNumber,
4136
+ era: buildLocalizeFn({
4137
+ values: eraValues,
4138
+ defaultWidth: "wide"
4139
+ }),
4140
+ quarter: buildLocalizeFn({
4141
+ values: quarterValues,
4142
+ defaultWidth: "wide",
4143
+ argumentCallback: function(quarter) {
4144
+ return quarter - 1;
4653
4145
  }
4654
- return lightFormatters_default.s(date, token);
4655
- }, "s"),
4656
- S: /* @__PURE__ */ __name(function S2(date, token) {
4657
- return lightFormatters_default.S(date, token);
4658
- }, "S"),
4659
- X: /* @__PURE__ */ __name(function X(date, token, _localize, options) {
4660
- var originalDate = options._originalDate || date;
4661
- var timezoneOffset = originalDate.getTimezoneOffset();
4662
- if (timezoneOffset === 0) {
4663
- return "Z";
4146
+ }),
4147
+ month: buildLocalizeFn({
4148
+ values: monthValues,
4149
+ defaultWidth: "wide"
4150
+ }),
4151
+ day: buildLocalizeFn({
4152
+ values: dayValues,
4153
+ defaultWidth: "wide"
4154
+ }),
4155
+ dayPeriod: buildLocalizeFn({
4156
+ values: dayPeriodValues,
4157
+ defaultWidth: "wide",
4158
+ formattingValues: formattingDayPeriodValues,
4159
+ defaultFormattingWidth: "wide"
4160
+ })
4161
+ };
4162
+ var localize_default = localize;
4163
+
4164
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
4165
+ function buildMatchFn(args) {
4166
+ return function(string) {
4167
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4168
+ var width = options.width;
4169
+ var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
4170
+ var matchResult = string.match(matchPattern);
4171
+ if (!matchResult) {
4172
+ return null;
4664
4173
  }
4665
- switch (token) {
4666
- case "X":
4667
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
4668
- case "XXXX":
4669
- case "XX":
4670
- return formatTimezone(timezoneOffset);
4671
- case "XXXXX":
4672
- case "XXX":
4673
- default:
4674
- return formatTimezone(timezoneOffset, ":");
4174
+ var matchedString = matchResult[0];
4175
+ var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
4176
+ var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
4177
+ return pattern.test(matchedString);
4178
+ }) : findKey(parsePatterns, function(pattern) {
4179
+ return pattern.test(matchedString);
4180
+ });
4181
+ var value;
4182
+ value = args.valueCallback ? args.valueCallback(key) : key;
4183
+ value = options.valueCallback ? options.valueCallback(value) : value;
4184
+ var rest = string.slice(matchedString.length);
4185
+ return {
4186
+ value,
4187
+ rest
4188
+ };
4189
+ };
4190
+ }
4191
+ __name(buildMatchFn, "buildMatchFn");
4192
+ function findKey(object, predicate) {
4193
+ for (var key in object) {
4194
+ if (object.hasOwnProperty(key) && predicate(object[key])) {
4195
+ return key;
4675
4196
  }
4676
- }, "X"),
4677
- x: /* @__PURE__ */ __name(function x(date, token, _localize, options) {
4678
- var originalDate = options._originalDate || date;
4679
- var timezoneOffset = originalDate.getTimezoneOffset();
4680
- switch (token) {
4681
- case "x":
4682
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
4683
- case "xxxx":
4684
- case "xx":
4685
- return formatTimezone(timezoneOffset);
4686
- case "xxxxx":
4687
- case "xxx":
4688
- default:
4689
- return formatTimezone(timezoneOffset, ":");
4197
+ }
4198
+ return void 0;
4199
+ }
4200
+ __name(findKey, "findKey");
4201
+ function findIndex(array, predicate) {
4202
+ for (var key = 0; key < array.length; key++) {
4203
+ if (predicate(array[key])) {
4204
+ return key;
4690
4205
  }
4691
- }, "x"),
4692
- O: /* @__PURE__ */ __name(function O(date, token, _localize, options) {
4693
- var originalDate = options._originalDate || date;
4694
- var timezoneOffset = originalDate.getTimezoneOffset();
4695
- switch (token) {
4696
- case "O":
4697
- case "OO":
4698
- case "OOO":
4699
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
4700
- case "OOOO":
4701
- default:
4702
- return "GMT" + formatTimezone(timezoneOffset, ":");
4206
+ }
4207
+ return void 0;
4208
+ }
4209
+ __name(findIndex, "findIndex");
4210
+
4211
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
4212
+ function buildMatchPatternFn(args) {
4213
+ return function(string) {
4214
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4215
+ var matchResult = string.match(args.matchPattern);
4216
+ if (!matchResult)
4217
+ return null;
4218
+ var matchedString = matchResult[0];
4219
+ var parseResult = string.match(args.parsePattern);
4220
+ if (!parseResult)
4221
+ return null;
4222
+ var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
4223
+ value = options.valueCallback ? options.valueCallback(value) : value;
4224
+ var rest = string.slice(matchedString.length);
4225
+ return {
4226
+ value,
4227
+ rest
4228
+ };
4229
+ };
4230
+ }
4231
+ __name(buildMatchPatternFn, "buildMatchPatternFn");
4232
+
4233
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
4234
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
4235
+ var parseOrdinalNumberPattern = /\d+/i;
4236
+ var matchEraPatterns = {
4237
+ narrow: /^(b|a)/i,
4238
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
4239
+ wide: /^(before christ|before common era|anno domini|common era)/i
4240
+ };
4241
+ var parseEraPatterns = {
4242
+ any: [/^b/i, /^(a|c)/i]
4243
+ };
4244
+ var matchQuarterPatterns = {
4245
+ narrow: /^[1234]/i,
4246
+ abbreviated: /^q[1234]/i,
4247
+ wide: /^[1234](th|st|nd|rd)? quarter/i
4248
+ };
4249
+ var parseQuarterPatterns = {
4250
+ any: [/1/i, /2/i, /3/i, /4/i]
4251
+ };
4252
+ var matchMonthPatterns = {
4253
+ narrow: /^[jfmasond]/i,
4254
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
4255
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
4256
+ };
4257
+ var parseMonthPatterns = {
4258
+ 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],
4259
+ 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]
4260
+ };
4261
+ var matchDayPatterns = {
4262
+ narrow: /^[smtwf]/i,
4263
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
4264
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
4265
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
4266
+ };
4267
+ var parseDayPatterns = {
4268
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
4269
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
4270
+ };
4271
+ var matchDayPeriodPatterns = {
4272
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
4273
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
4274
+ };
4275
+ var parseDayPeriodPatterns = {
4276
+ any: {
4277
+ am: /^a/i,
4278
+ pm: /^p/i,
4279
+ midnight: /^mi/i,
4280
+ noon: /^no/i,
4281
+ morning: /morning/i,
4282
+ afternoon: /afternoon/i,
4283
+ evening: /evening/i,
4284
+ night: /night/i
4285
+ }
4286
+ };
4287
+ var match = {
4288
+ ordinalNumber: buildMatchPatternFn({
4289
+ matchPattern: matchOrdinalNumberPattern,
4290
+ parsePattern: parseOrdinalNumberPattern,
4291
+ valueCallback: function(value) {
4292
+ return parseInt(value, 10);
4703
4293
  }
4704
- }, "O"),
4705
- z: /* @__PURE__ */ __name(function z(date, token, _localize, options) {
4706
- var originalDate = options._originalDate || date;
4707
- var timezoneOffset = originalDate.getTimezoneOffset();
4708
- switch (token) {
4709
- case "z":
4710
- case "zz":
4711
- case "zzz":
4712
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
4713
- case "zzzz":
4714
- default:
4715
- return "GMT" + formatTimezone(timezoneOffset, ":");
4294
+ }),
4295
+ era: buildMatchFn({
4296
+ matchPatterns: matchEraPatterns,
4297
+ defaultMatchWidth: "wide",
4298
+ parsePatterns: parseEraPatterns,
4299
+ defaultParseWidth: "any"
4300
+ }),
4301
+ quarter: buildMatchFn({
4302
+ matchPatterns: matchQuarterPatterns,
4303
+ defaultMatchWidth: "wide",
4304
+ parsePatterns: parseQuarterPatterns,
4305
+ defaultParseWidth: "any",
4306
+ valueCallback: function(index) {
4307
+ return index + 1;
4716
4308
  }
4717
- }, "z"),
4718
- t: /* @__PURE__ */ __name(function t(date, token, _localize, options) {
4719
- var originalDate = options._originalDate || date;
4720
- var timestamp = Math.floor(originalDate.getTime() / 1e3);
4721
- return addLeadingZeros(timestamp, token.length);
4722
- }, "t"),
4723
- T: /* @__PURE__ */ __name(function T(date, token, _localize, options) {
4724
- var originalDate = options._originalDate || date;
4725
- var timestamp = originalDate.getTime();
4726
- return addLeadingZeros(timestamp, token.length);
4727
- }, "T")
4309
+ }),
4310
+ month: buildMatchFn({
4311
+ matchPatterns: matchMonthPatterns,
4312
+ defaultMatchWidth: "wide",
4313
+ parsePatterns: parseMonthPatterns,
4314
+ defaultParseWidth: "any"
4315
+ }),
4316
+ day: buildMatchFn({
4317
+ matchPatterns: matchDayPatterns,
4318
+ defaultMatchWidth: "wide",
4319
+ parsePatterns: parseDayPatterns,
4320
+ defaultParseWidth: "any"
4321
+ }),
4322
+ dayPeriod: buildMatchFn({
4323
+ matchPatterns: matchDayPeriodPatterns,
4324
+ defaultMatchWidth: "any",
4325
+ parsePatterns: parseDayPeriodPatterns,
4326
+ defaultParseWidth: "any"
4327
+ })
4728
4328
  };
4729
- function formatTimezoneShort(offset, dirtyDelimiter) {
4730
- var sign = offset > 0 ? "-" : "+";
4731
- var absOffset = Math.abs(offset);
4732
- var hours = Math.floor(absOffset / 60);
4733
- var minutes = absOffset % 60;
4734
- if (minutes === 0) {
4735
- return sign + String(hours);
4329
+ var match_default = match;
4330
+
4331
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/index.js
4332
+ var locale = {
4333
+ code: "en-US",
4334
+ formatDistance: formatDistance_default,
4335
+ formatLong: formatLong_default,
4336
+ formatRelative: formatRelative_default,
4337
+ localize: localize_default,
4338
+ match: match_default,
4339
+ options: {
4340
+ weekStartsOn: 0,
4341
+ firstWeekContainsDate: 1
4342
+ }
4343
+ };
4344
+ var en_US_default = locale;
4345
+
4346
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subMilliseconds/index.js
4347
+ function subMilliseconds(dirtyDate, dirtyAmount) {
4348
+ requiredArgs(2, arguments);
4349
+ var amount = toInteger(dirtyAmount);
4350
+ return addMilliseconds(dirtyDate, -amount);
4351
+ }
4352
+ __name(subMilliseconds, "subMilliseconds");
4353
+
4354
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
4355
+ var MILLISECONDS_IN_DAY = 864e5;
4356
+ function getUTCDayOfYear(dirtyDate) {
4357
+ requiredArgs(1, arguments);
4358
+ var date = toDate(dirtyDate);
4359
+ var timestamp = date.getTime();
4360
+ date.setUTCMonth(0, 1);
4361
+ date.setUTCHours(0, 0, 0, 0);
4362
+ var startOfYearTimestamp = date.getTime();
4363
+ var difference = timestamp - startOfYearTimestamp;
4364
+ return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
4365
+ }
4366
+ __name(getUTCDayOfYear, "getUTCDayOfYear");
4367
+
4368
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
4369
+ function startOfUTCISOWeek(dirtyDate) {
4370
+ requiredArgs(1, arguments);
4371
+ var weekStartsOn = 1;
4372
+ var date = toDate(dirtyDate);
4373
+ var day = date.getUTCDay();
4374
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
4375
+ date.setUTCDate(date.getUTCDate() - diff);
4376
+ date.setUTCHours(0, 0, 0, 0);
4377
+ return date;
4378
+ }
4379
+ __name(startOfUTCISOWeek, "startOfUTCISOWeek");
4380
+
4381
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
4382
+ function getUTCISOWeekYear(dirtyDate) {
4383
+ requiredArgs(1, arguments);
4384
+ var date = toDate(dirtyDate);
4385
+ var year = date.getUTCFullYear();
4386
+ var fourthOfJanuaryOfNextYear = new Date(0);
4387
+ fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
4388
+ fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
4389
+ var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
4390
+ var fourthOfJanuaryOfThisYear = new Date(0);
4391
+ fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
4392
+ fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
4393
+ var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
4394
+ if (date.getTime() >= startOfNextYear.getTime()) {
4395
+ return year + 1;
4396
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
4397
+ return year;
4398
+ } else {
4399
+ return year - 1;
4736
4400
  }
4737
- var delimiter = dirtyDelimiter || "";
4738
- return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
4739
4401
  }
4740
- __name(formatTimezoneShort, "formatTimezoneShort");
4741
- function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
4742
- if (offset % 60 === 0) {
4743
- var sign = offset > 0 ? "-" : "+";
4744
- return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
4745
- }
4746
- return formatTimezone(offset, dirtyDelimiter);
4402
+ __name(getUTCISOWeekYear, "getUTCISOWeekYear");
4403
+
4404
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
4405
+ function startOfUTCISOWeekYear(dirtyDate) {
4406
+ requiredArgs(1, arguments);
4407
+ var year = getUTCISOWeekYear(dirtyDate);
4408
+ var fourthOfJanuary = new Date(0);
4409
+ fourthOfJanuary.setUTCFullYear(year, 0, 4);
4410
+ fourthOfJanuary.setUTCHours(0, 0, 0, 0);
4411
+ var date = startOfUTCISOWeek(fourthOfJanuary);
4412
+ return date;
4747
4413
  }
4748
- __name(formatTimezoneWithOptionalMinutes, "formatTimezoneWithOptionalMinutes");
4749
- function formatTimezone(offset, dirtyDelimiter) {
4750
- var delimiter = dirtyDelimiter || "";
4751
- var sign = offset > 0 ? "-" : "+";
4752
- var absOffset = Math.abs(offset);
4753
- var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
4754
- var minutes = addLeadingZeros(absOffset % 60, 2);
4755
- return sign + hours + delimiter + minutes;
4414
+ __name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
4415
+
4416
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
4417
+ var MILLISECONDS_IN_WEEK = 6048e5;
4418
+ function getUTCISOWeek(dirtyDate) {
4419
+ requiredArgs(1, arguments);
4420
+ var date = toDate(dirtyDate);
4421
+ var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
4422
+ return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
4756
4423
  }
4757
- __name(formatTimezone, "formatTimezone");
4758
- var formatters_default = formatters2;
4424
+ __name(getUTCISOWeek, "getUTCISOWeek");
4759
4425
 
4760
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/longFormatters/index.js
4761
- var dateLongFormatter = /* @__PURE__ */ __name(function dateLongFormatter2(pattern, formatLong2) {
4762
- switch (pattern) {
4763
- case "P":
4764
- return formatLong2.date({
4765
- width: "short"
4766
- });
4767
- case "PP":
4768
- return formatLong2.date({
4769
- width: "medium"
4770
- });
4771
- case "PPP":
4772
- return formatLong2.date({
4773
- width: "long"
4774
- });
4775
- case "PPPP":
4776
- default:
4777
- return formatLong2.date({
4778
- width: "full"
4779
- });
4780
- }
4781
- }, "dateLongFormatter");
4782
- var timeLongFormatter = /* @__PURE__ */ __name(function timeLongFormatter2(pattern, formatLong2) {
4783
- switch (pattern) {
4784
- case "p":
4785
- return formatLong2.time({
4786
- width: "short"
4787
- });
4788
- case "pp":
4789
- return formatLong2.time({
4790
- width: "medium"
4791
- });
4792
- case "ppp":
4793
- return formatLong2.time({
4794
- width: "long"
4795
- });
4796
- case "pppp":
4797
- default:
4798
- return formatLong2.time({
4799
- width: "full"
4800
- });
4426
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
4427
+ function startOfUTCWeek(dirtyDate, dirtyOptions) {
4428
+ requiredArgs(1, arguments);
4429
+ var options = dirtyOptions || {};
4430
+ var locale2 = options.locale;
4431
+ var localeWeekStartsOn = locale2 && locale2.options && locale2.options.weekStartsOn;
4432
+ var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
4433
+ var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
4434
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
4435
+ throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
4801
4436
  }
4802
- }, "timeLongFormatter");
4803
- var dateTimeLongFormatter = /* @__PURE__ */ __name(function dateTimeLongFormatter2(pattern, formatLong2) {
4804
- var matchResult = pattern.match(/(P+)(p+)?/) || [];
4805
- var datePattern = matchResult[1];
4806
- var timePattern = matchResult[2];
4807
- if (!timePattern) {
4808
- return dateLongFormatter(pattern, formatLong2);
4437
+ var date = toDate(dirtyDate);
4438
+ var day = date.getUTCDay();
4439
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
4440
+ date.setUTCDate(date.getUTCDate() - diff);
4441
+ date.setUTCHours(0, 0, 0, 0);
4442
+ return date;
4443
+ }
4444
+ __name(startOfUTCWeek, "startOfUTCWeek");
4445
+
4446
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
4447
+ function getUTCWeekYear(dirtyDate, dirtyOptions) {
4448
+ requiredArgs(1, arguments);
4449
+ var date = toDate(dirtyDate);
4450
+ var year = date.getUTCFullYear();
4451
+ var options = dirtyOptions || {};
4452
+ var locale2 = options.locale;
4453
+ var localeFirstWeekContainsDate = locale2 && locale2.options && locale2.options.firstWeekContainsDate;
4454
+ var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
4455
+ var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
4456
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
4457
+ throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
4809
4458
  }
4810
- var dateTimeFormat;
4811
- switch (datePattern) {
4812
- case "P":
4813
- dateTimeFormat = formatLong2.dateTime({
4814
- width: "short"
4815
- });
4816
- break;
4817
- case "PP":
4818
- dateTimeFormat = formatLong2.dateTime({
4819
- width: "medium"
4820
- });
4821
- break;
4822
- case "PPP":
4823
- dateTimeFormat = formatLong2.dateTime({
4824
- width: "long"
4825
- });
4826
- break;
4827
- case "PPPP":
4828
- default:
4829
- dateTimeFormat = formatLong2.dateTime({
4830
- width: "full"
4831
- });
4832
- break;
4459
+ var firstWeekOfNextYear = new Date(0);
4460
+ firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
4461
+ firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
4462
+ var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions);
4463
+ var firstWeekOfThisYear = new Date(0);
4464
+ firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
4465
+ firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
4466
+ var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, dirtyOptions);
4467
+ if (date.getTime() >= startOfNextYear.getTime()) {
4468
+ return year + 1;
4469
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
4470
+ return year;
4471
+ } else {
4472
+ return year - 1;
4833
4473
  }
4834
- return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
4835
- }, "dateTimeLongFormatter");
4836
- var longFormatters = {
4837
- p: timeLongFormatter,
4838
- P: dateTimeLongFormatter
4839
- };
4840
- var longFormatters_default = longFormatters;
4474
+ }
4475
+ __name(getUTCWeekYear, "getUTCWeekYear");
4841
4476
 
4842
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/protectedTokens/index.js
4843
- var protectedDayOfYearTokens = ["D", "DD"];
4844
- var protectedWeekYearTokens = ["YY", "YYYY"];
4845
- function isProtectedDayOfYearToken(token) {
4846
- return protectedDayOfYearTokens.indexOf(token) !== -1;
4477
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
4478
+ function startOfUTCWeekYear(dirtyDate, dirtyOptions) {
4479
+ requiredArgs(1, arguments);
4480
+ var options = dirtyOptions || {};
4481
+ var locale2 = options.locale;
4482
+ var localeFirstWeekContainsDate = locale2 && locale2.options && locale2.options.firstWeekContainsDate;
4483
+ var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
4484
+ var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
4485
+ var year = getUTCWeekYear(dirtyDate, dirtyOptions);
4486
+ var firstWeek = new Date(0);
4487
+ firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
4488
+ firstWeek.setUTCHours(0, 0, 0, 0);
4489
+ var date = startOfUTCWeek(firstWeek, dirtyOptions);
4490
+ return date;
4847
4491
  }
4848
- __name(isProtectedDayOfYearToken, "isProtectedDayOfYearToken");
4849
- function isProtectedWeekYearToken(token) {
4850
- return protectedWeekYearTokens.indexOf(token) !== -1;
4492
+ __name(startOfUTCWeekYear, "startOfUTCWeekYear");
4493
+
4494
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeek/index.js
4495
+ var MILLISECONDS_IN_WEEK2 = 6048e5;
4496
+ function getUTCWeek(dirtyDate, options) {
4497
+ requiredArgs(1, arguments);
4498
+ var date = toDate(dirtyDate);
4499
+ var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
4500
+ return Math.round(diff / MILLISECONDS_IN_WEEK2) + 1;
4851
4501
  }
4852
- __name(isProtectedWeekYearToken, "isProtectedWeekYearToken");
4853
- function throwProtectedError(token, format2, input) {
4854
- if (token === "YYYY") {
4855
- 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"));
4856
- } else if (token === "YY") {
4857
- 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"));
4858
- } else if (token === "D") {
4859
- 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"));
4860
- } else if (token === "DD") {
4861
- 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"));
4502
+ __name(getUTCWeek, "getUTCWeek");
4503
+
4504
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
4505
+ function addLeadingZeros(number, targetLength) {
4506
+ var sign = number < 0 ? "-" : "";
4507
+ var output = Math.abs(number).toString();
4508
+ while (output.length < targetLength) {
4509
+ output = "0" + output;
4862
4510
  }
4511
+ return sign + output;
4863
4512
  }
4864
- __name(throwProtectedError, "throwProtectedError");
4513
+ __name(addLeadingZeros, "addLeadingZeros");
4865
4514
 
4866
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
4867
- var formatDistanceLocale = {
4868
- lessThanXSeconds: {
4869
- one: "less than a second",
4870
- other: "less than {{count}} seconds"
4515
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
4516
+ var formatters = {
4517
+ y: function(date, token) {
4518
+ var signedYear = date.getUTCFullYear();
4519
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
4520
+ return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
4521
+ },
4522
+ M: function(date, token) {
4523
+ var month = date.getUTCMonth();
4524
+ return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
4525
+ },
4526
+ d: function(date, token) {
4527
+ return addLeadingZeros(date.getUTCDate(), token.length);
4528
+ },
4529
+ a: function(date, token) {
4530
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
4531
+ switch (token) {
4532
+ case "a":
4533
+ case "aa":
4534
+ return dayPeriodEnumValue.toUpperCase();
4535
+ case "aaa":
4536
+ return dayPeriodEnumValue;
4537
+ case "aaaaa":
4538
+ return dayPeriodEnumValue[0];
4539
+ case "aaaa":
4540
+ default:
4541
+ return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
4542
+ }
4543
+ },
4544
+ h: function(date, token) {
4545
+ return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
4546
+ },
4547
+ H: function(date, token) {
4548
+ return addLeadingZeros(date.getUTCHours(), token.length);
4549
+ },
4550
+ m: function(date, token) {
4551
+ return addLeadingZeros(date.getUTCMinutes(), token.length);
4552
+ },
4553
+ s: function(date, token) {
4554
+ return addLeadingZeros(date.getUTCSeconds(), token.length);
4555
+ },
4556
+ S: function(date, token) {
4557
+ var numberOfDigits = token.length;
4558
+ var milliseconds = date.getUTCMilliseconds();
4559
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
4560
+ return addLeadingZeros(fractionalSeconds, token.length);
4561
+ }
4562
+ };
4563
+ var lightFormatters_default = formatters;
4564
+
4565
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/formatters/index.js
4566
+ var dayPeriodEnum = {
4567
+ am: "am",
4568
+ pm: "pm",
4569
+ midnight: "midnight",
4570
+ noon: "noon",
4571
+ morning: "morning",
4572
+ afternoon: "afternoon",
4573
+ evening: "evening",
4574
+ night: "night"
4575
+ };
4576
+ var formatters2 = {
4577
+ G: function(date, token, localize2) {
4578
+ var era = date.getUTCFullYear() > 0 ? 1 : 0;
4579
+ switch (token) {
4580
+ case "G":
4581
+ case "GG":
4582
+ case "GGG":
4583
+ return localize2.era(era, {
4584
+ width: "abbreviated"
4585
+ });
4586
+ case "GGGGG":
4587
+ return localize2.era(era, {
4588
+ width: "narrow"
4589
+ });
4590
+ case "GGGG":
4591
+ default:
4592
+ return localize2.era(era, {
4593
+ width: "wide"
4594
+ });
4595
+ }
4871
4596
  },
4872
- xSeconds: {
4873
- one: "1 second",
4874
- other: "{{count}} seconds"
4597
+ y: function(date, token, localize2) {
4598
+ if (token === "yo") {
4599
+ var signedYear = date.getUTCFullYear();
4600
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
4601
+ return localize2.ordinalNumber(year, {
4602
+ unit: "year"
4603
+ });
4604
+ }
4605
+ return lightFormatters_default.y(date, token);
4875
4606
  },
4876
- halfAMinute: "half a minute",
4877
- lessThanXMinutes: {
4878
- one: "less than a minute",
4879
- other: "less than {{count}} minutes"
4607
+ Y: function(date, token, localize2, options) {
4608
+ var signedWeekYear = getUTCWeekYear(date, options);
4609
+ var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
4610
+ if (token === "YY") {
4611
+ var twoDigitYear = weekYear % 100;
4612
+ return addLeadingZeros(twoDigitYear, 2);
4613
+ }
4614
+ if (token === "Yo") {
4615
+ return localize2.ordinalNumber(weekYear, {
4616
+ unit: "year"
4617
+ });
4618
+ }
4619
+ return addLeadingZeros(weekYear, token.length);
4880
4620
  },
4881
- xMinutes: {
4882
- one: "1 minute",
4883
- other: "{{count}} minutes"
4621
+ R: function(date, token) {
4622
+ var isoWeekYear = getUTCISOWeekYear(date);
4623
+ return addLeadingZeros(isoWeekYear, token.length);
4884
4624
  },
4885
- aboutXHours: {
4886
- one: "about 1 hour",
4887
- other: "about {{count}} hours"
4625
+ u: function(date, token) {
4626
+ var year = date.getUTCFullYear();
4627
+ return addLeadingZeros(year, token.length);
4888
4628
  },
4889
- xHours: {
4890
- one: "1 hour",
4891
- other: "{{count}} hours"
4629
+ Q: function(date, token, localize2) {
4630
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4631
+ switch (token) {
4632
+ case "Q":
4633
+ return String(quarter);
4634
+ case "QQ":
4635
+ return addLeadingZeros(quarter, 2);
4636
+ case "Qo":
4637
+ return localize2.ordinalNumber(quarter, {
4638
+ unit: "quarter"
4639
+ });
4640
+ case "QQQ":
4641
+ return localize2.quarter(quarter, {
4642
+ width: "abbreviated",
4643
+ context: "formatting"
4644
+ });
4645
+ case "QQQQQ":
4646
+ return localize2.quarter(quarter, {
4647
+ width: "narrow",
4648
+ context: "formatting"
4649
+ });
4650
+ case "QQQQ":
4651
+ default:
4652
+ return localize2.quarter(quarter, {
4653
+ width: "wide",
4654
+ context: "formatting"
4655
+ });
4656
+ }
4892
4657
  },
4893
- xDays: {
4894
- one: "1 day",
4895
- other: "{{count}} days"
4658
+ q: function(date, token, localize2) {
4659
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4660
+ switch (token) {
4661
+ case "q":
4662
+ return String(quarter);
4663
+ case "qq":
4664
+ return addLeadingZeros(quarter, 2);
4665
+ case "qo":
4666
+ return localize2.ordinalNumber(quarter, {
4667
+ unit: "quarter"
4668
+ });
4669
+ case "qqq":
4670
+ return localize2.quarter(quarter, {
4671
+ width: "abbreviated",
4672
+ context: "standalone"
4673
+ });
4674
+ case "qqqqq":
4675
+ return localize2.quarter(quarter, {
4676
+ width: "narrow",
4677
+ context: "standalone"
4678
+ });
4679
+ case "qqqq":
4680
+ default:
4681
+ return localize2.quarter(quarter, {
4682
+ width: "wide",
4683
+ context: "standalone"
4684
+ });
4685
+ }
4896
4686
  },
4897
- aboutXWeeks: {
4898
- one: "about 1 week",
4899
- other: "about {{count}} weeks"
4687
+ M: function(date, token, localize2) {
4688
+ var month = date.getUTCMonth();
4689
+ switch (token) {
4690
+ case "M":
4691
+ case "MM":
4692
+ return lightFormatters_default.M(date, token);
4693
+ case "Mo":
4694
+ return localize2.ordinalNumber(month + 1, {
4695
+ unit: "month"
4696
+ });
4697
+ case "MMM":
4698
+ return localize2.month(month, {
4699
+ width: "abbreviated",
4700
+ context: "formatting"
4701
+ });
4702
+ case "MMMMM":
4703
+ return localize2.month(month, {
4704
+ width: "narrow",
4705
+ context: "formatting"
4706
+ });
4707
+ case "MMMM":
4708
+ default:
4709
+ return localize2.month(month, {
4710
+ width: "wide",
4711
+ context: "formatting"
4712
+ });
4713
+ }
4900
4714
  },
4901
- xWeeks: {
4902
- one: "1 week",
4903
- other: "{{count}} weeks"
4715
+ L: function(date, token, localize2) {
4716
+ var month = date.getUTCMonth();
4717
+ switch (token) {
4718
+ case "L":
4719
+ return String(month + 1);
4720
+ case "LL":
4721
+ return addLeadingZeros(month + 1, 2);
4722
+ case "Lo":
4723
+ return localize2.ordinalNumber(month + 1, {
4724
+ unit: "month"
4725
+ });
4726
+ case "LLL":
4727
+ return localize2.month(month, {
4728
+ width: "abbreviated",
4729
+ context: "standalone"
4730
+ });
4731
+ case "LLLLL":
4732
+ return localize2.month(month, {
4733
+ width: "narrow",
4734
+ context: "standalone"
4735
+ });
4736
+ case "LLLL":
4737
+ default:
4738
+ return localize2.month(month, {
4739
+ width: "wide",
4740
+ context: "standalone"
4741
+ });
4742
+ }
4904
4743
  },
4905
- aboutXMonths: {
4906
- one: "about 1 month",
4907
- other: "about {{count}} months"
4744
+ w: function(date, token, localize2, options) {
4745
+ var week = getUTCWeek(date, options);
4746
+ if (token === "wo") {
4747
+ return localize2.ordinalNumber(week, {
4748
+ unit: "week"
4749
+ });
4750
+ }
4751
+ return addLeadingZeros(week, token.length);
4908
4752
  },
4909
- xMonths: {
4910
- one: "1 month",
4911
- other: "{{count}} months"
4753
+ I: function(date, token, localize2) {
4754
+ var isoWeek = getUTCISOWeek(date);
4755
+ if (token === "Io") {
4756
+ return localize2.ordinalNumber(isoWeek, {
4757
+ unit: "week"
4758
+ });
4759
+ }
4760
+ return addLeadingZeros(isoWeek, token.length);
4761
+ },
4762
+ d: function(date, token, localize2) {
4763
+ if (token === "do") {
4764
+ return localize2.ordinalNumber(date.getUTCDate(), {
4765
+ unit: "date"
4766
+ });
4767
+ }
4768
+ return lightFormatters_default.d(date, token);
4769
+ },
4770
+ D: function(date, token, localize2) {
4771
+ var dayOfYear = getUTCDayOfYear(date);
4772
+ if (token === "Do") {
4773
+ return localize2.ordinalNumber(dayOfYear, {
4774
+ unit: "dayOfYear"
4775
+ });
4776
+ }
4777
+ return addLeadingZeros(dayOfYear, token.length);
4778
+ },
4779
+ E: function(date, token, localize2) {
4780
+ var dayOfWeek = date.getUTCDay();
4781
+ switch (token) {
4782
+ case "E":
4783
+ case "EE":
4784
+ case "EEE":
4785
+ return localize2.day(dayOfWeek, {
4786
+ width: "abbreviated",
4787
+ context: "formatting"
4788
+ });
4789
+ case "EEEEE":
4790
+ return localize2.day(dayOfWeek, {
4791
+ width: "narrow",
4792
+ context: "formatting"
4793
+ });
4794
+ case "EEEEEE":
4795
+ return localize2.day(dayOfWeek, {
4796
+ width: "short",
4797
+ context: "formatting"
4798
+ });
4799
+ case "EEEE":
4800
+ default:
4801
+ return localize2.day(dayOfWeek, {
4802
+ width: "wide",
4803
+ context: "formatting"
4804
+ });
4805
+ }
4806
+ },
4807
+ e: function(date, token, localize2, options) {
4808
+ var dayOfWeek = date.getUTCDay();
4809
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4810
+ switch (token) {
4811
+ case "e":
4812
+ return String(localDayOfWeek);
4813
+ case "ee":
4814
+ return addLeadingZeros(localDayOfWeek, 2);
4815
+ case "eo":
4816
+ return localize2.ordinalNumber(localDayOfWeek, {
4817
+ unit: "day"
4818
+ });
4819
+ case "eee":
4820
+ return localize2.day(dayOfWeek, {
4821
+ width: "abbreviated",
4822
+ context: "formatting"
4823
+ });
4824
+ case "eeeee":
4825
+ return localize2.day(dayOfWeek, {
4826
+ width: "narrow",
4827
+ context: "formatting"
4828
+ });
4829
+ case "eeeeee":
4830
+ return localize2.day(dayOfWeek, {
4831
+ width: "short",
4832
+ context: "formatting"
4833
+ });
4834
+ case "eeee":
4835
+ default:
4836
+ return localize2.day(dayOfWeek, {
4837
+ width: "wide",
4838
+ context: "formatting"
4839
+ });
4840
+ }
4912
4841
  },
4913
- aboutXYears: {
4914
- one: "about 1 year",
4915
- other: "about {{count}} years"
4842
+ c: function(date, token, localize2, options) {
4843
+ var dayOfWeek = date.getUTCDay();
4844
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4845
+ switch (token) {
4846
+ case "c":
4847
+ return String(localDayOfWeek);
4848
+ case "cc":
4849
+ return addLeadingZeros(localDayOfWeek, token.length);
4850
+ case "co":
4851
+ return localize2.ordinalNumber(localDayOfWeek, {
4852
+ unit: "day"
4853
+ });
4854
+ case "ccc":
4855
+ return localize2.day(dayOfWeek, {
4856
+ width: "abbreviated",
4857
+ context: "standalone"
4858
+ });
4859
+ case "ccccc":
4860
+ return localize2.day(dayOfWeek, {
4861
+ width: "narrow",
4862
+ context: "standalone"
4863
+ });
4864
+ case "cccccc":
4865
+ return localize2.day(dayOfWeek, {
4866
+ width: "short",
4867
+ context: "standalone"
4868
+ });
4869
+ case "cccc":
4870
+ default:
4871
+ return localize2.day(dayOfWeek, {
4872
+ width: "wide",
4873
+ context: "standalone"
4874
+ });
4875
+ }
4916
4876
  },
4917
- xYears: {
4918
- one: "1 year",
4919
- other: "{{count}} years"
4877
+ i: function(date, token, localize2) {
4878
+ var dayOfWeek = date.getUTCDay();
4879
+ var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
4880
+ switch (token) {
4881
+ case "i":
4882
+ return String(isoDayOfWeek);
4883
+ case "ii":
4884
+ return addLeadingZeros(isoDayOfWeek, token.length);
4885
+ case "io":
4886
+ return localize2.ordinalNumber(isoDayOfWeek, {
4887
+ unit: "day"
4888
+ });
4889
+ case "iii":
4890
+ return localize2.day(dayOfWeek, {
4891
+ width: "abbreviated",
4892
+ context: "formatting"
4893
+ });
4894
+ case "iiiii":
4895
+ return localize2.day(dayOfWeek, {
4896
+ width: "narrow",
4897
+ context: "formatting"
4898
+ });
4899
+ case "iiiiii":
4900
+ return localize2.day(dayOfWeek, {
4901
+ width: "short",
4902
+ context: "formatting"
4903
+ });
4904
+ case "iiii":
4905
+ default:
4906
+ return localize2.day(dayOfWeek, {
4907
+ width: "wide",
4908
+ context: "formatting"
4909
+ });
4910
+ }
4920
4911
  },
4921
- overXYears: {
4922
- one: "over 1 year",
4923
- other: "over {{count}} years"
4912
+ a: function(date, token, localize2) {
4913
+ var hours = date.getUTCHours();
4914
+ var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4915
+ switch (token) {
4916
+ case "a":
4917
+ case "aa":
4918
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4919
+ width: "abbreviated",
4920
+ context: "formatting"
4921
+ });
4922
+ case "aaa":
4923
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4924
+ width: "abbreviated",
4925
+ context: "formatting"
4926
+ }).toLowerCase();
4927
+ case "aaaaa":
4928
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4929
+ width: "narrow",
4930
+ context: "formatting"
4931
+ });
4932
+ case "aaaa":
4933
+ default:
4934
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4935
+ width: "wide",
4936
+ context: "formatting"
4937
+ });
4938
+ }
4924
4939
  },
4925
- almostXYears: {
4926
- one: "almost 1 year",
4927
- other: "almost {{count}} years"
4928
- }
4929
- };
4930
- var formatDistance = /* @__PURE__ */ __name(function formatDistance2(token, count, options) {
4931
- var result;
4932
- var tokenValue = formatDistanceLocale[token];
4933
- if (typeof tokenValue === "string") {
4934
- result = tokenValue;
4935
- } else if (count === 1) {
4936
- result = tokenValue.one;
4937
- } else {
4938
- result = tokenValue.other.replace("{{count}}", count.toString());
4939
- }
4940
- if (options !== null && options !== void 0 && options.addSuffix) {
4941
- if (options.comparison && options.comparison > 0) {
4942
- return "in " + result;
4940
+ b: function(date, token, localize2) {
4941
+ var hours = date.getUTCHours();
4942
+ var dayPeriodEnumValue;
4943
+ if (hours === 12) {
4944
+ dayPeriodEnumValue = dayPeriodEnum.noon;
4945
+ } else if (hours === 0) {
4946
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
4943
4947
  } else {
4944
- return result + " ago";
4948
+ dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4945
4949
  }
4946
- }
4947
- return result;
4948
- }, "formatDistance");
4949
- var formatDistance_default = formatDistance;
4950
-
4951
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
4952
- function buildFormatLongFn(args) {
4953
- return function() {
4954
- var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4955
- var width = options.width ? String(options.width) : args.defaultWidth;
4956
- var format2 = args.formats[width] || args.formats[args.defaultWidth];
4957
- return format2;
4958
- };
4959
- }
4960
- __name(buildFormatLongFn, "buildFormatLongFn");
4961
-
4962
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
4963
- var dateFormats = {
4964
- full: "EEEE, MMMM do, y",
4965
- long: "MMMM do, y",
4966
- medium: "MMM d, y",
4967
- short: "MM/dd/yyyy"
4968
- };
4969
- var timeFormats = {
4970
- full: "h:mm:ss a zzzz",
4971
- long: "h:mm:ss a z",
4972
- medium: "h:mm:ss a",
4973
- short: "h:mm a"
4974
- };
4975
- var dateTimeFormats = {
4976
- full: "{{date}} 'at' {{time}}",
4977
- long: "{{date}} 'at' {{time}}",
4978
- medium: "{{date}}, {{time}}",
4979
- short: "{{date}}, {{time}}"
4980
- };
4981
- var formatLong = {
4982
- date: buildFormatLongFn({
4983
- formats: dateFormats,
4984
- defaultWidth: "full"
4985
- }),
4986
- time: buildFormatLongFn({
4987
- formats: timeFormats,
4988
- defaultWidth: "full"
4989
- }),
4990
- dateTime: buildFormatLongFn({
4991
- formats: dateTimeFormats,
4992
- defaultWidth: "full"
4993
- })
4994
- };
4995
- var formatLong_default = formatLong;
4996
-
4997
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
4998
- var formatRelativeLocale = {
4999
- lastWeek: "'last' eeee 'at' p",
5000
- yesterday: "'yesterday at' p",
5001
- today: "'today at' p",
5002
- tomorrow: "'tomorrow at' p",
5003
- nextWeek: "eeee 'at' p",
5004
- other: "P"
5005
- };
5006
- var formatRelative = /* @__PURE__ */ __name(function formatRelative2(token, _date, _baseDate, _options) {
5007
- return formatRelativeLocale[token];
5008
- }, "formatRelative");
5009
- var formatRelative_default = formatRelative;
5010
-
5011
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
5012
- function buildLocalizeFn(args) {
5013
- return function(dirtyIndex, options) {
5014
- var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
5015
- var valuesArray;
5016
- if (context === "formatting" && args.formattingValues) {
5017
- var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
5018
- var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
5019
- valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
4950
+ switch (token) {
4951
+ case "b":
4952
+ case "bb":
4953
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4954
+ width: "abbreviated",
4955
+ context: "formatting"
4956
+ });
4957
+ case "bbb":
4958
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4959
+ width: "abbreviated",
4960
+ context: "formatting"
4961
+ }).toLowerCase();
4962
+ case "bbbbb":
4963
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4964
+ width: "narrow",
4965
+ context: "formatting"
4966
+ });
4967
+ case "bbbb":
4968
+ default:
4969
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4970
+ width: "wide",
4971
+ context: "formatting"
4972
+ });
4973
+ }
4974
+ },
4975
+ B: function(date, token, localize2) {
4976
+ var hours = date.getUTCHours();
4977
+ var dayPeriodEnumValue;
4978
+ if (hours >= 17) {
4979
+ dayPeriodEnumValue = dayPeriodEnum.evening;
4980
+ } else if (hours >= 12) {
4981
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
4982
+ } else if (hours >= 4) {
4983
+ dayPeriodEnumValue = dayPeriodEnum.morning;
5020
4984
  } else {
5021
- var _defaultWidth = args.defaultWidth;
5022
- var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
5023
- valuesArray = args.values[_width] || args.values[_defaultWidth];
4985
+ dayPeriodEnumValue = dayPeriodEnum.night;
4986
+ }
4987
+ switch (token) {
4988
+ case "B":
4989
+ case "BB":
4990
+ case "BBB":
4991
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4992
+ width: "abbreviated",
4993
+ context: "formatting"
4994
+ });
4995
+ case "BBBBB":
4996
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4997
+ width: "narrow",
4998
+ context: "formatting"
4999
+ });
5000
+ case "BBBB":
5001
+ default:
5002
+ return localize2.dayPeriod(dayPeriodEnumValue, {
5003
+ width: "wide",
5004
+ context: "formatting"
5005
+ });
5006
+ }
5007
+ },
5008
+ h: function(date, token, localize2) {
5009
+ if (token === "ho") {
5010
+ var hours = date.getUTCHours() % 12;
5011
+ if (hours === 0)
5012
+ hours = 12;
5013
+ return localize2.ordinalNumber(hours, {
5014
+ unit: "hour"
5015
+ });
5024
5016
  }
5025
- var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
5026
- return valuesArray[index];
5027
- };
5028
- }
5029
- __name(buildLocalizeFn, "buildLocalizeFn");
5030
-
5031
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
5032
- var eraValues = {
5033
- narrow: ["B", "A"],
5034
- abbreviated: ["BC", "AD"],
5035
- wide: ["Before Christ", "Anno Domini"]
5036
- };
5037
- var quarterValues = {
5038
- narrow: ["1", "2", "3", "4"],
5039
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
5040
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
5041
- };
5042
- var monthValues = {
5043
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
5044
- abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
5045
- wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
5046
- };
5047
- var dayValues = {
5048
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
5049
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
5050
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
5051
- wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
5052
- };
5053
- var dayPeriodValues = {
5054
- narrow: {
5055
- am: "a",
5056
- pm: "p",
5057
- midnight: "mi",
5058
- noon: "n",
5059
- morning: "morning",
5060
- afternoon: "afternoon",
5061
- evening: "evening",
5062
- night: "night"
5017
+ return lightFormatters_default.h(date, token);
5063
5018
  },
5064
- abbreviated: {
5065
- am: "AM",
5066
- pm: "PM",
5067
- midnight: "midnight",
5068
- noon: "noon",
5069
- morning: "morning",
5070
- afternoon: "afternoon",
5071
- evening: "evening",
5072
- night: "night"
5019
+ H: function(date, token, localize2) {
5020
+ if (token === "Ho") {
5021
+ return localize2.ordinalNumber(date.getUTCHours(), {
5022
+ unit: "hour"
5023
+ });
5024
+ }
5025
+ return lightFormatters_default.H(date, token);
5073
5026
  },
5074
- wide: {
5075
- am: "a.m.",
5076
- pm: "p.m.",
5077
- midnight: "midnight",
5078
- noon: "noon",
5079
- morning: "morning",
5080
- afternoon: "afternoon",
5081
- evening: "evening",
5082
- night: "night"
5083
- }
5084
- };
5085
- var formattingDayPeriodValues = {
5086
- narrow: {
5087
- am: "a",
5088
- pm: "p",
5089
- midnight: "mi",
5090
- noon: "n",
5091
- morning: "in the morning",
5092
- afternoon: "in the afternoon",
5093
- evening: "in the evening",
5094
- night: "at night"
5027
+ K: function(date, token, localize2) {
5028
+ var hours = date.getUTCHours() % 12;
5029
+ if (token === "Ko") {
5030
+ return localize2.ordinalNumber(hours, {
5031
+ unit: "hour"
5032
+ });
5033
+ }
5034
+ return addLeadingZeros(hours, token.length);
5095
5035
  },
5096
- abbreviated: {
5097
- am: "AM",
5098
- pm: "PM",
5099
- midnight: "midnight",
5100
- noon: "noon",
5101
- morning: "in the morning",
5102
- afternoon: "in the afternoon",
5103
- evening: "in the evening",
5104
- night: "at night"
5036
+ k: function(date, token, localize2) {
5037
+ var hours = date.getUTCHours();
5038
+ if (hours === 0)
5039
+ hours = 24;
5040
+ if (token === "ko") {
5041
+ return localize2.ordinalNumber(hours, {
5042
+ unit: "hour"
5043
+ });
5044
+ }
5045
+ return addLeadingZeros(hours, token.length);
5105
5046
  },
5106
- wide: {
5107
- am: "a.m.",
5108
- pm: "p.m.",
5109
- midnight: "midnight",
5110
- noon: "noon",
5111
- morning: "in the morning",
5112
- afternoon: "in the afternoon",
5113
- evening: "in the evening",
5114
- night: "at night"
5115
- }
5116
- };
5117
- var ordinalNumber = /* @__PURE__ */ __name(function ordinalNumber2(dirtyNumber, _options) {
5118
- var number = Number(dirtyNumber);
5119
- var rem100 = number % 100;
5120
- if (rem100 > 20 || rem100 < 10) {
5121
- switch (rem100 % 10) {
5122
- case 1:
5123
- return number + "st";
5124
- case 2:
5125
- return number + "nd";
5126
- case 3:
5127
- return number + "rd";
5047
+ m: function(date, token, localize2) {
5048
+ if (token === "mo") {
5049
+ return localize2.ordinalNumber(date.getUTCMinutes(), {
5050
+ unit: "minute"
5051
+ });
5128
5052
  }
5129
- }
5130
- return number + "th";
5131
- }, "ordinalNumber");
5132
- var localize = {
5133
- ordinalNumber,
5134
- era: buildLocalizeFn({
5135
- values: eraValues,
5136
- defaultWidth: "wide"
5137
- }),
5138
- quarter: buildLocalizeFn({
5139
- values: quarterValues,
5140
- defaultWidth: "wide",
5141
- argumentCallback: /* @__PURE__ */ __name(function argumentCallback(quarter) {
5142
- return quarter - 1;
5143
- }, "argumentCallback")
5144
- }),
5145
- month: buildLocalizeFn({
5146
- values: monthValues,
5147
- defaultWidth: "wide"
5148
- }),
5149
- day: buildLocalizeFn({
5150
- values: dayValues,
5151
- defaultWidth: "wide"
5152
- }),
5153
- dayPeriod: buildLocalizeFn({
5154
- values: dayPeriodValues,
5155
- defaultWidth: "wide",
5156
- formattingValues: formattingDayPeriodValues,
5157
- defaultFormattingWidth: "wide"
5158
- })
5159
- };
5160
- var localize_default = localize;
5161
-
5162
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
5163
- function buildMatchFn(args) {
5164
- return function(string) {
5165
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5166
- var width = options.width;
5167
- var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
5168
- var matchResult = string.match(matchPattern);
5169
- if (!matchResult) {
5170
- return null;
5053
+ return lightFormatters_default.m(date, token);
5054
+ },
5055
+ s: function(date, token, localize2) {
5056
+ if (token === "so") {
5057
+ return localize2.ordinalNumber(date.getUTCSeconds(), {
5058
+ unit: "second"
5059
+ });
5171
5060
  }
5172
- var matchedString = matchResult[0];
5173
- var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
5174
- var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
5175
- return pattern.test(matchedString);
5176
- }) : findKey(parsePatterns, function(pattern) {
5177
- return pattern.test(matchedString);
5178
- });
5179
- var value;
5180
- value = args.valueCallback ? args.valueCallback(key) : key;
5181
- value = options.valueCallback ? options.valueCallback(value) : value;
5182
- var rest = string.slice(matchedString.length);
5183
- return {
5184
- value,
5185
- rest
5186
- };
5187
- };
5188
- }
5189
- __name(buildMatchFn, "buildMatchFn");
5190
- function findKey(object, predicate) {
5191
- for (var key in object) {
5192
- if (object.hasOwnProperty(key) && predicate(object[key])) {
5193
- return key;
5061
+ return lightFormatters_default.s(date, token);
5062
+ },
5063
+ S: function(date, token) {
5064
+ return lightFormatters_default.S(date, token);
5065
+ },
5066
+ X: function(date, token, _localize, options) {
5067
+ var originalDate = options._originalDate || date;
5068
+ var timezoneOffset = originalDate.getTimezoneOffset();
5069
+ if (timezoneOffset === 0) {
5070
+ return "Z";
5071
+ }
5072
+ switch (token) {
5073
+ case "X":
5074
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
5075
+ case "XXXX":
5076
+ case "XX":
5077
+ return formatTimezone(timezoneOffset);
5078
+ case "XXXXX":
5079
+ case "XXX":
5080
+ default:
5081
+ return formatTimezone(timezoneOffset, ":");
5082
+ }
5083
+ },
5084
+ x: function(date, token, _localize, options) {
5085
+ var originalDate = options._originalDate || date;
5086
+ var timezoneOffset = originalDate.getTimezoneOffset();
5087
+ switch (token) {
5088
+ case "x":
5089
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
5090
+ case "xxxx":
5091
+ case "xx":
5092
+ return formatTimezone(timezoneOffset);
5093
+ case "xxxxx":
5094
+ case "xxx":
5095
+ default:
5096
+ return formatTimezone(timezoneOffset, ":");
5097
+ }
5098
+ },
5099
+ O: function(date, token, _localize, options) {
5100
+ var originalDate = options._originalDate || date;
5101
+ var timezoneOffset = originalDate.getTimezoneOffset();
5102
+ switch (token) {
5103
+ case "O":
5104
+ case "OO":
5105
+ case "OOO":
5106
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
5107
+ case "OOOO":
5108
+ default:
5109
+ return "GMT" + formatTimezone(timezoneOffset, ":");
5194
5110
  }
5111
+ },
5112
+ z: function(date, token, _localize, options) {
5113
+ var originalDate = options._originalDate || date;
5114
+ var timezoneOffset = originalDate.getTimezoneOffset();
5115
+ switch (token) {
5116
+ case "z":
5117
+ case "zz":
5118
+ case "zzz":
5119
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
5120
+ case "zzzz":
5121
+ default:
5122
+ return "GMT" + formatTimezone(timezoneOffset, ":");
5123
+ }
5124
+ },
5125
+ t: function(date, token, _localize, options) {
5126
+ var originalDate = options._originalDate || date;
5127
+ var timestamp = Math.floor(originalDate.getTime() / 1e3);
5128
+ return addLeadingZeros(timestamp, token.length);
5129
+ },
5130
+ T: function(date, token, _localize, options) {
5131
+ var originalDate = options._originalDate || date;
5132
+ var timestamp = originalDate.getTime();
5133
+ return addLeadingZeros(timestamp, token.length);
5195
5134
  }
5196
- return void 0;
5135
+ };
5136
+ function formatTimezoneShort(offset, dirtyDelimiter) {
5137
+ var sign = offset > 0 ? "-" : "+";
5138
+ var absOffset = Math.abs(offset);
5139
+ var hours = Math.floor(absOffset / 60);
5140
+ var minutes = absOffset % 60;
5141
+ if (minutes === 0) {
5142
+ return sign + String(hours);
5143
+ }
5144
+ var delimiter = dirtyDelimiter || "";
5145
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
5197
5146
  }
5198
- __name(findKey, "findKey");
5199
- function findIndex(array, predicate) {
5200
- for (var key = 0; key < array.length; key++) {
5201
- if (predicate(array[key])) {
5202
- return key;
5203
- }
5147
+ __name(formatTimezoneShort, "formatTimezoneShort");
5148
+ function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
5149
+ if (offset % 60 === 0) {
5150
+ var sign = offset > 0 ? "-" : "+";
5151
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
5204
5152
  }
5205
- return void 0;
5153
+ return formatTimezone(offset, dirtyDelimiter);
5206
5154
  }
5207
- __name(findIndex, "findIndex");
5208
-
5209
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
5210
- function buildMatchPatternFn(args) {
5211
- return function(string) {
5212
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5213
- var matchResult = string.match(args.matchPattern);
5214
- if (!matchResult)
5215
- return null;
5216
- var matchedString = matchResult[0];
5217
- var parseResult = string.match(args.parsePattern);
5218
- if (!parseResult)
5219
- return null;
5220
- var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
5221
- value = options.valueCallback ? options.valueCallback(value) : value;
5222
- var rest = string.slice(matchedString.length);
5223
- return {
5224
- value,
5225
- rest
5226
- };
5227
- };
5155
+ __name(formatTimezoneWithOptionalMinutes, "formatTimezoneWithOptionalMinutes");
5156
+ function formatTimezone(offset, dirtyDelimiter) {
5157
+ var delimiter = dirtyDelimiter || "";
5158
+ var sign = offset > 0 ? "-" : "+";
5159
+ var absOffset = Math.abs(offset);
5160
+ var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
5161
+ var minutes = addLeadingZeros(absOffset % 60, 2);
5162
+ return sign + hours + delimiter + minutes;
5228
5163
  }
5229
- __name(buildMatchPatternFn, "buildMatchPatternFn");
5164
+ __name(formatTimezone, "formatTimezone");
5165
+ var formatters_default = formatters2;
5230
5166
 
5231
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
5232
- var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
5233
- var parseOrdinalNumberPattern = /\d+/i;
5234
- var matchEraPatterns = {
5235
- narrow: /^(b|a)/i,
5236
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
5237
- wide: /^(before christ|before common era|anno domini|common era)/i
5238
- };
5239
- var parseEraPatterns = {
5240
- any: [/^b/i, /^(a|c)/i]
5241
- };
5242
- var matchQuarterPatterns = {
5243
- narrow: /^[1234]/i,
5244
- abbreviated: /^q[1234]/i,
5245
- wide: /^[1234](th|st|nd|rd)? quarter/i
5246
- };
5247
- var parseQuarterPatterns = {
5248
- any: [/1/i, /2/i, /3/i, /4/i]
5249
- };
5250
- var matchMonthPatterns = {
5251
- narrow: /^[jfmasond]/i,
5252
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
5253
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
5254
- };
5255
- var parseMonthPatterns = {
5256
- 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],
5257
- 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]
5258
- };
5259
- var matchDayPatterns = {
5260
- narrow: /^[smtwf]/i,
5261
- short: /^(su|mo|tu|we|th|fr|sa)/i,
5262
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
5263
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
5264
- };
5265
- var parseDayPatterns = {
5266
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
5267
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
5268
- };
5269
- var matchDayPeriodPatterns = {
5270
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
5271
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
5272
- };
5273
- var parseDayPeriodPatterns = {
5274
- any: {
5275
- am: /^a/i,
5276
- pm: /^p/i,
5277
- midnight: /^mi/i,
5278
- noon: /^no/i,
5279
- morning: /morning/i,
5280
- afternoon: /afternoon/i,
5281
- evening: /evening/i,
5282
- night: /night/i
5167
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/longFormatters/index.js
5168
+ function dateLongFormatter(pattern, formatLong2) {
5169
+ switch (pattern) {
5170
+ case "P":
5171
+ return formatLong2.date({
5172
+ width: "short"
5173
+ });
5174
+ case "PP":
5175
+ return formatLong2.date({
5176
+ width: "medium"
5177
+ });
5178
+ case "PPP":
5179
+ return formatLong2.date({
5180
+ width: "long"
5181
+ });
5182
+ case "PPPP":
5183
+ default:
5184
+ return formatLong2.date({
5185
+ width: "full"
5186
+ });
5283
5187
  }
5284
- };
5285
- var match = {
5286
- ordinalNumber: buildMatchPatternFn({
5287
- matchPattern: matchOrdinalNumberPattern,
5288
- parsePattern: parseOrdinalNumberPattern,
5289
- valueCallback: /* @__PURE__ */ __name(function valueCallback(value) {
5290
- return parseInt(value, 10);
5291
- }, "valueCallback")
5292
- }),
5293
- era: buildMatchFn({
5294
- matchPatterns: matchEraPatterns,
5295
- defaultMatchWidth: "wide",
5296
- parsePatterns: parseEraPatterns,
5297
- defaultParseWidth: "any"
5298
- }),
5299
- quarter: buildMatchFn({
5300
- matchPatterns: matchQuarterPatterns,
5301
- defaultMatchWidth: "wide",
5302
- parsePatterns: parseQuarterPatterns,
5303
- defaultParseWidth: "any",
5304
- valueCallback: /* @__PURE__ */ __name(function valueCallback2(index) {
5305
- return index + 1;
5306
- }, "valueCallback")
5307
- }),
5308
- month: buildMatchFn({
5309
- matchPatterns: matchMonthPatterns,
5310
- defaultMatchWidth: "wide",
5311
- parsePatterns: parseMonthPatterns,
5312
- defaultParseWidth: "any"
5313
- }),
5314
- day: buildMatchFn({
5315
- matchPatterns: matchDayPatterns,
5316
- defaultMatchWidth: "wide",
5317
- parsePatterns: parseDayPatterns,
5318
- defaultParseWidth: "any"
5319
- }),
5320
- dayPeriod: buildMatchFn({
5321
- matchPatterns: matchDayPeriodPatterns,
5322
- defaultMatchWidth: "any",
5323
- parsePatterns: parseDayPeriodPatterns,
5324
- defaultParseWidth: "any"
5325
- })
5326
- };
5327
- var match_default = match;
5328
-
5329
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/index.js
5330
- var locale = {
5331
- code: "en-US",
5332
- formatDistance: formatDistance_default,
5333
- formatLong: formatLong_default,
5334
- formatRelative: formatRelative_default,
5335
- localize: localize_default,
5336
- match: match_default,
5337
- options: {
5338
- weekStartsOn: 0,
5339
- firstWeekContainsDate: 1
5188
+ }
5189
+ __name(dateLongFormatter, "dateLongFormatter");
5190
+ function timeLongFormatter(pattern, formatLong2) {
5191
+ switch (pattern) {
5192
+ case "p":
5193
+ return formatLong2.time({
5194
+ width: "short"
5195
+ });
5196
+ case "pp":
5197
+ return formatLong2.time({
5198
+ width: "medium"
5199
+ });
5200
+ case "ppp":
5201
+ return formatLong2.time({
5202
+ width: "long"
5203
+ });
5204
+ case "pppp":
5205
+ default:
5206
+ return formatLong2.time({
5207
+ width: "full"
5208
+ });
5209
+ }
5210
+ }
5211
+ __name(timeLongFormatter, "timeLongFormatter");
5212
+ function dateTimeLongFormatter(pattern, formatLong2) {
5213
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
5214
+ var datePattern = matchResult[1];
5215
+ var timePattern = matchResult[2];
5216
+ if (!timePattern) {
5217
+ return dateLongFormatter(pattern, formatLong2);
5218
+ }
5219
+ var dateTimeFormat;
5220
+ switch (datePattern) {
5221
+ case "P":
5222
+ dateTimeFormat = formatLong2.dateTime({
5223
+ width: "short"
5224
+ });
5225
+ break;
5226
+ case "PP":
5227
+ dateTimeFormat = formatLong2.dateTime({
5228
+ width: "medium"
5229
+ });
5230
+ break;
5231
+ case "PPP":
5232
+ dateTimeFormat = formatLong2.dateTime({
5233
+ width: "long"
5234
+ });
5235
+ break;
5236
+ case "PPPP":
5237
+ default:
5238
+ dateTimeFormat = formatLong2.dateTime({
5239
+ width: "full"
5240
+ });
5241
+ break;
5340
5242
  }
5243
+ return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
5244
+ }
5245
+ __name(dateTimeLongFormatter, "dateTimeLongFormatter");
5246
+ var longFormatters = {
5247
+ p: timeLongFormatter,
5248
+ P: dateTimeLongFormatter
5341
5249
  };
5342
- var en_US_default = locale;
5250
+ var longFormatters_default = longFormatters;
5343
5251
 
5344
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/defaultLocale/index.js
5345
- var defaultLocale_default = en_US_default;
5252
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/protectedTokens/index.js
5253
+ var protectedDayOfYearTokens = ["D", "DD"];
5254
+ var protectedWeekYearTokens = ["YY", "YYYY"];
5255
+ function isProtectedDayOfYearToken(token) {
5256
+ return protectedDayOfYearTokens.indexOf(token) !== -1;
5257
+ }
5258
+ __name(isProtectedDayOfYearToken, "isProtectedDayOfYearToken");
5259
+ function isProtectedWeekYearToken(token) {
5260
+ return protectedWeekYearTokens.indexOf(token) !== -1;
5261
+ }
5262
+ __name(isProtectedWeekYearToken, "isProtectedWeekYearToken");
5263
+ function throwProtectedError(token, format2, input) {
5264
+ if (token === "YYYY") {
5265
+ throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
5266
+ } else if (token === "YY") {
5267
+ throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
5268
+ } else if (token === "D") {
5269
+ 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"));
5270
+ } else if (token === "DD") {
5271
+ 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"));
5272
+ }
5273
+ }
5274
+ __name(throwProtectedError, "throwProtectedError");
5346
5275
 
5347
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/format/index.js
5276
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/format/index.js
5348
5277
  var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
5349
5278
  var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
5350
5279
  var escapedStringRegExp = /^'([^]*?)'?$/;
5351
5280
  var doubleQuoteRegExp = /''/g;
5352
5281
  var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
5353
- function format(dirtyDate, dirtyFormatStr, options) {
5354
- 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;
5282
+ function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
5355
5283
  requiredArgs(2, arguments);
5356
5284
  var formatStr = String(dirtyFormatStr);
5357
- var defaultOptions2 = getDefaultOptions();
5358
- 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;
5359
- 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);
5285
+ var options = dirtyOptions || {};
5286
+ var locale2 = options.locale || en_US_default;
5287
+ var localeFirstWeekContainsDate = locale2.options && locale2.options.firstWeekContainsDate;
5288
+ var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
5289
+ var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
5360
5290
  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
5361
5291
  throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
5362
5292
  }
5363
- 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);
5293
+ var localeWeekStartsOn = locale2.options && locale2.options.weekStartsOn;
5294
+ var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
5295
+ var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
5364
5296
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
5365
5297
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
5366
5298
  }
@@ -5386,7 +5318,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
5386
5318
  var firstCharacter = substring[0];
5387
5319
  if (firstCharacter === "p" || firstCharacter === "P") {
5388
5320
  var longFormatter = longFormatters_default[firstCharacter];
5389
- return longFormatter(substring, locale2.formatLong);
5321
+ return longFormatter(substring, locale2.formatLong, formatterOptions);
5390
5322
  }
5391
5323
  return substring;
5392
5324
  }).join("").match(formattingTokensRegExp).map(function(substring) {
@@ -5399,11 +5331,11 @@ function format(dirtyDate, dirtyFormatStr, options) {
5399
5331
  }
5400
5332
  var formatter = formatters_default[firstCharacter];
5401
5333
  if (formatter) {
5402
- if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
5403
- throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
5334
+ if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {
5335
+ throwProtectedError(substring, dirtyFormatStr, dirtyDate);
5404
5336
  }
5405
- if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
5406
- throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
5337
+ if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {
5338
+ throwProtectedError(substring, dirtyFormatStr, dirtyDate);
5407
5339
  }
5408
5340
  return formatter(utcDate, substring, locale2.localize, formatterOptions);
5409
5341
  }
@@ -5416,11 +5348,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
5416
5348
  }
5417
5349
  __name(format, "format");
5418
5350
  function cleanEscapedString(input) {
5419
- var matched = input.match(escapedStringRegExp);
5420
- if (!matched) {
5421
- return input;
5422
- }
5423
- return matched[1].replace(doubleQuoteRegExp, "'");
5351
+ return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
5424
5352
  }
5425
5353
  __name(cleanEscapedString, "cleanEscapedString");
5426
5354
 
@@ -5431,20 +5359,14 @@ var transformErrorCheck = /* @__PURE__ */ __name((error, _credential) => {
5431
5359
  }, "transformErrorCheck");
5432
5360
  var transformErrorMessage = /* @__PURE__ */ __name((error, credential) => {
5433
5361
  if (error.startsWith("expiration")) {
5434
- return credential.expirationDate ? `Invalid \u2022 Expired ${format(
5435
- new Date(credential.expirationDate),
5436
- "dd MMM yyyy"
5437
- ).toUpperCase()}` : "Invalid \u2022 Expired";
5362
+ return credential.expirationDate ? `Invalid \u2022 Expired ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Invalid \u2022 Expired";
5438
5363
  }
5439
5364
  return error;
5440
5365
  }, "transformErrorMessage");
5441
5366
  var transformCheckMessage = /* @__PURE__ */ __name((check, credential) => {
5442
5367
  return {
5443
5368
  proof: "Valid",
5444
- expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(
5445
- new Date(credential.expirationDate),
5446
- "dd MMM yyyy"
5447
- ).toUpperCase()}` : "Valid \u2022 Does Not Expire"
5369
+ expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Valid \u2022 Does Not Expire"
5448
5370
  }[check] || check;
5449
5371
  }, "transformCheckMessage");
5450
5372
  var verifyCredential = /* @__PURE__ */ __name((learnCard) => {