UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,578 lines 2.6 MB
var gw = Object.defineProperty; var hw = (e, t, n) => t in e ? gw(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var Q = (e, t, n) => hw(e, typeof t != "symbol" ? t + "" : t, n); import { ref as y, computed as $, watch as K, onUnmounted as Rt, defineComponent as ae, provide as Ct, createVNode as r, inject as se, onMounted as ye, Fragment as et, reactive as Ft, createApp as fi, Transition as ti, mergeProps as $t, nextTick as ot, Teleport as ta, withDirectives as xt, vShow as Qn, resolveComponent as Fn, isVNode as ao, onBeforeMount as bn, shallowRef as Ka, render as As, h as yw, cloneVNode as bw, createTextVNode as re, onUpdated as nc, onBeforeUnmount as Ra, withModifiers as Tt, vModelText as Zn, resolveDirective as jn, Comment as Cw, getCurrentInstance as gm, watchEffect as ww, toRaw as Sw, vModelCheckbox as oc, toRefs as pi, triggerRef as xw } from "vue"; import { cloneDeep as Pe, isPlainObject as Nf, isUndefined as Wn, debounce as rl, flatten as kw, isNaN as Tw, throttle as hm, get as wa, isEmpty as Fw, merge as Qo, findIndex as Rf, mergeWith as Lf } from "lodash-es"; import ht from "bignumber.js"; import { useI18n as wt, createI18n as Mw } from "vue-i18n"; import { useResizeObserver as sl } from "@vueuse/core"; function ym(e, t) { let n; function o(f) { const { properties: d, title: m, ignore: v } = f, g = v && Array.isArray(v), h = Object.keys(d).reduce((C, b) => ((!g || !v.find((S) => S === b)) && (C[b] = d[b].type === "object" && d[b].properties ? o(d[b]) : Pe(d[b].default)), C), {}); if (m && (!g || !v.find((C) => C === "id"))) { const C = m.toLowerCase().replace(/-/g, "_"); h.id = `${C}_${Math.random().toString().slice(2, 6)}`; } return h; } function a(f) { const { properties: d, title: m, required: v } = f; if (v && Array.isArray(v)) { const g = v.reduce((h, C) => (h[C] = d[C].type === "object" && d[C].properties ? o(d[C]) : Pe(d[C].default), h), {}); if (m && v.find((h) => h === "id")) { const h = m.toLowerCase().replace(/-/g, "_"); g.id = `${h}_${Math.random().toString().slice(2, 6)}`; } return g; } return { type: m }; } function i(f, d = {}, m) { const v = e[f]; if (v) { let g = a(v); const h = t[f]; return g = h ? h({ getSchemaByType: i }, g, d, m) : g, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(g), g; } return null; } function l(f, d) { const m = o(d); return Object.keys(m).reduce((v, g) => (Object.prototype.hasOwnProperty.call(f, g) && (v[g] && Nf(v[g]) && Nf(f[g] || !f[g]) ? Object.assign(v[g], f[g] || {}) : v[g] = f[g]), v), m), m; } function s(f, d) { return Object.keys(f).filter((v) => f[v] != null).reduce((v, g) => { if (d.has(g)) { const h = d.get(g); if (typeof h == "string") v[h] = f[g]; else { const C = h(g, f[g], f); Object.assign(v, C); } } else v[g] = f[g]; return v; }, {}); } function u(f, d, m = /* @__PURE__ */ new Map()) { const v = l(f, d); return s(v, m); } function c(f) { var m; const d = f.type; if (d) { const v = e[d]; if (!v) return f; const g = l(f, v), h = ((m = f.editor) == null ? void 0 : m.type) || ""; if (h) { const C = e[h], b = l(f.editor, C); g.editor = b; } return g; } return f; } function p(f) { n = f; } return { getSchemaByType: i, resolveSchemaWithDefaultValue: c, resolveSchemaToProps: u, mappingSchemaToProps: s, setDesignerContext: p }; } const mi = {}, bm = {}, { getSchemaByType: no, resolveSchemaWithDefaultValue: Iw, resolveSchemaToProps: Pw, mappingSchemaToProps: Ew, setDesignerContext: Bw } = ym(mi, bm); function Ow(e = {}) { function t(c, p, f, d) { if (typeof f == "number") return d[c].length === f; if (typeof f == "object") { const m = Object.keys(f)[0], v = f[m]; if (m === "not") return Number(d[c].length) !== Number(v); if (m === "moreThan") return Number(d[c].length) >= Number(v); if (m === "lessThan") return Number(d[c].length) <= Number(v); } return !1; } function n(c, p, f, d) { return d[c] && d[c].propertyValue && String(d[c].propertyValue.value) === String(f); } const o = /* @__PURE__ */ new Map([ ["length", t], ["getProperty", n] ]); Object.keys(e).reduce((c, p) => (c.set(p, e[p]), c), o); function a(c, p) { const f = c; return typeof p == "number" ? [{ target: f, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: f, operator: "getProperty", param: c, value: !!p }] : typeof p == "object" ? Object.keys(p).map((d) => { if (d === "length") return { target: f, operator: "length", param: null, value: p[d] }; const m = d, v = p[d]; return { target: f, operator: "getProperty", param: m, value: v }; }) : []; } function i(c) { return Object.keys(c).reduce((f, d) => { const m = a(d, c[d]); return f.push(...m), f; }, []); } function l(c, p) { if (o.has(c.operator)) { const f = o.get(c.operator); return f && f(c.target, c.param, c.value, p) || !1; } return !1; } function s(c, p) { return i(c).reduce((m, v) => m && l(v, p), !0); } function u(c, p) { const f = Object.keys(c), d = f.includes("allOf"), m = f.includes("anyOf"), v = d || m, C = (v ? c[v ? d ? "allOf" : "anyOf" : "allOf"] : [c]).map((S) => s(S, p)); return d ? !C.includes(!1) : C.includes(!0); } return { parseValueSchema: u }; } const Dw = { convertTo: (e, t, n, o) => { e.appearance || (e.appearance = {}), e.appearance[t] = n; }, convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t] }, Vw = { convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无" }, Aw = { convertTo: (e, t, n, o) => { e.editor && (e.editor[t] = n); }, convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t] }, he = { button: { type: "button", name: "按钮" }, "response-toolbar": { type: "response-toolbar", name: "工具栏" }, "response-toolbar-item": { type: "response-toolbar-item", name: "按钮" }, "content-container": { type: "content-container", name: "容器" }, "input-group": { type: "input-group", name: "文本" }, textarea: { type: "textarea", name: "多行文本" }, lookup: { type: "lookup", name: "帮助" }, "number-spinner": { type: "number-spinner", name: "数值" }, "date-picker": { type: "date-picker", name: "日期" }, switch: { type: "switch", name: "开关" }, "radio-group": { type: "radio-group", name: "单选组" }, "check-box": { type: "check-box", name: "复选框" }, "check-group": { type: "check-group", name: "复选框组" }, "combo-list": { type: "combo-list", name: "下拉列表" }, "response-form": { type: "response-form", name: "卡片面板" }, "response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" }, "response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" }, "tree-grid": { type: "tree-grid", name: "树表格" }, "tree-grid-column": { type: "tree-grid-column", name: "树表格列" }, "data-grid": { type: "data-grid", name: "表格" }, "data-grid-column": { type: "data-grid-column", name: "表格列" }, module: { type: "Module", name: "模块" }, component: { type: "component", name: "组件" }, tabs: { type: "tabs", name: "标签页" }, "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" }, "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" }, "html-template": { type: "html-template", name: "模板容器" }, "time-picker": { type: "time-picker", name: "时间选择" }, section: { type: "section", name: "分组面板" }, "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" }, "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" }, splitter: { type: "splitter", name: "分栏面板" }, "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" }, "component-ref": { type: "component-ref", name: "组件引用节点" }, uploader: { type: "uploader", name: "附件上传" }, "page-header": { type: "page-header", name: "页头" }, "page-footer": { type: "page-footer", name: "页脚" }, "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" }, fieldset: { type: "fieldset", name: "分组" }, "query-solution": { type: "query-solution", name: "筛选方案" }, drawer: { type: "drawer", name: "抽屉" }, "external-container": { type: "external-container", name: "外部容器", icon: "content-container" }, "list-nav": { type: "list-nav", name: "列表导航" }, "list-view": { type: "list-view", name: "列表" }, "filter-bar": { type: "filter-bar", name: "筛选条" }, "language-textbox": { type: "language-textbox", name: "多语输入框" } }, $w = { convertFrom: (e, t, n) => { var a; const o = e.editor && e.editor[t] ? e.editor[t] : e[t]; return ((a = he[o]) == null ? void 0 : a.name) || o; } }, Nw = { convertTo: (e, t, n, o) => { e[t] = e[t]; }, convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : "" }, Rw = { convertTo: (e, t, n, o) => { (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = n : e.formatter = { [t]: n }); }, convertFrom: (e, t, n) => { if (e.formatter) { if (t === "trueText") return e.formatter.trueText; if (t === "falseText") return e.formatter.falseText; if (t === "prefix") return e.formatter.prefix; if (t === "suffix") return e.formatter.suffix; if (t === "precision") return e.formatter.precision; if (t === "decimal") return e.formatter.decimal; if (t === "thousand") return e.formatter.thousand; if (t === "tempDateFormat") return e.formatter.dateFormat === "yyyy年MM月dd日" ? "yearMonthDay" : e.formatter.dateFormat === "yyyy-MM-dd HH:mm:ss" ? "yyyy-MM-ddTHH:mm:ss" : e.formatter.dateFormat === "yyyy/MM/dd HH:mm:ss" ? "yyyy/MM/ddTHH:mm:ss" : e.formatter.dateFormat === "yyyy年MM月dd日 HH时mm分ss秒" ? "yearMonthDayHourMinuteSecond" : e.formatter.tempDateFormat || e.formatter.dateFormat || "yyyy-MM-dd"; if (t === "customFormat") return e.formatter.customFormat; if (t === "type") return e.formatter.type || "none"; } return "none"; } }, Lw = { convertTo: (e, t, n, o) => { e.command ? e.command[t] = n : e.command = { [t]: n }, t === "enable" && n && (e.command.commands || (e.command.commands = [ { text: "编辑", type: "primary", command: "edit" }, { text: "删除", type: "danger", command: "remove" } ])); }, convertFrom: (e, t, n) => e.command && t === "enable" ? e.command.enable : "" }, jw = { convertTo: (e, t, n, o) => { e.column ? e.column[t] = n : e.column = { [t]: n }, t === "fitColumns" && n && (e.column.fitMode || (e.column.fitMode = "average")); }, convertFrom: (e, t, n) => { if (e.column) { if (t === "fitColumns") return e.column.fitColumns; if (t === "fitMode") return e.column.fitMode; } return ""; } }, _w = { convertTo: (e, t, n, o) => { e.summary ? e.summary[t] = n : e.summary = { [t]: n }, t === "enable" && n && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = { enable: n, groupFields: [] }); }, convertFrom: (e, t, n) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : "" }, Hw = { convertTo: (e, t, n, o) => { e.group ? e.group[t] = n : e.group = { [t]: n }, t === "enable" && n && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = { enable: n, groupFields: [], showSummary: !1 }); }, convertFrom: (e, t, n) => { if (e.group) { if (t === "enable") return e.group.enable; if (t === "showSummary") return e.group.showSummary; } } }, Ww = { convertFrom: (e, t) => e.binding ? e.binding.path : "", convertTo: (e, t, n) => { if (n && n.length > 0) { const o = n[0]; e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = o.bindingField, e.binding.field = o.id, e.binding.fullPath = o.path, e.path = o.bindingPath; } } }, zw = { convertTo: (e, t, n, o) => { e.pagination || (e.pagination = {}), e.pagination[t] = n; }, convertFrom: (e, t, n) => e.pagination ? e.pagination[t] : e[t] }, qw = { convertTo: (e, t, n, o) => { e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n; }, convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t] }, Uw = { convertTo: (e, t, n, o) => { e.selection || (e.selection = {}), e.selection[t] = n; }, convertFrom: (e, t, n) => e.selection ? e.selection[t] : e[t] }, Gw = { convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : "" }, Yw = { convertFrom: (e, t) => e[t] || "", convertTo: (e, t, n) => { e[t] = n; } }, Qw = { convertTo: (e, t, n, o) => { e.size || (e.size = {}), e.size[t] = n; }, convertFrom: (e, t, n) => e.size ? e.size[t] : e[t] }, Xw = { convertFrom: (e, t, n) => { var o, a; return (o = e.formatter) != null && o.data && t === "formatterEnumData" && !e.formatterEnumData ? (a = e.formatter) == null ? void 0 : a.data : e.formatterEnumData; } }, Kw = { convertTo: (e, t, n, o) => { e.sort || (e.sort = {}), e.sort[t] = n; }, convertFrom: (e, t, n) => { var o, a; if (t === "mode") return ((o = e.sort) == null ? void 0 : o.mode) || "client"; if (t === "multiSort") return !!((a = e.sort) != null && a.multiSort); } }, Jw = { convertTo: (e, t, n, o) => { e.filter || (e.filter = {}), e.filter[t] = n; }, convertFrom: (e, t, n) => { var o; if (t === "mode") return ((o = e.filter) == null ? void 0 : o.mode) || "client"; } }, Zw = { convertTo: (e, t, n, o) => { e.rowOption ? e.rowOption[t] = n : e.rowOption = { [t]: n }; }, convertFrom: (e, t, n) => { if (e.rowOption) { if (t === "customRowStyle") return e.rowOption.customRowStyle; if (t === "customCellStyle") return e.rowOption.customCellStyle; } return ""; } }; function Cm(e, t, n) { const o = /* @__PURE__ */ new Map([ ["/converter/appearance.converter", Dw], ["/converter/buttons.converter", Vw], ["/converter/property-editor.converter", Aw], ["/converter/items-count.converter", Gw], ["/converter/type.converter", $w], ["/converter/change-editor.converter", Nw], ["/converter/change-formatter.converter", Rw], ["/converter/column-command.converter", Lw], ["/converter/column-option.converter", jw], ["/converter/summary.converter", _w], ["/converter/group.converter", Hw], ["/converter/form-group-label.converter", Yw], ["/converter/field-selector.converter", Ww], ["/converter/pagination.converter", zw], ["/converter/row-number.converter", qw], ["/converter/grid-selection.converter", Uw], ["/converter/size.converter", Qw], ["/converter/change-formatter-enum.converter", Xw], ["/converter/grid-sort.converter", Kw], ["/converter/grid-filter.converter", Jw], ["/converter/row-option.converter", Zw] ]), a = /* @__PURE__ */ new Map([ ["string", { type: "input-group", enableClear: !1 }], ["boolean", { type: "combo-list", textField: "name", valueField: "value", idField: "value", enableClear: !1, editable: !1, data: [ { value: !0, name: "是" }, { value: !1, name: "否" } ] }], ["enum", { type: "combo-list", maxHeight: 128, enableClear: !1, editable: !1 }], ["array", { type: "button-edit" }], ["number", { type: "number-spinner", placeholder: "" }], ["events-editor", { type: "events-editor", hide: !0 }] ]), i = Ow(); function l(v, g) { return () => i.parseValueSchema(v, g); } function s(v, g, h) { return v.includes("visible") && g.visible !== void 0 ? typeof g.visible == "boolean" ? () => !!g.visible : g.visible === void 0 ? !0 : l(g.visible, h) : () => !0; } function u(v, g, h) { return v.includes("readonly") && g.readonly !== void 0 ? typeof g.readonly == "boolean" ? () => !!g.readonly : l(g.readonly, h) : () => !1; } function c(v, g) { const h = v.$converter || g; return typeof h == "string" && h && o.has(h) ? o.get(h) || null : h || null; } function p(v, g, h, C, b, S = "", w = "") { return Object.keys(v).map((k) => { const T = y(1), x = k, M = v[k], I = Object.keys(M), E = M.title, V = M.type, O = a.get(V) || { type: "input-group", enableClear: !1 }, P = M.editor ? Object.assign({}, O, M.editor) : Object.assign({}, O), D = s(I, M, g), B = u(I, M, g); P.readonly = P.readonly === void 0 ? B() : P.readonly; const A = M.type === "cascade" ? p(M.properties, g, h, C, b, S, w) : [], N = !0; let R = c(M, w); const j = $({ get() { if (T.value) { if (["class", "style"].find((G) => G === x) && !R && (R = o.get("/converter/appearance.converter") || null), R && R.convertFrom) return R.convertFrom(h, k, b, S); const J = h[k]; return Object.prototype.hasOwnProperty.call(M, "defaultValue") && (J === void 0 || typeof J == "string" && J === "") ? M.type === "boolean" ? M.defaultValue : M.defaultValue || "" : J; } return null; }, set(J) { T.value += 1, R && R.convertTo ? (R.convertTo(C, k, J, b, S), R.convertTo(h, k, J, b, S)) : (C[k] = J, h[k] = J); } }), { refreshPanelAfterChanged: L, description: H, isExpand: _, parentPropertyID: q } = M, U = { propertyID: x, propertyName: E, propertyType: V, propertyValue: j, editor: P, visible: D, readonly: B, cascadeConfig: A, hideCascadeTitle: N, refreshPanelAfterChanged: L, description: H, isExpand: _, parentPropertyID: q }; return g[x] = U, U; }); } function f(v, g, h = {}) { const C = {}, b = e[v]; return b && b.categories ? Object.keys(b.categories).map((w) => { const F = b.categories[w], k = F == null ? void 0 : F.title, T = p(F.properties || {}, C, {}, h, g); return { categoryId: w, categoryName: k, properties: T }; }) : []; } function d(v, g, h, C, b = "") { const S = g.$ref.schema, w = g.$ref.converter, F = h[S], k = F.type, T = n(F), x = {}, M = e[k]; if (M && M.categories) { const I = M.categories[v], E = I == null ? void 0 : I.title; w && Object.keys(I.properties).forEach((P) => { I.properties[P].$converter = w; }); const V = (I == null ? void 0 : I.properties) || {}, O = p(V, x, T, F, C, b); return { categoryId: v, categoryName: E, properties: O }; } return { categoryId: v, categoryName: "", properties: [] }; } function m(v, g, h, C, b) { const S = v.type, w = n(v), F = {}; let k = b || e[S]; if (k && Object.keys(k).length === 0 && h && h.getPropConfig && (k = h.getPropConfig(C)), k && k.categories) { const T = []; return Object.keys(k.categories).map((x) => { const M = k.categories[x]; if (M.$ref) { T.push(d(x, M, v, g, C)); return; } const I = M == null ? void 0 : M.title, E = M == null ? void 0 : M.tabId, V = M == null ? void 0 : M.tabName, O = M == null ? void 0 : M.hide, P = M == null ? void 0 : M.hideTitle, D = p(M.properties || {}, F, w, v, g, C, M.$converter), { setPropertyRelates: B } = M, A = M == null ? void 0 : M.parentPropertyID; T.push({ categoryId: x, categoryName: I, tabId: E, tabName: V, hide: O, properties: D, hideTitle: P, setPropertyRelates: B, parentPropertyID: A }); }), T; } return []; } return { getPropertyConfigBySchema: m, getPropertyConfigByType: f, propertyConverterMap: o }; } const wm = {}, Sm = {}; Cm(wm, Sm, Iw); const ac = {}, ic = {}, { getSchemaByType: ul, resolveSchemaWithDefaultValue: e0, resolveSchemaToProps: FK, mappingSchemaToProps: MK, setDesignerContext: t0 } = ym(ac, ic), jr = {}, lc = {}, { getPropertyConfigBySchema: $s, getPropertyConfigByType: IK, propertyConverterMap: PK } = Cm(jr, lc, e0); function Re(e, t, n = /* @__PURE__ */ new Map(), o = (l, s, u, c) => s, a = {}, i = (l) => l) { return mi[t.title] = t, bm[t.title] = o, wm[t.title] = a, Sm[t.title] = i, ac[t.title] = t, ic[t.title] = o, jr[t.title] = a, lc[t.title] = i, (l = {}, s = !0) => { if (!s) return Ew(l, n); const u = Pw(l, t, n), c = Object.keys(e).reduce((p, f) => (p[f] = e[f].default, p), {}); return Object.assign(c, u); }; } function Ze(e, t) { return { customClass: t.class, customStyle: t.style }; } function n0(e, t) { var o, a; const n = {}; if (t != null && t.buttons) { const i = []; (o = t == null ? void 0 : t.buttons) == null || o.map((l) => { const s = {}; Object.keys(l).map((u) => { var c; u === "appearance" ? s.class = ((c = l[u]) == null ? void 0 : c.class) || "" : s[u] = l[u]; }), i.push(s); }), n.buttons = i; } return (a = t == null ? void 0 : t.appearance) != null && a.class && (n.buttonClass = t.appearance.class || "col-6"), t != null && t.id && (n.toolbarId = t.id), t && Object.prototype.hasOwnProperty.call(t, "visible") && (n.buttonsVisible = t.visible), n; } function o0() { function e(t, n) { const { id: o } = t || {}; if (t.binding === void 0) return {}; if (t.binding && Object.keys(t.binding).length < 1) return {}; const { field: a } = t.binding || {}; return { modelValue: n.getValue(o), "onUpdate:modelValue": (i) => { n.setValue(o, a, i); } }; } return { resolve: e }; } function xm() { function e(t, n) { const { id: o } = t || {}, { dataSource: a } = t || {}; return a === void 0 ? {} : { data: n.getValue(o), "onUpdate:data": (...i) => { } }; } return { resolve: e }; } function a0() { function e(t, n) { const { dataSource: o } = t || {}; return o === void 0 ? {} : {}; } return { resolve: e }; } function EK() { function e(t, n) { const { path: o } = t.binding || {}; return o ? { "onUpdate:dataMapping": (...a) => { } } : {}; } return { resolve: e }; } function i0() { return (e, t, n) => { const o = t.id, { type: a } = t, i = e.emits; return i ? i.filter((l) => l !== "update:modelValue").reduce((l, s) => { const u = `on${s.charAt(0).toUpperCase()}${s.slice(1)}`; return l[u] = (...c) => { n.dispatch(o, s, a, c); }, l; }, {}) : {}; }; } function l0() { function e(t, n) { return t.selectItemById(n); } return { selectItemById: e }; } function r0() { function e(t, n) { return t.selectItemById(n); } return { selectItemById: e }; } function s0() { function e(t) { return t.editor; } return { resolve: e }; } function BK() { function e(t) { return Object.prototype.hasOwnProperty.call(t, "visible") ? t.visible : null; } return { resolve: e }; } function _r(e, t) { if (!e || e.length < 1) return null; for (const n of e) { if (n.id === t) return n; if (n.children) { const o = n.children.find((a) => a.id === t); if (o) return o; } } return null; } function OK() { function e(t, n) { const { name: o } = n; return t[`on${o.charAt(0).toUpperCase()}${o.slice(1)}`] || t[o]; } return { resolve: e }; } function u0() { function e(t, n) { var s; const o = (s = t.toolbar) == null ? void 0 : s.buttons; if (!o || o.length < 1) return null; const [a, i] = n.payloads, l = _r(o, i); return l ? l.onClick || l.click : null; } return { resolve: e }; } function c0() { function e(t, n) { const { name: o } = n, [a, i] = n.payloads; if (o === "tabChange" || o === "tabRemove") return t[`on${o.charAt(0).toUpperCase()}${o.slice(1)}`]; const l = t.contents; if (!l || l.length < 1) return null; const s = l.reduce((c, p) => { const f = p.toolbar && p.toolbar.buttons || []; return c.push(...f), c; }, []); if (!s || s.length < 1) return; const u = _r(s, i); return u ? u.onClick || u.click : null; } return { resolve: e }; } function d0() { function e(t, n) { const o = t.buttons; if (!o || o.length < 1) return null; const [a, i] = n.payloads, l = _r(o, i); return l ? l.onClick || l.click : null; } return { resolve: e }; } function f0() { function e(t, n) { var s; const o = (s = t.toolbar) == null ? void 0 : s.buttons; if (!o || o.length < 1) return null; const [a, i] = n.payloads, l = _r(o, i); return l ? l.onClick || l.click : null; } return { resolve: e }; } function km() { function e(t, n) { const { columns: o } = n; return t.updateColumns(o); } return { updateColumns: e }; } const Tm = /* @__PURE__ */ new Map([ ["appearance", Ze], ["size", (e, t) => { const n = {}; return t.width && (n.width = Number(t.width)), t.height && (n.height = Number(t.height)), n; }] ]), p0 = "https://json-schema.org/draft/2020-12/schema", m0 = "https://farris-design.gitee.io/accordion.schema.json", v0 = "accordion", g0 = "A Farris Container Component", h0 = "object", y0 = { id: { description: "The unique identifier for a Accordion", type: "string" }, type: { description: "The type string of Accordion component", type: "string", default: "accordion" }, appearance: { description: "", type: "object", properties: { class: { type: "string" }, style: { type: "string" } }, default: {} }, contents: { description: "", type: "array", default: [] }, customClass: { description: "", type: "string", default: "" }, size: { description: "", type: "object", properties: { width: { type: "number" }, height: { type: "number" } }, default: null }, enableFold: { description: "", type: "boolean", default: !0 }, expanded: { description: "", type: "boolean", default: !1 } }, b0 = [ "id", "type", "contents" ], C0 = { $schema: p0, $id: m0, title: v0, description: g0, type: h0, properties: y0, required: b0 }; function w0(e, t, n) { return t; } const S0 = "accordion", x0 = "A Farris Component", k0 = "object", T0 = { basic: { description: "Basic Infomation", title: "基本信息", properties: { id: { description: "组件标识", title: "标识", type: "string", readonly: !0 }, type: { description: "组件类型", title: "控件类型", type: "select", editor: { type: "waiting for modification", enum: [] } } } } }, F0 = { title: S0, description: x0, type: k0, categories: T0 }, rc = { customClass: { type: String, default: "" }, enableFold: { type: Boolean, default: !0 }, expanded: { type: Boolean, default: !1 }, height: { type: Number }, width: { type: Number } }, Fm = Re(rc, C0, Tm, w0, F0); function Mm(e) { const t = e.nativeElement ? e.nativeElement : e; return t.classList !== void 0 && t.classList !== null ? t : null; } function Im(e, t) { if (t === void 0) return; const n = Mm(e); n && n.classList.remove(t); } function Tu(e, t) { if (t === void 0) return; const n = Mm(e); n && n.classList.add(t); } const M0 = [ { size: "sm", width: 576, pattern: /\b(col-|col-sm-)\d+\b/ }, { size: "md", width: 768, pattern: /\bcol-md-\d+\b/ }, { size: "lg", width: 888, pattern: /\bcol-lg-\d+\b/ }, { size: "xl", width: 1200, pattern: /\bcol-xl-\d+\b/ }, { size: "el", width: 1690, pattern: /\bcol-el-\d+\b/ } ]; function Pm(e) { e.resizeObserver && (e.resizeObserver.disconnect(), e.sharedObject = null); } function Em(e, t, n = 0) { const o = []; if (!t) return; const a = n || t.getBoundingClientRect().width, i = parseFloat(a), l = e.breakPoints; for (let s = 0; s < l.length; s++) l[s].width <= i && o.push(l[s].size); if (e.className.join(",") !== o.join(",")) { if (e.className.length - o.length > 0) for (let u = o.length; u < e.className.length; u++) Im(t, "f-area-response--" + e.className[u]); else for (let u = e.className.length; u < o.length; u++) Tu(t, "f-area-response--" + o[u]); e.className = [...o]; } } function I0(e, t) { e.enable && e.autoWidth ? e.resizeObserver || (e.resizeObserver = new ResizeObserver((n) => { if (!n || n.length < 1 || !n[0].contentRect) return; const o = n[0].contentRect; Math.abs(parseInt(o.width + "") - e.width) > e.threshold && (Em(e, t, o.width), e.width = parseInt(o.width + "")); }), e.resizeObserver.observe(t)) : Pm(e); } function jf(e, t) { if (e.enable) Tu(t, "f-area-response"), Em(e, t); else { Im(t, "f-area-response"); for (let n = e.className.length; n > 0; n--) Tu(t, "f-area-response--" + e.className[n]); e.className = []; } I0(e, t); } function P0(e) { const t = []; return M0.map((n) => { const o = "col-" + n.size + "-"; if (e.querySelectorAll('[class*="' + o + '"]').length > 0) t.push({ size: n.size, width: n.width }); else if (n.size === "sm") { const i = e.querySelectorAll('[class*="col-"]'); Array.from(i).some((s) => s.className.match(n.pattern)) && t.push({ size: n.size, width: n.width }); } }), t; } function _f(e, t, n) { t.value && Object.prototype.hasOwnProperty.call(t.value, "enable") && (e.enable = t.value.enable), t.value && Object.prototype.hasOwnProperty.call(t.value, "autoWidth") && (e.autoWidth = t.value.autoWidth), e.breakPoints = P0(n); } const Ri = { // 在绑定元素的父组件 // 及他自己的所有子节点都挂载完成后调用 mounted: (e, t, n) => { n.sharedObject = { className: [], resizeObserver: null, enable: !0, autoWidth: !0, threshold: 10, width: 0, breakPoints: [] }, _f(n.sharedObject, t, e), jf(n.sharedObject, e); }, // 在绑定元素的父组件 // 及他自己的所有子节点都更新后调用 updated: function(e, t, n, o) { n.sharedObject = o.sharedObject, _f(n.sharedObject, t, e), jf(n.sharedObject, e); }, // 绑定元素的父组件卸载前调用 beforeUnmount(e, t, n) { Pm(n.sharedObject); } }; function Bm(e, t, n, o, a) { const i = y(e.disabled), l = y(!1), s = y("text"), u = y(e.showBorder), c = y(e.textAlign), p = y(e.updateOn), f = y(!1), d = $(() => e.editable || !e.readonly && !e.disabled), m = $(() => e.editable && !e.disabled && !e.readonly), v = $(() => !e.disabled && !e.readonly && l.value), g = $(() => n.value === "" || n.value === null || n.value === void 0), h = $(() => (e.disabled || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), C = $(() => e.readonly || !e.editable), b = $(() => e.enableTitle ? n.value : ""), S = $(() => ({ "form-control": !0, "f-utils-fill": !0, "text-left": c.value === "left", "text-center": c.value === "center", "text-right": c.value === "right" })), w = $(() => { const B = { "f-cmp-inputgroup": !0, "input-group": !0, "f-state-disabled": i.value, "f-state-editable": m.value, "f-state-readonly": C.value, "f-state-focus": v.value, "input-group--has-clear": e.enableClear && f.value }; return (e.customClass || "").split(" ").reduce((N, R) => (N[R] = !0, N), B), B; }), F = $(() => u.value ? "" : "border-width : 0 "); function k(B, A = !0) { n.value = B, o.value !== B && (o.value = B), A && t.emit("change", B), t.emit("update:modelValue", B), t.emit("update:value", B); } K( () => e.modelValue, (B, A) => { B !== A && (n.value = B, o.value = B); } ), K(() => e.disabled, (B, A) => { B !== A && (i.value = B); }); function T(B) { return B.stopPropagation(), l.value = !1, t.emit("blur", B), B.target.tagName === "TEXTAREA" && (t.emit("update:modelValue", B.target.value), t.emit("update:value", B.target.value), t.emit("change", B.target.value)), !1; } function x(B) { t.emit("click", B); } function M(B) { i.value || C.value || (u.value && (l.value = !0), d.value && t.emit("focus", B)); } function I(B) { t.emit("input", B.target.value, B); const A = B.target.value; o.value = A, p.value === "change" && (t.emit("update:modelValue", A), t.emit("update:value", A), t.emit("change", A)); } function E(B) { t.emit("keydown", B); } function V(B) { t.emit("keyup", B); } function O(B) { const A = B.target; A.tagName !== "INPUT" && A.tagName !== "TEXTAREA" && B.preventDefault(), B.stopPropagation(), t.emit("mousedownEvent", B); } function P(B) { t.emit("mouseupEvent", B); } function D(B) { if (p.value === "blur") { const A = B.target.value; B.stopPropagation(), k(A); } } return { changeTextBoxValue: k, disabled: i, displayText: o, editable: m, hasFocused: v, inputGroupClass: w, inputType: s, isEmpty: g, modelValue: n, readonly: C, onBlur: T, hasClearClass: f, onClick: x, onFocus: M, onInput: I, onKeydown: E, onKeyup: V, onMousedown: O, onMouseup: P, onTextBoxValueChange: D, placeholder: h, textBoxClass: S, textBoxTitle: b, inputGroupStyle: F }; } function E0(e, t, n, o) { const a = y(e.disabled), i = y(!1), l = y("text"), s = y(e.showBorder), u = y(e.textAlign); $(() => e.editable || !e.readonly); const c = $(() => e.editable && !e.disabled && !e.readonly), p = $(() => !e.disabled && i.value), f = $(() => n.value === "" || n.value === null || n.value === void 0), d = $(() => e.placeholder), m = $(() => e.readonly || !e.editable), v = $(() => e.enableTitle ? n.value : ""), g = $(() => ({ "form-control": !0, // 'f-utils-fill': true, "text-left": u.value === "left", "text-center": u.value === "center", "text-right": u.value === "right" })), h = $(() => ({ "f-cmp-inputgroup": !0, "input-group": !0, "f-state-disabled": !0, "f-state-editable": !1, "f-state-readonly": !0 // 'f-state-focus': hasFocused.value })), C = $(() => s.value ? "" : "border-width : 0 "); function b(S, w = !0) { } return { changeTextBoxValue: b, disabled: a, displayText: o, editable: c, hasFocused: p, inputGroupClass: h, inputType: l, isEmpty: f, modelValue: n, readonly: m, // onBlur, // onClick, // onFocus, // onInput, // onKeydown, // onKeyup, // onMousedown, // onTextBoxValueChange, placeholder: d, textBoxClass: g, textBoxTitle: v, inputGroupStyle: C }; } function sc(e, t, n) { const o = y(!1), a = $(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue: i, displayText: l, hasFocused: s, modelValue: u, isEmpty: c, hasClearClass: p } = n; function f(C) { o.value = C, p && (p.value = o.value); } K(l, () => { s != null && s.value ? f(!!(l != null && l.value)) : f(!1); }); const d = $(() => ({ "input-group-text": !0, "input-group-clear": !0 })), m = $(() => ({ width: "24px", display: o.value ? "flex" : "none" })); function v(C) { C.stopPropagation(), a.value && (i("", !0), f(!o.value), t.emit("clear")); } function g(C) { var F, k; const b = ((F = C.target.querySelector("input")) == null ? void 0 : F.value) || "", S = ((k = C.target.querySelector("textarea")) == null ? void 0 : k.value) || "", w = b || S; w !== u.value && (u.value = w), a.value && f(!!w); } function h(C) { a.value && f(!1); } return { clearButtonClass: d, clearButtonStyle: m, hasShownClearButton: o, onClearValue: v, onMouseEnter: g, onMouseLeave: h, shouldShowClearButton: a }; } const B0 = { jan: 1, feb: 2, mar: 3, apr: 4, may: 5, jun: 6, jul: 7, aug: 8, sep: 9, oct: 10, nov: 11, dec: 12 }, O0 = { sun: 0, mon: 1, tue: 2, wed: 3, thu: 4, fri: 5, sat: 6 }; class Om { constructor() { Q(this, "regexes", { YEAR: "[1-9]\\d{3}", MONTH: "1[0-2]|0?[1-9]", MONTH2: "1[0-2]|0[1-9]", MONTHNAME: "jan|january|feb|february|mar|march|apr|april|may|jun|june|jul|july|aug|august|sep|september|oct|october|nov|november|dec|december", DAYNAME: "mon|monday|tue|tuesday|wed|wednesday|thu|thursday|fri|friday|sat|saturday|sun|sunday", DAY: "3[01]|[12]\\d|0?[1-9]", DAY2: "3[01]|[12]\\d|0[1-9]", TIMEZONE: "[+-][01]\\d\\:?[0-5]\\d", H24: "[01]\\d|2[0-3]", MIN: "[0-5]\\d", SEC: "[0-5]\\d", MS: "\\d{3,}", H12: "0?[1-9]|1[012]", AMPM: "am|pm", UNIT: "year|month|week|day|hour|minute|second|millisecond" }); Q(this, "patterns", [ // 2010-03-15 ["iso_8601", this.makePattern("^(_YEAR_)-(_MONTH_)-(_DAY_)$"), "$2/$3/$1"], // 3-15-2010 ["us", this.makePattern("^(_MONTH_)([\\/-])(_DAY_)\\2(_YEAR_)$"), "$1/$3/$4"], // 15.03.2010 ["world", this.makePattern("^(_DAY_)([\\/\\.])(_MONTH_)\\2(_YEAR_)$"), "$3/$1/$4"], // 15-Mar-2010, 8 Dec 2011, "Thu, 8 Dec 2011" ["chicago", this.makePattern("^(?:(?:_DAYNAME_),? )?(_DAY_)([ -])(_MONTHNAME_)\\2(_YEAR_)$"), "$3 $1, $4"], // "March 4, 2012", "Mar 4 2012", "Sun Mar 4 2012" ["conversational", this.makePattern("^(?:(?:_DAYNAME_),? )?(_MONTHNAME_) (_DAY_),? (_YEAR_)$"), "$1 $2, $3"], // Tue Jun 22 17:47:27 +0000 2010 [ "month_day_time_year", this.makePattern("^(?:_DAYNAME_) (_MONTHNAME_) (_DAY_) ((?:_H24_)\\:(?:_MIN_)(?:\\:_SEC_)?) (_TIMEZONE_) (_YEAR_)$"), (t) => { const n = ("" + this.getMonthByName(t[1])).padStart(2, "0"), o = ("" + t[2]).padStart(2, "0"), a = t[5], i = t[3], l = t[4], s = a + "-" + n + "-" + o + "T" + i + l; return isNaN(s) ? !1 : s; } ], // @123456789 [ "unix", /^@(-?\d+)$/, (t) => this.create(parseInt(t[1], 10) * 1e3) ], // 24-hour time (This will help catch Date objects that are casted to a string) [ "24_hour", this.makePattern("^(?:(.+?)(?: |T))?(_H24_)\\:(_MIN_)(?:\\:(_SEC_)(?:\\.(_MS_))?)? ?(?:GMT)?(_TIMEZONE_)?(?: \\([A-Z]+\\))?$"), (t) => { let n; const o = t[1]; if (o) { if (n = this.create(o), isNaN(n)) return !1; } else n = /* @__PURE__ */ new Date(), n.setMilliseconds(0); const a = t[2], i = t[3], l = t[4], s = t[5]; return n.setHours(parseFloat(a), parseFloat(i), parseFloat(l || 0)), s && n.setMilliseconds(+String(s).slice(0, 3)), n; } ], // 12-hour time [ "12_hour", this.makePattern("^(?:(.+) )?(_H12_)(?:\\:(_MIN_)(?:\\:(_SEC_))?)? ?(_AMPM_)$"), (t) => { let n; const o = t[1]; if (o) { if (n = this.create(o), isNaN(n)) return !1; } else n = /* @__PURE__ */ new Date(), n.setMilliseconds(0); let a = parseFloat(t[2]); a = t[5].toLowerCase() === "am" ? a === 12 ? 0 : a : a === 12 ? 12 : a + 12; const i = t[3], l = t[4]; return n.setHours(a, parseFloat(i || 0), parseFloat(l || 0)), n; } ] ]); } makePattern(t) { return t = t.replace(/_([A-Z][A-Z0-9]+)_/g, (n, o) => this.regexes[o]), new RegExp(t, "i"); } getMonthByName(t) { return B0[String(t).slice(0, 3).toLowerCase()]; } getWeekdayByName(t) { return O0[String(t).slice(0, 3).toLowerCase()]; } parse(t) { if (!isNaN(Number(t))) return new Date(t); if (t = String(t).replace(/^\s*(.*)\s*$/, "$1"), t = t.replace(/\s{2,}/g, " "), t === "") return Date.now(); let n = 0; for (; n < this.patterns.length; ) { const o = this.patterns[n]; let a, i; typeof o[0] == "string" ? (i = o[1], a = o[2]) : (i = o[0], a = o[1]); const l = t.match(i); if (!l) { n++; continue; } if (typeof a == "function") { const s = a(l); if (s instanceof Date) return s; } else { const s = Date.parse(t.replace(i, a)); if (!isNaN(s)) return new Date(s); } n++; } return NaN; } create(t) { return t == null ? Date.now() : t instanceof Date ? t : this.parse(t); } } function Ht(e) { const t = Object.prototype.toString.call(e); return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN); } function Ut(e, t) { return e instanceof Date ? new e.constructor(t) : new Date(t); } function ni(e, t) { const n = Ht(e); return isNaN(t) ? Ut(e, NaN) : (t && n.setDate(n.getDate() + t), n); } function uc(e, t) { const n = Ht(e); if (isNaN(t)) return Ut(e, NaN); if (!t) return n; const o = n.getDate(), a = Ut(e, n.getTime()); a.setMonth(n.getMonth() + t + 1, 0); const i = a.getDate(); return o >= i ? a : (n.setFullYear( a.getFullYear(), a.getMonth(), o ), n); } const Dm = 6048e5, D0 = 864e5, cc = 6e4, dc = 36e5, V0 = 1e3; let A0 = {}; function La() { return A0; } function Yn(e, t) { var s, u, c, p; const n = La(), o = (t == null ? void 0 : t.weekStartsOn) ?? ((u = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : u.weekStartsOn) ?? n.weekStartsOn ?? ((p = (c = n.locale) == null ? void 0 : c.options) == null ? void 0 : p.weekStartsOn) ?? 0, a = Ht(e), i = a.getDay(), l = (i < o ? 7 : 0) + i - o; return a.setDate(a.getDate() - l), a.setHours(0, 0, 0, 0), a; } function oi(e) { return Yn(e, { weekStartsOn: 1 }); } function Vm(e) { const t = Ht(e), n = t.getFullYear(), o = Ut(e, 0); o.setFullYear(n + 1, 0, 4), o.setHours(0, 0, 0, 0); const a = oi(o), i = Ut(e, 0); i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0); const l = oi(i); return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= l.getTime() ? n : n - 1; } function Fu(e) { const t = Ht(e); return t.setHours(0, 0, 0, 0), t; } function Kl(e) { const t = Ht(e), n = new Date( Date.UTC( t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds() ) ); return n.setUTCFullYear(t.getFullYear()), +e - +n; } function $0(e, t) { const n = Fu(e), o = Fu(t), a = +n - Kl(n), i = +o - Kl(o); return Math.round((a - i) / D0); } function N0(e) { const t = Vm(e), n = Ut(e, 0); return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), oi(n); } function R0(e, t) { const n = t * 3; return uc(e, n); } function L0(e, t) { const n = t * 7; return ni(e, n); } function j0(e, t) { return uc(e, t * 12); } function _0(e) { return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]"; } function Hr(e) { if (!_0(e) && typeof e != "number") return !1; const t = Ht(e); return !isNaN(Number(t)); } function Ns(e) { const t = Ht(e), n = t.getMonth(); return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t; } function Rs(e) { const t = Ht(e), n = t.getMonth(), o = n - n % 3; return t.setMonth(o, 1), t.setHours(0, 0, 0, 0), t; } function Dl(e) { const t = Ht(e); return t.setDate(1), t.setHours(0, 0, 0, 0), t; } function Ls(e) { const t = Ht(e), n = t.getFullYear(); return t.setFullYear(n + 1, 0, 0), t.setHours(23, 59, 59, 999), t; } function Rl(e) { const t = Ht(e), n = Ut(e, 0); return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n; } function Hf(e, t) { var s, u, c, p; const n = La(), o = (t == null ? void 0 : t.weekStartsOn) ?? ((u = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : u.weekStartsOn) ?? n.weekStartsOn ?? ((p = (c = n.locale) == null ? void 0 : c.options) == null ? void 0 : p.weekStartsOn) ?? 0, a = Ht(e), i = a.getDay(), l = (i < o ? -7 : 0) + 6 - (i - o); return a.setDate(a.getDate() + l), a.setHours(23, 59, 59, 999), a; } function js(e) { const t = Ht(e), n = t.getMonth(), o = n - n % 3 + 3; return t.setMonth(o, 0), t.setHours(23, 59, 59, 999), t; } const H0 = { 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" } }, W0 = (e, t, n) => { let o; const a = H0[e]; return typeof a == "string" ? o = a : t === 1 ? o = a.one : o = a.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + o : o + " ago" : o; }; function _s(e) { return (t = {}) => { const n = t.width ? String(t.width) : e.defaultWidth; return e.formats[n] || e.formats[e.defaultWidth]; }; } const z0 = { full: "EEEE, MMMM do, y", long: "MMMM do, y", medium: "MMM d, y", short: "MM/dd/yyyy" }, q0 = { full: "h:mm:ss a zzzz", long: "h:mm:ss a z", medium: "h:mm:ss a", short: "h:mm a" }, U0 = { full: "{{date}} 'at' {{time}}", long: "{{date}} 'at' {{time}}", medium: "{{date}}, {{time}}", short: "{{date}}, {{time}}" }, G0 = { date: _s({ formats: z0, defaultWidth: "full" }), time: _s({ formats: q0, defaultWidth: "full" }), dateTime: _s({ formats: U0, defaultWidth: "full" }) }, Y0 = { lastWeek: "'last' eeee 'at' p", yesterday: "'yesterday at' p", today: "'today at' p", tomorrow: "'tomorrow at' p", nextWeek: "eeee 'at' p", other: "P" }, Q0 = (e, t, n, o) => Y0[e]; function Ei(e) { return (t, n) => { const o = n != null && n.context ? String(n.context) : "standalone"; let a; if (o === "formatting" && e.formattingValues) { const l = e.defaultFormattingWidth || e.defaultWidth, s = n != null && n.width ? String(n.width) : l; a = e.formattingValues[s] || e.formattingValues[l]; } else { const l = e.defaultWidth, s = n != null && n.width ? String(n.width) : e.defaultWidth; a = e.values[s] || e.values[l]; } const i = e.argumentCallback ? e.argumentCallback(t) : t; return a[i]; }; } const X0 = { narrow: ["B", "A"], abbreviated: ["BC", "AD"], wide: ["Before Christ", "Anno Domini"] }, K0 = { narrow: ["1", "2", "3", "4"], abbreviated: ["Q1", "Q2", "Q3", "Q4"], wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] }, J0 = { 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" ] }, Z0 = { 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" ] }, eS = { 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" } }, tS = { 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" } }, nS = (e, t) => { const n