@cagatayfdn/flora-components 0.0.164 → 0.0.165

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- import { j as ve } from "../../jsx-runtime-BcAkpsdy.js";
2
- import kt, { useRef as Be, useEffect as Ke } from "react";
3
- import { getCurrentLanguage as It } from "../../utils/language.js";
4
- import z, { SERVER_DATE_FORMAT as ce, SERVER_DATE_AND_TIME_FORMAT as St, friendlyDate as Ot, CLIENT_DATE_SHORT_FORMAT as Je, CLIENT_DATE_AND_TIME_FORMAT as _t, CLIENT_DATE_AND_TIME_SHORT_FORMAT as At, CLIENT_TIME_FORMAT as Ft } from "../../utils/date.js";
5
- import Nt from "../Icon/index.js";
6
- import Pt from "../Input/Input.js";
7
- import { c as Ue } from "../../_commonjsHelpers-CT_km90n.js";
8
- import '../../Datepicker.css';const Ee = [
1
+ import { j as ke } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import Pn, { useRef as Ue, useEffect as qe } from "react";
3
+ import { getCurrentLanguage as Yn } from "../../utils/language.js";
4
+ import Q, { SERVER_DATE_FORMAT as me, SERVER_DATE_AND_TIME_FORMAT as Hn, friendlyDate as Ln, CLIENT_DATE_SHORT_FORMAT as Ge, CLIENT_DATE_AND_TIME_FORMAT as jn, CLIENT_DATE_AND_TIME_SHORT_FORMAT as Rn, CLIENT_TIME_FORMAT as Wn } from "../../utils/date.js";
5
+ import Kn from "../Icon/index.js";
6
+ import Jn from "../Input/Input.js";
7
+ import { c as Xe } from "../../_commonjsHelpers-CT_km90n.js";
8
+ import '../../Datepicker.css';var Te = [
9
9
  "onChange",
10
10
  "onClose",
11
11
  "onDayCreate",
@@ -18,7 +18,7 @@ import '../../Datepicker.css';const Ee = [
18
18
  "onValueUpdate",
19
19
  "onYearChange",
20
20
  "onPreCalendarPosition"
21
- ], V = {
21
+ ], X = {
22
22
  _disable: [],
23
23
  allowInput: !1,
24
24
  allowInvalidPreload: !1,
@@ -39,12 +39,14 @@ import '../../Datepicker.css';const Ee = [
39
39
  disableMobile: !1,
40
40
  enableSeconds: !1,
41
41
  enableTime: !1,
42
- errorHandler: (a) => typeof console < "u" && console.warn(a),
43
- getWeek: (a) => {
44
- const o = new Date(a.getTime());
45
- o.setHours(0, 0, 0, 0), o.setDate(o.getDate() + 3 - (o.getDay() + 6) % 7);
46
- var e = new Date(o.getFullYear(), 0, 4);
47
- return 1 + Math.round(((o.getTime() - e.getTime()) / 864e5 - 3 + (e.getDay() + 6) % 7) / 7);
42
+ errorHandler: function(a) {
43
+ return typeof console < "u" && console.warn(a);
44
+ },
45
+ getWeek: function(a) {
46
+ var r = new Date(a.getTime());
47
+ r.setHours(0, 0, 0, 0), r.setDate(r.getDate() + 3 - (r.getDay() + 6) % 7);
48
+ var e = new Date(r.getFullYear(), 0, 4);
49
+ return 1 + Math.round(((r.getTime() - e.getTime()) / 864e5 - 3 + (e.getDay() + 6) % 7) / 7);
48
50
  },
49
51
  hourIncrement: 1,
50
52
  ignoredFocusElements: [],
@@ -78,7 +80,7 @@ import '../../Datepicker.css';const Ee = [
78
80
  time_24hr: !1,
79
81
  weekNumbers: !1,
80
82
  wrap: !1
81
- }, ee = {
83
+ }, re = {
82
84
  weekdays: {
83
85
  shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
84
86
  longhand: [
@@ -123,11 +125,11 @@ import '../../Datepicker.css';const Ee = [
123
125
  },
124
126
  daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
125
127
  firstDayOfWeek: 0,
126
- ordinal: (a) => {
127
- const o = a % 100;
128
- if (o > 3 && o < 21)
128
+ ordinal: function(a) {
129
+ var r = a % 100;
130
+ if (r > 3 && r < 21)
129
131
  return "th";
130
- switch (o % 10) {
132
+ switch (r % 10) {
131
133
  case 1:
132
134
  return "st";
133
135
  case 2:
@@ -148,115 +150,136 @@ import '../../Datepicker.css';const Ee = [
148
150
  hourAriaLabel: "Hour",
149
151
  minuteAriaLabel: "Minute",
150
152
  time_24hr: !1
151
- }, T = (a, o = 2) => `000${a}`.slice(o * -1), O = (a) => a === !0 ? 1 : 0;
152
- function ze(a, o) {
153
- let e;
153
+ }, S = function(a, r) {
154
+ return r === void 0 && (r = 2), ("000" + a).slice(r * -1);
155
+ }, Y = function(a) {
156
+ return a === !0 ? 1 : 0;
157
+ };
158
+ function $e(a, r) {
159
+ var e;
154
160
  return function() {
155
- clearTimeout(e), e = setTimeout(() => a.apply(this, arguments), o);
161
+ var c = this, g = arguments;
162
+ clearTimeout(e), e = setTimeout(function() {
163
+ return a.apply(c, g);
164
+ }, r);
156
165
  };
157
166
  }
158
- const xe = (a) => a instanceof Array ? a : [a];
159
- function x(a, o, e) {
167
+ var _e = function(a) {
168
+ return a instanceof Array ? a : [a];
169
+ };
170
+ function _(a, r, e) {
160
171
  if (e === !0)
161
- return a.classList.add(o);
162
- a.classList.remove(o);
172
+ return a.classList.add(r);
173
+ a.classList.remove(r);
163
174
  }
164
- function b(a, o, e) {
165
- const f = window.document.createElement(a);
166
- return o = o || "", e = e || "", f.className = o, e !== void 0 && (f.textContent = e), f;
175
+ function D(a, r, e) {
176
+ var c = window.document.createElement(a);
177
+ return r = r || "", e = e || "", c.className = r, e !== void 0 && (c.textContent = e), c;
167
178
  }
168
- function de(a) {
179
+ function ge(a) {
169
180
  for (; a.firstChild; )
170
181
  a.removeChild(a.firstChild);
171
182
  }
172
- function qe(a, o) {
173
- if (o(a))
183
+ function en(a, r) {
184
+ if (r(a))
174
185
  return a;
175
186
  if (a.parentNode)
176
- return qe(a.parentNode, o);
187
+ return en(a.parentNode, r);
177
188
  }
178
- function fe(a, o) {
179
- const e = b("div", "numInputWrapper"), f = b("input", "numInput " + a), m = b("span", "arrowUp"), h = b("span", "arrowDown");
180
- if (navigator.userAgent.indexOf("MSIE 9.0") === -1 ? f.type = "number" : (f.type = "text", f.pattern = "\\d*"), o !== void 0)
181
- for (const C in o)
182
- f.setAttribute(C, o[C]);
183
- return e.appendChild(f), e.appendChild(m), e.appendChild(h), e;
189
+ function pe(a, r) {
190
+ var e = D("div", "numInputWrapper"), c = D("input", "numInput " + a), g = D("span", "arrowUp"), d = D("span", "arrowDown");
191
+ if (navigator.userAgent.indexOf("MSIE 9.0") === -1 ? c.type = "number" : (c.type = "text", c.pattern = "\\d*"), r !== void 0)
192
+ for (var b in r)
193
+ c.setAttribute(b, r[b]);
194
+ return e.appendChild(c), e.appendChild(g), e.appendChild(d), e;
184
195
  }
185
- function k(a) {
196
+ function N(a) {
186
197
  try {
187
- return typeof a.composedPath == "function" ? a.composedPath()[0] : a.target;
198
+ if (typeof a.composedPath == "function") {
199
+ var r = a.composedPath();
200
+ return r[0];
201
+ }
202
+ return a.target;
188
203
  } catch {
189
204
  return a.target;
190
205
  }
191
206
  }
192
- const Te = () => {
193
- }, ue = (a, o, e) => e.months[o ? "shorthand" : "longhand"][a], Yt = {
194
- D: Te,
195
- F: function(a, o, e) {
196
- a.setMonth(e.months.longhand.indexOf(o));
207
+ var Se = function() {
208
+ }, he = function(a, r, e) {
209
+ return e.months[r ? "shorthand" : "longhand"][a];
210
+ }, Bn = {
211
+ D: Se,
212
+ F: function(a, r, e) {
213
+ a.setMonth(e.months.longhand.indexOf(r));
214
+ },
215
+ G: function(a, r) {
216
+ a.setHours((a.getHours() >= 12 ? 12 : 0) + parseFloat(r));
217
+ },
218
+ H: function(a, r) {
219
+ a.setHours(parseFloat(r));
220
+ },
221
+ J: function(a, r) {
222
+ a.setDate(parseFloat(r));
197
223
  },
198
- G: (a, o) => {
199
- a.setHours(parseFloat(o));
224
+ K: function(a, r, e) {
225
+ a.setHours(a.getHours() % 12 + 12 * Y(new RegExp(e.amPM[1], "i").test(r)));
200
226
  },
201
- H: (a, o) => {
202
- a.setHours(parseFloat(o));
227
+ M: function(a, r, e) {
228
+ a.setMonth(e.months.shorthand.indexOf(r));
203
229
  },
204
- J: (a, o) => {
205
- a.setDate(parseFloat(o));
230
+ S: function(a, r) {
231
+ a.setSeconds(parseFloat(r));
206
232
  },
207
- K: (a, o, e) => {
208
- a.setHours(a.getHours() % 12 + 12 * O(new RegExp(e.amPM[1], "i").test(o)));
233
+ U: function(a, r) {
234
+ return new Date(parseFloat(r) * 1e3);
209
235
  },
210
- M: function(a, o, e) {
211
- a.setMonth(e.months.shorthand.indexOf(o));
236
+ W: function(a, r, e) {
237
+ var c = parseInt(r), g = new Date(a.getFullYear(), 0, 2 + (c - 1) * 7, 0, 0, 0, 0);
238
+ return g.setDate(g.getDate() - g.getDay() + e.firstDayOfWeek), g;
212
239
  },
213
- S: (a, o) => {
214
- a.setSeconds(parseFloat(o));
240
+ Y: function(a, r) {
241
+ a.setFullYear(parseFloat(r));
215
242
  },
216
- U: (a, o) => new Date(parseFloat(o) * 1e3),
217
- W: function(a, o, e) {
218
- const f = parseInt(o), m = new Date(a.getFullYear(), 0, 2 + (f - 1) * 7, 0, 0, 0, 0);
219
- return m.setDate(m.getDate() - m.getDay() + e.firstDayOfWeek), m;
243
+ Z: function(a, r) {
244
+ return new Date(r);
220
245
  },
221
- Y: (a, o) => {
222
- a.setFullYear(parseFloat(o));
246
+ d: function(a, r) {
247
+ a.setDate(parseFloat(r));
223
248
  },
224
- Z: (a, o) => new Date(o),
225
- d: (a, o) => {
226
- a.setDate(parseFloat(o));
249
+ h: function(a, r) {
250
+ a.setHours((a.getHours() >= 12 ? 12 : 0) + parseFloat(r));
227
251
  },
228
- h: (a, o) => {
229
- a.setHours(parseFloat(o));
252
+ i: function(a, r) {
253
+ a.setMinutes(parseFloat(r));
230
254
  },
231
- i: (a, o) => {
232
- a.setMinutes(parseFloat(o));
255
+ j: function(a, r) {
256
+ a.setDate(parseFloat(r));
233
257
  },
234
- j: (a, o) => {
235
- a.setDate(parseFloat(o));
258
+ l: Se,
259
+ m: function(a, r) {
260
+ a.setMonth(parseFloat(r) - 1);
236
261
  },
237
- l: Te,
238
- m: (a, o) => {
239
- a.setMonth(parseFloat(o) - 1);
262
+ n: function(a, r) {
263
+ a.setMonth(parseFloat(r) - 1);
240
264
  },
241
- n: (a, o) => {
242
- a.setMonth(parseFloat(o) - 1);
265
+ s: function(a, r) {
266
+ a.setSeconds(parseFloat(r));
243
267
  },
244
- s: (a, o) => {
245
- a.setSeconds(parseFloat(o));
268
+ u: function(a, r) {
269
+ return new Date(parseFloat(r));
246
270
  },
247
- u: (a, o) => new Date(parseFloat(o)),
248
- w: Te,
249
- y: (a, o) => {
250
- a.setFullYear(2e3 + parseFloat(o));
251
- }
252
- }, Ie = {
253
- D: "(\\w+)",
254
- F: "(\\w+)",
271
+ w: Se,
272
+ y: function(a, r) {
273
+ a.setFullYear(2e3 + parseFloat(r));
274
+ }
275
+ }, z = {
276
+ D: "",
277
+ F: "",
255
278
  G: "(\\d\\d|\\d)",
256
279
  H: "(\\d\\d|\\d)",
257
280
  J: "(\\d\\d|\\d)\\w+",
258
281
  K: "",
259
- M: "(\\w+)",
282
+ M: "",
260
283
  S: "(\\d\\d|\\d)",
261
284
  U: "(.+)",
262
285
  W: "(\\d\\d|\\d)",
@@ -266,448 +289,531 @@ const Te = () => {
266
289
  h: "(\\d\\d|\\d)",
267
290
  i: "(\\d\\d|\\d)",
268
291
  j: "(\\d\\d|\\d)",
269
- l: "(\\w+)",
292
+ l: "",
270
293
  m: "(\\d\\d|\\d)",
271
294
  n: "(\\d\\d|\\d)",
272
295
  s: "(\\d\\d|\\d)",
273
296
  u: "(.+)",
274
297
  w: "(\\d\\d|\\d)",
275
298
  y: "(\\d{2})"
276
- }, X = {
277
- Z: (a) => a.toISOString(),
278
- D: function(a, o, e) {
279
- return o.weekdays.shorthand[X.w(a, o, e)];
299
+ }, ie = {
300
+ Z: function(a) {
301
+ return a.toISOString();
302
+ },
303
+ D: function(a, r, e) {
304
+ return r.weekdays.shorthand[ie.w(a, r, e)];
305
+ },
306
+ F: function(a, r, e) {
307
+ return he(ie.n(a, r, e) - 1, !1, r);
308
+ },
309
+ G: function(a, r, e) {
310
+ return S(ie.h(a, r, e));
280
311
  },
281
- F: function(a, o, e) {
282
- return ue(X.n(a, o, e) - 1, !1, o);
312
+ H: function(a) {
313
+ return S(a.getHours());
283
314
  },
284
- G: function(a, o, e) {
285
- return T(X.h(a, o, e));
315
+ J: function(a, r) {
316
+ return r.ordinal !== void 0 ? a.getDate() + r.ordinal(a.getDate()) : a.getDate();
286
317
  },
287
- H: (a) => T(a.getHours()),
288
- J: function(a, o) {
289
- return o.ordinal !== void 0 ? a.getDate() + o.ordinal(a.getDate()) : a.getDate();
318
+ K: function(a, r) {
319
+ return r.amPM[Y(a.getHours() > 11)];
290
320
  },
291
- K: (a, o) => o.amPM[O(a.getHours() > 11)],
292
- M: function(a, o) {
293
- return ue(a.getMonth(), !0, o);
321
+ M: function(a, r) {
322
+ return he(a.getMonth(), !0, r);
294
323
  },
295
- S: (a) => T(a.getSeconds()),
296
- U: (a) => a.getTime() / 1e3,
297
- W: function(a, o, e) {
324
+ S: function(a) {
325
+ return S(a.getSeconds());
326
+ },
327
+ U: function(a) {
328
+ return a.getTime() / 1e3;
329
+ },
330
+ W: function(a, r, e) {
298
331
  return e.getWeek(a);
299
332
  },
300
- Y: (a) => T(a.getFullYear(), 4),
301
- d: (a) => T(a.getDate()),
302
- h: (a) => a.getHours() % 12 ? a.getHours() % 12 : 12,
303
- i: (a) => T(a.getMinutes()),
304
- j: (a) => a.getDate(),
305
- l: function(a, o) {
306
- return o.weekdays.longhand[a.getDay()];
333
+ Y: function(a) {
334
+ return S(a.getFullYear(), 4);
307
335
  },
308
- m: (a) => T(a.getMonth() + 1),
309
- n: (a) => a.getMonth() + 1,
310
- s: (a) => a.getSeconds(),
311
- u: (a) => a.getTime(),
312
- w: (a) => a.getDay(),
313
- y: (a) => String(a.getFullYear()).substring(2)
314
- }, Ge = ({ config: a = V, l10n: o = ee, isMobile: e = !1 }) => (f, m, h) => {
315
- const C = h || o;
316
- return a.formatDate !== void 0 && !e ? a.formatDate(f, m, C) : m.split("").map((D, L, A) => X[D] && A[L - 1] !== "\\" ? X[D](f, C, a) : D !== "\\" ? D : "").join("");
317
- }, Se = ({ config: a = V, l10n: o = ee }) => (e, f, m, h) => {
318
- if (e !== 0 && !e)
319
- return;
320
- const C = h || o;
321
- let D;
322
- const L = e;
323
- if (e instanceof Date)
324
- D = new Date(e.getTime());
325
- else if (typeof e != "string" && e.toFixed !== void 0)
326
- D = new Date(e);
327
- else if (typeof e == "string") {
328
- const A = f || (a || V).dateFormat, _ = String(e).trim();
329
- if (_ === "today")
330
- D = /* @__PURE__ */ new Date(), m = !0;
331
- else if (/Z$/.test(_) || /GMT$/.test(_))
332
- D = new Date(e);
333
- else if (a && a.parseDate)
334
- D = a.parseDate(e, A);
335
- else {
336
- D = !a || !a.noCalendar ? new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 1, 0, 0, 0, 0) : new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0));
337
- let Y, R = [];
338
- for (let F = 0, p = 0, j = ""; F < A.length; F++) {
339
- const H = A[F], N = H === "\\", v = A[F - 1] === "\\" || N;
340
- if (Ie[H] && !v) {
341
- j += Ie[H];
342
- const W = new RegExp(j).exec(e);
343
- W && (Y = !0) && R[H !== "Y" ? "push" : "unshift"]({
344
- fn: Yt[H],
345
- val: W[++p]
346
- });
347
- } else
348
- N || (j += ".");
349
- R.forEach(({ fn: W, val: me }) => D = W(D, me, C) || D);
336
+ d: function(a) {
337
+ return S(a.getDate());
338
+ },
339
+ h: function(a) {
340
+ return a.getHours() % 12 ? a.getHours() % 12 : 12;
341
+ },
342
+ i: function(a) {
343
+ return S(a.getMinutes());
344
+ },
345
+ j: function(a) {
346
+ return a.getDate();
347
+ },
348
+ l: function(a, r) {
349
+ return r.weekdays.longhand[a.getDay()];
350
+ },
351
+ m: function(a) {
352
+ return S(a.getMonth() + 1);
353
+ },
354
+ n: function(a) {
355
+ return a.getMonth() + 1;
356
+ },
357
+ s: function(a) {
358
+ return a.getSeconds();
359
+ },
360
+ u: function(a) {
361
+ return a.getTime();
362
+ },
363
+ w: function(a) {
364
+ return a.getDay();
365
+ },
366
+ y: function(a) {
367
+ return String(a.getFullYear()).substring(2);
368
+ }
369
+ }, nn = function(a) {
370
+ var r = a.config, e = r === void 0 ? X : r, c = a.l10n, g = c === void 0 ? re : c, d = a.isMobile, b = d === void 0 ? !1 : d;
371
+ return function(w, x, W) {
372
+ var y = W || g;
373
+ return e.formatDate !== void 0 && !b ? e.formatDate(w, x, y) : x.split("").map(function(I, A, O) {
374
+ return ie[I] && O[A - 1] !== "\\" ? ie[I](w, y, e) : I !== "\\" ? I : "";
375
+ }).join("");
376
+ };
377
+ }, Oe = function(a) {
378
+ var r = a.config, e = r === void 0 ? X : r, c = a.l10n, g = c === void 0 ? re : c;
379
+ return function(d, b, w, x) {
380
+ if (!(d !== 0 && !d)) {
381
+ var W = x || g, y, I = d;
382
+ if (d instanceof Date)
383
+ y = new Date(d.getTime());
384
+ else if (typeof d != "string" && d.toFixed !== void 0)
385
+ y = new Date(d);
386
+ else if (typeof d == "string") {
387
+ var A = b || (e || X).dateFormat, O = String(d).trim();
388
+ if (O === "today")
389
+ y = /* @__PURE__ */ new Date(), w = !0;
390
+ else if (e && e.parseDate)
391
+ y = e.parseDate(d, A);
392
+ else if (/Z$/.test(O) || /GMT$/.test(O))
393
+ y = new Date(d);
394
+ else {
395
+ for (var H = void 0, v = [], j = 0, V = 0, E = ""; j < A.length; j++) {
396
+ var K = A[j], U = K === "\\", ve = A[j - 1] === "\\" || U;
397
+ if (z[K] && !ve) {
398
+ E += z[K];
399
+ var J = new RegExp(E).exec(d);
400
+ J && (H = !0) && v[K !== "Y" ? "push" : "unshift"]({
401
+ fn: Bn[K],
402
+ val: J[++V]
403
+ });
404
+ } else
405
+ U || (E += ".");
406
+ }
407
+ 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)), v.forEach(function(q) {
408
+ var G = q.fn, De = q.val;
409
+ return y = G(y, De, W) || y;
410
+ }), y = H ? y : void 0;
411
+ }
412
+ }
413
+ if (!(y instanceof Date && !isNaN(y.getTime()))) {
414
+ e.errorHandler(new Error("Invalid date provided: " + I));
415
+ return;
350
416
  }
351
- D = Y ? D : void 0;
417
+ return w === !0 && y.setHours(0, 0, 0, 0), y;
352
418
  }
353
- }
354
- if (!(D instanceof Date && !isNaN(D.getTime()))) {
355
- a.errorHandler(new Error(`Invalid date provided: ${L}`));
356
- return;
357
- }
358
- return m === !0 && D.setHours(0, 0, 0, 0), D;
419
+ };
359
420
  };
360
- function I(a, o, e = !0) {
361
- return e !== !1 ? new Date(a.getTime()).setHours(0, 0, 0, 0) - new Date(o.getTime()).setHours(0, 0, 0, 0) : a.getTime() - o.getTime();
421
+ function P(a, r, e) {
422
+ 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();
362
423
  }
363
- const jt = (a, o, e) => a > Math.min(o, e) && a < Math.max(o, e), Ht = {
424
+ var zn = function(a, r, e) {
425
+ return a > Math.min(r, e) && a < Math.max(r, e);
426
+ }, Ie = function(a, r, e) {
427
+ return a * 3600 + r * 60 + e;
428
+ }, Vn = function(a) {
429
+ var r = Math.floor(a / 3600), e = (a - r * 3600) / 60;
430
+ return [r, e, a - r * 3600 - e * 60];
431
+ }, Un = {
364
432
  DAY: 864e5
365
433
  };
366
- function ke(a) {
367
- let o = a.defaultHour, e = a.defaultMinute, f = a.defaultSeconds;
434
+ function Ae(a) {
435
+ var r = a.defaultHour, e = a.defaultMinute, c = a.defaultSeconds;
368
436
  if (a.minDate !== void 0) {
369
- const m = a.minDate.getHours(), h = a.minDate.getMinutes(), C = a.minDate.getSeconds();
370
- o < m && (o = m), o === m && e < h && (e = h), o === m && e === h && f < C && (f = a.minDate.getSeconds());
437
+ var g = a.minDate.getHours(), d = a.minDate.getMinutes(), b = a.minDate.getSeconds();
438
+ r < g && (r = g), r === g && e < d && (e = d), r === g && e === d && c < b && (c = a.minDate.getSeconds());
371
439
  }
372
440
  if (a.maxDate !== void 0) {
373
- const m = a.maxDate.getHours(), h = a.maxDate.getMinutes();
374
- o = Math.min(o, m), o === m && (e = Math.min(h, e)), o === m && e === h && (f = a.maxDate.getSeconds());
441
+ var w = a.maxDate.getHours(), x = a.maxDate.getMinutes();
442
+ r = Math.min(r, w), r === w && (e = Math.min(x, e)), r === w && e === x && (c = a.maxDate.getSeconds());
375
443
  }
376
- return { hours: o, minutes: e, seconds: f };
444
+ return { hours: r, minutes: e, seconds: c };
377
445
  }
378
- typeof Object.assign != "function" && (Object.assign = function(a, ...o) {
446
+ typeof Object.assign != "function" && (Object.assign = function(a) {
447
+ for (var r = [], e = 1; e < arguments.length; e++)
448
+ r[e - 1] = arguments[e];
379
449
  if (!a)
380
450
  throw TypeError("Cannot convert undefined or null to object");
381
- for (const e of o)
382
- e && Object.keys(e).forEach((f) => a[f] = e[f]);
451
+ for (var c = function(w) {
452
+ w && Object.keys(w).forEach(function(x) {
453
+ return a[x] = w[x];
454
+ });
455
+ }, g = 0, d = r; g < d.length; g++) {
456
+ var b = d[g];
457
+ c(b);
458
+ }
383
459
  return a;
384
460
  });
385
- const Lt = 300;
386
- function Rt(a, o) {
387
- const e = {
388
- config: Object.assign(Object.assign({}, V), y.defaultConfig),
389
- l10n: ee
461
+ var T = function() {
462
+ return T = Object.assign || function(a) {
463
+ for (var r, e = 1, c = arguments.length; e < c; e++) {
464
+ r = arguments[e];
465
+ for (var g in r)
466
+ Object.prototype.hasOwnProperty.call(r, g) && (a[g] = r[g]);
467
+ }
468
+ return a;
469
+ }, T.apply(this, arguments);
470
+ }, Ze = function() {
471
+ for (var a = 0, r = 0, e = arguments.length; r < e; r++)
472
+ a += arguments[r].length;
473
+ for (var c = Array(a), g = 0, r = 0; r < e; r++)
474
+ for (var d = arguments[r], b = 0, w = d.length; b < w; b++, g++)
475
+ c[g] = d[b];
476
+ return c;
477
+ }, qn = 300;
478
+ function Gn(a, r) {
479
+ var e = {
480
+ config: T(T({}, X), k.defaultConfig),
481
+ l10n: re
390
482
  };
391
- e.parseDate = Se({ config: e.config, l10n: e.l10n }), e._handlers = [], e.pluginElements = [], e.loadedPlugins = [], e._bind = p, e._setHoursFromDate = Y, e._positionCalendar = oe, e.changeMonth = he, e.changeYear = ae, e.clear = at, e.close = it, e._createElement = b, e.destroy = ot, e.isEnabled = B, e.jumpToDate = N, e.open = ct, e.redraw = He, e.set = mt, e.setDate = gt, e.toggle = bt;
392
- function f() {
483
+ e.parseDate = Oe({ config: e.config, l10n: e.l10n }), e._handlers = [], e.pluginElements = [], e.loadedPlugins = [], e._bind = v, e._setHoursFromDate = A, e._positionCalendar = se, e.changeMonth = Me, e.changeYear = le, e.clear = un, e.close = fn, e.onMouseOver = fe, e._createElement = D, e.createDay = J, e.destroy = sn, e.isEnabled = B, e.jumpToDate = E, e.updateValue = R, e.open = mn, e.redraw = Ke, e.set = vn, e.setDate = Dn, e.toggle = yn;
484
+ function c() {
393
485
  e.utils = {
394
- getDaysInMonth(t = e.currentMonth, n = e.currentYear) {
395
- return t === 1 && (n % 4 === 0 && n % 100 !== 0 || n % 400 === 0) ? 29 : e.l10n.daysInMonth[t];
486
+ getDaysInMonth: function(n, t) {
487
+ 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];
396
488
  }
397
489
  };
398
490
  }
399
- function m() {
400
- e.element = e.input = a, e.isOpen = !1, dt(), je(), ht(), pt(), f(), e.isMobile || me(), H(), (e.selectedDates.length || e.config.noCalendar) && (e.config.enableTime && Y(e.config.noCalendar ? e.latestSelectedDateObj : void 0), $(!1)), C();
401
- const t = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
402
- !e.isMobile && t && oe(), w("onReady");
491
+ function g() {
492
+ e.element = e.input = a, e.isOpen = !1, gn(), We(), bn(), Mn(), c(), e.isMobile || ve(), V(), (e.selectedDates.length || e.config.noCalendar) && (e.config.enableTime && A(e.config.noCalendar ? e.latestSelectedDateObj : void 0), R(!1)), w();
493
+ var n = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
494
+ !e.isMobile && n && se(), C("onReady");
495
+ }
496
+ function d() {
497
+ var n;
498
+ return ((n = e.calendarContainer) === null || n === void 0 ? void 0 : n.getRootNode()).activeElement || document.activeElement;
403
499
  }
404
- function h(t) {
405
- return t.bind(e);
500
+ function b(n) {
501
+ return n.bind(e);
406
502
  }
407
- function C() {
408
- const t = e.config;
409
- t.weekNumbers === !1 && t.showMonths === 1 || t.noCalendar !== !0 && window.requestAnimationFrame(function() {
503
+ function w() {
504
+ var n = e.config;
505
+ n.weekNumbers === !1 && n.showMonths === 1 || n.noCalendar !== !0 && window.requestAnimationFrame(function() {
410
506
  if (e.calendarContainer !== void 0 && (e.calendarContainer.style.visibility = "hidden", e.calendarContainer.style.display = "block"), e.daysContainer !== void 0) {
411
- const n = (e.days.offsetWidth + 1) * t.showMonths;
412
- e.daysContainer.style.width = n + "px", e.calendarContainer.style.width = n + (e.weekWrapper !== void 0 ? e.weekWrapper.offsetWidth : 0) + "px", e.calendarContainer.style.removeProperty("visibility"), e.calendarContainer.style.removeProperty("display");
507
+ var t = (e.days.offsetWidth + 1) * n.showMonths;
508
+ 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");
413
509
  }
414
510
  });
415
511
  }
416
- function D(t) {
512
+ function x(n) {
417
513
  if (e.selectedDates.length === 0) {
418
- const i = e.config.minDate === void 0 || I(/* @__PURE__ */ new Date(), e.config.minDate) >= 0 ? /* @__PURE__ */ new Date() : new Date(e.config.minDate.getTime()), r = ke(e.config);
419
- i.setHours(r.hours, r.minutes, r.seconds, i.getMilliseconds()), e.selectedDates = [i], e.latestSelectedDateObj = i;
514
+ var t = e.config.minDate === void 0 || P(/* @__PURE__ */ new Date(), e.config.minDate) >= 0 ? /* @__PURE__ */ new Date() : new Date(e.config.minDate.getTime()), i = Ae(e.config);
515
+ t.setHours(i.hours, i.minutes, i.seconds, t.getMilliseconds()), e.selectedDates = [t], e.latestSelectedDateObj = t;
420
516
  }
421
- t !== void 0 && t.type !== "blur" && yt(t);
422
- const n = e._input.value;
423
- _(), $(), e._input.value !== n && e._debouncedChange();
517
+ n !== void 0 && n.type !== "blur" && xn(n);
518
+ var o = e._input.value;
519
+ I(), R(), e._input.value !== o && e._debouncedChange();
424
520
  }
425
- function L(t, n) {
426
- return t % 12 + 12 * O(n === e.l10n.amPM[1]);
521
+ function W(n, t) {
522
+ return n % 12 + 12 * Y(t === e.l10n.amPM[1]);
427
523
  }
428
- function A(t) {
429
- switch (t % 24) {
524
+ function y(n) {
525
+ switch (n % 24) {
430
526
  case 0:
431
527
  case 12:
432
528
  return 12;
433
529
  default:
434
- return t % 12;
530
+ return n % 12;
435
531
  }
436
532
  }
437
- function _() {
438
- if (e.hourElement === void 0 || e.minuteElement === void 0)
439
- return;
440
- let t = (parseInt(e.hourElement.value.slice(-2), 10) || 0) % 24, n = (parseInt(e.minuteElement.value, 10) || 0) % 60, i = e.secondElement !== void 0 ? (parseInt(e.secondElement.value, 10) || 0) % 60 : 0;
441
- e.amPM !== void 0 && (t = L(t, e.amPM.textContent));
442
- const r = e.config.minTime !== void 0 || e.config.minDate && e.minDateHasTime && e.latestSelectedDateObj && I(e.latestSelectedDateObj, e.config.minDate, !0) === 0;
443
- if (e.config.maxTime !== void 0 || e.config.maxDate && e.maxDateHasTime && e.latestSelectedDateObj && I(e.latestSelectedDateObj, e.config.maxDate, !0) === 0) {
444
- const s = e.config.maxTime !== void 0 ? e.config.maxTime : e.config.maxDate;
445
- t = Math.min(t, s.getHours()), t === s.getHours() && (n = Math.min(n, s.getMinutes())), n === s.getMinutes() && (i = Math.min(i, s.getSeconds()));
446
- }
447
- if (r) {
448
- const s = e.config.minTime !== void 0 ? e.config.minTime : e.config.minDate;
449
- t = Math.max(t, s.getHours()), t === s.getHours() && n < s.getMinutes() && (n = s.getMinutes()), n === s.getMinutes() && (i = Math.max(i, s.getSeconds()));
533
+ function I() {
534
+ if (!(e.hourElement === void 0 || e.minuteElement === void 0)) {
535
+ 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;
536
+ e.amPM !== void 0 && (n = W(n, e.amPM.textContent));
537
+ var o = e.config.minTime !== void 0 || e.config.minDate && e.minDateHasTime && e.latestSelectedDateObj && P(e.latestSelectedDateObj, e.config.minDate, !0) === 0, l = e.config.maxTime !== void 0 || e.config.maxDate && e.maxDateHasTime && e.latestSelectedDateObj && P(e.latestSelectedDateObj, e.config.maxDate, !0) === 0;
538
+ if (e.config.maxTime !== void 0 && e.config.minTime !== void 0 && e.config.minTime > e.config.maxTime) {
539
+ var u = Ie(e.config.minTime.getHours(), e.config.minTime.getMinutes(), e.config.minTime.getSeconds()), p = Ie(e.config.maxTime.getHours(), e.config.maxTime.getMinutes(), e.config.maxTime.getSeconds()), s = Ie(n, t, i);
540
+ if (s > p && s < u) {
541
+ var h = Vn(u);
542
+ n = h[0], t = h[1], i = h[2];
543
+ }
544
+ } else {
545
+ if (l) {
546
+ var f = e.config.maxTime !== void 0 ? e.config.maxTime : e.config.maxDate;
547
+ n = Math.min(n, f.getHours()), n === f.getHours() && (t = Math.min(t, f.getMinutes())), t === f.getMinutes() && (i = Math.min(i, f.getSeconds()));
548
+ }
549
+ if (o) {
550
+ var m = e.config.minTime !== void 0 ? e.config.minTime : e.config.minDate;
551
+ n = Math.max(n, m.getHours()), n === m.getHours() && t < m.getMinutes() && (t = m.getMinutes()), t === m.getMinutes() && (i = Math.max(i, m.getSeconds()));
552
+ }
553
+ }
554
+ O(n, t, i);
450
555
  }
451
- R(t, n, i);
452
556
  }
453
- function Y(t) {
454
- const n = t || e.latestSelectedDateObj;
455
- n && R(n.getHours(), n.getMinutes(), n.getSeconds());
557
+ function A(n) {
558
+ var t = n || e.latestSelectedDateObj;
559
+ t && t instanceof Date && O(t.getHours(), t.getMinutes(), t.getSeconds());
456
560
  }
457
- function R(t, n, i) {
458
- e.latestSelectedDateObj !== void 0 && e.latestSelectedDateObj.setHours(t % 24, n, i || 0, 0), !(!e.hourElement || !e.minuteElement || e.isMobile) && (e.hourElement.value = T(e.config.time_24hr ? t : (12 + t) % 12 + 12 * O(t % 12 === 0)), e.minuteElement.value = T(n), e.amPM !== void 0 && (e.amPM.textContent = e.l10n.amPM[O(t >= 12)]), e.secondElement !== void 0 && (e.secondElement.value = T(i)));
561
+ function O(n, t, i) {
562
+ e.latestSelectedDateObj !== void 0 && e.latestSelectedDateObj.setHours(n % 24, t, i || 0, 0), !(!e.hourElement || !e.minuteElement || e.isMobile) && (e.hourElement.value = S(e.config.time_24hr ? n : (12 + n) % 12 + 12 * Y(n % 12 === 0)), e.minuteElement.value = S(t), e.amPM !== void 0 && (e.amPM.textContent = e.l10n.amPM[Y(n >= 12)]), e.secondElement !== void 0 && (e.secondElement.value = S(i)));
459
563
  }
460
- function F(t) {
461
- const n = k(t), i = parseInt(n.value) + (t.delta || 0);
462
- (i / 1e3 > 1 || t.key === "Enter" && !/[^\d]/.test(i.toString())) && ae(i);
564
+ function H(n) {
565
+ var t = N(n), i = parseInt(t.value) + (n.delta || 0);
566
+ (i / 1e3 > 1 || n.key === "Enter" && !/[^\d]/.test(i.toString())) && le(i);
463
567
  }
464
- function p(t, n, i, r) {
465
- if (n instanceof Array)
466
- return n.forEach((l) => p(t, l, i, r));
568
+ function v(n, t, i, o) {
467
569
  if (t instanceof Array)
468
- return t.forEach((l) => p(l, n, i, r));
469
- t.addEventListener(n, i, r), e._handlers.push({
470
- remove: () => t.removeEventListener(n, i)
570
+ return t.forEach(function(l) {
571
+ return v(n, l, i, o);
572
+ });
573
+ if (n instanceof Array)
574
+ return n.forEach(function(l) {
575
+ return v(l, t, i, o);
576
+ });
577
+ n.addEventListener(t, i, o), e._handlers.push({
578
+ remove: function() {
579
+ return n.removeEventListener(t, i, o);
580
+ }
471
581
  });
472
582
  }
473
583
  function j() {
474
- w("onChange");
584
+ C("onChange");
475
585
  }
476
- function H() {
477
- if (e.config.wrap && ["open", "close", "toggle", "clear"].forEach((n) => {
478
- Array.prototype.forEach.call(e.element.querySelectorAll(`[data-${n}]`), (i) => p(i, "click", e[n]));
586
+ function V() {
587
+ if (e.config.wrap && ["open", "close", "toggle", "clear"].forEach(function(i) {
588
+ Array.prototype.forEach.call(e.element.querySelectorAll("[data-" + i + "]"), function(o) {
589
+ return v(o, "click", e[i]);
590
+ });
479
591
  }), e.isMobile) {
480
- Dt();
592
+ wn();
481
593
  return;
482
594
  }
483
- const t = ze(lt, 50);
484
- if (e._debouncedChange = ze(j, Lt), e.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent) && p(e.daysContainer, "mouseover", (n) => {
485
- e.config.mode === "range" && be(k(n));
486
- }), p(window.document.body, "keydown", st), !e.config.inline && !e.config.static && p(window, "resize", t), window.ontouchstart !== void 0 ? p(window.document, "touchstart", De) : p(window.document, "mousedown", De), p(window.document, "focus", De, { capture: !0 }), e.config.clickOpens === !0 && (p(e._input, "focus", e.open), p(e._input, "click", e.open)), e.daysContainer !== void 0 && (p(e.monthNav, "click", wt), p(e.monthNav, ["keyup", "increment"], F), p(e.daysContainer, "click", Le)), e.timeContainer !== void 0 && e.minuteElement !== void 0 && e.hourElement !== void 0) {
487
- const n = (i) => k(i).select();
488
- p(e.timeContainer, ["increment"], D), p(e.timeContainer, "blur", D, { capture: !0 }), p(e.timeContainer, "click", v), p([e.hourElement, e.minuteElement], ["focus", "click"], n), e.secondElement !== void 0 && p(e.secondElement, "focus", () => e.secondElement && e.secondElement.select()), e.amPM !== void 0 && p(e.amPM, "click", (i) => {
489
- D(i), j();
595
+ var n = $e(dn, 50);
596
+ if (e._debouncedChange = $e(j, qn), e.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent) && v(e.daysContainer, "mouseover", function(i) {
597
+ e.config.mode === "range" && fe(N(i));
598
+ }), v(e._input, "keydown", Le), e.calendarContainer !== void 0 && v(e.calendarContainer, "keydown", Le), !e.config.inline && !e.config.static && v(window, "resize", n), window.ontouchstart !== void 0 ? v(window.document, "touchstart", be) : v(window.document, "mousedown", be), v(window.document, "focus", be, { capture: !0 }), e.config.clickOpens === !0 && (v(e._input, "focus", e.open), v(e._input, "click", e.open)), e.daysContainer !== void 0 && (v(e.monthNav, "click", En), v(e.monthNav, ["keyup", "increment"], H), v(e.daysContainer, "click", Je)), e.timeContainer !== void 0 && e.minuteElement !== void 0 && e.hourElement !== void 0) {
599
+ var t = function(i) {
600
+ return N(i).select();
601
+ };
602
+ v(e.timeContainer, ["increment"], x), v(e.timeContainer, "blur", x, { capture: !0 }), v(e.timeContainer, "click", K), v([e.hourElement, e.minuteElement], ["focus", "click"], t), e.secondElement !== void 0 && v(e.secondElement, "focus", function() {
603
+ return e.secondElement && e.secondElement.select();
604
+ }), e.amPM !== void 0 && v(e.amPM, "click", function(i) {
605
+ x(i);
490
606
  });
491
607
  }
492
- e.config.allowInput && p(e._input, "blur", rt);
608
+ e.config.allowInput && v(e._input, "blur", cn);
493
609
  }
494
- function N(t, n) {
495
- const i = t !== void 0 ? e.parseDate(t) : 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), r = e.currentYear, l = e.currentMonth;
610
+ function E(n, t) {
611
+ 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;
496
612
  try {
497
613
  i !== void 0 && (e.currentYear = i.getFullYear(), e.currentMonth = i.getMonth());
498
- } catch (s) {
499
- s.message = "Invalid date supplied: " + i, e.config.errorHandler(s);
614
+ } catch (u) {
615
+ u.message = "Invalid date supplied: " + i, e.config.errorHandler(u);
500
616
  }
501
- n && e.currentYear !== r && (w("onYearChange"), K()), n && (e.currentYear !== r || e.currentMonth !== l) && w("onMonthChange"), e.redraw();
502
- }
503
- function v(t) {
504
- const n = k(t);
505
- ~n.className.indexOf("arrow") && W(t, n.classList.contains("arrowUp") ? 1 : -1);
506
- }
507
- function W(t, n, i) {
508
- const r = t && k(t), l = i || r && r.parentNode && r.parentNode.firstChild, s = we("increment");
509
- s.delta = n, l && l.dispatchEvent(s);
510
- }
511
- function me() {
512
- const t = window.document.createDocumentFragment();
513
- if (e.calendarContainer = b("div", "flatpickr-calendar"), e.calendarContainer.tabIndex = -1, !e.config.noCalendar) {
514
- if (t.appendChild(et()), e.innerContainer = b("div", "flatpickr-innerContainer"), e.config.weekNumbers) {
515
- const { weekWrapper: i, weekNumbers: r } = nt();
516
- e.innerContainer.appendChild(i), e.weekNumbers = r, e.weekWrapper = i;
617
+ t && e.currentYear !== o && (C("onYearChange"), $()), t && (e.currentYear !== o || e.currentMonth !== l) && C("onMonthChange"), e.redraw();
618
+ }
619
+ function K(n) {
620
+ var t = N(n);
621
+ ~t.className.indexOf("arrow") && U(n, t.classList.contains("arrowUp") ? 1 : -1);
622
+ }
623
+ function U(n, t, i) {
624
+ var o = n && N(n), l = i || o && o.parentNode && o.parentNode.firstChild, u = ye("increment");
625
+ u.delta = t, l && l.dispatchEvent(u);
626
+ }
627
+ function ve() {
628
+ var n = window.document.createDocumentFragment();
629
+ if (e.calendarContainer = D("div", "flatpickr-calendar"), e.calendarContainer.tabIndex = -1, !e.config.noCalendar) {
630
+ if (n.appendChild(rn()), e.innerContainer = D("div", "flatpickr-innerContainer"), e.config.weekNumbers) {
631
+ var t = ln(), i = t.weekWrapper, o = t.weekNumbers;
632
+ e.innerContainer.appendChild(i), e.weekNumbers = o, e.weekWrapper = i;
517
633
  }
518
- e.rContainer = b("div", "flatpickr-rContainer"), e.rContainer.appendChild(Fe()), e.daysContainer || (e.daysContainer = b("div", "flatpickr-days"), e.daysContainer.tabIndex = -1), ne(), e.rContainer.appendChild(e.daysContainer), e.innerContainer.appendChild(e.rContainer), t.appendChild(e.innerContainer);
634
+ e.rContainer = D("div", "flatpickr-rContainer"), e.rContainer.appendChild(Ye()), e.daysContainer || (e.daysContainer = D("div", "flatpickr-days"), e.daysContainer.tabIndex = -1), oe(), e.rContainer.appendChild(e.daysContainer), e.innerContainer.appendChild(e.rContainer), n.appendChild(e.innerContainer);
519
635
  }
520
- e.config.enableTime && t.appendChild(tt()), x(e.calendarContainer, "rangeMode", e.config.mode === "range"), x(e.calendarContainer, "animate", e.config.animate === !0), x(e.calendarContainer, "multiMonth", e.config.showMonths > 1), e.calendarContainer.appendChild(t);
521
- const n = e.config.appendTo !== void 0 && e.config.appendTo.nodeType !== void 0;
522
- if ((e.config.inline || e.config.static) && (e.calendarContainer.classList.add(e.config.inline ? "inline" : "static"), e.config.inline && (!n && 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)) {
523
- const i = b("div", "flatpickr-wrapper");
524
- e.element.parentNode && e.element.parentNode.insertBefore(i, e.element), i.appendChild(e.element), e.altInput && i.appendChild(e.altInput), i.appendChild(e.calendarContainer);
636
+ e.config.enableTime && n.appendChild(on()), _(e.calendarContainer, "rangeMode", e.config.mode === "range"), _(e.calendarContainer, "animate", e.config.animate === !0), _(e.calendarContainer, "multiMonth", e.config.showMonths > 1), e.calendarContainer.appendChild(n);
637
+ var l = e.config.appendTo !== void 0 && e.config.appendTo.nodeType !== void 0;
638
+ 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)) {
639
+ var u = D("div", "flatpickr-wrapper");
640
+ e.element.parentNode && e.element.parentNode.insertBefore(u, e.element), u.appendChild(e.element), e.altInput && u.appendChild(e.altInput), u.appendChild(e.calendarContainer);
525
641
  }
526
642
  !e.config.static && !e.config.inline && (e.config.appendTo !== void 0 ? e.config.appendTo : window.document.body).appendChild(e.calendarContainer);
527
643
  }
528
- function ge(t, n, i, r) {
529
- const l = B(n, !0), s = b("span", "flatpickr-day " + t, n.getDate().toString());
530
- return s.dateObj = n, s.$i = r, s.setAttribute("aria-label", e.formatDate(n, e.config.ariaDateFormat)), t.indexOf("hidden") === -1 && I(n, e.now) === 0 && (e.todayDateElem = s, s.classList.add("today"), s.setAttribute("aria-current", "date")), l ? (s.tabIndex = -1, ye(n) && (s.classList.add("selected"), e.selectedDateElem = s, e.config.mode === "range" && (x(s, "startRange", e.selectedDates[0] && I(n, e.selectedDates[0], !0) === 0), x(s, "endRange", e.selectedDates[1] && I(n, e.selectedDates[1], !0) === 0), t === "nextMonthDay" && s.classList.add("inRange")))) : s.classList.add("flatpickr-disabled"), e.config.mode === "range" && Mt(n) && !ye(n) && s.classList.add("inRange"), e.weekNumbers && e.config.showMonths === 1 && t !== "prevMonthDay" && i % 7 === 1 && e.weekNumbers.insertAdjacentHTML("beforeend", "<span class='flatpickr-day'>" + e.config.getWeek(n) + "</span>"), w("onDayCreate", s), s;
531
- }
532
- function pe(t) {
533
- t.focus(), e.config.mode === "range" && be(t);
534
- }
535
- function te(t) {
536
- const n = t > 0 ? 0 : e.config.showMonths - 1, i = t > 0 ? e.config.showMonths : -1;
537
- for (let r = n; r != i; r += t) {
538
- const l = e.daysContainer.children[r], s = t > 0 ? 0 : l.children.length - 1, d = t > 0 ? l.children.length : -1;
539
- for (let c = s; c != d; c += t) {
540
- const u = l.children[c];
541
- if (u.className.indexOf("hidden") === -1 && B(u.dateObj))
542
- return u;
644
+ function J(n, t, i, o) {
645
+ var l = B(t, !0), u = D("span", n, t.getDate().toString());
646
+ return u.dateObj = t, u.$i = o, u.setAttribute("aria-label", e.formatDate(t, e.config.ariaDateFormat)), n.indexOf("hidden") === -1 && P(t, e.now) === 0 && (e.todayDateElem = u, u.classList.add("today"), u.setAttribute("aria-current", "date")), l ? (u.tabIndex = -1, Ce(t) && (u.classList.add("selected"), e.selectedDateElem = u, e.config.mode === "range" && (_(u, "startRange", e.selectedDates[0] && P(t, e.selectedDates[0], !0) === 0), _(u, "endRange", e.selectedDates[1] && P(t, e.selectedDates[1], !0) === 0), n === "nextMonthDay" && u.classList.add("inRange")))) : u.classList.add("flatpickr-disabled"), e.config.mode === "range" && Cn(t) && !Ce(t) && u.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>"), C("onDayCreate", u), u;
647
+ }
648
+ function q(n) {
649
+ n.focus(), e.config.mode === "range" && fe(n);
650
+ }
651
+ function G(n) {
652
+ for (var t = n > 0 ? 0 : e.config.showMonths - 1, i = n > 0 ? e.config.showMonths : -1, o = t; o != i; o += n)
653
+ for (var l = e.daysContainer.children[o], u = n > 0 ? 0 : l.children.length - 1, p = n > 0 ? l.children.length : -1, s = u; s != p; s += n) {
654
+ var h = l.children[s];
655
+ if (h.className.indexOf("hidden") === -1 && B(h.dateObj))
656
+ return h;
543
657
  }
544
- }
545
658
  }
546
- function Ze(t, n) {
547
- const i = t.className.indexOf("Month") === -1 ? t.dateObj.getMonth() : e.currentMonth, r = n > 0 ? e.config.showMonths : -1, l = n > 0 ? 1 : -1;
548
- for (let s = i - e.currentMonth; s != r; s += l) {
549
- const d = e.daysContainer.children[s], c = i - e.currentMonth === s ? t.$i + n : n < 0 ? d.children.length - 1 : 0, u = d.children.length;
550
- for (let g = c; g >= 0 && g < u && g != (n > 0 ? u : -1); g += l) {
551
- const M = d.children[g];
552
- if (M.className.indexOf("hidden") === -1 && B(M.dateObj) && Math.abs(t.$i - g) >= Math.abs(n))
553
- return pe(M);
659
+ function De(n, t) {
660
+ 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, u = i - e.currentMonth; u != o; u += l)
661
+ for (var p = e.daysContainer.children[u], s = i - e.currentMonth === u ? n.$i + t : t < 0 ? p.children.length - 1 : 0, h = p.children.length, f = s; f >= 0 && f < h && f != (t > 0 ? h : -1); f += l) {
662
+ var m = p.children[f];
663
+ if (m.className.indexOf("hidden") === -1 && B(m.dateObj) && Math.abs(n.$i - f) >= Math.abs(t))
664
+ return q(m);
554
665
  }
666
+ e.changeMonth(l), ne(G(l), 0);
667
+ }
668
+ function ne(n, t) {
669
+ var i = d(), o = ue(i || document.body), l = n !== void 0 ? n : o ? i : e.selectedDateElem !== void 0 && ue(e.selectedDateElem) ? e.selectedDateElem : e.todayDateElem !== void 0 && ue(e.todayDateElem) ? e.todayDateElem : G(t > 0 ? 1 : -1);
670
+ l === void 0 ? e._input.focus() : o ? De(l, t) : q(l);
671
+ }
672
+ function tn(n, t) {
673
+ 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), u = window.document.createDocumentFragment(), p = e.config.showMonths > 1, s = p ? "prevMonthDay hidden" : "prevMonthDay", h = p ? "nextMonthDay hidden" : "nextMonthDay", f = o + 1 - i, m = 0; f <= o; f++, m++)
674
+ u.appendChild(J("flatpickr-day " + s, new Date(n, t - 1, f), f, m));
675
+ for (f = 1; f <= l; f++, m++)
676
+ u.appendChild(J("flatpickr-day", new Date(n, t, f), f, m));
677
+ for (var M = l + 1; M <= 42 - i && (e.config.showMonths === 1 || m % 7 !== 0); M++, m++)
678
+ u.appendChild(J("flatpickr-day " + h, new Date(n, t + 1, M % l), M, m));
679
+ var L = D("div", "dayContainer");
680
+ return L.appendChild(u), L;
681
+ }
682
+ function oe() {
683
+ if (e.daysContainer !== void 0) {
684
+ ge(e.daysContainer), e.weekNumbers && ge(e.weekNumbers);
685
+ for (var n = document.createDocumentFragment(), t = 0; t < e.config.showMonths; t++) {
686
+ var i = new Date(e.currentYear, e.currentMonth, 1);
687
+ i.setMonth(e.currentMonth + t), n.appendChild(tn(i.getFullYear(), i.getMonth()));
688
+ }
689
+ e.daysContainer.appendChild(n), e.days = e.daysContainer.firstChild, e.config.mode === "range" && e.selectedDates.length === 1 && fe();
555
690
  }
556
- e.changeMonth(l), q(te(l), 0);
557
- }
558
- function q(t, n) {
559
- const i = ie(document.activeElement || document.body), r = t !== void 0 ? t : i ? document.activeElement : e.selectedDateElem !== void 0 && ie(e.selectedDateElem) ? e.selectedDateElem : e.todayDateElem !== void 0 && ie(e.todayDateElem) ? e.todayDateElem : te(n > 0 ? 1 : -1);
560
- r === void 0 ? e._input.focus() : i ? Ze(r, n) : pe(r);
561
- }
562
- function Qe(t, n) {
563
- const i = (new Date(t, n, 1).getDay() - e.l10n.firstDayOfWeek + 7) % 7, r = e.utils.getDaysInMonth((n - 1 + 12) % 12, t), l = e.utils.getDaysInMonth(n, t), s = window.document.createDocumentFragment(), d = e.config.showMonths > 1, c = d ? "prevMonthDay hidden" : "prevMonthDay", u = d ? "nextMonthDay hidden" : "nextMonthDay";
564
- let g = r + 1 - i, M = 0;
565
- for (; g <= r; g++, M++)
566
- s.appendChild(ge(c, new Date(t, n - 1, g), g, M));
567
- for (g = 1; g <= l; g++, M++)
568
- s.appendChild(ge("", new Date(t, n, g), g, M));
569
- for (let E = l + 1; E <= 42 - i && (e.config.showMonths === 1 || M % 7 !== 0); E++, M++)
570
- s.appendChild(ge(u, new Date(t, n + 1, E % l), E, M));
571
- const S = b("div", "dayContainer");
572
- return S.appendChild(s), S;
573
- }
574
- function ne() {
575
- if (e.daysContainer === void 0)
576
- return;
577
- de(e.daysContainer), e.weekNumbers && de(e.weekNumbers);
578
- const t = document.createDocumentFragment();
579
- for (let n = 0; n < e.config.showMonths; n++) {
580
- const i = new Date(e.currentYear, e.currentMonth, 1);
581
- i.setMonth(e.currentMonth + n), t.appendChild(Qe(i.getFullYear(), i.getMonth()));
582
- }
583
- e.daysContainer.appendChild(t), e.days = e.daysContainer.firstChild, e.config.mode === "range" && e.selectedDates.length === 1 && be();
584
691
  }
585
- function K() {
586
- if (e.config.showMonths > 1 || e.config.monthSelectorType !== "dropdown")
587
- return;
588
- const t = function(n) {
589
- return e.config.minDate !== void 0 && e.currentYear === e.config.minDate.getFullYear() && n < e.config.minDate.getMonth() ? !1 : !(e.config.maxDate !== void 0 && e.currentYear === e.config.maxDate.getFullYear() && n > e.config.maxDate.getMonth());
590
- };
591
- e.monthsDropdownContainer.tabIndex = -1, e.monthsDropdownContainer.innerHTML = "";
592
- for (let n = 0; n < 12; n++) {
593
- if (!t(n))
594
- continue;
595
- const i = b("option", "flatpickr-monthDropdown-month");
596
- i.value = new Date(e.currentYear, n).getMonth().toString(), i.textContent = ue(n, e.config.shorthandCurrentMonth, e.l10n), i.tabIndex = -1, e.currentMonth === n && (i.selected = !0), e.monthsDropdownContainer.appendChild(i);
692
+ function $() {
693
+ if (!(e.config.showMonths > 1 || e.config.monthSelectorType !== "dropdown")) {
694
+ var n = function(o) {
695
+ 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());
696
+ };
697
+ e.monthsDropdownContainer.tabIndex = -1, e.monthsDropdownContainer.innerHTML = "";
698
+ for (var t = 0; t < 12; t++)
699
+ if (n(t)) {
700
+ var i = D("option", "flatpickr-monthDropdown-month");
701
+ i.value = new Date(e.currentYear, t).getMonth().toString(), i.textContent = he(t, e.config.shorthandCurrentMonth, e.l10n), i.tabIndex = -1, e.currentMonth === t && (i.selected = !0), e.monthsDropdownContainer.appendChild(i);
702
+ }
597
703
  }
598
704
  }
599
- function Xe() {
600
- const t = b("div", "flatpickr-month"), n = window.document.createDocumentFragment();
601
- let i;
602
- e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? i = b("span", "cur-month") : (e.monthsDropdownContainer = b("select", "flatpickr-monthDropdown-months"), e.monthsDropdownContainer.setAttribute("aria-label", e.l10n.monthAriaLabel), p(e.monthsDropdownContainer, "change", (d) => {
603
- const c = k(d), u = parseInt(c.value, 10);
604
- e.changeMonth(u - e.currentMonth), w("onMonthChange");
605
- }), K(), i = e.monthsDropdownContainer);
606
- const r = fe("cur-year", { tabindex: "-1" }), l = r.getElementsByTagName("input")[0];
705
+ function an() {
706
+ var n = D("div", "flatpickr-month"), t = window.document.createDocumentFragment(), i;
707
+ e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? i = D("span", "cur-month") : (e.monthsDropdownContainer = D("select", "flatpickr-monthDropdown-months"), e.monthsDropdownContainer.setAttribute("aria-label", e.l10n.monthAriaLabel), v(e.monthsDropdownContainer, "change", function(p) {
708
+ var s = N(p), h = parseInt(s.value, 10);
709
+ e.changeMonth(h - e.currentMonth), C("onMonthChange");
710
+ }), $(), i = e.monthsDropdownContainer);
711
+ var o = pe("cur-year", { tabindex: "-1" }), l = o.getElementsByTagName("input")[0];
607
712
  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());
608
- const s = b("div", "flatpickr-current-month");
609
- return s.appendChild(i), s.appendChild(r), n.appendChild(s), t.appendChild(n), {
610
- container: t,
713
+ var u = D("div", "flatpickr-current-month");
714
+ return u.appendChild(i), u.appendChild(o), t.appendChild(u), n.appendChild(t), {
715
+ container: n,
611
716
  yearElement: l,
612
717
  monthElement: i
613
718
  };
614
719
  }
615
- function Ae() {
616
- de(e.monthNav), e.monthNav.appendChild(e.prevMonthNav), e.config.showMonths && (e.yearElements = [], e.monthElements = []);
617
- for (let t = e.config.showMonths; t--; ) {
618
- const n = Xe();
619
- e.yearElements.push(n.yearElement), e.monthElements.push(n.monthElement), e.monthNav.appendChild(n.container);
720
+ function Pe() {
721
+ ge(e.monthNav), e.monthNav.appendChild(e.prevMonthNav), e.config.showMonths && (e.yearElements = [], e.monthElements = []);
722
+ for (var n = e.config.showMonths; n--; ) {
723
+ var t = an();
724
+ e.yearElements.push(t.yearElement), e.monthElements.push(t.monthElement), e.monthNav.appendChild(t.container);
620
725
  }
621
726
  e.monthNav.appendChild(e.nextMonthNav);
622
727
  }
623
- function et() {
624
- return e.monthNav = b("div", "flatpickr-months"), e.yearElements = [], e.monthElements = [], e.prevMonthNav = b("span", "flatpickr-prev-month"), e.prevMonthNav.innerHTML = e.config.prevArrow, e.nextMonthNav = b("span", "flatpickr-next-month"), e.nextMonthNav.innerHTML = e.config.nextArrow, Ae(), Object.defineProperty(e, "_hidePrevMonthArrow", {
625
- get: () => e.__hidePrevMonthArrow,
626
- set(t) {
627
- e.__hidePrevMonthArrow !== t && (x(e.prevMonthNav, "flatpickr-disabled", t), e.__hidePrevMonthArrow = t);
728
+ function rn() {
729
+ return e.monthNav = D("div", "flatpickr-months"), e.yearElements = [], e.monthElements = [], e.prevMonthNav = D("span", "flatpickr-prev-month"), e.prevMonthNav.innerHTML = e.config.prevArrow, e.nextMonthNav = D("span", "flatpickr-next-month"), e.nextMonthNav.innerHTML = e.config.nextArrow, Pe(), Object.defineProperty(e, "_hidePrevMonthArrow", {
730
+ get: function() {
731
+ return e.__hidePrevMonthArrow;
732
+ },
733
+ set: function(n) {
734
+ e.__hidePrevMonthArrow !== n && (_(e.prevMonthNav, "flatpickr-disabled", n), e.__hidePrevMonthArrow = n);
628
735
  }
629
736
  }), Object.defineProperty(e, "_hideNextMonthArrow", {
630
- get: () => e.__hideNextMonthArrow,
631
- set(t) {
632
- e.__hideNextMonthArrow !== t && (x(e.nextMonthNav, "flatpickr-disabled", t), e.__hideNextMonthArrow = t);
737
+ get: function() {
738
+ return e.__hideNextMonthArrow;
739
+ },
740
+ set: function(n) {
741
+ e.__hideNextMonthArrow !== n && (_(e.nextMonthNav, "flatpickr-disabled", n), e.__hideNextMonthArrow = n);
633
742
  }
634
- }), e.currentYearElement = e.yearElements[0], se(), e.monthNav;
743
+ }), e.currentYearElement = e.yearElements[0], de(), e.monthNav;
635
744
  }
636
- function tt() {
745
+ function on() {
637
746
  e.calendarContainer.classList.add("hasTime"), e.config.noCalendar && e.calendarContainer.classList.add("noCalendar");
638
- const t = ke(e.config);
639
- e.timeContainer = b("div", "flatpickr-time"), e.timeContainer.tabIndex = -1;
640
- const n = b("span", "flatpickr-time-separator", ":"), i = fe("flatpickr-hour", {
747
+ var n = Ae(e.config);
748
+ e.timeContainer = D("div", "flatpickr-time"), e.timeContainer.tabIndex = -1;
749
+ var t = D("span", "flatpickr-time-separator", ":"), i = pe("flatpickr-hour", {
641
750
  "aria-label": e.l10n.hourAriaLabel
642
751
  });
643
752
  e.hourElement = i.getElementsByTagName("input")[0];
644
- const r = fe("flatpickr-minute", {
753
+ var o = pe("flatpickr-minute", {
645
754
  "aria-label": e.l10n.minuteAriaLabel
646
755
  });
647
- if (e.minuteElement = r.getElementsByTagName("input")[0], e.hourElement.tabIndex = e.minuteElement.tabIndex = -1, e.hourElement.value = T(e.latestSelectedDateObj ? e.latestSelectedDateObj.getHours() : e.config.time_24hr ? t.hours : A(t.hours)), e.minuteElement.value = T(e.latestSelectedDateObj ? e.latestSelectedDateObj.getMinutes() : t.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(n), e.timeContainer.appendChild(r), e.config.time_24hr && e.timeContainer.classList.add("time24hr"), e.config.enableSeconds) {
756
+ if (e.minuteElement = o.getElementsByTagName("input")[0], e.hourElement.tabIndex = e.minuteElement.tabIndex = -1, e.hourElement.value = S(e.latestSelectedDateObj ? e.latestSelectedDateObj.getHours() : e.config.time_24hr ? n.hours : y(n.hours)), e.minuteElement.value = S(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) {
648
757
  e.timeContainer.classList.add("hasSeconds");
649
- const l = fe("flatpickr-second");
650
- e.secondElement = l.getElementsByTagName("input")[0], e.secondElement.value = T(e.latestSelectedDateObj ? e.latestSelectedDateObj.getSeconds() : t.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(b("span", "flatpickr-time-separator", ":")), e.timeContainer.appendChild(l);
758
+ var l = pe("flatpickr-second");
759
+ e.secondElement = l.getElementsByTagName("input")[0], e.secondElement.value = S(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(D("span", "flatpickr-time-separator", ":")), e.timeContainer.appendChild(l);
651
760
  }
652
- return e.config.time_24hr || (e.amPM = b("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;
761
+ return e.config.time_24hr || (e.amPM = D("span", "flatpickr-am-pm", e.l10n.amPM[Y((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;
653
762
  }
654
- function Fe() {
655
- e.weekdayContainer ? de(e.weekdayContainer) : e.weekdayContainer = b("div", "flatpickr-weekdays");
656
- for (let t = e.config.showMonths; t--; ) {
657
- const n = b("div", "flatpickr-weekdaycontainer");
658
- e.weekdayContainer.appendChild(n);
763
+ function Ye() {
764
+ e.weekdayContainer ? ge(e.weekdayContainer) : e.weekdayContainer = D("div", "flatpickr-weekdays");
765
+ for (var n = e.config.showMonths; n--; ) {
766
+ var t = D("div", "flatpickr-weekdaycontainer");
767
+ e.weekdayContainer.appendChild(t);
659
768
  }
660
- return Ne(), e.weekdayContainer;
769
+ return He(), e.weekdayContainer;
661
770
  }
662
- function Ne() {
663
- if (!e.weekdayContainer)
664
- return;
665
- const t = e.l10n.firstDayOfWeek;
666
- let n = [...e.l10n.weekdays.shorthand];
667
- t > 0 && t < n.length && (n = [
668
- ...n.splice(t, n.length),
669
- ...n.splice(0, t)
670
- ]);
671
- for (let i = e.config.showMonths; i--; )
672
- e.weekdayContainer.children[i].innerHTML = `
771
+ function He() {
772
+ if (e.weekdayContainer) {
773
+ var n = e.l10n.firstDayOfWeek, t = Ze(e.l10n.weekdays.shorthand);
774
+ n > 0 && n < t.length && (t = Ze(t.splice(n, t.length), t.splice(0, n)));
775
+ for (var i = e.config.showMonths; i--; )
776
+ e.weekdayContainer.children[i].innerHTML = `
673
777
  <span class='flatpickr-weekday'>
674
- ${n.join("</span><span class='flatpickr-weekday'>")}
778
+ ` + t.join("</span><span class='flatpickr-weekday'>") + `
675
779
  </span>
676
780
  `;
781
+ }
677
782
  }
678
- function nt() {
783
+ function ln() {
679
784
  e.calendarContainer.classList.add("hasWeeks");
680
- const t = b("div", "flatpickr-weekwrapper");
681
- t.appendChild(b("span", "flatpickr-weekday", e.l10n.weekAbbreviation));
682
- const n = b("div", "flatpickr-weeks");
683
- return t.appendChild(n), {
684
- weekWrapper: t,
685
- weekNumbers: n
785
+ var n = D("div", "flatpickr-weekwrapper");
786
+ n.appendChild(D("span", "flatpickr-weekday", e.l10n.weekAbbreviation));
787
+ var t = D("div", "flatpickr-weeks");
788
+ return n.appendChild(t), {
789
+ weekWrapper: n,
790
+ weekNumbers: t
686
791
  };
687
792
  }
688
- function he(t, n = !0) {
689
- const i = n ? t : t - e.currentMonth;
690
- 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, w("onYearChange"), K()), ne(), w("onMonthChange"), se());
793
+ function Me(n, t) {
794
+ t === void 0 && (t = !0);
795
+ var i = t ? n : n - e.currentMonth;
796
+ 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, C("onYearChange"), $()), oe(), C("onMonthChange"), de());
691
797
  }
692
- function at(t = !0, n = !0) {
693
- if (e.input.value = "", e.altInput !== void 0 && (e.altInput.value = ""), e.mobileInput !== void 0 && (e.mobileInput.value = ""), e.selectedDates = [], e.latestSelectedDateObj = void 0, n === !0 && (e.currentYear = e._initialDate.getFullYear(), e.currentMonth = e._initialDate.getMonth()), e.config.enableTime === !0) {
694
- const { hours: i, minutes: r, seconds: l } = ke(e.config);
695
- R(i, r, l);
798
+ function un(n, t) {
799
+ 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) {
800
+ var i = Ae(e.config), o = i.hours, l = i.minutes, u = i.seconds;
801
+ O(o, l, u);
696
802
  }
697
- e.redraw(), t && w("onChange");
803
+ e.redraw(), n && C("onChange");
698
804
  }
699
- function it() {
700
- e.isOpen = !1, e.isMobile || (e.calendarContainer !== void 0 && e.calendarContainer.classList.remove("open"), e._input !== void 0 && e._input.classList.remove("active")), w("onClose");
805
+ function fn() {
806
+ e.isOpen = !1, e.isMobile || (e.calendarContainer !== void 0 && e.calendarContainer.classList.remove("open"), e._input !== void 0 && e._input.classList.remove("active")), C("onClose");
701
807
  }
702
- function ot() {
703
- e.config !== void 0 && w("onDestroy");
704
- for (let t = e._handlers.length; t--; )
705
- e._handlers[t].remove();
808
+ function sn() {
809
+ e.config !== void 0 && C("onDestroy");
810
+ for (var n = e._handlers.length; n--; )
811
+ e._handlers[n].remove();
706
812
  if (e._handlers = [], e.mobileInput)
707
813
  e.mobileInput.parentNode && e.mobileInput.parentNode.removeChild(e.mobileInput), e.mobileInput = void 0;
708
814
  else if (e.calendarContainer && e.calendarContainer.parentNode)
709
815
  if (e.config.static && e.calendarContainer.parentNode) {
710
- const t = e.calendarContainer.parentNode;
816
+ var t = e.calendarContainer.parentNode;
711
817
  if (t.lastChild && t.removeChild(t.lastChild), t.parentNode) {
712
818
  for (; t.firstChild; )
713
819
  t.parentNode.insertBefore(t.firstChild, t);
@@ -745,171 +851,178 @@ function Rt(a, o) {
745
851
  "navigationCurrentMonth",
746
852
  "selectedDateElem",
747
853
  "config"
748
- ].forEach((t) => {
854
+ ].forEach(function(i) {
749
855
  try {
750
- delete e[t];
856
+ delete e[i];
751
857
  } catch {
752
858
  }
753
859
  });
754
860
  }
755
- function J(t) {
756
- return e.config.appendTo && e.config.appendTo.contains(t) ? !0 : e.calendarContainer.contains(t);
861
+ function te(n) {
862
+ return e.calendarContainer.contains(n);
757
863
  }
758
- function De(t) {
864
+ function be(n) {
759
865
  if (e.isOpen && !e.config.inline) {
760
- const n = k(t), i = J(n), r = n === e.input || n === e.altInput || e.element.contains(n) || t.path && t.path.indexOf && (~t.path.indexOf(e.input) || ~t.path.indexOf(e.altInput)), l = t.type === "blur" ? r && t.relatedTarget && !J(t.relatedTarget) : !r && !i && !J(t.relatedTarget), s = !e.config.ignoredFocusElements.some((d) => d.contains(n));
761
- l && s && (e.timeContainer !== void 0 && e.minuteElement !== void 0 && e.hourElement !== void 0 && e.input.value !== "" && e.input.value !== void 0 && D(), e.close(), e.config && e.config.mode === "range" && e.selectedDates.length === 1 && (e.clear(!1), e.redraw()));
866
+ var t = N(n), i = te(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 && !te(n.relatedTarget), u = !e.config.ignoredFocusElements.some(function(p) {
867
+ return p.contains(t);
868
+ });
869
+ l && u && (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 && x(), e.close(), e.config && e.config.mode === "range" && e.selectedDates.length === 1 && e.clear(!1));
762
870
  }
763
871
  }
764
- function ae(t) {
765
- if (!t || e.config.minDate && t < e.config.minDate.getFullYear() || e.config.maxDate && t > e.config.maxDate.getFullYear())
766
- return;
767
- const n = t, i = e.currentYear !== n;
768
- e.currentYear = n || 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(), w("onYearChange"), K());
872
+ function le(n) {
873
+ if (!(!n || e.config.minDate && n < e.config.minDate.getFullYear() || e.config.maxDate && n > e.config.maxDate.getFullYear())) {
874
+ var t = n, i = e.currentYear !== t;
875
+ 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(), C("onYearChange"), $());
876
+ }
769
877
  }
770
- function B(t, n = !0) {
878
+ function B(n, t) {
771
879
  var i;
772
- const r = e.parseDate(t, void 0, n);
773
- if (e.config.minDate && r && I(r, e.config.minDate, n !== void 0 ? n : !e.minDateHasTime) < 0 || e.config.maxDate && r && I(r, e.config.maxDate, n !== void 0 ? n : !e.maxDateHasTime) > 0)
880
+ t === void 0 && (t = !0);
881
+ var o = e.parseDate(n, void 0, t);
882
+ if (e.config.minDate && o && P(o, e.config.minDate, t !== void 0 ? t : !e.minDateHasTime) < 0 || e.config.maxDate && o && P(o, e.config.maxDate, t !== void 0 ? t : !e.maxDateHasTime) > 0)
774
883
  return !1;
775
884
  if (!e.config.enable && e.config.disable.length === 0)
776
885
  return !0;
777
- if (r === void 0)
886
+ if (o === void 0)
778
887
  return !1;
779
- const l = !!e.config.enable, s = (i = e.config.enable) !== null && i !== void 0 ? i : e.config.disable;
780
- for (let d = 0, c; d < s.length; d++) {
781
- if (c = s[d], typeof c == "function" && c(r))
888
+ for (var l = !!e.config.enable, u = (i = e.config.enable) !== null && i !== void 0 ? i : e.config.disable, p = 0, s = void 0; p < u.length; p++) {
889
+ if (s = u[p], typeof s == "function" && s(o))
782
890
  return l;
783
- if (c instanceof Date && r !== void 0 && c.getTime() === r.getTime())
891
+ if (s instanceof Date && o !== void 0 && s.getTime() === o.getTime())
784
892
  return l;
785
- if (typeof c == "string") {
786
- const u = e.parseDate(c, void 0, !0);
787
- return u && u.getTime() === r.getTime() ? l : !l;
788
- } else if (typeof c == "object" && r !== void 0 && c.from && c.to && r.getTime() >= c.from.getTime() && r.getTime() <= c.to.getTime())
893
+ if (typeof s == "string") {
894
+ var h = e.parseDate(s, void 0, !0);
895
+ return h && h.getTime() === o.getTime() ? l : !l;
896
+ } else if (typeof s == "object" && o !== void 0 && s.from && s.to && o.getTime() >= s.from.getTime() && o.getTime() <= s.to.getTime())
789
897
  return l;
790
898
  }
791
899
  return !l;
792
900
  }
793
- function ie(t) {
794
- return e.daysContainer !== void 0 ? t.className.indexOf("hidden") === -1 && t.className.indexOf("flatpickr-disabled") === -1 && e.daysContainer.contains(t) : !1;
901
+ function ue(n) {
902
+ return e.daysContainer !== void 0 ? n.className.indexOf("hidden") === -1 && n.className.indexOf("flatpickr-disabled") === -1 && e.daysContainer.contains(n) : !1;
795
903
  }
796
- function rt(t) {
797
- t.target === e._input && (e.selectedDates.length > 0 || e._input.value.length > 0) && !(t.relatedTarget && J(t.relatedTarget)) && e.setDate(e._input.value, !0, t.target === e.altInput ? e.config.altFormat : e.config.dateFormat);
904
+ function cn(n) {
905
+ var t = n.target === e._input, i = e._input.value.trimEnd() !== Ee();
906
+ t && i && !(n.relatedTarget && te(n.relatedTarget)) && e.setDate(e._input.value, !0, n.target === e.altInput ? e.config.altFormat : e.config.dateFormat);
798
907
  }
799
- function st(t) {
800
- const n = k(t), i = e.config.wrap ? a.contains(n) : n === e._input, r = e.config.allowInput, l = e.isOpen && (!r || !i), s = e.config.inline && i && !r;
801
- if (t.keyCode === 13 && i) {
802
- if (r)
803
- return e.setDate(e._input.value, !0, n === e.altInput ? e.config.altFormat : e.config.dateFormat), n.blur();
908
+ function Le(n) {
909
+ var t = N(n), i = e.config.wrap ? a.contains(t) : t === e._input, o = e.config.allowInput, l = e.isOpen && (!o || !i), u = e.config.inline && i && !o;
910
+ if (n.keyCode === 13 && i) {
911
+ if (o)
912
+ return e.setDate(e._input.value, !0, t === e.altInput ? e.config.altFormat : e.config.dateFormat), e.close(), t.blur();
804
913
  e.open();
805
- } else if (J(n) || l || s) {
806
- const d = !!e.timeContainer && e.timeContainer.contains(n);
807
- switch (t.keyCode) {
914
+ } else if (te(t) || l || u) {
915
+ var p = !!e.timeContainer && e.timeContainer.contains(t);
916
+ switch (n.keyCode) {
808
917
  case 13:
809
- d ? (t.preventDefault(), D(), Me()) : Le(t);
918
+ p ? (n.preventDefault(), x(), we()) : Je(n);
810
919
  break;
811
920
  case 27:
812
- t.preventDefault(), Me();
921
+ n.preventDefault(), we();
813
922
  break;
814
923
  case 8:
815
924
  case 46:
816
- i && !e.config.allowInput && (t.preventDefault(), e.clear());
925
+ i && !e.config.allowInput && (n.preventDefault(), e.clear());
817
926
  break;
818
927
  case 37:
819
928
  case 39:
820
- if (!d && !i) {
821
- if (t.preventDefault(), e.daysContainer !== void 0 && (r === !1 || document.activeElement && ie(document.activeElement))) {
822
- const u = t.keyCode === 39 ? 1 : -1;
823
- t.ctrlKey ? (t.stopPropagation(), he(u), q(te(1), 0)) : q(void 0, u);
929
+ if (!p && !i) {
930
+ n.preventDefault();
931
+ var s = d();
932
+ if (e.daysContainer !== void 0 && (o === !1 || s && ue(s))) {
933
+ var h = n.keyCode === 39 ? 1 : -1;
934
+ n.ctrlKey ? (n.stopPropagation(), Me(h), ne(G(1), 0)) : ne(void 0, h);
824
935
  }
825
936
  } else
826
937
  e.hourElement && e.hourElement.focus();
827
938
  break;
828
939
  case 38:
829
940
  case 40:
830
- t.preventDefault();
831
- const c = t.keyCode === 40 ? 1 : -1;
832
- e.daysContainer && n.$i !== void 0 || n === e.input || n === e.altInput ? t.ctrlKey ? (t.stopPropagation(), ae(e.currentYear - c), q(te(1), 0)) : d || q(void 0, c * 7) : n === e.currentYearElement ? ae(e.currentYear - c) : e.config.enableTime && (!d && e.hourElement && e.hourElement.focus(), D(t), e._debouncedChange());
941
+ n.preventDefault();
942
+ var f = n.keyCode === 40 ? 1 : -1;
943
+ e.daysContainer && t.$i !== void 0 || t === e.input || t === e.altInput ? n.ctrlKey ? (n.stopPropagation(), le(e.currentYear - f), ne(G(1), 0)) : p || ne(void 0, f * 7) : t === e.currentYearElement ? le(e.currentYear - f) : e.config.enableTime && (!p && e.hourElement && e.hourElement.focus(), x(n), e._debouncedChange());
833
944
  break;
834
945
  case 9:
835
- if (d) {
836
- const u = [
946
+ if (p) {
947
+ var m = [
837
948
  e.hourElement,
838
949
  e.minuteElement,
839
950
  e.secondElement,
840
951
  e.amPM
841
- ].concat(e.pluginElements).filter((M) => M), g = u.indexOf(n);
842
- if (g !== -1) {
843
- const M = u[g + (t.shiftKey ? -1 : 1)];
844
- t.preventDefault(), (M || e._input).focus();
952
+ ].concat(e.pluginElements).filter(function(F) {
953
+ return F;
954
+ }), M = m.indexOf(t);
955
+ if (M !== -1) {
956
+ var L = m[M + (n.shiftKey ? -1 : 1)];
957
+ n.preventDefault(), (L || e._input).focus();
845
958
  }
846
959
  } else
847
- !e.config.noCalendar && e.daysContainer && e.daysContainer.contains(n) && t.shiftKey && (t.preventDefault(), e._input.focus());
960
+ !e.config.noCalendar && e.daysContainer && e.daysContainer.contains(t) && n.shiftKey && (n.preventDefault(), e._input.focus());
848
961
  break;
849
962
  }
850
963
  }
851
- if (e.amPM !== void 0 && n === e.amPM)
852
- switch (t.key) {
964
+ if (e.amPM !== void 0 && t === e.amPM)
965
+ switch (n.key) {
853
966
  case e.l10n.amPM[0].charAt(0):
854
967
  case e.l10n.amPM[0].charAt(0).toLowerCase():
855
- e.amPM.textContent = e.l10n.amPM[0], _(), $();
968
+ e.amPM.textContent = e.l10n.amPM[0], I(), R();
856
969
  break;
857
970
  case e.l10n.amPM[1].charAt(0):
858
971
  case e.l10n.amPM[1].charAt(0).toLowerCase():
859
- e.amPM.textContent = e.l10n.amPM[1], _(), $();
972
+ e.amPM.textContent = e.l10n.amPM[1], I(), R();
860
973
  break;
861
974
  }
862
- (i || J(n)) && w("onKeyDown", t);
863
- }
864
- function be(t) {
865
- if (e.selectedDates.length !== 1 || t && (!t.classList.contains("flatpickr-day") || t.classList.contains("flatpickr-disabled")))
866
- return;
867
- const n = t ? t.dateObj.getTime() : e.days.firstElementChild.dateObj.getTime(), i = e.parseDate(e.selectedDates[0], void 0, !0).getTime(), r = Math.min(n, e.selectedDates[0].getTime()), l = Math.max(n, e.selectedDates[0].getTime());
868
- let s = !1, d = 0, c = 0;
869
- for (let u = r; u < l; u += Ht.DAY)
870
- B(new Date(u), !0) || (s = s || u > r && u < l, u < i && (!d || u > d) ? d = u : u > i && (!c || u < c) && (c = u));
871
- for (let u = 0; u < e.config.showMonths; u++) {
872
- const g = e.daysContainer.children[u];
873
- for (let M = 0, S = g.children.length; M < S; M++) {
874
- const E = g.children[M], P = E.dateObj.getTime(), G = d > 0 && P < d || c > 0 && P > c;
875
- if (G) {
876
- E.classList.add("notAllowed"), ["inRange", "startRange", "endRange"].forEach((Z) => {
877
- E.classList.remove(Z);
975
+ (i || te(t)) && C("onKeyDown", n);
976
+ }
977
+ function fe(n, t) {
978
+ if (t === void 0 && (t = "flatpickr-day"), !(e.selectedDates.length !== 1 || n && (!n.classList.contains(t) || n.classList.contains("flatpickr-disabled")))) {
979
+ 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()), u = Math.max(i, e.selectedDates[0].getTime()), p = !1, s = 0, h = 0, f = l; f < u; f += Un.DAY)
980
+ B(new Date(f), !0) || (p = p || f > l && f < u, f < o && (!s || f > s) ? s = f : f > o && (!h || f < h) && (h = f));
981
+ var m = Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+" + e.config.showMonths + ") > ." + t));
982
+ m.forEach(function(M) {
983
+ var L = M.dateObj, F = L.getTime(), ae = s > 0 && F < s || h > 0 && F > h;
984
+ if (ae) {
985
+ M.classList.add("notAllowed"), ["inRange", "startRange", "endRange"].forEach(function(Z) {
986
+ M.classList.remove(Z);
878
987
  });
879
- continue;
880
- } else if (s && !G)
881
- continue;
882
- ["startRange", "inRange", "endRange", "notAllowed"].forEach((Z) => {
883
- E.classList.remove(Z);
884
- }), t !== void 0 && (t.classList.add(n <= e.selectedDates[0].getTime() ? "startRange" : "endRange"), i < n && P === i ? E.classList.add("startRange") : i > n && P === i && E.classList.add("endRange"), P >= d && (c === 0 || P <= c) && jt(P, i, n) && E.classList.add("inRange"));
885
- }
988
+ return;
989
+ } else if (p && !ae)
990
+ return;
991
+ ["startRange", "inRange", "endRange", "notAllowed"].forEach(function(Z) {
992
+ M.classList.remove(Z);
993
+ }), n !== void 0 && (n.classList.add(i <= e.selectedDates[0].getTime() ? "startRange" : "endRange"), o < i && F === o ? M.classList.add("startRange") : o > i && F === o && M.classList.add("endRange"), F >= s && (h === 0 || F <= h) && zn(F, o, i) && M.classList.add("inRange"));
994
+ });
886
995
  }
887
996
  }
888
- function lt() {
889
- e.isOpen && !e.config.static && !e.config.inline && oe();
997
+ function dn() {
998
+ e.isOpen && !e.config.static && !e.config.inline && se();
890
999
  }
891
- function ct(t, n = e._positionElement) {
892
- if (e.isMobile === !0) {
893
- if (t) {
894
- t.preventDefault();
895
- const r = k(t);
896
- r && r.blur();
1000
+ function mn(n, t) {
1001
+ if (t === void 0 && (t = e._positionElement), e.isMobile === !0) {
1002
+ if (n) {
1003
+ n.preventDefault();
1004
+ var i = N(n);
1005
+ i && i.blur();
897
1006
  }
898
- e.mobileInput !== void 0 && (e.mobileInput.focus(), e.mobileInput.click()), w("onOpen");
1007
+ e.mobileInput !== void 0 && (e.mobileInput.focus(), e.mobileInput.click()), C("onOpen");
899
1008
  return;
900
1009
  } else if (e._input.disabled || e.config.inline)
901
1010
  return;
902
- const i = e.isOpen;
903
- e.isOpen = !0, i || (e.calendarContainer.classList.add("open"), e._input.classList.add("active"), w("onOpen"), oe(n)), e.config.enableTime === !0 && e.config.noCalendar === !0 && e.config.allowInput === !1 && (t === void 0 || !e.timeContainer.contains(t.relatedTarget)) && setTimeout(() => e.hourElement.select(), 50);
904
- }
905
- function Pe(t) {
906
- return (n) => {
907
- const i = e.config[`_${t}Date`] = e.parseDate(n, e.config.dateFormat), r = e.config[`_${t === "min" ? "max" : "min"}Date`];
908
- i !== void 0 && (e[t === "min" ? "minDateHasTime" : "maxDateHasTime"] = i.getHours() > 0 || i.getMinutes() > 0 || i.getSeconds() > 0), e.selectedDates && (e.selectedDates = e.selectedDates.filter((l) => B(l)), !e.selectedDates.length && t === "min" && Y(i), $()), e.daysContainer && (He(), i !== void 0 ? e.currentYearElement[t] = i.getFullYear().toString() : e.currentYearElement.removeAttribute(t), e.currentYearElement.disabled = !!r && i !== void 0 && r.getFullYear() === i.getFullYear());
1011
+ var o = e.isOpen;
1012
+ e.isOpen = !0, o || (e.calendarContainer.classList.add("open"), e._input.classList.add("active"), C("onOpen"), se(t)), e.config.enableTime === !0 && e.config.noCalendar === !0 && e.config.allowInput === !1 && (n === void 0 || !e.timeContainer.contains(n.relatedTarget)) && setTimeout(function() {
1013
+ return e.hourElement.select();
1014
+ }, 50);
1015
+ }
1016
+ function je(n) {
1017
+ return function(t) {
1018
+ var i = e.config["_" + n + "Date"] = e.parseDate(t, e.config.dateFormat), o = e.config["_" + (n === "min" ? "max" : "min") + "Date"];
1019
+ 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) {
1020
+ return B(l);
1021
+ }), !e.selectedDates.length && n === "min" && A(i), R()), e.daysContainer && (Ke(), i !== void 0 ? e.currentYearElement[n] = i.getFullYear().toString() : e.currentYearElement.removeAttribute(n), e.currentYearElement.disabled = !!o && i !== void 0 && o.getFullYear() === i.getFullYear());
909
1022
  };
910
1023
  }
911
- function dt() {
912
- const t = [
1024
+ function gn() {
1025
+ var n = [
913
1026
  "wrap",
914
1027
  "weekNumbers",
915
1028
  "allowInput",
@@ -924,318 +1037,372 @@ function Rt(a, o) {
924
1037
  "static",
925
1038
  "enableSeconds",
926
1039
  "disableMobile"
927
- ], n = Object.assign(Object.assign({}, JSON.parse(JSON.stringify(a.dataset || {}))), o), i = {};
928
- e.config.parseDate = n.parseDate, e.config.formatDate = n.formatDate, Object.defineProperty(e.config, "enable", {
929
- get: () => e.config._enable,
930
- set: (s) => {
931
- e.config._enable = We(s);
1040
+ ], t = T(T({}, JSON.parse(JSON.stringify(a.dataset || {}))), r), i = {};
1041
+ e.config.parseDate = t.parseDate, e.config.formatDate = t.formatDate, Object.defineProperty(e.config, "enable", {
1042
+ get: function() {
1043
+ return e.config._enable;
1044
+ },
1045
+ set: function(m) {
1046
+ e.config._enable = ze(m);
932
1047
  }
933
1048
  }), Object.defineProperty(e.config, "disable", {
934
- get: () => e.config._disable,
935
- set: (s) => {
936
- e.config._disable = We(s);
1049
+ get: function() {
1050
+ return e.config._disable;
1051
+ },
1052
+ set: function(m) {
1053
+ e.config._disable = ze(m);
937
1054
  }
938
1055
  });
939
- const r = n.mode === "time";
940
- if (!n.dateFormat && (n.enableTime || r)) {
941
- const s = y.defaultConfig.dateFormat || V.dateFormat;
942
- i.dateFormat = n.noCalendar || r ? "H:i" + (n.enableSeconds ? ":S" : "") : s + " H:i" + (n.enableSeconds ? ":S" : "");
1056
+ var o = t.mode === "time";
1057
+ if (!t.dateFormat && (t.enableTime || o)) {
1058
+ var l = k.defaultConfig.dateFormat || X.dateFormat;
1059
+ i.dateFormat = t.noCalendar || o ? "H:i" + (t.enableSeconds ? ":S" : "") : l + " H:i" + (t.enableSeconds ? ":S" : "");
943
1060
  }
944
- if (n.altInput && (n.enableTime || r) && !n.altFormat) {
945
- const s = y.defaultConfig.altFormat || V.altFormat;
946
- i.altFormat = n.noCalendar || r ? "h:i" + (n.enableSeconds ? ":S K" : " K") : s + ` h:i${n.enableSeconds ? ":S" : ""} K`;
1061
+ if (t.altInput && (t.enableTime || o) && !t.altFormat) {
1062
+ var u = k.defaultConfig.altFormat || X.altFormat;
1063
+ i.altFormat = t.noCalendar || o ? "h:i" + (t.enableSeconds ? ":S K" : " K") : u + (" h:i" + (t.enableSeconds ? ":S" : "") + " K");
947
1064
  }
948
1065
  Object.defineProperty(e.config, "minDate", {
949
- get: () => e.config._minDate,
950
- set: Pe("min")
1066
+ get: function() {
1067
+ return e.config._minDate;
1068
+ },
1069
+ set: je("min")
951
1070
  }), Object.defineProperty(e.config, "maxDate", {
952
- get: () => e.config._maxDate,
953
- set: Pe("max")
1071
+ get: function() {
1072
+ return e.config._maxDate;
1073
+ },
1074
+ set: je("max")
954
1075
  });
955
- const l = (s) => (d) => {
956
- e.config[s === "min" ? "_minTime" : "_maxTime"] = e.parseDate(d, "H:i:S");
1076
+ var p = function(m) {
1077
+ return function(M) {
1078
+ e.config[m === "min" ? "_minTime" : "_maxTime"] = e.parseDate(M, "H:i:S");
1079
+ };
957
1080
  };
958
1081
  Object.defineProperty(e.config, "minTime", {
959
- get: () => e.config._minTime,
960
- set: l("min")
1082
+ get: function() {
1083
+ return e.config._minTime;
1084
+ },
1085
+ set: p("min")
961
1086
  }), Object.defineProperty(e.config, "maxTime", {
962
- get: () => e.config._maxTime,
963
- set: l("max")
964
- }), n.mode === "time" && (e.config.noCalendar = !0, e.config.enableTime = !0), Object.assign(e.config, i, n);
965
- for (let s = 0; s < t.length; s++)
966
- e.config[t[s]] = e.config[t[s]] === !0 || e.config[t[s]] === "true";
967
- Ee.filter((s) => e.config[s] !== void 0).forEach((s) => {
968
- e.config[s] = xe(e.config[s] || []).map(h);
1087
+ get: function() {
1088
+ return e.config._maxTime;
1089
+ },
1090
+ set: p("max")
1091
+ }), t.mode === "time" && (e.config.noCalendar = !0, e.config.enableTime = !0), Object.assign(e.config, i, t);
1092
+ for (var s = 0; s < n.length; s++)
1093
+ e.config[n[s]] = e.config[n[s]] === !0 || e.config[n[s]] === "true";
1094
+ Te.filter(function(m) {
1095
+ return e.config[m] !== void 0;
1096
+ }).forEach(function(m) {
1097
+ e.config[m] = _e(e.config[m] || []).map(b);
969
1098
  }), 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);
970
- for (let s = 0; s < e.config.plugins.length; s++) {
971
- const d = e.config.plugins[s](e) || {};
972
- for (const c in d)
973
- Ee.indexOf(c) > -1 ? e.config[c] = xe(d[c]).map(h).concat(e.config[c]) : typeof n[c] > "u" && (e.config[c] = d[c]);
1099
+ for (var s = 0; s < e.config.plugins.length; s++) {
1100
+ var h = e.config.plugins[s](e) || {};
1101
+ for (var f in h)
1102
+ Te.indexOf(f) > -1 ? e.config[f] = _e(h[f]).map(b).concat(e.config[f]) : typeof t[f] > "u" && (e.config[f] = h[f]);
974
1103
  }
975
- n.altInputClass || (e.config.altInputClass = Ye().className + " " + e.config.altInputClass), w("onParseConfig");
1104
+ t.altInputClass || (e.config.altInputClass = Re().className + " " + e.config.altInputClass), C("onParseConfig");
976
1105
  }
977
- function Ye() {
1106
+ function Re() {
978
1107
  return e.config.wrap ? a.querySelector("[data-input]") : a;
979
1108
  }
980
- function je() {
981
- typeof e.config.locale != "object" && typeof y.l10ns[e.config.locale] > "u" && e.config.errorHandler(new Error(`flatpickr: invalid locale ${e.config.locale}`)), e.l10n = Object.assign(Object.assign({}, y.l10ns.default), typeof e.config.locale == "object" ? e.config.locale : e.config.locale !== "default" ? y.l10ns[e.config.locale] : void 0), Ie.K = `(${e.l10n.amPM[0]}|${e.l10n.amPM[1]}|${e.l10n.amPM[0].toLowerCase()}|${e.l10n.amPM[1].toLowerCase()})`, Object.assign(Object.assign({}, o), JSON.parse(JSON.stringify(a.dataset || {}))).time_24hr === void 0 && y.defaultConfig.time_24hr === void 0 && (e.config.time_24hr = e.l10n.time_24hr), e.formatDate = Ge(e), e.parseDate = Se({ config: e.config, l10n: e.l10n });
1109
+ function We() {
1110
+ typeof e.config.locale != "object" && typeof k.l10ns[e.config.locale] > "u" && e.config.errorHandler(new Error("flatpickr: invalid locale " + e.config.locale)), e.l10n = T(T({}, k.l10ns.default), typeof e.config.locale == "object" ? e.config.locale : e.config.locale !== "default" ? k.l10ns[e.config.locale] : void 0), z.D = "(" + e.l10n.weekdays.shorthand.join("|") + ")", z.l = "(" + e.l10n.weekdays.longhand.join("|") + ")", z.M = "(" + e.l10n.months.shorthand.join("|") + ")", z.F = "(" + e.l10n.months.longhand.join("|") + ")", z.K = "(" + e.l10n.amPM[0] + "|" + e.l10n.amPM[1] + "|" + e.l10n.amPM[0].toLowerCase() + "|" + e.l10n.amPM[1].toLowerCase() + ")";
1111
+ var n = T(T({}, r), JSON.parse(JSON.stringify(a.dataset || {})));
1112
+ n.time_24hr === void 0 && k.defaultConfig.time_24hr === void 0 && (e.config.time_24hr = e.l10n.time_24hr), e.formatDate = nn(e), e.parseDate = Oe({ config: e.config, l10n: e.l10n });
982
1113
  }
983
- function oe(t) {
1114
+ function se(n) {
984
1115
  if (typeof e.config.position == "function")
985
- return void e.config.position(e, t);
986
- if (e.calendarContainer === void 0)
987
- return;
988
- w("onPreCalendarPosition");
989
- const n = t || e._positionElement, i = Array.prototype.reduce.call(e.calendarContainer.children, (Q, Ce) => Q + Ce.offsetHeight, 0), r = e.calendarContainer.offsetWidth, l = e.config.position.split(" "), s = l[0], d = l.length > 1 ? l[1] : null, c = n.getBoundingClientRect(), u = window.innerHeight - c.bottom, g = s === "above" || s !== "below" && u < i && c.top > i, M = window.pageYOffset + c.top + (g ? -i - 2 : n.offsetHeight + 2);
990
- if (x(e.calendarContainer, "arrowTop", !g), x(e.calendarContainer, "arrowBottom", g), e.config.inline)
991
- return;
992
- let S = window.pageXOffset + c.left, E = !1, le = !1;
993
- d === "center" ? (S -= (r - c.width) / 2, E = !0) : d === "right" && (S -= r - c.width, le = !0), x(e.calendarContainer, "arrowLeft", !E && !le), x(e.calendarContainer, "arrowCenter", E), x(e.calendarContainer, "arrowRight", le);
994
- const P = window.document.body.offsetWidth - (window.pageXOffset + c.right), G = S + r > window.document.body.offsetWidth, Z = P + r > window.document.body.offsetWidth;
995
- if (x(e.calendarContainer, "rightMost", G), !e.config.static)
996
- if (e.calendarContainer.style.top = `${M}px`, !G)
997
- e.calendarContainer.style.left = `${S}px`, e.calendarContainer.style.right = "auto";
998
- else if (!Z)
999
- e.calendarContainer.style.left = "auto", e.calendarContainer.style.right = `${P}px`;
1000
- else {
1001
- const Q = ft();
1002
- if (Q === void 0)
1003
- return;
1004
- const Ce = window.document.body.offsetWidth, Ct = Math.max(0, Ce / 2 - r / 2), vt = ".flatpickr-calendar.centerMost:before", Et = ".flatpickr-calendar.centerMost:after", xt = Q.cssRules.length, Tt = `{left:${c.left}px;right:auto;}`;
1005
- x(e.calendarContainer, "rightMost", !1), x(e.calendarContainer, "centerMost", !0), Q.insertRule(`${vt},${Et}${Tt}`, xt), e.calendarContainer.style.left = `${Ct}px`, e.calendarContainer.style.right = "auto";
1116
+ return void e.config.position(e, n);
1117
+ if (e.calendarContainer !== void 0) {
1118
+ C("onPreCalendarPosition");
1119
+ var t = n || e._positionElement, i = Array.prototype.reduce.call(e.calendarContainer.children, function(Fn, Nn) {
1120
+ return Fn + Nn.offsetHeight;
1121
+ }, 0), o = e.calendarContainer.offsetWidth, l = e.config.position.split(" "), u = l[0], p = l.length > 1 ? l[1] : null, s = t.getBoundingClientRect(), h = window.innerHeight - s.bottom, f = u === "above" || u !== "below" && h < i && s.top > i, m = window.pageYOffset + s.top + (f ? -i - 2 : t.offsetHeight + 2);
1122
+ if (_(e.calendarContainer, "arrowTop", !f), _(e.calendarContainer, "arrowBottom", f), !e.config.inline) {
1123
+ var M = window.pageXOffset + s.left, L = !1, F = !1;
1124
+ p === "center" ? (M -= (o - s.width) / 2, L = !0) : p === "right" && (M -= o - s.width, F = !0), _(e.calendarContainer, "arrowLeft", !L && !F), _(e.calendarContainer, "arrowCenter", L), _(e.calendarContainer, "arrowRight", F);
1125
+ var ae = window.document.body.offsetWidth - (window.pageXOffset + s.right), Z = M + o > window.document.body.offsetWidth, kn = ae + o > window.document.body.offsetWidth;
1126
+ if (_(e.calendarContainer, "rightMost", Z), !e.config.static)
1127
+ if (e.calendarContainer.style.top = m + "px", !Z)
1128
+ e.calendarContainer.style.left = M + "px", e.calendarContainer.style.right = "auto";
1129
+ else if (!kn)
1130
+ e.calendarContainer.style.left = "auto", e.calendarContainer.style.right = ae + "px";
1131
+ else {
1132
+ var xe = pn();
1133
+ if (xe === void 0)
1134
+ return;
1135
+ var Tn = window.document.body.offsetWidth, _n = Math.max(0, Tn / 2 - o / 2), Sn = ".flatpickr-calendar.centerMost:before", In = ".flatpickr-calendar.centerMost:after", An = xe.cssRules.length, On = "{left:" + s.left + "px;right:auto;}";
1136
+ _(e.calendarContainer, "rightMost", !1), _(e.calendarContainer, "centerMost", !0), xe.insertRule(Sn + "," + In + On, An), e.calendarContainer.style.left = _n + "px", e.calendarContainer.style.right = "auto";
1137
+ }
1006
1138
  }
1139
+ }
1007
1140
  }
1008
- function ft() {
1009
- let t = null;
1010
- for (let n = 0; n < document.styleSheets.length; n++) {
1011
- const i = document.styleSheets[n];
1012
- try {
1013
- i.cssRules;
1014
- } catch {
1015
- continue;
1141
+ function pn() {
1142
+ for (var n = null, t = 0; t < document.styleSheets.length; t++) {
1143
+ var i = document.styleSheets[t];
1144
+ if (i.cssRules) {
1145
+ try {
1146
+ i.cssRules;
1147
+ } catch {
1148
+ continue;
1149
+ }
1150
+ n = i;
1151
+ break;
1016
1152
  }
1017
- t = i;
1018
- break;
1019
1153
  }
1020
- return t ?? ut();
1154
+ return n ?? hn();
1021
1155
  }
1022
- function ut() {
1023
- const t = document.createElement("style");
1024
- return document.head.appendChild(t), t.sheet;
1156
+ function hn() {
1157
+ var n = document.createElement("style");
1158
+ return document.head.appendChild(n), n.sheet;
1025
1159
  }
1026
- function He() {
1027
- e.config.noCalendar || e.isMobile || (K(), se(), ne());
1160
+ function Ke() {
1161
+ e.config.noCalendar || e.isMobile || ($(), de(), oe());
1028
1162
  }
1029
- function Me() {
1163
+ function we() {
1030
1164
  e._input.focus(), window.navigator.userAgent.indexOf("MSIE") !== -1 || navigator.msMaxTouchPoints !== void 0 ? setTimeout(e.close, 0) : e.close();
1031
1165
  }
1032
- function Le(t) {
1033
- t.preventDefault(), t.stopPropagation();
1034
- const n = (d) => d.classList && d.classList.contains("flatpickr-day") && !d.classList.contains("flatpickr-disabled") && !d.classList.contains("notAllowed"), i = qe(k(t), n);
1035
- if (i === void 0)
1036
- return;
1037
- const r = i, l = e.latestSelectedDateObj = new Date(r.dateObj.getTime()), s = (l.getMonth() < e.currentMonth || l.getMonth() > e.currentMonth + e.config.showMonths - 1) && e.config.mode !== "range";
1038
- if (e.selectedDateElem = r, e.config.mode === "single")
1039
- e.selectedDates = [l];
1040
- else if (e.config.mode === "multiple") {
1041
- const d = ye(l);
1042
- d ? e.selectedDates.splice(parseInt(d), 1) : e.selectedDates.push(l);
1043
- } else
1044
- e.config.mode === "range" && (e.selectedDates.length === 2 && e.clear(!1, !1), e.latestSelectedDateObj = l, e.selectedDates.push(l), I(l, e.selectedDates[0], !0) !== 0 && e.selectedDates.sort((d, c) => d.getTime() - c.getTime()));
1045
- if (_(), s) {
1046
- const d = e.currentYear !== l.getFullYear();
1047
- e.currentYear = l.getFullYear(), e.currentMonth = l.getMonth(), d && (w("onYearChange"), K()), w("onMonthChange");
1048
- }
1049
- if (se(), ne(), $(), !s && e.config.mode !== "range" && e.config.showMonths === 1 ? pe(r) : 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) {
1050
- const d = e.config.mode === "single" && !e.config.enableTime, c = e.config.mode === "range" && e.selectedDates.length === 2 && !e.config.enableTime;
1051
- (d || c) && Me();
1166
+ function Je(n) {
1167
+ n.preventDefault(), n.stopPropagation();
1168
+ var t = function(m) {
1169
+ return m.classList && m.classList.contains("flatpickr-day") && !m.classList.contains("flatpickr-disabled") && !m.classList.contains("notAllowed");
1170
+ }, i = en(N(n), t);
1171
+ if (i !== void 0) {
1172
+ var o = i, l = e.latestSelectedDateObj = new Date(o.dateObj.getTime()), u = (l.getMonth() < e.currentMonth || l.getMonth() > e.currentMonth + e.config.showMonths - 1) && e.config.mode !== "range";
1173
+ if (e.selectedDateElem = o, e.config.mode === "single")
1174
+ e.selectedDates = [l];
1175
+ else if (e.config.mode === "multiple") {
1176
+ var p = Ce(l);
1177
+ p ? e.selectedDates.splice(parseInt(p), 1) : e.selectedDates.push(l);
1178
+ } else
1179
+ e.config.mode === "range" && (e.selectedDates.length === 2 && e.clear(!1, !1), e.latestSelectedDateObj = l, e.selectedDates.push(l), P(l, e.selectedDates[0], !0) !== 0 && e.selectedDates.sort(function(m, M) {
1180
+ return m.getTime() - M.getTime();
1181
+ }));
1182
+ if (I(), u) {
1183
+ var s = e.currentYear !== l.getFullYear();
1184
+ e.currentYear = l.getFullYear(), e.currentMonth = l.getMonth(), s && (C("onYearChange"), $()), C("onMonthChange");
1185
+ }
1186
+ if (de(), oe(), R(), !u && e.config.mode !== "range" && e.config.showMonths === 1 ? q(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) {
1187
+ var h = e.config.mode === "single" && !e.config.enableTime, f = e.config.mode === "range" && e.selectedDates.length === 2 && !e.config.enableTime;
1188
+ (h || f) && we();
1189
+ }
1190
+ j();
1052
1191
  }
1053
- j();
1054
1192
  }
1055
- const re = {
1056
- locale: [je, Ne],
1057
- showMonths: [Ae, C, Fe],
1058
- minDate: [N],
1059
- maxDate: [N],
1193
+ var ce = {
1194
+ locale: [We, He],
1195
+ showMonths: [Pe, w, Ye],
1196
+ minDate: [E],
1197
+ maxDate: [E],
1198
+ positionElement: [Ve],
1060
1199
  clickOpens: [
1061
- () => {
1062
- e.config.clickOpens === !0 ? (p(e._input, "focus", e.open), p(e._input, "click", e.open)) : (e._input.removeEventListener("focus", e.open), e._input.removeEventListener("click", e.open));
1200
+ function() {
1201
+ e.config.clickOpens === !0 ? (v(e._input, "focus", e.open), v(e._input, "click", e.open)) : (e._input.removeEventListener("focus", e.open), e._input.removeEventListener("click", e.open));
1063
1202
  }
1064
1203
  ]
1065
1204
  };
1066
- function mt(t, n) {
1067
- if (t !== null && typeof t == "object") {
1068
- Object.assign(e.config, t);
1069
- for (const i in t)
1070
- re[i] !== void 0 && re[i].forEach((r) => r());
1205
+ function vn(n, t) {
1206
+ if (n !== null && typeof n == "object") {
1207
+ Object.assign(e.config, n);
1208
+ for (var i in n)
1209
+ ce[i] !== void 0 && ce[i].forEach(function(o) {
1210
+ return o();
1211
+ });
1071
1212
  } else
1072
- e.config[t] = n, re[t] !== void 0 ? re[t].forEach((i) => i()) : Ee.indexOf(t) > -1 && (e.config[t] = xe(n));
1073
- e.redraw(), $(!0);
1213
+ e.config[n] = t, ce[n] !== void 0 ? ce[n].forEach(function(o) {
1214
+ return o();
1215
+ }) : Te.indexOf(n) > -1 && (e.config[n] = _e(t));
1216
+ e.redraw(), R(!0);
1074
1217
  }
1075
- function Re(t, n) {
1076
- let i = [];
1077
- if (t instanceof Array)
1078
- i = t.map((r) => e.parseDate(r, n));
1079
- else if (t instanceof Date || typeof t == "number")
1080
- i = [e.parseDate(t, n)];
1081
- else if (typeof t == "string")
1218
+ function Be(n, t) {
1219
+ var i = [];
1220
+ if (n instanceof Array)
1221
+ i = n.map(function(o) {
1222
+ return e.parseDate(o, t);
1223
+ });
1224
+ else if (n instanceof Date || typeof n == "number")
1225
+ i = [e.parseDate(n, t)];
1226
+ else if (typeof n == "string")
1082
1227
  switch (e.config.mode) {
1083
1228
  case "single":
1084
1229
  case "time":
1085
- i = [e.parseDate(t, n)];
1230
+ i = [e.parseDate(n, t)];
1086
1231
  break;
1087
1232
  case "multiple":
1088
- i = t.split(e.config.conjunction).map((r) => e.parseDate(r, n));
1233
+ i = n.split(e.config.conjunction).map(function(o) {
1234
+ return e.parseDate(o, t);
1235
+ });
1089
1236
  break;
1090
1237
  case "range":
1091
- i = t.split(e.l10n.rangeSeparator).map((r) => e.parseDate(r, n));
1238
+ i = n.split(e.l10n.rangeSeparator).map(function(o) {
1239
+ return e.parseDate(o, t);
1240
+ });
1092
1241
  break;
1093
1242
  }
1094
1243
  else
1095
- e.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(t)}`));
1096
- e.selectedDates = e.config.allowInvalidPreload ? i : i.filter((r) => r instanceof Date && B(r, !1)), e.config.mode === "range" && e.selectedDates.sort((r, l) => r.getTime() - l.getTime());
1097
- }
1098
- function gt(t, n = !1, i = e.config.dateFormat) {
1099
- if (t !== 0 && !t || t instanceof Array && t.length === 0)
1100
- return e.clear(n);
1101
- Re(t, i), e.latestSelectedDateObj = e.selectedDates[e.selectedDates.length - 1], e.redraw(), N(void 0, n), Y(), e.selectedDates.length === 0 && e.clear(!1), $(n), n && w("onChange");
1244
+ e.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(n)));
1245
+ e.selectedDates = e.config.allowInvalidPreload ? i : i.filter(function(o) {
1246
+ return o instanceof Date && B(o, !1);
1247
+ }), e.config.mode === "range" && e.selectedDates.sort(function(o, l) {
1248
+ return o.getTime() - l.getTime();
1249
+ });
1102
1250
  }
1103
- function We(t) {
1104
- return t.slice().map((n) => typeof n == "string" || typeof n == "number" || n instanceof Date ? e.parseDate(n, void 0, !0) : n && typeof n == "object" && n.from && n.to ? {
1105
- from: e.parseDate(n.from, void 0),
1106
- to: e.parseDate(n.to, void 0)
1107
- } : n).filter((n) => n);
1251
+ function Dn(n, t, i) {
1252
+ if (t === void 0 && (t = !1), i === void 0 && (i = e.config.dateFormat), n !== 0 && !n || n instanceof Array && n.length === 0)
1253
+ return e.clear(t);
1254
+ Be(n, i), e.latestSelectedDateObj = e.selectedDates[e.selectedDates.length - 1], e.redraw(), E(void 0, t), A(), e.selectedDates.length === 0 && e.clear(!1), R(t), t && C("onChange");
1255
+ }
1256
+ function ze(n) {
1257
+ return n.slice().map(function(t) {
1258
+ return typeof t == "string" || typeof t == "number" || t instanceof Date ? e.parseDate(t, void 0, !0) : t && typeof t == "object" && t.from && t.to ? {
1259
+ from: e.parseDate(t.from, void 0),
1260
+ to: e.parseDate(t.to, void 0)
1261
+ } : t;
1262
+ }).filter(function(t) {
1263
+ return t;
1264
+ });
1108
1265
  }
1109
- function pt() {
1266
+ function Mn() {
1110
1267
  e.selectedDates = [], e.now = e.parseDate(e.config.now) || /* @__PURE__ */ new Date();
1111
- const t = e.config.defaultDate || ((e.input.nodeName === "INPUT" || e.input.nodeName === "TEXTAREA") && e.input.placeholder && e.input.value === e.input.placeholder ? null : e.input.value);
1112
- t && Re(t, 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);
1268
+ 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);
1269
+ n && Be(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);
1113
1270
  }
1114
- function ht() {
1115
- if (e.input = Ye(), !e.input) {
1271
+ function bn() {
1272
+ if (e.input = Re(), !e.input) {
1116
1273
  e.config.errorHandler(new Error("Invalid input element specified"));
1117
1274
  return;
1118
1275
  }
1119
- 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 = b(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"), e._positionElement = e.config.positionElement || e._input;
1276
+ 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 = D(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"), Ve();
1120
1277
  }
1121
- function Dt() {
1122
- const t = e.config.enableTime ? e.config.noCalendar ? "time" : "datetime-local" : "date";
1123
- e.mobileInput = b("input", e.input.className + " flatpickr-mobile"), e.mobileInput.tabIndex = 1, e.mobileInput.type = t, e.mobileInput.disabled = e.input.disabled, e.mobileInput.required = e.input.required, e.mobileInput.placeholder = e.input.placeholder, e.mobileFormatStr = t === "datetime-local" ? "Y-m-d\\TH:i:S" : t === "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");
1278
+ function Ve() {
1279
+ e._positionElement = e.config.positionElement || e._input;
1280
+ }
1281
+ function wn() {
1282
+ var n = e.config.enableTime ? e.config.noCalendar ? "time" : "datetime-local" : "date";
1283
+ e.mobileInput = D("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");
1124
1284
  try {
1125
1285
  e.input.parentNode && e.input.parentNode.insertBefore(e.mobileInput, e.input.nextSibling);
1126
1286
  } catch {
1127
1287
  }
1128
- p(e.mobileInput, "change", (n) => {
1129
- e.setDate(k(n).value, !1, e.mobileFormatStr), w("onChange"), w("onClose");
1288
+ v(e.mobileInput, "change", function(t) {
1289
+ e.setDate(N(t).value, !1, e.mobileFormatStr), C("onChange"), C("onClose");
1130
1290
  });
1131
1291
  }
1132
- function bt(t) {
1292
+ function yn(n) {
1133
1293
  if (e.isOpen === !0)
1134
1294
  return e.close();
1135
- e.open(t);
1295
+ e.open(n);
1296
+ }
1297
+ function C(n, t) {
1298
+ if (e.config !== void 0) {
1299
+ var i = e.config[n];
1300
+ if (i !== void 0 && i.length > 0)
1301
+ for (var o = 0; i[o] && o < i.length; o++)
1302
+ i[o](e.selectedDates, e.input.value, e, t);
1303
+ n === "onChange" && (e.input.dispatchEvent(ye("change")), e.input.dispatchEvent(ye("input")));
1304
+ }
1136
1305
  }
1137
- function w(t, n) {
1138
- if (e.config === void 0)
1139
- return;
1140
- const i = e.config[t];
1141
- if (i !== void 0 && i.length > 0)
1142
- for (let r = 0; i[r] && r < i.length; r++)
1143
- i[r](e.selectedDates, e.input.value, e, n);
1144
- t === "onChange" && (e.input.dispatchEvent(we("change")), e.input.dispatchEvent(we("input")));
1145
- }
1146
- function we(t) {
1147
- const n = document.createEvent("Event");
1148
- return n.initEvent(t, !0, !0), n;
1149
- }
1150
- function ye(t) {
1151
- for (let n = 0; n < e.selectedDates.length; n++)
1152
- if (I(e.selectedDates[n], t) === 0)
1153
- return "" + n;
1306
+ function ye(n) {
1307
+ var t = document.createEvent("Event");
1308
+ return t.initEvent(n, !0, !0), t;
1309
+ }
1310
+ function Ce(n) {
1311
+ for (var t = 0; t < e.selectedDates.length; t++) {
1312
+ var i = e.selectedDates[t];
1313
+ if (i instanceof Date && P(i, n) === 0)
1314
+ return "" + t;
1315
+ }
1154
1316
  return !1;
1155
1317
  }
1156
- function Mt(t) {
1157
- return e.config.mode !== "range" || e.selectedDates.length < 2 ? !1 : I(t, e.selectedDates[0]) >= 0 && I(t, e.selectedDates[1]) <= 0;
1318
+ function Cn(n) {
1319
+ return e.config.mode !== "range" || e.selectedDates.length < 2 ? !1 : P(n, e.selectedDates[0]) >= 0 && P(n, e.selectedDates[1]) <= 0;
1158
1320
  }
1159
- function se() {
1160
- e.config.noCalendar || e.isMobile || !e.monthNav || (e.yearElements.forEach((t, n) => {
1161
- const i = new Date(e.currentYear, e.currentMonth, 1);
1162
- i.setMonth(e.currentMonth + n), e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? e.monthElements[n].textContent = ue(i.getMonth(), e.config.shorthandCurrentMonth, e.l10n) + " " : e.monthsDropdownContainer.value = i.getMonth().toString(), t.value = i.getFullYear().toString();
1321
+ function de() {
1322
+ e.config.noCalendar || e.isMobile || !e.monthNav || (e.yearElements.forEach(function(n, t) {
1323
+ var i = new Date(e.currentYear, e.currentMonth, 1);
1324
+ i.setMonth(e.currentMonth + t), e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? e.monthElements[t].textContent = he(i.getMonth(), e.config.shorthandCurrentMonth, e.l10n) + " " : e.monthsDropdownContainer.value = i.getMonth().toString(), n.value = i.getFullYear().toString();
1163
1325
  }), 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()));
1164
1326
  }
1165
- function $e(t) {
1166
- return e.selectedDates.map((n) => e.formatDate(n, t)).filter((n, i, r) => e.config.mode !== "range" || e.config.enableTime || r.indexOf(n) === i).join(e.config.mode !== "range" ? e.config.conjunction : e.l10n.rangeSeparator);
1167
- }
1168
- function $(t = !0) {
1169
- e.mobileInput !== void 0 && e.mobileFormatStr && (e.mobileInput.value = e.latestSelectedDateObj !== void 0 ? e.formatDate(e.latestSelectedDateObj, e.mobileFormatStr) : ""), e.input.value = $e(e.config.dateFormat), e.altInput !== void 0 && (e.altInput.value = $e(e.config.altFormat)), t !== !1 && w("onValueUpdate");
1170
- }
1171
- function wt(t) {
1172
- const n = k(t), i = e.prevMonthNav.contains(n), r = e.nextMonthNav.contains(n);
1173
- i || r ? he(i ? -1 : 1) : e.yearElements.indexOf(n) >= 0 ? n.select() : n.classList.contains("arrowUp") ? e.changeYear(e.currentYear + 1) : n.classList.contains("arrowDown") && e.changeYear(e.currentYear - 1);
1174
- }
1175
- function yt(t) {
1176
- t.preventDefault();
1177
- const n = t.type === "keydown", i = k(t), r = i;
1178
- e.amPM !== void 0 && i === e.amPM && (e.amPM.textContent = e.l10n.amPM[O(e.amPM.textContent === e.l10n.amPM[0])]);
1179
- const l = parseFloat(r.getAttribute("min")), s = parseFloat(r.getAttribute("max")), d = parseFloat(r.getAttribute("step")), c = parseInt(r.value, 10), u = t.delta || (n ? t.which === 38 ? 1 : -1 : 0);
1180
- let g = c + d * u;
1181
- if (typeof r.value < "u" && r.value.length === 2) {
1182
- const M = r === e.hourElement, S = r === e.minuteElement;
1183
- g < l ? (g = s + g + O(!M) + (O(M) && O(!e.amPM)), S && W(void 0, -1, e.hourElement)) : g > s && (g = r === e.hourElement ? g - s - O(!e.amPM) : l, S && W(void 0, 1, e.hourElement)), e.amPM && M && (d === 1 ? g + c === 23 : Math.abs(g - c) > d) && (e.amPM.textContent = e.l10n.amPM[O(e.amPM.textContent === e.l10n.amPM[0])]), r.value = T(g);
1327
+ function Ee(n) {
1328
+ var t = n || (e.config.altInput ? e.config.altFormat : e.config.dateFormat);
1329
+ return e.selectedDates.map(function(i) {
1330
+ return e.formatDate(i, t);
1331
+ }).filter(function(i, o, l) {
1332
+ return e.config.mode !== "range" || e.config.enableTime || l.indexOf(i) === o;
1333
+ }).join(e.config.mode !== "range" ? e.config.conjunction : e.l10n.rangeSeparator);
1334
+ }
1335
+ function R(n) {
1336
+ 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 = Ee(e.config.dateFormat), e.altInput !== void 0 && (e.altInput.value = Ee(e.config.altFormat)), n !== !1 && C("onValueUpdate");
1337
+ }
1338
+ function En(n) {
1339
+ var t = N(n), i = e.prevMonthNav.contains(t), o = e.nextMonthNav.contains(t);
1340
+ i || o ? Me(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);
1341
+ }
1342
+ function xn(n) {
1343
+ n.preventDefault();
1344
+ var t = n.type === "keydown", i = N(n), o = i;
1345
+ e.amPM !== void 0 && i === e.amPM && (e.amPM.textContent = e.l10n.amPM[Y(e.amPM.textContent === e.l10n.amPM[0])]);
1346
+ var l = parseFloat(o.getAttribute("min")), u = parseFloat(o.getAttribute("max")), p = parseFloat(o.getAttribute("step")), s = parseInt(o.value, 10), h = n.delta || (t ? n.which === 38 ? 1 : -1 : 0), f = s + p * h;
1347
+ if (typeof o.value < "u" && o.value.length === 2) {
1348
+ var m = o === e.hourElement, M = o === e.minuteElement;
1349
+ f < l ? (f = u + f + Y(!m) + (Y(m) && Y(!e.amPM)), M && U(void 0, -1, e.hourElement)) : f > u && (f = o === e.hourElement ? f - u - Y(!e.amPM) : l, M && U(void 0, 1, e.hourElement)), e.amPM && m && (p === 1 ? f + s === 23 : Math.abs(f - s) > p) && (e.amPM.textContent = e.l10n.amPM[Y(e.amPM.textContent === e.l10n.amPM[0])]), o.value = S(f);
1184
1350
  }
1185
1351
  }
1186
- return m(), e;
1352
+ return g(), e;
1187
1353
  }
1188
- function U(a, o) {
1189
- const e = Array.prototype.slice.call(a).filter((m) => m instanceof HTMLElement), f = [];
1190
- for (let m = 0; m < e.length; m++) {
1191
- const h = e[m];
1354
+ function ee(a, r) {
1355
+ for (var e = Array.prototype.slice.call(a).filter(function(b) {
1356
+ return b instanceof HTMLElement;
1357
+ }), c = [], g = 0; g < e.length; g++) {
1358
+ var d = e[g];
1192
1359
  try {
1193
- if (h.getAttribute("data-fp-omit") !== null)
1360
+ if (d.getAttribute("data-fp-omit") !== null)
1194
1361
  continue;
1195
- h._flatpickr !== void 0 && (h._flatpickr.destroy(), h._flatpickr = void 0), h._flatpickr = Rt(h, o || {}), f.push(h._flatpickr);
1196
- } catch (C) {
1197
- console.error(C);
1362
+ d._flatpickr !== void 0 && (d._flatpickr.destroy(), d._flatpickr = void 0), d._flatpickr = Gn(d, r || {}), c.push(d._flatpickr);
1363
+ } catch (b) {
1364
+ console.error(b);
1198
1365
  }
1199
1366
  }
1200
- return f.length === 1 ? f[0] : f;
1367
+ return c.length === 1 ? c[0] : c;
1201
1368
  }
1202
1369
  typeof HTMLElement < "u" && typeof HTMLCollection < "u" && typeof NodeList < "u" && (HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function(a) {
1203
- return U(this, a);
1370
+ return ee(this, a);
1204
1371
  }, HTMLElement.prototype.flatpickr = function(a) {
1205
- return U([this], a);
1372
+ return ee([this], a);
1206
1373
  });
1207
- var y = function(a, o) {
1208
- return typeof a == "string" ? U(window.document.querySelectorAll(a), o) : a instanceof Node ? U([a], o) : U(a, o);
1374
+ var k = function(a, r) {
1375
+ return typeof a == "string" ? ee(window.document.querySelectorAll(a), r) : a instanceof Node ? ee([a], r) : ee(a, r);
1209
1376
  };
1210
- y.defaultConfig = {};
1211
- y.l10ns = {
1212
- en: Object.assign({}, ee),
1213
- default: Object.assign({}, ee)
1377
+ k.defaultConfig = {};
1378
+ k.l10ns = {
1379
+ en: T({}, re),
1380
+ default: T({}, re)
1214
1381
  };
1215
- y.localize = (a) => {
1216
- y.l10ns.default = Object.assign(Object.assign({}, y.l10ns.default), a);
1382
+ k.localize = function(a) {
1383
+ k.l10ns.default = T(T({}, k.l10ns.default), a);
1217
1384
  };
1218
- y.setDefaults = (a) => {
1219
- y.defaultConfig = Object.assign(Object.assign({}, y.defaultConfig), a);
1385
+ k.setDefaults = function(a) {
1386
+ k.defaultConfig = T(T({}, k.defaultConfig), a);
1220
1387
  };
1221
- y.parseDate = Se({});
1222
- y.formatDate = Ge({});
1223
- y.compareDates = I;
1388
+ k.parseDate = Oe({});
1389
+ k.formatDate = nn({});
1390
+ k.compareDates = P;
1224
1391
  typeof jQuery < "u" && typeof jQuery.fn < "u" && (jQuery.fn.flatpickr = function(a) {
1225
- return U(this, a);
1392
+ return ee(this, a);
1226
1393
  });
1227
1394
  Date.prototype.fp_incr = function(a) {
1228
1395
  return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof a == "string" ? parseInt(a, 10) : a));
1229
1396
  };
1230
- typeof window < "u" && (window.flatpickr = y);
1231
- var Oe = { exports: {} };
1232
- (function(a, o) {
1233
- (function(e, f) {
1234
- f(o);
1235
- })(Ue, function(e) {
1236
- var f = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
1397
+ typeof window < "u" && (window.flatpickr = k);
1398
+ var Fe = { exports: {} };
1399
+ (function(a, r) {
1400
+ (function(e, c) {
1401
+ c(r);
1402
+ })(Xe, function(e) {
1403
+ var c = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
1237
1404
  l10ns: {}
1238
- }, m = {
1405
+ }, g = {
1239
1406
  weekdays: {
1240
1407
  shorthand: ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"],
1241
1408
  longhand: [
@@ -1289,17 +1456,17 @@ var Oe = { exports: {} };
1289
1456
  amPM: ["ÖÖ", "ÖS"],
1290
1457
  time_24hr: !0
1291
1458
  };
1292
- f.l10ns.tr = m;
1293
- var h = f.l10ns;
1294
- e.Turkish = m, e.default = h, Object.defineProperty(e, "__esModule", { value: !0 });
1459
+ c.l10ns.tr = g;
1460
+ var d = c.l10ns;
1461
+ e.Turkish = g, e.default = d, Object.defineProperty(e, "__esModule", { value: !0 });
1295
1462
  });
1296
- })(Oe, Oe.exports);
1297
- var Wt = Oe.exports, _e = { exports: {} };
1298
- (function(a, o) {
1299
- (function(e, f) {
1300
- f(o);
1301
- })(Ue, function(e) {
1302
- var f = {
1463
+ })(Fe, Fe.exports);
1464
+ var $n = Fe.exports, Ne = { exports: {} };
1465
+ (function(a, r) {
1466
+ (function(e, c) {
1467
+ c(r);
1468
+ })(Xe, function(e) {
1469
+ var c = {
1303
1470
  weekdays: {
1304
1471
  shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1305
1472
  longhand: [
@@ -1344,11 +1511,11 @@ var Wt = Oe.exports, _e = { exports: {} };
1344
1511
  },
1345
1512
  daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
1346
1513
  firstDayOfWeek: 0,
1347
- ordinal: function(m) {
1348
- var h = m % 100;
1349
- if (h > 3 && h < 21)
1514
+ ordinal: function(g) {
1515
+ var d = g % 100;
1516
+ if (d > 3 && d < 21)
1350
1517
  return "th";
1351
- switch (h % 10) {
1518
+ switch (d % 10) {
1352
1519
  case 1:
1353
1520
  return "st";
1354
1521
  case 2:
@@ -1370,24 +1537,24 @@ var Wt = Oe.exports, _e = { exports: {} };
1370
1537
  minuteAriaLabel: "Minute",
1371
1538
  time_24hr: !1
1372
1539
  };
1373
- e.default = f, e.english = f, Object.defineProperty(e, "__esModule", { value: !0 });
1540
+ e.default = c, e.english = c, Object.defineProperty(e, "__esModule", { value: !0 });
1374
1541
  });
1375
- })(_e, _e.exports);
1376
- var $t = _e.exports;
1377
- const Ve = (a, o, e) => {
1542
+ })(Ne, Ne.exports);
1543
+ var Zn = Ne.exports;
1544
+ const Qe = (a, r, e) => {
1378
1545
  if (a)
1379
1546
  return a;
1380
- switch (o) {
1547
+ switch (r) {
1381
1548
  case "time":
1382
- return Ft;
1549
+ return Wn;
1383
1550
  case "range":
1384
- return Je;
1551
+ return Ge;
1385
1552
  case "datetime":
1386
- return e ? _t : At;
1553
+ return e ? jn : Rn;
1387
1554
  default:
1388
- return Je;
1555
+ return Ge;
1389
1556
  }
1390
- }, Bt = (a) => {
1557
+ }, Qn = (a) => {
1391
1558
  switch (a) {
1392
1559
  case "time":
1393
1560
  return {
@@ -1402,77 +1569,77 @@ const Ve = (a, o, e) => {
1402
1569
  default:
1403
1570
  return { mode: a, enableTime: !1 };
1404
1571
  }
1405
- }, Zt = kt.forwardRef(
1572
+ }, ot = Pn.forwardRef(
1406
1573
  ({
1407
1574
  value: a,
1408
- format: o,
1575
+ format: r,
1409
1576
  mode: e = "single",
1410
- hasShortFormat: f,
1411
- suffix: m,
1412
- minDate: h,
1413
- maxDate: C,
1414
- onChange: D,
1415
- onClose: L,
1416
- disable: A = [],
1417
- enable: _ = [],
1418
- ...Y
1419
- }, R) => {
1420
- var N;
1421
- const F = Be(null), p = Be(), j = Bt(e);
1422
- Ke(() => (p.current = y(F.current, {
1423
- ...j,
1424
- dateFormat: Ve(o, e, f),
1577
+ hasShortFormat: c,
1578
+ suffix: g,
1579
+ minDate: d,
1580
+ maxDate: b,
1581
+ onChange: w,
1582
+ onClose: x,
1583
+ disable: W = [],
1584
+ enable: y = [],
1585
+ ...I
1586
+ }, A) => {
1587
+ var V;
1588
+ const O = Ue(null), H = Ue(), v = Qn(e);
1589
+ qe(() => (H.current = k(O.current, {
1590
+ ...v,
1591
+ dateFormat: Qe(r, e, c),
1425
1592
  defaultDate: a,
1426
- minDate: h,
1427
- disable: A,
1428
- enable: _,
1593
+ minDate: d,
1594
+ disable: W,
1595
+ enable: y,
1429
1596
  hourIncrement: 1,
1430
1597
  minuteIncrement: 1,
1431
- maxDate: C,
1432
- locale: It() === "tr" ? Wt.Turkish : $t.english,
1598
+ maxDate: b,
1599
+ locale: Yn() === "tr" ? $n.Turkish : Zn.english,
1433
1600
  time_24hr: !0,
1434
- parseDate: (v) => z(v, ce).toDate(),
1435
- formatDate: (v) => z(v).format(Ve(void 0, e)),
1436
- onChange: (v) => {
1437
- if (D)
1601
+ parseDate: (E) => Q(E, me).toDate(),
1602
+ formatDate: (E) => Q(E).format(Qe(void 0, e)),
1603
+ onChange: (E) => {
1604
+ if (w)
1438
1605
  switch (e) {
1439
1606
  case "range":
1440
- D({
1441
- starDate: z(v[0]).format(ce),
1442
- endDate: z(v[1]).format(ce)
1607
+ w({
1608
+ starDate: Q(E[0]).format(me),
1609
+ endDate: Q(E[1]).format(me)
1443
1610
  });
1444
1611
  break;
1445
1612
  case "datetime":
1446
- D(
1447
- z(v[0]).format(St)
1613
+ w(
1614
+ Q(E[0]).format(Hn)
1448
1615
  );
1449
1616
  break;
1450
1617
  default:
1451
- D(z(v[0]).format(ce));
1618
+ w(Q(E[0]).format(me));
1452
1619
  break;
1453
1620
  }
1454
1621
  },
1455
- onClose: (v) => {
1456
- L && L(v);
1622
+ onClose: (E) => {
1623
+ x && x(E);
1457
1624
  }
1458
1625
  }), () => {
1459
- var v;
1460
- (v = p.current) == null || v.destroy();
1461
- }), [F, p, h, C, _]), Ke(() => {
1462
- p && p.current && p.current.set("maxDate", C);
1463
- }, [C]);
1464
- const H = a && ((N = JSON.stringify(a)) == null ? void 0 : N.length) > 0 ? Ot(a, e, f) : "";
1465
- return /* @__PURE__ */ ve.jsx("div", { "data-testid": "datepicker", ref: R, children: /* @__PURE__ */ ve.jsx(
1466
- Pt,
1626
+ var E;
1627
+ (E = H.current) == null || E.destroy();
1628
+ }), [O, H, d, b, y]), qe(() => {
1629
+ H && H.current && H.current.set("maxDate", b);
1630
+ }, [b]);
1631
+ const j = a && ((V = JSON.stringify(a)) == null ? void 0 : V.length) > 0 ? Ln(a, e, c) : "";
1632
+ return /* @__PURE__ */ ke.jsx("div", { "data-testid": "datepicker", ref: A, children: /* @__PURE__ */ ke.jsx(
1633
+ Jn,
1467
1634
  {
1468
- ...Y,
1469
- ref: F,
1470
- value: H,
1471
- suffix: m || /* @__PURE__ */ ve.jsx(Nt, { name: "calendar" })
1635
+ ...I,
1636
+ ref: O,
1637
+ value: j,
1638
+ suffix: g || /* @__PURE__ */ ke.jsx(Kn, { name: "calendar" })
1472
1639
  }
1473
1640
  ) });
1474
1641
  }
1475
1642
  );
1476
1643
  export {
1477
- Zt as default
1644
+ ot as default
1478
1645
  };