@wrdagency/blockout 1.0.21 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/assets/style11.css +1 -1
  2. package/dist/assets/style17.css +1 -1
  3. package/dist/assets/style18.css +1 -1
  4. package/dist/assets/style19.css +1 -1
  5. package/dist/assets/style20.css +1 -1
  6. package/dist/assets/style21.css +1 -1
  7. package/dist/assets/style22.css +1 -1
  8. package/dist/assets/style23.css +1 -1
  9. package/dist/assets/style24.css +1 -1
  10. package/dist/assets/style25.css +1 -1
  11. package/dist/assets/style26.css +1 -1
  12. package/dist/assets/style27.css +1 -1
  13. package/dist/components/controls/base-popover-control/index.js +1 -1
  14. package/dist/components/controls/card-number-control/index.js +1 -1
  15. package/dist/components/controls/date-control/index.d.ts +10 -4
  16. package/dist/components/controls/date-control/index.js +69 -67
  17. package/dist/components/controls/date-control/picker.d.ts +8 -2
  18. package/dist/components/controls/date-control/picker.js +1 -1
  19. package/dist/components/controls/date-control/types.d.ts +0 -1
  20. package/dist/components/controls/date-control/types.js +0 -1
  21. package/dist/components/controls/date-control/util.js +7 -1602
  22. package/dist/components/controls/index.d.ts +1 -1
  23. package/dist/components/controls/index.js +18 -20
  24. package/dist/components/controls/recurrence-control/index.d.ts +7 -3
  25. package/dist/components/controls/recurrence-control/index.js +188 -124
  26. package/dist/components/controls/select-control/index.d.ts +0 -1
  27. package/dist/components/controls/select-control/index.js +0 -2
  28. package/dist/components/controls/tag-control/index.js +1 -1
  29. package/dist/components/controls/text-control/index.js +1 -1
  30. package/dist/components/data-view/data/filter.js +12 -14
  31. package/dist/components/data-view/index.js +1 -1
  32. package/dist/components/data-view/layouts/grid/empty.js +1 -1
  33. package/dist/components/data-view/layouts/grid/group.js +7 -9
  34. package/dist/components/data-view/layouts/grid/item.js +7 -9
  35. package/dist/components/data-view/layouts/grid/root.js +1 -1
  36. package/dist/components/data-view/layouts/kanban/empty.js +1 -1
  37. package/dist/components/data-view/layouts/kanban/group.js +7 -9
  38. package/dist/components/data-view/layouts/kanban/item.js +7 -9
  39. package/dist/components/data-view/layouts/kanban/root.js +1 -1
  40. package/dist/components/data-view/layouts/list/empty.js +1 -1
  41. package/dist/components/data-view/layouts/list/group.js +7 -9
  42. package/dist/components/data-view/layouts/list/item.js +7 -9
  43. package/dist/components/data-view/layouts/list/root.js +1 -1
  44. package/dist/components/data-view/layouts/table/empty.js +7 -9
  45. package/dist/components/data-view/layouts/table/group.js +8 -10
  46. package/dist/components/data-view/layouts/table/item.js +8 -10
  47. package/dist/components/data-view/layouts/table/root.js +7 -9
  48. package/dist/components/data-view/parts/body/index.js +9 -11
  49. package/dist/components/data-view/parts/controls/index.js +7 -9
  50. package/dist/components/data-view/parts/controls/search.js +7 -9
  51. package/dist/components/data-view/parts/filters/editor.js +6 -8
  52. package/dist/components/data-view/parts/footer/actions.js +7 -9
  53. package/dist/components/data-view/parts/footer/index.js +7 -9
  54. package/dist/components/data-view/parts/footer/selection.js +7 -9
  55. package/dist/components/data-view/parts/view-control/index.js +22 -24
  56. package/dist/components/data-view/root.js +7 -9
  57. package/dist/components/data-view/slots/group/checkbox.js +7 -9
  58. package/dist/components/data-view/slots/group/context.js +1 -1
  59. package/dist/components/data-view/slots/group/icon.js +1 -1
  60. package/dist/components/data-view/slots/group/index.js +1 -1
  61. package/dist/components/data-view/slots/group/label.js +1 -1
  62. package/dist/components/data-view/slots/index.js +3 -3
  63. package/dist/components/data-view/slots/item/actions.js +1 -1
  64. package/dist/components/data-view/slots/item/checkbox.js +7 -9
  65. package/dist/components/data-view/slots/item/depth.js +3 -3
  66. package/dist/components/data-view/slots/item/description.js +1 -1
  67. package/dist/components/data-view/slots/item/index.js +2 -2
  68. package/dist/components/data-view/slots/item/properties.js +2 -2
  69. package/dist/components/data-view/slots/item/relations.js +3 -3
  70. package/dist/components/data-view/slots/item/tags.js +1 -1
  71. package/dist/components/data-view/slots/item/thumbnail.js +1 -1
  72. package/dist/components/data-view/slots/item/title.js +1 -1
  73. package/dist/components/data-view/slots/item/util.js +2 -2
  74. package/dist/components/data-view/slots/property/field/editable.js +6 -8
  75. package/dist/components/data-view/slots/property/field/index.js +2 -2
  76. package/dist/components/data-view/slots/property/field/static.js +1 -1
  77. package/dist/components/data-view/slots/property/index.js +1 -1
  78. package/dist/components/data-view/slots/property/label.js +1 -1
  79. package/dist/components/data-view/slots/root/checkbox.js +6 -8
  80. package/dist/components/data-view/slots/root/index.js +1 -1
  81. package/dist/components/index.js +45 -47
  82. package/dist/components/menu/index.js +1 -1
  83. package/dist/{filter-BqYmWg3n.js → filter-rHYsh8Gq.js} +12 -14
  84. package/dist/{index-CWkR83hZ.js → index-CXFb4Xny.js} +5 -7
  85. package/dist/{index-BrUAPkzm.js → index-Cn5kB2Fd.js} +18 -20
  86. package/dist/{index-BdzBM_aG.js → index-DRiUXF8g.js} +4 -6
  87. package/dist/index.js +90 -92
  88. package/dist/parse-CdaSNXK6.js +1599 -0
  89. package/dist/{picker-Cfpntdfz.js → picker-aBRTIOUU.js} +165 -152
  90. package/dist/{style-CWAa57kN.js → style-C7eFpUVU.js} +1 -1
  91. package/dist/{types/date.js → style-DzV7-wks.js} +191 -234
  92. package/package.json +1 -1
  93. package/dist/components/controls/select-control/options.d.ts +0 -7
  94. package/dist/components/controls/select-control/options.js +0 -9
  95. package/dist/options-Cfoqhxw2.js +0 -96
  96. package/dist/types/date.d.ts +0 -39
