UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,878 lines 504 kB
var $a = Object.defineProperty; var ja = (t, n, e) => n in t ? $a(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e; var $ = (t, n, e) => ja(t, typeof n != "symbol" ? n + "" : n, e); import { defineComponent as je, ref as p, computed as N, watch as ve, createVNode as M, Fragment as jt, onMounted as it, createTextVNode as mt, watchEffect as Aa, mergeProps as kt, nextTick as Xt, withDirectives as Sn, vModelText as Ya, reactive as Ot, resolveDirective as xo, onUnmounted as cn, Teleport as Mo, vShow as qa, createApp as To, Transition as ko, onBeforeUnmount as So, onBeforeMount as za, shallowRef as Ga, render as Fn, h as Ua, cloneVNode as Xa, inject as Ht, provide as Qa, triggerRef as Ka, isVNode as Ja } from "vue"; import { isPlainObject as io, cloneDeep as ft, isUndefined as Tt, throttle as Za } from "lodash-es"; import { useReqAnimationFrame as er, withInstall as qn, useDateFormat as _n, formatTime as tr, getTimeObject as nr, useTextBox as or, useClear as ar, useDelayedRef as rr, useGuid as ir, resolveField as vt, FormSchemaEntityFieldTypeName as so, useCommonUtils as sr, useNumberFormat as lr, setFieldValue as Bn, getCustomClass as Pn, FormSchemaEntityField$Type as lo, FormSchemaEntityFieldType$Type as ur } from "../common/index.esm.js"; import cr from "../button-edit/index.esm.js"; import dr, { useNumber as fr, useFormat as mr, useSpinner as hr, useTextBox as pr } from "../number-spinner/index.esm.js"; import _o from "../../designer/button-edit/index.esm.js"; import { DgControl as uo } from "../designer-canvas/index.esm.js"; import { useResizeObserver as Oo } from "@vueuse/core"; import { useIdentify as vr, useGroupData as yr, useFilter as gr, useHierarchy as br, useLoading as wr, useDataView as Cr, useSelection as xr, useSelectHierarchyItem as Mr, useDataViewContainerStyle as Tr, useCommandColumn as kr, useColumn as Sr, useSort as _r, useGroupColumn as Or, useRow as Er, useEdit as Fr, useVisualDataBound as Pr, useVisualDataCell as Ir, useVisualDataRow as Dr, useVisualData as Br, useCellPosition as Vr, useSidebar as Nr, useVirtualScroll as Hr, useFitColumn as Rr, useFilterHistory as Lr, useColumnFilter as Wr, useDragColumn as $r, getColumnHeader as jr, getSidebar as Ar, getDisableMask as Yr, getHorizontalScrollbar as qr, getVerticalScrollbar as zr, getEmpty as Gr } from "../data-view/index.esm.js"; import "../modal/index.esm.js"; import Ur from "../transfer/index.esm.js"; import Xr from "../tabs/index.esm.js"; import Qr from "../order/index.esm.js"; import "../condition/index.esm.js"; import { FCheckbox as Kr } from "../checkbox/index.esm.js"; import Jr from "../filter-bar/index.esm.js"; import co from "../tooltip/index.esm.js"; import Zr from "../pagination/index.esm.js"; import ei from "../button/index.esm.js"; import ti from "../search-box/index.esm.js"; import ni from "../tags/index.esm.js"; import oi, { FDynamicFormGroup as ai, FDynamicFormInput as ri } from "../dynamic-form/index.esm.js"; import { createPropsResolver as ii } from "../dynamic-resolver/index.esm.js"; import "../property-panel/index.esm.js"; import si from "../accordion/index.esm.js"; import li from "../avatar/index.esm.js"; import ui from "../button-group/index.esm.js"; import ci from "../calendar/index.esm.js"; import di from "../capsule/index.esm.js"; import fo from "../../designer/checkbox/index.esm.js"; import mo from "../../designer/checkbox-group/index.esm.js"; import Vn from "../combo-list/index.esm.js"; import fi from "../combo-tree/index.esm.js"; import mi from "../component/index.esm.js"; import hi from "../color-picker/index.esm.js"; import pi from "../content-container/index.esm.js"; import vi from "../date-picker/index.esm.js"; import yi from "../../designer/data-grid/index.esm.js"; import gi from "../dropdown/index.esm.js"; import bi from "../events-editor/index.esm.js"; import wi from "../field-selector/index.esm.js"; import Ci from "../binding-selector/index.esm.js"; import xi from "../image-cropper/index.esm.js"; import Mi from "../../designer/input-group/index.esm.js"; import Ti from "../layout/index.esm.js"; import ki from "../list-nav/index.esm.js"; import Si from "../list-view/index.esm.js"; import _i from "../lookup/index.esm.js"; import Oi from "../mapping-editor/index.esm.js"; import Ei from "../nav/index.esm.js"; import Fi from "../number-range/index.esm.js"; import Pi from "../page-header/index.esm.js"; import Ii from "../page-footer/index.esm.js"; import Di from "../progress/index.esm.js"; import Bi from "../query-solution/index.esm.js"; import Vi from "../../designer/radio-group/index.esm.js"; import Ni from "../rate/index.esm.js"; import Hi from "../response-toolbar/index.esm.js"; import Ri from "../response-layout/index.esm.js"; import Li from "../response-layout-editor/index.esm.js"; import Wi from "../section/index.esm.js"; import $i from "../smoke-detector/index.esm.js"; import ji from "../splitter/index.esm.js"; import Ai from "../step/index.esm.js"; import Yi from "../switch/index.esm.js"; import qi from "../text/index.esm.js"; import zi from "../time-picker/index.esm.js"; import Gi from "../tree-view/index.esm.js"; import Ui from "../uploader/index.esm.js"; import Xi from "../verify-detail/index.esm.js"; import Qi from "../video/index.esm.js"; import Ki from "../textarea/index.esm.js"; import Ji from "../schema-selector/index.esm.js"; import Zi from "../tree-grid/index.esm.js"; import es from "../event-parameter/index.esm.js"; import ts from "../filter-condition-editor/index.esm.js"; import ns from "../fieldset/index.esm.js"; import os from "../sort-condition-editor/index.esm.js"; import as from "../menu-lookup/index.esm.js"; import rs from "../drawer/index.esm.js"; import is from "../json-editor/index.esm.js"; import ss from "../property-editor/index.esm.js"; import ls from "../expression-editor/index.esm.js"; import us from "../code-editor/index.esm.js"; import cs from "../html-template/index.esm.js"; import "../external-container/index.esm.js"; import "../notify/index.esm.js"; const On = ["日", "一", "二", "三", "四", "五", "六"]; var dt = /* @__PURE__ */ ((t) => (t[t.previous = 1] = "previous", t[t.current = 2] = "current", t[t.next = 3] = "next", t))(dt || {}); const ds = { dates: { Type: Array, default: [] }, daysInWeek: { Type: Array, default: On }, enableKeyboadNavigate: { Type: Boolean, default: !0 }, enableMarkCurrent: { Type: Boolean, default: !0 }, enablePeriod: { Type: Boolean, default: !1 }, firstDayOfTheWeek: { Type: Boolean, default: "Sun." }, selected: { Type: Object, default: null }, selectedPeriod: { Type: Object, default: null }, selectedWeek: { Type: Object, default: null }, selectMode: { Type: String, default: "day" }, showWeekNumber: { Type: Boolean, default: !1 }, weekTitle: { Type: String, default: "Week" } }; var It = /* @__PURE__ */ ((t) => (t[t.enter = 13] = "enter", t[t.esc = 27] = "esc", t[t.space = 32] = "space", t[t.leftArrow = 37] = "leftArrow", t[t.upArrow = 38] = "upArrow", t[t.rightArrow = 39] = "rightArrow", t[t.downArrow = 40] = "downArrow", t[t.tab = 9] = "tab", t[t.shift = 16] = "shift", t))(It || {}); function zn() { function t(n) { const e = n.key || n.keyCode; return e === "Enter" || e === 13 ? 13 : e === "Escape" || e === 27 ? 27 : e === " " || e === 32 ? 32 : e === "ArrowLeft" || e === 37 ? 37 : e === "ArrowUp" || e === 38 ? 38 : e === "ArrowRight" || e === 39 ? 39 : e === "ArrowDown" || e === 40 ? 40 : e === "Tab" || e === 9 ? 9 : e === "Shift" || e === 16 ? 16 : -1; } return { getKeyCodeFromEvent: t }; } function tt(t) { const n = Object.prototype.toString.call(t); return t instanceof Date || typeof t == "object" && n === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || n === "[object Number]" || typeof t == "string" || n === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN); } function ze(t, n) { return t instanceof Date ? new t.constructor(n) : new Date(n); } function Eo(t, n) { const e = tt(t); return isNaN(n) ? ze(t, NaN) : (n && e.setDate(e.getDate() + n), e); } const Fo = 6048e5, fs = 864e5, ms = 6e4, hs = 36e5, ps = 1e3; let vs = {}; function nn() { return vs; } function At(t, n) { var l, u, c, m; const e = nn(), o = (n == null ? void 0 : n.weekStartsOn) ?? ((u = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : u.weekStartsOn) ?? e.weekStartsOn ?? ((m = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : m.weekStartsOn) ?? 0, a = tt(t), r = a.getDay(), i = (r < o ? 7 : 0) + r - o; return a.setDate(a.getDate() - i), a.setHours(0, 0, 0, 0), a; } function en(t) { return At(t, { weekStartsOn: 1 }); } function Po(t) { const n = tt(t), e = n.getFullYear(), o = ze(t, 0); o.setFullYear(e + 1, 0, 4), o.setHours(0, 0, 0, 0); const a = en(o), r = ze(t, 0); r.setFullYear(e, 0, 4), r.setHours(0, 0, 0, 0); const i = en(r); return n.getTime() >= a.getTime() ? e + 1 : n.getTime() >= i.getTime() ? e : e - 1; } function ho(t) { const n = tt(t); return n.setHours(0, 0, 0, 0), n; } function gn(t) { const n = tt(t), e = new Date( Date.UTC( n.getFullYear(), n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), n.getMilliseconds() ) ); return e.setUTCFullYear(n.getFullYear()), +t - +e; } function ys(t, n) { const e = ho(t), o = ho(n), a = +e - gn(e), r = +o - gn(o); return Math.round((a - r) / fs); } function gs(t) { const n = Po(t), e = ze(t, 0); return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0), en(e); } function bs(t) { return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]"; } function Gn(t) { if (!bs(t) && typeof t != "number") return !1; const n = tt(t); return !isNaN(Number(n)); } function ws(t) { const n = tt(t), e = ze(t, 0); return e.setFullYear(n.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e; } const Cs = { lessThanXSeconds: { one: "less than a second", other: "less than {{count}} seconds" }, xSeconds: { one: "1 second", other: "{{count}} seconds" }, halfAMinute: "half a minute", lessThanXMinutes: { one: "less than a minute", other: "less than {{count}} minutes" }, xMinutes: { one: "1 minute", other: "{{count}} minutes" }, aboutXHours: { one: "about 1 hour", other: "about {{count}} hours" }, xHours: { one: "1 hour", other: "{{count}} hours" }, xDays: { one: "1 day", other: "{{count}} days" }, aboutXWeeks: { one: "about 1 week", other: "about {{count}} weeks" }, xWeeks: { one: "1 week", other: "{{count}} weeks" }, aboutXMonths: { one: "about 1 month", other: "about {{count}} months" }, xMonths: { one: "1 month", other: "{{count}} months" }, aboutXYears: { one: "about 1 year", other: "about {{count}} years" }, xYears: { one: "1 year", other: "{{count}} years" }, overXYears: { one: "over 1 year", other: "over {{count}} years" }, almostXYears: { one: "almost 1 year", other: "almost {{count}} years" } }, xs = (t, n, e) => { let o; const a = Cs[t]; return typeof a == "string" ? o = a : n === 1 ? o = a.one : o = a.other.replace("{{count}}", n.toString()), e != null && e.addSuffix ? e.comparison && e.comparison > 0 ? "in " + o : o + " ago" : o; }; function In(t) { return (n = {}) => { const e = n.width ? String(n.width) : t.defaultWidth; return t.formats[e] || t.formats[t.defaultWidth]; }; } const Ms = { full: "EEEE, MMMM do, y", long: "MMMM do, y", medium: "MMM d, y", short: "MM/dd/yyyy" }, Ts = { full: "h:mm:ss a zzzz", long: "h:mm:ss a z", medium: "h:mm:ss a", short: "h:mm a" }, ks = { full: "{{date}} 'at' {{time}}", long: "{{date}} 'at' {{time}}", medium: "{{date}}, {{time}}", short: "{{date}}, {{time}}" }, Ss = { date: In({ formats: Ms, defaultWidth: "full" }), time: In({ formats: Ts, defaultWidth: "full" }), dateTime: In({ formats: ks, defaultWidth: "full" }) }, _s = { lastWeek: "'last' eeee 'at' p", yesterday: "'yesterday at' p", today: "'today at' p", tomorrow: "'tomorrow at' p", nextWeek: "eeee 'at' p", other: "P" }, Os = (t, n, e, o) => _s[t]; function an(t) { return (n, e) => { const o = e != null && e.context ? String(e.context) : "standalone"; let a; if (o === "formatting" && t.formattingValues) { const i = t.defaultFormattingWidth || t.defaultWidth, l = e != null && e.width ? String(e.width) : i; a = t.formattingValues[l] || t.formattingValues[i]; } else { const i = t.defaultWidth, l = e != null && e.width ? String(e.width) : t.defaultWidth; a = t.values[l] || t.values[i]; } const r = t.argumentCallback ? t.argumentCallback(n) : n; return a[r]; }; } const Es = { narrow: ["B", "A"], abbreviated: ["BC", "AD"], wide: ["Before Christ", "Anno Domini"] }, Fs = { narrow: ["1", "2", "3", "4"], abbreviated: ["Q1", "Q2", "Q3", "Q4"], wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] }, Ps = { narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], abbreviated: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], wide: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ] }, Is = { narrow: ["S", "M", "T", "W", "T", "F", "S"], short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], wide: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] }, Ds = { narrow: { am: "a", pm: "p", midnight: "mi", noon: "n", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, abbreviated: { am: "AM", pm: "PM", midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, wide: { am: "a.m.", pm: "p.m.", midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" } }, Bs = { narrow: { am: "a", pm: "p", midnight: "mi", noon: "n", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night" }, abbreviated: { am: "AM", pm: "PM", midnight: "midnight", noon: "noon", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night" }, wide: { am: "a.m.", pm: "p.m.", midnight: "midnight", noon: "noon", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night" } }, Vs = (t, n) => { const e = Number(t), o = e % 100; if (o > 20 || o < 10) switch (o % 10) { case 1: return e + "st"; case 2: return e + "nd"; case 3: return e + "rd"; } return e + "th"; }, Ns = { ordinalNumber: Vs, era: an({ values: Es, defaultWidth: "wide" }), quarter: an({ values: Fs, defaultWidth: "wide", argumentCallback: (t) => t - 1 }), month: an({ values: Ps, defaultWidth: "wide" }), day: an({ values: Is, defaultWidth: "wide" }), dayPeriod: an({ values: Ds, defaultWidth: "wide", formattingValues: Bs, defaultFormattingWidth: "wide" }) }; function rn(t) { return (n, e = {}) => { const o = e.width, a = o && t.matchPatterns[o] || t.matchPatterns[t.defaultMatchWidth], r = n.match(a); if (!r) return null; const i = r[0], l = o && t.parsePatterns[o] || t.parsePatterns[t.defaultParseWidth], u = Array.isArray(l) ? Rs(l, (s) => s.test(i)) : ( // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type Hs(l, (s) => s.test(i)) ); let c; c = t.valueCallback ? t.valueCallback(u) : u, c = e.valueCallback ? ( // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type e.valueCallback(c) ) : c; const m = n.slice(i.length); return { value: c, rest: m }; }; } function Hs(t, n) { for (const e in t) if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e])) return e; } function Rs(t, n) { for (let e = 0; e < t.length; e++) if (n(t[e])) return e; } function Ls(t) { return (n, e = {}) => { const o = n.match(t.matchPattern); if (!o) return null; const a = o[0], r = n.match(t.parsePattern); if (!r) return null; let i = t.valueCallback ? t.valueCallback(r[0]) : r[0]; i = e.valueCallback ? e.valueCallback(i) : i; const l = n.slice(a.length); return { value: i, rest: l }; }; } const Ws = /^(\d+)(th|st|nd|rd)?/i, $s = /\d+/i, js = { narrow: /^(b|a)/i, abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, wide: /^(before christ|before common era|anno domini|common era)/i }, As = { any: [/^b/i, /^(a|c)/i] }, Ys = { narrow: /^[1234]/i, abbreviated: /^q[1234]/i, wide: /^[1234](th|st|nd|rd)? quarter/i }, qs = { any: [/1/i, /2/i, /3/i, /4/i] }, zs = { narrow: /^[jfmasond]/i, abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i }, Gs = { narrow: [ /^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i ], any: [ /^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i ] }, Us = { narrow: /^[smtwf]/i, short: /^(su|mo|tu|we|th|fr|sa)/i, abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i }, Xs = { narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] }, Qs = { narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i }, Ks = { any: { am: /^a/i, pm: /^p/i, midnight: /^mi/i, noon: /^no/i, morning: /morning/i, afternoon: /afternoon/i, evening: /evening/i, night: /night/i } }, Js = { ordinalNumber: Ls({ matchPattern: Ws, parsePattern: $s, valueCallback: (t) => parseInt(t, 10) }), era: rn({ matchPatterns: js, defaultMatchWidth: "wide", parsePatterns: As, defaultParseWidth: "any" }), quarter: rn({ matchPatterns: Ys, defaultMatchWidth: "wide", parsePatterns: qs, defaultParseWidth: "any", valueCallback: (t) => t + 1 }), month: rn({ matchPatterns: zs, defaultMatchWidth: "wide", parsePatterns: Gs, defaultParseWidth: "any" }), day: rn({ matchPatterns: Us, defaultMatchWidth: "wide", parsePatterns: Xs, defaultParseWidth: "any" }), dayPeriod: rn({ matchPatterns: Qs, defaultMatchWidth: "any", parsePatterns: Ks, defaultParseWidth: "any" }) }, Io = { code: "en-US", formatDistance: xs, formatLong: Ss, formatRelative: Os, localize: Ns, match: Js, options: { weekStartsOn: 0, firstWeekContainsDate: 1 } }; function Zs(t) { const n = tt(t); return ys(n, ws(n)) + 1; } function Do(t) { const n = tt(t), e = +en(n) - +gs(n); return Math.round(e / Fo) + 1; } function Un(t, n) { var m, s, d, f; const e = tt(t), o = e.getFullYear(), a = nn(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((s = (m = n == null ? void 0 : n.locale) == null ? void 0 : m.options) == null ? void 0 : s.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((f = (d = a.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, i = ze(t, 0); i.setFullYear(o + 1, 0, r), i.setHours(0, 0, 0, 0); const l = At(i, n), u = ze(t, 0); u.setFullYear(o, 0, r), u.setHours(0, 0, 0, 0); const c = At(u, n); return e.getTime() >= l.getTime() ? o + 1 : e.getTime() >= c.getTime() ? o : o - 1; } function el(t, n) { var l, u, c, m; const e = nn(), o = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((u = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((m = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, a = Un(t, n), r = ze(t, 0); return r.setFullYear(a, 0, o), r.setHours(0, 0, 0, 0), At(r, n); } function Bo(t, n) { const e = tt(t), o = +At(e, n) - +el(e, n); return Math.round(o / Fo) + 1; } function Ne(t, n) { const e = t < 0 ? "-" : "", o = Math.abs(t).toString().padStart(n, "0"); return e + o; } const Lt = { // Year y(t, n) { const e = t.getFullYear(), o = e > 0 ? e : 1 - e; return Ne(n === "yy" ? o % 100 : o, n.length); }, // Month M(t, n) { const e = t.getMonth(); return n === "M" ? String(e + 1) : Ne(e + 1, 2); }, // Day of the month d(t, n) { return Ne(t.getDate(), n.length); }, // AM or PM a(t, n) { const e = t.getHours() / 12 >= 1 ? "pm" : "am"; switch (n) { case "a": case "aa": return e.toUpperCase(); case "aaa": return e; case "aaaaa": return e[0]; case "aaaa": default: return e === "am" ? "a.m." : "p.m."; } }, // Hour [1-12] h(t, n) { return Ne(t.getHours() % 12 || 12, n.length); }, // Hour [0-23] H(t, n) { return Ne(t.getHours(), n.length); }, // Minute m(t, n) { return Ne(t.getMinutes(), n.length); }, // Second s(t, n) { return Ne(t.getSeconds(), n.length); }, // Fraction of second S(t, n) { const e = n.length, o = t.getMilliseconds(), a = Math.trunc( o * Math.pow(10, e - 3) ); return Ne(a, n.length); } }, Kt = { am: "am", pm: "pm", midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, po = { // Era G: function(t, n, e) { const o = t.getFullYear() > 0 ? 1 : 0; switch (n) { case "G": case "GG": case "GGG": return e.era(o, { width: "abbreviated" }); case "GGGGG": return e.era(o, { width: "narrow" }); case "GGGG": default: return e.era(o, { width: "wide" }); } }, // Year y: function(t, n, e) { if (n === "yo") { const o = t.getFullYear(), a = o > 0 ? o : 1 - o; return e.ordinalNumber(a, { unit: "year" }); } return Lt.y(t, n); }, // Local week-numbering year Y: function(t, n, e, o) { const a = Un(t, o), r = a > 0 ? a : 1 - a; if (n === "YY") { const i = r % 100; return Ne(i, 2); } return n === "Yo" ? e.ordinalNumber(r, { unit: "year" }) : Ne(r, n.length); }, // ISO week-numbering year R: function(t, n) { const e = Po(t); return Ne(e, n.length); }, // Extended year. This is a single number designating the year of this calendar system. // The main difference between `y` and `u` localizers are B.C. years: // | Year | `y` | `u` | // |------|-----|-----| // | AC 1 | 1 | 1 | // | BC 1 | 1 | 0 | // | BC 2 | 2 | -1 | // Also `yy` always returns the last two digits of a year, // while `uu` pads single digit years to 2 characters and returns other years unchanged. u: function(t, n) { const e = t.getFullYear(); return Ne(e, n.length); }, // Quarter Q: function(t, n, e) { const o = Math.ceil((t.getMonth() + 1) / 3); switch (n) { case "Q": return String(o); case "QQ": return Ne(o, 2); case "Qo": return e.ordinalNumber(o, { unit: "quarter" }); case "QQQ": return e.quarter(o, { width: "abbreviated", context: "formatting" }); case "QQQQQ": return e.quarter(o, { width: "narrow", context: "formatting" }); case "QQQQ": default: return e.quarter(o, { width: "wide", context: "formatting" }); } }, // Stand-alone quarter q: function(t, n, e) { const o = Math.ceil((t.getMonth() + 1) / 3); switch (n) { case "q": return String(o); case "qq": return Ne(o, 2); case "qo": return e.ordinalNumber(o, { unit: "quarter" }); case "qqq": return e.quarter(o, { width: "abbreviated", context: "standalone" }); case "qqqqq": return e.quarter(o, { width: "narrow", context: "standalone" }); case "qqqq": default: return e.quarter(o, { width: "wide", context: "standalone" }); } }, // Month M: function(t, n, e) { const o = t.getMonth(); switch (n) { case "M": case "MM": return Lt.M(t, n); case "Mo": return e.ordinalNumber(o + 1, { unit: "month" }); case "MMM": return e.month(o, { width: "abbreviated", context: "formatting" }); case "MMMMM": return e.month(o, { width: "narrow", context: "formatting" }); case "MMMM": default: return e.month(o, { width: "wide", context: "formatting" }); } }, // Stand-alone month L: function(t, n, e) { const o = t.getMonth(); switch (n) { case "L": return String(o + 1); case "LL": return Ne(o + 1, 2); case "Lo": return e.ordinalNumber(o + 1, { unit: "month" }); case "LLL": return e.month(o, { width: "abbreviated", context: "standalone" }); case "LLLLL": return e.month(o, { width: "narrow", context: "standalone" }); case "LLLL": default: return e.month(o, { width: "wide", context: "standalone" }); } }, // Local week of year w: function(t, n, e, o) { const a = Bo(t, o); return n === "wo" ? e.ordinalNumber(a, { unit: "week" }) : Ne(a, n.length); }, // ISO week of year I: function(t, n, e) { const o = Do(t); return n === "Io" ? e.ordinalNumber(o, { unit: "week" }) : Ne(o, n.length); }, // Day of the month d: function(t, n, e) { return n === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) : Lt.d(t, n); }, // Day of year D: function(t, n, e) { const o = Zs(t); return n === "Do" ? e.ordinalNumber(o, { unit: "dayOfYear" }) : Ne(o, n.length); }, // Day of week E: function(t, n, e) { const o = t.getDay(); switch (n) { case "E": case "EE": case "EEE": return e.day(o, { width: "abbreviated", context: "formatting" }); case "EEEEE": return e.day(o, { width: "narrow", context: "formatting" }); case "EEEEEE": return e.day(o, { width: "short", context: "formatting" }); case "EEEE": default: return e.day(o, { width: "wide", context: "formatting" }); } }, // Local day of week e: function(t, n, e, o) { const a = t.getDay(), r = (a - o.weekStartsOn + 8) % 7 || 7; switch (n) { case "e": return String(r); case "ee": return Ne(r, 2); case "eo": return e.ordinalNumber(r, { unit: "day" }); case "eee": return e.day(a, { width: "abbreviated", context: "formatting" }); case "eeeee": return e.day(a, { width: "narrow", context: "formatting" }); case "eeeeee": return e.day(a, { width: "short", context: "formatting" }); case "eeee": default: return e.day(a, { width: "wide", context: "formatting" }); } }, // Stand-alone local day of week c: function(t, n, e, o) { const a = t.getDay(), r = (a - o.weekStartsOn + 8) % 7 || 7; switch (n) { case "c": return String(r); case "cc": return Ne(r, n.length); case "co": return e.ordinalNumber(r, { unit: "day" }); case "ccc": return e.day(a, { width: "abbreviated", context: "standalone" }); case "ccccc": return e.day(a, { width: "narrow", context: "standalone" }); case "cccccc": return e.day(a, { width: "short", context: "standalone" }); case "cccc": default: return e.day(a, { width: "wide", context: "standalone" }); } }, // ISO day of week i: function(t, n, e) { const o = t.getDay(), a = o === 0 ? 7 : o; switch (n) { case "i": return String(a); case "ii": return Ne(a, n.length); case "io": return e.ordinalNumber(a, { unit: "day" }); case "iii": return e.day(o, { width: "abbreviated", context: "formatting" }); case "iiiii": return e.day(o, { width: "narrow", context: "formatting" }); case "iiiiii": return e.day(o, { width: "short", context: "formatting" }); case "iiii": default: return e.day(o, { width: "wide", context: "formatting" }); } }, // AM or PM a: function(t, n, e) { const a = t.getHours() / 12 >= 1 ? "pm" : "am"; switch (n) { case "a": case "aa": return e.dayPeriod(a, { width: "abbreviated", context: "formatting" }); case "aaa": return e.dayPeriod(a, { width: "abbreviated", context: "formatting" }).toLowerCase(); case "aaaaa": return e.dayPeriod(a, { width: "narrow", context: "formatting" }); case "aaaa": default: return e.dayPeriod(a, { width: "wide", context: "formatting" }); } }, // AM, PM, midnight, noon b: function(t, n, e) { const o = t.getHours(); let a; switch (o === 12 ? a = Kt.noon : o === 0 ? a = Kt.midnight : a = o / 12 >= 1 ? "pm" : "am", n) { case "b": case "bb": return e.dayPeriod(a, { width: "abbreviated", context: "formatting" }); case "bbb": return e.dayPeriod(a, { width: "abbreviated", context: "formatting" }).toLowerCase(); case "bbbbb": return e.dayPeriod(a, { width: "narrow", context: "formatting" }); case "bbbb": default: return e.dayPeriod(a, { width: "wide", context: "formatting" }); } }, // in the morning, in the afternoon, in the evening, at night B: function(t, n, e) { const o = t.getHours(); let a; switch (o >= 17 ? a = Kt.evening : o >= 12 ? a = Kt.afternoon : o >= 4 ? a = Kt.morning : a = Kt.night, n) { case "B": case "BB": case "BBB": return e.dayPeriod(a, { width: "abbreviated", context: "formatting" }); case "BBBBB": return e.dayPeriod(a, { width: "narrow", context: "formatting" }); case "BBBB": default: return e.dayPeriod(a, { width: "wide", context: "formatting" }); } }, // Hour [1-12] h: function(t, n, e) { if (n === "ho") { let o = t.getHours() % 12; return o === 0 && (o = 12), e.ordinalNumber(o, { unit: "hour" }); } return Lt.h(t, n); }, // Hour [0-23] H: function(t, n, e) { return n === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) : Lt.H(t, n); }, // Hour [0-11] K: function(t, n, e) { const o = t.getHours() % 12; return n === "Ko" ? e.ordinalNumber(o, { unit: "hour" }) : Ne(o, n.length); }, // Hour [1-24] k: function(t, n, e) { let o = t.getHours(); return o === 0 && (o = 24), n === "ko" ? e.ordinalNumber(o, { unit: "hour" }) : Ne(o, n.length); }, // Minute m: function(t, n, e) { return n === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) : Lt.m(t, n); }, // Second s: function(t, n, e) { return n === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) : Lt.s(t, n); }, // Fraction of second S: function(t, n) { return Lt.S(t, n); }, // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) X: function(t, n, e) { const o = t.getTimezoneOffset(); if (o === 0) return "Z"; switch (n) { case "X": return yo(o); case "XXXX": case "XX": return zt(o); case "XXXXX": case "XXX": default: return zt(o, ":"); } }, // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) x: function(t, n, e) { const o = t.getTimezoneOffset(); switch (n) { case "x": return yo(o); case "xxxx": case "xx": return zt(o); case "xxxxx": case "xxx": default: return zt(o, ":"); } }, // Timezone (GMT) O: function(t, n, e) { const o = t.getTimezoneOffset(); switch (n) { case "O": case "OO": case "OOO": return "GMT" + vo(o, ":"); case "OOOO": default: return "GMT" + zt(o, ":"); } }, // Timezone (specific non-location) z: function(t, n, e) { const o = t.getTimezoneOffset(); switch (n) { case "z": case "zz": case "zzz": return "GMT" + vo(o, ":"); case "zzzz": default: return "GMT" + zt(o, ":"); } }, // Seconds timestamp t: function(t, n, e) { const o = Math.trunc(t.getTime() / 1e3); return Ne(o, n.length); }, // Milliseconds timestamp T: function(t, n, e) { const o = t.getTime(); return Ne(o, n.length); } }; function vo(t, n = "") { const e = t > 0 ? "-" : "+", o = Math.abs(t), a = Math.trunc(o / 60), r = o % 60; return r === 0 ? e + String(a) : e + String(a) + n + Ne(r, 2); } function yo(t, n) { return t % 60 === 0 ? (t > 0 ? "-" : "+") + Ne(Math.abs(t) / 60, 2) : zt(t, n); } function zt(t, n = "") { const e = t > 0 ? "-" : "+", o = Math.abs(t), a = Ne(Math.trunc(o / 60), 2), r = Ne(o % 60, 2); return e + a + n + r; } const go = (t, n) => { switch (t) { case "P": return n.date({ width: "short" }); case "PP": return n.date({ width: "medium" }); case "PPP": return n.date({ width: "long" }); case "PPPP": default: return n.date({ width: "full" }); } }, Vo = (t, n) => { switch (t) { case "p": return n.time({ width: "short" }); case "pp": return n.time({ width: "medium" }); case "ppp": return n.time({ width: "long" }); case "pppp": default: return n.time({ width: "full" }); } }, tl = (t, n) => { const e = t.match(/(P+)(p+)?/) || [], o = e[1], a = e[2]; if (!a) return go(t, n); let r; switch (o) { case "P": r = n.dateTime({ width: "short" }); break; case "PP": r = n.dateTime({ width: "medium" }); break; case "PPP": r = n.dateTime({ width: "long" }); break; case "PPPP": default: r = n.dateTime({ width: "full" }); break; } return r.replace("{{date}}", go(o, n)).replace("{{time}}", Vo(a, n)); }, Nn = { p: Vo, P: tl }, nl = /^D+$/, ol = /^Y+$/, al = ["D", "DD", "YY", "YYYY"]; function No(t) { return nl.test(t); } function Ho(t) { return ol.test(t); } function Hn(t, n, e) { const o = rl(t, n, e); if (console.warn(o), al.includes(t)) throw new RangeError(o); } function rl(t, n, e) { const o = t[0] === "Y" ? "years" : "days of the month"; return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${o} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`; } const il = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, sl = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, ll = /^'([^]*?)'?$/, ul = /''/g, cl = /[a-zA-Z]/; function bn(t, n, e) { var m, s, d, f; const o = nn(), a = o.locale ?? Io, r = o.firstWeekContainsDate ?? ((s = (m = o.locale) == null ? void 0 : m.options) == null ? void 0 : s.firstWeekContainsDate) ?? 1, i = o.weekStartsOn ?? ((f = (d = o.locale) == null ? void 0 : d.options) == null ? void 0 : f.weekStartsOn) ?? 0, l = tt(t); if (!Gn(l)) throw new RangeError("Invalid time value"); let u = n.match(sl).map((h) => { const k = h[0]; if (k === "p" || k === "P") { const w = Nn[k]; return w(h, a.formatLong); } return h; }).join("").match(il).map((h) => { if (h === "''") return { isToken: !1, value: "'" }; const k = h[0]; if (k === "'") return { isToken: !1, value: dl(h) }; if (po[k]) return { isToken: !0, value: h }; if (k.match(cl)) throw new RangeError( "Format string contains an unescaped latin alphabet character `" + k + "`" ); return { isToken: !1, value: h }; }); a.localize.preprocessor && (u = a.localize.preprocessor(l, u)); const c = { firstWeekContainsDate: r, weekStartsOn: i, locale: a }; return u.map((h) => { if (!h.isToken) return h.value; const k = h.value; (Ho(k) || No(k)) && Hn(k, n, String(t)); const w = po[k[0]]; return w(l, k, a.localize, c); }).join(""); } function dl(t) { const n = t.match(ll); return n ? n[1].replace(ul, "'") : t; } function fl() { return Object.assign({}, nn()); } function ml(t) { let e = tt(t).getDay(); return e === 0 && (e = 7), e; } function hl(t, n) { const e = n instanceof Date ? ze(n, 0) : new n(0); return e.setFullYear( t.getFullYear(), t.getMonth(), t.getDate() ), e.setHours( t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds() ), e; } const pl = 10; class Ro { constructor() { $(this, "subPriority", 0); } validate(n, e) { return !0; } } class vl extends Ro { constructor(n, e, o, a, r) { super(), this.value = n, this.validateValue = e, this.setValue = o, this.priority = a, r && (this.subPriority = r); } validate(n, e) { return this.validateValue(n, this.value, e); } set(n, e, o) { return this.setValue(n, e, this.value, o); } } class yl extends Ro { constructor() { super(...arguments); $(this, "priority", pl); $(this, "subPriority", -1); } set(e, o) { return o.timestampIsSet ? e : ze(e, hl(e, Date)); } } class De { run(n, e, o, a) { const r = this.parse(n, e, o, a); return r ? { setter: new vl( r.value, this.validate, this.set, this.priority, this.subPriority ), rest: r.rest } : null; } validate(n, e, o) { return !0; } } class gl extends De { constructor() { super(...arguments); $(this, "priority", 140); $(this, "incompatibleTokens", ["R", "u", "t", "T"]); } parse(e, o, a) { switch (o) { case "G": case "GG": case "GGG": return a.era(e, { width: "abbreviated" }) || a.era(e, { width: "narrow" }); case "GGGGG": return a.era(e, { width: "narrow" }); case "GGGG": default: return a.era(e, { width: "wide" }) || a.era(e, { width: "abbreviated" }) || a.era(e, { width: "narrow" }); } } set(e, o, a) { return o.era = a, e.setFullYear(a, 0, 1), e.setHours(0, 0, 0, 0), e; } } const Qe = { month: /^(1[0-2]|0?\d)/, // 0 to 12 date: /^(3[0-1]|[0-2]?\d)/, // 0 to 31 dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/, // 0 to 366 week: /^(5[0-3]|[0-4]?\d)/, // 0 to 53 hour23h: /^(2[0-3]|[0-1]?\d)/, // 0 to 23 hour24h: /^(2[0-4]|[0-1]?\d)/, // 0 to 24 hour11h: /^(1[0-1]|0?\d)/, // 0 to 11 hour12h: /^(1[0-2]|0?\d)/, // 0 to 12 minute: /^[0-5]?\d/, // 0 to 59 second: /^[0-5]?\d/, // 0 to 59 singleDigit: /^\d/, // 0 to 9 twoDigits: /^\d{1,2}/, // 0 to 99 threeDigits: /^\d{1,3}/, // 0 to 999 fourDigits: /^\d{1,4}/, // 0 to 9999 anyDigitsSigned: /^-?\d+/, singleDigitSigned: /^-?\d/, // 0 to 9, -0 to -9 twoDigitsSigned: /^-?\d{1,2}/, // 0 to 99, -0 to -99 threeDigitsSigned: /^-?\d{1,3}/, // 0 to 999, -0 to -999 fourDigitsSigned: /^-?\d{1,4}/ // 0 to 9999, -0 to -9999 }, Et = { basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/, basic: /^([+-])(\d{2})(\d{2})|Z/, basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/, extended: /^([+-])(\d{2}):(\d{2})|Z/, extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/ }; function Ke(t, n) { return t && { value: n(t.value), rest: t.rest }; } function qe(t, n) { const e = n.match(t); return e ? { value: parseInt(e[0], 10), rest: n.slice(e[0].length) } : null; } function Ft(t, n) { const e = n.match(t); if (!e) return null; if (e[0] === "Z") return { value: 0, rest: n.slice(1) }; const o = e[1] === "+" ? 1 : -1, a = e[2] ? parseInt(e[2], 10) : 0, r = e[3] ? parseInt(e[3], 10) : 0, i = e[5] ? parseInt(e[5], 10) : 0; return { value: o * (a * hs + r * ms + i * ps), rest: n.slice(e[0].length) }; } function Lo(t) { return qe(Qe.anyDigitsSigned, t); } function Ge(t, n) { switch (t) { case 1: return qe(Qe.singleDigit, n); case 2: return qe(Qe.twoDigits, n); case 3: return qe(Qe.threeDigits, n); case 4: return qe(Qe.fourDigits, n); default: return qe(new RegExp("^\\d{1," + t + "}"), n); } } function wn(t, n) { switch (t) { case 1: return qe(Qe.singleDigitSigned, n); case 2: return qe(Qe.twoDigitsSigned, n); case 3: return qe(Qe.threeDigitsSigned, n); case 4: return qe(Qe.fourDigitsSigned, n); default: return qe(new RegExp("^-?\\d{1," + t + "}"), n); } } function Xn(t) { switch (t) { case "morning": return 4; case "evening": return 17; case "pm": case "noon": case "afternoon": return 12; case "am": case "midnight": case "night": default: return 0; } } function Wo(t, n) { const e = n > 0, o = e ? n : 1 - n; let a; if (o <= 50) a = t || 100; else { const r = o + 50, i = Math.trunc(r / 100) * 100, l = t >= r % 100; a = t + i - (l ? 100 : 0); } return e ? a : 1 - a; } function $o(t) { return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0; } class bl extends De { constructor() { super(...arguments); $(this, "priority", 130); $(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]); } parse(e, o, a) { const r = (i) => ({ year: i, isTwoDigitYear: o === "yy" }); switch (o) { case "y": return Ke(Ge(4, e), r); case "yo": return Ke( a.ordinalNumber(e, { unit: "year" }), r ); default: return Ke(Ge(o.length, e), r); } } validate(e, o) { return o.isTwoDigitYear || o.year > 0; } set(e, o, a) { const r = e.getFullYear(); if (a.isTwoDigitYear) { const l = Wo( a.year, r ); return e.setFullYear(l, 0, 1), e.setHours(0, 0, 0, 0), e; } const i = !("era" in o) || o.era === 1 ? a.year : 1 - a.year; return e.setFullYear(i, 0, 1), e.setHours(0, 0, 0, 0), e; } } class wl extends De { constructor() { super(...arguments); $(this, "priority", 130); $(this, "incompatibleTokens", [ "y", "R", "u", "Q", "q", "M", "L", "I", "d", "D", "i", "t", "T" ]); } parse(e, o, a) { const r = (i) => ({ year: i, isTwoDigitYear: o === "YY" }); switch (o) { case "Y": return Ke(Ge(4, e), r); case "Yo": return Ke( a.ordinalNumber(e, { unit: "year" }), r ); default: return Ke(Ge(o.length, e), r); } } validate(e, o) { return o.isTwoDigitYear || o.year > 0; } set(e, o, a, r) { const i = Un(e, r); if (a.isTwoDigitYear) { const u = Wo( a.year, i ); return e.setFullYear( u, 0, r.firstWeekContainsDate ), e.setHours(0, 0, 0, 0), At(e, r); } const l = !("era" in o) || o.era === 1 ? a.year : 1 - a.year; return e.setFullYear(l, 0, r.firstWeekContainsDate), e.setHours(0, 0, 0, 0), At(e, r); } } class Cl extends De { constructor() { super(...arguments); $(this, "priority", 130); $(this, "incompatibleTokens", [ "G", "y", "Y", "u", "Q", "q", "M", "L", "w", "d", "D", "e", "c", "t", "T" ]); } parse(e, o) { return wn(o === "R" ? 4 : o.length, e); } set(e, o, a) { const r = ze(e, 0); return r.setFullYear(a, 0, 4), r.setHours(0, 0, 0, 0), en(r); } } class xl extends De { constructor() { super(...arguments); $(this, "priority", 130); $(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]); } parse(e, o) { return wn(o === "u" ? 4 : o.length, e); } set(e, o, a) { return e.setFullYear(a, 0, 1), e.setHours(0, 0, 0, 0), e; } } class Ml extends De { constructor() { super(...arguments); $(this, "priority", 120); $(this, "incompatibleTokens", [ "Y", "R", "q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T" ]); } parse(e, o, a) { switch (o) { case "Q": case "QQ": return Ge(o.length, e); case "Qo": return a.ordinalNumber(e, { unit: "quarter" }); case "QQQ": return a.quarter(e, { width: "abbreviated", context: "formatting" }) || a.quarter(e, { width: "narrow", context: "formatting" }); case "QQQQQ": return a.quarter(e, { width: "narrow", context: "formatting" }); case "QQQQ": default: return a.quarter(e, { width: "wide", context: "formatting" }) || a.quarter(e, { width: "abbreviated", context: "formatting" }) || a.quarter(e, { width: "narrow", context: "formatting" }); } } validate(e, o) { return o >= 1 && o <= 4; } set(e, o, a) { return e.setMonth((a - 1) * 3, 1), e.setHours(0, 0, 0, 0), e; } } class Tl extends De { constructor() { super(...arguments); $(this, "priority", 120); $(this, "incompatibleTokens", [ "Y", "R", "Q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T" ]); } parse(e, o, a) { switch (o) { case "q": case "qq": return Ge(o.length, e); case "qo": return a.ordinalNumber(e, { unit: "quarter" }); case "qqq": return a.quarter(e, { width: "abbreviated", context: "standalone" }) || a.quarter(e, { width: "narrow", context: "standalone" }); case "qqqqq": return a.quarter(e, { width: "narrow", context: "standalone" }); case "qqqq": default: return a.quarter(e, { width: "wide", context: "standalone" }) || a.quarter(e, { width: "abbreviated", context: "standalone" }) || a.quarter(e, { width: "narrow", context: "standalone" }); } } validate(e, o) { return o >= 1 && o <= 4; } set(e, o, a) { return e.setMonth((a - 1) * 3, 1), e.setHours(0, 0, 0, 0), e; } } class kl extends De { constructor() { super(...arguments); $(this, "incompatibleTokens", [ "Y", "R", "q", "Q", "L", "w", "I", "D", "i", "e", "c", "t", "T" ]); $(this, "priority", 110); } parse(e, o, a) { const r = (i) => i - 1; switch (o) { case "M": return Ke( qe(Qe.month, e), r ); case "MM": return Ke(Ge(2, e), r); case "Mo": return Ke( a.ordinalNumber(e, { unit: "month" }), r ); case "MMM": return a.month(e, { width: "abbreviated", context: "formatting" }) || a.month(e, { width: "narrow", context: "formatting" }); case "MMMMM": return a.month(e, { width: "narrow", context: "formatting" }); case "MMMM": default: return a.month(e, { width: "wide", context: "formatting" }) || a.month(e, { width: "abbreviated", context: "formatting" }) || a.month(e, { width: "narrow", context: "formatting" }); } } validate(e, o) { return o >= 0 && o <= 11; } set(e, o, a) { return e.setMonth(a, 1), e.setHours(0, 0, 0, 0), e; } } class Sl extends De { constructor() { super(...arguments); $(this, "priority", 110); $(this, "incompatibleTokens", [ "Y", "