@lanrenbang/basecoat-ultra 0.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.
Files changed (55) hide show
  1. package/CHANGELOG-cn.md +54 -0
  2. package/CHANGELOG.md +54 -0
  3. package/LICENSE +21 -0
  4. package/README-cn.md +186 -0
  5. package/README.md +173 -0
  6. package/dist/css/basecoat.cdn.css +7389 -0
  7. package/dist/css/basecoat.cdn.min.css +2 -0
  8. package/dist/css/basecoat.css +1797 -0
  9. package/dist/css/datepicker.css +382 -0
  10. package/dist/css/datepicker.min.css +1 -0
  11. package/dist/css/resizable.css +96 -0
  12. package/dist/css/resizable.min.css +1 -0
  13. package/dist/js/accordion.js +20 -0
  14. package/dist/js/accordion.min.js +13 -0
  15. package/dist/js/all.js +17 -0
  16. package/dist/js/all.min.js +17 -0
  17. package/dist/js/basecoat.js +75 -0
  18. package/dist/js/basecoat.min.js +56 -0
  19. package/dist/js/carousel.js +104 -0
  20. package/dist/js/carousel.min.js +41 -0
  21. package/dist/js/catppuccin-theme-switcher.js +136 -0
  22. package/dist/js/catppuccin-theme-switcher.min.js +73 -0
  23. package/dist/js/command.js +132 -0
  24. package/dist/js/command.min.js +76 -0
  25. package/dist/js/datepicker.js +2367 -0
  26. package/dist/js/datepicker.min.js +1422 -0
  27. package/dist/js/dialog.js +20 -0
  28. package/dist/js/dialog.min.js +11 -0
  29. package/dist/js/dropdown-menu.js +148 -0
  30. package/dist/js/dropdown-menu.min.js +75 -0
  31. package/dist/js/input-otp.js +94 -0
  32. package/dist/js/input-otp.min.js +38 -0
  33. package/dist/js/lighting.js +80 -0
  34. package/dist/js/lighting.min.js +44 -0
  35. package/dist/js/popover.js +72 -0
  36. package/dist/js/popover.min.js +34 -0
  37. package/dist/js/resizable.js +534 -0
  38. package/dist/js/resizable.min.js +284 -0
  39. package/dist/js/select.js +246 -0
  40. package/dist/js/select.min.js +131 -0
  41. package/dist/js/sheet.js +85 -0
  42. package/dist/js/sheet.min.js +40 -0
  43. package/dist/js/sidebar.js +87 -0
  44. package/dist/js/sidebar.min.js +53 -0
  45. package/dist/js/slider.js +18 -0
  46. package/dist/js/slider.min.js +10 -0
  47. package/dist/js/tabs.js +53 -0
  48. package/dist/js/tabs.min.js +40 -0
  49. package/dist/js/toast.js +137 -0
  50. package/dist/js/toast.min.js +83 -0
  51. package/dist/js/toggle.js +36 -0
  52. package/dist/js/toggle.min.js +20 -0
  53. package/dist/theme/catppuccin/index.css +448 -0
  54. package/dist/theme/catppuccin/index.min.css +1 -0
  55. package/package.json +46 -0