@@ -0,0 +1,1599 @@
1
+ var re = Object.defineProperty;
2
+ var te = (s, n, e) => n in s ? re(s, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[n] = e;
3
+ var i = (s, n, e) => te(s, typeof n != "symbol" ? n + "" : n, e);
4
+ import { h as K, t as p, c as k, n as se, o as ne, p as ae, f as ie, s as H, q as $, d as oe, b as ce, a as V, g as j, i as ue, l as z, j as le, w as Z, k as de } from "./protectedTokens-DdjZoCxO.js";
5
+ function we() {
6
+ return Object.assign({}, K());
7
+ }
8
+ function fe(s, n) {
9
+ const e = p(s, n == null ? void 0 : n.in).getDay();
10
+ return e === 0 ? 7 : e;
11
+ }
12
+ function he(s, n) {
13
+ const e = ye(n) ? new n(0) : k(n, 0);
14
+ return e.setFullYear(s.getFullYear(), s.getMonth(), s.getDate()), e.setHours(
15
+ s.getHours(),
16
+ s.getMinutes(),
17
+ s.getSeconds(),
18
+ s.getMilliseconds()
19
+ ), e;
20
+ }
21
+ function ye(s) {
22
+ var n;
23
+ return typeof s == "function" && ((n = s.prototype) == null ? void 0 : n.constructor) === s;
24
+ }
25
+ const xe = 10;
26
+ class U {
27
+ constructor() {
28
+ i(this, "subPriority", 0);
29
+ }
30
+ validate(n, e) {
31
+ return !0;
32
+ }
33
+ }
34
+ class be extends U {
35
+ constructor(n, e, r, t, a) {
36
+ super(), this.value = n, this.validateValue = e, this.setValue = r, this.priority = t, a && (this.subPriority = a);
37
+ }
38
+ validate(n, e) {
39
+ return this.validateValue(n, this.value, e);
40
+ }
41
+ set(n, e, r) {
42
+ return this.setValue(n, e, this.value, r);
43
+ }
44
+ }
45
+ class me extends U {
46
+ constructor(e, r) {
47
+ super();
48
+ i(this, "priority", xe);
49
+ i(this, "subPriority", -1);
50
+ this.context = e || ((t) => k(r, t));
51
+ }
52
+ set(e, r) {
53
+ return r.timestampIsSet ? e : k(e, he(e, this.context));
54
+ }
55
+ }
56
+ class u {
57
+ run(n, e, r, t) {
58
+ const a = this.parse(n, e, r, t);
59
+ return a ? {
60
+ setter: new be(
61
+ a.value,
62
+ this.validate,
63
+ this.set,
64
+ this.priority,
65
+ this.subPriority
66
+ ),
67
+ rest: a.rest
68
+ } : null;
69
+ }
70
+ validate(n, e, r) {
71
+ return !0;
72
+ }
73
+ }
74
+ class Te extends u {
75
+ constructor() {
76
+ super(...arguments);
77
+ i(this, "priority", 140);
78
+ i(this, "incompatibleTokens", ["R", "u", "t", "T"]);
79
+ }
80
+ parse(e, r, t) {
81
+ switch (r) {
82
+ // AD, BC
83
+ case "G":
84
+ case "GG":
85
+ case "GGG":
86
+ return t.era(e, { width: "abbreviated" }) || t.era(e, { width: "narrow" });
87
+ // A, B
88
+ case "GGGGG":
89
+ return t.era(e, { width: "narrow" });
90
+ // Anno Domini, Before Christ
91
+ case "GGGG":
92
+ default:
93
+ return t.era(e, { width: "wide" }) || t.era(e, { width: "abbreviated" }) || t.era(e, { width: "narrow" });
94
+ }
95
+ }
96
+ set(e, r, t) {
97
+ return r.era = t, e.setFullYear(t, 0, 1), e.setHours(0, 0, 0, 0), e;
98
+ }
99
+ }
100
+ const f = {
101
+ month: /^(1[0-2]|0?\d)/,
102
+ // 0 to 12
103
+ date: /^(3[0-1]|[0-2]?\d)/,
104
+ // 0 to 31
105
+ dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,
106
+ // 0 to 366
107
+ week: /^(5[0-3]|[0-4]?\d)/,
108
+ // 0 to 53
109
+ hour23h: /^(2[0-3]|[0-1]?\d)/,
110
+ // 0 to 23
111
+ hour24h: /^(2[0-4]|[0-1]?\d)/,
112
+ // 0 to 24
113
+ hour11h: /^(1[0-1]|0?\d)/,
114
+ // 0 to 11
115
+ hour12h: /^(1[0-2]|0?\d)/,
116
+ // 0 to 12
117
+ minute: /^[0-5]?\d/,
118
+ // 0 to 59
119
+ second: /^[0-5]?\d/,
120
+ // 0 to 59
121
+ singleDigit: /^\d/,
122
+ // 0 to 9
123
+ twoDigits: /^\d{1,2}/,
124
+ // 0 to 99
125
+ threeDigits: /^\d{1,3}/,
126
+ // 0 to 999
127
+ fourDigits: /^\d{1,4}/,
128
+ // 0 to 9999
129
+ anyDigitsSigned: /^-?\d+/,
130
+ singleDigitSigned: /^-?\d/,
131
+ // 0 to 9, -0 to -9
132
+ twoDigitsSigned: /^-?\d{1,2}/,
133
+ // 0 to 99, -0 to -99
134
+ threeDigitsSigned: /^-?\d{1,3}/,
135
+ // 0 to 999, -0 to -999
136
+ fourDigitsSigned: /^-?\d{1,4}/
137
+ // 0 to 9999, -0 to -9999
138
+ }, b = {
139
+ basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
140
+ basic: /^([+-])(\d{2})(\d{2})|Z/,
141
+ basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
142
+ extended: /^([+-])(\d{2}):(\d{2})|Z/,
143
+ extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
144
+ };
145
+ function h(s, n) {
146
+ return s && {
147
+ value: n(s.value),
148
+ rest: s.rest
149
+ };
150
+ }
151
+ function l(s, n) {
152
+ const e = n.match(s);
153
+ return e ? {
154
+ value: parseInt(e[0], 10),
155
+ rest: n.slice(e[0].length)
156
+ } : null;
157
+ }
158
+ function m(s, n) {
159
+ const e = n.match(s);
160
+ if (!e)
161
+ return null;
162
+ if (e[0] === "Z")
163
+ return {
164
+ value: 0,
165
+ rest: n.slice(1)
166
+ };
167
+ const r = e[1] === "+" ? 1 : -1, t = e[2] ? parseInt(e[2], 10) : 0, a = e[3] ? parseInt(e[3], 10) : 0, o = e[5] ? parseInt(e[5], 10) : 0;
168
+ return {
169
+ value: r * (t * se + a * ne + o * ae),
170
+ rest: n.slice(e[0].length)
171
+ };
172
+ }
173
+ function J(s) {
174
+ return l(f.anyDigitsSigned, s);
175
+ }
176
+ function w(s, n) {
177
+ switch (s) {
178
+ case 1:
179
+ return l(f.singleDigit, n);
180
+ case 2:
181
+ return l(f.twoDigits, n);
182
+ case 3:
183
+ return l(f.threeDigits, n);
184
+ case 4:
185
+ return l(f.fourDigits, n);
186
+ default:
187
+ return l(new RegExp("^\\d{1," + s + "}"), n);
188
+ }
189
+ }
190
+ function O(s, n) {
191
+ switch (s) {
192
+ case 1:
193
+ return l(f.singleDigitSigned, n);
194
+ case 2:
195
+ return l(f.twoDigitsSigned, n);
196
+ case 3:
197
+ return l(f.threeDigitsSigned, n);
198
+ case 4:
199
+ return l(f.fourDigitsSigned, n);
200
+ default:
201
+ return l(new RegExp("^-?\\d{1," + s + "}"), n);
202
+ }
203
+ }
204
+ function I(s) {
205
+ switch (s) {
206
+ case "morning":
207
+ return 4;
208
+ case "evening":
209
+ return 17;
210
+ case "pm":
211
+ case "noon":
212
+ case "afternoon":
213
+ return 12;
214
+ case "am":
215
+ case "midnight":
216
+ case "night":
217
+ default:
218
+ return 0;
219
+ }
220
+ }
221
+ function S(s, n) {
222
+ const e = n > 0, r = e ? n : 1 - n;
223
+ let t;
224
+ if (r <= 50)
225
+ t = s || 100;
226
+ else {
227
+ const a = r + 50, o = Math.trunc(a / 100) * 100, y = s >= a % 100;
228
+ t = s + o - (y ? 100 : 0);
229
+ }
230
+ return e ? t : 1 - t;
231
+ }
232
+ function ee(s) {
233
+ return s % 400 === 0 || s % 4 === 0 && s % 100 !== 0;
234
+ }
235
+ class De extends u {
236
+ constructor() {
237
+ super(...arguments);
238
+ i(this, "priority", 130);
239
+ i(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
240
+ }
241
+ parse(e, r, t) {
242
+ const a = (o) => ({
243
+ year: o,
244
+ isTwoDigitYear: r === "yy"
245
+ });
246
+ switch (r) {
247
+ case "y":
248
+ return h(w(4, e), a);
249
+ case "yo":
250
+ return h(
251
+ t.ordinalNumber(e, {
252
+ unit: "year"
253
+ }),
254
+ a
255
+ );
256
+ default:
257
+ return h(w(r.length, e), a);
258
+ }
259
+ }
260
+ validate(e, r) {
261
+ return r.isTwoDigitYear || r.year > 0;
262
+ }
263
+ set(e, r, t) {
264
+ const a = e.getFullYear();
265
+ if (t.isTwoDigitYear) {
266
+ const y = S(
267
+ t.year,
268
+ a
269
+ );
270
+ return e.setFullYear(y, 0, 1), e.setHours(0, 0, 0, 0), e;
271
+ }
272
+ const o = !("era" in r) || r.era === 1 ? t.year : 1 - t.year;
273
+ return e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
274
+ }
275
+ }
276
+ class ke extends u {
277
+ constructor() {
278
+ super(...arguments);
279
+ i(this, "priority", 130);
280
+ i(this, "incompatibleTokens", [
281
+ "y",
282
+ "R",
283
+ "u",
284
+ "Q",
285
+ "q",
286
+ "M",
287
+ "L",
288
+ "I",
289
+ "d",
290
+ "D",
291
+ "i",
292
+ "t",
293
+ "T"
294
+ ]);
295
+ }
296
+ parse(e, r, t) {
297
+ const a = (o) => ({
298
+ year: o,
299
+ isTwoDigitYear: r === "YY"
300
+ });
301
+ switch (r) {
302
+ case "Y":
303
+ return h(w(4, e), a);
304
+ case "Yo":
305
+ return h(
306
+ t.ordinalNumber(e, {
307
+ unit: "year"
308
+ }),
309
+ a
310
+ );
311
+ default:
312
+ return h(w(r.length, e), a);
313
+ }
314
+ }
315
+ validate(e, r) {
316
+ return r.isTwoDigitYear || r.year > 0;
317
+ }
318
+ set(e, r, t, a) {
319
+ const o = ie(e, a);
320
+ if (t.isTwoDigitYear) {
321
+ const T = S(
322
+ t.year,
323
+ o
324
+ );
325
+ return e.setFullYear(
326
+ T,
327
+ 0,
328
+ a.firstWeekContainsDate
329
+ ), e.setHours(0, 0, 0, 0), H(e, a);
330
+ }
331
+ const y = !("era" in r) || r.era === 1 ? t.year : 1 - t.year;
332
+ return e.setFullYear(y, 0, a.firstWeekContainsDate), e.setHours(0, 0, 0, 0), H(e, a);
333
+ }
334
+ }
335
+ class pe extends u {
336
+ constructor() {
337
+ super(...arguments);
338
+ i(this, "priority", 130);
339
+ i(this, "incompatibleTokens", [
340
+ "G",
341
+ "y",
342
+ "Y",
343
+ "u",
344
+ "Q",
345
+ "q",
346
+ "M",
347
+ "L",
348
+ "w",
349
+ "d",
350
+ "D",
351
+ "e",
352
+ "c",
353
+ "t",
354
+ "T"
355
+ ]);
356
+ }
357
+ parse(e, r) {
358
+ return O(r === "R" ? 4 : r.length, e);
359
+ }
360
+ set(e, r, t) {
361
+ const a = k(e, 0);
362
+ return a.setFullYear(t, 0, 4), a.setHours(0, 0, 0, 0), $(a);
363
+ }
364
+ }
365
+ class ge extends u {
366
+ constructor() {
367
+ super(...arguments);
368
+ i(this, "priority", 130);
369
+ i(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]);
370
+ }
371
+ parse(e, r) {
372
+ return O(r === "u" ? 4 : r.length, e);
373
+ }
374
+ set(e, r, t) {
375
+ return e.setFullYear(t, 0, 1), e.setHours(0, 0, 0, 0), e;
376
+ }
377
+ }
378
+ class Pe extends u {
379
+ constructor() {
380
+ super(...arguments);
381
+ i(this, "priority", 120);
382
+ i(this, "incompatibleTokens", [
383
+ "Y",
384
+ "R",
385
+ "q",
386
+ "M",
387
+ "L",
388
+ "w",
389
+ "I",
390
+ "d",
391
+ "D",
392
+ "i",
393
+ "e",
394
+ "c",
395
+ "t",
396
+ "T"
397
+ ]);
398
+ }
399
+ parse(e, r, t) {
400
+ switch (r) {
401
+ // 1, 2, 3, 4
402
+ case "Q":
403
+ case "QQ":
404
+ return w(r.length, e);
405
+ // 1st, 2nd, 3rd, 4th
406
+ case "Qo":
407
+ return t.ordinalNumber(e, { unit: "quarter" });
408
+ // Q1, Q2, Q3, Q4
409
+ case "QQQ":
410
+ return t.quarter(e, {
411
+ width: "abbreviated",
412
+ context: "formatting"
413
+ }) || t.quarter(e, {
414
+ width: "narrow",
415
+ context: "formatting"
416
+ });
417
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
418
+ case "QQQQQ":
419
+ return t.quarter(e, {
420
+ width: "narrow",
421
+ context: "formatting"
422
+ });
423
+ // 1st quarter, 2nd quarter, ...
424
+ case "QQQQ":
425
+ default:
426
+ return t.quarter(e, {
427
+ width: "wide",
428
+ context: "formatting"
429
+ }) || t.quarter(e, {
430
+ width: "abbreviated",
431
+ context: "formatting"
432
+ }) || t.quarter(e, {
433
+ width: "narrow",
434
+ context: "formatting"
435
+ });
436
+ }
437
+ }
438
+ validate(e, r) {
439
+ return r >= 1 && r <= 4;
440
+ }
441
+ set(e, r, t) {
442
+ return e.setMonth((t - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
443
+ }
444
+ }
445
+ class Me extends u {
446
+ constructor() {
447
+ super(...arguments);
448
+ i(this, "priority", 120);
449
+ i(this, "incompatibleTokens", [
450
+ "Y",
451
+ "R",
452
+ "Q",
453
+ "M",
454
+ "L",
455
+ "w",
456
+ "I",
457
+ "d",
458
+ "D",
459
+ "i",
460
+ "e",
461
+ "c",
462
+ "t",
463
+ "T"
464
+ ]);
465
+ }
466
+ parse(e, r, t) {
467
+ switch (r) {
468
+ // 1, 2, 3, 4
469
+ case "q":
470
+ case "qq":
471
+ return w(r.length, e);
472
+ // 1st, 2nd, 3rd, 4th
473
+ case "qo":
474
+ return t.ordinalNumber(e, { unit: "quarter" });
475
+ // Q1, Q2, Q3, Q4
476
+ case "qqq":
477
+ return t.quarter(e, {
478
+ width: "abbreviated",
479
+ context: "standalone"
480
+ }) || t.quarter(e, {
481
+ width: "narrow",
482
+ context: "standalone"
483
+ });
484
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
485
+ case "qqqqq":
486
+ return t.quarter(e, {
487
+ width: "narrow",
488
+ context: "standalone"
489
+ });
490
+ // 1st quarter, 2nd quarter, ...
491
+ case "qqqq":
492
+ default:
493
+ return t.quarter(e, {
494
+ width: "wide",
495
+ context: "standalone"
496
+ }) || t.quarter(e, {
497
+ width: "abbreviated",
498
+ context: "standalone"
499
+ }) || t.quarter(e, {
500
+ width: "narrow",
501
+ context: "standalone"
502
+ });
503
+ }
504
+ }
505
+ validate(e, r) {
506
+ return r >= 1 && r <= 4;
507
+ }
508
+ set(e, r, t) {
509
+ return e.setMonth((t - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
510
+ }
511
+ }
512
+ class _e extends u {
513
+ constructor() {
514
+ super(...arguments);
515
+ i(this, "incompatibleTokens", [
516
+ "Y",
517
+ "R",
518
+ "q",
519
+ "Q",
520
+ "L",
521
+ "w",
522
+ "I",
523
+ "D",
524
+ "i",
525
+ "e",
526
+ "c",
527
+ "t",
528
+ "T"
529
+ ]);
530
+ i(this, "priority", 110);
531
+ }
532
+ parse(e, r, t) {
533
+ const a = (o) => o - 1;
534
+ switch (r) {
535
+ // 1, 2, ..., 12
536
+ case "M":
537
+ return h(
538
+ l(f.month, e),
539
+ a
540
+ );
541
+ // 01, 02, ..., 12
542
+ case "MM":
543
+ return h(w(2, e), a);
544
+ // 1st, 2nd, ..., 12th
545
+ case "Mo":
546
+ return h(
547
+ t.ordinalNumber(e, {
548
+ unit: "month"
549
+ }),
550
+ a
551
+ );
552
+ // Jan, Feb, ..., Dec
553
+ case "MMM":
554
+ return t.month(e, {
555
+ width: "abbreviated",
556
+ context: "formatting"
557
+ }) || t.month(e, { width: "narrow", context: "formatting" });
558
+ // J, F, ..., D
559
+ case "MMMMM":
560
+ return t.month(e, {
561
+ width: "narrow",
562
+ context: "formatting"
563
+ });
564
+ // January, February, ..., December
565
+ case "MMMM":
566
+ default:
567
+ return t.month(e, { width: "wide", context: "formatting" }) || t.month(e, {
568
+ width: "abbreviated",
569
+ context: "formatting"
570
+ }) || t.month(e, { width: "narrow", context: "formatting" });
571
+ }
572
+ }
573
+ validate(e, r) {
574
+ return r >= 0 && r <= 11;
575
+ }
576
+ set(e, r, t) {
577
+ return e.setMonth(t, 1), e.setHours(0, 0, 0, 0), e;
578
+ }
579
+ }
580
+ class Ye extends u {
581
+ constructor() {
582
+ super(...arguments);
583
+ i(this, "priority", 110);
584
+ i(this, "incompatibleTokens", [
585
+ "Y",
586
+ "R",
587
+ "q",
588
+ "Q",
589
+ "M",
590
+ "w",
591
+ "I",
592
+ "D",
593
+ "i",
594
+ "e",
595
+ "c",
596
+ "t",
597
+ "T"
598
+ ]);
599
+ }
600
+ parse(e, r, t) {
601
+ const a = (o) => o - 1;
602
+ switch (r) {
603
+ // 1, 2, ..., 12
604
+ case "L":
605
+ return h(
606
+ l(f.month, e),
607
+ a
608
+ );
609
+ // 01, 02, ..., 12
610
+ case "LL":
611
+ return h(w(2, e), a);
612
+ // 1st, 2nd, ..., 12th
613
+ case "Lo":
614
+ return h(
615
+ t.ordinalNumber(e, {
616
+ unit: "month"
617
+ }),
618
+ a
619
+ );
620
+ // Jan, Feb, ..., Dec
621
+ case "LLL":
622
+ return t.month(e, {
623
+ width: "abbreviated",
624
+ context: "standalone"
625
+ }) || t.month(e, { width: "narrow", context: "standalone" });
626
+ // J, F, ..., D
627
+ case "LLLLL":
628
+ return t.month(e, {
629
+ width: "narrow",
630
+ context: "standalone"
631
+ });
632
+ // January, February, ..., December
633
+ case "LLLL":
634
+ default:
635
+ return t.month(e, { width: "wide", context: "standalone" }) || t.month(e, {
636
+ width: "abbreviated",
637
+ context: "standalone"
638
+ }) || t.month(e, { width: "narrow", context: "standalone" });
639
+ }
640
+ }
641
+ validate(e, r) {
642
+ return r >= 0 && r <= 11;
643
+ }
644
+ set(e, r, t) {
645
+ return e.setMonth(t, 1), e.setHours(0, 0, 0, 0), e;
646
+ }
647
+ }
648
+ function Oe(s, n, e) {
649
+ const r = p(s, e == null ? void 0 : e.in), t = oe(r, e) - n;
650
+ return r.setDate(r.getDate() - t * 7), p(r, e == null ? void 0 : e.in);
651
+ }
652
+ class Ee extends u {
653
+ constructor() {
654
+ super(...arguments);
655
+ i(this, "priority", 100);
656
+ i(this, "incompatibleTokens", [
657
+ "y",
658
+ "R",
659
+ "u",
660
+ "q",
661
+ "Q",
662
+ "M",
663
+ "L",
664
+ "I",
665
+ "d",
666
+ "D",
667
+ "i",
668
+ "t",
669
+ "T"
670
+ ]);
671
+ }
672
+ parse(e, r, t) {
673
+ switch (r) {
674
+ case "w":
675
+ return l(f.week, e);
676
+ case "wo":
677
+ return t.ordinalNumber(e, { unit: "week" });
678
+ default:
679
+ return w(r.length, e);
680
+ }
681
+ }
682
+ validate(e, r) {
683
+ return r >= 1 && r <= 53;
684
+ }
685
+ set(e, r, t, a) {
686
+ return H(Oe(e, t, a), a);
687
+ }
688
+ }
689
+ function He(s, n, e) {
690
+ const r = p(s, e == null ? void 0 : e.in), t = ce(r, e) - n;
691
+ return r.setDate(r.getDate() - t * 7), r;
692
+ }
693
+ class Ie extends u {
694
+ constructor() {
695
+ super(...arguments);
696
+ i(this, "priority", 100);
697
+ i(this, "incompatibleTokens", [
698
+ "y",
699
+ "Y",
700
+ "u",
701
+ "q",
702
+ "Q",
703
+ "M",
704
+ "L",
705
+ "w",
706
+ "d",
707
+ "D",
708
+ "e",
709
+ "c",
710
+ "t",
711
+ "T"
712
+ ]);
713
+ }
714
+ parse(e, r, t) {
715
+ switch (r) {
716
+ case "I":
717
+ return l(f.week, e);
718
+ case "Io":
719
+ return t.ordinalNumber(e, { unit: "week" });
720
+ default:
721
+ return w(r.length, e);
722
+ }
723
+ }
724
+ validate(e, r) {
725
+ return r >= 1 && r <= 53;
726
+ }
727
+ set(e, r, t) {
728
+ return $(He(e, t));
729
+ }
730
+ }
731
+ const qe = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Le = [
732
+ 31,
733
+ 29,
734
+ 31,
735
+ 30,
736
+ 31,
737
+ 30,
738
+ 31,
739
+ 31,
740
+ 30,
741
+ 31,
742
+ 30,
743
+ 31
744
+ ];
745
+ class Qe extends u {
746
+ constructor() {
747
+ super(...arguments);
748
+ i(this, "priority", 90);
749
+ i(this, "subPriority", 1);
750
+ i(this, "incompatibleTokens", [
751
+ "Y",
752
+ "R",
753
+ "q",
754
+ "Q",
755
+ "w",
756
+ "I",
757
+ "D",
758
+ "i",
759
+ "e",
760
+ "c",
761
+ "t",
762
+ "T"
763
+ ]);
764
+ }
765
+ parse(e, r, t) {
766
+ switch (r) {
767
+ case "d":
768
+ return l(f.date, e);
769
+ case "do":
770
+ return t.ordinalNumber(e, { unit: "date" });
771
+ default:
772
+ return w(r.length, e);
773
+ }
774
+ }
775
+ validate(e, r) {
776
+ const t = e.getFullYear(), a = ee(t), o = e.getMonth();
777
+ return a ? r >= 1 && r <= Le[o] : r >= 1 && r <= qe[o];
778
+ }
779
+ set(e, r, t) {
780
+ return e.setDate(t), e.setHours(0, 0, 0, 0), e;
781
+ }
782
+ }
783
+ class Ne extends u {
784
+ constructor() {
785
+ super(...arguments);
786
+ i(this, "priority", 90);
787
+ i(this, "subpriority", 1);
788
+ i(this, "incompatibleTokens", [
789
+ "Y",
790
+ "R",
791
+ "q",
792
+ "Q",
793
+ "M",
794
+ "L",
795
+ "w",
796
+ "I",
797
+ "d",
798
+ "E",
799
+ "i",
800
+ "e",
801
+ "c",
802
+ "t",
803
+ "T"
804
+ ]);
805
+ }
806
+ parse(e, r, t) {
807
+ switch (r) {
808
+ case "D":
809
+ case "DD":
810
+ return l(f.dayOfYear, e);
811
+ case "Do":
812
+ return t.ordinalNumber(e, { unit: "date" });
813
+ default:
814
+ return w(r.length, e);
815
+ }
816
+ }
817
+ validate(e, r) {
818
+ const t = e.getFullYear();
819
+ return ee(t) ? r >= 1 && r <= 366 : r >= 1 && r <= 365;
820
+ }
821
+ set(e, r, t) {
822
+ return e.setMonth(0, t), e.setHours(0, 0, 0, 0), e;
823
+ }
824
+ }
825
+ function q(s, n, e) {
826
+ var _, P, Y, D;
827
+ const r = K(), t = (e == null ? void 0 : e.weekStartsOn) ?? ((P = (_ = e == null ? void 0 : e.locale) == null ? void 0 : _.options) == null ? void 0 : P.weekStartsOn) ?? r.weekStartsOn ?? ((D = (Y = r.locale) == null ? void 0 : Y.options) == null ? void 0 : D.weekStartsOn) ?? 0, a = p(s, e == null ? void 0 : e.in), o = a.getDay(), T = (n % 7 + 7) % 7, g = 7 - t, M = n < 0 || n > 6 ? n - (o + g) % 7 : (T + g) % 7 - (o + g) % 7;
828
+ return V(a, M, e);
829
+ }
830
+ class ve extends u {
831
+ constructor() {
832
+ super(...arguments);
833
+ i(this, "priority", 90);
834
+ i(this, "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]);
835
+ }
836
+ parse(e, r, t) {
837
+ switch (r) {
838
+ // Tue
839
+ case "E":
840
+ case "EE":
841
+ case "EEE":
842
+ return t.day(e, {
843
+ width: "abbreviated",
844
+ context: "formatting"
845
+ }) || t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
846
+ // T
847
+ case "EEEEE":
848
+ return t.day(e, {
849
+ width: "narrow",
850
+ context: "formatting"
851
+ });
852
+ // Tu
853
+ case "EEEEEE":
854
+ return t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
855
+ // Tuesday
856
+ case "EEEE":
857
+ default:
858
+ return t.day(e, { width: "wide", context: "formatting" }) || t.day(e, {
859
+ width: "abbreviated",
860
+ context: "formatting"
861
+ }) || t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
862
+ }
863
+ }
864
+ validate(e, r) {
865
+ return r >= 0 && r <= 6;
866
+ }
867
+ set(e, r, t, a) {
868
+ return e = q(e, t, a), e.setHours(0, 0, 0, 0), e;
869
+ }
870
+ }
871
+ class Re extends u {
872
+ constructor() {
873
+ super(...arguments);
874
+ i(this, "priority", 90);
875
+ i(this, "incompatibleTokens", [
876
+ "y",
877
+ "R",
878
+ "u",
879
+ "q",
880
+ "Q",
881
+ "M",
882
+ "L",
883
+ "I",
884
+ "d",
885
+ "D",
886
+ "E",
887
+ "i",
888
+ "c",
889
+ "t",
890
+ "T"
891
+ ]);
892
+ }
893
+ parse(e, r, t, a) {
894
+ const o = (y) => {
895
+ const T = Math.floor((y - 1) / 7) * 7;
896
+ return (y + a.weekStartsOn + 6) % 7 + T;
897
+ };
898
+ switch (r) {
899
+ // 3
900
+ case "e":
901
+ case "ee":
902
+ return h(w(r.length, e), o);
903
+ // 3rd
904
+ case "eo":
905
+ return h(
906
+ t.ordinalNumber(e, {
907
+ unit: "day"
908
+ }),
909
+ o
910
+ );
911
+ // Tue
912
+ case "eee":
913
+ return t.day(e, {
914
+ width: "abbreviated",
915
+ context: "formatting"
916
+ }) || t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
917
+ // T
918
+ case "eeeee":
919
+ return t.day(e, {
920
+ width: "narrow",
921
+ context: "formatting"
922
+ });
923
+ // Tu
924
+ case "eeeeee":
925
+ return t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
926
+ // Tuesday
927
+ case "eeee":
928
+ default:
929
+ return t.day(e, { width: "wide", context: "formatting" }) || t.day(e, {
930
+ width: "abbreviated",
931
+ context: "formatting"
932
+ }) || t.day(e, { width: "short", context: "formatting" }) || t.day(e, { width: "narrow", context: "formatting" });
933
+ }
934
+ }
935
+ validate(e, r) {
936
+ return r >= 0 && r <= 6;
937
+ }
938
+ set(e, r, t, a) {
939
+ return e = q(e, t, a), e.setHours(0, 0, 0, 0), e;
940
+ }
941
+ }
942
+ class We extends u {
943
+ constructor() {
944
+ super(...arguments);
945
+ i(this, "priority", 90);
946
+ i(this, "incompatibleTokens", [
947
+ "y",
948
+ "R",
949
+ "u",
950
+ "q",
951
+ "Q",
952
+ "M",
953
+ "L",
954
+ "I",
955
+ "d",
956
+ "D",
957
+ "E",
958
+ "i",
959
+ "e",
960
+ "t",
961
+ "T"
962
+ ]);
963
+ }
964
+ parse(e, r, t, a) {
965
+ const o = (y) => {
966
+ const T = Math.floor((y - 1) / 7) * 7;
967
+ return (y + a.weekStartsOn + 6) % 7 + T;
968
+ };
969
+ switch (r) {
970
+ // 3
971
+ case "c":
972
+ case "cc":
973
+ return h(w(r.length, e), o);
974
+ // 3rd
975
+ case "co":
976
+ return h(
977
+ t.ordinalNumber(e, {
978
+ unit: "day"
979
+ }),
980
+ o
981
+ );
982
+ // Tue
983
+ case "ccc":
984
+ return t.day(e, {
985
+ width: "abbreviated",
986
+ context: "standalone"
987
+ }) || t.day(e, { width: "short", context: "standalone" }) || t.day(e, { width: "narrow", context: "standalone" });
988
+ // T
989
+ case "ccccc":
990
+ return t.day(e, {
991
+ width: "narrow",
992
+ context: "standalone"
993
+ });
994
+ // Tu
995
+ case "cccccc":
996
+ return t.day(e, { width: "short", context: "standalone" }) || t.day(e, { width: "narrow", context: "standalone" });
997
+ // Tuesday
998
+ case "cccc":
999
+ default:
1000
+ return t.day(e, { width: "wide", context: "standalone" }) || t.day(e, {
1001
+ width: "abbreviated",
1002
+ context: "standalone"
1003
+ }) || t.day(e, { width: "short", context: "standalone" }) || t.day(e, { width: "narrow", context: "standalone" });
1004
+ }
1005
+ }
1006
+ validate(e, r) {
1007
+ return r >= 0 && r <= 6;
1008
+ }
1009
+ set(e, r, t, a) {
1010
+ return e = q(e, t, a), e.setHours(0, 0, 0, 0), e;
1011
+ }
1012
+ }
1013
+ function Ce(s, n, e) {
1014
+ const r = p(s, e == null ? void 0 : e.in), t = fe(r, e), a = n - t;
1015
+ return V(r, a, e);
1016
+ }
1017
+ class Be extends u {
1018
+ constructor() {
1019
+ super(...arguments);
1020
+ i(this, "priority", 90);
1021
+ i(this, "incompatibleTokens", [
1022
+ "y",
1023
+ "Y",
1024
+ "u",
1025
+ "q",
1026
+ "Q",
1027
+ "M",
1028
+ "L",
1029
+ "w",
1030
+ "d",
1031
+ "D",
1032
+ "E",
1033
+ "e",
1034
+ "c",
1035
+ "t",
1036
+ "T"
1037
+ ]);
1038
+ }
1039
+ parse(e, r, t) {
1040
+ const a = (o) => o === 0 ? 7 : o;
1041
+ switch (r) {
1042
+ // 2
1043
+ case "i":
1044
+ case "ii":
1045
+ return w(r.length, e);
1046
+ // 2nd
1047
+ case "io":
1048
+ return t.ordinalNumber(e, { unit: "day" });
1049
+ // Tue
1050
+ case "iii":
1051
+ return h(
1052
+ t.day(e, {
1053
+ width: "abbreviated",
1054
+ context: "formatting"
1055
+ }) || t.day(e, {
1056
+ width: "short",
1057
+ context: "formatting"
1058
+ }) || t.day(e, {
1059
+ width: "narrow",
1060
+ context: "formatting"
1061
+ }),
1062
+ a
1063
+ );
1064
+ // T
1065
+ case "iiiii":
1066
+ return h(
1067
+ t.day(e, {
1068
+ width: "narrow",
1069
+ context: "formatting"
1070
+ }),
1071
+ a
1072
+ );
1073
+ // Tu
1074
+ case "iiiiii":
1075
+ return h(
1076
+ t.day(e, {
1077
+ width: "short",
1078
+ context: "formatting"
1079
+ }) || t.day(e, {
1080
+ width: "narrow",
1081
+ context: "formatting"
1082
+ }),
1083
+ a
1084
+ );
1085
+ // Tuesday
1086
+ case "iiii":
1087
+ default:
1088
+ return h(
1089
+ t.day(e, {
1090
+ width: "wide",
1091
+ context: "formatting"
1092
+ }) || t.day(e, {
1093
+ width: "abbreviated",
1094
+ context: "formatting"
1095
+ }) || t.day(e, {
1096
+ width: "short",
1097
+ context: "formatting"
1098
+ }) || t.day(e, {
1099
+ width: "narrow",
1100
+ context: "formatting"
1101
+ }),
1102
+ a
1103
+ );
1104
+ }
1105
+ }
1106
+ validate(e, r) {
1107
+ return r >= 1 && r <= 7;
1108
+ }
1109
+ set(e, r, t) {
1110
+ return e = Ce(e, t), e.setHours(0, 0, 0, 0), e;
1111
+ }
1112
+ }
1113
+ class Ge extends u {
1114
+ constructor() {
1115
+ super(...arguments);
1116
+ i(this, "priority", 80);
1117
+ i(this, "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]);
1118
+ }
1119
+ parse(e, r, t) {
1120
+ switch (r) {
1121
+ case "a":
1122
+ case "aa":
1123
+ case "aaa":
1124
+ return t.dayPeriod(e, {
1125
+ width: "abbreviated",
1126
+ context: "formatting"
1127
+ }) || t.dayPeriod(e, {
1128
+ width: "narrow",
1129
+ context: "formatting"
1130
+ });
1131
+ case "aaaaa":
1132
+ return t.dayPeriod(e, {
1133
+ width: "narrow",
1134
+ context: "formatting"
1135
+ });
1136
+ case "aaaa":
1137
+ default:
1138
+ return t.dayPeriod(e, {
1139
+ width: "wide",
1140
+ context: "formatting"
1141
+ }) || t.dayPeriod(e, {
1142
+ width: "abbreviated",
1143
+ context: "formatting"
1144
+ }) || t.dayPeriod(e, {
1145
+ width: "narrow",
1146
+ context: "formatting"
1147
+ });
1148
+ }
1149
+ }
1150
+ set(e, r, t) {
1151
+ return e.setHours(I(t), 0, 0, 0), e;
1152
+ }
1153
+ }
1154
+ class Ae extends u {
1155
+ constructor() {
1156
+ super(...arguments);
1157
+ i(this, "priority", 80);
1158
+ i(this, "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]);
1159
+ }
1160
+ parse(e, r, t) {
1161
+ switch (r) {
1162
+ case "b":
1163
+ case "bb":
1164
+ case "bbb":
1165
+ return t.dayPeriod(e, {
1166
+ width: "abbreviated",
1167
+ context: "formatting"
1168
+ }) || t.dayPeriod(e, {
1169
+ width: "narrow",
1170
+ context: "formatting"
1171
+ });
1172
+ case "bbbbb":
1173
+ return t.dayPeriod(e, {
1174
+ width: "narrow",
1175
+ context: "formatting"
1176
+ });
1177
+ case "bbbb":
1178
+ default:
1179
+ return t.dayPeriod(e, {
1180
+ width: "wide",
1181
+ context: "formatting"
1182
+ }) || t.dayPeriod(e, {
1183
+ width: "abbreviated",
1184
+ context: "formatting"
1185
+ }) || t.dayPeriod(e, {
1186
+ width: "narrow",
1187
+ context: "formatting"
1188
+ });
1189
+ }
1190
+ }
1191
+ set(e, r, t) {
1192
+ return e.setHours(I(t), 0, 0, 0), e;
1193
+ }
1194
+ }
1195
+ class Xe extends u {
1196
+ constructor() {
1197
+ super(...arguments);
1198
+ i(this, "priority", 80);
1199
+ i(this, "incompatibleTokens", ["a", "b", "t", "T"]);
1200
+ }
1201
+ parse(e, r, t) {
1202
+ switch (r) {
1203
+ case "B":
1204
+ case "BB":
1205
+ case "BBB":
1206
+ return t.dayPeriod(e, {
1207
+ width: "abbreviated",
1208
+ context: "formatting"
1209
+ }) || t.dayPeriod(e, {
1210
+ width: "narrow",
1211
+ context: "formatting"
1212
+ });
1213
+ case "BBBBB":
1214
+ return t.dayPeriod(e, {
1215
+ width: "narrow",
1216
+ context: "formatting"
1217
+ });
1218
+ case "BBBB":
1219
+ default:
1220
+ return t.dayPeriod(e, {
1221
+ width: "wide",
1222
+ context: "formatting"
1223
+ }) || t.dayPeriod(e, {
1224
+ width: "abbreviated",
1225
+ context: "formatting"
1226
+ }) || t.dayPeriod(e, {
1227
+ width: "narrow",
1228
+ context: "formatting"
1229
+ });
1230
+ }
1231
+ }
1232
+ set(e, r, t) {
1233
+ return e.setHours(I(t), 0, 0, 0), e;
1234
+ }
1235
+ }
1236
+ class Fe extends u {
1237
+ constructor() {
1238
+ super(...arguments);
1239
+ i(this, "priority", 70);
1240
+ i(this, "incompatibleTokens", ["H", "K", "k", "t", "T"]);
1241
+ }
1242
+ parse(e, r, t) {
1243
+ switch (r) {
1244
+ case "h":
1245
+ return l(f.hour12h, e);
1246
+ case "ho":
1247
+ return t.ordinalNumber(e, { unit: "hour" });
1248
+ default:
1249
+ return w(r.length, e);
1250
+ }
1251
+ }
1252
+ validate(e, r) {
1253
+ return r >= 1 && r <= 12;
1254
+ }
1255
+ set(e, r, t) {
1256
+ const a = e.getHours() >= 12;
1257
+ return a && t < 12 ? e.setHours(t + 12, 0, 0, 0) : !a && t === 12 ? e.setHours(0, 0, 0, 0) : e.setHours(t, 0, 0, 0), e;
1258
+ }
1259
+ }
1260
+ class ze extends u {
1261
+ constructor() {
1262
+ super(...arguments);
1263
+ i(this, "priority", 70);
1264
+ i(this, "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]);
1265
+ }
1266
+ parse(e, r, t) {
1267
+ switch (r) {
1268
+ case "H":
1269
+ return l(f.hour23h, e);
1270
+ case "Ho":
1271
+ return t.ordinalNumber(e, { unit: "hour" });
1272
+ default:
1273
+ return w(r.length, e);
1274
+ }
1275
+ }
1276
+ validate(e, r) {
1277
+ return r >= 0 && r <= 23;
1278
+ }
1279
+ set(e, r, t) {
1280
+ return e.setHours(t, 0, 0, 0), e;
1281
+ }
1282
+ }
1283
+ class Ze extends u {
1284
+ constructor() {
1285
+ super(...arguments);
1286
+ i(this, "priority", 70);
1287
+ i(this, "incompatibleTokens", ["h", "H", "k", "t", "T"]);
1288
+ }
1289
+ parse(e, r, t) {
1290
+ switch (r) {
1291
+ case "K":
1292
+ return l(f.hour11h, e);
1293
+ case "Ko":
1294
+ return t.ordinalNumber(e, { unit: "hour" });
1295
+ default:
1296
+ return w(r.length, e);
1297
+ }
1298
+ }
1299
+ validate(e, r) {
1300
+ return r >= 0 && r <= 11;
1301
+ }
1302
+ set(e, r, t) {
1303
+ return e.getHours() >= 12 && t < 12 ? e.setHours(t + 12, 0, 0, 0) : e.setHours(t, 0, 0, 0), e;
1304
+ }
1305
+ }
1306
+ class Ke extends u {
1307
+ constructor() {
1308
+ super(...arguments);
1309
+ i(this, "priority", 70);
1310
+ i(this, "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]);
1311
+ }
1312
+ parse(e, r, t) {
1313
+ switch (r) {
1314
+ case "k":
1315
+ return l(f.hour24h, e);
1316
+ case "ko":
1317
+ return t.ordinalNumber(e, { unit: "hour" });
1318
+ default:
1319
+ return w(r.length, e);
1320
+ }
1321
+ }
1322
+ validate(e, r) {
1323
+ return r >= 1 && r <= 24;
1324
+ }
1325
+ set(e, r, t) {
1326
+ const a = t <= 24 ? t % 24 : t;
1327
+ return e.setHours(a, 0, 0, 0), e;
1328
+ }
1329
+ }
1330
+ class $e extends u {
1331
+ constructor() {
1332
+ super(...arguments);
1333
+ i(this, "priority", 60);
1334
+ i(this, "incompatibleTokens", ["t", "T"]);
1335
+ }
1336
+ parse(e, r, t) {
1337
+ switch (r) {
1338
+ case "m":
1339
+ return l(f.minute, e);
1340
+ case "mo":
1341
+ return t.ordinalNumber(e, { unit: "minute" });
1342
+ default:
1343
+ return w(r.length, e);
1344
+ }
1345
+ }
1346
+ validate(e, r) {
1347
+ return r >= 0 && r <= 59;
1348
+ }
1349
+ set(e, r, t) {
1350
+ return e.setMinutes(t, 0, 0), e;
1351
+ }
1352
+ }
1353
+ class Ve extends u {
1354
+ constructor() {
1355
+ super(...arguments);
1356
+ i(this, "priority", 50);
1357
+ i(this, "incompatibleTokens", ["t", "T"]);
1358
+ }
1359
+ parse(e, r, t) {
1360
+ switch (r) {
1361
+ case "s":
1362
+ return l(f.second, e);
1363
+ case "so":
1364
+ return t.ordinalNumber(e, { unit: "second" });
1365
+ default:
1366
+ return w(r.length, e);
1367
+ }
1368
+ }
1369
+ validate(e, r) {
1370
+ return r >= 0 && r <= 59;
1371
+ }
1372
+ set(e, r, t) {
1373
+ return e.setSeconds(t, 0), e;
1374
+ }
1375
+ }
1376
+ class je extends u {
1377
+ constructor() {
1378
+ super(...arguments);
1379
+ i(this, "priority", 30);
1380
+ i(this, "incompatibleTokens", ["t", "T"]);
1381
+ }
1382
+ parse(e, r) {
1383
+ const t = (a) => Math.trunc(a * Math.pow(10, -r.length + 3));
1384
+ return h(w(r.length, e), t);
1385
+ }
1386
+ set(e, r, t) {
1387
+ return e.setMilliseconds(t), e;
1388
+ }
1389
+ }
1390
+ class Ue extends u {
1391
+ constructor() {
1392
+ super(...arguments);
1393
+ i(this, "priority", 10);
1394
+ i(this, "incompatibleTokens", ["t", "T", "x"]);
1395
+ }
1396
+ parse(e, r) {
1397
+ switch (r) {
1398
+ case "X":
1399
+ return m(
1400
+ b.basicOptionalMinutes,
1401
+ e
1402
+ );
1403
+ case "XX":
1404
+ return m(b.basic, e);
1405
+ case "XXXX":
1406
+ return m(
1407
+ b.basicOptionalSeconds,
1408
+ e
1409
+ );
1410
+ case "XXXXX":
1411
+ return m(
1412
+ b.extendedOptionalSeconds,
1413
+ e
1414
+ );
1415
+ case "XXX":
1416
+ default:
1417
+ return m(b.extended, e);
1418
+ }
1419
+ }
1420
+ set(e, r, t) {
1421
+ return r.timestampIsSet ? e : k(
1422
+ e,
1423
+ e.getTime() - j(e) - t
1424
+ );
1425
+ }
1426
+ }
1427
+ class Je extends u {
1428
+ constructor() {
1429
+ super(...arguments);
1430
+ i(this, "priority", 10);
1431
+ i(this, "incompatibleTokens", ["t", "T", "X"]);
1432
+ }
1433
+ parse(e, r) {
1434
+ switch (r) {
1435
+ case "x":
1436
+ return m(
1437
+ b.basicOptionalMinutes,
1438
+ e
1439
+ );
1440
+ case "xx":
1441
+ return m(b.basic, e);
1442
+ case "xxxx":
1443
+ return m(
1444
+ b.basicOptionalSeconds,
1445
+ e
1446
+ );
1447
+ case "xxxxx":
1448
+ return m(
1449
+ b.extendedOptionalSeconds,
1450
+ e
1451
+ );
1452
+ case "xxx":
1453
+ default:
1454
+ return m(b.extended, e);
1455
+ }
1456
+ }
1457
+ set(e, r, t) {
1458
+ return r.timestampIsSet ? e : k(
1459
+ e,
1460
+ e.getTime() - j(e) - t
1461
+ );
1462
+ }
1463
+ }
1464
+ class Se extends u {
1465
+ constructor() {
1466
+ super(...arguments);
1467
+ i(this, "priority", 40);
1468
+ i(this, "incompatibleTokens", "*");
1469
+ }
1470
+ parse(e) {
1471
+ return J(e);
1472
+ }
1473
+ set(e, r, t) {
1474
+ return [k(e, t * 1e3), { timestampIsSet: !0 }];
1475
+ }
1476
+ }
1477
+ class er extends u {
1478
+ constructor() {
1479
+ super(...arguments);
1480
+ i(this, "priority", 20);
1481
+ i(this, "incompatibleTokens", "*");
1482
+ }
1483
+ parse(e) {
1484
+ return J(e);
1485
+ }
1486
+ set(e, r, t) {
1487
+ return [k(e, t), { timestampIsSet: !0 }];
1488
+ }
1489
+ }
1490
+ const rr = {
1491
+ G: new Te(),
1492
+ y: new De(),
1493
+ Y: new ke(),
1494
+ R: new pe(),
1495
+ u: new ge(),
1496
+ Q: new Pe(),
1497
+ q: new Me(),
1498
+ M: new _e(),
1499
+ L: new Ye(),
1500
+ w: new Ee(),
1501
+ I: new Ie(),
1502
+ d: new Qe(),
1503
+ D: new Ne(),
1504
+ E: new ve(),
1505
+ e: new Re(),
1506
+ c: new We(),
1507
+ i: new Be(),
1508
+ a: new Ge(),
1509
+ b: new Ae(),
1510
+ B: new Xe(),
1511
+ h: new Fe(),
1512
+ H: new ze(),
1513
+ K: new Ze(),
1514
+ k: new Ke(),
1515
+ m: new $e(),
1516
+ s: new Ve(),
1517
+ S: new je(),
1518
+ X: new Ue(),
1519
+ x: new Je(),
1520
+ t: new Se(),
1521
+ T: new er()
1522
+ }, tr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, sr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, nr = /^'([^]*?)'?$/, ar = /''/g, ir = /\S/, or = /[a-zA-Z]/;
1523
+ function dr(s, n, e, r) {
1524
+ var Q, N, v, R, W, C, B, G;
1525
+ const t = () => k((r == null ? void 0 : r.in) || e, NaN), a = we(), o = (r == null ? void 0 : r.locale) ?? a.locale ?? ue, y = (r == null ? void 0 : r.firstWeekContainsDate) ?? ((N = (Q = r == null ? void 0 : r.locale) == null ? void 0 : Q.options) == null ? void 0 : N.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((R = (v = a.locale) == null ? void 0 : v.options) == null ? void 0 : R.firstWeekContainsDate) ?? 1, T = (r == null ? void 0 : r.weekStartsOn) ?? ((C = (W = r == null ? void 0 : r.locale) == null ? void 0 : W.options) == null ? void 0 : C.weekStartsOn) ?? a.weekStartsOn ?? ((G = (B = a.locale) == null ? void 0 : B.options) == null ? void 0 : G.weekStartsOn) ?? 0;
1526
+ if (!n)
1527
+ return s ? t() : p(e, r == null ? void 0 : r.in);
1528
+ const g = {
1529
+ firstWeekContainsDate: y,
1530
+ weekStartsOn: T,
1531
+ locale: o
1532
+ }, M = [new me(r == null ? void 0 : r.in, e)], _ = n.match(sr).map((c) => {
1533
+ const d = c[0];
1534
+ if (d in z) {
1535
+ const x = z[d];
1536
+ return x(c, o.formatLong);
1537
+ }
1538
+ return c;
1539
+ }).join("").match(tr), P = [];
1540
+ for (let c of _) {
1541
+ !(r != null && r.useAdditionalWeekYearTokens) && le(c) && Z(c, n, s), !(r != null && r.useAdditionalDayOfYearTokens) && de(c) && Z(c, n, s);
1542
+ const d = c[0], x = rr[d];
1543
+ if (x) {
1544
+ const { incompatibleTokens: A } = x;
1545
+ if (Array.isArray(A)) {
1546
+ const X = P.find(
1547
+ (F) => A.includes(F.token) || F.token === d
1548
+ );
1549
+ if (X)
1550
+ throw new RangeError(
1551
+ `The format string mustn't contain \`${X.fullToken}\` and \`${c}\` at the same time`
1552
+ );
1553
+ } else if (x.incompatibleTokens === "*" && P.length > 0)
1554
+ throw new RangeError(
1555
+ `The format string mustn't contain \`${c}\` and any other token at the same time`
1556
+ );
1557
+ P.push({ token: d, fullToken: c });
1558
+ const E = x.run(
1559
+ s,
1560
+ c,
1561
+ o.match,
1562
+ g
1563
+ );
1564
+ if (!E)
1565
+ return t();
1566
+ M.push(E.setter), s = E.rest;
1567
+ } else {
1568
+ if (d.match(or))
1569
+ throw new RangeError(
1570
+ "Format string contains an unescaped latin alphabet character `" + d + "`"
1571
+ );
1572
+ if (c === "''" ? c = "'" : d === "'" && (c = cr(c)), s.indexOf(c) === 0)
1573
+ s = s.slice(c.length);
1574
+ else
1575
+ return t();
1576
+ }
1577
+ }
1578
+ if (s.length > 0 && ir.test(s))
1579
+ return t();
1580
+ const Y = M.map((c) => c.priority).sort((c, d) => d - c).filter((c, d, x) => x.indexOf(c) === d).map(
1581
+ (c) => M.filter((d) => d.priority === c).sort((d, x) => x.subPriority - d.subPriority)
1582
+ ).map((c) => c[0]);
1583
+ let D = p(e, r == null ? void 0 : r.in);
1584
+ if (isNaN(+D)) return t();
1585
+ const L = {};
1586
+ for (const c of Y) {
1587
+ if (!c.validate(D, g))
1588
+ return t();
1589
+ const d = c.set(D, L, g);
1590
+ Array.isArray(d) ? (D = d[0], Object.assign(L, d[1])) : D = d;
1591
+ }
1592
+ return D;
1593
+ }
1594
+ function cr(s) {
1595
+ return s.match(nr)[1].replace(ar, "'");
1596
+ }
1597
+ export {
1598
+ dr as p
1599
+ };