@tricoteuses/assemblee 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4133 @@
1
+ var ut = Object.defineProperty;
2
+ var dt = (t, i, e) => i in t ? ut(t, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[i] = e;
3
+ var c = (t, i, e) => dt(t, typeof i != "symbol" ? i + "" : i, e);
4
+ import { z as a } from "zod";
5
+ const lt = {
6
+ lessThanXSeconds: {
7
+ one: "less than a second",
8
+ other: "less than {{count}} seconds"
9
+ },
10
+ xSeconds: {
11
+ one: "1 second",
12
+ other: "{{count}} seconds"
13
+ },
14
+ halfAMinute: "half a minute",
15
+ lessThanXMinutes: {
16
+ one: "less than a minute",
17
+ other: "less than {{count}} minutes"
18
+ },
19
+ xMinutes: {
20
+ one: "1 minute",
21
+ other: "{{count}} minutes"
22
+ },
23
+ aboutXHours: {
24
+ one: "about 1 hour",
25
+ other: "about {{count}} hours"
26
+ },
27
+ xHours: {
28
+ one: "1 hour",
29
+ other: "{{count}} hours"
30
+ },
31
+ xDays: {
32
+ one: "1 day",
33
+ other: "{{count}} days"
34
+ },
35
+ aboutXWeeks: {
36
+ one: "about 1 week",
37
+ other: "about {{count}} weeks"
38
+ },
39
+ xWeeks: {
40
+ one: "1 week",
41
+ other: "{{count}} weeks"
42
+ },
43
+ aboutXMonths: {
44
+ one: "about 1 month",
45
+ other: "about {{count}} months"
46
+ },
47
+ xMonths: {
48
+ one: "1 month",
49
+ other: "{{count}} months"
50
+ },
51
+ aboutXYears: {
52
+ one: "about 1 year",
53
+ other: "about {{count}} years"
54
+ },
55
+ xYears: {
56
+ one: "1 year",
57
+ other: "{{count}} years"
58
+ },
59
+ overXYears: {
60
+ one: "over 1 year",
61
+ other: "over {{count}} years"
62
+ },
63
+ almostXYears: {
64
+ one: "almost 1 year",
65
+ other: "almost {{count}} years"
66
+ }
67
+ }, mt = (t, i, e) => {
68
+ let n;
69
+ const r = lt[t];
70
+ return typeof r == "string" ? n = r : i === 1 ? n = r.one : n = r.other.replace("{{count}}", i.toString()), e?.addSuffix ? e.comparison && e.comparison > 0 ? "in " + n : n + " ago" : n;
71
+ };
72
+ function q(t) {
73
+ return (i = {}) => {
74
+ const e = i.width ? String(i.width) : t.defaultWidth;
75
+ return t.formats[e] || t.formats[t.defaultWidth];
76
+ };
77
+ }
78
+ const ft = {
79
+ full: "EEEE, MMMM do, y",
80
+ long: "MMMM do, y",
81
+ medium: "MMM d, y",
82
+ short: "MM/dd/yyyy"
83
+ }, pt = {
84
+ full: "h:mm:ss a zzzz",
85
+ long: "h:mm:ss a z",
86
+ medium: "h:mm:ss a",
87
+ short: "h:mm a"
88
+ }, ht = {
89
+ full: "{{date}} 'at' {{time}}",
90
+ long: "{{date}} 'at' {{time}}",
91
+ medium: "{{date}}, {{time}}",
92
+ short: "{{date}}, {{time}}"
93
+ }, gt = {
94
+ date: q({
95
+ formats: ft,
96
+ defaultWidth: "full"
97
+ }),
98
+ time: q({
99
+ formats: pt,
100
+ defaultWidth: "full"
101
+ }),
102
+ dateTime: q({
103
+ formats: ht,
104
+ defaultWidth: "full"
105
+ })
106
+ }, wt = {
107
+ lastWeek: "'last' eeee 'at' p",
108
+ yesterday: "'yesterday at' p",
109
+ today: "'today at' p",
110
+ tomorrow: "'tomorrow at' p",
111
+ nextWeek: "eeee 'at' p",
112
+ other: "P"
113
+ }, bt = (t, i, e, n) => wt[t];
114
+ function M(t) {
115
+ return (i, e) => {
116
+ const n = e?.context ? String(e.context) : "standalone";
117
+ let r;
118
+ if (n === "formatting" && t.formattingValues) {
119
+ const s = t.defaultFormattingWidth || t.defaultWidth, u = e?.width ? String(e.width) : s;
120
+ r = t.formattingValues[u] || t.formattingValues[s];
121
+ } else {
122
+ const s = t.defaultWidth, u = e?.width ? String(e.width) : t.defaultWidth;
123
+ r = t.values[u] || t.values[s];
124
+ }
125
+ const o = t.argumentCallback ? t.argumentCallback(i) : i;
126
+ return r[o];
127
+ };
128
+ }
129
+ const yt = {
130
+ narrow: ["B", "A"],
131
+ abbreviated: ["BC", "AD"],
132
+ wide: ["Before Christ", "Anno Domini"]
133
+ }, xt = {
134
+ narrow: ["1", "2", "3", "4"],
135
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
136
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
137
+ }, Dt = {
138
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
139
+ abbreviated: [
140
+ "Jan",
141
+ "Feb",
142
+ "Mar",
143
+ "Apr",
144
+ "May",
145
+ "Jun",
146
+ "Jul",
147
+ "Aug",
148
+ "Sep",
149
+ "Oct",
150
+ "Nov",
151
+ "Dec"
152
+ ],
153
+ wide: [
154
+ "January",
155
+ "February",
156
+ "March",
157
+ "April",
158
+ "May",
159
+ "June",
160
+ "July",
161
+ "August",
162
+ "September",
163
+ "October",
164
+ "November",
165
+ "December"
166
+ ]
167
+ }, vt = {
168
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
169
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
170
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
171
+ wide: [
172
+ "Sunday",
173
+ "Monday",
174
+ "Tuesday",
175
+ "Wednesday",
176
+ "Thursday",
177
+ "Friday",
178
+ "Saturday"
179
+ ]
180
+ }, Pt = {
181
+ narrow: {
182
+ am: "a",
183
+ pm: "p",
184
+ midnight: "mi",
185
+ noon: "n",
186
+ morning: "morning",
187
+ afternoon: "afternoon",
188
+ evening: "evening",
189
+ night: "night"
190
+ },
191
+ abbreviated: {
192
+ am: "AM",
193
+ pm: "PM",
194
+ midnight: "midnight",
195
+ noon: "noon",
196
+ morning: "morning",
197
+ afternoon: "afternoon",
198
+ evening: "evening",
199
+ night: "night"
200
+ },
201
+ wide: {
202
+ am: "a.m.",
203
+ pm: "p.m.",
204
+ midnight: "midnight",
205
+ noon: "noon",
206
+ morning: "morning",
207
+ afternoon: "afternoon",
208
+ evening: "evening",
209
+ night: "night"
210
+ }
211
+ }, Tt = {
212
+ narrow: {
213
+ am: "a",
214
+ pm: "p",
215
+ midnight: "mi",
216
+ noon: "n",
217
+ morning: "in the morning",
218
+ afternoon: "in the afternoon",
219
+ evening: "in the evening",
220
+ night: "at night"
221
+ },
222
+ abbreviated: {
223
+ am: "AM",
224
+ pm: "PM",
225
+ midnight: "midnight",
226
+ noon: "noon",
227
+ morning: "in the morning",
228
+ afternoon: "in the afternoon",
229
+ evening: "in the evening",
230
+ night: "at night"
231
+ },
232
+ wide: {
233
+ am: "a.m.",
234
+ pm: "p.m.",
235
+ midnight: "midnight",
236
+ noon: "noon",
237
+ morning: "in the morning",
238
+ afternoon: "in the afternoon",
239
+ evening: "in the evening",
240
+ night: "at night"
241
+ }
242
+ }, Rt = (t, i) => {
243
+ const e = Number(t), n = e % 100;
244
+ if (n > 20 || n < 10)
245
+ switch (n % 10) {
246
+ case 1:
247
+ return e + "st";
248
+ case 2:
249
+ return e + "nd";
250
+ case 3:
251
+ return e + "rd";
252
+ }
253
+ return e + "th";
254
+ }, Mt = {
255
+ ordinalNumber: Rt,
256
+ era: M({
257
+ values: yt,
258
+ defaultWidth: "wide"
259
+ }),
260
+ quarter: M({
261
+ values: xt,
262
+ defaultWidth: "wide",
263
+ argumentCallback: (t) => t - 1
264
+ }),
265
+ month: M({
266
+ values: Dt,
267
+ defaultWidth: "wide"
268
+ }),
269
+ day: M({
270
+ values: vt,
271
+ defaultWidth: "wide"
272
+ }),
273
+ dayPeriod: M({
274
+ values: Pt,
275
+ defaultWidth: "wide",
276
+ formattingValues: Tt,
277
+ defaultFormattingWidth: "wide"
278
+ })
279
+ };
280
+ function C(t) {
281
+ return (i, e = {}) => {
282
+ const n = e.width, r = n && t.matchPatterns[n] || t.matchPatterns[t.defaultMatchWidth], o = i.match(r);
283
+ if (!o)
284
+ return null;
285
+ const s = o[0], u = n && t.parsePatterns[n] || t.parsePatterns[t.defaultParseWidth], l = Array.isArray(u) ? kt(u, (P) => P.test(s)) : (
286
+ // [TODO] -- I challenge you to fix the type
287
+ Ct(u, (P) => P.test(s))
288
+ );
289
+ let m;
290
+ m = t.valueCallback ? t.valueCallback(l) : l, m = e.valueCallback ? (
291
+ // [TODO] -- I challenge you to fix the type
292
+ e.valueCallback(m)
293
+ ) : m;
294
+ const h = i.slice(s.length);
295
+ return { value: m, rest: h };
296
+ };
297
+ }
298
+ function Ct(t, i) {
299
+ for (const e in t)
300
+ if (Object.prototype.hasOwnProperty.call(t, e) && i(t[e]))
301
+ return e;
302
+ }
303
+ function kt(t, i) {
304
+ for (let e = 0; e < t.length; e++)
305
+ if (i(t[e]))
306
+ return e;
307
+ }
308
+ function Te(t) {
309
+ return (i, e = {}) => {
310
+ const n = i.match(t.matchPattern);
311
+ if (!n) return null;
312
+ const r = n[0], o = i.match(t.parsePattern);
313
+ if (!o) return null;
314
+ let s = t.valueCallback ? t.valueCallback(o[0]) : o[0];
315
+ s = e.valueCallback ? e.valueCallback(s) : s;
316
+ const u = i.slice(r.length);
317
+ return { value: s, rest: u };
318
+ };
319
+ }
320
+ const Ot = /^(\d+)(th|st|nd|rd)?/i, At = /\d+/i, Lt = {
321
+ narrow: /^(b|a)/i,
322
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
323
+ wide: /^(before christ|before common era|anno domini|common era)/i
324
+ }, Et = {
325
+ any: [/^b/i, /^(a|c)/i]
326
+ }, jt = {
327
+ narrow: /^[1234]/i,
328
+ abbreviated: /^q[1234]/i,
329
+ wide: /^[1234](th|st|nd|rd)? quarter/i
330
+ }, It = {
331
+ any: [/1/i, /2/i, /3/i, /4/i]
332
+ }, St = {
333
+ narrow: /^[jfmasond]/i,
334
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
335
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
336
+ }, Yt = {
337
+ narrow: [
338
+ /^j/i,
339
+ /^f/i,
340
+ /^m/i,
341
+ /^a/i,
342
+ /^m/i,
343
+ /^j/i,
344
+ /^j/i,
345
+ /^a/i,
346
+ /^s/i,
347
+ /^o/i,
348
+ /^n/i,
349
+ /^d/i
350
+ ],
351
+ any: [
352
+ /^ja/i,
353
+ /^f/i,
354
+ /^mar/i,
355
+ /^ap/i,
356
+ /^may/i,
357
+ /^jun/i,
358
+ /^jul/i,
359
+ /^au/i,
360
+ /^s/i,
361
+ /^o/i,
362
+ /^n/i,
363
+ /^d/i
364
+ ]
365
+ }, qt = {
366
+ narrow: /^[smtwf]/i,
367
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
368
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
369
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
370
+ }, Nt = {
371
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
372
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
373
+ }, Ft = {
374
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
375
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
376
+ }, Wt = {
377
+ any: {
378
+ am: /^a/i,
379
+ pm: /^p/i,
380
+ midnight: /^mi/i,
381
+ noon: /^no/i,
382
+ morning: /morning/i,
383
+ afternoon: /afternoon/i,
384
+ evening: /evening/i,
385
+ night: /night/i
386
+ }
387
+ }, _t = {
388
+ ordinalNumber: Te({
389
+ matchPattern: Ot,
390
+ parsePattern: At,
391
+ valueCallback: (t) => parseInt(t, 10)
392
+ }),
393
+ era: C({
394
+ matchPatterns: Lt,
395
+ defaultMatchWidth: "wide",
396
+ parsePatterns: Et,
397
+ defaultParseWidth: "any"
398
+ }),
399
+ quarter: C({
400
+ matchPatterns: jt,
401
+ defaultMatchWidth: "wide",
402
+ parsePatterns: It,
403
+ defaultParseWidth: "any",
404
+ valueCallback: (t) => t + 1
405
+ }),
406
+ month: C({
407
+ matchPatterns: St,
408
+ defaultMatchWidth: "wide",
409
+ parsePatterns: Yt,
410
+ defaultParseWidth: "any"
411
+ }),
412
+ day: C({
413
+ matchPatterns: qt,
414
+ defaultMatchWidth: "wide",
415
+ parsePatterns: Nt,
416
+ defaultParseWidth: "any"
417
+ }),
418
+ dayPeriod: C({
419
+ matchPatterns: Ft,
420
+ defaultMatchWidth: "any",
421
+ parsePatterns: Wt,
422
+ defaultParseWidth: "any"
423
+ })
424
+ }, Re = {
425
+ code: "en-US",
426
+ formatDistance: mt,
427
+ formatLong: gt,
428
+ formatRelative: bt,
429
+ localize: Mt,
430
+ match: _t,
431
+ options: {
432
+ weekStartsOn: 0,
433
+ firstWeekContainsDate: 1
434
+ }
435
+ };
436
+ let Ht = {};
437
+ function W() {
438
+ return Ht;
439
+ }
440
+ const Me = 6048e5, $t = 864e5, te = 6e4, ne = 36e5, Qt = 1e3, fe = /* @__PURE__ */ Symbol.for("constructDateFrom");
441
+ function T(t, i) {
442
+ return typeof t == "function" ? t(i) : t && typeof t == "object" && fe in t ? t[fe](i) : t instanceof Date ? new t.constructor(i) : new Date(i);
443
+ }
444
+ function y(t, i) {
445
+ return T(i || t, t);
446
+ }
447
+ function G(t) {
448
+ const i = y(t), e = new Date(
449
+ Date.UTC(
450
+ i.getFullYear(),
451
+ i.getMonth(),
452
+ i.getDate(),
453
+ i.getHours(),
454
+ i.getMinutes(),
455
+ i.getSeconds(),
456
+ i.getMilliseconds()
457
+ )
458
+ );
459
+ return e.setUTCFullYear(i.getFullYear()), +t - +e;
460
+ }
461
+ function Jt(t, ...i) {
462
+ const e = T.bind(
463
+ null,
464
+ i.find((n) => typeof n == "object")
465
+ );
466
+ return i.map(e);
467
+ }
468
+ function pe(t, i) {
469
+ const e = y(t, i?.in);
470
+ return e.setHours(0, 0, 0, 0), e;
471
+ }
472
+ function Gt(t, i, e) {
473
+ const [n, r] = Jt(
474
+ e?.in,
475
+ t,
476
+ i
477
+ ), o = pe(n), s = pe(r), u = +o - G(o), l = +s - G(s);
478
+ return Math.round((u - l) / $t);
479
+ }
480
+ function Xt(t, i) {
481
+ const e = y(t, i?.in);
482
+ return e.setFullYear(e.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
483
+ }
484
+ function Bt(t, i) {
485
+ const e = y(t, i?.in);
486
+ return Gt(e, Xt(e)) + 1;
487
+ }
488
+ function L(t, i) {
489
+ const e = W(), n = i?.weekStartsOn ?? i?.locale?.options?.weekStartsOn ?? e.weekStartsOn ?? e.locale?.options?.weekStartsOn ?? 0, r = y(t, i?.in), o = r.getDay(), s = (o < n ? 7 : 0) + o - n;
490
+ return r.setDate(r.getDate() - s), r.setHours(0, 0, 0, 0), r;
491
+ }
492
+ function N(t, i) {
493
+ return L(t, { ...i, weekStartsOn: 1 });
494
+ }
495
+ function Ce(t, i) {
496
+ const e = y(t, i?.in), n = e.getFullYear(), r = T(e, 0);
497
+ r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
498
+ const o = N(r), s = T(e, 0);
499
+ s.setFullYear(n, 0, 4), s.setHours(0, 0, 0, 0);
500
+ const u = N(s);
501
+ return e.getTime() >= o.getTime() ? n + 1 : e.getTime() >= u.getTime() ? n : n - 1;
502
+ }
503
+ function Vt(t, i) {
504
+ const e = Ce(t, i), n = T(t, 0);
505
+ return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), N(n);
506
+ }
507
+ function ke(t, i) {
508
+ const e = y(t, i?.in), n = +N(e) - +Vt(e);
509
+ return Math.round(n / Me) + 1;
510
+ }
511
+ function ie(t, i) {
512
+ const e = y(t, i?.in), n = e.getFullYear(), r = W(), o = i?.firstWeekContainsDate ?? i?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = T(i?.in || t, 0);
513
+ s.setFullYear(n + 1, 0, o), s.setHours(0, 0, 0, 0);
514
+ const u = L(s, i), l = T(i?.in || t, 0);
515
+ l.setFullYear(n, 0, o), l.setHours(0, 0, 0, 0);
516
+ const m = L(l, i);
517
+ return +e >= +u ? n + 1 : +e >= +m ? n : n - 1;
518
+ }
519
+ function zt(t, i) {
520
+ const e = W(), n = i?.firstWeekContainsDate ?? i?.locale?.options?.firstWeekContainsDate ?? e.firstWeekContainsDate ?? e.locale?.options?.firstWeekContainsDate ?? 1, r = ie(t, i), o = T(i?.in || t, 0);
521
+ return o.setFullYear(r, 0, n), o.setHours(0, 0, 0, 0), L(o, i);
522
+ }
523
+ function Oe(t, i) {
524
+ const e = y(t, i?.in), n = +L(e, i) - +zt(e, i);
525
+ return Math.round(n / Me) + 1;
526
+ }
527
+ function p(t, i) {
528
+ const e = t < 0 ? "-" : "", n = Math.abs(t).toString().padStart(i, "0");
529
+ return e + n;
530
+ }
531
+ const A = {
532
+ // Year
533
+ y(t, i) {
534
+ const e = t.getFullYear(), n = e > 0 ? e : 1 - e;
535
+ return p(i === "yy" ? n % 100 : n, i.length);
536
+ },
537
+ // Month
538
+ M(t, i) {
539
+ const e = t.getMonth();
540
+ return i === "M" ? String(e + 1) : p(e + 1, 2);
541
+ },
542
+ // Day of the month
543
+ d(t, i) {
544
+ return p(t.getDate(), i.length);
545
+ },
546
+ // AM or PM
547
+ a(t, i) {
548
+ const e = t.getHours() / 12 >= 1 ? "pm" : "am";
549
+ switch (i) {
550
+ case "a":
551
+ case "aa":
552
+ return e.toUpperCase();
553
+ case "aaa":
554
+ return e;
555
+ case "aaaaa":
556
+ return e[0];
557
+ default:
558
+ return e === "am" ? "a.m." : "p.m.";
559
+ }
560
+ },
561
+ // Hour [1-12]
562
+ h(t, i) {
563
+ return p(t.getHours() % 12 || 12, i.length);
564
+ },
565
+ // Hour [0-23]
566
+ H(t, i) {
567
+ return p(t.getHours(), i.length);
568
+ },
569
+ // Minute
570
+ m(t, i) {
571
+ return p(t.getMinutes(), i.length);
572
+ },
573
+ // Second
574
+ s(t, i) {
575
+ return p(t.getSeconds(), i.length);
576
+ },
577
+ // Fraction of second
578
+ S(t, i) {
579
+ const e = i.length, n = t.getMilliseconds(), r = Math.trunc(
580
+ n * Math.pow(10, e - 3)
581
+ );
582
+ return p(r, i.length);
583
+ }
584
+ }, Y = {
585
+ midnight: "midnight",
586
+ noon: "noon",
587
+ morning: "morning",
588
+ afternoon: "afternoon",
589
+ evening: "evening",
590
+ night: "night"
591
+ }, he = {
592
+ // Era
593
+ G: function(t, i, e) {
594
+ const n = t.getFullYear() > 0 ? 1 : 0;
595
+ switch (i) {
596
+ // AD, BC
597
+ case "G":
598
+ case "GG":
599
+ case "GGG":
600
+ return e.era(n, { width: "abbreviated" });
601
+ // A, B
602
+ case "GGGGG":
603
+ return e.era(n, { width: "narrow" });
604
+ default:
605
+ return e.era(n, { width: "wide" });
606
+ }
607
+ },
608
+ // Year
609
+ y: function(t, i, e) {
610
+ if (i === "yo") {
611
+ const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
612
+ return e.ordinalNumber(r, { unit: "year" });
613
+ }
614
+ return A.y(t, i);
615
+ },
616
+ // Local week-numbering year
617
+ Y: function(t, i, e, n) {
618
+ const r = ie(t, n), o = r > 0 ? r : 1 - r;
619
+ if (i === "YY") {
620
+ const s = o % 100;
621
+ return p(s, 2);
622
+ }
623
+ return i === "Yo" ? e.ordinalNumber(o, { unit: "year" }) : p(o, i.length);
624
+ },
625
+ // ISO week-numbering year
626
+ R: function(t, i) {
627
+ const e = Ce(t);
628
+ return p(e, i.length);
629
+ },
630
+ // Extended year. This is a single number designating the year of this calendar system.
631
+ // The main difference between `y` and `u` localizers are B.C. years:
632
+ // | Year | `y` | `u` |
633
+ // |------|-----|-----|
634
+ // | AC 1 | 1 | 1 |
635
+ // | BC 1 | 1 | 0 |
636
+ // | BC 2 | 2 | -1 |
637
+ // Also `yy` always returns the last two digits of a year,
638
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
639
+ u: function(t, i) {
640
+ const e = t.getFullYear();
641
+ return p(e, i.length);
642
+ },
643
+ // Quarter
644
+ Q: function(t, i, e) {
645
+ const n = Math.ceil((t.getMonth() + 1) / 3);
646
+ switch (i) {
647
+ // 1, 2, 3, 4
648
+ case "Q":
649
+ return String(n);
650
+ // 01, 02, 03, 04
651
+ case "QQ":
652
+ return p(n, 2);
653
+ // 1st, 2nd, 3rd, 4th
654
+ case "Qo":
655
+ return e.ordinalNumber(n, { unit: "quarter" });
656
+ // Q1, Q2, Q3, Q4
657
+ case "QQQ":
658
+ return e.quarter(n, {
659
+ width: "abbreviated",
660
+ context: "formatting"
661
+ });
662
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
663
+ case "QQQQQ":
664
+ return e.quarter(n, {
665
+ width: "narrow",
666
+ context: "formatting"
667
+ });
668
+ default:
669
+ return e.quarter(n, {
670
+ width: "wide",
671
+ context: "formatting"
672
+ });
673
+ }
674
+ },
675
+ // Stand-alone quarter
676
+ q: function(t, i, e) {
677
+ const n = Math.ceil((t.getMonth() + 1) / 3);
678
+ switch (i) {
679
+ // 1, 2, 3, 4
680
+ case "q":
681
+ return String(n);
682
+ // 01, 02, 03, 04
683
+ case "qq":
684
+ return p(n, 2);
685
+ // 1st, 2nd, 3rd, 4th
686
+ case "qo":
687
+ return e.ordinalNumber(n, { unit: "quarter" });
688
+ // Q1, Q2, Q3, Q4
689
+ case "qqq":
690
+ return e.quarter(n, {
691
+ width: "abbreviated",
692
+ context: "standalone"
693
+ });
694
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
695
+ case "qqqqq":
696
+ return e.quarter(n, {
697
+ width: "narrow",
698
+ context: "standalone"
699
+ });
700
+ default:
701
+ return e.quarter(n, {
702
+ width: "wide",
703
+ context: "standalone"
704
+ });
705
+ }
706
+ },
707
+ // Month
708
+ M: function(t, i, e) {
709
+ const n = t.getMonth();
710
+ switch (i) {
711
+ case "M":
712
+ case "MM":
713
+ return A.M(t, i);
714
+ // 1st, 2nd, ..., 12th
715
+ case "Mo":
716
+ return e.ordinalNumber(n + 1, { unit: "month" });
717
+ // Jan, Feb, ..., Dec
718
+ case "MMM":
719
+ return e.month(n, {
720
+ width: "abbreviated",
721
+ context: "formatting"
722
+ });
723
+ // J, F, ..., D
724
+ case "MMMMM":
725
+ return e.month(n, {
726
+ width: "narrow",
727
+ context: "formatting"
728
+ });
729
+ default:
730
+ return e.month(n, { width: "wide", context: "formatting" });
731
+ }
732
+ },
733
+ // Stand-alone month
734
+ L: function(t, i, e) {
735
+ const n = t.getMonth();
736
+ switch (i) {
737
+ // 1, 2, ..., 12
738
+ case "L":
739
+ return String(n + 1);
740
+ // 01, 02, ..., 12
741
+ case "LL":
742
+ return p(n + 1, 2);
743
+ // 1st, 2nd, ..., 12th
744
+ case "Lo":
745
+ return e.ordinalNumber(n + 1, { unit: "month" });
746
+ // Jan, Feb, ..., Dec
747
+ case "LLL":
748
+ return e.month(n, {
749
+ width: "abbreviated",
750
+ context: "standalone"
751
+ });
752
+ // J, F, ..., D
753
+ case "LLLLL":
754
+ return e.month(n, {
755
+ width: "narrow",
756
+ context: "standalone"
757
+ });
758
+ default:
759
+ return e.month(n, { width: "wide", context: "standalone" });
760
+ }
761
+ },
762
+ // Local week of year
763
+ w: function(t, i, e, n) {
764
+ const r = Oe(t, n);
765
+ return i === "wo" ? e.ordinalNumber(r, { unit: "week" }) : p(r, i.length);
766
+ },
767
+ // ISO week of year
768
+ I: function(t, i, e) {
769
+ const n = ke(t);
770
+ return i === "Io" ? e.ordinalNumber(n, { unit: "week" }) : p(n, i.length);
771
+ },
772
+ // Day of the month
773
+ d: function(t, i, e) {
774
+ return i === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) : A.d(t, i);
775
+ },
776
+ // Day of year
777
+ D: function(t, i, e) {
778
+ const n = Bt(t);
779
+ return i === "Do" ? e.ordinalNumber(n, { unit: "dayOfYear" }) : p(n, i.length);
780
+ },
781
+ // Day of week
782
+ E: function(t, i, e) {
783
+ const n = t.getDay();
784
+ switch (i) {
785
+ // Tue
786
+ case "E":
787
+ case "EE":
788
+ case "EEE":
789
+ return e.day(n, {
790
+ width: "abbreviated",
791
+ context: "formatting"
792
+ });
793
+ // T
794
+ case "EEEEE":
795
+ return e.day(n, {
796
+ width: "narrow",
797
+ context: "formatting"
798
+ });
799
+ // Tu
800
+ case "EEEEEE":
801
+ return e.day(n, {
802
+ width: "short",
803
+ context: "formatting"
804
+ });
805
+ default:
806
+ return e.day(n, {
807
+ width: "wide",
808
+ context: "formatting"
809
+ });
810
+ }
811
+ },
812
+ // Local day of week
813
+ e: function(t, i, e, n) {
814
+ const r = t.getDay(), o = (r - n.weekStartsOn + 8) % 7 || 7;
815
+ switch (i) {
816
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
817
+ case "e":
818
+ return String(o);
819
+ // Padded numerical value
820
+ case "ee":
821
+ return p(o, 2);
822
+ // 1st, 2nd, ..., 7th
823
+ case "eo":
824
+ return e.ordinalNumber(o, { unit: "day" });
825
+ case "eee":
826
+ return e.day(r, {
827
+ width: "abbreviated",
828
+ context: "formatting"
829
+ });
830
+ // T
831
+ case "eeeee":
832
+ return e.day(r, {
833
+ width: "narrow",
834
+ context: "formatting"
835
+ });
836
+ // Tu
837
+ case "eeeeee":
838
+ return e.day(r, {
839
+ width: "short",
840
+ context: "formatting"
841
+ });
842
+ default:
843
+ return e.day(r, {
844
+ width: "wide",
845
+ context: "formatting"
846
+ });
847
+ }
848
+ },
849
+ // Stand-alone local day of week
850
+ c: function(t, i, e, n) {
851
+ const r = t.getDay(), o = (r - n.weekStartsOn + 8) % 7 || 7;
852
+ switch (i) {
853
+ // Numerical value (same as in `e`)
854
+ case "c":
855
+ return String(o);
856
+ // Padded numerical value
857
+ case "cc":
858
+ return p(o, i.length);
859
+ // 1st, 2nd, ..., 7th
860
+ case "co":
861
+ return e.ordinalNumber(o, { unit: "day" });
862
+ case "ccc":
863
+ return e.day(r, {
864
+ width: "abbreviated",
865
+ context: "standalone"
866
+ });
867
+ // T
868
+ case "ccccc":
869
+ return e.day(r, {
870
+ width: "narrow",
871
+ context: "standalone"
872
+ });
873
+ // Tu
874
+ case "cccccc":
875
+ return e.day(r, {
876
+ width: "short",
877
+ context: "standalone"
878
+ });
879
+ default:
880
+ return e.day(r, {
881
+ width: "wide",
882
+ context: "standalone"
883
+ });
884
+ }
885
+ },
886
+ // ISO day of week
887
+ i: function(t, i, e) {
888
+ const n = t.getDay(), r = n === 0 ? 7 : n;
889
+ switch (i) {
890
+ // 2
891
+ case "i":
892
+ return String(r);
893
+ // 02
894
+ case "ii":
895
+ return p(r, i.length);
896
+ // 2nd
897
+ case "io":
898
+ return e.ordinalNumber(r, { unit: "day" });
899
+ // Tue
900
+ case "iii":
901
+ return e.day(n, {
902
+ width: "abbreviated",
903
+ context: "formatting"
904
+ });
905
+ // T
906
+ case "iiiii":
907
+ return e.day(n, {
908
+ width: "narrow",
909
+ context: "formatting"
910
+ });
911
+ // Tu
912
+ case "iiiiii":
913
+ return e.day(n, {
914
+ width: "short",
915
+ context: "formatting"
916
+ });
917
+ default:
918
+ return e.day(n, {
919
+ width: "wide",
920
+ context: "formatting"
921
+ });
922
+ }
923
+ },
924
+ // AM or PM
925
+ a: function(t, i, e) {
926
+ const r = t.getHours() / 12 >= 1 ? "pm" : "am";
927
+ switch (i) {
928
+ case "a":
929
+ case "aa":
930
+ return e.dayPeriod(r, {
931
+ width: "abbreviated",
932
+ context: "formatting"
933
+ });
934
+ case "aaa":
935
+ return e.dayPeriod(r, {
936
+ width: "abbreviated",
937
+ context: "formatting"
938
+ }).toLowerCase();
939
+ case "aaaaa":
940
+ return e.dayPeriod(r, {
941
+ width: "narrow",
942
+ context: "formatting"
943
+ });
944
+ default:
945
+ return e.dayPeriod(r, {
946
+ width: "wide",
947
+ context: "formatting"
948
+ });
949
+ }
950
+ },
951
+ // AM, PM, midnight, noon
952
+ b: function(t, i, e) {
953
+ const n = t.getHours();
954
+ let r;
955
+ switch (n === 12 ? r = Y.noon : n === 0 ? r = Y.midnight : r = n / 12 >= 1 ? "pm" : "am", i) {
956
+ case "b":
957
+ case "bb":
958
+ return e.dayPeriod(r, {
959
+ width: "abbreviated",
960
+ context: "formatting"
961
+ });
962
+ case "bbb":
963
+ return e.dayPeriod(r, {
964
+ width: "abbreviated",
965
+ context: "formatting"
966
+ }).toLowerCase();
967
+ case "bbbbb":
968
+ return e.dayPeriod(r, {
969
+ width: "narrow",
970
+ context: "formatting"
971
+ });
972
+ default:
973
+ return e.dayPeriod(r, {
974
+ width: "wide",
975
+ context: "formatting"
976
+ });
977
+ }
978
+ },
979
+ // in the morning, in the afternoon, in the evening, at night
980
+ B: function(t, i, e) {
981
+ const n = t.getHours();
982
+ let r;
983
+ switch (n >= 17 ? r = Y.evening : n >= 12 ? r = Y.afternoon : n >= 4 ? r = Y.morning : r = Y.night, i) {
984
+ case "B":
985
+ case "BB":
986
+ case "BBB":
987
+ return e.dayPeriod(r, {
988
+ width: "abbreviated",
989
+ context: "formatting"
990
+ });
991
+ case "BBBBB":
992
+ return e.dayPeriod(r, {
993
+ width: "narrow",
994
+ context: "formatting"
995
+ });
996
+ default:
997
+ return e.dayPeriod(r, {
998
+ width: "wide",
999
+ context: "formatting"
1000
+ });
1001
+ }
1002
+ },
1003
+ // Hour [1-12]
1004
+ h: function(t, i, e) {
1005
+ if (i === "ho") {
1006
+ let n = t.getHours() % 12;
1007
+ return n === 0 && (n = 12), e.ordinalNumber(n, { unit: "hour" });
1008
+ }
1009
+ return A.h(t, i);
1010
+ },
1011
+ // Hour [0-23]
1012
+ H: function(t, i, e) {
1013
+ return i === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) : A.H(t, i);
1014
+ },
1015
+ // Hour [0-11]
1016
+ K: function(t, i, e) {
1017
+ const n = t.getHours() % 12;
1018
+ return i === "Ko" ? e.ordinalNumber(n, { unit: "hour" }) : p(n, i.length);
1019
+ },
1020
+ // Hour [1-24]
1021
+ k: function(t, i, e) {
1022
+ let n = t.getHours();
1023
+ return n === 0 && (n = 24), i === "ko" ? e.ordinalNumber(n, { unit: "hour" }) : p(n, i.length);
1024
+ },
1025
+ // Minute
1026
+ m: function(t, i, e) {
1027
+ return i === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) : A.m(t, i);
1028
+ },
1029
+ // Second
1030
+ s: function(t, i, e) {
1031
+ return i === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) : A.s(t, i);
1032
+ },
1033
+ // Fraction of second
1034
+ S: function(t, i) {
1035
+ return A.S(t, i);
1036
+ },
1037
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1038
+ X: function(t, i, e) {
1039
+ const n = t.getTimezoneOffset();
1040
+ if (n === 0)
1041
+ return "Z";
1042
+ switch (i) {
1043
+ // Hours and optional minutes
1044
+ case "X":
1045
+ return we(n);
1046
+ // Hours, minutes and optional seconds without `:` delimiter
1047
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1048
+ // so this token always has the same output as `XX`
1049
+ case "XXXX":
1050
+ case "XX":
1051
+ return j(n);
1052
+ // Hours and minutes with `:` delimiter
1053
+ default:
1054
+ return j(n, ":");
1055
+ }
1056
+ },
1057
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1058
+ x: function(t, i, e) {
1059
+ const n = t.getTimezoneOffset();
1060
+ switch (i) {
1061
+ // Hours and optional minutes
1062
+ case "x":
1063
+ return we(n);
1064
+ // Hours, minutes and optional seconds without `:` delimiter
1065
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1066
+ // so this token always has the same output as `xx`
1067
+ case "xxxx":
1068
+ case "xx":
1069
+ return j(n);
1070
+ // Hours and minutes with `:` delimiter
1071
+ default:
1072
+ return j(n, ":");
1073
+ }
1074
+ },
1075
+ // Timezone (GMT)
1076
+ O: function(t, i, e) {
1077
+ const n = t.getTimezoneOffset();
1078
+ switch (i) {
1079
+ // Short
1080
+ case "O":
1081
+ case "OO":
1082
+ case "OOO":
1083
+ return "GMT" + ge(n, ":");
1084
+ default:
1085
+ return "GMT" + j(n, ":");
1086
+ }
1087
+ },
1088
+ // Timezone (specific non-location)
1089
+ z: function(t, i, e) {
1090
+ const n = t.getTimezoneOffset();
1091
+ switch (i) {
1092
+ // Short
1093
+ case "z":
1094
+ case "zz":
1095
+ case "zzz":
1096
+ return "GMT" + ge(n, ":");
1097
+ default:
1098
+ return "GMT" + j(n, ":");
1099
+ }
1100
+ },
1101
+ // Seconds timestamp
1102
+ t: function(t, i, e) {
1103
+ const n = Math.trunc(+t / 1e3);
1104
+ return p(n, i.length);
1105
+ },
1106
+ // Milliseconds timestamp
1107
+ T: function(t, i, e) {
1108
+ return p(+t, i.length);
1109
+ }
1110
+ };
1111
+ function ge(t, i = "") {
1112
+ const e = t > 0 ? "-" : "+", n = Math.abs(t), r = Math.trunc(n / 60), o = n % 60;
1113
+ return o === 0 ? e + String(r) : e + String(r) + i + p(o, 2);
1114
+ }
1115
+ function we(t, i) {
1116
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + p(Math.abs(t) / 60, 2) : j(t, i);
1117
+ }
1118
+ function j(t, i = "") {
1119
+ const e = t > 0 ? "-" : "+", n = Math.abs(t), r = p(Math.trunc(n / 60), 2), o = p(n % 60, 2);
1120
+ return e + r + i + o;
1121
+ }
1122
+ const be = (t, i) => {
1123
+ switch (t) {
1124
+ case "P":
1125
+ return i.date({ width: "short" });
1126
+ case "PP":
1127
+ return i.date({ width: "medium" });
1128
+ case "PPP":
1129
+ return i.date({ width: "long" });
1130
+ default:
1131
+ return i.date({ width: "full" });
1132
+ }
1133
+ }, Ae = (t, i) => {
1134
+ switch (t) {
1135
+ case "p":
1136
+ return i.time({ width: "short" });
1137
+ case "pp":
1138
+ return i.time({ width: "medium" });
1139
+ case "ppp":
1140
+ return i.time({ width: "long" });
1141
+ default:
1142
+ return i.time({ width: "full" });
1143
+ }
1144
+ }, Ut = (t, i) => {
1145
+ const e = t.match(/(P+)(p+)?/) || [], n = e[1], r = e[2];
1146
+ if (!r)
1147
+ return be(t, i);
1148
+ let o;
1149
+ switch (n) {
1150
+ case "P":
1151
+ o = i.dateTime({ width: "short" });
1152
+ break;
1153
+ case "PP":
1154
+ o = i.dateTime({ width: "medium" });
1155
+ break;
1156
+ case "PPP":
1157
+ o = i.dateTime({ width: "long" });
1158
+ break;
1159
+ default:
1160
+ o = i.dateTime({ width: "full" });
1161
+ break;
1162
+ }
1163
+ return o.replace("{{date}}", be(n, i)).replace("{{time}}", Ae(r, i));
1164
+ }, Z = {
1165
+ p: Ae,
1166
+ P: Ut
1167
+ }, Zt = /^D+$/, Kt = /^Y+$/, en = ["D", "DD", "YY", "YYYY"];
1168
+ function Le(t) {
1169
+ return Zt.test(t);
1170
+ }
1171
+ function Ee(t) {
1172
+ return Kt.test(t);
1173
+ }
1174
+ function K(t, i, e) {
1175
+ const n = tn(t, i, e);
1176
+ if (console.warn(n), en.includes(t)) throw new RangeError(n);
1177
+ }
1178
+ function tn(t, i, e) {
1179
+ const n = t[0] === "Y" ? "years" : "days of the month";
1180
+ return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${i}\`) for formatting ${n} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1181
+ }
1182
+ function nn(t) {
1183
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
1184
+ }
1185
+ function rn(t) {
1186
+ return !(!nn(t) && typeof t != "number" || isNaN(+y(t)));
1187
+ }
1188
+ const an = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, on = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, sn = /^'([^]*?)'?$/, cn = /''/g, un = /[a-zA-Z]/;
1189
+ function re(t, i, e) {
1190
+ const n = W(), r = e?.locale ?? n.locale ?? Re, o = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, s = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, u = y(t, e?.in);
1191
+ if (!rn(u))
1192
+ throw new RangeError("Invalid time value");
1193
+ let l = i.match(on).map((h) => {
1194
+ const P = h[0];
1195
+ if (P === "p" || P === "P") {
1196
+ const E = Z[P];
1197
+ return E(h, r.formatLong);
1198
+ }
1199
+ return h;
1200
+ }).join("").match(an).map((h) => {
1201
+ if (h === "''")
1202
+ return { isToken: !1, value: "'" };
1203
+ const P = h[0];
1204
+ if (P === "'")
1205
+ return { isToken: !1, value: dn(h) };
1206
+ if (he[P])
1207
+ return { isToken: !0, value: h };
1208
+ if (P.match(un))
1209
+ throw new RangeError(
1210
+ "Format string contains an unescaped latin alphabet character `" + P + "`"
1211
+ );
1212
+ return { isToken: !1, value: h };
1213
+ });
1214
+ r.localize.preprocessor && (l = r.localize.preprocessor(u, l));
1215
+ const m = {
1216
+ firstWeekContainsDate: o,
1217
+ weekStartsOn: s,
1218
+ locale: r
1219
+ };
1220
+ return l.map((h) => {
1221
+ if (!h.isToken) return h.value;
1222
+ const P = h.value;
1223
+ (!e?.useAdditionalWeekYearTokens && Ee(P) || !e?.useAdditionalDayOfYearTokens && Le(P)) && K(P, i, String(t));
1224
+ const E = he[P[0]];
1225
+ return E(u, P, r.localize, m);
1226
+ }).join("");
1227
+ }
1228
+ function dn(t) {
1229
+ const i = t.match(sn);
1230
+ return i ? i[1].replace(cn, "'") : t;
1231
+ }
1232
+ const ln = {
1233
+ lessThanXSeconds: {
1234
+ one: "moins d’une seconde",
1235
+ other: "moins de {{count}} secondes"
1236
+ },
1237
+ xSeconds: {
1238
+ one: "1 seconde",
1239
+ other: "{{count}} secondes"
1240
+ },
1241
+ halfAMinute: "30 secondes",
1242
+ lessThanXMinutes: {
1243
+ one: "moins d’une minute",
1244
+ other: "moins de {{count}} minutes"
1245
+ },
1246
+ xMinutes: {
1247
+ one: "1 minute",
1248
+ other: "{{count}} minutes"
1249
+ },
1250
+ aboutXHours: {
1251
+ one: "environ 1 heure",
1252
+ other: "environ {{count}} heures"
1253
+ },
1254
+ xHours: {
1255
+ one: "1 heure",
1256
+ other: "{{count}} heures"
1257
+ },
1258
+ xDays: {
1259
+ one: "1 jour",
1260
+ other: "{{count}} jours"
1261
+ },
1262
+ aboutXWeeks: {
1263
+ one: "environ 1 semaine",
1264
+ other: "environ {{count}} semaines"
1265
+ },
1266
+ xWeeks: {
1267
+ one: "1 semaine",
1268
+ other: "{{count}} semaines"
1269
+ },
1270
+ aboutXMonths: {
1271
+ one: "environ 1 mois",
1272
+ other: "environ {{count}} mois"
1273
+ },
1274
+ xMonths: {
1275
+ one: "1 mois",
1276
+ other: "{{count}} mois"
1277
+ },
1278
+ aboutXYears: {
1279
+ one: "environ 1 an",
1280
+ other: "environ {{count}} ans"
1281
+ },
1282
+ xYears: {
1283
+ one: "1 an",
1284
+ other: "{{count}} ans"
1285
+ },
1286
+ overXYears: {
1287
+ one: "plus d’un an",
1288
+ other: "plus de {{count}} ans"
1289
+ },
1290
+ almostXYears: {
1291
+ one: "presqu’un an",
1292
+ other: "presque {{count}} ans"
1293
+ }
1294
+ }, mn = (t, i, e) => {
1295
+ let n;
1296
+ const r = ln[t];
1297
+ return typeof r == "string" ? n = r : i === 1 ? n = r.one : n = r.other.replace("{{count}}", String(i)), e?.addSuffix ? e.comparison && e.comparison > 0 ? "dans " + n : "il y a " + n : n;
1298
+ }, fn = {
1299
+ full: "EEEE d MMMM y",
1300
+ long: "d MMMM y",
1301
+ medium: "d MMM y",
1302
+ short: "dd/MM/y"
1303
+ }, pn = {
1304
+ full: "HH:mm:ss zzzz",
1305
+ long: "HH:mm:ss z",
1306
+ medium: "HH:mm:ss",
1307
+ short: "HH:mm"
1308
+ }, hn = {
1309
+ full: "{{date}} 'à' {{time}}",
1310
+ long: "{{date}} 'à' {{time}}",
1311
+ medium: "{{date}}, {{time}}",
1312
+ short: "{{date}}, {{time}}"
1313
+ }, gn = {
1314
+ date: q({
1315
+ formats: fn,
1316
+ defaultWidth: "full"
1317
+ }),
1318
+ time: q({
1319
+ formats: pn,
1320
+ defaultWidth: "full"
1321
+ }),
1322
+ dateTime: q({
1323
+ formats: hn,
1324
+ defaultWidth: "full"
1325
+ })
1326
+ }, wn = {
1327
+ lastWeek: "eeee 'dernier à' p",
1328
+ yesterday: "'hier à' p",
1329
+ today: "'aujourd’hui à' p",
1330
+ tomorrow: "'demain à' p'",
1331
+ nextWeek: "eeee 'prochain à' p",
1332
+ other: "P"
1333
+ }, bn = (t, i, e, n) => wn[t], yn = {
1334
+ narrow: ["av. J.-C", "ap. J.-C"],
1335
+ abbreviated: ["av. J.-C", "ap. J.-C"],
1336
+ wide: ["avant Jésus-Christ", "après Jésus-Christ"]
1337
+ }, xn = {
1338
+ narrow: ["T1", "T2", "T3", "T4"],
1339
+ abbreviated: ["1er trim.", "2ème trim.", "3ème trim.", "4ème trim."],
1340
+ wide: ["1er trimestre", "2ème trimestre", "3ème trimestre", "4ème trimestre"]
1341
+ }, Dn = {
1342
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1343
+ abbreviated: [
1344
+ "janv.",
1345
+ "févr.",
1346
+ "mars",
1347
+ "avr.",
1348
+ "mai",
1349
+ "juin",
1350
+ "juil.",
1351
+ "août",
1352
+ "sept.",
1353
+ "oct.",
1354
+ "nov.",
1355
+ "déc."
1356
+ ],
1357
+ wide: [
1358
+ "janvier",
1359
+ "février",
1360
+ "mars",
1361
+ "avril",
1362
+ "mai",
1363
+ "juin",
1364
+ "juillet",
1365
+ "août",
1366
+ "septembre",
1367
+ "octobre",
1368
+ "novembre",
1369
+ "décembre"
1370
+ ]
1371
+ }, vn = {
1372
+ narrow: ["D", "L", "M", "M", "J", "V", "S"],
1373
+ short: ["di", "lu", "ma", "me", "je", "ve", "sa"],
1374
+ abbreviated: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
1375
+ wide: [
1376
+ "dimanche",
1377
+ "lundi",
1378
+ "mardi",
1379
+ "mercredi",
1380
+ "jeudi",
1381
+ "vendredi",
1382
+ "samedi"
1383
+ ]
1384
+ }, Pn = {
1385
+ narrow: {
1386
+ am: "AM",
1387
+ pm: "PM",
1388
+ midnight: "minuit",
1389
+ noon: "midi",
1390
+ morning: "mat.",
1391
+ afternoon: "ap.m.",
1392
+ evening: "soir",
1393
+ night: "mat."
1394
+ },
1395
+ abbreviated: {
1396
+ am: "AM",
1397
+ pm: "PM",
1398
+ midnight: "minuit",
1399
+ noon: "midi",
1400
+ morning: "matin",
1401
+ afternoon: "après-midi",
1402
+ evening: "soir",
1403
+ night: "matin"
1404
+ },
1405
+ wide: {
1406
+ am: "AM",
1407
+ pm: "PM",
1408
+ midnight: "minuit",
1409
+ noon: "midi",
1410
+ morning: "du matin",
1411
+ afternoon: "de l’après-midi",
1412
+ evening: "du soir",
1413
+ night: "du matin"
1414
+ }
1415
+ }, Tn = (t, i) => {
1416
+ const e = Number(t), n = i?.unit;
1417
+ if (e === 0) return "0";
1418
+ const r = ["year", "week", "hour", "minute", "second"];
1419
+ let o;
1420
+ return e === 1 ? o = n && r.includes(n) ? "ère" : "er" : o = "ème", e + o;
1421
+ }, Rn = ["MMM", "MMMM"], Mn = {
1422
+ preprocessor: (t, i) => t.getDate() === 1 || !i.some(
1423
+ (n) => n.isToken && Rn.includes(n.value)
1424
+ ) ? i : i.map(
1425
+ (n) => n.isToken && n.value === "do" ? { isToken: !0, value: "d" } : n
1426
+ ),
1427
+ ordinalNumber: Tn,
1428
+ era: M({
1429
+ values: yn,
1430
+ defaultWidth: "wide"
1431
+ }),
1432
+ quarter: M({
1433
+ values: xn,
1434
+ defaultWidth: "wide",
1435
+ argumentCallback: (t) => t - 1
1436
+ }),
1437
+ month: M({
1438
+ values: Dn,
1439
+ defaultWidth: "wide"
1440
+ }),
1441
+ day: M({
1442
+ values: vn,
1443
+ defaultWidth: "wide"
1444
+ }),
1445
+ dayPeriod: M({
1446
+ values: Pn,
1447
+ defaultWidth: "wide"
1448
+ })
1449
+ }, Cn = /^(\d+)(ième|ère|ème|er|e)?/i, kn = /\d+/i, On = {
1450
+ narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
1451
+ abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
1452
+ wide: /^(avant Jésus-Christ|après Jésus-Christ)/i
1453
+ }, An = {
1454
+ any: [/^av/i, /^ap/i]
1455
+ }, Ln = {
1456
+ narrow: /^T?[1234]/i,
1457
+ abbreviated: /^[1234](er|ème|e)? trim\.?/i,
1458
+ wide: /^[1234](er|ème|e)? trimestre/i
1459
+ }, En = {
1460
+ any: [/1/i, /2/i, /3/i, /4/i]
1461
+ }, jn = {
1462
+ narrow: /^[jfmasond]/i,
1463
+ abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
1464
+ wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i
1465
+ }, In = {
1466
+ narrow: [
1467
+ /^j/i,
1468
+ /^f/i,
1469
+ /^m/i,
1470
+ /^a/i,
1471
+ /^m/i,
1472
+ /^j/i,
1473
+ /^j/i,
1474
+ /^a/i,
1475
+ /^s/i,
1476
+ /^o/i,
1477
+ /^n/i,
1478
+ /^d/i
1479
+ ],
1480
+ any: [
1481
+ /^ja/i,
1482
+ /^f/i,
1483
+ /^mar/i,
1484
+ /^av/i,
1485
+ /^ma/i,
1486
+ /^juin/i,
1487
+ /^juil/i,
1488
+ /^ao/i,
1489
+ /^s/i,
1490
+ /^o/i,
1491
+ /^n/i,
1492
+ /^d/i
1493
+ ]
1494
+ }, Sn = {
1495
+ narrow: /^[lmjvsd]/i,
1496
+ short: /^(di|lu|ma|me|je|ve|sa)/i,
1497
+ abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
1498
+ wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
1499
+ }, Yn = {
1500
+ narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
1501
+ any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i]
1502
+ }, qn = {
1503
+ narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
1504
+ any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
1505
+ }, Nn = {
1506
+ any: {
1507
+ am: /^a/i,
1508
+ pm: /^p/i,
1509
+ midnight: /^min/i,
1510
+ noon: /^mid/i,
1511
+ morning: /mat/i,
1512
+ afternoon: /ap/i,
1513
+ evening: /soir/i,
1514
+ night: /nuit/i
1515
+ }
1516
+ }, Fn = {
1517
+ ordinalNumber: Te({
1518
+ matchPattern: Cn,
1519
+ parsePattern: kn,
1520
+ valueCallback: (t) => parseInt(t)
1521
+ }),
1522
+ era: C({
1523
+ matchPatterns: On,
1524
+ defaultMatchWidth: "wide",
1525
+ parsePatterns: An,
1526
+ defaultParseWidth: "any"
1527
+ }),
1528
+ quarter: C({
1529
+ matchPatterns: Ln,
1530
+ defaultMatchWidth: "wide",
1531
+ parsePatterns: En,
1532
+ defaultParseWidth: "any",
1533
+ valueCallback: (t) => t + 1
1534
+ }),
1535
+ month: C({
1536
+ matchPatterns: jn,
1537
+ defaultMatchWidth: "wide",
1538
+ parsePatterns: In,
1539
+ defaultParseWidth: "any"
1540
+ }),
1541
+ day: C({
1542
+ matchPatterns: Sn,
1543
+ defaultMatchWidth: "wide",
1544
+ parsePatterns: Yn,
1545
+ defaultParseWidth: "any"
1546
+ }),
1547
+ dayPeriod: C({
1548
+ matchPatterns: qn,
1549
+ defaultMatchWidth: "any",
1550
+ parsePatterns: Nn,
1551
+ defaultParseWidth: "any"
1552
+ })
1553
+ }, ae = {
1554
+ code: "fr",
1555
+ formatDistance: mn,
1556
+ formatLong: gn,
1557
+ formatRelative: bn,
1558
+ localize: Mn,
1559
+ match: Fn,
1560
+ options: {
1561
+ weekStartsOn: 1,
1562
+ firstWeekContainsDate: 4
1563
+ }
1564
+ };
1565
+ function Wn() {
1566
+ return Object.assign({}, W());
1567
+ }
1568
+ function _n(t, i) {
1569
+ const e = Hn(i) ? new i(0) : T(i, 0);
1570
+ return e.setFullYear(t.getFullYear(), t.getMonth(), t.getDate()), e.setHours(
1571
+ t.getHours(),
1572
+ t.getMinutes(),
1573
+ t.getSeconds(),
1574
+ t.getMilliseconds()
1575
+ ), e;
1576
+ }
1577
+ function Hn(t) {
1578
+ return typeof t == "function" && t.prototype?.constructor === t;
1579
+ }
1580
+ const $n = 10;
1581
+ class je {
1582
+ constructor() {
1583
+ c(this, "subPriority", 0);
1584
+ }
1585
+ validate(i, e) {
1586
+ return !0;
1587
+ }
1588
+ }
1589
+ class Qn extends je {
1590
+ constructor(i, e, n, r, o) {
1591
+ super(), this.value = i, this.validateValue = e, this.setValue = n, this.priority = r, o && (this.subPriority = o);
1592
+ }
1593
+ validate(i, e) {
1594
+ return this.validateValue(i, this.value, e);
1595
+ }
1596
+ set(i, e, n) {
1597
+ return this.setValue(i, e, this.value, n);
1598
+ }
1599
+ }
1600
+ class Jn extends je {
1601
+ constructor(e, n) {
1602
+ super();
1603
+ c(this, "priority", $n);
1604
+ c(this, "subPriority", -1);
1605
+ this.context = e || ((r) => T(n, r));
1606
+ }
1607
+ set(e, n) {
1608
+ return n.timestampIsSet ? e : T(e, _n(e, this.context));
1609
+ }
1610
+ }
1611
+ class f {
1612
+ run(i, e, n, r) {
1613
+ const o = this.parse(i, e, n, r);
1614
+ return o ? {
1615
+ setter: new Qn(
1616
+ o.value,
1617
+ this.validate,
1618
+ this.set,
1619
+ this.priority,
1620
+ this.subPriority
1621
+ ),
1622
+ rest: o.rest
1623
+ } : null;
1624
+ }
1625
+ validate(i, e, n) {
1626
+ return !0;
1627
+ }
1628
+ }
1629
+ class Gn extends f {
1630
+ constructor() {
1631
+ super(...arguments);
1632
+ c(this, "priority", 140);
1633
+ c(this, "incompatibleTokens", ["R", "u", "t", "T"]);
1634
+ }
1635
+ parse(e, n, r) {
1636
+ switch (n) {
1637
+ // AD, BC
1638
+ case "G":
1639
+ case "GG":
1640
+ case "GGG":
1641
+ return r.era(e, { width: "abbreviated" }) || r.era(e, { width: "narrow" });
1642
+ // A, B
1643
+ case "GGGGG":
1644
+ return r.era(e, { width: "narrow" });
1645
+ default:
1646
+ return r.era(e, { width: "wide" }) || r.era(e, { width: "abbreviated" }) || r.era(e, { width: "narrow" });
1647
+ }
1648
+ }
1649
+ set(e, n, r) {
1650
+ return n.era = r, e.setFullYear(r, 0, 1), e.setHours(0, 0, 0, 0), e;
1651
+ }
1652
+ }
1653
+ const D = {
1654
+ month: /^(1[0-2]|0?\d)/,
1655
+ // 0 to 12
1656
+ date: /^(3[0-1]|[0-2]?\d)/,
1657
+ // 0 to 31
1658
+ dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,
1659
+ // 0 to 366
1660
+ week: /^(5[0-3]|[0-4]?\d)/,
1661
+ // 0 to 53
1662
+ hour23h: /^(2[0-3]|[0-1]?\d)/,
1663
+ // 0 to 23
1664
+ hour24h: /^(2[0-4]|[0-1]?\d)/,
1665
+ // 0 to 24
1666
+ hour11h: /^(1[0-1]|0?\d)/,
1667
+ // 0 to 11
1668
+ hour12h: /^(1[0-2]|0?\d)/,
1669
+ // 0 to 12
1670
+ minute: /^[0-5]?\d/,
1671
+ // 0 to 59
1672
+ second: /^[0-5]?\d/,
1673
+ // 0 to 59
1674
+ singleDigit: /^\d/,
1675
+ // 0 to 9
1676
+ twoDigits: /^\d{1,2}/,
1677
+ // 0 to 99
1678
+ threeDigits: /^\d{1,3}/,
1679
+ // 0 to 999
1680
+ fourDigits: /^\d{1,4}/,
1681
+ // 0 to 9999
1682
+ anyDigitsSigned: /^-?\d+/,
1683
+ singleDigitSigned: /^-?\d/,
1684
+ // 0 to 9, -0 to -9
1685
+ twoDigitsSigned: /^-?\d{1,2}/,
1686
+ // 0 to 99, -0 to -99
1687
+ threeDigitsSigned: /^-?\d{1,3}/,
1688
+ // 0 to 999, -0 to -999
1689
+ fourDigitsSigned: /^-?\d{1,4}/
1690
+ // 0 to 9999, -0 to -9999
1691
+ }, k = {
1692
+ basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
1693
+ basic: /^([+-])(\d{2})(\d{2})|Z/,
1694
+ basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
1695
+ extended: /^([+-])(\d{2}):(\d{2})|Z/,
1696
+ extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
1697
+ };
1698
+ function v(t, i) {
1699
+ return t && {
1700
+ value: i(t.value),
1701
+ rest: t.rest
1702
+ };
1703
+ }
1704
+ function w(t, i) {
1705
+ const e = i.match(t);
1706
+ return e ? {
1707
+ value: parseInt(e[0], 10),
1708
+ rest: i.slice(e[0].length)
1709
+ } : null;
1710
+ }
1711
+ function O(t, i) {
1712
+ const e = i.match(t);
1713
+ if (!e)
1714
+ return null;
1715
+ if (e[0] === "Z")
1716
+ return {
1717
+ value: 0,
1718
+ rest: i.slice(1)
1719
+ };
1720
+ const n = e[1] === "+" ? 1 : -1, r = e[2] ? parseInt(e[2], 10) : 0, o = e[3] ? parseInt(e[3], 10) : 0, s = e[5] ? parseInt(e[5], 10) : 0;
1721
+ return {
1722
+ value: n * (r * ne + o * te + s * Qt),
1723
+ rest: i.slice(e[0].length)
1724
+ };
1725
+ }
1726
+ function Ie(t) {
1727
+ return w(D.anyDigitsSigned, t);
1728
+ }
1729
+ function x(t, i) {
1730
+ switch (t) {
1731
+ case 1:
1732
+ return w(D.singleDigit, i);
1733
+ case 2:
1734
+ return w(D.twoDigits, i);
1735
+ case 3:
1736
+ return w(D.threeDigits, i);
1737
+ case 4:
1738
+ return w(D.fourDigits, i);
1739
+ default:
1740
+ return w(new RegExp("^\\d{1," + t + "}"), i);
1741
+ }
1742
+ }
1743
+ function X(t, i) {
1744
+ switch (t) {
1745
+ case 1:
1746
+ return w(D.singleDigitSigned, i);
1747
+ case 2:
1748
+ return w(D.twoDigitsSigned, i);
1749
+ case 3:
1750
+ return w(D.threeDigitsSigned, i);
1751
+ case 4:
1752
+ return w(D.fourDigitsSigned, i);
1753
+ default:
1754
+ return w(new RegExp("^-?\\d{1," + t + "}"), i);
1755
+ }
1756
+ }
1757
+ function oe(t) {
1758
+ switch (t) {
1759
+ case "morning":
1760
+ return 4;
1761
+ case "evening":
1762
+ return 17;
1763
+ case "pm":
1764
+ case "noon":
1765
+ case "afternoon":
1766
+ return 12;
1767
+ default:
1768
+ return 0;
1769
+ }
1770
+ }
1771
+ function Se(t, i) {
1772
+ const e = i > 0, n = e ? i : 1 - i;
1773
+ let r;
1774
+ if (n <= 50)
1775
+ r = t || 100;
1776
+ else {
1777
+ const o = n + 50, s = Math.trunc(o / 100) * 100, u = t >= o % 100;
1778
+ r = t + s - (u ? 100 : 0);
1779
+ }
1780
+ return e ? r : 1 - r;
1781
+ }
1782
+ function Ye(t) {
1783
+ return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
1784
+ }
1785
+ class Xn extends f {
1786
+ constructor() {
1787
+ super(...arguments);
1788
+ c(this, "priority", 130);
1789
+ c(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
1790
+ }
1791
+ parse(e, n, r) {
1792
+ const o = (s) => ({
1793
+ year: s,
1794
+ isTwoDigitYear: n === "yy"
1795
+ });
1796
+ switch (n) {
1797
+ case "y":
1798
+ return v(x(4, e), o);
1799
+ case "yo":
1800
+ return v(
1801
+ r.ordinalNumber(e, {
1802
+ unit: "year"
1803
+ }),
1804
+ o
1805
+ );
1806
+ default:
1807
+ return v(x(n.length, e), o);
1808
+ }
1809
+ }
1810
+ validate(e, n) {
1811
+ return n.isTwoDigitYear || n.year > 0;
1812
+ }
1813
+ set(e, n, r) {
1814
+ const o = e.getFullYear();
1815
+ if (r.isTwoDigitYear) {
1816
+ const u = Se(
1817
+ r.year,
1818
+ o
1819
+ );
1820
+ return e.setFullYear(u, 0, 1), e.setHours(0, 0, 0, 0), e;
1821
+ }
1822
+ const s = !("era" in n) || n.era === 1 ? r.year : 1 - r.year;
1823
+ return e.setFullYear(s, 0, 1), e.setHours(0, 0, 0, 0), e;
1824
+ }
1825
+ }
1826
+ class Bn extends f {
1827
+ constructor() {
1828
+ super(...arguments);
1829
+ c(this, "priority", 130);
1830
+ c(this, "incompatibleTokens", [
1831
+ "y",
1832
+ "R",
1833
+ "u",
1834
+ "Q",
1835
+ "q",
1836
+ "M",
1837
+ "L",
1838
+ "I",
1839
+ "d",
1840
+ "D",
1841
+ "i",
1842
+ "t",
1843
+ "T"
1844
+ ]);
1845
+ }
1846
+ parse(e, n, r) {
1847
+ const o = (s) => ({
1848
+ year: s,
1849
+ isTwoDigitYear: n === "YY"
1850
+ });
1851
+ switch (n) {
1852
+ case "Y":
1853
+ return v(x(4, e), o);
1854
+ case "Yo":
1855
+ return v(
1856
+ r.ordinalNumber(e, {
1857
+ unit: "year"
1858
+ }),
1859
+ o
1860
+ );
1861
+ default:
1862
+ return v(x(n.length, e), o);
1863
+ }
1864
+ }
1865
+ validate(e, n) {
1866
+ return n.isTwoDigitYear || n.year > 0;
1867
+ }
1868
+ set(e, n, r, o) {
1869
+ const s = ie(e, o);
1870
+ if (r.isTwoDigitYear) {
1871
+ const l = Se(
1872
+ r.year,
1873
+ s
1874
+ );
1875
+ return e.setFullYear(
1876
+ l,
1877
+ 0,
1878
+ o.firstWeekContainsDate
1879
+ ), e.setHours(0, 0, 0, 0), L(e, o);
1880
+ }
1881
+ const u = !("era" in n) || n.era === 1 ? r.year : 1 - r.year;
1882
+ return e.setFullYear(u, 0, o.firstWeekContainsDate), e.setHours(0, 0, 0, 0), L(e, o);
1883
+ }
1884
+ }
1885
+ class Vn extends f {
1886
+ constructor() {
1887
+ super(...arguments);
1888
+ c(this, "priority", 130);
1889
+ c(this, "incompatibleTokens", [
1890
+ "G",
1891
+ "y",
1892
+ "Y",
1893
+ "u",
1894
+ "Q",
1895
+ "q",
1896
+ "M",
1897
+ "L",
1898
+ "w",
1899
+ "d",
1900
+ "D",
1901
+ "e",
1902
+ "c",
1903
+ "t",
1904
+ "T"
1905
+ ]);
1906
+ }
1907
+ parse(e, n) {
1908
+ return X(n === "R" ? 4 : n.length, e);
1909
+ }
1910
+ set(e, n, r) {
1911
+ const o = T(e, 0);
1912
+ return o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0), N(o);
1913
+ }
1914
+ }
1915
+ class zn extends f {
1916
+ constructor() {
1917
+ super(...arguments);
1918
+ c(this, "priority", 130);
1919
+ c(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]);
1920
+ }
1921
+ parse(e, n) {
1922
+ return X(n === "u" ? 4 : n.length, e);
1923
+ }
1924
+ set(e, n, r) {
1925
+ return e.setFullYear(r, 0, 1), e.setHours(0, 0, 0, 0), e;
1926
+ }
1927
+ }
1928
+ class Un extends f {
1929
+ constructor() {
1930
+ super(...arguments);
1931
+ c(this, "priority", 120);
1932
+ c(this, "incompatibleTokens", [
1933
+ "Y",
1934
+ "R",
1935
+ "q",
1936
+ "M",
1937
+ "L",
1938
+ "w",
1939
+ "I",
1940
+ "d",
1941
+ "D",
1942
+ "i",
1943
+ "e",
1944
+ "c",
1945
+ "t",
1946
+ "T"
1947
+ ]);
1948
+ }
1949
+ parse(e, n, r) {
1950
+ switch (n) {
1951
+ // 1, 2, 3, 4
1952
+ case "Q":
1953
+ case "QQ":
1954
+ return x(n.length, e);
1955
+ // 1st, 2nd, 3rd, 4th
1956
+ case "Qo":
1957
+ return r.ordinalNumber(e, { unit: "quarter" });
1958
+ // Q1, Q2, Q3, Q4
1959
+ case "QQQ":
1960
+ return r.quarter(e, {
1961
+ width: "abbreviated",
1962
+ context: "formatting"
1963
+ }) || r.quarter(e, {
1964
+ width: "narrow",
1965
+ context: "formatting"
1966
+ });
1967
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
1968
+ case "QQQQQ":
1969
+ return r.quarter(e, {
1970
+ width: "narrow",
1971
+ context: "formatting"
1972
+ });
1973
+ default:
1974
+ return r.quarter(e, {
1975
+ width: "wide",
1976
+ context: "formatting"
1977
+ }) || r.quarter(e, {
1978
+ width: "abbreviated",
1979
+ context: "formatting"
1980
+ }) || r.quarter(e, {
1981
+ width: "narrow",
1982
+ context: "formatting"
1983
+ });
1984
+ }
1985
+ }
1986
+ validate(e, n) {
1987
+ return n >= 1 && n <= 4;
1988
+ }
1989
+ set(e, n, r) {
1990
+ return e.setMonth((r - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
1991
+ }
1992
+ }
1993
+ class Zn extends f {
1994
+ constructor() {
1995
+ super(...arguments);
1996
+ c(this, "priority", 120);
1997
+ c(this, "incompatibleTokens", [
1998
+ "Y",
1999
+ "R",
2000
+ "Q",
2001
+ "M",
2002
+ "L",
2003
+ "w",
2004
+ "I",
2005
+ "d",
2006
+ "D",
2007
+ "i",
2008
+ "e",
2009
+ "c",
2010
+ "t",
2011
+ "T"
2012
+ ]);
2013
+ }
2014
+ parse(e, n, r) {
2015
+ switch (n) {
2016
+ // 1, 2, 3, 4
2017
+ case "q":
2018
+ case "qq":
2019
+ return x(n.length, e);
2020
+ // 1st, 2nd, 3rd, 4th
2021
+ case "qo":
2022
+ return r.ordinalNumber(e, { unit: "quarter" });
2023
+ // Q1, Q2, Q3, Q4
2024
+ case "qqq":
2025
+ return r.quarter(e, {
2026
+ width: "abbreviated",
2027
+ context: "standalone"
2028
+ }) || r.quarter(e, {
2029
+ width: "narrow",
2030
+ context: "standalone"
2031
+ });
2032
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
2033
+ case "qqqqq":
2034
+ return r.quarter(e, {
2035
+ width: "narrow",
2036
+ context: "standalone"
2037
+ });
2038
+ default:
2039
+ return r.quarter(e, {
2040
+ width: "wide",
2041
+ context: "standalone"
2042
+ }) || r.quarter(e, {
2043
+ width: "abbreviated",
2044
+ context: "standalone"
2045
+ }) || r.quarter(e, {
2046
+ width: "narrow",
2047
+ context: "standalone"
2048
+ });
2049
+ }
2050
+ }
2051
+ validate(e, n) {
2052
+ return n >= 1 && n <= 4;
2053
+ }
2054
+ set(e, n, r) {
2055
+ return e.setMonth((r - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
2056
+ }
2057
+ }
2058
+ class Kn extends f {
2059
+ constructor() {
2060
+ super(...arguments);
2061
+ c(this, "incompatibleTokens", [
2062
+ "Y",
2063
+ "R",
2064
+ "q",
2065
+ "Q",
2066
+ "L",
2067
+ "w",
2068
+ "I",
2069
+ "D",
2070
+ "i",
2071
+ "e",
2072
+ "c",
2073
+ "t",
2074
+ "T"
2075
+ ]);
2076
+ c(this, "priority", 110);
2077
+ }
2078
+ parse(e, n, r) {
2079
+ const o = (s) => s - 1;
2080
+ switch (n) {
2081
+ // 1, 2, ..., 12
2082
+ case "M":
2083
+ return v(
2084
+ w(D.month, e),
2085
+ o
2086
+ );
2087
+ // 01, 02, ..., 12
2088
+ case "MM":
2089
+ return v(x(2, e), o);
2090
+ // 1st, 2nd, ..., 12th
2091
+ case "Mo":
2092
+ return v(
2093
+ r.ordinalNumber(e, {
2094
+ unit: "month"
2095
+ }),
2096
+ o
2097
+ );
2098
+ // Jan, Feb, ..., Dec
2099
+ case "MMM":
2100
+ return r.month(e, {
2101
+ width: "abbreviated",
2102
+ context: "formatting"
2103
+ }) || r.month(e, { width: "narrow", context: "formatting" });
2104
+ // J, F, ..., D
2105
+ case "MMMMM":
2106
+ return r.month(e, {
2107
+ width: "narrow",
2108
+ context: "formatting"
2109
+ });
2110
+ default:
2111
+ return r.month(e, { width: "wide", context: "formatting" }) || r.month(e, {
2112
+ width: "abbreviated",
2113
+ context: "formatting"
2114
+ }) || r.month(e, { width: "narrow", context: "formatting" });
2115
+ }
2116
+ }
2117
+ validate(e, n) {
2118
+ return n >= 0 && n <= 11;
2119
+ }
2120
+ set(e, n, r) {
2121
+ return e.setMonth(r, 1), e.setHours(0, 0, 0, 0), e;
2122
+ }
2123
+ }
2124
+ class ei extends f {
2125
+ constructor() {
2126
+ super(...arguments);
2127
+ c(this, "priority", 110);
2128
+ c(this, "incompatibleTokens", [
2129
+ "Y",
2130
+ "R",
2131
+ "q",
2132
+ "Q",
2133
+ "M",
2134
+ "w",
2135
+ "I",
2136
+ "D",
2137
+ "i",
2138
+ "e",
2139
+ "c",
2140
+ "t",
2141
+ "T"
2142
+ ]);
2143
+ }
2144
+ parse(e, n, r) {
2145
+ const o = (s) => s - 1;
2146
+ switch (n) {
2147
+ // 1, 2, ..., 12
2148
+ case "L":
2149
+ return v(
2150
+ w(D.month, e),
2151
+ o
2152
+ );
2153
+ // 01, 02, ..., 12
2154
+ case "LL":
2155
+ return v(x(2, e), o);
2156
+ // 1st, 2nd, ..., 12th
2157
+ case "Lo":
2158
+ return v(
2159
+ r.ordinalNumber(e, {
2160
+ unit: "month"
2161
+ }),
2162
+ o
2163
+ );
2164
+ // Jan, Feb, ..., Dec
2165
+ case "LLL":
2166
+ return r.month(e, {
2167
+ width: "abbreviated",
2168
+ context: "standalone"
2169
+ }) || r.month(e, { width: "narrow", context: "standalone" });
2170
+ // J, F, ..., D
2171
+ case "LLLLL":
2172
+ return r.month(e, {
2173
+ width: "narrow",
2174
+ context: "standalone"
2175
+ });
2176
+ default:
2177
+ return r.month(e, { width: "wide", context: "standalone" }) || r.month(e, {
2178
+ width: "abbreviated",
2179
+ context: "standalone"
2180
+ }) || r.month(e, { width: "narrow", context: "standalone" });
2181
+ }
2182
+ }
2183
+ validate(e, n) {
2184
+ return n >= 0 && n <= 11;
2185
+ }
2186
+ set(e, n, r) {
2187
+ return e.setMonth(r, 1), e.setHours(0, 0, 0, 0), e;
2188
+ }
2189
+ }
2190
+ function ti(t, i, e) {
2191
+ const n = y(t, e?.in), r = Oe(n, e) - i;
2192
+ return n.setDate(n.getDate() - r * 7), y(n, e?.in);
2193
+ }
2194
+ class ni extends f {
2195
+ constructor() {
2196
+ super(...arguments);
2197
+ c(this, "priority", 100);
2198
+ c(this, "incompatibleTokens", [
2199
+ "y",
2200
+ "R",
2201
+ "u",
2202
+ "q",
2203
+ "Q",
2204
+ "M",
2205
+ "L",
2206
+ "I",
2207
+ "d",
2208
+ "D",
2209
+ "i",
2210
+ "t",
2211
+ "T"
2212
+ ]);
2213
+ }
2214
+ parse(e, n, r) {
2215
+ switch (n) {
2216
+ case "w":
2217
+ return w(D.week, e);
2218
+ case "wo":
2219
+ return r.ordinalNumber(e, { unit: "week" });
2220
+ default:
2221
+ return x(n.length, e);
2222
+ }
2223
+ }
2224
+ validate(e, n) {
2225
+ return n >= 1 && n <= 53;
2226
+ }
2227
+ set(e, n, r, o) {
2228
+ return L(ti(e, r, o), o);
2229
+ }
2230
+ }
2231
+ function ii(t, i, e) {
2232
+ const n = y(t, e?.in), r = ke(n, e) - i;
2233
+ return n.setDate(n.getDate() - r * 7), n;
2234
+ }
2235
+ class ri extends f {
2236
+ constructor() {
2237
+ super(...arguments);
2238
+ c(this, "priority", 100);
2239
+ c(this, "incompatibleTokens", [
2240
+ "y",
2241
+ "Y",
2242
+ "u",
2243
+ "q",
2244
+ "Q",
2245
+ "M",
2246
+ "L",
2247
+ "w",
2248
+ "d",
2249
+ "D",
2250
+ "e",
2251
+ "c",
2252
+ "t",
2253
+ "T"
2254
+ ]);
2255
+ }
2256
+ parse(e, n, r) {
2257
+ switch (n) {
2258
+ case "I":
2259
+ return w(D.week, e);
2260
+ case "Io":
2261
+ return r.ordinalNumber(e, { unit: "week" });
2262
+ default:
2263
+ return x(n.length, e);
2264
+ }
2265
+ }
2266
+ validate(e, n) {
2267
+ return n >= 1 && n <= 53;
2268
+ }
2269
+ set(e, n, r) {
2270
+ return N(ii(e, r));
2271
+ }
2272
+ }
2273
+ const ai = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], oi = [
2274
+ 31,
2275
+ 29,
2276
+ 31,
2277
+ 30,
2278
+ 31,
2279
+ 30,
2280
+ 31,
2281
+ 31,
2282
+ 30,
2283
+ 31,
2284
+ 30,
2285
+ 31
2286
+ ];
2287
+ class si extends f {
2288
+ constructor() {
2289
+ super(...arguments);
2290
+ c(this, "priority", 90);
2291
+ c(this, "subPriority", 1);
2292
+ c(this, "incompatibleTokens", [
2293
+ "Y",
2294
+ "R",
2295
+ "q",
2296
+ "Q",
2297
+ "w",
2298
+ "I",
2299
+ "D",
2300
+ "i",
2301
+ "e",
2302
+ "c",
2303
+ "t",
2304
+ "T"
2305
+ ]);
2306
+ }
2307
+ parse(e, n, r) {
2308
+ switch (n) {
2309
+ case "d":
2310
+ return w(D.date, e);
2311
+ case "do":
2312
+ return r.ordinalNumber(e, { unit: "date" });
2313
+ default:
2314
+ return x(n.length, e);
2315
+ }
2316
+ }
2317
+ validate(e, n) {
2318
+ const r = e.getFullYear(), o = Ye(r), s = e.getMonth();
2319
+ return o ? n >= 1 && n <= oi[s] : n >= 1 && n <= ai[s];
2320
+ }
2321
+ set(e, n, r) {
2322
+ return e.setDate(r), e.setHours(0, 0, 0, 0), e;
2323
+ }
2324
+ }
2325
+ class ci extends f {
2326
+ constructor() {
2327
+ super(...arguments);
2328
+ c(this, "priority", 90);
2329
+ c(this, "subpriority", 1);
2330
+ c(this, "incompatibleTokens", [
2331
+ "Y",
2332
+ "R",
2333
+ "q",
2334
+ "Q",
2335
+ "M",
2336
+ "L",
2337
+ "w",
2338
+ "I",
2339
+ "d",
2340
+ "E",
2341
+ "i",
2342
+ "e",
2343
+ "c",
2344
+ "t",
2345
+ "T"
2346
+ ]);
2347
+ }
2348
+ parse(e, n, r) {
2349
+ switch (n) {
2350
+ case "D":
2351
+ case "DD":
2352
+ return w(D.dayOfYear, e);
2353
+ case "Do":
2354
+ return r.ordinalNumber(e, { unit: "date" });
2355
+ default:
2356
+ return x(n.length, e);
2357
+ }
2358
+ }
2359
+ validate(e, n) {
2360
+ const r = e.getFullYear();
2361
+ return Ye(r) ? n >= 1 && n <= 366 : n >= 1 && n <= 365;
2362
+ }
2363
+ set(e, n, r) {
2364
+ return e.setMonth(0, r), e.setHours(0, 0, 0, 0), e;
2365
+ }
2366
+ }
2367
+ function qe(t, i, e) {
2368
+ const n = y(t, e?.in);
2369
+ return isNaN(i) ? T(e?.in || t, NaN) : (i && n.setDate(n.getDate() + i), n);
2370
+ }
2371
+ function se(t, i, e) {
2372
+ const n = W(), r = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = y(t, e?.in), s = o.getDay(), l = (i % 7 + 7) % 7, m = 7 - r, h = i < 0 || i > 6 ? i - (s + m) % 7 : (l + m) % 7 - (s + m) % 7;
2373
+ return qe(o, h, e);
2374
+ }
2375
+ class ui extends f {
2376
+ constructor() {
2377
+ super(...arguments);
2378
+ c(this, "priority", 90);
2379
+ c(this, "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]);
2380
+ }
2381
+ parse(e, n, r) {
2382
+ switch (n) {
2383
+ // Tue
2384
+ case "E":
2385
+ case "EE":
2386
+ case "EEE":
2387
+ return r.day(e, {
2388
+ width: "abbreviated",
2389
+ context: "formatting"
2390
+ }) || r.day(e, { width: "short", context: "formatting" }) || r.day(e, { width: "narrow", context: "formatting" });
2391
+ // T
2392
+ case "EEEEE":
2393
+ return r.day(e, {
2394
+ width: "narrow",
2395
+ context: "formatting"
2396
+ });
2397
+ // Tu
2398
+ case "EEEEEE":
2399
+ return r.day(e, { width: "short", context: "formatting" }) || r.day(e, { width: "narrow", context: "formatting" });
2400
+ default:
2401
+ return r.day(e, { width: "wide", context: "formatting" }) || r.day(e, {
2402
+ width: "abbreviated",
2403
+ context: "formatting"
2404
+ }) || r.day(e, { width: "short", context: "formatting" }) || r.day(e, { width: "narrow", context: "formatting" });
2405
+ }
2406
+ }
2407
+ validate(e, n) {
2408
+ return n >= 0 && n <= 6;
2409
+ }
2410
+ set(e, n, r, o) {
2411
+ return e = se(e, r, o), e.setHours(0, 0, 0, 0), e;
2412
+ }
2413
+ }
2414
+ class di extends f {
2415
+ constructor() {
2416
+ super(...arguments);
2417
+ c(this, "priority", 90);
2418
+ c(this, "incompatibleTokens", [
2419
+ "y",
2420
+ "R",
2421
+ "u",
2422
+ "q",
2423
+ "Q",
2424
+ "M",
2425
+ "L",
2426
+ "I",
2427
+ "d",
2428
+ "D",
2429
+ "E",
2430
+ "i",
2431
+ "c",
2432
+ "t",
2433
+ "T"
2434
+ ]);
2435
+ }
2436
+ parse(e, n, r, o) {
2437
+ const s = (u) => {
2438
+ const l = Math.floor((u - 1) / 7) * 7;
2439
+ return (u + o.weekStartsOn + 6) % 7 + l;
2440
+ };
2441
+ switch (n) {
2442
+ // 3
2443
+ case "e":
2444
+ case "ee":
2445
+ return v(x(n.length, e), s);
2446
+ // 3rd
2447
+ case "eo":
2448
+ return v(
2449
+ r.ordinalNumber(e, {
2450
+ unit: "day"
2451
+ }),
2452
+ s
2453
+ );
2454
+ // Tue
2455
+ case "eee":
2456
+ return r.day(e, {
2457
+ width: "abbreviated",
2458
+ context: "formatting"
2459
+ }) || r.day(e, { width: "short", context: "formatting" }) || r.day(e, { width: "narrow", context: "formatting" });
2460
+ // T
2461
+ case "eeeee":
2462
+ return r.day(e, {
2463
+ width: "narrow",
2464
+ context: "formatting"
2465
+ });
2466
+ // Tu
2467
+ case "eeeeee":
2468
+ return r.day(e, { width: "short", context: "formatting" }) || r.day(e, { width: "narrow", context: "formatting" });
2469
+ default:
2470
+ return r.day(e, { width: "wide", context: "formatting" }) || r.day(e, {
2471
+ width: "abbreviated",
2472
+ context: "formatting"
2473
+ }) || r.day(e, { width: "short", context: "formatting" }) || r.day(e, { width: "narrow", context: "formatting" });
2474
+ }
2475
+ }
2476
+ validate(e, n) {
2477
+ return n >= 0 && n <= 6;
2478
+ }
2479
+ set(e, n, r, o) {
2480
+ return e = se(e, r, o), e.setHours(0, 0, 0, 0), e;
2481
+ }
2482
+ }
2483
+ class li extends f {
2484
+ constructor() {
2485
+ super(...arguments);
2486
+ c(this, "priority", 90);
2487
+ c(this, "incompatibleTokens", [
2488
+ "y",
2489
+ "R",
2490
+ "u",
2491
+ "q",
2492
+ "Q",
2493
+ "M",
2494
+ "L",
2495
+ "I",
2496
+ "d",
2497
+ "D",
2498
+ "E",
2499
+ "i",
2500
+ "e",
2501
+ "t",
2502
+ "T"
2503
+ ]);
2504
+ }
2505
+ parse(e, n, r, o) {
2506
+ const s = (u) => {
2507
+ const l = Math.floor((u - 1) / 7) * 7;
2508
+ return (u + o.weekStartsOn + 6) % 7 + l;
2509
+ };
2510
+ switch (n) {
2511
+ // 3
2512
+ case "c":
2513
+ case "cc":
2514
+ return v(x(n.length, e), s);
2515
+ // 3rd
2516
+ case "co":
2517
+ return v(
2518
+ r.ordinalNumber(e, {
2519
+ unit: "day"
2520
+ }),
2521
+ s
2522
+ );
2523
+ // Tue
2524
+ case "ccc":
2525
+ return r.day(e, {
2526
+ width: "abbreviated",
2527
+ context: "standalone"
2528
+ }) || r.day(e, { width: "short", context: "standalone" }) || r.day(e, { width: "narrow", context: "standalone" });
2529
+ // T
2530
+ case "ccccc":
2531
+ return r.day(e, {
2532
+ width: "narrow",
2533
+ context: "standalone"
2534
+ });
2535
+ // Tu
2536
+ case "cccccc":
2537
+ return r.day(e, { width: "short", context: "standalone" }) || r.day(e, { width: "narrow", context: "standalone" });
2538
+ default:
2539
+ return r.day(e, { width: "wide", context: "standalone" }) || r.day(e, {
2540
+ width: "abbreviated",
2541
+ context: "standalone"
2542
+ }) || r.day(e, { width: "short", context: "standalone" }) || r.day(e, { width: "narrow", context: "standalone" });
2543
+ }
2544
+ }
2545
+ validate(e, n) {
2546
+ return n >= 0 && n <= 6;
2547
+ }
2548
+ set(e, n, r, o) {
2549
+ return e = se(e, r, o), e.setHours(0, 0, 0, 0), e;
2550
+ }
2551
+ }
2552
+ function mi(t, i) {
2553
+ const e = y(t, i?.in).getDay();
2554
+ return e === 0 ? 7 : e;
2555
+ }
2556
+ function fi(t, i, e) {
2557
+ const n = y(t, e?.in), r = mi(n, e), o = i - r;
2558
+ return qe(n, o, e);
2559
+ }
2560
+ class pi extends f {
2561
+ constructor() {
2562
+ super(...arguments);
2563
+ c(this, "priority", 90);
2564
+ c(this, "incompatibleTokens", [
2565
+ "y",
2566
+ "Y",
2567
+ "u",
2568
+ "q",
2569
+ "Q",
2570
+ "M",
2571
+ "L",
2572
+ "w",
2573
+ "d",
2574
+ "D",
2575
+ "E",
2576
+ "e",
2577
+ "c",
2578
+ "t",
2579
+ "T"
2580
+ ]);
2581
+ }
2582
+ parse(e, n, r) {
2583
+ const o = (s) => s === 0 ? 7 : s;
2584
+ switch (n) {
2585
+ // 2
2586
+ case "i":
2587
+ case "ii":
2588
+ return x(n.length, e);
2589
+ // 2nd
2590
+ case "io":
2591
+ return r.ordinalNumber(e, { unit: "day" });
2592
+ // Tue
2593
+ case "iii":
2594
+ return v(
2595
+ r.day(e, {
2596
+ width: "abbreviated",
2597
+ context: "formatting"
2598
+ }) || r.day(e, {
2599
+ width: "short",
2600
+ context: "formatting"
2601
+ }) || r.day(e, {
2602
+ width: "narrow",
2603
+ context: "formatting"
2604
+ }),
2605
+ o
2606
+ );
2607
+ // T
2608
+ case "iiiii":
2609
+ return v(
2610
+ r.day(e, {
2611
+ width: "narrow",
2612
+ context: "formatting"
2613
+ }),
2614
+ o
2615
+ );
2616
+ // Tu
2617
+ case "iiiiii":
2618
+ return v(
2619
+ r.day(e, {
2620
+ width: "short",
2621
+ context: "formatting"
2622
+ }) || r.day(e, {
2623
+ width: "narrow",
2624
+ context: "formatting"
2625
+ }),
2626
+ o
2627
+ );
2628
+ default:
2629
+ return v(
2630
+ r.day(e, {
2631
+ width: "wide",
2632
+ context: "formatting"
2633
+ }) || r.day(e, {
2634
+ width: "abbreviated",
2635
+ context: "formatting"
2636
+ }) || r.day(e, {
2637
+ width: "short",
2638
+ context: "formatting"
2639
+ }) || r.day(e, {
2640
+ width: "narrow",
2641
+ context: "formatting"
2642
+ }),
2643
+ o
2644
+ );
2645
+ }
2646
+ }
2647
+ validate(e, n) {
2648
+ return n >= 1 && n <= 7;
2649
+ }
2650
+ set(e, n, r) {
2651
+ return e = fi(e, r), e.setHours(0, 0, 0, 0), e;
2652
+ }
2653
+ }
2654
+ class hi extends f {
2655
+ constructor() {
2656
+ super(...arguments);
2657
+ c(this, "priority", 80);
2658
+ c(this, "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]);
2659
+ }
2660
+ parse(e, n, r) {
2661
+ switch (n) {
2662
+ case "a":
2663
+ case "aa":
2664
+ case "aaa":
2665
+ return r.dayPeriod(e, {
2666
+ width: "abbreviated",
2667
+ context: "formatting"
2668
+ }) || r.dayPeriod(e, {
2669
+ width: "narrow",
2670
+ context: "formatting"
2671
+ });
2672
+ case "aaaaa":
2673
+ return r.dayPeriod(e, {
2674
+ width: "narrow",
2675
+ context: "formatting"
2676
+ });
2677
+ default:
2678
+ return r.dayPeriod(e, {
2679
+ width: "wide",
2680
+ context: "formatting"
2681
+ }) || r.dayPeriod(e, {
2682
+ width: "abbreviated",
2683
+ context: "formatting"
2684
+ }) || r.dayPeriod(e, {
2685
+ width: "narrow",
2686
+ context: "formatting"
2687
+ });
2688
+ }
2689
+ }
2690
+ set(e, n, r) {
2691
+ return e.setHours(oe(r), 0, 0, 0), e;
2692
+ }
2693
+ }
2694
+ class gi extends f {
2695
+ constructor() {
2696
+ super(...arguments);
2697
+ c(this, "priority", 80);
2698
+ c(this, "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]);
2699
+ }
2700
+ parse(e, n, r) {
2701
+ switch (n) {
2702
+ case "b":
2703
+ case "bb":
2704
+ case "bbb":
2705
+ return r.dayPeriod(e, {
2706
+ width: "abbreviated",
2707
+ context: "formatting"
2708
+ }) || r.dayPeriod(e, {
2709
+ width: "narrow",
2710
+ context: "formatting"
2711
+ });
2712
+ case "bbbbb":
2713
+ return r.dayPeriod(e, {
2714
+ width: "narrow",
2715
+ context: "formatting"
2716
+ });
2717
+ default:
2718
+ return r.dayPeriod(e, {
2719
+ width: "wide",
2720
+ context: "formatting"
2721
+ }) || r.dayPeriod(e, {
2722
+ width: "abbreviated",
2723
+ context: "formatting"
2724
+ }) || r.dayPeriod(e, {
2725
+ width: "narrow",
2726
+ context: "formatting"
2727
+ });
2728
+ }
2729
+ }
2730
+ set(e, n, r) {
2731
+ return e.setHours(oe(r), 0, 0, 0), e;
2732
+ }
2733
+ }
2734
+ class wi extends f {
2735
+ constructor() {
2736
+ super(...arguments);
2737
+ c(this, "priority", 80);
2738
+ c(this, "incompatibleTokens", ["a", "b", "t", "T"]);
2739
+ }
2740
+ parse(e, n, r) {
2741
+ switch (n) {
2742
+ case "B":
2743
+ case "BB":
2744
+ case "BBB":
2745
+ return r.dayPeriod(e, {
2746
+ width: "abbreviated",
2747
+ context: "formatting"
2748
+ }) || r.dayPeriod(e, {
2749
+ width: "narrow",
2750
+ context: "formatting"
2751
+ });
2752
+ case "BBBBB":
2753
+ return r.dayPeriod(e, {
2754
+ width: "narrow",
2755
+ context: "formatting"
2756
+ });
2757
+ default:
2758
+ return r.dayPeriod(e, {
2759
+ width: "wide",
2760
+ context: "formatting"
2761
+ }) || r.dayPeriod(e, {
2762
+ width: "abbreviated",
2763
+ context: "formatting"
2764
+ }) || r.dayPeriod(e, {
2765
+ width: "narrow",
2766
+ context: "formatting"
2767
+ });
2768
+ }
2769
+ }
2770
+ set(e, n, r) {
2771
+ return e.setHours(oe(r), 0, 0, 0), e;
2772
+ }
2773
+ }
2774
+ class bi extends f {
2775
+ constructor() {
2776
+ super(...arguments);
2777
+ c(this, "priority", 70);
2778
+ c(this, "incompatibleTokens", ["H", "K", "k", "t", "T"]);
2779
+ }
2780
+ parse(e, n, r) {
2781
+ switch (n) {
2782
+ case "h":
2783
+ return w(D.hour12h, e);
2784
+ case "ho":
2785
+ return r.ordinalNumber(e, { unit: "hour" });
2786
+ default:
2787
+ return x(n.length, e);
2788
+ }
2789
+ }
2790
+ validate(e, n) {
2791
+ return n >= 1 && n <= 12;
2792
+ }
2793
+ set(e, n, r) {
2794
+ const o = e.getHours() >= 12;
2795
+ return o && r < 12 ? e.setHours(r + 12, 0, 0, 0) : !o && r === 12 ? e.setHours(0, 0, 0, 0) : e.setHours(r, 0, 0, 0), e;
2796
+ }
2797
+ }
2798
+ class yi extends f {
2799
+ constructor() {
2800
+ super(...arguments);
2801
+ c(this, "priority", 70);
2802
+ c(this, "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]);
2803
+ }
2804
+ parse(e, n, r) {
2805
+ switch (n) {
2806
+ case "H":
2807
+ return w(D.hour23h, e);
2808
+ case "Ho":
2809
+ return r.ordinalNumber(e, { unit: "hour" });
2810
+ default:
2811
+ return x(n.length, e);
2812
+ }
2813
+ }
2814
+ validate(e, n) {
2815
+ return n >= 0 && n <= 23;
2816
+ }
2817
+ set(e, n, r) {
2818
+ return e.setHours(r, 0, 0, 0), e;
2819
+ }
2820
+ }
2821
+ class xi extends f {
2822
+ constructor() {
2823
+ super(...arguments);
2824
+ c(this, "priority", 70);
2825
+ c(this, "incompatibleTokens", ["h", "H", "k", "t", "T"]);
2826
+ }
2827
+ parse(e, n, r) {
2828
+ switch (n) {
2829
+ case "K":
2830
+ return w(D.hour11h, e);
2831
+ case "Ko":
2832
+ return r.ordinalNumber(e, { unit: "hour" });
2833
+ default:
2834
+ return x(n.length, e);
2835
+ }
2836
+ }
2837
+ validate(e, n) {
2838
+ return n >= 0 && n <= 11;
2839
+ }
2840
+ set(e, n, r) {
2841
+ return e.getHours() >= 12 && r < 12 ? e.setHours(r + 12, 0, 0, 0) : e.setHours(r, 0, 0, 0), e;
2842
+ }
2843
+ }
2844
+ class Di extends f {
2845
+ constructor() {
2846
+ super(...arguments);
2847
+ c(this, "priority", 70);
2848
+ c(this, "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]);
2849
+ }
2850
+ parse(e, n, r) {
2851
+ switch (n) {
2852
+ case "k":
2853
+ return w(D.hour24h, e);
2854
+ case "ko":
2855
+ return r.ordinalNumber(e, { unit: "hour" });
2856
+ default:
2857
+ return x(n.length, e);
2858
+ }
2859
+ }
2860
+ validate(e, n) {
2861
+ return n >= 1 && n <= 24;
2862
+ }
2863
+ set(e, n, r) {
2864
+ const o = r <= 24 ? r % 24 : r;
2865
+ return e.setHours(o, 0, 0, 0), e;
2866
+ }
2867
+ }
2868
+ class vi extends f {
2869
+ constructor() {
2870
+ super(...arguments);
2871
+ c(this, "priority", 60);
2872
+ c(this, "incompatibleTokens", ["t", "T"]);
2873
+ }
2874
+ parse(e, n, r) {
2875
+ switch (n) {
2876
+ case "m":
2877
+ return w(D.minute, e);
2878
+ case "mo":
2879
+ return r.ordinalNumber(e, { unit: "minute" });
2880
+ default:
2881
+ return x(n.length, e);
2882
+ }
2883
+ }
2884
+ validate(e, n) {
2885
+ return n >= 0 && n <= 59;
2886
+ }
2887
+ set(e, n, r) {
2888
+ return e.setMinutes(r, 0, 0), e;
2889
+ }
2890
+ }
2891
+ class Pi extends f {
2892
+ constructor() {
2893
+ super(...arguments);
2894
+ c(this, "priority", 50);
2895
+ c(this, "incompatibleTokens", ["t", "T"]);
2896
+ }
2897
+ parse(e, n, r) {
2898
+ switch (n) {
2899
+ case "s":
2900
+ return w(D.second, e);
2901
+ case "so":
2902
+ return r.ordinalNumber(e, { unit: "second" });
2903
+ default:
2904
+ return x(n.length, e);
2905
+ }
2906
+ }
2907
+ validate(e, n) {
2908
+ return n >= 0 && n <= 59;
2909
+ }
2910
+ set(e, n, r) {
2911
+ return e.setSeconds(r, 0), e;
2912
+ }
2913
+ }
2914
+ class Ti extends f {
2915
+ constructor() {
2916
+ super(...arguments);
2917
+ c(this, "priority", 30);
2918
+ c(this, "incompatibleTokens", ["t", "T"]);
2919
+ }
2920
+ parse(e, n) {
2921
+ const r = (o) => Math.trunc(o * Math.pow(10, -n.length + 3));
2922
+ return v(x(n.length, e), r);
2923
+ }
2924
+ set(e, n, r) {
2925
+ return e.setMilliseconds(r), e;
2926
+ }
2927
+ }
2928
+ class Ri extends f {
2929
+ constructor() {
2930
+ super(...arguments);
2931
+ c(this, "priority", 10);
2932
+ c(this, "incompatibleTokens", ["t", "T", "x"]);
2933
+ }
2934
+ parse(e, n) {
2935
+ switch (n) {
2936
+ case "X":
2937
+ return O(
2938
+ k.basicOptionalMinutes,
2939
+ e
2940
+ );
2941
+ case "XX":
2942
+ return O(k.basic, e);
2943
+ case "XXXX":
2944
+ return O(
2945
+ k.basicOptionalSeconds,
2946
+ e
2947
+ );
2948
+ case "XXXXX":
2949
+ return O(
2950
+ k.extendedOptionalSeconds,
2951
+ e
2952
+ );
2953
+ default:
2954
+ return O(k.extended, e);
2955
+ }
2956
+ }
2957
+ set(e, n, r) {
2958
+ return n.timestampIsSet ? e : T(
2959
+ e,
2960
+ e.getTime() - G(e) - r
2961
+ );
2962
+ }
2963
+ }
2964
+ class Mi extends f {
2965
+ constructor() {
2966
+ super(...arguments);
2967
+ c(this, "priority", 10);
2968
+ c(this, "incompatibleTokens", ["t", "T", "X"]);
2969
+ }
2970
+ parse(e, n) {
2971
+ switch (n) {
2972
+ case "x":
2973
+ return O(
2974
+ k.basicOptionalMinutes,
2975
+ e
2976
+ );
2977
+ case "xx":
2978
+ return O(k.basic, e);
2979
+ case "xxxx":
2980
+ return O(
2981
+ k.basicOptionalSeconds,
2982
+ e
2983
+ );
2984
+ case "xxxxx":
2985
+ return O(
2986
+ k.extendedOptionalSeconds,
2987
+ e
2988
+ );
2989
+ default:
2990
+ return O(k.extended, e);
2991
+ }
2992
+ }
2993
+ set(e, n, r) {
2994
+ return n.timestampIsSet ? e : T(
2995
+ e,
2996
+ e.getTime() - G(e) - r
2997
+ );
2998
+ }
2999
+ }
3000
+ class Ci extends f {
3001
+ constructor() {
3002
+ super(...arguments);
3003
+ c(this, "priority", 40);
3004
+ c(this, "incompatibleTokens", "*");
3005
+ }
3006
+ parse(e) {
3007
+ return Ie(e);
3008
+ }
3009
+ set(e, n, r) {
3010
+ return [T(e, r * 1e3), { timestampIsSet: !0 }];
3011
+ }
3012
+ }
3013
+ class ki extends f {
3014
+ constructor() {
3015
+ super(...arguments);
3016
+ c(this, "priority", 20);
3017
+ c(this, "incompatibleTokens", "*");
3018
+ }
3019
+ parse(e) {
3020
+ return Ie(e);
3021
+ }
3022
+ set(e, n, r) {
3023
+ return [T(e, r), { timestampIsSet: !0 }];
3024
+ }
3025
+ }
3026
+ const Oi = {
3027
+ G: new Gn(),
3028
+ y: new Xn(),
3029
+ Y: new Bn(),
3030
+ R: new Vn(),
3031
+ u: new zn(),
3032
+ Q: new Un(),
3033
+ q: new Zn(),
3034
+ M: new Kn(),
3035
+ L: new ei(),
3036
+ w: new ni(),
3037
+ I: new ri(),
3038
+ d: new si(),
3039
+ D: new ci(),
3040
+ E: new ui(),
3041
+ e: new di(),
3042
+ c: new li(),
3043
+ i: new pi(),
3044
+ a: new hi(),
3045
+ b: new gi(),
3046
+ B: new wi(),
3047
+ h: new bi(),
3048
+ H: new yi(),
3049
+ K: new xi(),
3050
+ k: new Di(),
3051
+ m: new vi(),
3052
+ s: new Pi(),
3053
+ S: new Ti(),
3054
+ X: new Ri(),
3055
+ x: new Mi(),
3056
+ t: new Ci(),
3057
+ T: new ki()
3058
+ }, Ai = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Li = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ei = /^'([^]*?)'?$/, ji = /''/g, Ii = /\S/, Si = /[a-zA-Z]/;
3059
+ function Yi(t, i, e, n) {
3060
+ const r = () => T(n?.in || e, NaN), o = Wn(), s = n?.locale ?? o.locale ?? Re, u = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, l = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0;
3061
+ if (!i)
3062
+ return t ? r() : y(e, n?.in);
3063
+ const m = {
3064
+ firstWeekContainsDate: u,
3065
+ weekStartsOn: l,
3066
+ locale: s
3067
+ }, h = [new Jn(n?.in, e)], P = i.match(Li).map((d) => {
3068
+ const b = d[0];
3069
+ if (b in Z) {
3070
+ const R = Z[b];
3071
+ return R(d, s.formatLong);
3072
+ }
3073
+ return d;
3074
+ }).join("").match(Ai), E = [];
3075
+ for (let d of P) {
3076
+ !n?.useAdditionalWeekYearTokens && Ee(d) && K(d, i, t), !n?.useAdditionalDayOfYearTokens && Le(d) && K(d, i, t);
3077
+ const b = d[0], R = Oi[b];
3078
+ if (R) {
3079
+ const { incompatibleTokens: de } = R;
3080
+ if (Array.isArray(de)) {
3081
+ const le = E.find(
3082
+ (me) => de.includes(me.token) || me.token === b
3083
+ );
3084
+ if (le)
3085
+ throw new RangeError(
3086
+ `The format string mustn't contain \`${le.fullToken}\` and \`${d}\` at the same time`
3087
+ );
3088
+ } else if (R.incompatibleTokens === "*" && E.length > 0)
3089
+ throw new RangeError(
3090
+ `The format string mustn't contain \`${d}\` and any other token at the same time`
3091
+ );
3092
+ E.push({ token: b, fullToken: d });
3093
+ const B = R.run(
3094
+ t,
3095
+ d,
3096
+ s.match,
3097
+ m
3098
+ );
3099
+ if (!B)
3100
+ return r();
3101
+ h.push(B.setter), t = B.rest;
3102
+ } else {
3103
+ if (b.match(Si))
3104
+ throw new RangeError(
3105
+ "Format string contains an unescaped latin alphabet character `" + b + "`"
3106
+ );
3107
+ if (d === "''" ? d = "'" : b === "'" && (d = qi(d)), t.indexOf(d) === 0)
3108
+ t = t.slice(d.length);
3109
+ else
3110
+ return r();
3111
+ }
3112
+ }
3113
+ if (t.length > 0 && Ii.test(t))
3114
+ return r();
3115
+ const ct = h.map((d) => d.priority).sort((d, b) => b - d).filter((d, b, R) => R.indexOf(d) === b).map(
3116
+ (d) => h.filter((b) => b.priority === d).sort((b, R) => R.subPriority - b.subPriority)
3117
+ ).map((d) => d[0]);
3118
+ let S = y(e, n?.in);
3119
+ if (isNaN(+S)) return r();
3120
+ const ue = {};
3121
+ for (const d of ct) {
3122
+ if (!d.validate(S, m))
3123
+ return r();
3124
+ const b = d.set(S, ue, m);
3125
+ Array.isArray(b) ? (S = b[0], Object.assign(ue, b[1])) : S = b;
3126
+ }
3127
+ return S;
3128
+ }
3129
+ function qi(t) {
3130
+ return t.match(Ei)[1].replace(ji, "'");
3131
+ }
3132
+ function F(t, i) {
3133
+ const e = () => T(i?.in, NaN), r = _i(t);
3134
+ let o;
3135
+ if (r.date) {
3136
+ const m = Hi(r.date, 2);
3137
+ o = $i(m.restDateString, m.year);
3138
+ }
3139
+ if (!o || isNaN(+o)) return e();
3140
+ const s = +o;
3141
+ let u = 0, l;
3142
+ if (r.time && (u = Qi(r.time), isNaN(u)))
3143
+ return e();
3144
+ if (r.timezone) {
3145
+ if (l = Ji(r.timezone), isNaN(l)) return e();
3146
+ } else {
3147
+ const m = new Date(s + u), h = y(0, i?.in);
3148
+ return h.setFullYear(
3149
+ m.getUTCFullYear(),
3150
+ m.getUTCMonth(),
3151
+ m.getUTCDate()
3152
+ ), h.setHours(
3153
+ m.getUTCHours(),
3154
+ m.getUTCMinutes(),
3155
+ m.getUTCSeconds(),
3156
+ m.getUTCMilliseconds()
3157
+ ), h;
3158
+ }
3159
+ return y(s + u + l, i?.in);
3160
+ }
3161
+ const J = {
3162
+ dateTimeDelimiter: /[T ]/,
3163
+ timeZoneDelimiter: /[Z ]/i,
3164
+ timezone: /([Z+-].*)$/
3165
+ }, Ni = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, Fi = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Wi = /^([+-])(\d{2})(?::?(\d{2}))?$/;
3166
+ function _i(t) {
3167
+ const i = {}, e = t.split(J.dateTimeDelimiter);
3168
+ let n;
3169
+ if (e.length > 2)
3170
+ return i;
3171
+ if (/:/.test(e[0]) ? n = e[0] : (i.date = e[0], n = e[1], J.timeZoneDelimiter.test(i.date) && (i.date = t.split(J.timeZoneDelimiter)[0], n = t.substr(
3172
+ i.date.length,
3173
+ t.length
3174
+ ))), n) {
3175
+ const r = J.timezone.exec(n);
3176
+ r ? (i.time = n.replace(r[1], ""), i.timezone = r[1]) : i.time = n;
3177
+ }
3178
+ return i;
3179
+ }
3180
+ function Hi(t, i) {
3181
+ const e = new RegExp(
3182
+ "^(?:(\\d{4}|[+-]\\d{" + (4 + i) + "})|(\\d{2}|[+-]\\d{" + (2 + i) + "})$)"
3183
+ ), n = t.match(e);
3184
+ if (!n) return { year: NaN, restDateString: "" };
3185
+ const r = n[1] ? parseInt(n[1]) : null, o = n[2] ? parseInt(n[2]) : null;
3186
+ return {
3187
+ year: o === null ? r : o * 100,
3188
+ restDateString: t.slice((n[1] || n[2]).length)
3189
+ };
3190
+ }
3191
+ function $i(t, i) {
3192
+ if (i === null) return /* @__PURE__ */ new Date(NaN);
3193
+ const e = t.match(Ni);
3194
+ if (!e) return /* @__PURE__ */ new Date(NaN);
3195
+ const n = !!e[4], r = H(e[1]), o = H(e[2]) - 1, s = H(e[3]), u = H(e[4]), l = H(e[5]) - 1;
3196
+ if (n)
3197
+ return zi(i, u, l) ? Gi(i, u, l) : /* @__PURE__ */ new Date(NaN);
3198
+ {
3199
+ const m = /* @__PURE__ */ new Date(0);
3200
+ return !Bi(i, o, s) || !Vi(i, r) ? /* @__PURE__ */ new Date(NaN) : (m.setUTCFullYear(i, o, Math.max(r, s)), m);
3201
+ }
3202
+ }
3203
+ function H(t) {
3204
+ return t ? parseInt(t) : 1;
3205
+ }
3206
+ function Qi(t) {
3207
+ const i = t.match(Fi);
3208
+ if (!i) return NaN;
3209
+ const e = V(i[1]), n = V(i[2]), r = V(i[3]);
3210
+ return Ui(e, n, r) ? e * ne + n * te + r * 1e3 : NaN;
3211
+ }
3212
+ function V(t) {
3213
+ return t && parseFloat(t.replace(",", ".")) || 0;
3214
+ }
3215
+ function Ji(t) {
3216
+ if (t === "Z") return 0;
3217
+ const i = t.match(Wi);
3218
+ if (!i) return 0;
3219
+ const e = i[1] === "+" ? -1 : 1, n = parseInt(i[2]), r = i[3] && parseInt(i[3]) || 0;
3220
+ return Zi(n, r) ? e * (n * ne + r * te) : NaN;
3221
+ }
3222
+ function Gi(t, i, e) {
3223
+ const n = /* @__PURE__ */ new Date(0);
3224
+ n.setUTCFullYear(t, 0, 4);
3225
+ const r = n.getUTCDay() || 7, o = (i - 1) * 7 + e + 1 - r;
3226
+ return n.setUTCDate(n.getUTCDate() + o), n;
3227
+ }
3228
+ const Xi = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
3229
+ function Ne(t) {
3230
+ return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
3231
+ }
3232
+ function Bi(t, i, e) {
3233
+ return i >= 0 && i <= 11 && e >= 1 && e <= (Xi[i] || (Ne(t) ? 29 : 28));
3234
+ }
3235
+ function Vi(t, i) {
3236
+ return i >= 1 && i <= (Ne(t) ? 366 : 365);
3237
+ }
3238
+ function zi(t, i, e) {
3239
+ return i >= 1 && i <= 53 && e >= 0 && e <= 6;
3240
+ }
3241
+ function Ui(t, i, e) {
3242
+ return t === 24 ? i === 0 && e === 0 : e >= 0 && e < 60 && i >= 0 && i < 60 && t >= 0 && t < 25;
3243
+ }
3244
+ function Zi(t, i) {
3245
+ return i >= 0 && i <= 59;
3246
+ }
3247
+ const Ki = Date.prototype.toJSON, er = function() {
3248
+ try {
3249
+ const t = this.getHours(), i = this.getMinutes(), e = this.getSeconds(), n = this.getMilliseconds(), r = -(this.getTimezoneOffset() / 60);
3250
+ if (r === 0.15 && t === 0 && i === 9 && e === 21 || t - r === 0 && i === 0 && e === 0 && n === 0)
3251
+ return this.toISOString().split("T")[0];
3252
+ const o = new Date(
3253
+ this.getFullYear(),
3254
+ this.getMonth(),
3255
+ this.getDate(),
3256
+ t,
3257
+ i,
3258
+ e,
3259
+ n
3260
+ );
3261
+ o.setHours(this.getHours() + r);
3262
+ const s = o.toISOString().replace(/(\.0+)?Z$/, ""), u = r >= 0 ? "+" : "-", l = Math.abs(r) < 10 ? "0" : "";
3263
+ return s + u + l + Math.abs(r).toString().split(".")[0] + ":00";
3264
+ } catch {
3265
+ Date.prototype.toJSON = Ki;
3266
+ const t = this.toJSON();
3267
+ return Date.prototype.toJSON = er, t;
3268
+ }
3269
+ }, Sa = new Intl.DateTimeFormat("fr-FR", {
3270
+ day: "numeric",
3271
+ month: "long",
3272
+ weekday: "long",
3273
+ year: "numeric"
3274
+ }), tr = new Intl.DateTimeFormat("fr-FR", {
3275
+ day: "numeric",
3276
+ month: "short"
3277
+ }), nr = new Intl.DateTimeFormat("fr-FR", {
3278
+ hour: "numeric",
3279
+ minute: "2-digit"
3280
+ });
3281
+ function Ya(t, i) {
3282
+ return t instanceof Date ? t : typeof t == "string" ? F(t) : i;
3283
+ }
3284
+ function ir(t) {
3285
+ return Yi(t, "yyyy-MM-ddXXX", /* @__PURE__ */ new Date());
3286
+ }
3287
+ function qa(t) {
3288
+ const i = F(t);
3289
+ return t = re(i, "EEEE d LLLL yyyy H'h'mm", { locale: ae }), t.endsWith(" 0h00") && (t = t.substring(0, t.length - 5)), t;
3290
+ }
3291
+ function Na(t, i) {
3292
+ return t.getFullYear() === i.getFullYear() && t.getMonth() === i.getMonth() && t.getDate() === i.getDate() ? nr.format(t) : tr.format(t);
3293
+ }
3294
+ function Fa(t) {
3295
+ const i = t instanceof Date ? t : F(t);
3296
+ let e = re(i, "d LLLL yyyy H'h'mm", { locale: ae });
3297
+ return e.endsWith(" 0h00") && (e = e.substring(0, e.length - 5)), e;
3298
+ }
3299
+ function Wa(t) {
3300
+ const i = t instanceof Date ? t : F(t);
3301
+ return re(i, "H'h'mm", { locale: ae });
3302
+ }
3303
+ function _a(t) {
3304
+ return new Date(t.getTime() - t.getTimezoneOffset() * 6e4).toISOString().split("T")[0];
3305
+ }
3306
+ const rr = a.registry(), ar = a.registry(), or = a.registry();
3307
+ a.registry();
3308
+ a.registry();
3309
+ function Fe() {
3310
+ const t = a.string().trim().min(1, "UID cannot be empty");
3311
+ return rr.add(t, { targetType: "auto" }), t;
3312
+ }
3313
+ function Q() {
3314
+ const t = a.string().trim().min(1);
3315
+ return ar.add(t, { refType: "acteur" }), t;
3316
+ }
3317
+ function $() {
3318
+ const t = a.string().trim().min(1);
3319
+ return or.add(t, { refType: "organe" }), t;
3320
+ }
3321
+ const We = a.preprocess((t) => {
3322
+ if (t !== null && typeof t == "object" && t["@xsi:nil"] === "true" || typeof t != "string") return;
3323
+ const i = t.trim();
3324
+ if (i !== "") {
3325
+ if (i.includes("T"))
3326
+ try {
3327
+ return F(i);
3328
+ } catch {
3329
+ return t;
3330
+ }
3331
+ if (i.includes("+") || /\d{4}-\d{2}-\d{2}-\d{2}:\d{2}/.test(i))
3332
+ try {
3333
+ return ir(i);
3334
+ } catch {
3335
+ return t;
3336
+ }
3337
+ try {
3338
+ return F(i);
3339
+ } catch {
3340
+ return t;
3341
+ }
3342
+ }
3343
+ }, a.date().optional()), z = () => We, U = () => We.refine((t) => t !== void 0, { message: "Required" }).transform((t) => t), _e = a.preprocess((t) => {
3344
+ if (typeof t != "string") return t;
3345
+ const i = t.trim();
3346
+ return i === "" ? void 0 : i;
3347
+ }, a.string().optional()), Ha = (t) => {
3348
+ const i = _e;
3349
+ return t ? i.describe(t) : i;
3350
+ }, $a = (t) => {
3351
+ const i = _e.refine((e) => e !== void 0, { message: "Required" }).transform((e) => e);
3352
+ return t ? i.describe(t) : i;
3353
+ };
3354
+ function I(t) {
3355
+ return a.preprocess((i) => i == null ? [] : Array.isArray(i) ? i : [i], a.array(t));
3356
+ }
3357
+ const sr = [
3358
+ "Accord",
3359
+ "Sans objet"
3360
+ ], He = a.enum(
3361
+ sr
3362
+ ), cr = [
3363
+ "création",
3364
+ "modification",
3365
+ "suppression"
3366
+ ], _ = a.enum(cr), ur = ["B", "C", "D"], $e = a.enum(ur), dr = [
3367
+ "ANNEXE",
3368
+ "ARTICLE",
3369
+ "CHAPITRE",
3370
+ "TITRE"
3371
+ ], Qe = a.enum(dr), lr = [
3372
+ "Député",
3373
+ "Gouvernement",
3374
+ "Rapporteur"
3375
+ ], Je = a.enum(lr), mr = ["Dernier", "Milieu", "Premier"], Ge = a.enum(mr), fr = [
3376
+ "AC",
3377
+ "AT",
3378
+ "DI",
3379
+ "effacé",
3380
+ "ER",
3381
+ "ET",
3382
+ "IR",
3383
+ "IRR127",
3384
+ "IRR20",
3385
+ "IRR37",
3386
+ "IRR38",
3387
+ "IRR41",
3388
+ "IRR42",
3389
+ "IRR45",
3390
+ "IRR48",
3391
+ "IRR53",
3392
+ "IRRAI",
3393
+ "IRRAIF",
3394
+ "IRRD",
3395
+ "IRRHC",
3396
+ "IRRHD",
3397
+ "IRRSA",
3398
+ "R",
3399
+ "RT",
3400
+ "T"
3401
+ ], Xe = a.enum(fr), pr = [
3402
+ "A discuter",
3403
+ "A déposer",
3404
+ "Discuté",
3405
+ "effacé",
3406
+ "En recevabilité",
3407
+ "En traitement",
3408
+ "Irrecevable",
3409
+ "Irrecevable 40",
3410
+ "Retiré"
3411
+ ], hr = a.enum(pr), gr = [
3412
+ "Adopté",
3413
+ "Autre irrecevabilité",
3414
+ "Autre irrecevabilité 40",
3415
+ "Autres irr LOLF",
3416
+ "Autres irr LOLFSS",
3417
+ "Cavalier (45)",
3418
+ "Cavalier budgétaire",
3419
+ "Cavalier social",
3420
+ "Champ de l'habilitation (38)",
3421
+ "Charge",
3422
+ "CMP (45)",
3423
+ "Crédits",
3424
+ "Disposition réglementaire (37)",
3425
+ "Domaine de la loi (41)",
3426
+ "Domaine loi organique (127)",
3427
+ "Doublon",
3428
+ "Entonnoir (45)",
3429
+ "Gage",
3430
+ "Hors champ",
3431
+ "Hors-délais",
3432
+ "Injonction (20)",
3433
+ "Irr en première partie",
3434
+ "Irr en seconde partie",
3435
+ "LOLF",
3436
+ "LOLFSS",
3437
+ "Non soutenu",
3438
+ "Ordre du jour (48)",
3439
+ "R",
3440
+ "Ratification traité (53)",
3441
+ "Rejeté",
3442
+ "Retiré",
3443
+ "Retiré après publication",
3444
+ "Retiré avant publication",
3445
+ "Satisfait ou inopérant (42)",
3446
+ "Sous-amendement (98)",
3447
+ "Tombé"
3448
+ ], Be = a.enum(gr), wr = ["A", "Après", "Avant"], br = a.enum(wr), yr = ["PDF"], Ve = a.enum(yr), xr = ["application"], Dr = a.enum(xr), g = a.object({
3449
+ "@xmlns:xsi": a.string(),
3450
+ "@xsi:nil": a.string()
3451
+ }), ye = a.object({
3452
+ id: a.string(),
3453
+ libelle: a.string(),
3454
+ autorisationEngagement: a.string(),
3455
+ creditPaiement: a.string(),
3456
+ action: _
3457
+ }), vr = a.object({
3458
+ "@xmlns:xsi": a.string().optional(),
3459
+ "@xsi:nil": a.string().optional(),
3460
+ ligneCredit: a.union([I(ye), ye]).optional().transform((t) => {
3461
+ if (t !== void 0)
3462
+ return Array.isArray(t) ? t : [t];
3463
+ })
3464
+ }), Pr = a.object({
3465
+ libelle: a.string(),
3466
+ programmeRef: a.string(),
3467
+ autorisationEngagement: a.string(),
3468
+ creditPaiement: a.string(),
3469
+ action: _,
3470
+ lignesCredits: vr
3471
+ }), Tr = a.object({
3472
+ programme: I(Pr)
3473
+ }), ze = a.object({
3474
+ listeProgrammes: Tr.optional(),
3475
+ soldeAE: a.string().optional(),
3476
+ soldeCP: a.string().optional(),
3477
+ cpEgalAe: a.string()
3478
+ }), ee = a.lazy(
3479
+ () => a.object({
3480
+ libelle: a.string(),
3481
+ programmeRef: a.string().optional(),
3482
+ autorisationEngagementSupplementaire: a.string(),
3483
+ creditPaiementSupplementaire: a.string(),
3484
+ autorisationEngagementAnnule: a.string(),
3485
+ creditPaiementAnnule: a.string(),
3486
+ action: _,
3487
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
3488
+ lignesCredits: Rr.optional(),
3489
+ id: a.string().optional()
3490
+ })
3491
+ ), Rr = a.object({
3492
+ "@xmlns:xsi": a.string().optional(),
3493
+ "@xsi:nil": a.string().optional(),
3494
+ ligneCredit: a.union([
3495
+ I(ee),
3496
+ ee
3497
+ ]).optional().transform((t) => {
3498
+ if (t !== void 0)
3499
+ return Array.isArray(t) ? t : [t];
3500
+ })
3501
+ }), xe = a.object({
3502
+ supplementaire: a.string(),
3503
+ annule: a.string(),
3504
+ solde: a.string()
3505
+ }), Mr = a.object({
3506
+ programme: I(ee)
3507
+ }), Ue = a.object({
3508
+ listeProgrammes: Mr.optional(),
3509
+ totalAE: xe.optional(),
3510
+ totalCP: xe.optional(),
3511
+ cpEgalAe: a.string()
3512
+ }), Cr = a.object({
3513
+ "@xmlns:xsi": a.string().optional(),
3514
+ "@xsi:nil": a.string().optional(),
3515
+ dispositif: a.string().optional(),
3516
+ dispositifAmdtCreditPLF: ze.optional(),
3517
+ dispositifAmdtCreditPLFR: Ue.optional()
3518
+ }), kr = a.object({
3519
+ dispositif: a.string().optional(),
3520
+ avantAppel: Cr.optional(),
3521
+ exposeSommaire: a.string().optional(),
3522
+ annexeExposeSommaire: g.optional(),
3523
+ "@xmlns:xsi": a.string().optional(),
3524
+ "@xsi:nil": a.string().optional(),
3525
+ dispositifAmdtCreditPLF: ze.optional(),
3526
+ dispositifAmdtCreditPLFR: Ue.optional()
3527
+ }), Or = a.object({
3528
+ cartoucheInformatif: a.union([g, a.string()]).optional(),
3529
+ contenuAuteur: kr.optional(),
3530
+ "@xmlns:xsi": a.string().optional(),
3531
+ "@xsi:nil": a.string().optional()
3532
+ }), Ar = a.object({
3533
+ code: Xe,
3534
+ libelle: hr
3535
+ }), Lr = a.object({
3536
+ code: Xe.optional(),
3537
+ libelle: Be.optional(),
3538
+ "@xmlns:xsi": a.string().optional(),
3539
+ "@xsi:nil": a.string().optional()
3540
+ }), Er = a.object({
3541
+ etat: Ar,
3542
+ sousEtat: Lr
3543
+ }), jr = a.object({
3544
+ dateDepot: a.union([g, U()]).optional().transform((t) => {
3545
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3546
+ return t;
3547
+ }),
3548
+ datePublication: a.union([g, U()]).optional().transform((t) => {
3549
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3550
+ return t;
3551
+ }),
3552
+ soumisArticle40: a.string(),
3553
+ etatDesTraitements: Er,
3554
+ dateSort: a.union([g, U()]).optional().transform((t) => {
3555
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3556
+ return t;
3557
+ }),
3558
+ sort: a.union([g, Be]).optional().transform((t) => {
3559
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3560
+ return t;
3561
+ })
3562
+ }), De = a.object({
3563
+ "@xmlns:xsi": a.string().optional(),
3564
+ "@xsi:nil": a.string().optional(),
3565
+ idDiscussion: a.string().optional(),
3566
+ typePosition: Ge.optional()
3567
+ }), Ir = a.object({
3568
+ numeroLong: a.string(),
3569
+ numeroOrdreDepot: a.string(),
3570
+ prefixeOrganeExamen: a.string(),
3571
+ numeroRect: a.string()
3572
+ }), Sr = a.object({
3573
+ "@xmlns:xsi": a.string().optional(),
3574
+ "@xsi:nil": a.string().optional(),
3575
+ codeLoi: a.union([g, a.null(), a.string()]).optional(),
3576
+ divisionCodeLoi: a.union([g, a.null(), a.string()]).optional()
3577
+ }), Yr = a.object({
3578
+ "@xmlns:xsi": a.string().optional(),
3579
+ "@xsi:nil": a.string().optional(),
3580
+ avant_A_Apres: a.union([g, a.null(), a.string()]).optional(),
3581
+ numero: a.union([g, a.string()]).optional(),
3582
+ alineaDesignation: a.string().optional()
3583
+ }), qr = a.object({
3584
+ alinea: Yr
3585
+ }), Nr = a.object({
3586
+ titre: a.string().nullable(),
3587
+ articleDesignationCourte: a.string().nullable(),
3588
+ articleDesignation: a.string().nullable(),
3589
+ type: Qe,
3590
+ avant_A_Apres: br,
3591
+ divisionRattachee: a.union([g, a.string()]),
3592
+ articleAdditionnel: a.string(),
3593
+ chapitreAdditionnel: a.string(),
3594
+ urlDivisionTexteVise: a.union([
3595
+ g,
3596
+ a.string()
3597
+ ])
3598
+ }), Fr = a.object({
3599
+ codeEtat: $e,
3600
+ codeMissionMinefi: a.string(),
3601
+ libelleMission: a.string(),
3602
+ missionRef: a.string()
3603
+ }), Wr = a.object({
3604
+ partieAmendableRef: g,
3605
+ division: Nr.optional(),
3606
+ amendementStandard: qr.optional(),
3607
+ missionVisee: Fr.optional()
3608
+ }), _r = a.object({
3609
+ documentURI: a.string()
3610
+ }), Hr = a.object({
3611
+ verbatim: a.string(),
3612
+ canonique: a.string(),
3613
+ officielle: a.string(),
3614
+ transcription: a.string(),
3615
+ enregistrement: a.string()
3616
+ }), $r = a.object({
3617
+ type: Dr,
3618
+ subType: Ve
3619
+ }), Qr = a.object({
3620
+ nom: Ve,
3621
+ typeMime: $r,
3622
+ statutRepresentation: Hr,
3623
+ repSource: g,
3624
+ offset: g,
3625
+ contenu: _r,
3626
+ dateDispoRepresentation: g
3627
+ }), Jr = a.object({
3628
+ representation: Qr
3629
+ }), Gr = a.object({
3630
+ typeAuteur: Je,
3631
+ gouvernementRef: a.union([g, a.string()]).optional().transform((t) => {
3632
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3633
+ return t;
3634
+ }),
3635
+ acteurRef: a.union([g, Q()]).optional().transform((t) => {
3636
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3637
+ return t;
3638
+ }),
3639
+ groupePolitiqueRef: a.union([g, $()]).optional().transform((t) => {
3640
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3641
+ return t;
3642
+ }),
3643
+ auteurRapporteurOrganeRef: a.union([g, $()]).optional().transform((t) => {
3644
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3645
+ return t;
3646
+ })
3647
+ }), Xr = a.object({
3648
+ "@xmlns:xsi": a.string().optional(),
3649
+ "@xsi:nil": a.string().optional(),
3650
+ acteurRef: a.union([I(Q()), Q()]).optional().transform((t) => {
3651
+ if (t !== void 0)
3652
+ return Array.isArray(t) ? t : [t];
3653
+ })
3654
+ }), Br = a.object({
3655
+ auteur: Gr,
3656
+ cosignataires: Xr,
3657
+ suffixe: a.union([g, a.string()]).optional().transform((t) => {
3658
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3659
+ return t;
3660
+ }),
3661
+ libelle: a.string().nullable()
3662
+ }), Ze = a.object({
3663
+ "@xmlns": a.string(),
3664
+ uid: Fe(),
3665
+ chronotag: a.string(),
3666
+ legislature: a.string(),
3667
+ identification: Ir,
3668
+ examenRef: a.string(),
3669
+ texteLegislatifRef: a.string(),
3670
+ triAmendement: a.union([g, a.string()]).optional().transform((t) => {
3671
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3672
+ return t;
3673
+ }),
3674
+ cardinaliteAmdtMultiples: a.union([g, a.string()]).optional().transform((t) => {
3675
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3676
+ return t;
3677
+ }),
3678
+ amendementParentRef: a.union([g, a.string()]).optional().transform((t) => {
3679
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3680
+ return t;
3681
+ }),
3682
+ signataires: Br,
3683
+ pointeurFragmentTexte: Wr,
3684
+ corps: Or,
3685
+ cycleDeVie: jr,
3686
+ representations: Jr.nullable(),
3687
+ seanceDiscussionRef: a.union([g, a.string()]).optional().transform((t) => {
3688
+ if (t !== void 0 && !(typeof t == "object" && "@xsi:nil" in t))
3689
+ return t;
3690
+ }),
3691
+ article99: a.string(),
3692
+ loiReference: Sr,
3693
+ discussionCommune: De,
3694
+ discussionIdentique: De,
3695
+ accordGouvernementDepotHorsDelai: He
3696
+ });
3697
+ a.object({
3698
+ amendement: Ze
3699
+ });
3700
+ const Vr = a.object({
3701
+ amendement: I(Ze)
3702
+ }), zr = a.object({
3703
+ "@xmlns:xsi": a.string(),
3704
+ refTexteLegislatif: a.string(),
3705
+ amendements: Vr
3706
+ });
3707
+ a.object({
3708
+ textesLegislatifs: I(zr)
3709
+ });
3710
+ const Ur = [
3711
+ "AC",
3712
+ "AT",
3713
+ "DI",
3714
+ "effacé",
3715
+ "ER",
3716
+ "ET",
3717
+ "IR",
3718
+ "IRR127",
3719
+ "IRR20",
3720
+ "IRR37",
3721
+ "IRR38",
3722
+ "IRR41",
3723
+ "IRR42",
3724
+ "IRR45",
3725
+ "IRR48",
3726
+ "IRR53",
3727
+ "IRRAI",
3728
+ "IRRAIF",
3729
+ "IRRD",
3730
+ "IRRHC",
3731
+ "IRRHD",
3732
+ "IRRSA",
3733
+ "R",
3734
+ "RT",
3735
+ "T"
3736
+ ], Ke = a.enum(Ur), Zr = [
3737
+ "A discuter",
3738
+ "A déposer",
3739
+ "Discuté",
3740
+ "effacé",
3741
+ "En recevabilité",
3742
+ "En traitement",
3743
+ "Irrecevable",
3744
+ "Irrecevable 40",
3745
+ "Retiré"
3746
+ ], Kr = a.enum(Zr), ea = [
3747
+ "Adopté",
3748
+ "Autre irrecevabilité",
3749
+ "Autre irrecevabilité 40",
3750
+ "Autres irr LOLF",
3751
+ "Autres irr LOLFSS",
3752
+ "Cavalier (45)",
3753
+ "Cavalier budgétaire",
3754
+ "Cavalier social",
3755
+ "Champ de l'habilitation (38)",
3756
+ "Charge",
3757
+ "CMP (45)",
3758
+ "Crédits",
3759
+ "Disposition réglementaire (37)",
3760
+ "Domaine de la loi (41)",
3761
+ "Domaine loi organique (127)",
3762
+ "Doublon",
3763
+ "Entonnoir (45)",
3764
+ "Gage",
3765
+ "Hors champ",
3766
+ "Hors-délais",
3767
+ "Injonction (20)",
3768
+ "Irr en première partie",
3769
+ "Irr en seconde partie",
3770
+ "LOLF",
3771
+ "LOLFSS",
3772
+ "Non soutenu",
3773
+ "Ordre du jour (48)",
3774
+ "R",
3775
+ "Ratification traité (53)",
3776
+ "Rejeté",
3777
+ "Retiré",
3778
+ "Retiré après publication",
3779
+ "Retiré avant publication",
3780
+ "Satisfait ou inopérant (42)",
3781
+ "Sous-amendement (98)",
3782
+ "Tombé"
3783
+ ], et = a.enum(ea), ta = ["A", "Apres", "Avant"], tt = a.enum(ta), na = ["PDF"], nt = a.enum(na), ia = ["application"], ra = a.enum(ia), aa = a.object({
3784
+ id: a.string().meta({ description: "La signification de ce champ n'est pas définie." }),
3785
+ libelle: a.string().meta({
3786
+ description: "Libellé de la ligne de crédit dont le montant doit être modifié."
3787
+ }),
3788
+ autorisationEngagement: a.string().meta({
3789
+ description: "Modification de {@link https://fr.wikipedia.org/wiki/Autorisation_d%27engagement | l'autorisation d'engagement} de la ligne de crédit."
3790
+ }),
3791
+ creditPaiement: a.string().meta({
3792
+ description: "Modification du {@link https://fr.wikipedia.org/wiki/Cr%C3%A9dit_de_paiement | crédit de paiement} de la ligne de crédit."
3793
+ }),
3794
+ action: _
3795
+ }), oa = a.object({
3796
+ libelle: a.string().meta({
3797
+ description: "Libellé du programme qui doit être modifié par l'**action**."
3798
+ }),
3799
+ programmeRef: a.string().meta({ description: "La signification de ce champ n'est pas définie." }),
3800
+ autorisationEngagement: a.string().meta({
3801
+ description: "Modification de {@link https://fr.wikipedia.org/wiki/Autorisation_d%27engagement | l'autorisation d'engagement}."
3802
+ }),
3803
+ creditPaiement: a.string().meta({
3804
+ description: "Modification du {@link https://fr.wikipedia.org/wiki/Cr%C3%A9dit_de_paiement | crédit de paiement}."
3805
+ }),
3806
+ action: _.meta({
3807
+ description: "'creation' s'il s'agit d'un nouveau programme, 'suppression' si le programme doit être supprimé, 'modification' si les montants du programme doivent être modifiés."
3808
+ }),
3809
+ lignesCredits: a.array(aa).optional().meta({
3810
+ description: "Liste des lignes de crédit appartenant au programme, le cas échéant."
3811
+ })
3812
+ }), it = a.object({
3813
+ listeProgrammes: a.array(oa).optional().meta({
3814
+ description: "Liste des programmes composant la mission et des modifications à y apporter. Tous les programmes de la mission sont inclus, même s'ils ne sont pas modifiés (auquel cas les montants des champs **AE** et **CP** sont zero)."
3815
+ }),
3816
+ soldeAE: a.string().optional(),
3817
+ soldeCP: a.string().optional(),
3818
+ cpEgalAe: a.string()
3819
+ }), rt = a.lazy(
3820
+ () => a.object({
3821
+ libelle: a.string(),
3822
+ programmeRef: a.string().optional(),
3823
+ autorisationEngagementSupplementaire: a.string(),
3824
+ creditPaiementSupplementaire: a.string(),
3825
+ autorisationEngagementAnnule: a.string(),
3826
+ creditPaiementAnnule: a.string(),
3827
+ action: _,
3828
+ lignesCredits: a.array(rt).optional(),
3829
+ id: a.string().optional()
3830
+ })
3831
+ ), ve = a.object({
3832
+ supplementaire: a.string().meta({ description: "Montant à ajouter. Nombre positif." }),
3833
+ annule: a.string().meta({ description: "Montant à soustraire. Nombre positif." }),
3834
+ solde: a.string().meta({
3835
+ description: "Résultat de la soustraction **montantPositif** - **montantNegatif**."
3836
+ })
3837
+ }), at = a.object({
3838
+ listeProgrammes: a.array(rt).optional(),
3839
+ totalAE: ve.optional(),
3840
+ totalCP: ve.optional(),
3841
+ cpEgalAe: a.string()
3842
+ }), sa = a.object({
3843
+ dispositif: a.string().optional().meta({
3844
+ description: "Contenu originel du champ **dispositif** dans le cas ou un amendement est modifiée avant qu'il soit {@link http://www2.assemblee-nationale.fr/decouvrir-l-assemblee/role-et-pouvoirs-de-l-assemblee-nationale/les-fonctions-de-l-assemblee-nationale/les-fonctions-legislatives/l-exercice-du-droit-d-amendement-et-annexe#eztoc43696_0_0_2 | appelé}."
3845
+ }),
3846
+ dispositifAmdtCreditPLF: it.optional(),
3847
+ dispositifAmdtCreditPLFR: at.optional()
3848
+ }), ca = a.object({
3849
+ dispositif: a.string().optional().meta({
3850
+ description: "Description exhaustive des modifications apportées au texte original, au format HTML."
3851
+ }),
3852
+ avantAppel: sa.optional(),
3853
+ exposeSommaire: a.string().optional().meta({
3854
+ description: "Exposé sommaire des motifs justifiant l'amendement, au format HTML."
3855
+ }),
3856
+ dispositifAmdtCreditPLF: it.optional(),
3857
+ dispositifAmdtCreditPLFR: at.optional()
3858
+ }), ua = a.object({
3859
+ cartoucheInformatif: a.string().optional().meta({ description: "La signification de ce champ est indéfinie." }),
3860
+ contenuAuteur: ca.optional()
3861
+ }), da = a.object({
3862
+ code: Ke,
3863
+ libelle: Kr.meta({
3864
+ description: "Étape du {@link http://www2.assemblee-nationale.fr/decouvrir-l-assemblee/role-et-pouvoirs-de-l-assemblee-nationale/les-fonctions-de-l-assemblee-nationale/les-fonctions-legislatives/l-exercice-du-droit-d-amendement-et-annexe | cycle de vie de l'amendement}."
3865
+ })
3866
+ }), la = a.object({
3867
+ code: Ke,
3868
+ libelle: et
3869
+ }), ma = a.object({
3870
+ etat: da,
3871
+ sousEtat: la.optional()
3872
+ }), fa = a.object({
3873
+ dateDepot: z().meta({ description: "Date de dépôt" }),
3874
+ datePublication: z().meta({
3875
+ description: "Date de publication"
3876
+ }),
3877
+ soumisArticle40: a.string(),
3878
+ etatDesTraitements: ma.meta({
3879
+ description: "Étape du {@link http://www2.assemblee-nationale.fr/decouvrir-l-assemblee/role-et-pouvoirs-de-l-assemblee-nationale/les-fonctions-de-l-assemblee-nationale/les-fonctions-legislatives/l-exercice-du-droit-d-amendement-et-annexe | cycle de vie de l'amendement}."
3880
+ }),
3881
+ dateSort: z().meta({
3882
+ description: "Date du sort"
3883
+ }),
3884
+ sort: et.optional().meta({
3885
+ description: "'Adopté' si l'amendement est adopté, 'Non soutenu' si l'amendement n'a pas été soutenu par son auteur lorsqu'il a été appelé, 'Rejeté' si le vote a rejeté l'amendement, 'Retiré' si l'amendement a été retiré après avoir été déposé et avant d'avoir été appelé, 'Tombé' lorsque l'amendement est {@link http://www2.assemblee-nationale.fr/decouvrir-l-assemblee/role-et-pouvoirs-de-l-assemblee-nationale/les-fonctions-de-l-assemblee-nationale/les-fonctions-legislatives/l-exercice-du-droit-d-amendement-et-annexe | rendu sans objet} en raison du vote d'un amendement appelé avant lui."
3886
+ })
3887
+ }), Pe = a.object({
3888
+ idDiscussion: a.string().optional(),
3889
+ typePosition: Ge.optional()
3890
+ }), pa = a.object({
3891
+ numeroLong: a.string().meta({
3892
+ description: "Libelle désignant l'amendement et incluant son numéro (correspondant au champ **numero**), une indication du nombre de rectifications qui lui ont été apportés (correspondant au champ **identifiant.numRect** et {@link https://forum.en-root.org/t/signification-du-champ-numerolong-dans-un-amendement/163 | d'autres informations} dérivées du champ **identifiant**."
3893
+ }),
3894
+ numeroOrdreDepot: a.string().meta({
3895
+ description: "Numéro de dépôt attribué selon l'ordre d'arrivée des amendements. Il est unique pour un texte donné et il ne change pas lorsque l'amendement est {@link http://www.senat.fr/fileadmin/Fichiers/Images/seance/Guide_amendements_MAJ_Mars__2016.pdf | rectifié}."
3896
+ }),
3897
+ prefixeOrganeExamen: a.string().meta({
3898
+ description: "L'identifiant unique de {@link Organe | l'organe} auprès duquel l'amendement est déposé (i.e. l'assemblée ou une commission)."
3899
+ }),
3900
+ numeroRect: a.string().meta({
3901
+ description: "Reflète le nombre de {@link http://www.senat.fr/fileadmin/Fichiers/Images/seance/Guide_amendements_MAJ_Mars__2016.pdf | rectifications} apportées à l'amendement. 0: aucune rectification, 1: une rectification, 50: deux rectifications, 51: trois rectifications, 52: quatre rectifications."
3902
+ })
3903
+ }), ha = a.object({
3904
+ codeLoi: a.string().optional(),
3905
+ divisionCodeLoi: a.string().optional()
3906
+ }), ga = a.object({
3907
+ avantAApres: tt.optional().meta({
3908
+ description: "Avant: un ajout avant l'alinéa **numero**, Après: un ajout avant après l'alinéa **numero**, A: une modification ou suppression de l'alinéa **numero** et suivants le cas échéant"
3909
+ }),
3910
+ numero: a.string().optional().meta({
3911
+ description: "Numéro de l'alinéa. Pour le calcul des alinéas au sein d'un amendement sous-amendé, le {@link https://fr.wikipedia.org/wiki/Chapeau_(presse) | chapeau} de l'amendement est décomptée comme un alinéa."
3912
+ }),
3913
+ alineaDesignation: a.string().optional().meta({
3914
+ description: "Texte complémentaire qui est ajouté au {@link https://fr.wikipedia.org/wiki/Chapeau_(presse) | chapeau} de l'amendement (qui se trouve dans le champ divisionRattachee) et qui précise éventuellement l'emplacement de l'alinéa visé par l'amendement."
3915
+ })
3916
+ }), wa = a.object({
3917
+ titre: a.string().optional().meta({
3918
+ description: "Libellé de la division qui est visé par l'amendement (voir aussi le champ type)."
3919
+ }),
3920
+ articleDesignationCourte: a.string().optional().meta({
3921
+ description: "Version courte du {@link https://fr.wikipedia.org/wiki/Chapeau_(presse) | chapeau} de l'amendement, c'est dire le contenu du champ divisionRattachee."
3922
+ }),
3923
+ articleDesignation: a.string().optional(),
3924
+ type: Qe.meta({
3925
+ description: "Division du texte visée par l'amendement."
3926
+ }),
3927
+ avantAApres: tt.meta({
3928
+ description: "Avant: un ajout avant la division visée par l'amendement, Après: un ajout avant après la division visée par l'amendement, A: une modification ou suppression la division visée par l'amendement."
3929
+ }),
3930
+ divisionRattachee: a.string().optional().meta({
3931
+ description: "{@link https://fr.wikipedia.org/wiki/Chapeau_(presse) | Chapeau} de l'amendement, décrivant précisément l'emplacement du texte modifié par l'amendement et l'action (modifier, supprimer, insérer)."
3932
+ }),
3933
+ articleAdditionnel: a.string().meta({ description: "Égal à 1 si l'amendement rajoute un article." }),
3934
+ chapitreAdditionnel: a.string().meta({ description: "Égal à 1 si l'amendement rajoute un chapitre." }),
3935
+ urlDivisionTexteVise: a.string().optional().meta({
3936
+ description: "URL du texte sur http://www.assemblee-nationale.fr, y compris le fragment qui désigne la division visée par l'amendement, tel que décrite dans le champ divisionRattachee."
3937
+ })
3938
+ }), ba = a.object({
3939
+ codeEtat: $e.meta({
3940
+ description: "Code de l'état du projet de loi de finance sur lequel l'amendement a un impact indirect. Par exemple {@link http://www.assemblee-nationale.fr/15/textes/1490.asp#D_Etat_B | l'état B du PLF 2019}. Correspond exactement au champ libelleMissionPLF."
3941
+ }),
3942
+ codeMissionMinefi: a.string().meta({ description: "La signification de ce champ n'est pas définie" }),
3943
+ libelleMission: a.string().meta({
3944
+ description: "Libellé de la mission, à l'intérieur de l'état désigné par codeMissionPLF, sur laquelle l'amendement a un impact indirect."
3945
+ }),
3946
+ missionRef: a.string().meta({
3947
+ description: "Libellé de l'état du projet de loi de finance sur lequel l'amendement a un impact indirect. Par exemple la {@link http://www.assemblee-nationale.fr/15/textes/1490.asp#D_Etat_B | RÉPARTITION, PAR MISSION ET PROGRAMME, DES CRÉDITS DU BUDGET GÉNÉRAL du PLF 2019}. Correspond exactement au champ codeMissionPLF."
3948
+ })
3949
+ }), ya = a.object({
3950
+ division: wa.optional().meta({
3951
+ description: "Partie du texte visé par l'amendement, éventuellement précisé par l'alinéa (voir le champ alinea)."
3952
+ }),
3953
+ alinea: ga.optional().meta({
3954
+ description: "L'alinéa sur lequel porte la modification, à l'intérieur d'une division du texte (voir le champ division)."
3955
+ }),
3956
+ missionVisee: ba.optional().meta({
3957
+ description: "{@link https://www.performance-publique.budget.gouv.fr/ressources-documentaires/documentation-budgetaire/chiffres-cles-budget-etat | Mission} du projet de loi de finance visé par l'amendement."
3958
+ })
3959
+ }), xa = a.object({
3960
+ documentURI: a.string().meta({
3961
+ description: "Chemin de l'amendement qui permet de composer son URL sur ce modèle: http://www.assemblee-nationale.fr/__documentURI__."
3962
+ })
3963
+ }), Da = a.object({
3964
+ verbatim: a.boolean().meta({ description: "La signification de ce champ est indéfinie." }),
3965
+ canonique: a.boolean().meta({ description: "La signification de ce champ est indéfinie." }),
3966
+ officielle: a.boolean().meta({ description: "La signification de ce champ est indéfinie." }),
3967
+ transcription: a.boolean().meta({ description: "La signification de ce champ est indéfinie." }),
3968
+ enregistrement: a.boolean().meta({ description: "La signification de ce champ est indéfinie." })
3969
+ }), va = a.object({
3970
+ type: ra.meta({
3971
+ description: "Type MIME principal, par exemple 'application'."
3972
+ }),
3973
+ subType: nt.meta({
3974
+ description: "Sous-type MIME, par exemple 'pdf'."
3975
+ })
3976
+ }), Pa = a.object({
3977
+ nom: nt.meta({ description: "Format du document." }),
3978
+ typeMime: va.meta({ description: "Type MIME du document." }),
3979
+ statutRepresentation: Da.meta({
3980
+ description: "La signification de ces champs est indéfinie."
3981
+ }),
3982
+ contenu: xa
3983
+ }), Ta = a.object({
3984
+ typeAuteur: Je.meta({
3985
+ description: "'Depute' si l'auteur dépose l'amendement en sa qualité de député, 'Gouvernement' s'il le fait au nom du gouvernement, 'Rapporteur' s'il est le rapporteur de la commission désignée par **organeRef**."
3986
+ }),
3987
+ gouvernementRef: $().optional().meta({
3988
+ description: "Référence au gouvernement"
3989
+ }),
3990
+ acteurRef: Q().optional().meta({
3991
+ description: "Référence à l'acteur"
3992
+ }),
3993
+ groupePolitiqueRef: $().optional().meta({
3994
+ description: "Référence au groupe politique"
3995
+ }),
3996
+ auteurRapporteurOrganeRef: $().optional().meta({
3997
+ description: "Référence à l'organe du rapporteur"
3998
+ })
3999
+ }), Ra = a.object({
4000
+ auteur: Ta.meta({
4001
+ description: "Auteur de l'amendement ainsi que son mandat et son affiliation."
4002
+ }),
4003
+ cosignatairesRefs: a.array(Q()).optional().meta({
4004
+ description: "Référence au cosignataire"
4005
+ }),
4006
+ suffixe: a.string().optional(),
4007
+ libelle: a.string().optional().meta({
4008
+ description: "Les noms de l'auteur et des co-signataires de l'amendement."
4009
+ })
4010
+ }), ot = a.object({
4011
+ schemaVersion: a.string().optional(),
4012
+ uid: Fe().meta({ description: "Identifiant unique de l'amendement" }),
4013
+ chronotag: a.string(),
4014
+ legislature: a.string(),
4015
+ identification: pa,
4016
+ examenRef: a.string(),
4017
+ texteLegislatifRef: a.string(),
4018
+ triAmendement: a.string().optional().meta({
4019
+ description: "Lorsque tous les amendements visant un texte de loi sont triés sur cette clé, cela détermine leur ordre d'appel."
4020
+ }),
4021
+ cardinaliteAmdtMultiples: a.string().optional().meta({ description: "Le contenu de ce champ n'est pas défini." }),
4022
+ amendementParentRef: a.string().optional().meta({
4023
+ description: "L'identifiant unique (uid) de l'amendement modifié par un {@link http://www2.assemblee-nationale.fr/decouvrir-l-assemblee/role-et-pouvoirs-de-l-assemblee-nationale/les-fonctions-de-l-assemblee-nationale/les-fonctions-legislatives/l-exercice-du-droit-d-amendement-et-annexe | sous amendement}. Les amendements peuvent faire l'objet de sous-amendements qui doivent respecter les mêmes règles formelles que les amendements."
4024
+ }),
4025
+ signataires: Ra,
4026
+ pointeurFragmentTexte: ya,
4027
+ corps: ua.optional(),
4028
+ cycleDeVie: fa,
4029
+ representation: Pa.optional(),
4030
+ seanceDiscussionRef: a.string().optional().meta({
4031
+ description: "Identifiant unique (uid) de la {@link Reunion | séance durant laquelle l'amendement a été discuté}."
4032
+ }),
4033
+ article99: a.string().meta({
4034
+ description: "Amendement déposé par le rapporteur d'une commission ou le gouvernement, après le délai imposé aux députés, en application de {@link http://www2.assemblee-nationale.fr/decouvrir-l-assemblee/textes-de-reference/reglement-de-l-assemblee-nationale/titre-ii/premiere-partie/chapitre-iv/article-99 | l'alinéa 2 de l'article 99 du règlement de l'assemblée nationale}"
4035
+ }),
4036
+ loiReference: ha.optional().meta({
4037
+ description: "La signification de ce champ est indéfinie."
4038
+ }),
4039
+ discussionCommune: Pe.optional(),
4040
+ discussionIdentique: Pe.optional(),
4041
+ accordGouvernementDepotHorsDelai: He
4042
+ }), st = a.object({
4043
+ refTexteLegislatif: a.string(),
4044
+ amendements: a.array(ot)
4045
+ }), Ma = a.object({
4046
+ textesLegislatifs: a.array(st)
4047
+ });
4048
+ function Ca(t) {
4049
+ const i = ot.safeParse(JSON.parse(t));
4050
+ if (!i.success)
4051
+ throw new Error(ce("AmendementClean", i.error));
4052
+ return i.data;
4053
+ }
4054
+ function ka(t) {
4055
+ const i = st.safeParse(JSON.parse(t));
4056
+ if (!i.success)
4057
+ throw new Error(ce("TexteLegislatifClean", i.error));
4058
+ return i.data;
4059
+ }
4060
+ function Oa(t) {
4061
+ const i = Ma.safeParse(JSON.parse(t));
4062
+ if (!i.success)
4063
+ throw new Error(ce("AmendementsClean", i.error));
4064
+ return i.data;
4065
+ }
4066
+ function Aa(t) {
4067
+ return JSON.stringify(t, null, 2);
4068
+ }
4069
+ function La(t) {
4070
+ return JSON.stringify(t, null, 2);
4071
+ }
4072
+ function Ea(t) {
4073
+ return JSON.stringify(t, null, 2);
4074
+ }
4075
+ function ce(t, i) {
4076
+ const e = i.issues.map((n) => ` - ${n.path.join(".")}: ${n.message}`).join(`
4077
+ `);
4078
+ return `Invalid ${t}:
4079
+ ${e}`;
4080
+ }
4081
+ const Qa = {
4082
+ toAmendement: Ca,
4083
+ amendementToJson: Aa,
4084
+ toTexteLegislatif: ka,
4085
+ texteLegislatifToJson: La,
4086
+ toAmendements: Oa,
4087
+ amendementsToJson: Ea
4088
+ };
4089
+ export {
4090
+ He as A,
4091
+ Qa as B,
4092
+ $e as C,
4093
+ Qe as D,
4094
+ z as E,
4095
+ Q as F,
4096
+ U as G,
4097
+ Fe as H,
4098
+ $ as I,
4099
+ I as J,
4100
+ Ha as K,
4101
+ $a as L,
4102
+ y as M,
4103
+ p as N,
4104
+ Yi as O,
4105
+ ae as P,
4106
+ Je as T,
4107
+ ir as a,
4108
+ qa as b,
4109
+ Sa as c,
4110
+ Ya as d,
4111
+ Ki as e,
4112
+ Na as f,
4113
+ tr as g,
4114
+ Fa as h,
4115
+ nr as i,
4116
+ Wa as j,
4117
+ sr as k,
4118
+ _a as l,
4119
+ cr as m,
4120
+ _ as n,
4121
+ ur as o,
4122
+ er as p,
4123
+ dr as q,
4124
+ mr as r,
4125
+ Ge as s,
4126
+ lr as t,
4127
+ ta as u,
4128
+ Ur as v,
4129
+ Zr as w,
4130
+ ea as x,
4131
+ na as y,
4132
+ ia as z
4133
+ };