@@ -0,0 +1,1422 @@
1
+ var xe = [
2
+ "onChange",
3
+ "onClose",
4
+ "onDayCreate",
5
+ "onDestroy",
6
+ "onKeyDown",
7
+ "onMonthChange",
8
+ "onOpen",
9
+ "onParseConfig",
10
+ "onReady",
11
+ "onValueUpdate",
12
+ "onYearChange",
13
+ "onPreCalendarPosition"
14
+ ], $ = {
15
+ _disable: [],
16
+ allowInput: !1,
17
+ allowInvalidPreload: !1,
18
+ altFormat: "F j, Y",
19
+ altInput: !1,
20
+ altInputClass: "form-control input",
21
+ animate: typeof window == "object" && window.navigator.userAgent.indexOf("MSIE") === -1,
22
+ ariaDateFormat: "F j, Y",
23
+ autoFillDefaultTime: !0,
24
+ clickOpens: !0,
25
+ closeOnSelect: !0,
26
+ conjunction: ", ",
27
+ dateFormat: "Y-m-d",
28
+ defaultHour: 12,
29
+ defaultMinute: 0,
30
+ defaultSeconds: 0,
31
+ disable: [],
32
+ disableMobile: !1,
33
+ enableSeconds: !1,
34
+ enableTime: !1,
35
+ errorHandler: function(a) {
36
+ return typeof console < "u" && console.warn(a);
37
+ },
38
+ getWeek: function(a) {
39
+ var r = new Date(a.getTime());
40
+ r.setHours(0, 0, 0, 0), r.setDate(r.getDate() + 3 - (r.getDay() + 6) % 7);
41
+ var e = new Date(r.getFullYear(), 0, 4);
42
+ return 1 + Math.round(((r.getTime() - e.getTime()) / 864e5 - 3 + (e.getDay() + 6) % 7) / 7);
43
+ },
44
+ hourIncrement: 1,
45
+ ignoredFocusElements: [],
46
+ inline: !1,
47
+ locale: "default",
48
+ minuteIncrement: 5,
49
+ mode: "single",
50
+ monthSelectorType: "dropdown",
51
+ nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
52
+ noCalendar: !1,
53
+ now: /* @__PURE__ */ new Date(),
54
+ onChange: [],
55
+ onClose: [],
56
+ onDayCreate: [],
57
+ onDestroy: [],
58
+ onKeyDown: [],
59
+ onMonthChange: [],
60
+ onOpen: [],
61
+ onParseConfig: [],
62
+ onReady: [],
63
+ onValueUpdate: [],
64
+ onYearChange: [],
65
+ onPreCalendarPosition: [],
66
+ plugins: [],
67
+ position: "auto",
68
+ positionElement: void 0,
69
+ prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
70
+ shorthandCurrentMonth: !1,
71
+ showMonths: 1,
72
+ static: !1,
73
+ time_24hr: !1,
74
+ weekNumbers: !1,
75
+ wrap: !1
76
+ }, te = {
77
+ weekdays: {
78
+ shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
79
+ longhand: [
80
+ "Sunday",
81
+ "Monday",
82
+ "Tuesday",
83
+ "Wednesday",
84
+ "Thursday",
85
+ "Friday",
86
+ "Saturday"
87
+ ]
88
+ },
89
+ months: {
90
+ shorthand: [
91
+ "Jan",
92
+ "Feb",
93
+ "Mar",
94
+ "Apr",
95
+ "May",
96
+ "Jun",
97
+ "Jul",
98
+ "Aug",
99
+ "Sep",
100
+ "Oct",
101
+ "Nov",
102
+ "Dec"
103
+ ],
104
+ longhand: [
105
+ "January",
106
+ "February",
107
+ "March",
108
+ "April",
109
+ "May",
110
+ "June",
111
+ "July",
112
+ "August",
113
+ "September",
114
+ "October",
115
+ "November",
116
+ "December"
117
+ ]
118
+ },
119
+ daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
120
+ firstDayOfWeek: 0,
121
+ ordinal: function(a) {
122
+ var r = a % 100;
123
+ if (r > 3 && r < 21)
124
+ return "th";
125
+ switch (r % 10) {
126
+ case 1:
127
+ return "st";
128
+ case 2:
129
+ return "nd";
130
+ case 3:
131
+ return "rd";
132
+ default:
133
+ return "th";
134
+ }
135
+ },
136
+ rangeSeparator: " to ",
137
+ weekAbbreviation: "Wk",
138
+ scrollTitle: "Scroll to increment",
139
+ toggleTitle: "Click to toggle",
140
+ amPM: ["AM", "PM"],
141
+ yearAriaLabel: "Year",
142
+ monthAriaLabel: "Month",
143
+ hourAriaLabel: "Hour",
144
+ minuteAriaLabel: "Minute",
145
+ time_24hr: !1
146
+ }, I = function(a, r) {
147
+ return r === void 0 && (r = 2), ("000" + a).slice(r * -1);
148
+ }, O = function(a) {
149
+ return a === !0 ? 1 : 0;
150
+ };
151
+ function Ke(a, r) {
152
+ var e;
153
+ return function() {
154
+ var d = this, h = arguments;
155
+ clearTimeout(e), e = setTimeout(function() {
156
+ return a.apply(d, h);
157
+ }, r);
158
+ };
159
+ }
160
+ var Ee = function(a) {
161
+ return a instanceof Array ? a : [a];
162
+ };
163
+ function T(a, r, e) {
164
+ if (e === !0)
165
+ return a.classList.add(r);
166
+ a.classList.remove(r);
167
+ }
168
+ function v(a, r, e) {
169
+ var d = window.document.createElement(a);
170
+ return r = r || "", e = e || "", d.className = r, e !== void 0 && (d.textContent = e), d;
171
+ }
172
+ function ce(a) {
173
+ for (; a.firstChild; )
174
+ a.removeChild(a.firstChild);
175
+ }
176
+ function Ue(a, r) {
177
+ if (r(a))
178
+ return a;
179
+ if (a.parentNode)
180
+ return Ue(a.parentNode, r);
181
+ }
182
+ function de(a, r) {
183
+ var e = v("div", "numInputWrapper"), d = v("input", "numInput " + a), h = v("span", "arrowUp"), g = v("span", "arrowDown");
184
+ if (navigator.userAgent.indexOf("MSIE 9.0") === -1 ? d.type = "number" : (d.type = "text", d.pattern = "\\d*"), r !== void 0)
185
+ for (var b in r)
186
+ d.setAttribute(b, r[b]);
187
+ return e.appendChild(d), e.appendChild(h), e.appendChild(g), e;
188
+ }
189
+ function _(a) {
190
+ try {
191
+ if (typeof a.composedPath == "function") {
192
+ var r = a.composedPath();
193
+ return r[0];
194
+ }
195
+ return a.target;
196
+ } catch {
197
+ return a.target;
198
+ }
199
+ }
200
+ var ke = function() {
201
+ }, ge = function(a, r, e) {
202
+ return e.months[r ? "shorthand" : "longhand"][a];
203
+ }, kn = {
204
+ D: ke,
205
+ F: function(a, r, e) {
206
+ a.setMonth(e.months.longhand.indexOf(r));
207
+ },
208
+ G: function(a, r) {
209
+ a.setHours((a.getHours() >= 12 ? 12 : 0) + parseFloat(r));
210
+ },
211
+ H: function(a, r) {
212
+ a.setHours(parseFloat(r));
213
+ },
214
+ J: function(a, r) {
215
+ a.setDate(parseFloat(r));
216
+ },
217
+ K: function(a, r, e) {
218
+ a.setHours(a.getHours() % 12 + 12 * O(new RegExp(e.amPM[1], "i").test(r)));
219
+ },
220
+ M: function(a, r, e) {
221
+ a.setMonth(e.months.shorthand.indexOf(r));
222
+ },
223
+ S: function(a, r) {
224
+ a.setSeconds(parseFloat(r));
225
+ },
226
+ U: function(a, r) {
227
+ return new Date(parseFloat(r) * 1e3);
228
+ },
229
+ W: function(a, r, e) {
230
+ var d = parseInt(r), h = new Date(a.getFullYear(), 0, 2 + (d - 1) * 7, 0, 0, 0, 0);
231
+ return h.setDate(h.getDate() - h.getDay() + e.firstDayOfWeek), h;
232
+ },
233
+ Y: function(a, r) {
234
+ a.setFullYear(parseFloat(r));
235
+ },
236
+ Z: function(a, r) {
237
+ return new Date(r);
238
+ },
239
+ d: function(a, r) {
240
+ a.setDate(parseFloat(r));
241
+ },
242
+ h: function(a, r) {
243
+ a.setHours((a.getHours() >= 12 ? 12 : 0) + parseFloat(r));
244
+ },
245
+ i: function(a, r) {
246
+ a.setMinutes(parseFloat(r));
247
+ },
248
+ j: function(a, r) {
249
+ a.setDate(parseFloat(r));
250
+ },
251
+ l: ke,
252
+ m: function(a, r) {
253
+ a.setMonth(parseFloat(r) - 1);
254
+ },
255
+ n: function(a, r) {
256
+ a.setMonth(parseFloat(r) - 1);
257
+ },
258
+ s: function(a, r) {
259
+ a.setSeconds(parseFloat(r));
260
+ },
261
+ u: function(a, r) {
262
+ return new Date(parseFloat(r));
263
+ },
264
+ w: ke,
265
+ y: function(a, r) {
266
+ a.setFullYear(2e3 + parseFloat(r));
267
+ }
268
+ }, K = {
269
+ D: "",
270
+ F: "",
271
+ G: "(\\d\\d|\\d)",
272
+ H: "(\\d\\d|\\d)",
273
+ J: "(\\d\\d|\\d)\\w+",
274
+ K: "",
275
+ M: "",
276
+ S: "(\\d\\d|\\d)",
277
+ U: "(.+)",
278
+ W: "(\\d\\d|\\d)",
279
+ Y: "(\\d{4})",
280
+ Z: "(.+)",
281
+ d: "(\\d\\d|\\d)",
282
+ h: "(\\d\\d|\\d)",
283
+ i: "(\\d\\d|\\d)",
284
+ j: "(\\d\\d|\\d)",
285
+ l: "",
286
+ m: "(\\d\\d|\\d)",
287
+ n: "(\\d\\d|\\d)",
288
+ s: "(\\d\\d|\\d)",
289
+ u: "(.+)",
290
+ w: "(\\d\\d|\\d)",
291
+ y: "(\\d{2})"
292
+ }, ne = {
293
+ Z: function(a) {
294
+ return a.toISOString();
295
+ },
296
+ D: function(a, r, e) {
297
+ return r.weekdays.shorthand[ne.w(a, r, e)];
298
+ },
299
+ F: function(a, r, e) {
300
+ return ge(ne.n(a, r, e) - 1, !1, r);
301
+ },
302
+ G: function(a, r, e) {
303
+ return I(ne.h(a, r, e));
304
+ },
305
+ H: function(a) {
306
+ return I(a.getHours());
307
+ },
308
+ J: function(a, r) {
309
+ return r.ordinal !== void 0 ? a.getDate() + r.ordinal(a.getDate()) : a.getDate();
310
+ },
311
+ K: function(a, r) {
312
+ return r.amPM[O(a.getHours() > 11)];
313
+ },
314
+ M: function(a, r) {
315
+ return ge(a.getMonth(), !0, r);
316
+ },
317
+ S: function(a) {
318
+ return I(a.getSeconds());
319
+ },
320
+ U: function(a) {
321
+ return a.getTime() / 1e3;
322
+ },
323
+ W: function(a, r, e) {
324
+ return e.getWeek(a);
325
+ },
326
+ Y: function(a) {
327
+ return I(a.getFullYear(), 4);
328
+ },
329
+ d: function(a) {
330
+ return I(a.getDate());
331
+ },
332
+ h: function(a) {
333
+ return a.getHours() % 12 ? a.getHours() % 12 : 12;
334
+ },
335
+ i: function(a) {
336
+ return I(a.getMinutes());
337
+ },
338
+ j: function(a) {
339
+ return a.getDate();
340
+ },
341
+ l: function(a, r) {
342
+ return r.weekdays.longhand[a.getDay()];
343
+ },
344
+ m: function(a) {
345
+ return I(a.getMonth() + 1);
346
+ },
347
+ n: function(a) {
348
+ return a.getMonth() + 1;
349
+ },
350
+ s: function(a) {
351
+ return a.getSeconds();
352
+ },
353
+ u: function(a) {
354
+ return a.getTime();
355
+ },
356
+ w: function(a) {
357
+ return a.getDay();
358
+ },
359
+ y: function(a) {
360
+ return String(a.getFullYear()).substring(2);
361
+ }
362
+ }, qe = function(a) {
363
+ var r = a.config, e = r === void 0 ? $ : r, d = a.l10n, h = d === void 0 ? te : d, g = a.isMobile, b = g === void 0 ? !1 : g;
364
+ return function(C, E, Z) {
365
+ var y = Z || h;
366
+ return e.formatDate !== void 0 && !b ? e.formatDate(C, E, y) : E.split("").map(function(A, N, Y) {
367
+ return ne[A] && Y[N - 1] !== "\\" ? ne[A](C, y, e) : A !== "\\" ? A : "";
368
+ }).join("");
369
+ };
370
+ }, _e = function(a) {
371
+ var r = a.config, e = r === void 0 ? $ : r, d = a.l10n, h = d === void 0 ? te : d;
372
+ return function(g, b, C, E) {
373
+ if (!(g !== 0 && !g)) {
374
+ var Z = E || h, y, A = g;
375
+ if (g instanceof Date)
376
+ y = new Date(g.getTime());
377
+ else if (typeof g != "string" && g.toFixed !== void 0)
378
+ y = new Date(g);
379
+ else if (typeof g == "string") {
380
+ var N = b || (e || $).dateFormat, Y = String(g).trim();
381
+ if (Y === "today")
382
+ y = /* @__PURE__ */ new Date(), C = !0;
383
+ else if (e && e.parseDate)
384
+ y = e.parseDate(g, N);
385
+ else if (/Z$/.test(Y) || /GMT$/.test(Y))
386
+ y = new Date(g);
387
+ else {
388
+ for (var ae = void 0, D = [], j = 0, me = 0, L = ""; j < N.length; j++) {
389
+ var R = N[j], J = R === "\\", pe = N[j - 1] === "\\" || J;
390
+ if (K[R] && !pe) {
391
+ L += K[R];
392
+ var W = new RegExp(L).exec(g);
393
+ W && (ae = !0) && D[R !== "Y" ? "push" : "unshift"]({
394
+ fn: kn[R],
395
+ val: W[++me]
396
+ });
397
+ } else J || (L += ".");
398
+ }
399
+ y = !e || !e.noCalendar ? new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 1, 0, 0, 0, 0) : new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)), D.forEach(function(U) {
400
+ var q = U.fn, he = U.val;
401
+ return y = q(y, he, Z) || y;
402
+ }), y = ae ? y : void 0;
403
+ }
404
+ }
405
+ if (!(y instanceof Date && !isNaN(y.getTime()))) {
406
+ e.errorHandler(new Error("Invalid date provided: " + A));
407
+ return;
408
+ }
409
+ return C === !0 && y.setHours(0, 0, 0, 0), y;
410
+ }
411
+ };
412
+ };
413
+ function F(a, r, e) {
414
+ return e === void 0 && (e = !0), e !== !1 ? new Date(a.getTime()).setHours(0, 0, 0, 0) - new Date(r.getTime()).setHours(0, 0, 0, 0) : a.getTime() - r.getTime();
415
+ }
416
+ var Tn = function(a, r, e) {
417
+ return a > Math.min(r, e) && a < Math.max(r, e);
418
+ }, Te = function(a, r, e) {
419
+ return a * 3600 + r * 60 + e;
420
+ }, In = function(a) {
421
+ var r = Math.floor(a / 3600), e = (a - r * 3600) / 60;
422
+ return [r, e, a - r * 3600 - e * 60];
423
+ }, Sn = {
424
+ DAY: 864e5
425
+ };
426
+ function Ie(a) {
427
+ var r = a.defaultHour, e = a.defaultMinute, d = a.defaultSeconds;
428
+ if (a.minDate !== void 0) {
429
+ var h = a.minDate.getHours(), g = a.minDate.getMinutes(), b = a.minDate.getSeconds();
430
+ r < h && (r = h), r === h && e < g && (e = g), r === h && e === g && d < b && (d = a.minDate.getSeconds());
431
+ }
432
+ if (a.maxDate !== void 0) {
433
+ var C = a.maxDate.getHours(), E = a.maxDate.getMinutes();
434
+ r = Math.min(r, C), r === C && (e = Math.min(E, e)), r === C && e === E && (d = a.maxDate.getSeconds());
435
+ }
436
+ return { hours: r, minutes: e, seconds: d };
437
+ }
438
+ typeof Object.assign != "function" && (Object.assign = function(a) {
439
+ for (var r = [], e = 1; e < arguments.length; e++)
440
+ r[e - 1] = arguments[e];
441
+ if (!a)
442
+ throw TypeError("Cannot convert undefined or null to object");
443
+ for (var d = function(C) {
444
+ C && Object.keys(C).forEach(function(E) {
445
+ return a[E] = C[E];
446
+ });
447
+ }, h = 0, g = r; h < g.length; h++) {
448
+ var b = g[h];
449
+ d(b);
450
+ }
451
+ return a;
452
+ });
453
+ var k = function() {
454
+ return k = Object.assign || function(a) {
455
+ for (var r, e = 1, d = arguments.length; e < d; e++) {
456
+ r = arguments[e];
457
+ for (var h in r) Object.prototype.hasOwnProperty.call(r, h) && (a[h] = r[h]);
458
+ }
459
+ return a;
460
+ }, k.apply(this, arguments);
461
+ }, Je = function() {
462
+ for (var a = 0, r = 0, e = arguments.length; r < e; r++) a += arguments[r].length;
463
+ for (var d = Array(a), h = 0, r = 0; r < e; r++)
464
+ for (var g = arguments[r], b = 0, C = g.length; b < C; b++, h++)
465
+ d[h] = g[b];
466
+ return d;
467
+ }, _n = 300;
468
+ function Fn(a, r) {
469
+ var e = {
470
+ config: k(k({}, $), x.defaultConfig),
471
+ l10n: te
472
+ };
473
+ e.parseDate = _e({ config: e.config, l10n: e.l10n }), e._handlers = [], e.pluginElements = [], e.loadedPlugins = [], e._bind = D, e._setHoursFromDate = N, e._positionCalendar = fe, e.changeMonth = ve, e.changeYear = re, e.clear = Qe, e.close = Xe, e.onMouseOver = le, e._createElement = v, e.createDay = W, e.destroy = en, e.isEnabled = B, e.jumpToDate = L, e.updateValue = H, e.open = an, e.redraw = Le, e.set = fn, e.setDate = un, e.toggle = gn;
474
+ function d() {
475
+ e.utils = {
476
+ getDaysInMonth: function(n, t) {
477
+ return n === void 0 && (n = e.currentMonth), t === void 0 && (t = e.currentYear), n === 1 && (t % 4 === 0 && t % 100 !== 0 || t % 400 === 0) ? 29 : e.l10n.daysInMonth[n];
478
+ }
479
+ };
480
+ }
481
+ function h() {
482
+ e.element = e.input = a, e.isOpen = !1, rn(), He(), cn(), sn(), d(), e.isMobile || pe(), me(), (e.selectedDates.length || e.config.noCalendar) && (e.config.enableTime && N(e.config.noCalendar ? e.latestSelectedDateObj : void 0), H(!1)), C();
483
+ var n = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
484
+ !e.isMobile && n && fe(), M("onReady");
485
+ }
486
+ function g() {
487
+ var n;
488
+ return ((n = e.calendarContainer) === null || n === void 0 ? void 0 : n.getRootNode()).activeElement || document.activeElement;
489
+ }
490
+ function b(n) {
491
+ return n.bind(e);
492
+ }
493
+ function C() {
494
+ var n = e.config;
495
+ n.weekNumbers === !1 && n.showMonths === 1 || n.noCalendar !== !0 && window.requestAnimationFrame(function() {
496
+ if (e.calendarContainer !== void 0 && (e.calendarContainer.style.visibility = "hidden", e.calendarContainer.style.display = "block"), e.daysContainer !== void 0) {
497
+ var t = (e.days.offsetWidth + 1) * n.showMonths;
498
+ e.daysContainer.style.width = t + "px", e.calendarContainer.style.width = t + (e.weekWrapper !== void 0 ? e.weekWrapper.offsetWidth : 0) + "px", e.calendarContainer.style.removeProperty("visibility"), e.calendarContainer.style.removeProperty("display");
499
+ }
500
+ });
501
+ }
502
+ function E(n) {
503
+ if (e.selectedDates.length === 0) {
504
+ var t = e.config.minDate === void 0 || F(/* @__PURE__ */ new Date(), e.config.minDate) >= 0 ? /* @__PURE__ */ new Date() : new Date(e.config.minDate.getTime()), i = Ie(e.config);
505
+ t.setHours(i.hours, i.minutes, i.seconds, t.getMilliseconds()), e.selectedDates = [t], e.latestSelectedDateObj = t;
506
+ }
507
+ n !== void 0 && n.type !== "blur" && hn(n);
508
+ var o = e._input.value;
509
+ A(), H(), e._input.value !== o && e._debouncedChange();
510
+ }
511
+ function Z(n, t) {
512
+ return n % 12 + 12 * O(t === e.l10n.amPM[1]);
513
+ }
514
+ function y(n) {
515
+ switch (n % 24) {
516
+ case 0:
517
+ case 12:
518
+ return 12;
519
+ default:
520
+ return n % 12;
521
+ }
522
+ }
523
+ function A() {
524
+ if (!(e.hourElement === void 0 || e.minuteElement === void 0)) {
525
+ var n = (parseInt(e.hourElement.value.slice(-2), 10) || 0) % 24, t = (parseInt(e.minuteElement.value, 10) || 0) % 60, i = e.secondElement !== void 0 ? (parseInt(e.secondElement.value, 10) || 0) % 60 : 0;
526
+ e.amPM !== void 0 && (n = Z(n, e.amPM.textContent));
527
+ var o = e.config.minTime !== void 0 || e.config.minDate && e.minDateHasTime && e.latestSelectedDateObj && F(e.latestSelectedDateObj, e.config.minDate, !0) === 0, l = e.config.maxTime !== void 0 || e.config.maxDate && e.maxDateHasTime && e.latestSelectedDateObj && F(e.latestSelectedDateObj, e.config.maxDate, !0) === 0;
528
+ if (e.config.maxTime !== void 0 && e.config.minTime !== void 0 && e.config.minTime > e.config.maxTime) {
529
+ var f = Te(e.config.minTime.getHours(), e.config.minTime.getMinutes(), e.config.minTime.getSeconds()), m = Te(e.config.maxTime.getHours(), e.config.maxTime.getMinutes(), e.config.maxTime.getSeconds()), s = Te(n, t, i);
530
+ if (s > m && s < f) {
531
+ var p = In(f);
532
+ n = p[0], t = p[1], i = p[2];
533
+ }
534
+ } else {
535
+ if (l) {
536
+ var u = e.config.maxTime !== void 0 ? e.config.maxTime : e.config.maxDate;
537
+ n = Math.min(n, u.getHours()), n === u.getHours() && (t = Math.min(t, u.getMinutes())), t === u.getMinutes() && (i = Math.min(i, u.getSeconds()));
538
+ }
539
+ if (o) {
540
+ var c = e.config.minTime !== void 0 ? e.config.minTime : e.config.minDate;
541
+ n = Math.max(n, c.getHours()), n === c.getHours() && t < c.getMinutes() && (t = c.getMinutes()), t === c.getMinutes() && (i = Math.max(i, c.getSeconds()));
542
+ }
543
+ }
544
+ Y(n, t, i);
545
+ }
546
+ }
547
+ function N(n) {
548
+ var t = n || e.latestSelectedDateObj;
549
+ t && t instanceof Date && Y(t.getHours(), t.getMinutes(), t.getSeconds());
550
+ }
551
+ function Y(n, t, i) {
552
+ e.latestSelectedDateObj !== void 0 && e.latestSelectedDateObj.setHours(n % 24, t, i || 0, 0), !(!e.hourElement || !e.minuteElement || e.isMobile) && (e.hourElement.value = I(e.config.time_24hr ? n : (12 + n) % 12 + 12 * O(n % 12 === 0)), e.minuteElement.value = I(t), e.amPM !== void 0 && (e.amPM.textContent = e.l10n.amPM[O(n >= 12)]), e.secondElement !== void 0 && (e.secondElement.value = I(i)));
553
+ }
554
+ function ae(n) {
555
+ var t = _(n), i = parseInt(t.value) + (n.delta || 0);
556
+ (i / 1e3 > 1 || n.key === "Enter" && !/[^\d]/.test(i.toString())) && re(i);
557
+ }
558
+ function D(n, t, i, o) {
559
+ if (t instanceof Array)
560
+ return t.forEach(function(l) {
561
+ return D(n, l, i, o);
562
+ });
563
+ if (n instanceof Array)
564
+ return n.forEach(function(l) {
565
+ return D(l, t, i, o);
566
+ });
567
+ n.addEventListener(t, i, o), e._handlers.push({
568
+ remove: function() {
569
+ return n.removeEventListener(t, i, o);
570
+ }
571
+ });
572
+ }
573
+ function j() {
574
+ M("onChange");
575
+ }
576
+ function me() {
577
+ if (e.config.wrap && ["open", "close", "toggle", "clear"].forEach(function(i) {
578
+ Array.prototype.forEach.call(e.element.querySelectorAll("[data-" + i + "]"), function(o) {
579
+ return D(o, "click", e[i]);
580
+ });
581
+ }), e.isMobile) {
582
+ dn();
583
+ return;
584
+ }
585
+ var n = Ke(tn, 50);
586
+ if (e._debouncedChange = Ke(j, _n), e.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent) && D(e.daysContainer, "mouseover", function(i) {
587
+ e.config.mode === "range" && le(_(i));
588
+ }), D(e._input, "keydown", Ne), e.calendarContainer !== void 0 && D(e.calendarContainer, "keydown", Ne), !e.config.inline && !e.config.static && D(window, "resize", n), window.ontouchstart !== void 0 ? D(window.document, "touchstart", De) : D(window.document, "mousedown", De), D(window.document, "focus", De, { capture: !0 }), e.config.clickOpens === !0 && (D(e._input, "focus", e.open), D(e._input, "click", e.open)), e.daysContainer !== void 0 && (D(e.monthNav, "click", pn), D(e.monthNav, ["keyup", "increment"], ae), D(e.daysContainer, "click", je)), e.timeContainer !== void 0 && e.minuteElement !== void 0 && e.hourElement !== void 0) {
589
+ var t = function(i) {
590
+ return _(i).select();
591
+ };
592
+ D(e.timeContainer, ["increment"], E), D(e.timeContainer, "blur", E, { capture: !0 }), D(e.timeContainer, "click", R), D([e.hourElement, e.minuteElement], ["focus", "click"], t), e.secondElement !== void 0 && D(e.secondElement, "focus", function() {
593
+ return e.secondElement && e.secondElement.select();
594
+ }), e.amPM !== void 0 && D(e.amPM, "click", function(i) {
595
+ E(i);
596
+ });
597
+ }
598
+ e.config.allowInput && D(e._input, "blur", nn);
599
+ }
600
+ function L(n, t) {
601
+ var i = n !== void 0 ? e.parseDate(n) : e.latestSelectedDateObj || (e.config.minDate && e.config.minDate > e.now ? e.config.minDate : e.config.maxDate && e.config.maxDate < e.now ? e.config.maxDate : e.now), o = e.currentYear, l = e.currentMonth;
602
+ try {
603
+ i !== void 0 && (e.currentYear = i.getFullYear(), e.currentMonth = i.getMonth());
604
+ } catch (f) {
605
+ f.message = "Invalid date supplied: " + i, e.config.errorHandler(f);
606
+ }
607
+ t && e.currentYear !== o && (M("onYearChange"), V()), t && (e.currentYear !== o || e.currentMonth !== l) && M("onMonthChange"), e.redraw();
608
+ }
609
+ function R(n) {
610
+ var t = _(n);
611
+ ~t.className.indexOf("arrow") && J(n, t.classList.contains("arrowUp") ? 1 : -1);
612
+ }
613
+ function J(n, t, i) {
614
+ var o = n && _(n), l = i || o && o.parentNode && o.parentNode.firstChild, f = be("increment");
615
+ f.delta = t, l && l.dispatchEvent(f);
616
+ }
617
+ function pe() {
618
+ var n = window.document.createDocumentFragment();
619
+ if (e.calendarContainer = v("div", "flatpickr-calendar"), e.calendarContainer.tabIndex = -1, !e.config.noCalendar) {
620
+ if (n.appendChild($e()), e.innerContainer = v("div", "flatpickr-innerContainer"), e.config.weekNumbers) {
621
+ var t = Ze(), i = t.weekWrapper, o = t.weekNumbers;
622
+ e.innerContainer.appendChild(i), e.weekNumbers = o, e.weekWrapper = i;
623
+ }
624
+ e.rContainer = v("div", "flatpickr-rContainer"), e.rContainer.appendChild(Oe()), e.daysContainer || (e.daysContainer = v("div", "flatpickr-days"), e.daysContainer.tabIndex = -1), ie(), e.rContainer.appendChild(e.daysContainer), e.innerContainer.appendChild(e.rContainer), n.appendChild(e.innerContainer);
625
+ }
626
+ e.config.enableTime && n.appendChild(Ge()), T(e.calendarContainer, "rangeMode", e.config.mode === "range"), T(e.calendarContainer, "animate", e.config.animate === !0), T(e.calendarContainer, "multiMonth", e.config.showMonths > 1), e.calendarContainer.appendChild(n);
627
+ var l = e.config.appendTo !== void 0 && e.config.appendTo.nodeType !== void 0;
628
+ if ((e.config.inline || e.config.static) && (e.calendarContainer.classList.add(e.config.inline ? "inline" : "static"), e.config.inline && (!l && e.element.parentNode ? e.element.parentNode.insertBefore(e.calendarContainer, e._input.nextSibling) : e.config.appendTo !== void 0 && e.config.appendTo.appendChild(e.calendarContainer)), e.config.static)) {
629
+ var f = v("div", "flatpickr-wrapper");
630
+ e.element.parentNode && e.element.parentNode.insertBefore(f, e.element), f.appendChild(e.element), e.altInput && f.appendChild(e.altInput), f.appendChild(e.calendarContainer);
631
+ }
632
+ !e.config.static && !e.config.inline && (e.config.appendTo !== void 0 ? e.config.appendTo : window.document.body).appendChild(e.calendarContainer);
633
+ }
634
+ function W(n, t, i, o) {
635
+ var l = B(t, !0), f = v("span", n, t.getDate().toString());
636
+ return f.dateObj = t, f.$i = o, f.setAttribute("aria-label", e.formatDate(t, e.config.ariaDateFormat)), n.indexOf("hidden") === -1 && F(t, e.now) === 0 && (e.todayDateElem = f, f.classList.add("today"), f.setAttribute("aria-current", "date")), l ? (f.tabIndex = -1, Me(t) && (f.classList.add("selected"), e.selectedDateElem = f, e.config.mode === "range" && (T(f, "startRange", e.selectedDates[0] && F(t, e.selectedDates[0], !0) === 0), T(f, "endRange", e.selectedDates[1] && F(t, e.selectedDates[1], !0) === 0), n === "nextMonthDay" && f.classList.add("inRange")))) : f.classList.add("flatpickr-disabled"), e.config.mode === "range" && mn(t) && !Me(t) && f.classList.add("inRange"), e.weekNumbers && e.config.showMonths === 1 && n !== "prevMonthDay" && o % 7 === 6 && e.weekNumbers.insertAdjacentHTML("beforeend", "<span class='flatpickr-day'>" + e.config.getWeek(t) + "</span>"), M("onDayCreate", f), f;
637
+ }
638
+ function U(n) {
639
+ n.focus(), e.config.mode === "range" && le(n);
640
+ }
641
+ function q(n) {
642
+ for (var t = n > 0 ? 0 : e.config.showMonths - 1, i = n > 0 ? e.config.showMonths : -1, o = t; o != i; o += n)
643
+ for (var l = e.daysContainer.children[o], f = n > 0 ? 0 : l.children.length - 1, m = n > 0 ? l.children.length : -1, s = f; s != m; s += n) {
644
+ var p = l.children[s];
645
+ if (p.className.indexOf("hidden") === -1 && B(p.dateObj))
646
+ return p;
647
+ }
648
+ }
649
+ function he(n, t) {
650
+ for (var i = n.className.indexOf("Month") === -1 ? n.dateObj.getMonth() : e.currentMonth, o = t > 0 ? e.config.showMonths : -1, l = t > 0 ? 1 : -1, f = i - e.currentMonth; f != o; f += l)
651
+ for (var m = e.daysContainer.children[f], s = i - e.currentMonth === f ? n.$i + t : t < 0 ? m.children.length - 1 : 0, p = m.children.length, u = s; u >= 0 && u < p && u != (t > 0 ? p : -1); u += l) {
652
+ var c = m.children[u];
653
+ if (c.className.indexOf("hidden") === -1 && B(c.dateObj) && Math.abs(n.$i - u) >= Math.abs(t))
654
+ return U(c);
655
+ }
656
+ e.changeMonth(l), Q(q(l), 0);
657
+ }
658
+ function Q(n, t) {
659
+ var i = g(), o = oe(i || document.body), l = n !== void 0 ? n : o ? i : e.selectedDateElem !== void 0 && oe(e.selectedDateElem) ? e.selectedDateElem : e.todayDateElem !== void 0 && oe(e.todayDateElem) ? e.todayDateElem : q(t > 0 ? 1 : -1);
660
+ l === void 0 ? e._input.focus() : o ? he(l, t) : U(l);
661
+ }
662
+ function Ve(n, t) {
663
+ for (var i = (new Date(n, t, 1).getDay() - e.l10n.firstDayOfWeek + 7) % 7, o = e.utils.getDaysInMonth((t - 1 + 12) % 12, n), l = e.utils.getDaysInMonth(t, n), f = window.document.createDocumentFragment(), m = e.config.showMonths > 1, s = m ? "prevMonthDay hidden" : "prevMonthDay", p = m ? "nextMonthDay hidden" : "nextMonthDay", u = o + 1 - i, c = 0; u <= o; u++, c++)
664
+ f.appendChild(W("flatpickr-day " + s, new Date(n, t - 1, u), u, c));
665
+ for (u = 1; u <= l; u++, c++)
666
+ f.appendChild(W("flatpickr-day", new Date(n, t, u), u, c));
667
+ for (var w = l + 1; w <= 42 - i && (e.config.showMonths === 1 || c % 7 !== 0); w++, c++)
668
+ f.appendChild(W("flatpickr-day " + p, new Date(n, t + 1, w % l), w, c));
669
+ var P = v("div", "dayContainer");
670
+ return P.appendChild(f), P;
671
+ }
672
+ function ie() {
673
+ if (e.daysContainer !== void 0) {
674
+ ce(e.daysContainer), e.weekNumbers && ce(e.weekNumbers);
675
+ for (var n = document.createDocumentFragment(), t = 0; t < e.config.showMonths; t++) {
676
+ var i = new Date(e.currentYear, e.currentMonth, 1);
677
+ i.setMonth(e.currentMonth + t), n.appendChild(Ve(i.getFullYear(), i.getMonth()));
678
+ }
679
+ e.daysContainer.appendChild(n), e.days = e.daysContainer.firstChild, e.config.mode === "range" && e.selectedDates.length === 1 && le();
680
+ }
681
+ }
682
+ function V() {
683
+ if (!(e.config.showMonths > 1 || e.config.monthSelectorType !== "dropdown")) {
684
+ var n = function(o) {
685
+ return e.config.minDate !== void 0 && e.currentYear === e.config.minDate.getFullYear() && o < e.config.minDate.getMonth() ? !1 : !(e.config.maxDate !== void 0 && e.currentYear === e.config.maxDate.getFullYear() && o > e.config.maxDate.getMonth());
686
+ };
687
+ e.monthsDropdownContainer.tabIndex = -1, e.monthsDropdownContainer.innerHTML = "";
688
+ for (var t = 0; t < 12; t++)
689
+ if (n(t)) {
690
+ var i = v("option", "flatpickr-monthDropdown-month");
691
+ i.value = new Date(e.currentYear, t).getMonth().toString(), i.textContent = ge(t, e.config.shorthandCurrentMonth, e.l10n), i.tabIndex = -1, e.currentMonth === t && (i.selected = !0), e.monthsDropdownContainer.appendChild(i);
692
+ }
693
+ }
694
+ }
695
+ function ze() {
696
+ var n = v("div", "flatpickr-month"), t = window.document.createDocumentFragment(), i;
697
+ e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? i = v("span", "cur-month") : (e.monthsDropdownContainer = v("select", "flatpickr-monthDropdown-months"), e.monthsDropdownContainer.setAttribute("aria-label", e.l10n.monthAriaLabel), D(e.monthsDropdownContainer, "change", function(m) {
698
+ var s = _(m), p = parseInt(s.value, 10);
699
+ e.changeMonth(p - e.currentMonth), M("onMonthChange");
700
+ }), V(), i = e.monthsDropdownContainer);
701
+ var o = de("cur-year", { tabindex: "-1" }), l = o.getElementsByTagName("input")[0];
702
+ l.setAttribute("aria-label", e.l10n.yearAriaLabel), e.config.minDate && l.setAttribute("min", e.config.minDate.getFullYear().toString()), e.config.maxDate && (l.setAttribute("max", e.config.maxDate.getFullYear().toString()), l.disabled = !!e.config.minDate && e.config.minDate.getFullYear() === e.config.maxDate.getFullYear());
703
+ var f = v("div", "flatpickr-current-month");
704
+ return f.appendChild(i), f.appendChild(o), t.appendChild(f), n.appendChild(t), {
705
+ container: n,
706
+ yearElement: l,
707
+ monthElement: i
708
+ };
709
+ }
710
+ function Fe() {
711
+ ce(e.monthNav), e.monthNav.appendChild(e.prevMonthNav), e.config.showMonths && (e.yearElements = [], e.monthElements = []);
712
+ for (var n = e.config.showMonths; n--; ) {
713
+ var t = ze();
714
+ e.yearElements.push(t.yearElement), e.monthElements.push(t.monthElement), e.monthNav.appendChild(t.container);
715
+ }
716
+ e.monthNav.appendChild(e.nextMonthNav);
717
+ }
718
+ function $e() {
719
+ return e.monthNav = v("div", "flatpickr-months"), e.yearElements = [], e.monthElements = [], e.prevMonthNav = v("span", "flatpickr-prev-month"), e.prevMonthNav.innerHTML = e.config.prevArrow, e.nextMonthNav = v("span", "flatpickr-next-month"), e.nextMonthNav.innerHTML = e.config.nextArrow, Fe(), Object.defineProperty(e, "_hidePrevMonthArrow", {
720
+ get: function() {
721
+ return e.__hidePrevMonthArrow;
722
+ },
723
+ set: function(n) {
724
+ e.__hidePrevMonthArrow !== n && (T(e.prevMonthNav, "flatpickr-disabled", n), e.__hidePrevMonthArrow = n);
725
+ }
726
+ }), Object.defineProperty(e, "_hideNextMonthArrow", {
727
+ get: function() {
728
+ return e.__hideNextMonthArrow;
729
+ },
730
+ set: function(n) {
731
+ e.__hideNextMonthArrow !== n && (T(e.nextMonthNav, "flatpickr-disabled", n), e.__hideNextMonthArrow = n);
732
+ }
733
+ }), e.currentYearElement = e.yearElements[0], se(), e.monthNav;
734
+ }
735
+ function Ge() {
736
+ e.calendarContainer.classList.add("hasTime"), e.config.noCalendar && e.calendarContainer.classList.add("noCalendar");
737
+ var n = Ie(e.config);
738
+ e.timeContainer = v("div", "flatpickr-time"), e.timeContainer.tabIndex = -1;
739
+ var t = v("span", "flatpickr-time-separator", ":"), i = de("flatpickr-hour", {
740
+ "aria-label": e.l10n.hourAriaLabel
741
+ });
742
+ e.hourElement = i.getElementsByTagName("input")[0];
743
+ var o = de("flatpickr-minute", {
744
+ "aria-label": e.l10n.minuteAriaLabel
745
+ });
746
+ if (e.minuteElement = o.getElementsByTagName("input")[0], e.hourElement.tabIndex = e.minuteElement.tabIndex = -1, e.hourElement.value = I(e.latestSelectedDateObj ? e.latestSelectedDateObj.getHours() : e.config.time_24hr ? n.hours : y(n.hours)), e.minuteElement.value = I(e.latestSelectedDateObj ? e.latestSelectedDateObj.getMinutes() : n.minutes), e.hourElement.setAttribute("step", e.config.hourIncrement.toString()), e.minuteElement.setAttribute("step", e.config.minuteIncrement.toString()), e.hourElement.setAttribute("min", e.config.time_24hr ? "0" : "1"), e.hourElement.setAttribute("max", e.config.time_24hr ? "23" : "12"), e.hourElement.setAttribute("maxlength", "2"), e.minuteElement.setAttribute("min", "0"), e.minuteElement.setAttribute("max", "59"), e.minuteElement.setAttribute("maxlength", "2"), e.timeContainer.appendChild(i), e.timeContainer.appendChild(t), e.timeContainer.appendChild(o), e.config.time_24hr && e.timeContainer.classList.add("time24hr"), e.config.enableSeconds) {
747
+ e.timeContainer.classList.add("hasSeconds");
748
+ var l = de("flatpickr-second");
749
+ e.secondElement = l.getElementsByTagName("input")[0], e.secondElement.value = I(e.latestSelectedDateObj ? e.latestSelectedDateObj.getSeconds() : n.seconds), e.secondElement.setAttribute("step", e.minuteElement.getAttribute("step")), e.secondElement.setAttribute("min", "0"), e.secondElement.setAttribute("max", "59"), e.secondElement.setAttribute("maxlength", "2"), e.timeContainer.appendChild(v("span", "flatpickr-time-separator", ":")), e.timeContainer.appendChild(l);
750
+ }
751
+ return e.config.time_24hr || (e.amPM = v("span", "flatpickr-am-pm", e.l10n.amPM[O((e.latestSelectedDateObj ? e.hourElement.value : e.config.defaultHour) > 11)]), e.amPM.title = e.l10n.toggleTitle, e.amPM.tabIndex = -1, e.timeContainer.appendChild(e.amPM)), e.timeContainer;
752
+ }
753
+ function Oe() {
754
+ e.weekdayContainer ? ce(e.weekdayContainer) : e.weekdayContainer = v("div", "flatpickr-weekdays");
755
+ for (var n = e.config.showMonths; n--; ) {
756
+ var t = v("div", "flatpickr-weekdaycontainer");
757
+ e.weekdayContainer.appendChild(t);
758
+ }
759
+ return Ae(), e.weekdayContainer;
760
+ }
761
+ function Ae() {
762
+ if (e.weekdayContainer) {
763
+ var n = e.l10n.firstDayOfWeek, t = Je(e.l10n.weekdays.shorthand);
764
+ n > 0 && n < t.length && (t = Je(t.splice(n, t.length), t.splice(0, n)));
765
+ for (var i = e.config.showMonths; i--; )
766
+ e.weekdayContainer.children[i].innerHTML = `
767
+ <span class='flatpickr-weekday'>
768
+ ` + t.join("</span><span class='flatpickr-weekday'>") + `
769
+ </span>
770
+ `;
771
+ }
772
+ }
773
+ function Ze() {
774
+ e.calendarContainer.classList.add("hasWeeks");
775
+ var n = v("div", "flatpickr-weekwrapper");
776
+ n.appendChild(v("span", "flatpickr-weekday", e.l10n.weekAbbreviation));
777
+ var t = v("div", "flatpickr-weeks");
778
+ return n.appendChild(t), {
779
+ weekWrapper: n,
780
+ weekNumbers: t
781
+ };
782
+ }
783
+ function ve(n, t) {
784
+ t === void 0 && (t = !0);
785
+ var i = t ? n : n - e.currentMonth;
786
+ i < 0 && e._hidePrevMonthArrow === !0 || i > 0 && e._hideNextMonthArrow === !0 || (e.currentMonth += i, (e.currentMonth < 0 || e.currentMonth > 11) && (e.currentYear += e.currentMonth > 11 ? 1 : -1, e.currentMonth = (e.currentMonth + 12) % 12, M("onYearChange"), V()), ie(), M("onMonthChange"), se());
787
+ }
788
+ function Qe(n, t) {
789
+ if (n === void 0 && (n = !0), t === void 0 && (t = !0), e.input.value = "", e.altInput !== void 0 && (e.altInput.value = ""), e.mobileInput !== void 0 && (e.mobileInput.value = ""), e.selectedDates = [], e.latestSelectedDateObj = void 0, t === !0 && (e.currentYear = e._initialDate.getFullYear(), e.currentMonth = e._initialDate.getMonth()), e.config.enableTime === !0) {
790
+ var i = Ie(e.config), o = i.hours, l = i.minutes, f = i.seconds;
791
+ Y(o, l, f);
792
+ }
793
+ e.redraw(), n && M("onChange");
794
+ }
795
+ function Xe() {
796
+ e.isOpen = !1, e.isMobile || (e.calendarContainer !== void 0 && e.calendarContainer.classList.remove("open"), e._input !== void 0 && e._input.classList.remove("active")), M("onClose");
797
+ }
798
+ function en() {
799
+ e.config !== void 0 && M("onDestroy");
800
+ for (var n = e._handlers.length; n--; )
801
+ e._handlers[n].remove();
802
+ if (e._handlers = [], e.mobileInput)
803
+ e.mobileInput.parentNode && e.mobileInput.parentNode.removeChild(e.mobileInput), e.mobileInput = void 0;
804
+ else if (e.calendarContainer && e.calendarContainer.parentNode)
805
+ if (e.config.static && e.calendarContainer.parentNode) {
806
+ var t = e.calendarContainer.parentNode;
807
+ if (t.lastChild && t.removeChild(t.lastChild), t.parentNode) {
808
+ for (; t.firstChild; )
809
+ t.parentNode.insertBefore(t.firstChild, t);
810
+ t.parentNode.removeChild(t);
811
+ }
812
+ } else
813
+ e.calendarContainer.parentNode.removeChild(e.calendarContainer);
814
+ e.altInput && (e.input.type = "text", e.altInput.parentNode && e.altInput.parentNode.removeChild(e.altInput), delete e.altInput), e.input && (e.input.type = e.input._type, e.input.classList.remove("flatpickr-input"), e.input.removeAttribute("readonly")), [
815
+ "_showTimeInput",
816
+ "latestSelectedDateObj",
817
+ "_hideNextMonthArrow",
818
+ "_hidePrevMonthArrow",
819
+ "__hideNextMonthArrow",
820
+ "__hidePrevMonthArrow",
821
+ "isMobile",
822
+ "isOpen",
823
+ "selectedDateElem",
824
+ "minDateHasTime",
825
+ "maxDateHasTime",
826
+ "days",
827
+ "daysContainer",
828
+ "_input",
829
+ "_positionElement",
830
+ "innerContainer",
831
+ "rContainer",
832
+ "monthNav",
833
+ "todayDateElem",
834
+ "calendarContainer",
835
+ "weekdayContainer",
836
+ "prevMonthNav",
837
+ "nextMonthNav",
838
+ "monthsDropdownContainer",
839
+ "currentMonthElement",
840
+ "currentYearElement",
841
+ "navigationCurrentMonth",
842
+ "selectedDateElem",
843
+ "config"
844
+ ].forEach(function(i) {
845
+ try {
846
+ delete e[i];
847
+ } catch {
848
+ }
849
+ });
850
+ }
851
+ function X(n) {
852
+ return e.calendarContainer.contains(n);
853
+ }
854
+ function De(n) {
855
+ if (e.isOpen && !e.config.inline) {
856
+ var t = _(n), i = X(t), o = t === e.input || t === e.altInput || e.element.contains(t) || n.path && n.path.indexOf && (~n.path.indexOf(e.input) || ~n.path.indexOf(e.altInput)), l = !o && !i && !X(n.relatedTarget), f = !e.config.ignoredFocusElements.some(function(m) {
857
+ return m.contains(t);
858
+ });
859
+ l && f && (e.config.allowInput && e.setDate(e._input.value, !1, e.config.altInput ? e.config.altFormat : e.config.dateFormat), e.timeContainer !== void 0 && e.minuteElement !== void 0 && e.hourElement !== void 0 && e.input.value !== "" && e.input.value !== void 0 && E(), e.close(), e.config && e.config.mode === "range" && e.selectedDates.length === 1 && e.clear(!1));
860
+ }
861
+ }
862
+ function re(n) {
863
+ if (!(!n || e.config.minDate && n < e.config.minDate.getFullYear() || e.config.maxDate && n > e.config.maxDate.getFullYear())) {
864
+ var t = n, i = e.currentYear !== t;
865
+ e.currentYear = t || e.currentYear, e.config.maxDate && e.currentYear === e.config.maxDate.getFullYear() ? e.currentMonth = Math.min(e.config.maxDate.getMonth(), e.currentMonth) : e.config.minDate && e.currentYear === e.config.minDate.getFullYear() && (e.currentMonth = Math.max(e.config.minDate.getMonth(), e.currentMonth)), i && (e.redraw(), M("onYearChange"), V());
866
+ }
867
+ }
868
+ function B(n, t) {
869
+ var i;
870
+ t === void 0 && (t = !0);
871
+ var o = e.parseDate(n, void 0, t);
872
+ if (e.config.minDate && o && F(o, e.config.minDate, t !== void 0 ? t : !e.minDateHasTime) < 0 || e.config.maxDate && o && F(o, e.config.maxDate, t !== void 0 ? t : !e.maxDateHasTime) > 0)
873
+ return !1;
874
+ if (!e.config.enable && e.config.disable.length === 0)
875
+ return !0;
876
+ if (o === void 0)
877
+ return !1;
878
+ for (var l = !!e.config.enable, f = (i = e.config.enable) !== null && i !== void 0 ? i : e.config.disable, m = 0, s = void 0; m < f.length; m++) {
879
+ if (s = f[m], typeof s == "function" && s(o))
880
+ return l;
881
+ if (s instanceof Date && o !== void 0 && s.getTime() === o.getTime())
882
+ return l;
883
+ if (typeof s == "string") {
884
+ var p = e.parseDate(s, void 0, !0);
885
+ return p && p.getTime() === o.getTime() ? l : !l;
886
+ } else if (typeof s == "object" && o !== void 0 && s.from && s.to && o.getTime() >= s.from.getTime() && o.getTime() <= s.to.getTime())
887
+ return l;
888
+ }
889
+ return !l;
890
+ }
891
+ function oe(n) {
892
+ return e.daysContainer !== void 0 ? n.className.indexOf("hidden") === -1 && n.className.indexOf("flatpickr-disabled") === -1 && e.daysContainer.contains(n) : !1;
893
+ }
894
+ function nn(n) {
895
+ var t = n.target === e._input, i = e._input.value.trimEnd() !== Ce();
896
+ t && i && !(n.relatedTarget && X(n.relatedTarget)) && e.setDate(e._input.value, !0, n.target === e.altInput ? e.config.altFormat : e.config.dateFormat);
897
+ }
898
+ function Ne(n) {
899
+ var t = _(n), i = e.config.wrap ? a.contains(t) : t === e._input, o = e.config.allowInput, l = e.isOpen && (!o || !i), f = e.config.inline && i && !o;
900
+ if (n.keyCode === 13 && i) {
901
+ if (o)
902
+ return e.setDate(e._input.value, !0, t === e.altInput ? e.config.altFormat : e.config.dateFormat), e.close(), t.blur();
903
+ e.open();
904
+ } else if (X(t) || l || f) {
905
+ var m = !!e.timeContainer && e.timeContainer.contains(t);
906
+ switch (n.keyCode) {
907
+ case 13:
908
+ m ? (n.preventDefault(), E(), we()) : je(n);
909
+ break;
910
+ case 27:
911
+ n.preventDefault(), we();
912
+ break;
913
+ case 8:
914
+ case 46:
915
+ i && !e.config.allowInput && (n.preventDefault(), e.clear());
916
+ break;
917
+ case 37:
918
+ case 39:
919
+ if (!m && !i) {
920
+ n.preventDefault();
921
+ var s = g();
922
+ if (e.daysContainer !== void 0 && (o === !1 || s && oe(s))) {
923
+ var p = n.keyCode === 39 ? 1 : -1;
924
+ n.ctrlKey ? (n.stopPropagation(), ve(p), Q(q(1), 0)) : Q(void 0, p);
925
+ }
926
+ } else e.hourElement && e.hourElement.focus();
927
+ break;
928
+ case 38:
929
+ case 40:
930
+ n.preventDefault();
931
+ var u = n.keyCode === 40 ? 1 : -1;
932
+ e.daysContainer && t.$i !== void 0 || t === e.input || t === e.altInput ? n.ctrlKey ? (n.stopPropagation(), re(e.currentYear - u), Q(q(1), 0)) : m || Q(void 0, u * 7) : t === e.currentYearElement ? re(e.currentYear - u) : e.config.enableTime && (!m && e.hourElement && e.hourElement.focus(), E(n), e._debouncedChange());
933
+ break;
934
+ case 9:
935
+ if (m) {
936
+ var c = [
937
+ e.hourElement,
938
+ e.minuteElement,
939
+ e.secondElement,
940
+ e.amPM
941
+ ].concat(e.pluginElements).filter(function(S) {
942
+ return S;
943
+ }), w = c.indexOf(t);
944
+ if (w !== -1) {
945
+ var P = c[w + (n.shiftKey ? -1 : 1)];
946
+ n.preventDefault(), (P || e._input).focus();
947
+ }
948
+ } else !e.config.noCalendar && e.daysContainer && e.daysContainer.contains(t) && n.shiftKey && (n.preventDefault(), e._input.focus());
949
+ break;
950
+ }
951
+ }
952
+ if (e.amPM !== void 0 && t === e.amPM)
953
+ switch (n.key) {
954
+ case e.l10n.amPM[0].charAt(0):
955
+ case e.l10n.amPM[0].charAt(0).toLowerCase():
956
+ e.amPM.textContent = e.l10n.amPM[0], A(), H();
957
+ break;
958
+ case e.l10n.amPM[1].charAt(0):
959
+ case e.l10n.amPM[1].charAt(0).toLowerCase():
960
+ e.amPM.textContent = e.l10n.amPM[1], A(), H();
961
+ break;
962
+ }
963
+ (i || X(t)) && M("onKeyDown", n);
964
+ }
965
+ function le(n, t) {
966
+ if (t === void 0 && (t = "flatpickr-day"), !(e.selectedDates.length !== 1 || n && (!n.classList.contains(t) || n.classList.contains("flatpickr-disabled")))) {
967
+ for (var i = n ? n.dateObj.getTime() : e.days.firstElementChild.dateObj.getTime(), o = e.parseDate(e.selectedDates[0], void 0, !0).getTime(), l = Math.min(i, e.selectedDates[0].getTime()), f = Math.max(i, e.selectedDates[0].getTime()), m = !1, s = 0, p = 0, u = l; u < f; u += Sn.DAY)
968
+ B(new Date(u), !0) || (m = m || u > l && u < f, u < o && (!s || u > s) ? s = u : u > o && (!p || u < p) && (p = u));
969
+ var c = Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+" + e.config.showMonths + ") > ." + t));
970
+ c.forEach(function(w) {
971
+ var P = w.dateObj, S = P.getTime(), ee = s > 0 && S < s || p > 0 && S > p;
972
+ if (ee) {
973
+ w.classList.add("notAllowed"), ["inRange", "startRange", "endRange"].forEach(function(z) {
974
+ w.classList.remove(z);
975
+ });
976
+ return;
977
+ } else if (m && !ee)
978
+ return;
979
+ ["startRange", "inRange", "endRange", "notAllowed"].forEach(function(z) {
980
+ w.classList.remove(z);
981
+ }), n !== void 0 && (n.classList.add(i <= e.selectedDates[0].getTime() ? "startRange" : "endRange"), o < i && S === o ? w.classList.add("startRange") : o > i && S === o && w.classList.add("endRange"), S >= s && (p === 0 || S <= p) && Tn(S, o, i) && w.classList.add("inRange"));
982
+ });
983
+ }
984
+ }
985
+ function tn() {
986
+ e.isOpen && !e.config.static && !e.config.inline && fe();
987
+ }
988
+ function an(n, t) {
989
+ if (t === void 0 && (t = e._positionElement), e.isMobile === !0) {
990
+ if (n) {
991
+ n.preventDefault();
992
+ var i = _(n);
993
+ i && i.blur();
994
+ }
995
+ e.mobileInput !== void 0 && (e.mobileInput.focus(), e.mobileInput.click()), M("onOpen");
996
+ return;
997
+ } else if (e._input.disabled || e.config.inline)
998
+ return;
999
+ var o = e.isOpen;
1000
+ e.isOpen = !0, o || (e.calendarContainer.classList.add("open"), e._input.classList.add("active"), M("onOpen"), fe(t)), e.config.enableTime === !0 && e.config.noCalendar === !0 && e.config.allowInput === !1 && (n === void 0 || !e.timeContainer.contains(n.relatedTarget)) && setTimeout(function() {
1001
+ return e.hourElement.select();
1002
+ }, 50);
1003
+ }
1004
+ function Pe(n) {
1005
+ return function(t) {
1006
+ var i = e.config["_" + n + "Date"] = e.parseDate(t, e.config.dateFormat), o = e.config["_" + (n === "min" ? "max" : "min") + "Date"];
1007
+ i !== void 0 && (e[n === "min" ? "minDateHasTime" : "maxDateHasTime"] = i.getHours() > 0 || i.getMinutes() > 0 || i.getSeconds() > 0), e.selectedDates && (e.selectedDates = e.selectedDates.filter(function(l) {
1008
+ return B(l);
1009
+ }), !e.selectedDates.length && n === "min" && N(i), H()), e.daysContainer && (Le(), i !== void 0 ? e.currentYearElement[n] = i.getFullYear().toString() : e.currentYearElement.removeAttribute(n), e.currentYearElement.disabled = !!o && i !== void 0 && o.getFullYear() === i.getFullYear());
1010
+ };
1011
+ }
1012
+ function rn() {
1013
+ var n = [
1014
+ "wrap",
1015
+ "weekNumbers",
1016
+ "allowInput",
1017
+ "allowInvalidPreload",
1018
+ "clickOpens",
1019
+ "time_24hr",
1020
+ "enableTime",
1021
+ "noCalendar",
1022
+ "altInput",
1023
+ "shorthandCurrentMonth",
1024
+ "inline",
1025
+ "static",
1026
+ "enableSeconds",
1027
+ "disableMobile"
1028
+ ], t = k(k({}, JSON.parse(JSON.stringify(a.dataset || {}))), r), i = {};
1029
+ e.config.parseDate = t.parseDate, e.config.formatDate = t.formatDate, Object.defineProperty(e.config, "enable", {
1030
+ get: function() {
1031
+ return e.config._enable;
1032
+ },
1033
+ set: function(c) {
1034
+ e.config._enable = We(c);
1035
+ }
1036
+ }), Object.defineProperty(e.config, "disable", {
1037
+ get: function() {
1038
+ return e.config._disable;
1039
+ },
1040
+ set: function(c) {
1041
+ e.config._disable = We(c);
1042
+ }
1043
+ });
1044
+ var o = t.mode === "time";
1045
+ if (!t.dateFormat && (t.enableTime || o)) {
1046
+ var l = x.defaultConfig.dateFormat || $.dateFormat;
1047
+ i.dateFormat = t.noCalendar || o ? "H:i" + (t.enableSeconds ? ":S" : "") : l + " H:i" + (t.enableSeconds ? ":S" : "");
1048
+ }
1049
+ if (t.altInput && (t.enableTime || o) && !t.altFormat) {
1050
+ var f = x.defaultConfig.altFormat || $.altFormat;
1051
+ i.altFormat = t.noCalendar || o ? "h:i" + (t.enableSeconds ? ":S K" : " K") : f + (" h:i" + (t.enableSeconds ? ":S" : "") + " K");
1052
+ }
1053
+ Object.defineProperty(e.config, "minDate", {
1054
+ get: function() {
1055
+ return e.config._minDate;
1056
+ },
1057
+ set: Pe("min")
1058
+ }), Object.defineProperty(e.config, "maxDate", {
1059
+ get: function() {
1060
+ return e.config._maxDate;
1061
+ },
1062
+ set: Pe("max")
1063
+ });
1064
+ var m = function(c) {
1065
+ return function(w) {
1066
+ e.config[c === "min" ? "_minTime" : "_maxTime"] = e.parseDate(w, "H:i:S");
1067
+ };
1068
+ };
1069
+ Object.defineProperty(e.config, "minTime", {
1070
+ get: function() {
1071
+ return e.config._minTime;
1072
+ },
1073
+ set: m("min")
1074
+ }), Object.defineProperty(e.config, "maxTime", {
1075
+ get: function() {
1076
+ return e.config._maxTime;
1077
+ },
1078
+ set: m("max")
1079
+ }), t.mode === "time" && (e.config.noCalendar = !0, e.config.enableTime = !0), Object.assign(e.config, i, t);
1080
+ for (var s = 0; s < n.length; s++)
1081
+ e.config[n[s]] = e.config[n[s]] === !0 || e.config[n[s]] === "true";
1082
+ xe.filter(function(c) {
1083
+ return e.config[c] !== void 0;
1084
+ }).forEach(function(c) {
1085
+ e.config[c] = Ee(e.config[c] || []).map(b);
1086
+ }), e.isMobile = !e.config.disableMobile && !e.config.inline && e.config.mode === "single" && !e.config.disable.length && !e.config.enable && !e.config.weekNumbers && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
1087
+ for (var s = 0; s < e.config.plugins.length; s++) {
1088
+ var p = e.config.plugins[s](e) || {};
1089
+ for (var u in p)
1090
+ xe.indexOf(u) > -1 ? e.config[u] = Ee(p[u]).map(b).concat(e.config[u]) : typeof t[u] > "u" && (e.config[u] = p[u]);
1091
+ }
1092
+ t.altInputClass || (e.config.altInputClass = Ye().className + " " + e.config.altInputClass), M("onParseConfig");
1093
+ }
1094
+ function Ye() {
1095
+ return e.config.wrap ? a.querySelector("[data-input]") : a;
1096
+ }
1097
+ function He() {
1098
+ typeof e.config.locale != "object" && typeof x.l10ns[e.config.locale] > "u" && e.config.errorHandler(new Error("flatpickr: invalid locale " + e.config.locale)), e.l10n = k(k({}, x.l10ns.default), typeof e.config.locale == "object" ? e.config.locale : e.config.locale !== "default" ? x.l10ns[e.config.locale] : void 0), K.D = "(" + e.l10n.weekdays.shorthand.join("|") + ")", K.l = "(" + e.l10n.weekdays.longhand.join("|") + ")", K.M = "(" + e.l10n.months.shorthand.join("|") + ")", K.F = "(" + e.l10n.months.longhand.join("|") + ")", K.K = "(" + e.l10n.amPM[0] + "|" + e.l10n.amPM[1] + "|" + e.l10n.amPM[0].toLowerCase() + "|" + e.l10n.amPM[1].toLowerCase() + ")";
1099
+ var n = k(k({}, r), JSON.parse(JSON.stringify(a.dataset || {})));
1100
+ n.time_24hr === void 0 && x.defaultConfig.time_24hr === void 0 && (e.config.time_24hr = e.l10n.time_24hr), e.formatDate = qe(e), e.parseDate = _e({ config: e.config, l10n: e.l10n });
1101
+ }
1102
+ function fe(n) {
1103
+ if (typeof e.config.position == "function")
1104
+ return void e.config.position(e, n);
1105
+ if (e.calendarContainer !== void 0) {
1106
+ M("onPreCalendarPosition");
1107
+ var t = n || e._positionElement, i = Array.prototype.reduce.call(e.calendarContainer.children, (function(xn, En) {
1108
+ return xn + En.offsetHeight;
1109
+ }), 0), o = e.calendarContainer.offsetWidth, l = e.config.position.split(" "), f = l[0], m = l.length > 1 ? l[1] : null, s = t.getBoundingClientRect(), p = window.innerHeight - s.bottom, u = f === "above" || f !== "below" && p < i && s.top > i, c = window.pageYOffset + s.top + (u ? -i - 2 : t.offsetHeight + 2);
1110
+ if (T(e.calendarContainer, "arrowTop", !u), T(e.calendarContainer, "arrowBottom", u), !e.config.inline) {
1111
+ var w = window.pageXOffset + s.left, P = !1, S = !1;
1112
+ m === "center" ? (w -= (o - s.width) / 2, P = !0) : m === "right" && (w -= o - s.width, S = !0), T(e.calendarContainer, "arrowLeft", !P && !S), T(e.calendarContainer, "arrowCenter", P), T(e.calendarContainer, "arrowRight", S);
1113
+ var ee = window.document.body.offsetWidth - (window.pageXOffset + s.right), z = w + o > window.document.body.offsetWidth, vn = ee + o > window.document.body.offsetWidth;
1114
+ if (T(e.calendarContainer, "rightMost", z), !e.config.static)
1115
+ if (e.calendarContainer.style.top = c + "px", !z)
1116
+ e.calendarContainer.style.left = w + "px", e.calendarContainer.style.right = "auto";
1117
+ else if (!vn)
1118
+ e.calendarContainer.style.left = "auto", e.calendarContainer.style.right = ee + "px";
1119
+ else {
1120
+ var ye = on();
1121
+ if (ye === void 0)
1122
+ return;
1123
+ var Dn = window.document.body.offsetWidth, wn = Math.max(0, Dn / 2 - o / 2), bn = ".flatpickr-calendar.centerMost:before", Mn = ".flatpickr-calendar.centerMost:after", Cn = ye.cssRules.length, yn = "{left:" + s.left + "px;right:auto;}";
1124
+ T(e.calendarContainer, "rightMost", !1), T(e.calendarContainer, "centerMost", !0), ye.insertRule(bn + "," + Mn + yn, Cn), e.calendarContainer.style.left = wn + "px", e.calendarContainer.style.right = "auto";
1125
+ }
1126
+ }
1127
+ }
1128
+ }
1129
+ function on() {
1130
+ for (var n = null, t = 0; t < document.styleSheets.length; t++) {
1131
+ var i = document.styleSheets[t];
1132
+ if (i.cssRules) {
1133
+ try {
1134
+ i.cssRules;
1135
+ } catch {
1136
+ continue;
1137
+ }
1138
+ n = i;
1139
+ break;
1140
+ }
1141
+ }
1142
+ return n ?? ln();
1143
+ }
1144
+ function ln() {
1145
+ var n = document.createElement("style");
1146
+ return document.head.appendChild(n), n.sheet;
1147
+ }
1148
+ function Le() {
1149
+ e.config.noCalendar || e.isMobile || (V(), se(), ie());
1150
+ }
1151
+ function we() {
1152
+ e._input.focus(), window.navigator.userAgent.indexOf("MSIE") !== -1 || navigator.msMaxTouchPoints !== void 0 ? setTimeout(e.close, 0) : e.close();
1153
+ }
1154
+ function je(n) {
1155
+ n.preventDefault(), n.stopPropagation();
1156
+ var t = function(c) {
1157
+ return c.classList && c.classList.contains("flatpickr-day") && !c.classList.contains("flatpickr-disabled") && !c.classList.contains("notAllowed");
1158
+ }, i = Ue(_(n), t);
1159
+ if (i !== void 0) {
1160
+ var o = i, l = e.latestSelectedDateObj = new Date(o.dateObj.getTime()), f = (l.getMonth() < e.currentMonth || l.getMonth() > e.currentMonth + e.config.showMonths - 1) && e.config.mode !== "range";
1161
+ if (e.selectedDateElem = o, e.config.mode === "single")
1162
+ e.selectedDates = [l];
1163
+ else if (e.config.mode === "multiple") {
1164
+ var m = Me(l);
1165
+ m ? e.selectedDates.splice(parseInt(m), 1) : e.selectedDates.push(l);
1166
+ } else e.config.mode === "range" && (e.selectedDates.length === 2 && e.clear(!1, !1), e.latestSelectedDateObj = l, e.selectedDates.push(l), F(l, e.selectedDates[0], !0) !== 0 && e.selectedDates.sort(function(c, w) {
1167
+ return c.getTime() - w.getTime();
1168
+ }));
1169
+ if (A(), f) {
1170
+ var s = e.currentYear !== l.getFullYear();
1171
+ e.currentYear = l.getFullYear(), e.currentMonth = l.getMonth(), s && (M("onYearChange"), V()), M("onMonthChange");
1172
+ }
1173
+ if (se(), ie(), H(), !f && e.config.mode !== "range" && e.config.showMonths === 1 ? U(o) : e.selectedDateElem !== void 0 && e.hourElement === void 0 && e.selectedDateElem && e.selectedDateElem.focus(), e.hourElement !== void 0 && e.hourElement !== void 0 && e.hourElement.focus(), e.config.closeOnSelect) {
1174
+ var p = e.config.mode === "single" && !e.config.enableTime, u = e.config.mode === "range" && e.selectedDates.length === 2 && !e.config.enableTime;
1175
+ (p || u) && we();
1176
+ }
1177
+ j();
1178
+ }
1179
+ }
1180
+ var ue = {
1181
+ locale: [He, Ae],
1182
+ showMonths: [Fe, C, Oe],
1183
+ minDate: [L],
1184
+ maxDate: [L],
1185
+ positionElement: [Be],
1186
+ clickOpens: [
1187
+ function() {
1188
+ e.config.clickOpens === !0 ? (D(e._input, "focus", e.open), D(e._input, "click", e.open)) : (e._input.removeEventListener("focus", e.open), e._input.removeEventListener("click", e.open));
1189
+ }
1190
+ ]
1191
+ };
1192
+ function fn(n, t) {
1193
+ if (n !== null && typeof n == "object") {
1194
+ Object.assign(e.config, n);
1195
+ for (var i in n)
1196
+ ue[i] !== void 0 && ue[i].forEach(function(o) {
1197
+ return o();
1198
+ });
1199
+ } else
1200
+ e.config[n] = t, ue[n] !== void 0 ? ue[n].forEach(function(o) {
1201
+ return o();
1202
+ }) : xe.indexOf(n) > -1 && (e.config[n] = Ee(t));
1203
+ e.redraw(), H(!0);
1204
+ }
1205
+ function Re(n, t) {
1206
+ var i = [];
1207
+ if (n instanceof Array)
1208
+ i = n.map(function(o) {
1209
+ return e.parseDate(o, t);
1210
+ });
1211
+ else if (n instanceof Date || typeof n == "number")
1212
+ i = [e.parseDate(n, t)];
1213
+ else if (typeof n == "string")
1214
+ switch (e.config.mode) {
1215
+ case "single":
1216
+ case "time":
1217
+ i = [e.parseDate(n, t)];
1218
+ break;
1219
+ case "multiple":
1220
+ i = n.split(e.config.conjunction).map(function(o) {
1221
+ return e.parseDate(o, t);
1222
+ });
1223
+ break;
1224
+ case "range":
1225
+ i = n.split(e.l10n.rangeSeparator).map(function(o) {
1226
+ return e.parseDate(o, t);
1227
+ });
1228
+ break;
1229
+ }
1230
+ else
1231
+ e.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(n)));
1232
+ e.selectedDates = e.config.allowInvalidPreload ? i : i.filter(function(o) {
1233
+ return o instanceof Date && B(o, !1);
1234
+ }), e.config.mode === "range" && e.selectedDates.sort(function(o, l) {
1235
+ return o.getTime() - l.getTime();
1236
+ });
1237
+ }
1238
+ function un(n, t, i) {
1239
+ if (t === void 0 && (t = !1), i === void 0 && (i = e.config.dateFormat), n !== 0 && !n || n instanceof Array && n.length === 0)
1240
+ return e.clear(t);
1241
+ Re(n, i), e.latestSelectedDateObj = e.selectedDates[e.selectedDates.length - 1], e.redraw(), L(void 0, t), N(), e.selectedDates.length === 0 && e.clear(!1), H(t), t && M("onChange");
1242
+ }
1243
+ function We(n) {
1244
+ return n.slice().map(function(t) {
1245
+ return typeof t == "string" || typeof t == "number" || t instanceof Date ? e.parseDate(t, void 0, !0) : t && typeof t == "object" && t.from && t.to ? {
1246
+ from: e.parseDate(t.from, void 0),
1247
+ to: e.parseDate(t.to, void 0)
1248
+ } : t;
1249
+ }).filter(function(t) {
1250
+ return t;
1251
+ });
1252
+ }
1253
+ function sn() {
1254
+ e.selectedDates = [], e.now = e.parseDate(e.config.now) || /* @__PURE__ */ new Date();
1255
+ var n = e.config.defaultDate || ((e.input.nodeName === "INPUT" || e.input.nodeName === "TEXTAREA") && e.input.placeholder && e.input.value === e.input.placeholder ? null : e.input.value);
1256
+ n && Re(n, e.config.dateFormat), e._initialDate = e.selectedDates.length > 0 ? e.selectedDates[0] : e.config.minDate && e.config.minDate.getTime() > e.now.getTime() ? e.config.minDate : e.config.maxDate && e.config.maxDate.getTime() < e.now.getTime() ? e.config.maxDate : e.now, e.currentYear = e._initialDate.getFullYear(), e.currentMonth = e._initialDate.getMonth(), e.selectedDates.length > 0 && (e.latestSelectedDateObj = e.selectedDates[0]), e.config.minTime !== void 0 && (e.config.minTime = e.parseDate(e.config.minTime, "H:i")), e.config.maxTime !== void 0 && (e.config.maxTime = e.parseDate(e.config.maxTime, "H:i")), e.minDateHasTime = !!e.config.minDate && (e.config.minDate.getHours() > 0 || e.config.minDate.getMinutes() > 0 || e.config.minDate.getSeconds() > 0), e.maxDateHasTime = !!e.config.maxDate && (e.config.maxDate.getHours() > 0 || e.config.maxDate.getMinutes() > 0 || e.config.maxDate.getSeconds() > 0);
1257
+ }
1258
+ function cn() {
1259
+ if (e.input = Ye(), !e.input) {
1260
+ e.config.errorHandler(new Error("Invalid input element specified"));
1261
+ return;
1262
+ }
1263
+ e.input._type = e.input.type, e.input.type = "text", e.input.classList.add("flatpickr-input"), e._input = e.input, e.config.altInput && (e.altInput = v(e.input.nodeName, e.config.altInputClass), e._input = e.altInput, e.altInput.placeholder = e.input.placeholder, e.altInput.disabled = e.input.disabled, e.altInput.required = e.input.required, e.altInput.tabIndex = e.input.tabIndex, e.altInput.type = "text", e.input.setAttribute("type", "hidden"), !e.config.static && e.input.parentNode && e.input.parentNode.insertBefore(e.altInput, e.input.nextSibling)), e.config.allowInput || e._input.setAttribute("readonly", "readonly"), Be();
1264
+ }
1265
+ function Be() {
1266
+ e._positionElement = e.config.positionElement || e._input;
1267
+ }
1268
+ function dn() {
1269
+ var n = e.config.enableTime ? e.config.noCalendar ? "time" : "datetime-local" : "date";
1270
+ e.mobileInput = v("input", e.input.className + " flatpickr-mobile"), e.mobileInput.tabIndex = 1, e.mobileInput.type = n, e.mobileInput.disabled = e.input.disabled, e.mobileInput.required = e.input.required, e.mobileInput.placeholder = e.input.placeholder, e.mobileFormatStr = n === "datetime-local" ? "Y-m-d\\TH:i:S" : n === "date" ? "Y-m-d" : "H:i:S", e.selectedDates.length > 0 && (e.mobileInput.defaultValue = e.mobileInput.value = e.formatDate(e.selectedDates[0], e.mobileFormatStr)), e.config.minDate && (e.mobileInput.min = e.formatDate(e.config.minDate, "Y-m-d")), e.config.maxDate && (e.mobileInput.max = e.formatDate(e.config.maxDate, "Y-m-d")), e.input.getAttribute("step") && (e.mobileInput.step = String(e.input.getAttribute("step"))), e.input.type = "hidden", e.altInput !== void 0 && (e.altInput.type = "hidden");
1271
+ try {
1272
+ e.input.parentNode && e.input.parentNode.insertBefore(e.mobileInput, e.input.nextSibling);
1273
+ } catch {
1274
+ }
1275
+ D(e.mobileInput, "change", function(t) {
1276
+ e.setDate(_(t).value, !1, e.mobileFormatStr), M("onChange"), M("onClose");
1277
+ });
1278
+ }
1279
+ function gn(n) {
1280
+ if (e.isOpen === !0)
1281
+ return e.close();
1282
+ e.open(n);
1283
+ }
1284
+ function M(n, t) {
1285
+ if (e.config !== void 0) {
1286
+ var i = e.config[n];
1287
+ if (i !== void 0 && i.length > 0)
1288
+ for (var o = 0; i[o] && o < i.length; o++)
1289
+ i[o](e.selectedDates, e.input.value, e, t);
1290
+ n === "onChange" && (e.input.dispatchEvent(be("change")), e.input.dispatchEvent(be("input")));
1291
+ }
1292
+ }
1293
+ function be(n) {
1294
+ var t = document.createEvent("Event");
1295
+ return t.initEvent(n, !0, !0), t;
1296
+ }
1297
+ function Me(n) {
1298
+ for (var t = 0; t < e.selectedDates.length; t++) {
1299
+ var i = e.selectedDates[t];
1300
+ if (i instanceof Date && F(i, n) === 0)
1301
+ return "" + t;
1302
+ }
1303
+ return !1;
1304
+ }
1305
+ function mn(n) {
1306
+ return e.config.mode !== "range" || e.selectedDates.length < 2 ? !1 : F(n, e.selectedDates[0]) >= 0 && F(n, e.selectedDates[1]) <= 0;
1307
+ }
1308
+ function se() {
1309
+ e.config.noCalendar || e.isMobile || !e.monthNav || (e.yearElements.forEach(function(n, t) {
1310
+ var i = new Date(e.currentYear, e.currentMonth, 1);
1311
+ i.setMonth(e.currentMonth + t), e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? e.monthElements[t].textContent = ge(i.getMonth(), e.config.shorthandCurrentMonth, e.l10n) + " " : e.monthsDropdownContainer.value = i.getMonth().toString(), n.value = i.getFullYear().toString();
1312
+ }), e._hidePrevMonthArrow = e.config.minDate !== void 0 && (e.currentYear === e.config.minDate.getFullYear() ? e.currentMonth <= e.config.minDate.getMonth() : e.currentYear < e.config.minDate.getFullYear()), e._hideNextMonthArrow = e.config.maxDate !== void 0 && (e.currentYear === e.config.maxDate.getFullYear() ? e.currentMonth + 1 > e.config.maxDate.getMonth() : e.currentYear > e.config.maxDate.getFullYear()));
1313
+ }
1314
+ function Ce(n) {
1315
+ var t = n || (e.config.altInput ? e.config.altFormat : e.config.dateFormat);
1316
+ return e.selectedDates.map(function(i) {
1317
+ return e.formatDate(i, t);
1318
+ }).filter(function(i, o, l) {
1319
+ return e.config.mode !== "range" || e.config.enableTime || l.indexOf(i) === o;
1320
+ }).join(e.config.mode !== "range" ? e.config.conjunction : e.l10n.rangeSeparator);
1321
+ }
1322
+ function H(n) {
1323
+ n === void 0 && (n = !0), e.mobileInput !== void 0 && e.mobileFormatStr && (e.mobileInput.value = e.latestSelectedDateObj !== void 0 ? e.formatDate(e.latestSelectedDateObj, e.mobileFormatStr) : ""), e.input.value = Ce(e.config.dateFormat), e.altInput !== void 0 && (e.altInput.value = Ce(e.config.altFormat)), n !== !1 && M("onValueUpdate");
1324
+ }
1325
+ function pn(n) {
1326
+ var t = _(n), i = e.prevMonthNav.contains(t), o = e.nextMonthNav.contains(t);
1327
+ i || o ? ve(i ? -1 : 1) : e.yearElements.indexOf(t) >= 0 ? t.select() : t.classList.contains("arrowUp") ? e.changeYear(e.currentYear + 1) : t.classList.contains("arrowDown") && e.changeYear(e.currentYear - 1);
1328
+ }
1329
+ function hn(n) {
1330
+ n.preventDefault();
1331
+ var t = n.type === "keydown", i = _(n), o = i;
1332
+ e.amPM !== void 0 && i === e.amPM && (e.amPM.textContent = e.l10n.amPM[O(e.amPM.textContent === e.l10n.amPM[0])]);
1333
+ var l = parseFloat(o.getAttribute("min")), f = parseFloat(o.getAttribute("max")), m = parseFloat(o.getAttribute("step")), s = parseInt(o.value, 10), p = n.delta || (t ? n.which === 38 ? 1 : -1 : 0), u = s + m * p;
1334
+ if (typeof o.value < "u" && o.value.length === 2) {
1335
+ var c = o === e.hourElement, w = o === e.minuteElement;
1336
+ u < l ? (u = f + u + O(!c) + (O(c) && O(!e.amPM)), w && J(void 0, -1, e.hourElement)) : u > f && (u = o === e.hourElement ? u - f - O(!e.amPM) : l, w && J(void 0, 1, e.hourElement)), e.amPM && c && (m === 1 ? u + s === 23 : Math.abs(u - s) > m) && (e.amPM.textContent = e.l10n.amPM[O(e.amPM.textContent === e.l10n.amPM[0])]), o.value = I(u);
1337
+ }
1338
+ }
1339
+ return h(), e;
1340
+ }
1341
+ function G(a, r) {
1342
+ for (var e = Array.prototype.slice.call(a).filter(function(b) {
1343
+ return b instanceof HTMLElement;
1344
+ }), d = [], h = 0; h < e.length; h++) {
1345
+ var g = e[h];
1346
+ try {
1347
+ if (g.getAttribute("data-fp-omit") !== null)
1348
+ continue;
1349
+ g._flatpickr !== void 0 && (g._flatpickr.destroy(), g._flatpickr = void 0), g._flatpickr = Fn(g, r || {}), d.push(g._flatpickr);
1350
+ } catch (b) {
1351
+ console.error(b);
1352
+ }
1353
+ }
1354
+ return d.length === 1 ? d[0] : d;
1355
+ }
1356
+ typeof HTMLElement < "u" && typeof HTMLCollection < "u" && typeof NodeList < "u" && (HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function(a) {
1357
+ return G(this, a);
1358
+ }, HTMLElement.prototype.flatpickr = function(a) {
1359
+ return G([this], a);
1360
+ });
1361
+ var x = function(a, r) {
1362
+ return typeof a == "string" ? G(window.document.querySelectorAll(a), r) : a instanceof Node ? G([a], r) : G(a, r);
1363
+ };
1364
+ x.defaultConfig = {};
1365
+ x.l10ns = {
1366
+ en: k({}, te),
1367
+ default: k({}, te)
1368
+ };
1369
+ x.localize = function(a) {
1370
+ x.l10ns.default = k(k({}, x.l10ns.default), a);
1371
+ };
1372
+ x.setDefaults = function(a) {
1373
+ x.defaultConfig = k(k({}, x.defaultConfig), a);
1374
+ };
1375
+ x.parseDate = _e({});
1376
+ x.formatDate = qe({});
1377
+ x.compareDates = F;
1378
+ typeof jQuery < "u" && typeof jQuery.fn < "u" && (jQuery.fn.flatpickr = function(a) {
1379
+ return G(this, a);
1380
+ });
1381
+ Date.prototype.fp_incr = function(a) {
1382
+ return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof a == "string" ? parseInt(a, 10) : a));
1383
+ };
1384
+ typeof window < "u" && (window.flatpickr = x);
1385
+ const Se = (a = document) => {
1386
+ a.querySelectorAll(".datepicker").forEach((e) => {
1387
+ if (e._flatpickr) return;
1388
+ const d = e.dataset.mode || "single", h = e.dataset.enableTime === "true", g = e.dataset.noCalendar === "true", b = e.dataset.inline === "true", C = e.dataset.dateFormat || (h && g ? "H:i" : "Y-m-d");
1389
+ x(e, {
1390
+ mode: d,
1391
+ enableTime: h,
1392
+ noCalendar: g,
1393
+ inline: b,
1394
+ dateFormat: C,
1395
+ allowInput: !0,
1396
+ // Allow manual typing
1397
+ shorthandCurrentMonth: !0,
1398
+ // Display month shorthand (e.g. "Dec" instead of "December")
1399
+ prevArrow: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4"><path d="m15 18-6-6 6-6"/></svg>',
1400
+ nextArrow: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4"><path d="m9 18 6-6-6-6"/></svg>',
1401
+ static: !0
1402
+ // Position relative to wrapper, helps with scroll
1403
+ // Custom class names to hook into our CSS
1404
+ // flatpickr doesn't fully support class replacements, but we can append
1405
+ });
1406
+ });
1407
+ };
1408
+ if (typeof window < "u") {
1409
+ const a = new MutationObserver((r) => {
1410
+ r.forEach((e) => {
1411
+ e.type === "childList" && e.addedNodes.forEach((d) => {
1412
+ d.nodeType === 1 && (d.classList?.contains("datepicker") ? Se(d.parentNode) : d.querySelector?.(".datepicker") && Se(d));
1413
+ });
1414
+ });
1415
+ });
1416
+ document.addEventListener("DOMContentLoaded", () => {
1417
+ Se(), a.observe(document.body, { childList: !0, subtree: !0 });
1418
+ });
1419
+ }
1420
+ export {
1421
+ Se as initDatepicker
1422
+ };