import { defineComponent as W, createBlock as A, openBlock as B, mergeProps as z, withCtx as C, renderSlot as Z, computed as T, ref as D, createElementBlock as J, createCommentVNode as ye, createSlots as Ie, createVNode as b, createTextVNode as K, toDisplayString as $e, Fragment as fe, renderList as me, resolveComponent as re, createElementVNode as ne, onMounted as Oe, watch as Te, h as P } from "vue"; import { VBtn as Ue } from "vuetify/components/VBtn"; import { VBadge as Pe } from "vuetify/components/VBadge"; import { VCheckbox as Ye } from "vuetify/components/VCheckbox"; import { VIcon as Ae } from "vuetify/components/VIcon"; import { VRadio as He } from "vuetify/components/VRadio"; import { VRadioGroup as Ne } from "vuetify/components/VRadioGroup"; import { VSelect as je } from "vuetify/components/VSelect"; import { VTextField as ge } from "vuetify/components/VTextField"; import { VTextarea as Fe } from "vuetify/components/VTextarea"; import { VCard as be, VCardTitle as he, VCardText as Ve, VCardActions as Se } from "vuetify/components/VCard"; import { VContainer as Le } from "vuetify/components/VGrid"; const ze = W({ name: "EliBotao", inheritAttrs: !1, props: { color: { type: String, default: "primary" }, variant: { type: String, default: "elevated" }, size: { type: String, default: "default" }, disabled: { type: Boolean, default: !1 }, loading: { type: Boolean, default: !1 } } }), R = (e, t) => { const c = e.__vccOpts || e; for (const [p, v] of t) c[p] = v; return c; }; function We(e, t, c, p, v, M) { return B(), A(Ue, z({ color: e.color, variant: e.variant, size: e.size, disabled: e.disabled, loading: e.loading }, e.$attrs, { class: "text-none pt-1" }), { default: C(() => [ Z(e.$slots, "default") ]), _: 3 }, 16, ["color", "variant", "size", "disabled", "loading"]); } const Me = /* @__PURE__ */ R(ze, [["render", We]]), pe = { suave: "4px", pill: "10px" }, Re = W({ name: "EliBadge", inheritAttrs: !1, props: { color: { type: String, default: "primary" }, location: { type: String, default: "top right" }, offsetX: { type: String, default: "0" }, offsetY: { type: String, default: "0" }, dot: { type: Boolean, default: !1 }, visible: { type: Boolean, default: !0 }, badge: { type: [String, Number], default: void 0 }, /** 🔥 NOVO: controla só o radius */ radius: { type: String, default: "suave" } }, setup(e) { const t = T(() => e.radius in pe ? pe[e.radius] : e.radius), c = T(() => e.dot || e.badge !== void 0 ? e.visible : !1), p = T(() => ({ "--eli-badge-radius": t.value })); return { showBadge: c, badgeStyle: p }; } }); function qe(e, t, c, p, v, M) { return e.showBadge ? (B(), A(Pe, z({ key: 0, color: e.color }, e.$attrs, { location: e.location, "offset-x": e.offsetX, "offset-y": e.offsetY, dot: e.dot, content: e.badge, style: e.badgeStyle }), { default: C(() => [ Z(e.$slots, "default", {}, void 0, !0) ]), _: 3 }, 16, ["color", "location", "offset-x", "offset-y", "dot", "content", "style"])) : Z(e.$slots, "default", { key: 1 }, void 0, !0); } const ie = /* @__PURE__ */ R(Re, [["render", qe], ["__scopeId", "data-v-de2fbf2f"]]); function Je(e) { return e.replace(/\D+/g, ""); } function Ze(e) { const t = Je(e); return t.length <= 11 ? t.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2").slice(0, 14) : t.replace(/^(\d{2})(\d)/, "$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/, "$1.$2.$3").replace(/\.(\d{3})(\d)/, ".$1/$2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 18); } function Xe(e) { return e.replace(/\D+/g, ""); } function Ge(e) { const t = Xe(e); return t ? t.length <= 10 ? t.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 14) : t.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{5})(\d)/, "$1-$2").slice(0, 15) : ""; } function ue(e) { return e.replace(/\D+/g, ""); } function we(e) { const t = e.replace(/[^\d,]/g, ""), c = t.split(","); return c.length > 2 ? c[0] + "," + c.slice(1).join("") : t; } function Qe(e) { return we(e.replace(/%/g, "")); } function Ke(e) { const t = ue(e); return t ? (parseInt(t, 10) / 100).toFixed(2).replace(".", ",").replace(/\B(?=(\d{3})+(?!\d))/g, ".") : ""; } function _e(e) { const t = ue(e).slice(0, 8); return t.length <= 5 ? t : t.replace(/^(\d{5})(\d{1,3})$/, "$1-$2"); } const xe = W({ name: "EliInput", inheritAttrs: !1, props: { /** * Aceita valor simples (text-like) ou lista de valores (checkbox/select multiple). * O componente não converte tipos automaticamente: mantém o que receber. */ modelValue: { type: [String, Number, Boolean, Array], default: "" }, type: { type: String, default: "text" }, label: String, placeholder: String, disabled: Boolean, error: Boolean, errorMessages: { type: [String, Array], default: () => [] }, hint: String, persistentHint: Boolean, rows: { type: Number, default: 4 }, /** * Para select/radio/checkbox. * Aceita lista já normalizada ({ label, value }) ou valores primitivos. */ options: { type: Array, default: () => [] }, clearable: Boolean, variant: { type: String, default: "outlined" }, density: { type: String, default: "comfortable" }, color: { type: String, default: "primary" }, row: Boolean, showPasswordToggle: Boolean, multiple: Boolean, chips: Boolean }, emits: ["update:modelValue", "change", "focus", "blur"], setup(e, { emit: t, attrs: c }) { const p = D(!1), v = D(!1), M = T({ get: () => e.modelValue, set: (h) => { t("update:modelValue", h), t("change", h); } }), d = T( () => [ "text", "password", "email", "search", "url", "telefone", "cpfCnpj", "numericoInteiro", "numericoDecimal", "numericoMoeda", "porcentagem", "cep" ].includes(e.type) ), f = T( () => e.type === "password" ? v.value ? "text" : "password" : "text" ), I = T(() => { if (e.type === "telefone") return "tel"; if (e.type === "porcentagem") return "decimal"; if (e.type.startsWith("numerico")) return "numeric"; }), o = T( () => e.error ? "error" : p.value ? e.color : void 0 ); function m(h) { const w = h.target; let g = w.value; switch (e.type) { case "numericoInteiro": g = ue(g); break; case "numericoDecimal": g = we(g); break; case "numericoMoeda": g = Ke(g); break; case "porcentagem": g = Qe(g); break; case "telefone": g = Ge(g); break; case "cpfCnpj": g = Ze(g); break; case "cep": g = _e(g); break; } w.value = g, t("update:modelValue", g), t("change", g); } function V() { v.value = !v.value; } const H = T(() => (e.options || []).map((h) => { if (h && typeof h == "object" && "value" in h) { const g = h.value; return { label: h.label ?? String(g), value: g, disabled: h.disabled }; } const w = h; return { label: String(w), value: w }; })); return { attrs: c, value: M, isTextLike: d, inputHtmlType: f, inputMode: I, internalColor: o, showPassword: v, togglePassword: V, onInput: m, onFocus: () => t("focus"), onBlur: () => t("blur"), computedItems: H }; } }), et = { class: "eli-input" }, tt = { key: 4, class: "checkbox-group" }; function at(e, t, c, p, v, M) { return B(), J("div", et, [ e.isTextLike ? (B(), A(ge, z({ key: 0, modelValue: e.value, "onUpdate:modelValue": t[0] || (t[0] = (d) => e.value = d), type: e.inputHtmlType, label: e.label, placeholder: e.placeholder, disabled: e.disabled, clearable: e.clearable && e.type !== "password", error: e.error, "error-messages": e.errorMessages, hint: e.hint, "persistent-hint": e.persistentHint, density: e.density, variant: e.variant, color: e.internalColor, inputmode: e.inputMode, suffix: e.type === "porcentagem" ? "%" : void 0 }, e.attrs, { onFocus: e.onFocus, onBlur: e.onBlur, onInput: e.onInput }), Ie({ _: 2 }, [ e.type === "password" && e.showPasswordToggle ? { name: "append-inner", fn: C(() => [ b(Ae, { class: "cursor-pointer", onClick: e.togglePassword }, { default: C(() => [ K($e(e.showPassword ? "mdi-eye-off" : "mdi-eye"), 1) ]), _: 1 }, 8, ["onClick"]) ]), key: "0" } : void 0 ]), 1040, ["modelValue", "type", "label", "placeholder", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant", "color", "inputmode", "suffix", "onFocus", "onBlur", "onInput"])) : e.type === "textarea" ? (B(), A(Fe, z({ key: 1, modelValue: e.value, "onUpdate:modelValue": t[1] || (t[1] = (d) => e.value = d), label: e.label, rows: e.rows, density: e.density, variant: e.variant }, e.attrs), null, 16, ["modelValue", "label", "rows", "density", "variant"])) : e.type === "select" ? (B(), A(je, z({ key: 2, modelValue: e.value, "onUpdate:modelValue": t[2] || (t[2] = (d) => e.value = d), items: e.computedItems, label: e.label, placeholder: e.placeholder, multiple: e.multiple, chips: e.chips, clearable: e.clearable, disabled: e.disabled, density: e.density, variant: e.variant, "item-title": "label", "item-value": "value", error: e.error, "error-messages": e.errorMessages }, e.attrs, { onFocus: e.onFocus, onBlur: e.onBlur }), null, 16, ["modelValue", "items", "label", "placeholder", "multiple", "chips", "clearable", "disabled", "density", "variant", "error", "error-messages", "onFocus", "onBlur"])) : e.type === "radio" ? (B(), A(Ne, { key: 3, modelValue: e.value, "onUpdate:modelValue": t[3] || (t[3] = (d) => e.value = d), row: e.row }, { default: C(() => [ (B(!0), J(fe, null, me(e.computedItems, (d) => (B(), A(He, { key: String(d.value), label: d.label, value: d.value }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue", "row"])) : e.type === "checkbox" ? (B(), J("div", tt, [ (B(!0), J(fe, null, me(e.computedItems, (d) => (B(), A(Ye, { key: String(d.value), modelValue: e.value, "onUpdate:modelValue": t[4] || (t[4] = (f) => e.value = f), label: d.label, value: d.value, density: e.density }, null, 8, ["modelValue", "label", "value", "density"]))), 128)) ])) : ye("", !0) ]); } const De = /* @__PURE__ */ R(xe, [["render", at], ["__scopeId", "data-v-756cb549"]]), rt = W({ name: "EliOlaMundo", components: { EliBotao: Me, EliBadge: ie, EliInput: De }, setup() { const e = D(""), t = D([]), c = D(""), p = D(""), v = D(""), M = D(""), d = D(""), f = D(""), I = D(""), o = D(""), m = D(""), V = D(null), H = D([]); return { nome: e, email: f, documento: m, estado: t, telefone: p, mensagem: I, senha: o, cor: V, habilidades: H, idade: v, altura: M, cep: c, valor: d }; } }), nt = { class: "grid-example" }; function ot(e, t, c, p, v, M) { const d = re("EliBadge"), f = re("EliInput"), I = re("EliBotao"); return B(), A(Le, null, { default: C(() => [ b(be, { class: "mx-auto", max_width: "400" }, { default: C(() => [ b(he, null, { default: C(() => [ b(d, { badge: "Novo", "offset-x": "-15", location: "right center" }, { default: C(() => [...t[14] || (t[14] = [ K(" Olá Mundo! ", -1) ])]), _: 1 }) ]), _: 1 }), b(Ve, null, { default: C(() => [ t[15] || (t[15] = K(" Este é um componente de exemplo integrado com Vuetify. ", -1)), ne("div", nt, [ b(f, { modelValue: e.nome, "onUpdate:modelValue": t[0] || (t[0] = (o) => e.nome = o), label: "Nome", placeholder: "Digite o nome", density: "compact" }, null, 8, ["modelValue"]), b(f, { modelValue: e.idade, "onUpdate:modelValue": t[1] || (t[1] = (o) => e.idade = o), type: "numericoInteiro", label: "Idade", density: "default" }, null, 8, ["modelValue"]), b(f, { modelValue: e.altura, "onUpdate:modelValue": t[2] || (t[2] = (o) => e.altura = o), type: "numericoDecimal", label: "Altura", density: "comfortable" }, null, 8, ["modelValue"]), b(f, { modelValue: e.valor, "onUpdate:modelValue": t[3] || (t[3] = (o) => e.valor = o), type: "numericoMoeda", label: "Valor" }, null, 8, ["modelValue"]), b(f, { modelValue: e.telefone, "onUpdate:modelValue": t[4] || (t[4] = (o) => e.telefone = o), type: "telefone", label: "Telefone" }, null, 8, ["modelValue"]), b(f, { modelValue: e.cep, "onUpdate:modelValue": t[5] || (t[5] = (o) => e.cep = o), type: "cep", label: "CEP", placeholder: "00000-000" }, null, 8, ["modelValue"]), b(f, { type: "select", label: "Estado", options: [ { label: "São Paulo", value: "SP" }, { label: "Rio de Janeiro", value: "RJ" } ], modelValue: e.estado, "onUpdate:modelValue": t[6] || (t[6] = (o) => e.estado = o), multiple: "" }, null, 8, ["modelValue"]), b(f, { modelValue: e.documento, "onUpdate:modelValue": t[7] || (t[7] = (o) => e.documento = o), type: "cpfCnpj", label: "CPF / CNPJ" }, null, 8, ["modelValue"]), b(f, { modelValue: e.email, "onUpdate:modelValue": t[8] || (t[8] = (o) => e.email = o), label: "Email", placeholder: "email@exemplo.com" }, null, 8, ["modelValue"]), b(f, { modelValue: e.senha, "onUpdate:modelValue": t[9] || (t[9] = (o) => e.senha = o), label: "Senha", type: "password", showPasswordToggle: !0, placeholder: "Digite sua senha" }, null, 8, ["modelValue"]), b(f, { type: "textarea", modelValue: e.mensagem, "onUpdate:modelValue": t[10] || (t[10] = (o) => e.mensagem = o), label: "Mensagem", rows: 5 }, null, 8, ["modelValue"]), b(f, { type: "radio", modelValue: e.cor, "onUpdate:modelValue": t[11] || (t[11] = (o) => e.cor = o), label: "Cor favorita", options: [ { label: "Azul", value: "azul" }, { label: "Verde", value: "verde" } ] }, null, 8, ["modelValue"]), b(f, { type: "checkbox", modelValue: e.habilidades, "onUpdate:modelValue": t[12] || (t[12] = (o) => e.habilidades = o), options: [ { label: "Vue", value: "vue" }, { label: "React", value: "react" } ] }, null, 8, ["modelValue"]), b(f, { modelValue: e.nome, "onUpdate:modelValue": t[13] || (t[13] = (o) => e.nome = o), label: "Nome", error: !0, "error-messages": ["Obrigatório"] }, null, 8, ["modelValue"]) ]) ]), _: 1 }), b(Se, null, { default: C(() => [ b(I, { color: "primary", variant: "elevated", block: "" }, { default: C(() => [...t[16] || (t[16] = [ K(" Botão Vuetify ", -1) ])]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }); } const lt = /* @__PURE__ */ R(rt, [["render", ot]]), st = W({ name: "EliCartao", components: { EliBadge: ie }, inheritAttrs: !1, props: { /** Título de fallback caso o slot `titulo` não seja usado. */ titulo: { type: String, default: "" }, /** * Status semântico do cartão. * Usado para cor/label e para permitir filtros por status. */ status: { type: String, required: !0 }, /** Variante visual do v-card (Vuetify). */ variant: { type: String, default: "outlined" } }, emits: { /** Emit opcional para padronizar clique no cartão. */ clicar: (e) => !0 }, setup(e, { emit: t }) { const c = T(() => e.status), p = T(() => { switch (e.status) { case "novo": return "primary"; case "rascunho": return "secondary"; case "vendido": return "success"; case "cancelado": return "error"; } }), v = T(() => `eli-cartao--${e.status}`); function M() { t("clicar", e.status); } return { rotuloStatus: c, corStatus: p, classeStatus: v, onClick: M }; } }), it = { class: "eli-cartao__titulo-texto" }, ut = { class: "eli-cartao__status" }; function dt(e, t, c, p, v, M) { const d = re("EliBadge"); return B(), A(be, z({ class: ["eli-cartao", e.classeStatus], variant: e.variant }, e.$attrs), { default: C(() => [ b(he, { class: "eli-cartao__titulo" }, { default: C(() => [ ne("div", it, [ Z(e.$slots, "titulo", {}, () => [ K($e(e.titulo), 1) ], !0) ]), ne("div", ut, [ b(d, { badge: e.rotuloStatus, radius: "pill", color: e.corStatus }, { default: C(() => [...t[0] || (t[0] = [ ne("span", null, null, -1) ])]), _: 1 }, 8, ["badge", "color"]) ]) ]), _: 3 }), b(Ve, { class: "eli-cartao__conteudo" }, { default: C(() => [ Z(e.$slots, "default", {}, void 0, !0) ]), _: 3 }), e.$slots.acoes ? (B(), A(Se, { key: 0, class: "eli-cartao__acoes" }, { default: C(() => [ Z(e.$slots, "acoes", {}, void 0, !0) ]), _: 3 })) : ye("", !0) ]), _: 3 }, 16, ["variant", "class"]); } const ct = /* @__PURE__ */ R(st, [["render", dt], ["__scopeId", "data-v-6c492bd9"]]); function ft(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var oe = { exports: {} }, mt = oe.exports, ve; function pt() { return ve || (ve = 1, (function(e, t) { (function(c, p) { e.exports = p(); })(mt, (function() { var c = 1e3, p = 6e4, v = 36e5, M = "millisecond", d = "second", f = "minute", I = "hour", o = "day", m = "week", V = "month", H = "quarter", h = "year", w = "date", g = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Ee = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Be = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) { var n = ["th", "st", "nd", "rd"], a = s % 100; return "[" + s + (n[(a - 20) % 10] || n[a] || n[0]) + "]"; } }, le = function(s, n, a) { var l = String(s); return !l || l.length >= n ? s : "" + Array(n + 1 - l.length).join(a) + s; }, Ce = { s: le, z: function(s) { var n = -s.utcOffset(), a = Math.abs(n), l = Math.floor(a / 60), r = a % 60; return (n <= 0 ? "+" : "-") + le(l, 2, "0") + ":" + le(r, 2, "0"); }, m: function s(n, a) { if (n.date() < a.date()) return -s(a, n); var l = 12 * (a.year() - n.year()) + (a.month() - n.month()), r = n.clone().add(l, V), i = a - r < 0, u = n.clone().add(l + (i ? -1 : 1), V); return +(-(l + (a - r) / (i ? r - u : u - r)) || 0); }, a: function(s) { return s < 0 ? Math.ceil(s) || 0 : Math.floor(s); }, p: function(s) { return { M: V, y: h, w: m, d: o, D: w, h: I, m: f, s: d, ms: M, Q: H }[s] || String(s || "").toLowerCase().replace(/s$/, ""); }, u: function(s) { return s === void 0; } }, X = "en", j = {}; j[X] = Be; var de = "$isDayjsObject", se = function(s) { return s instanceof ee || !(!s || !s[de]); }, x = function s(n, a, l) { var r; if (!n) return X; if (typeof n == "string") { var i = n.toLowerCase(); j[i] && (r = i), a && (j[i] = a, r = i); var u = n.split("-"); if (!r && u.length > 1) return s(u[0]); } else { var $ = n.name; j[$] = n, r = $; } return !l && r && (X = r), r || !l && X; }, k = function(s, n) { if (se(s)) return s.clone(); var a = typeof n == "object" ? n : {}; return a.date = s, a.args = arguments, new ee(a); }, y = Ce; y.l = x, y.i = se, y.w = function(s, n) { return k(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset }); }; var ee = (function() { function s(a) { this.$L = x(a.locale, null, !0), this.parse(a), this.$x = this.$x || a.x || {}, this[de] = !0; } var n = s.prototype; return n.parse = function(a) { this.$d = (function(l) { var r = l.date, i = l.utc; if (r === null) return /* @__PURE__ */ new Date(NaN); if (y.u(r)) return /* @__PURE__ */ new Date(); if (r instanceof Date) return new Date(r); if (typeof r == "string" && !/Z$/i.test(r)) { var u = r.match(_); if (u) { var $ = u[2] - 1 || 0, S = (u[7] || "0").substring(0, 3); return i ? new Date(Date.UTC(u[1], $, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, S)) : new Date(u[1], $, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, S); } } return new Date(r); })(a), this.init(); }, n.init = function() { var a = this.$d; this.$y = a.getFullYear(), this.$M = a.getMonth(), this.$D = a.getDate(), this.$W = a.getDay(), this.$H = a.getHours(), this.$m = a.getMinutes(), this.$s = a.getSeconds(), this.$ms = a.getMilliseconds(); }, n.$utils = function() { return y; }, n.isValid = function() { return this.$d.toString() !== g; }, n.isSame = function(a, l) { var r = k(a); return this.startOf(l) <= r && r <= this.endOf(l); }, n.isAfter = function(a, l) { return k(a) < this.startOf(l); }, n.isBefore = function(a, l) { return this.endOf(l) < k(a); }, n.$g = function(a, l, r) { return y.u(a) ? this[l] : this.set(r, a); }, n.unix = function() { return Math.floor(this.valueOf() / 1e3); }, n.valueOf = function() { return this.$d.getTime(); }, n.startOf = function(a, l) { var r = this, i = !!y.u(l) || l, u = y.p(a), $ = function(L, U) { var N = y.w(r.$u ? Date.UTC(r.$y, U, L) : new Date(r.$y, U, L), r); return i ? N : N.endOf(o); }, S = function(L, U) { return y.w(r.toDate()[L].apply(r.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(U)), r); }, E = this.$W, O = this.$M, Y = this.$D, q = "set" + (this.$u ? "UTC" : ""); switch (u) { case h: return i ? $(1, 0) : $(31, 11); case V: return i ? $(1, O) : $(0, O + 1); case m: var F = this.$locale().weekStart || 0, G = (E < F ? E + 7 : E) - F; return $(i ? Y - G : Y + (6 - G), O); case o: case w: return S(q + "Hours", 0); case I: return S(q + "Minutes", 1); case f: return S(q + "Seconds", 2); case d: return S(q + "Milliseconds", 3); default: return this.clone(); } }, n.endOf = function(a) { return this.startOf(a, !1); }, n.$set = function(a, l) { var r, i = y.p(a), u = "set" + (this.$u ? "UTC" : ""), $ = (r = {}, r[o] = u + "Date", r[w] = u + "Date", r[V] = u + "Month", r[h] = u + "FullYear", r[I] = u + "Hours", r[f] = u + "Minutes", r[d] = u + "Seconds", r[M] = u + "Milliseconds", r)[i], S = i === o ? this.$D + (l - this.$W) : l; if (i === V || i === h) { var E = this.clone().set(w, 1); E.$d[$](S), E.init(), this.$d = E.set(w, Math.min(this.$D, E.daysInMonth())).$d; } else $ && this.$d[$](S); return this.init(), this; }, n.set = function(a, l) { return this.clone().$set(a, l); }, n.get = function(a) { return this[y.p(a)](); }, n.add = function(a, l) { var r, i = this; a = Number(a); var u = y.p(l), $ = function(O) { var Y = k(i); return y.w(Y.date(Y.date() + Math.round(O * a)), i); }; if (u === V) return this.set(V, this.$M + a); if (u === h) return this.set(h, this.$y + a); if (u === o) return $(1); if (u === m) return $(7); var S = (r = {}, r[f] = p, r[I] = v, r[d] = c, r)[u] || 1, E = this.$d.getTime() + a * S; return y.w(E, this); }, n.subtract = function(a, l) { return this.add(-1 * a, l); }, n.format = function(a) { var l = this, r = this.$locale(); if (!this.isValid()) return r.invalidDate || g; var i = a || "YYYY-MM-DDTHH:mm:ssZ", u = y.z(this), $ = this.$H, S = this.$m, E = this.$M, O = r.weekdays, Y = r.months, q = r.meridiem, F = function(U, N, Q, te) { return U && (U[N] || U(l, i)) || Q[N].slice(0, te); }, G = function(U) { return y.s($ % 12 || 12, U, "0"); }, L = q || function(U, N, Q) { var te = U < 12 ? "AM" : "PM"; return Q ? te.toLowerCase() : te; }; return i.replace(Ee, (function(U, N) { return N || (function(Q) { switch (Q) { case "YY": return String(l.$y).slice(-2); case "YYYY": return y.s(l.$y, 4, "0"); case "M": return E + 1; case "MM": return y.s(E + 1, 2, "0"); case "MMM": return F(r.monthsShort, E, Y, 3); case "MMMM": return F(Y, E); case "D": return l.$D; case "DD": return y.s(l.$D, 2, "0"); case "d": return String(l.$W); case "dd": return F(r.weekdaysMin, l.$W, O, 2); case "ddd": return F(r.weekdaysShort, l.$W, O, 3); case "dddd": return O[l.$W]; case "H": return String($); case "HH": return y.s($, 2, "0"); case "h": return G(1); case "hh": return G(2); case "a": return L($, S, !0); case "A": return L($, S, !1); case "m": return String(S); case "mm": return y.s(S, 2, "0"); case "s": return String(l.$s); case "ss": return y.s(l.$s, 2, "0"); case "SSS": return y.s(l.$ms, 3, "0"); case "Z": return u; } return null; })(U) || u.replace(":", ""); })); }, n.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, n.diff = function(a, l, r) { var i, u = this, $ = y.p(l), S = k(a), E = (S.utcOffset() - this.utcOffset()) * p, O = this - S, Y = function() { return y.m(u, S); }; switch ($) { case h: i = Y() / 12; break; case V: i = Y(); break; case H: i = Y() / 3; break; case m: i = (O - E) / 6048e5; break; case o: i = (O - E) / 864e5; break; case I: i = O / v; break; case f: i = O / p; break; case d: i = O / c; break; default: i = O; } return r ? i : y.a(i); }, n.daysInMonth = function() { return this.endOf(V).$D; }, n.$locale = function() { return j[this.$L]; }, n.locale = function(a, l) { if (!a) return this.$L; var r = this.clone(), i = x(a, l, !0); return i && (r.$L = i), r; }, n.clone = function() { return y.w(this.$d, this); }, n.toDate = function() { return new Date(this.valueOf()); }, n.toJSON = function() { return this.isValid() ? this.toISOString() : null; }, n.toISOString = function() { return this.$d.toISOString(); }, n.toString = function() { return this.$d.toUTCString(); }, s; })(), ce = ee.prototype; return k.prototype = ce, [["$ms", M], ["$s", d], ["$m", f], ["$H", I], ["$W", o], ["$M", V], ["$y", h], ["$D", w]].forEach((function(s) { ce[s[1]] = function(n) { return this.$g(n, s[0], s[1]); }; })), k.extend = function(s, n) { return s.$i || (s(n, ee, k), s.$i = !0), k; }, k.locale = x, k.isDayjs = se, k.unix = function(s) { return k(1e3 * s); }, k.en = j[X], k.Ls = j, k.p = {}, k; })); })(oe)), oe.exports; } var vt = pt(); const ae = /* @__PURE__ */ ft(vt), yt = W({ name: "EliDataHora", inheritAttrs: !1, props: { /** * Valor em ISO 8601: * - com offset (ex.: `2026-01-09T13:15:00-03:00`) * - ou UTC absoluto (ex.: `2026-01-09T16:15:00Z`) */ modelValue: { type: String, default: null }, /** * Define o tipo de entrada. * - `dataHora`: usa `datetime-local` * - `data`: usa `date` */ modo: { type: String, default: "dataHora" }, /** Rótulo exibido no v-text-field (Vuetify). */ rotulo: { type: String, default: "Data e hora" }, /** Placeholder do input. */ placeholder: { type: String, default: "" }, /** Desabilita a interação. */ desabilitado: { type: Boolean, default: !1 }, /** Se true, mostra ícone para limpar o valor (Vuetify clearable). */ limpavel: { type: Boolean, default: !1 }, /** Estado de erro (visual). */ erro: { type: Boolean, default: !1 }, /** Mensagens de erro. */ mensagensErro: { type: [String, Array], default: () => [] }, /** Texto de apoio. */ dica: { type: String, default: "" }, /** Mantém a dica sempre visível. */ dicaPersistente: { type: Boolean, default: !1 }, /** Densidade do campo (Vuetify). */ densidade: { type: String, default: "comfortable" }, /** Variante do v-text-field (Vuetify). */ variante: { type: String, default: "outlined" }, /** * Valor mínimo permitido. * ISO 8601 (offset ou `Z`). */ min: { // ISO 8601 (offset ou Z) type: String, default: void 0 }, /** * Valor máximo permitido. * ISO 8601 (offset ou `Z`). */ max: { // ISO 8601 (offset ou Z) type: String, default: void 0 } }, emits: { /** v-model padrão. */ "update:modelValue": (e) => !0, /** Alias para consumidores que querem um evento semântico. */ alterar: (e) => !0, foco: () => !0, desfoco: () => !0 }, setup(e, { emit: t, attrs: c }) { const p = T( () => e.modo === "data" ? "date" : "datetime-local" ); function v(o) { return e.modo === "data" ? ae(o).format("YYYY-MM-DD") : ae(o).format("YYYY-MM-DDTHH:mm"); } function M(o) { return e.modo === "data" ? ae(`${o}T00:00`).format() : ae(o).format(); } const d = T({ get: () => e.modelValue ? v(e.modelValue) : "", set: (o) => { const m = o && o.length > 0 ? o : null; if (!m) { t("update:modelValue", null), t("alterar", null); return; } const V = M(m); t("update:modelValue", V), t("alterar", V); } }), f = T(() => { if (e.min) return v(e.min); }), I = T(() => { if (e.max) return v(e.max); }); return { attrs: c, valor: d, emit: t, minLocal: f, maxLocal: I, tipoInput: p }; } }), $t = { class: "eli-data-hora" }; function gt(e, t, c, p, v, M) { return B(), J("div", $t, [ b(ge, z({ modelValue: e.valor, "onUpdate:modelValue": t[0] || (t[0] = (d) => e.valor = d), type: e.tipoInput, label: e.rotulo, placeholder: e.placeholder, disabled: e.desabilitado, clearable: e.limpavel, error: e.erro, "error-messages": e.mensagensErro, hint: e.dica, "persistent-hint": e.dicaPersistente, density: e.densidade, variant: e.variante, min: e.minLocal, max: e.maxLocal }, e.attrs, { onFocus: t[1] || (t[1] = (d) => e.emit("foco")), onBlur: t[2] || (t[2] = (d) => e.emit("desfoco")) }), null, 16, ["modelValue", "type", "label", "placeholder", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant", "min", "max"]) ]); } const bt = /* @__PURE__ */ R(yt, [["render", gt], ["__scopeId", "data-v-71afabb6"]]); var ke = ((e) => (e[e.sucesso = 200] = "sucesso", e[e.erroConhecido = 400] = "erroConhecido", e[e.erroPermissao = 401] = "erroPermissao", e[e.erroNaoEncontrado = 404] = "erroNaoEncontrado", e[e.erroDesconhecido = 500] = "erroDesconhecido", e[e.tempoEsgotado = 504] = "tempoEsgotado", e))(ke || {}); const ht = W({ name: "EliTabela", inheritAttrs: !1, props: { tabela: { // Observação: este componente é “generic-friendly”. // Usamos `any` aqui para permitir passar `EliTabelaConsulta` de qualquer T // sem brigar com invariância do TS (por causa do callback `celula(linha: T)`). type: Object, required: !0 } }, setup(e) { const t = D(!1), c = D(null), p = D([]), v = D(0); function M(m) { return m == null || m === !1 ? "" : m; } function d(m) { return P( "div", { class: "eli-tabela eli-tabela--erro", role: "alert" }, [ P("div", { class: "eli-tabela__erro-titulo" }, "Erro"), P("div", { class: "eli-tabela__erro-mensagem" }, m) ] ); } function f(m) { return P( "div", { class: "eli-tabela eli-tabela--vazio" }, m ?? "Nenhum registro encontrado." ); } function I() { return P( "div", { class: "eli-tabela eli-tabela--carregando", "aria-busy": "true" }, "Carregando..." ); } async function o() { t.value = !0, c.value = null; try { const m = await e.tabela.resposta(); if (m.cod !== ke.sucesso) { p.value = [], v.value = 0, c.value = m.mensagem; return; } p.value = m.valor.valores, v.value = m.valor.quantidade; } catch (m) { p.value = [], v.value = 0, c.value = m instanceof Error ? m.message : "Erro ao carregar dados."; } finally { t.value = !1; } } return Oe(o), Te( () => e.tabela, () => { o(); } ), () => { const m = e.tabela; if (t.value) return I(); if (c.value) return d(c.value); const V = m.colunas; return p.value.length ? P( "div", { class: "eli-tabela" }, [ P("table", { class: "eli-tabela__table" }, [ P( "thead", { class: "eli-tabela__thead" }, P( "tr", { class: "eli-tabela__tr eli-tabela__tr--header" }, V.map( (H) => P("th", { class: "eli-tabela__th", scope: "col" }, H.rotulo) ) ) ), P( "tbody", { class: "eli-tabela__tbody" }, p.value.map( (H, h) => P( "tr", { class: "eli-tabela__tr", key: h }, V.map( (w, g) => P( "td", { class: [ "eli-tabela__td", w.acao ? "eli-tabela__td--clicavel" : void 0 ], key: `${h}-${g}`, onClick: w.acao ? () => { var _; return (_ = w.acao) == null ? void 0 : _.call(w); } : void 0 }, M(w.celula(H)) ) ) ) ) ) ]) ] ) : f(m.mensagemVazio); }; } }); function Vt(e, t, c, p, v, M) { return B(), J("div"); } const St = /* @__PURE__ */ R(ht, [["render", Vt], ["__scopeId", "data-v-cc67b529"]]), Yt = { install(e) { e.component("EliOlaMundo", lt), e.component("EliBotao", Me), e.component("EliBadge", ie), e.component("EliInput", De), e.component("EliCartao", ct), e.component("EliDataHora", bt), e.component("EliTabela", St); } }; export { ie as EliBadge, Me as EliBotao, ct as EliCartao, bt as EliDataHora, De as EliInput, lt as EliOlaMundo, St as EliTabela, Yt as default };