76 lines
74 KiB
JavaScript
76 lines
74 KiB
JavaScript
(function(w,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vuetify/components/VBtn"),require("vuetify/components/VBadge"),require("vuetify/components/VTextField"),require("vuetify/components/VCard"),require("vuetify/components/VGrid"),require("vuetify/components"),require("vuetify/components/VChip"),require("vuetify/components/VTextarea"),require("vuetify/components/VSelect")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components/VBtn","vuetify/components/VBadge","vuetify/components/VTextField","vuetify/components/VCard","vuetify/components/VGrid","vuetify/components","vuetify/components/VChip","vuetify/components/VTextarea","vuetify/components/VSelect"],t):(w=typeof globalThis<"u"?globalThis:w||self,t(w.eli_vue={},w.Vue,w.VBtn,w.VBadge,w.VTextField,w.VCard,w.VGrid,w.components,w.VChip,w.VTextarea,w.VSelect))})(this,(function(w,t,et,tt,Ce,ie,at,ve,ot,nt,lt){"use strict";const rt=t.defineComponent({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}}}),T=(e,a)=>{const n=e.__vccOpts||e;for(const[r,s]of a)n[r]=s;return n};function it(e,a,n,r,s,m){return t.openBlock(),t.createBlock(et.VBtn,t.mergeProps({color:e.color,variant:e.variant,size:e.size,disabled:e.disabled,loading:e.loading},e.$attrs,{class:"eli-botao text-none pt-1"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","variant","size","disabled","loading"])}const _e=T(rt,[["render",it]]),Ae={suave:"4px",pill:"10px"},st=t.defineComponent({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},radius:{type:String,default:"suave"}},setup(e){const a=t.computed(()=>e.radius in Ae?Ae[e.radius]:e.radius),n=t.computed(()=>e.dot||e.badge!==void 0?e.visible:!1),r=t.computed(()=>({"--eli-badge-radius":a.value}));return{showBadge:n,badgeStyle:r}}});function ct(e,a,n,r,s,m){return e.showBadge?(t.openBlock(),t.createBlock(tt.VBadge,t.mergeProps({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,class:"eli-badge"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","location","offset-x","offset-y","dot","content","style"])):t.renderSlot(e.$slots,"default",{key:1})}const ye=T(st,[["render",ct]]);function dt(e){return e.replace(/\D+/g,"")}function ut(e){const a=dt(e);return a.length<=11?a.replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2").slice(0,14):a.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 mt(e){return e.replace(/\D+/g,"")}function pt(e){const a=mt(e);return a?a.length<=10?a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2").slice(0,15):""}function ft(e){return e.replace(/\D+/g,"")}function bt(e){const a=ft(e);return a?a.replace(/^(\d{5})(\d)/,"$1-$2").slice(0,9):""}const ht=t.defineComponent({name:"EliEntradaTexto",inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const r=t.computed(()=>{var i;return((i=e.opcoes)==null?void 0:i.formato)??"texto"}),s=t.computed({get:()=>e.value,set:i=>{n("update:value",i),n("input",i),n("change",i)}}),m=t.computed(()=>r.value==="email"?"email":r.value==="url"?"url":"text"),o=t.computed(()=>{if(r.value==="telefone")return"tel";if(r.value==="cpfCnpj"||r.value==="cep")return"numeric"});function l(i){switch(r.value){case"telefone":return pt(i);case"cpfCnpj":return ut(i);case"cep":return bt(i);default:return i}}function u(i){const d=i.target,b=l(d.value);d.value=b,s.value=b}return{attrs:a,emit:n,localValue:s,inputHtmlType:m,inputMode:o,onInput:u}}});function gt(e,a,n,r,s,m){var o,l,u,i;return t.openBlock(),t.createBlock(Ce.VTextField,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=d=>e.localValue=d),type:e.inputHtmlType,inputmode:e.inputMode,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(l=e.opcoes)==null?void 0:l.placeholder,counter:(u=e.opcoes)==null?void 0:u.limiteCaracteres,maxlength:(i=e.opcoes)==null?void 0:i.limiteCaracteres},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur")),onInput:e.onInput}),null,16,["modelValue","type","inputmode","label","placeholder","counter","maxlength","onInput"])}const $e=T(ht,[["render",gt]]),yt=t.defineComponent({name:"EliOlaMundo",components:{EliBotao:_e,EliBadge:ye,EliEntradaTexto:$e},setup(){const e=t.ref(""),a=t.ref(""),n=t.ref(""),r=t.ref(""),s=t.ref("");return{nome:e,email:r,documento:s,telefone:n,cep:a}}}),$t={class:"grid-example"};function Et(e,a,n,r,s,m){const o=t.resolveComponent("EliBadge"),l=t.resolveComponent("EliEntradaTexto"),u=t.resolveComponent("EliBotao");return t.openBlock(),t.createBlock(at.VContainer,null,{default:t.withCtx(()=>[t.createVNode(ie.VCard,{class:"mx-auto",max_width:"400"},{default:t.withCtx(()=>[t.createVNode(ie.VCardTitle,null,{default:t.withCtx(()=>[t.createVNode(o,{badge:"Novo","offset-x":"-15",location:"right center"},{default:t.withCtx(()=>[...a[5]||(a[5]=[t.createTextVNode(" Olá Mundo! ",-1)])]),_:1})]),_:1}),t.createVNode(ie.VCardText,null,{default:t.withCtx(()=>[a[6]||(a[6]=t.createTextVNode(" Este é um componente de exemplo integrado com Vuetify. ",-1)),t.createElementVNode("div",$t,[t.createVNode(l,{value:e.nome,"onUpdate:value":a[0]||(a[0]=i=>e.nome=i),opcoes:{rotulo:"Nome",placeholder:"Digite o nome"},density:"compact"},null,8,["value"]),t.createVNode(l,{value:e.telefone,"onUpdate:value":a[1]||(a[1]=i=>e.telefone=i),opcoes:{rotulo:"Telefone",formato:"telefone"}},null,8,["value"]),t.createVNode(l,{value:e.cep,"onUpdate:value":a[2]||(a[2]=i=>e.cep=i),opcoes:{rotulo:"CEP",placeholder:"00000-000",formato:"cep"}},null,8,["value"]),t.createVNode(l,{value:e.documento,"onUpdate:value":a[3]||(a[3]=i=>e.documento=i),opcoes:{rotulo:"CPF / CNPJ",formato:"cpfCnpj"}},null,8,["value"]),t.createVNode(l,{value:e.email,"onUpdate:value":a[4]||(a[4]=i=>e.email=i),opcoes:{rotulo:"Email",placeholder:"email@exemplo.com",formato:"email"}},null,8,["value"])])]),_:1}),t.createVNode(ie.VCardActions,null,{default:t.withCtx(()=>[t.createVNode(u,{color:"primary",variant:"elevated",block:""},{default:t.withCtx(()=>[...a[7]||(a[7]=[t.createTextVNode(" Botão Vuetify ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})}const Me=T(yt,[["render",Et]]),kt=t.defineComponent({name:"EliCartao",components:{EliBadge:ye},inheritAttrs:!1,props:{titulo:{type:String,default:""},status:{type:String,required:!0},variant:{type:String,default:"outlined"}},emits:{clicar:e=>!0},setup(e,{emit:a}){const n=t.computed(()=>e.status),r=t.computed(()=>{switch(e.status){case"novo":return"primary";case"rascunho":return"secondary";case"vendido":return"success";case"cancelado":return"error"}}),s=t.computed(()=>`eli-cartao--${e.status}`);function m(){a("clicar",e.status)}return{rotuloStatus:n,corStatus:r,classeStatus:s,onClick:m}}}),Bt={class:"eli-cartao__titulo-texto"},Ct={class:"eli-cartao__status"};function vt(e,a,n,r,s,m){const o=t.resolveComponent("EliBadge");return t.openBlock(),t.createBlock(ie.VCard,t.mergeProps({class:["eli-cartao",e.classeStatus],variant:e.variant},e.$attrs),{default:t.withCtx(()=>[t.createVNode(ie.VCardTitle,{class:"eli-cartao__titulo"},{default:t.withCtx(()=>[t.createElementVNode("div",Bt,[t.renderSlot(e.$slots,"titulo",{},()=>[t.createTextVNode(t.toDisplayString(e.titulo),1)])]),t.createElementVNode("div",Ct,[t.createVNode(o,{badge:e.rotuloStatus,radius:"pill",color:e.corStatus},{default:t.withCtx(()=>[...a[0]||(a[0]=[t.createElementVNode("span",null,null,-1)])]),_:1},8,["badge","color"])])]),_:3}),t.createVNode(ie.VCardText,{class:"eli-cartao__conteudo"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3}),e.$slots.acoes?(t.openBlock(),t.createBlock(ie.VCardActions,{key:0,class:"eli-cartao__acoes"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"acoes")]),_:3})):t.createCommentVNode("",!0)]),_:3},16,["variant","class"])}const we=T(kt,[["render",vt]]);var Te=(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))(Te||{});/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const _t=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Pe=e=>e==="";/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Vt=(...e)=>e.filter((a,n,r)=>!!a&&a.trim()!==""&&r.indexOf(a)===n).join(" ").trim();/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Fe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const St=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Dt=e=>{const a=St(e);return a.charAt(0).toUpperCase()+a.slice(1)};/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var be={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Nt=({name:e,iconNode:a,absoluteStrokeWidth:n,"absolute-stroke-width":r,strokeWidth:s,"stroke-width":m,size:o=be.width,color:l=be.stroke,...u},{slots:i})=>t.h("svg",{...be,...u,width:o,height:o,stroke:l,"stroke-width":Pe(n)||Pe(r)||n===!0||r===!0?Number(s||m||be["stroke-width"])*24/Number(o):s||m||be["stroke-width"],class:Vt("lucide",u.class,...e?[`lucide-${Fe(Dt(e))}-icon`,`lucide-${Fe(e)}`]:["lucide-icon"]),...!i.default&&!_t(u)&&{"aria-hidden":"true"}},[...a.map(d=>t.h(...d)),...i.default?[i.default()]:[]]);/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fe=(e,a)=>(n,{slots:r,attrs:s})=>t.h(Nt,{...s,...n,iconNode:a,name:e},r);/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Oe=fe("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const qe=fe("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ie=fe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Le=fe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const At=fe("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
|
||
* @license lucide-vue-next v0.563.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Mt=fe("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),wt=t.defineComponent({name:"EliTabelaCaixaDeBusca",components:{Search:Mt},props:{modelo:{type:String,required:!1,default:""}},emits:{buscar(e){return typeof e=="string"}},setup(e,{emit:a}){const n=t.ref(e.modelo??"");t.watch(()=>e.modelo,s=>{s!==void 0&&s!==n.value&&(n.value=s)});function r(){a("buscar",n.value.trim())}return{texto:n,emitirBusca:r}}}),Tt={class:"eli-tabela__busca"},Pt={class:"eli-tabela__busca-input-wrapper"};function Ft(e,a,n,r,s,m){const o=t.resolveComponent("Search");return t.openBlock(),t.createElementBlock("div",Tt,[t.createElementVNode("div",Pt,[t.withDirectives(t.createElementVNode("input",{id:"eli-tabela-busca","onUpdate:modelValue":a[0]||(a[0]=l=>e.texto=l),type:"search",class:"eli-tabela__busca-input",placeholder:"Digite termos para filtrar",onKeyup:a[1]||(a[1]=t.withKeys((...l)=>e.emitirBusca&&e.emitirBusca(...l),["enter"]))},null,544),[[t.vModelText,e.texto]]),t.createElementVNode("button",{type:"button",class:"eli-tabela__busca-botao","aria-label":"Buscar",title:"Buscar",onClick:a[2]||(a[2]=(...l)=>e.emitirBusca&&e.emitirBusca(...l))},[t.createVNode(o,{class:"eli-tabela__busca-botao-icone",size:16,"stroke-width":2,"aria-hidden":"true"})])])])}const Ot=T(wt,[["render",Ft]]),qt=t.defineComponent({name:"EliTabelaCabecalho",components:{EliTabelaCaixaDeBusca:Ot},props:{exibirBusca:{type:Boolean,required:!0},exibirBotaoColunas:{type:Boolean,required:!1,default:!0},exibirBotaoFiltroAvancado:{type:Boolean,required:!1,default:!1},valorBusca:{type:String,required:!0},acoesCabecalho:{type:Array,required:!0}},emits:{buscar(e){return typeof e=="string"},colunas(){return!0},filtroAvancado(){return!0}},setup(e,{emit:a}){const n=t.computed(()=>e.acoesCabecalho.length>0);function r(o){a("buscar",o)}function s(){a("colunas")}function m(){a("filtroAvancado")}return{temAcoesCabecalho:n,emitBuscar:r,emitColunas:s,emitFiltroAvancado:m}}}),It={class:"eli-tabela__cabecalho"},Lt={key:0,class:"eli-tabela__busca-grupo"},zt={key:1,class:"eli-tabela__acoes-cabecalho"},jt=["onClick"],Ht={class:"eli-tabela__acoes-cabecalho-rotulo"};function Ut(e,a,n,r,s,m){const o=t.resolveComponent("EliTabelaCaixaDeBusca");return t.openBlock(),t.createElementBlock("div",It,[e.exibirBusca?(t.openBlock(),t.createElementBlock("div",Lt,[e.exibirBotaoColunas?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--colunas",onClick:a[0]||(a[0]=(...l)=>e.emitColunas&&e.emitColunas(...l))}," Colunas ")):t.createCommentVNode("",!0),e.exibirBotaoFiltroAvancado?(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:"eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--filtro",onClick:a[1]||(a[1]=(...l)=>e.emitFiltroAvancado&&e.emitFiltroAvancado(...l))}," Filtro ")):t.createCommentVNode("",!0),t.createVNode(o,{modelo:e.valorBusca,onBuscar:e.emitBuscar},null,8,["modelo","onBuscar"])])):t.createCommentVNode("",!0),e.temAcoesCabecalho?(t.openBlock(),t.createElementBlock("div",zt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoesCabecalho,(l,u)=>(t.openBlock(),t.createElementBlock("button",{key:`${l.rotulo}-${u}`,type:"button",class:"eli-tabela__acoes-cabecalho-botao",style:t.normalizeStyle(l.cor?{backgroundColor:l.cor,color:"#fff"}:void 0),onClick:l.acao},[l.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icone),{key:0,class:"eli-tabela__acoes-cabecalho-icone",size:16,"stroke-width":2})):t.createCommentVNode("",!0),t.createElementVNode("span",Ht,t.toDisplayString(l.rotulo),1)],12,jt))),128))])):t.createCommentVNode("",!0)])}const Yt=T(qt,[["render",Ut]]),Rt=t.defineComponent({name:"EliTabelaEstados",props:{carregando:{type:Boolean,required:!0},erro:{type:String,required:!0},mensagemVazio:{type:String,required:!1,default:void 0}}}),Jt={key:0,class:"eli-tabela eli-tabela--carregando","aria-busy":"true"},Wt={key:1,class:"eli-tabela eli-tabela--erro",role:"alert"},Zt={class:"eli-tabela__erro-mensagem"},Gt={key:2,class:"eli-tabela eli-tabela--vazio"};function Xt(e,a,n,r,s,m){return e.carregando?(t.openBlock(),t.createElementBlock("div",Jt," Carregando... ")):e.erro?(t.openBlock(),t.createElementBlock("div",Wt,[a[0]||(a[0]=t.createElementVNode("div",{class:"eli-tabela__erro-titulo"},"Erro",-1)),t.createElementVNode("div",Zt,t.toDisplayString(e.erro),1)])):(t.openBlock(),t.createElementBlock("div",Gt,t.toDisplayString(e.mensagemVazio??"Nenhum registro encontrado."),1))}const Kt=T(Rt,[["render",Xt]]),Qt=t.defineComponent({name:"EliTabelaDebug",props:{isDev:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},menuPopupPos:{type:Object,required:!0}}}),xt={key:0,style:{position:"fixed",left:"8px",bottom:"8px","z-index":"999999",background:"rgba(185,28,28,0.9)",color:"#fff",padding:"6px 10px","border-radius":"8px","font-size":"12px","max-width":"500px"}};function ea(e,a,n,r,s,m){return e.isDev?(t.openBlock(),t.createElementBlock("div",xt,[a[0]||(a[0]=t.createElementVNode("div",null,[t.createElementVNode("b",null,"EliTabela debug")],-1)),t.createElementVNode("div",null,"menuAberto: "+t.toDisplayString(e.menuAberto),1),t.createElementVNode("div",null,"menuPos: top="+t.toDisplayString(e.menuPopupPos.top)+", left="+t.toDisplayString(e.menuPopupPos.left),1),t.renderSlot(e.$slots,"default")])):t.createCommentVNode("",!0)}const ta=T(Qt,[["render",ea]]),aa=t.defineComponent({name:"EliTabelaHead",components:{ArrowUp:qe,ArrowDown:Oe},props:{colunas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},colunaOrdenacao:{type:String,required:!0},direcaoOrdenacao:{type:String,required:!0}},emits:{alternarOrdenacao(e){return typeof e=="string"&&e.length>0}},setup(e,{emit:a}){function n(s){return(s==null?void 0:s.coluna_ordem)!==void 0&&(s==null?void 0:s.coluna_ordem)!==null}function r(s){a("alternarOrdenacao",s)}return{ArrowUp:qe,ArrowDown:Oe,isOrdenavel:n,emitAlternarOrdenacao:r}}}),oa={class:"eli-tabela__thead"},na={class:"eli-tabela__tr eli-tabela__tr--header"},la={key:0,class:"eli-tabela__th eli-tabela__th--expander",scope:"col"},ra=["onClick"],ia={class:"eli-tabela__th-texto"},sa={key:1,class:"eli-tabela__th-label"},ca={key:1,class:"eli-tabela__th eli-tabela__th--acoes",scope:"col"};function da(e,a,n,r,s,m){const o=t.resolveComponent("ArrowUp");return t.openBlock(),t.createElementBlock("thead",oa,[t.createElementVNode("tr",na,[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("th",la)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(l,u)=>(t.openBlock(),t.createElementBlock("th",{key:`th-${u}`,class:t.normalizeClass(["eli-tabela__th",[e.isOrdenavel(l)?"eli-tabela__th--ordenavel":void 0]]),scope:"col"},[e.isOrdenavel(l)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:t.normalizeClass(["eli-tabela__th-botao",[e.colunaOrdenacao===String(l.coluna_ordem)?"eli-tabela__th-botao--ativo":void 0]]),onClick:i=>e.emitAlternarOrdenacao(String(l.coluna_ordem))},[t.createElementVNode("span",ia,t.toDisplayString(l.rotulo),1),e.colunaOrdenacao===String(l.coluna_ordem)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.direcaoOrdenacao==="asc"?e.ArrowUp:e.ArrowDown),{key:0,class:"eli-tabela__th-icone",size:16,"stroke-width":2,"aria-hidden":"true"})):(t.openBlock(),t.createBlock(o,{key:1,class:"eli-tabela__th-icone eli-tabela__th-icone--oculto",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,ra)):(t.openBlock(),t.createElementBlock("span",sa,t.toDisplayString(l.rotulo),1))],2))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("th",ca," Ações ")):t.createCommentVNode("",!0)])])}const ua=T(aa,[["render",da]]),ma=t.defineComponent({name:"EliTabelaCelulaTextoSimples",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}}),pa={key:1};function fa(e,a,n,r,s,m){var o,l,u;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(i=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString((l=e.dados)==null?void 0:l.texto),1)):(t.openBlock(),t.createElementBlock("span",pa,t.toDisplayString((u=e.dados)==null?void 0:u.texto),1))}const ba=T(ma,[["render",fa]]),ha=t.defineComponent({name:"EliTabelaCelulaTextoTruncado",props:{dados:{type:Object}},setup({dados:e}){return{dados:e}}}),ga=["title"],ya=["title"];function $a(e,a,n,r,s,m){var o,l,u,i,d;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__texto-truncado eli-tabela__celula-link",title:(l=e.dados)==null?void 0:l.texto,onClick:a[0]||(a[0]=t.withModifiers(b=>{var C,v;return(v=(C=e.dados)==null?void 0:C.acao)==null?void 0:v.call(C)},["stop","prevent"]))},t.toDisplayString((u=e.dados)==null?void 0:u.texto),9,ga)):(t.openBlock(),t.createElementBlock("span",{key:1,class:"eli-tabela__texto-truncado",title:(i=e.dados)==null?void 0:i.texto},t.toDisplayString((d=e.dados)==null?void 0:d.texto),9,ya))}const Ea=T(ha,[["render",$a]]),ka=t.defineComponent({name:"EliTabelaCelulaNumero",components:{},props:{dados:{type:Object}},setup({dados:e}){const a=t.computed(()=>{var l,u;const n=String(e==null?void 0:e.numero).replace(".",","),r=(l=e==null?void 0:e.prefixo)==null?void 0:l.trim(),s=(u=e==null?void 0:e.sufixo)==null?void 0:u.trim(),m=r?`${r} `:"",o=s?` ${s}`:"";return`${m}${n}${o}`});return{dados:e,textoNumero:a}}}),Ba={key:1};function Ca(e,a,n,r,s,m){var o;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(l=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString(e.textoNumero),1)):(t.openBlock(),t.createElementBlock("span",Ba,t.toDisplayString(e.textoNumero),1))}const va=T(ka,[["render",Ca]]),_a=t.defineComponent({name:"EliTabelaCelulaTags",components:{VChip:ve.VChip},props:{dados:{type:Object,required:!1}},setup({dados:e}){return{dados:e}}}),Va={class:"eli-tabela__celula-tags"};function Sa(e,a,n,r,s,m){var o;return t.openBlock(),t.createElementBlock("div",Va,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(((o=e.dados)==null?void 0:o.opcoes)??[],(l,u)=>(t.openBlock(),t.createBlock(ot.VChip,{key:u,class:"eli-tabela__celula-tag",size:"small",variant:"tonal",color:l.cor,clickable:!!l.acao,onClick:t.withModifiers(i=>{var d;return(d=l.acao)==null?void 0:d.call(l)},["stop","prevent"])},{default:t.withCtx(()=>[l.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icone),{key:0,class:"eli-tabela__celula-tag-icone",size:14})):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(l.rotulo),1)]),_:2},1032,["color","clickable","onClick"]))),128))])}const Da=T(_a,[["render",Sa]]);function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ee={exports:{}},Na=Ee.exports,je;function Aa(){return je||(je=1,(function(e,a){(function(n,r){e.exports=r()})(Na,(function(){var n=1e3,r=6e4,s=36e5,m="millisecond",o="second",l="minute",u="hour",i="day",d="week",b="month",C="quarter",v="year",y="date",c="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,E={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(_){var h=["th","st","nd","rd"],p=_%100;return"["+_+(h[(p-20)%10]||h[p]||h[0])+"]"}},j=function(_,h,p){var k=String(_);return!k||k.length>=h?_:""+Array(h+1-k.length).join(p)+_},W={s:j,z:function(_){var h=-_.utcOffset(),p=Math.abs(h),k=Math.floor(p/60),f=p%60;return(h<=0?"+":"-")+j(k,2,"0")+":"+j(f,2,"0")},m:function _(h,p){if(h.date()<p.date())return-_(p,h);var k=12*(p.year()-h.year())+(p.month()-h.month()),f=h.clone().add(k,b),V=p-f<0,S=h.clone().add(k+(V?-1:1),b);return+(-(k+(p-f)/(V?f-S:S-f))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:b,y:v,w:d,d:i,D:y,h:u,m:l,s:o,ms:m,Q:C}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},L="en",H={};H[L]=E;var X="$isDayjsObject",P=function(_){return _ instanceof ue||!(!_||!_[X])},ae=function _(h,p,k){var f;if(!h)return L;if(typeof h=="string"){var V=h.toLowerCase();H[V]&&(f=V),p&&(H[V]=p,f=V);var S=h.split("-");if(!f&&S.length>1)return _(S[0])}else{var A=h.name;H[A]=h,f=A}return!k&&f&&(L=f),f||!k&&L},M=function(_,h){if(P(_))return _.clone();var p=typeof h=="object"?h:{};return p.date=_,p.args=arguments,new ue(p)},D=W;D.l=ae,D.i=P,D.w=function(_,h){return M(_,{locale:h.$L,utc:h.$u,x:h.$x,$offset:h.$offset})};var ue=(function(){function _(p){this.$L=ae(p.locale,null,!0),this.parse(p),this.$x=this.$x||p.x||{},this[X]=!0}var h=_.prototype;return h.parse=function(p){this.$d=(function(k){var f=k.date,V=k.utc;if(f===null)return new Date(NaN);if(D.u(f))return new Date;if(f instanceof Date)return new Date(f);if(typeof f=="string"&&!/Z$/i.test(f)){var S=f.match($);if(S){var A=S[2]-1||0,q=(S[7]||"0").substring(0,3);return V?new Date(Date.UTC(S[1],A,S[3]||1,S[4]||0,S[5]||0,S[6]||0,q)):new Date(S[1],A,S[3]||1,S[4]||0,S[5]||0,S[6]||0,q)}}return new Date(f)})(p),this.init()},h.init=function(){var p=this.$d;this.$y=p.getFullYear(),this.$M=p.getMonth(),this.$D=p.getDate(),this.$W=p.getDay(),this.$H=p.getHours(),this.$m=p.getMinutes(),this.$s=p.getSeconds(),this.$ms=p.getMilliseconds()},h.$utils=function(){return D},h.isValid=function(){return this.$d.toString()!==c},h.isSame=function(p,k){var f=M(p);return this.startOf(k)<=f&&f<=this.endOf(k)},h.isAfter=function(p,k){return M(p)<this.startOf(k)},h.isBefore=function(p,k){return this.endOf(k)<M(p)},h.$g=function(p,k,f){return D.u(p)?this[k]:this.set(f,p)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(p,k){var f=this,V=!!D.u(k)||k,S=D.p(p),A=function(oe,J){var ne=D.w(f.$u?Date.UTC(f.$y,J,oe):new Date(f.$y,J,oe),f);return V?ne:ne.endOf(i)},q=function(oe,J){return D.w(f.toDate()[oe].apply(f.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(J)),f)},U=this.$W,Y=this.$M,Z=this.$D,ce="set"+(this.$u?"UTC":"");switch(S){case v:return V?A(1,0):A(31,11);case b:return V?A(1,Y):A(0,Y+1);case d:var Q=this.$locale().weekStart||0,de=(U<Q?U+7:U)-Q;return A(V?Z-de:Z+(6-de),Y);case i:case y:return q(ce+"Hours",0);case u:return q(ce+"Minutes",1);case l:return q(ce+"Seconds",2);case o:return q(ce+"Milliseconds",3);default:return this.clone()}},h.endOf=function(p){return this.startOf(p,!1)},h.$set=function(p,k){var f,V=D.p(p),S="set"+(this.$u?"UTC":""),A=(f={},f[i]=S+"Date",f[y]=S+"Date",f[b]=S+"Month",f[v]=S+"FullYear",f[u]=S+"Hours",f[l]=S+"Minutes",f[o]=S+"Seconds",f[m]=S+"Milliseconds",f)[V],q=V===i?this.$D+(k-this.$W):k;if(V===b||V===v){var U=this.clone().set(y,1);U.$d[A](q),U.init(),this.$d=U.set(y,Math.min(this.$D,U.daysInMonth())).$d}else A&&this.$d[A](q);return this.init(),this},h.set=function(p,k){return this.clone().$set(p,k)},h.get=function(p){return this[D.p(p)]()},h.add=function(p,k){var f,V=this;p=Number(p);var S=D.p(k),A=function(Y){var Z=M(V);return D.w(Z.date(Z.date()+Math.round(Y*p)),V)};if(S===b)return this.set(b,this.$M+p);if(S===v)return this.set(v,this.$y+p);if(S===i)return A(1);if(S===d)return A(7);var q=(f={},f[l]=r,f[u]=s,f[o]=n,f)[S]||1,U=this.$d.getTime()+p*q;return D.w(U,this)},h.subtract=function(p,k){return this.add(-1*p,k)},h.format=function(p){var k=this,f=this.$locale();if(!this.isValid())return f.invalidDate||c;var V=p||"YYYY-MM-DDTHH:mm:ssZ",S=D.z(this),A=this.$H,q=this.$m,U=this.$M,Y=f.weekdays,Z=f.months,ce=f.meridiem,Q=function(J,ne,me,pe){return J&&(J[ne]||J(k,V))||me[ne].slice(0,pe)},de=function(J){return D.s(A%12||12,J,"0")},oe=ce||function(J,ne,me){var pe=J<12?"AM":"PM";return me?pe.toLowerCase():pe};return V.replace(g,(function(J,ne){return ne||(function(me){switch(me){case"YY":return String(k.$y).slice(-2);case"YYYY":return D.s(k.$y,4,"0");case"M":return U+1;case"MM":return D.s(U+1,2,"0");case"MMM":return Q(f.monthsShort,U,Z,3);case"MMMM":return Q(Z,U);case"D":return k.$D;case"DD":return D.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return Q(f.weekdaysMin,k.$W,Y,2);case"ddd":return Q(f.weekdaysShort,k.$W,Y,3);case"dddd":return Y[k.$W];case"H":return String(A);case"HH":return D.s(A,2,"0");case"h":return de(1);case"hh":return de(2);case"a":return oe(A,q,!0);case"A":return oe(A,q,!1);case"m":return String(q);case"mm":return D.s(q,2,"0");case"s":return String(k.$s);case"ss":return D.s(k.$s,2,"0");case"SSS":return D.s(k.$ms,3,"0");case"Z":return S}return null})(J)||S.replace(":","")}))},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(p,k,f){var V,S=this,A=D.p(k),q=M(p),U=(q.utcOffset()-this.utcOffset())*r,Y=this-q,Z=function(){return D.m(S,q)};switch(A){case v:V=Z()/12;break;case b:V=Z();break;case C:V=Z()/3;break;case d:V=(Y-U)/6048e5;break;case i:V=(Y-U)/864e5;break;case u:V=Y/s;break;case l:V=Y/r;break;case o:V=Y/n;break;default:V=Y}return f?V:D.a(V)},h.daysInMonth=function(){return this.endOf(b).$D},h.$locale=function(){return H[this.$L]},h.locale=function(p,k){if(!p)return this.$L;var f=this.clone(),V=ae(p,k,!0);return V&&(f.$L=V),f},h.clone=function(){return D.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},_})(),he=ue.prototype;return M.prototype=he,[["$ms",m],["$s",o],["$m",l],["$H",u],["$W",i],["$M",b],["$y",v],["$D",y]].forEach((function(_){he[_[1]]=function(h){return this.$g(h,_[0],_[1])}})),M.extend=function(_,h){return _.$i||(_(h,ue,M),_.$i=!0),M},M.locale=ae,M.isDayjs=P,M.unix=function(_){return M(1e3*_)},M.en=H[L],M.Ls=H,M.p={},M}))})(Ee)),Ee.exports}var Ma=Aa();const se=ze(Ma);var ke={exports:{}},wa=ke.exports,He;function Ta(){return He||(He=1,(function(e,a){(function(n,r){e.exports=r()})(wa,(function(){return function(n,r,s){n=n||{};var m=r.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function l(i,d,b,C){return m.fromToBase(i,d,b,C)}s.en.relativeTime=o,m.fromToBase=function(i,d,b,C,v){for(var y,c,$,g=b.$locale().relativeTime||o,E=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],j=E.length,W=0;W<j;W+=1){var L=E[W];L.d&&(y=C?s(i).diff(b,L.d,!0):b.diff(i,L.d,!0));var H=(n.rounding||Math.round)(Math.abs(y));if($=y>0,H<=L.r||!L.r){H<=1&&W>0&&(L=E[W-1]);var X=g[L.l];v&&(H=v(""+H)),c=typeof X=="string"?X.replace("%d",H):X(H,d,L.l,$);break}}if(d)return c;var P=$?g.future:g.past;return typeof P=="function"?P(c):P.replace("%s",c)},m.to=function(i,d){return l(i,d,this,!0)},m.from=function(i,d){return l(i,d,this)};var u=function(i){return i.$u?s.utc():s()};m.toNow=function(i){return this.to(u(this),i)},m.fromNow=function(i){return this.from(u(this),i)}}}))})(ke)),ke.exports}var Pa=Ta();const Fa=ze(Pa);se.extend(Fa);const Oa=t.defineComponent({name:"EliTabelaCelulaData",props:{dados:{type:Object,required:!1}},setup({dados:e}){const a=t.computed(()=>{const n=e==null?void 0:e.valor;if(!n)return"";const r=(e==null?void 0:e.formato)??"data";return r==="relativo"?se(n).fromNow():r==="data_hora"?se(n).format("DD/MM/YYYY HH:mm"):se(n).format("DD/MM/YYYY")});return{dados:e,textoData:a}}}),qa={key:1};function Ia(e,a,n,r,s,m){var o;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(l=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString(e.textoData),1)):(t.openBlock(),t.createElementBlock("span",qa,t.toDisplayString(e.textoData),1))}const La={textoSimples:ba,textoTruncado:Ea,numero:va,tags:Da,data:T(Oa,[["render",Ia]])},za=t.defineComponent({name:"EliTabelaCelula",props:{celula:{type:Array,required:!0}},setup(e){const a=t.computed(()=>e.celula[0]),n=t.computed(()=>e.celula[1]),r=t.computed(()=>La[a.value]),s=t.computed(()=>n.value);return{Componente:r,dadosParaComponente:s}}});function ja(e,a,n,r,s,m){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Componente),{dados:e.dadosParaComponente},null,8,["dados"])}const Ue=T(za,[["render",ja]]),Ha=t.defineComponent({name:"EliTabelaDetalhesLinha",components:{EliTabelaCelula:Ue},props:{linha:{type:null,required:!0},colunasInvisiveis:{type:Array,required:!0}}}),Ua={class:"eli-tabela__detalhes"},Ya={class:"eli-tabela__detalhe-rotulo"},Ra={class:"eli-tabela__detalhe-valor"};function Ja(e,a,n,r,s,m){const o=t.resolveComponent("EliTabelaCelula");return t.openBlock(),t.createElementBlock("div",Ua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunasInvisiveis,(l,u)=>(t.openBlock(),t.createElementBlock("div",{key:`det-${u}-${l.rotulo}`,class:"eli-tabela__detalhe"},[t.createElementVNode("div",Ya,t.toDisplayString(l.rotulo),1),t.createElementVNode("div",Ra,[t.createVNode(o,{celula:l.celula(e.linha)},null,8,["celula"])])]))),128))])}const Wa=T(Ha,[["render",Ja]]),Za=t.defineComponent({name:"EliTabelaBody",components:{EliTabelaCelula:Ue,EliTabelaDetalhesLinha:Wa,MoreVertical:At,ChevronRight:Le,ChevronDown:Ie},props:{colunas:{type:Array,required:!0},colunasInvisiveis:{type:Array,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},linhasExpandidas:{type:Object,required:!0},linhas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},possuiAcoes:{type:Function,required:!0},toggleMenu:{type:Function,required:!0},alternarLinhaExpandida:{type:Function,required:!0}},setup(){return{ChevronRight:Le,ChevronDown:Ie}}}),Ga={class:"eli-tabela__tbody"},Xa=["aria-expanded","aria-label","title","onClick"],Ka=["id","disabled","aria-expanded","aria-controls","aria-label","title","onClick"],Qa=["colspan"];function xa(e,a,n,r,s,m){const o=t.resolveComponent("EliTabelaCelula"),l=t.resolveComponent("MoreVertical"),u=t.resolveComponent("EliTabelaDetalhesLinha");return t.openBlock(),t.createElementBlock("tbody",Ga,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.linhas,(i,d)=>{var b,C,v,y,c,$;return t.openBlock(),t.createElementBlock(t.Fragment,{key:`grp-${d}`},[t.createElementVNode("tr",{class:t.normalizeClass(["eli-tabela__tr",[d%2===1?"eli-tabela__tr--zebra":void 0]])},[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--expander",key:`td-${d}-exp`},[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["eli-tabela__expander-botao",[(b=e.linhasExpandidas)!=null&&b[d]?"eli-tabela__expander-botao--ativo":void 0]]),"aria-expanded":(C=e.linhasExpandidas)!=null&&C[d]?"true":"false","aria-label":(v=e.linhasExpandidas)!=null&&v[d]?"Ocultar colunas ocultas":"Mostrar colunas ocultas",title:(y=e.linhasExpandidas)!=null&&y[d]?"Ocultar detalhes":"Mostrar detalhes",onClick:t.withModifiers(g=>e.alternarLinhaExpandida(d),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((c=e.linhasExpandidas)!=null&&c[d]?e.ChevronDown:e.ChevronRight),{class:"eli-tabela__expander-icone",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,Xa)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(g,E)=>(t.openBlock(),t.createElementBlock("td",{key:`td-${d}-${E}`,class:"eli-tabela__td"},[t.createVNode(o,{celula:g.celula(i)},null,8,["celula"])]))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--acoes",key:`td-${d}-acoes`},[t.createElementVNode("div",{class:t.normalizeClass(["eli-tabela__acoes-container",[e.menuAberto===d?"eli-tabela__acoes-container--aberto":void 0]])},[t.createElementVNode("button",{class:"eli-tabela__acoes-toggle",type:"button",id:`eli-tabela-acoes-toggle-${d}`,disabled:!e.possuiAcoes(d),"aria-haspopup":"menu","aria-expanded":e.menuAberto===d?"true":"false","aria-controls":e.possuiAcoes(d)?`eli-tabela-acoes-menu-${d}`:void 0,"aria-label":e.possuiAcoes(d)?"Ações da linha":"Nenhuma ação disponível",title:e.possuiAcoes(d)?"Ações":"Nenhuma ação disponível",onClick:t.withModifiers(g=>e.toggleMenu(d,g),["stop"])},[t.createVNode(l,{class:"eli-tabela__acoes-toggle-icone",size:18,"stroke-width":2})],8,Ka)],2)])):t.createCommentVNode("",!0)],2),e.temColunasInvisiveis&&(($=e.linhasExpandidas)!=null&&$[d])?(t.openBlock(),t.createElementBlock("tr",{key:0,class:t.normalizeClass(["eli-tabela__tr eli-tabela__tr--detalhes",[d%2===1?"eli-tabela__tr--zebra":void 0]])},[t.createElementVNode("td",{class:"eli-tabela__td eli-tabela__td--detalhes",colspan:(e.temColunasInvisiveis?1:0)+e.colunas.length+(e.temAcoes?1:0)},[t.createVNode(u,{linha:i,colunasInvisiveis:e.colunasInvisiveis},null,8,["linha","colunasInvisiveis"])],8,Qa)],2)):t.createCommentVNode("",!0)],64)}),128))])}const eo=T(Za,[["render",xa]]),to=t.defineComponent({name:"EliTabelaMenuAcoes",props:{menuAberto:{type:Number,required:!0},posicao:{type:Object,required:!0},acoes:{type:Array,required:!0},linha:{type:null,required:!0}},emits:{executar(e){return e!==null&&typeof e=="object"}},setup(e,{emit:a,expose:n}){const r=t.ref(null);n({menuEl:r});const s=t.computed(()=>e.acoes.length>0);function m(o){e.linha&&a("executar",{acao:o.acao,linha:e.linha})}return{menuEl:r,possuiAcoes:s,emitExecutar:m}}}),ao=["id","aria-labelledby"],oo=["aria-label","title","onClick"],no={class:"eli-tabela__acoes-item-texto"};function lo(e,a,n,r,s,m){return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.menuAberto!==null&&e.possuiAcoes?(t.openBlock(),t.createElementBlock("ul",{key:0,id:`eli-tabela-acoes-menu-${e.menuAberto}`,ref:"menuEl",class:"eli-tabela__acoes-menu",role:"menu","aria-labelledby":`eli-tabela-acoes-toggle-${e.menuAberto}`,style:t.normalizeStyle({position:"fixed",top:`${e.posicao.top}px`,left:`${e.posicao.left}px`,zIndex:999999})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoes,o=>(t.openBlock(),t.createElementBlock("li",{key:`acao-${e.menuAberto}-${o.indice}`,class:"eli-tabela__acoes-item",role:"none"},[t.createElementVNode("button",{type:"button",class:"eli-tabela__acoes-item-botao",style:t.normalizeStyle({color:o.acao.cor}),role:"menuitem","aria-label":o.acao.rotulo,title:o.acao.rotulo,onClick:t.withModifiers(l=>e.emitExecutar(o),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.acao.icone),{class:"eli-tabela__acoes-item-icone",size:16,"stroke-width":2})),t.createElementVNode("span",no,t.toDisplayString(o.acao.rotulo),1)],12,oo)]))),128))],12,ao)):t.createCommentVNode("",!0)])}const ro=T(to,[["render",lo]]),io=t.defineComponent({name:"EliTabelaPaginacao",props:{pagina:{type:Number,required:!0},totalPaginas:{type:Number,required:!0},maximoBotoes:{type:Number,required:!1}},emits:{alterar(e){return Number.isFinite(e)}},setup(e,{emit:a}){const n=t.computed(()=>{const i=e.maximoBotoes;return typeof i=="number"&&i>=5?Math.floor(i):7}),r=t.computed(()=>{const i=e.totalPaginas,d=e.pagina,b=n.value,C=[],v=E=>{C.push({label:String(E),pagina:E,ativo:E===d})},y=()=>{C.push({label:"…",ehEllipsis:!0})};if(i<=b){for(let E=1;E<=i;E+=1)v(E);return C}const c=Math.max(3,b-2);let $=Math.max(2,d-Math.floor(c/2)),g=$+c-1;g>=i&&(g=i-1,$=g-c+1),v(1),$>2&&y();for(let E=$;E<=g;E+=1)v(E);return g<i-1&&y(),v(i),C});function s(i){if(!i)return;const d=Math.min(Math.max(1,i),e.totalPaginas);d!==e.pagina&&a("alterar",d)}const m=t.computed(()=>e.pagina<=1),o=t.computed(()=>e.pagina>=e.totalPaginas),l=t.computed(()=>e.pagina),u=t.computed(()=>e.totalPaginas);return{botoes:r,irParaPagina:s,anteriorDesabilitado:m,proximaDesabilitada:o,paginaAtual:l,totalPaginasExibidas:u}}}),so={key:0,class:"eli-tabela__paginacao",role:"navigation","aria-label":"Paginação de resultados"},co=["disabled"],uo={key:0,class:"eli-tabela__pagina-ellipsis","aria-hidden":"true"},mo=["disabled","aria-current","aria-label","onClick"],po=["disabled"];function fo(e,a,n,r,s,m){return e.totalPaginasExibidas>1?(t.openBlock(),t.createElementBlock("nav",so,[t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.anteriorDesabilitado,"aria-label":"Página anterior",onClick:a[0]||(a[0]=o=>e.irParaPagina(e.paginaAtual-1))}," << ",8,co),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.botoes,(o,l)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${o.label}-${l}`},[o.ehEllipsis?(t.openBlock(),t.createElementBlock("span",uo,t.toDisplayString(o.label),1)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:t.normalizeClass(["eli-tabela__pagina-botao",o.ativo?"eli-tabela__pagina-botao--ativo":void 0]),disabled:o.ativo,"aria-current":o.ativo?"page":void 0,"aria-label":`Ir para página ${o.label}`,onClick:u=>e.irParaPagina(o.pagina)},t.toDisplayString(o.label),11,mo))],64))),128)),t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.proximaDesabilitada,"aria-label":"Próxima página",onClick:a[1]||(a[1]=o=>e.irParaPagina(e.paginaAtual+1))}," >> ",8,po)])):t.createCommentVNode("",!0)}const bo=T(io,[["render",fo]]),Ye="application/x-eli-tabela-coluna",ho=t.defineComponent({name:"EliTabelaModalColunas",props:{aberto:{type:Boolean,required:!0},rotulosColunas:{type:Array,required:!0},configInicial:{type:Object,required:!0},colunas:{type:Array,required:!0}},emits:{fechar(){return!0},salvar(e){return!0}},setup(e,{emit:a}){const n=t.ref([]),r=t.ref([]);function s(){var H,X;const y=e.rotulosColunas,c=(((H=e.configInicial.visiveis)==null?void 0:H.length)??0)>0||(((X=e.configInicial.invisiveis)==null?void 0:X.length)??0)>0,$=new Set(e.colunas.filter(P=>P.visivel===!1).map(P=>P.rotulo)),g=c?new Set(e.configInicial.invisiveis??[]):$,E=y.filter(P=>!g.has(P)),j=e.configInicial.visiveis??[],W=new Set(E),L=[];for(const P of j)W.has(P)&&L.push(P);for(const P of E)L.includes(P)||L.push(P);n.value=L,r.value=y.filter(P=>g.has(P))}t.watch(()=>[e.aberto,e.rotulosColunas,e.configInicial,e.colunas],()=>{e.aberto&&s()},{deep:!0,immediate:!0});function m(){a("fechar")}function o(){a("salvar",{visiveis:[...n.value],invisiveis:[...r.value]})}function l(y,c){var $,g;try{($=y.dataTransfer)==null||$.setData(Ye,JSON.stringify(c)),(g=y.dataTransfer)==null||g.setData("text/plain",c.rotulo),y.dataTransfer.effectAllowed="move"}catch{}}function u(y){var c;try{const $=(c=y.dataTransfer)==null?void 0:c.getData(Ye);if(!$)return null;const g=JSON.parse($);return!g||typeof g.rotulo!="string"||g.origem!=="visiveis"&&g.origem!=="invisiveis"?null:g}catch{return null}}function i(y){const c=y.origem==="visiveis"?n.value:r.value,$=c.indexOf(y.rotulo);$>=0&&c.splice($,1)}function d(y,c,$){const g=y==="visiveis"?n.value:r.value,E=g.indexOf(c);E>=0&&g.splice(E,1),$===null||$<0||$>g.length?g.push(c):g.splice($,0,c)}function b(y,c,$,g){l(y,{rotulo:c,origem:$,index:g})}function C(y,c,$){const g=u(y);if(g)if(i(g),d(c,g.rotulo,$),c==="visiveis"){const E=r.value.indexOf(g.rotulo);E>=0&&r.value.splice(E,1)}else{const E=n.value.indexOf(g.rotulo);E>=0&&n.value.splice(E,1)}}function v(y,c,$){const g=u(y);if(g)if(i(g),d(c,g.rotulo,null),c==="visiveis"){const E=r.value.indexOf(g.rotulo);E>=0&&r.value.splice(E,1)}else{const E=n.value.indexOf(g.rotulo);E>=0&&n.value.splice(E,1)}}return{visiveisLocal:n,invisiveisLocal:r,emitFechar:m,emitSalvar:o,onDragStart:b,onDropItem:C,onDropLista:v}}}),go={class:"eli-tabela-modal-colunas__modal",role:"dialog","aria-modal":"true","aria-label":"Configurar colunas"},yo={class:"eli-tabela-modal-colunas__header"},$o={class:"eli-tabela-modal-colunas__conteudo"},Eo={class:"eli-tabela-modal-colunas__coluna"},ko=["onDragstart","onDrop"],Bo={class:"eli-tabela-modal-colunas__item-texto"},Co={class:"eli-tabela-modal-colunas__coluna"},vo=["onDragstart","onDrop"],_o={class:"eli-tabela-modal-colunas__item-texto"},Vo={class:"eli-tabela-modal-colunas__footer"};function So(e,a,n,r,s,m){return e.aberto?(t.openBlock(),t.createElementBlock("div",{key:0,class:"eli-tabela-modal-colunas__overlay",role:"presentation",onClick:a[9]||(a[9]=t.withModifiers((...o)=>e.emitFechar&&e.emitFechar(...o),["self"]))},[t.createElementVNode("div",go,[t.createElementVNode("header",yo,[a[10]||(a[10]=t.createElementVNode("h3",{class:"eli-tabela-modal-colunas__titulo"},"Colunas",-1)),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__fechar","aria-label":"Fechar",onClick:a[0]||(a[0]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," × ")]),t.createElementVNode("div",$o,[t.createElementVNode("div",Eo,[a[12]||(a[12]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Visíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[2]||(a[2]=t.withModifiers(()=>{},["prevent"])),onDrop:a[3]||(a[3]=o=>e.onDropLista(o,"visiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.visiveisLocal,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:`vis-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:u=>e.onDragStart(u,o,"visiveis",l),onDragover:a[1]||(a[1]=t.withModifiers(()=>{},["prevent"])),onDrop:u=>e.onDropItem(u,"visiveis",l)},[a[11]||(a[11]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",Bo,t.toDisplayString(o),1)],40,ko))),128))],32)]),t.createElementVNode("div",Co,[a[14]||(a[14]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Invisíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[5]||(a[5]=t.withModifiers(()=>{},["prevent"])),onDrop:a[6]||(a[6]=o=>e.onDropLista(o,"invisiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.invisiveisLocal,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:`inv-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:u=>e.onDragStart(u,o,"invisiveis",l),onDragover:a[4]||(a[4]=t.withModifiers(()=>{},["prevent"])),onDrop:u=>e.onDropItem(u,"invisiveis",l)},[a[13]||(a[13]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",_o,t.toDisplayString(o),1)],40,vo))),128))],32)])]),t.createElementVNode("footer",Vo,[t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--sec",onClick:a[7]||(a[7]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," Cancelar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--prim",onClick:a[8]||(a[8]=(...o)=>e.emitSalvar&&e.emitSalvar(...o))}," Salvar ")])])])):t.createCommentVNode("",!0)}const Do=T(ho,[["render",So]]);function No(e){if(!Number.isFinite(e)||e<=0||e>=1)return 0;const a=e.toString();if(a.includes("e-")){const[,s]=a.split("e-"),m=Number(s);return Number.isFinite(m)?m:0}const n=a.indexOf(".");return n===-1?0:a.slice(n+1).replace(/0+$/,"").length}function Ao(e){const a=(e??"").trim().replace(/,/g,".");if(!a)return null;const n=Number(a);return Number.isNaN(n)?null:n}function Ve(e,a){return e==null?"":a===null?String(e):Number(e).toFixed(Math.max(0,a)).replace(/\./g,",")}function Re(e){return(e??"").replace(/\D+/g,"")}function Mo(e){const a=(e??"").replace(/[^0-9.,]+/g,""),n=a.match(/[.,]/);if(!n)return a;const r=n[0],s=a.indexOf(r),m=a.slice(0,s).replace(/[.,]/g,""),o=a.slice(s+1).replace(/[.,]/g,"");return`${m.length?m:"0"}${r}${o}`}function wo(e,a){if(a===null)return e;if(a<=0)return e.replace(/[.,]/g,"");const n=e.match(/[.,]/);if(!n)return e;const r=n[0],s=e.indexOf(r),m=e.slice(0,s),o=e.slice(s+1);return`${m}${r}${o.slice(0,a)}`}function To(e){const a=e.match(/^(\d+)[.,]$/);if(!a)return null;const n=Number(a[1]);return Number.isNaN(n)?null:n}const Po=t.defineComponent({name:"EliEntradaNumero",inheritAttrs:!1,props:{value:{type:[Number,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const r=t.computed(()=>{var d;const i=(d=e.opcoes)==null?void 0:d.precisao;return i==null?null:No(i)}),s=t.computed(()=>r.value===0),m=t.computed(()=>{const i=r.value;return i!==null&&i>0}),o=t.ref(""),l=t.ref(void 0);t.watch(()=>e.value,i=>{i!==l.value&&(o.value=Ve(i,r.value),l.value=i)},{immediate:!0});function u(i){if(m.value){const v=r.value??0,y=Re(i),c=y?Number(y):0,$=Math.pow(10,v),g=y?c/$:null,E=g===null?null:g;l.value=E,n("update:value",E),n("input",E),n("change",E),o.value=Ve(E,v);return}const d=s.value?Re(i):Mo(i),b=s.value?d:wo(d,r.value);let C=null;if(b){const y=(s.value?null:To(b))??Ao(b);C=y===null?null:y}l.value=C,n("update:value",C),n("input",C),n("change",C),o.value=Ve(C,r.value)}return{attrs:a,emit:n,displayValue:o,isInteiro:s,onUpdateModelValue:u}}}),Fo={class:"eli-entrada__prefixo"},Oo={class:"eli-entrada__sufixo"};function qo(e,a,n,r,s,m){var o,l,u,i;return t.openBlock(),t.createBlock(Ce.VTextField,t.mergeProps({"model-value":e.displayValue,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(l=e.opcoes)==null?void 0:l.placeholder,type:e.isInteiro?"number":"text",inputmode:e.isInteiro?"numeric":"decimal",pattern:e.isInteiro?"[0-9]*":"[0-9.,]*"},e.attrs,{"onUpdate:modelValue":e.onUpdateModelValue,onFocus:a[0]||(a[0]=()=>e.emit("focus")),onBlur:a[1]||(a[1]=()=>e.emit("blur"))}),t.createSlots({_:2},[(u=e.opcoes)!=null&&u.prefixo?{name:"prepend-inner",fn:t.withCtx(()=>[t.createElementVNode("span",Fo,t.toDisplayString(e.opcoes.prefixo),1)]),key:"0"}:void 0,(i=e.opcoes)!=null&&i.sufixo?{name:"append-inner",fn:t.withCtx(()=>[t.createElementVNode("span",Oo,t.toDisplayString(e.opcoes.sufixo),1)]),key:"1"}:void 0]),1040,["model-value","label","placeholder","type","inputmode","pattern","onUpdate:modelValue"])}const Se=T(Po,[["render",qo]]),Io=t.defineComponent({name:"EliEntradaDataHora",inheritAttrs:!1,props:{value:{type:String,default:void 0},opcoes:{type:Object,required:!1,default:void 0},modelValue:{type:String,default:null},modo:{type:String,default:void 0},rotulo:{type:String,default:void 0},placeholder:{type:String,default:void 0},desabilitado:{type:Boolean,default:void 0},limpavel:{type:Boolean,default:void 0},erro:{type:Boolean,default:void 0},mensagensErro:{type:[String,Array],default:void 0},dica:{type:String,default:void 0},dicaPersistente:{type:Boolean,default:void 0},densidade:{type:String,default:void 0},variante:{type:String,default:void 0},min:{type:String,default:void 0},max:{type:String,default:void 0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,"update:modelValue":e=>!0,alterar:e=>!0,foco:()=>!0,desfoco:()=>!0,focus:()=>!0,blur:()=>!0},setup(e,{emit:a,attrs:n}){const r=t.computed(()=>e.opcoes?e.opcoes:{rotulo:e.rotulo??"Data e hora",placeholder:e.placeholder??"",modo:e.modo??"dataHora",limpavel:e.limpavel,erro:e.erro,mensagensErro:e.mensagensErro,dica:e.dica,dicaPersistente:e.dicaPersistente,densidade:e.densidade,variante:e.variante,min:e.min,max:e.max}),s=t.computed(()=>r.value.modo??"dataHora"),m=t.computed(()=>!!e.desabilitado),o=t.computed(()=>s.value==="data"?"date":"datetime-local");function l(c){return s.value==="data"?se(c).format("YYYY-MM-DD"):se(c).format("YYYY-MM-DDTHH:mm")}function u(c){return s.value==="data"?se(`${c}T00:00`).format():se(c).format()}const i=t.computed(()=>e.value!==void 0?e.value??null:e.modelValue),d=t.computed({get:()=>i.value?l(i.value):"",set:c=>{const $=c&&c.length>0?c:null;if(!$){a("update:value",null),a("input",null),a("change",null),a("update:modelValue",null),a("alterar",null);return}const g=u($);a("update:value",g),a("input",g),a("change",g),a("update:modelValue",g),a("alterar",g)}}),b=t.computed(()=>{const c=r.value.min;if(c)return l(c)}),C=t.computed(()=>{const c=r.value.max;if(c)return l(c)});function v(){a("foco"),a("focus")}function y(){a("desfoco"),a("blur")}return{attrs:n,valor:d,tipoInput:o,minLocal:b,maxLocal:C,opcoesEfetivas:r,desabilitadoEfetivo:m,emitCompatFocus:v,emitCompatBlur:y}}}),Lo={class:"eli-data-hora"};function zo(e,a,n,r,s,m){return t.openBlock(),t.createElementBlock("div",Lo,[t.createVNode(Ce.VTextField,t.mergeProps({modelValue:e.valor,"onUpdate:modelValue":a[0]||(a[0]=o=>e.valor=o),type:e.tipoInput,label:e.opcoesEfetivas.rotulo,placeholder:e.opcoesEfetivas.placeholder,disabled:e.desabilitadoEfetivo,clearable:!!e.opcoesEfetivas.limpavel,error:!!e.opcoesEfetivas.erro,"error-messages":e.opcoesEfetivas.mensagensErro,hint:e.opcoesEfetivas.dica,"persistent-hint":!!e.opcoesEfetivas.dicaPersistente,density:e.opcoesEfetivas.densidade??"comfortable",variant:e.opcoesEfetivas.variante??"outlined",min:e.minLocal,max:e.maxLocal},e.attrs,{onFocus:e.emitCompatFocus,onBlur:e.emitCompatBlur}),null,16,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","min","max","onFocus","onBlur"])])}const De=T(Io,[["render",zo]]),jo=t.defineComponent({name:"EliEntradaParagrafo",components:{VTextarea:ve.VTextarea},inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const r=t.computed({get:()=>e.value,set:s=>{n("update:value",s),n("input",s),n("change",s)}});return{attrs:a,emit:n,localValue:r,opcoes:e.opcoes}}});function Ho(e,a,n,r,s,m){var o,l,u,i,d,b,C,v,y,c,$,g;return t.openBlock(),t.createBlock(nt.VTextarea,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=E=>e.localValue=E),label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(l=e.opcoes)==null?void 0:l.placeholder,rows:((u=e.opcoes)==null?void 0:u.linhas)??4,counter:(i=e.opcoes)==null?void 0:i.limiteCaracteres,maxlength:(d=e.opcoes)==null?void 0:d.limiteCaracteres,clearable:!!((b=e.opcoes)!=null&&b.limpavel),error:!!((C=e.opcoes)!=null&&C.erro),"error-messages":(v=e.opcoes)==null?void 0:v.mensagensErro,hint:(y=e.opcoes)==null?void 0:y.dica,"persistent-hint":!!((c=e.opcoes)!=null&&c.dicaPersistente),density:(($=e.opcoes)==null?void 0:$.densidade)??"comfortable",variant:((g=e.opcoes)==null?void 0:g.variante)??"outlined","auto-grow":""},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur"))}),null,16,["modelValue","label","placeholder","rows","counter","maxlength","clearable","error","error-messages","hint","persistent-hint","density","variant"])}const Je=T(jo,[["render",Ho]]),Uo=t.defineComponent({name:"EliEntradaSelecao",components:{VSelect:ve.VSelect},inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const r=t.ref([]),s=t.ref(!1),m=t.computed({get:()=>e.value,set:l=>{n("update:value",l),n("input",l),n("change",l)}});async function o(){s.value=!0;try{const l=await e.opcoes.itens(),u=Array.isArray(l)?l:[];r.value=[...u]}finally{s.value=!1}}return t.watch(()=>e.opcoes.itens,()=>{o()}),t.onMounted(()=>{o()}),t.watch(r,l=>{console.debug("[EliEntradaSelecao] itens:",l)},{deep:!0}),{attrs:a,emit:n,localValue:m,opcoes:e.opcoes,itens:r,carregando:s}}});function Yo(e,a,n,r,s,m){var o,l,u,i,d,b,C,v,y;return t.openBlock(),t.createBlock(lt.VSelect,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=c=>e.localValue=c),label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(l=e.opcoes)==null?void 0:l.placeholder,items:e.itens,"item-title":"rotulo","item-value":"chave",loading:e.carregando,disabled:e.carregando,"menu-props":{maxHeight:320},clearable:!!((u=e.opcoes)!=null&&u.limpavel),error:!!((i=e.opcoes)!=null&&i.erro),"error-messages":(d=e.opcoes)==null?void 0:d.mensagensErro,hint:(b=e.opcoes)==null?void 0:b.dica,"persistent-hint":!!((C=e.opcoes)!=null&&C.dicaPersistente),density:((v=e.opcoes)==null?void 0:v.densidade)??"comfortable",variant:((y=e.opcoes)==null?void 0:y.variante)??"outlined"},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur"))}),null,16,["modelValue","label","placeholder","items","loading","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant"])}const We=T(Uo,[["render",Yo]]);function Ro(e){return e==="texto"||e==="numero"||e==="dataHora"}function Jo(e){var n,r;const a=(r=(n=e==null?void 0:e.entrada)==null?void 0:n[1])==null?void 0:r.rotulo;return String(a||((e==null?void 0:e.coluna)??"Filtro"))}const Wo=t.defineComponent({name:"EliTabelaModalFiltroAvancado",props:{aberto:{type:Boolean,required:!0},filtrosBase:{type:Array,required:!0},modelo:{type:Array,required:!0}},emits:{fechar:()=>!0,limpar:()=>!0,salvar:e=>!0},setup(e,{emit:a}){const n=t.ref([]),r=t.ref(""),s=t.computed(()=>(e.filtrosBase??[]).map(c=>String(c.coluna))),m=t.computed(()=>{const c=new Set(n.value.map($=>String($.coluna)));return(e.filtrosBase??[]).filter($=>!c.has(String($.coluna)))});function o(c){const $=c==null?void 0:c[0];return $==="numero"?Se:$==="dataHora"?De:$e}function l(c){return(c==null?void 0:c[1])??{rotulo:""}}function u(c){return(c==null?void 0:c[0])==="numero"?null:""}function i(){var g;const c=e.filtrosBase??[],$=Array.isArray(e.modelo)?e.modelo:[];n.value=$.map(E=>{const j=c.find(P=>String(P.coluna)===String(E.coluna))??c[0],W=(j==null?void 0:j.entrada)??E.entrada,L=(j==null?void 0:j.coluna)??E.coluna,H=String((j==null?void 0:j.operador)??"="),X=E.valor??u(W);return{coluna:L,operador:H,entrada:W,valor:X}});for(const E of n.value)s.value.includes(String(E.coluna))&&(E.operador=String(((g=c.find(j=>String(j.coluna)===String(E.coluna)))==null?void 0:g.operador)??"="),E.entrada&&!Ro(E.entrada[0])&&(E.entrada=["texto",{rotulo:"Valor"}]))}t.watch(()=>[e.aberto,e.filtrosBase,e.modelo],()=>{e.aberto&&i()},{deep:!0,immediate:!0});function d(){if(!r.value)return;const c=(e.filtrosBase??[]).find($=>String($.coluna)===String(r.value));c&&(n.value.some($=>String($.coluna)===String(c.coluna))||(n.value.push({coluna:c.coluna,entrada:c.entrada,operador:String(c.operador??"="),valor:u(c.entrada)}),r.value=""))}function b(c){n.value.splice(c,1)}function C(){a("fechar")}function v(){a("limpar")}function y(){a("salvar",n.value.map(c=>({coluna:c.coluna,valor:c.valor})))}return{linhas:n,opcoesParaAdicionar:m,colunaParaAdicionar:r,componenteEntrada:o,opcoesEntrada:l,adicionar:d,remover:b,emitFechar:C,emitSalvar:y,emitLimpar:v,rotuloDoFiltro:Jo}}}),Zo={class:"eli-tabela-modal-filtro__modal",role:"dialog","aria-modal":"true","aria-label":"Filtro avançado"},Go={class:"eli-tabela-modal-filtro__header"},Xo={class:"eli-tabela-modal-filtro__conteudo"},Ko={key:0,class:"eli-tabela-modal-filtro__vazio"},Qo={key:1,class:"eli-tabela-modal-filtro__lista"},xo={class:"eli-tabela-modal-filtro__entrada"},en=["onClick"],tn={class:"eli-tabela-modal-filtro__acoes"},an=["disabled"],on=["value"],nn=["disabled"],ln={class:"eli-tabela-modal-filtro__footer"};function rn(e,a,n,r,s,m){return e.aberto?(t.openBlock(),t.createElementBlock("div",{key:0,class:"eli-tabela-modal-filtro__overlay",role:"presentation",onClick:a[6]||(a[6]=t.withModifiers((...o)=>e.emitFechar&&e.emitFechar(...o),["self"]))},[t.createElementVNode("div",Zo,[t.createElementVNode("header",Go,[a[7]||(a[7]=t.createElementVNode("h3",{class:"eli-tabela-modal-filtro__titulo"},"Filtro avançado",-1)),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__fechar","aria-label":"Fechar",onClick:a[0]||(a[0]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," × ")]),t.createElementVNode("div",Xo,[e.filtrosBase.length?(t.openBlock(),t.createElementBlock("div",Qo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.linhas,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:String(o.coluna),class:"eli-tabela-modal-filtro__linha"},[t.createElementVNode("div",xo,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.componenteEntrada(o.entrada)),{value:o.valor,"onUpdate:value":u=>o.valor=u,opcoes:e.opcoesEntrada(o.entrada),density:"compact"},null,40,["value","onUpdate:value","opcoes"]))]),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__remover",title:"Remover","aria-label":"Remover",onClick:u=>e.remover(l)}," × ",8,en)]))),128))])):(t.openBlock(),t.createElementBlock("div",Ko," Nenhum filtro configurado na tabela. ")),t.createElementVNode("div",tn,[t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":a[1]||(a[1]=o=>e.colunaParaAdicionar=o),class:"eli-tabela-modal-filtro__select",disabled:!e.opcoesParaAdicionar.length},[a[8]||(a[8]=t.createElementVNode("option",{disabled:"",value:""},"Selecione um filtro…",-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.opcoesParaAdicionar,o=>(t.openBlock(),t.createElementBlock("option",{key:String(o.coluna),value:String(o.coluna)},t.toDisplayString(e.rotuloDoFiltro(o)),9,on))),128))],8,an),[[t.vModelSelect,e.colunaParaAdicionar]]),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao",onClick:a[2]||(a[2]=(...o)=>e.adicionar&&e.adicionar(...o)),disabled:!e.colunaParaAdicionar}," Adicionar ",8,nn)])]),t.createElementVNode("footer",ln,[t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--sec",onClick:a[3]||(a[3]=(...o)=>e.emitLimpar&&e.emitLimpar(...o))}," Limpar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--sec",onClick:a[4]||(a[4]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," Cancelar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--prim",onClick:a[5]||(a[5]=(...o)=>e.emitSalvar&&e.emitSalvar(...o))}," Aplicar ")])])])):t.createCommentVNode("",!0)}const sn=T(Wo,[["render",rn]]),cn="eli:tabela";function Ze(e){return`${cn}:${e}:colunas`}function Ge(e){if(!e||typeof e!="object")return{visiveis:[],invisiveis:[]};const a=e,n=Array.isArray(a.visiveis)?a.visiveis.filter(s=>typeof s=="string"):[],r=Array.isArray(a.invisiveis)?a.invisiveis.filter(s=>typeof s=="string"):[];return{visiveis:n,invisiveis:r}}function Xe(e){try{const a=window.localStorage.getItem(Ze(e));return a?Ge(JSON.parse(a)):{visiveis:[],invisiveis:[]}}catch{return{visiveis:[],invisiveis:[]}}}function dn(e,a){try{window.localStorage.setItem(Ze(e),JSON.stringify(Ge(a)))}catch{}}function Ne(e){return`eli_tabela:${e}:filtro_avancado`}function Ke(e){try{const a=localStorage.getItem(Ne(e));if(!a)return[];const n=JSON.parse(a);return Array.isArray(n)?n:[]}catch{return[]}}function un(e,a){try{localStorage.setItem(Ne(e),JSON.stringify(a??[]))}catch{}}function mn(e){try{localStorage.removeItem(Ne(e))}catch{}}const pn=t.defineComponent({name:"EliTabela",inheritAttrs:!1,components:{EliTabelaCabecalho:Yt,EliTabelaEstados:Kt,EliTabelaDebug:ta,EliTabelaHead:ua,EliTabelaBody:eo,EliTabelaMenuAcoes:ro,EliTabelaPaginacao:bo,EliTabelaModalColunas:Do,EliTabelaModalFiltroAvancado:sn},props:{tabela:{type:Object,required:!0}},setup(e){const n=t.ref(!1),r=t.ref(null),s=t.ref([]),m=t.ref(0),o=t.ref([]),l=t.ref(null),u=t.ref(null),i=t.ref({top:0,left:0}),d=t.ref(""),b=t.ref(1),C=t.ref(null),v=t.ref("asc"),y=t.ref(!1),c=t.ref(Ke(e.tabela.nome));function $(){y.value=!0}function g(){y.value=!1}function E(){c.value=[],mn(e.tabela.nome),y.value=!1,d.value="",b.value!==1?b.value=1:le()}function j(B){c.value=B??[],un(e.tabela.nome,B??[]),y.value=!1,d.value="",b.value!==1?b.value=1:le()}const W=t.computed(()=>{const B=e.tabela.filtroAvancado??[];return(c.value??[]).filter(N=>N&&N.coluna!==void 0).map(N=>{const F=B.find(O=>String(O.coluna)===String(N.coluna));return F?{coluna:String(F.coluna),operador:F.operador,valor:N.valor}:null}).filter(Boolean)}),L=t.computed(()=>e.tabela),H=t.computed(()=>!!e.tabela.mostrarCaixaDeBusca),X=t.computed(()=>e.tabela.acoesTabela??[]),P=t.computed(()=>X.value.length>0),ae=t.ref(!1),M=t.ref(Xe(e.tabela.nome)),D=t.ref({}),ue=t.computed(()=>e.tabela.colunas.map(B=>B.rotulo)),he=t.computed(()=>{var G,K;const B=e.tabela.colunas,F=(((G=M.value.visiveis)==null?void 0:G.length)??0)>0||(((K=M.value.invisiveis)==null?void 0:K.length)??0)>0?M.value.invisiveis??[]:B.filter(z=>z.visivel===!1).map(z=>z.rotulo),O=new Set(F),ee=B.filter(z=>O.has(z.rotulo)),x=F,re=new Map;for(const z of ee)re.has(z.rotulo)||re.set(z.rotulo,z);const R=[];for(const z of x){const te=re.get(z);te&&R.push(te)}for(const z of ee)R.includes(z)||R.push(z);return R}),_=t.computed(()=>he.value.length>0),h=t.computed(()=>{var z,te;const B=e.tabela.colunas,N=ue.value,F=(((z=M.value.visiveis)==null?void 0:z.length)??0)>0||(((te=M.value.invisiveis)==null?void 0:te.length)??0)>0,O=F?M.value.invisiveis??[]:e.tabela.colunas.filter(I=>I.visivel===!1).map(I=>I.rotulo),ee=new Set(O),x=N.filter(I=>!ee.has(I)),re=new Set(x),R=F?M.value.visiveis??[]:[],G=[];for(const I of R)re.has(I)&&G.push(I);for(const I of x)G.includes(I)||G.push(I);const K=new Map;for(const I of B)K.has(I.rotulo)||K.set(I.rotulo,I);return G.map(I=>K.get(I)).filter(Boolean)}),p=t.computed(()=>h.value.length+(Z.value?1:0)+(_.value?1:0));function k(){ae.value=!0}function f(){ae.value=!1}function V(B){M.value=B,dn(e.tabela.nome,B),ae.value=!1,D.value={}}function S(B){const N=!!D.value[B];D.value={...D.value,[B]:!N}}const A=t.computed(()=>{const B=e.tabela.registros_por_consulta;return typeof B=="number"&&B>0?Math.floor(B):10}),q=t.computed(()=>{const B=A.value;if(!B||B<=0)return 1;const N=m.value??0;return N?Math.max(1,Math.ceil(N/B)):1}),U=t.computed(()=>s.value??[]),Y=t.computed(()=>m.value??0),Z=t.computed(()=>(e.tabela.acoesLinha??[]).length>0),ce=t.computed(()=>(e.tabela.filtroAvancado??[]).length>0);let Q=0;function de(B){var R,G,K,z,te,I;const N=B.getBoundingClientRect(),F=8,O=((K=(G=(R=u.value)==null?void 0:R.menuEl)==null?void 0:G.value)==null?void 0:K.offsetHeight)??0,ee=((I=(te=(z=u.value)==null?void 0:z.menuEl)==null?void 0:te.value)==null?void 0:I.offsetWidth)??180;let x=N.bottom+F;const re=N.right-ee;O&&x+O>window.innerHeight-F&&(x=N.top-F-O),i.value={top:Math.max(F,Math.round(x)),left:Math.max(F,Math.round(re))}}function oe(B){var F,O;if(l.value===null)return;const N=B.target;(O=(F=u.value)==null?void 0:F.menuEl)!=null&&O.value&&u.value.menuEl.value.contains(N)||(l.value=null)}function J(B){if(B){if(C.value===B){v.value=v.value==="asc"?"desc":"asc",le();return}C.value=B,v.value="asc",b.value!==1?b.value=1:le()}}function ne(B){d.value!==B&&(d.value=B,b.value!==1?b.value=1:le())}function me(B){const N=Math.min(Math.max(1,B),q.value);N!==b.value&&(b.value=N)}function pe(B){const N=e.tabela.acoesLinha??[],F=o.value[B]??[];return N.map((O,ee)=>{const x=O.exibir===void 0?!0:typeof O.exibir=="boolean"?O.exibir:!1;return{acao:O,indice:ee,visivel:F[ee]??x}}).filter(O=>O.visivel)}function xe(B){return pe(B).length>0}function kn(B,N){if(!xe(B))return;if(l.value===B){l.value=null;return}l.value=B;const F=(N==null?void 0:N.currentTarget)??null;F&&(de(F),requestAnimationFrame(()=>de(F)))}async function le(){var x,re;const B=++Q;n.value=!0,r.value=null,o.value=[],l.value=null,D.value={};const N=Math.max(1,A.value),O={offSet:(b.value-1)*N,limit:N},ee=(d.value??"").trim();if(ee)O.texto_busca=ee;else{const R=W.value;R.length&&(O.filtros=R)}C.value&&(O.coluna_ordem=C.value,O.direcao_ordem=v.value);try{const R=e.tabela,G=await R.consulta(O);if(B!==Q)return;if(G.cod!==Te.sucesso){s.value=[],m.value=0,r.value=G.mensagem;return}const K=((x=G.valor)==null?void 0:x.valores)??[],z=((re=G.valor)==null?void 0:re.quantidade)??K.length;s.value=K,m.value=Number(z)||0;const te=Math.max(1,Math.ceil((m.value||0)/N));b.value>te&&(b.value=te);const I=R.acoesLinha??[];if(!I.length){o.value=[];return}const Bn=K.map(()=>I.map(ge=>ge.exibir===void 0?!0:typeof ge.exibir=="boolean"?ge.exibir:!1));o.value=Bn;const Cn=await Promise.all(K.map(async ge=>Promise.all(I.map(async Be=>{if(Be.exibir===void 0)return!0;if(typeof Be.exibir=="boolean")return Be.exibir;try{const vn=Be.exibir(ge);return!!await Promise.resolve(vn)}catch{return!1}}))));B===Q&&(o.value=Cn)}catch(R){if(B!==Q)return;s.value=[],m.value=0,r.value=R instanceof Error?R.message:"Erro ao carregar dados."}finally{B===Q&&(n.value=!1)}}return t.onMounted(()=>{document.addEventListener("click",oe),le()}),t.onBeforeUnmount(()=>{document.removeEventListener("click",oe)}),t.watch(()=>e.tabela.mostrarCaixaDeBusca,B=>{!B&&d.value&&(d.value="",b.value!==1?b.value=1:le())}),t.watch(b,(B,N)=>{B!==N&&le()}),t.watch(()=>e.tabela,()=>{l.value=null,C.value=null,v.value="asc",d.value="",ae.value=!1,y.value=!1,M.value=Xe(e.tabela.nome),c.value=Ke(e.tabela.nome),D.value={},b.value!==1?b.value=1:le()}),t.watch(()=>e.tabela.registros_por_consulta,()=>{b.value!==1?b.value=1:le()}),t.watch(s,()=>{l.value=null,D.value={}}),{isDev:!1,tabela:L,carregando:n,erro:r,linhas:s,linhasPaginadas:U,filtrosAvancadosAtivos:W,quantidadeFiltrada:Y,quantidade:m,menuAberto:l,valorBusca:d,paginaAtual:b,colunaOrdenacao:C,direcaoOrdenacao:v,totalPaginas:q,registrosPorConsulta:A,exibirBusca:H,exibirFiltroAvancado:ce,acoesCabecalho:X,temAcoesCabecalho:P,temAcoes:Z,totalColunas:p,colunasEfetivas:h,rotulosColunas:ue,modalColunasAberto:ae,configColunas:M,temColunasInvisiveis:_,colunasInvisiveisEfetivas:he,linhasExpandidas:D,abrirModalColunas:k,abrirModalFiltro:$,fecharModalColunas:f,salvarModalColunas:V,modalFiltroAberto:y,filtrosUi:c,salvarFiltrosAvancados:j,limparFiltrosAvancados:E,fecharModalFiltro:g,alternarLinhaExpandida:S,alternarOrdenacao:J,atualizarBusca:ne,irParaPagina:me,acoesDisponiveisPorLinha:pe,possuiAcoes:xe,toggleMenu:kn,menuPopup:u,menuPopupPos:i}}}),fn={class:"eli-tabela"},bn={class:"eli-tabela__table"},hn={key:0},gn=["colspan"];function yn(e,a,n,r,s,m){const o=t.resolveComponent("EliTabelaDebug"),l=t.resolveComponent("EliTabelaCabecalho"),u=t.resolveComponent("EliTabelaModalColunas"),i=t.resolveComponent("EliTabelaModalFiltroAvancado"),d=t.resolveComponent("EliTabelaHead"),b=t.resolveComponent("EliTabelaEstados"),C=t.resolveComponent("EliTabelaBody"),v=t.resolveComponent("EliTabelaMenuAcoes"),y=t.resolveComponent("EliTabelaPaginacao");return t.openBlock(),t.createElementBlock("div",fn,[t.createVNode(o,{isDev:e.isDev,menuAberto:e.menuAberto,menuPopupPos:e.menuPopupPos},{default:t.withCtx(()=>[t.createElementVNode("div",null,"paginaAtual: "+t.toDisplayString(e.paginaAtual),1),t.createElementVNode("div",null,"limit: "+t.toDisplayString(e.registrosPorConsulta),1),t.createElementVNode("div",null,"texto_busca: "+t.toDisplayString((e.valorBusca||"").trim()),1),t.createElementVNode("div",null,"filtrosAvancadosAtivos: "+t.toDisplayString(JSON.stringify(e.filtrosAvancadosAtivos)),1),t.createElementVNode("div",null,"quantidadeTotal: "+t.toDisplayString(e.quantidade),1)]),_:1},8,["isDev","menuAberto","menuPopupPos"]),e.exibirBusca||e.temAcoesCabecalho?(t.openBlock(),t.createBlock(l,{key:0,exibirBusca:e.exibirBusca,exibirBotaoFiltroAvancado:e.exibirFiltroAvancado,valorBusca:e.valorBusca,acoesCabecalho:e.acoesCabecalho,onBuscar:e.atualizarBusca,onColunas:e.abrirModalColunas,onFiltroAvancado:e.abrirModalFiltro},null,8,["exibirBusca","exibirBotaoFiltroAvancado","valorBusca","acoesCabecalho","onBuscar","onColunas","onFiltroAvancado"])):t.createCommentVNode("",!0),t.createVNode(u,{aberto:e.modalColunasAberto,rotulosColunas:e.rotulosColunas,configInicial:e.configColunas,colunas:e.tabela.colunas,onFechar:e.fecharModalColunas,onSalvar:e.salvarModalColunas},null,8,["aberto","rotulosColunas","configInicial","colunas","onFechar","onSalvar"]),t.createVNode(i,{aberto:e.modalFiltroAberto,filtrosBase:e.tabela.filtroAvancado??[],modelo:e.filtrosUi,onFechar:e.fecharModalFiltro,onLimpar:e.limparFiltrosAvancados,onSalvar:e.salvarFiltrosAvancados},null,8,["aberto","filtrosBase","modelo","onFechar","onLimpar","onSalvar"]),t.createElementVNode("table",bn,[t.createVNode(d,{colunas:e.colunasEfetivas,temAcoes:e.temAcoes,temColunasInvisiveis:e.temColunasInvisiveis,colunaOrdenacao:e.colunaOrdenacao,direcaoOrdenacao:e.direcaoOrdenacao,onAlternarOrdenacao:e.alternarOrdenacao},null,8,["colunas","temAcoes","temColunasInvisiveis","colunaOrdenacao","direcaoOrdenacao","onAlternarOrdenacao"]),e.carregando||e.erro||!e.linhas.length?(t.openBlock(),t.createElementBlock("tbody",hn,[t.createElementVNode("tr",null,[t.createElementVNode("td",{colspan:e.totalColunas,style:{padding:"0"}},[t.createVNode(b,{carregando:e.carregando,erro:e.erro,mensagemVazio:e.tabela.mensagemVazio,style:{border:"none","border-radius":"0"}},null,8,["carregando","erro","mensagemVazio"])],8,gn)])])):(t.openBlock(),t.createBlock(C,{key:1,colunas:e.colunasEfetivas,colunasInvisiveis:e.colunasInvisiveisEfetivas,temColunasInvisiveis:e.temColunasInvisiveis,linhasExpandidas:e.linhasExpandidas,linhas:e.linhasPaginadas,temAcoes:e.temAcoes,menuAberto:e.menuAberto,possuiAcoes:e.possuiAcoes,toggleMenu:e.toggleMenu,alternarLinhaExpandida:e.alternarLinhaExpandida},null,8,["colunas","colunasInvisiveis","temColunasInvisiveis","linhasExpandidas","linhas","temAcoes","menuAberto","possuiAcoes","toggleMenu","alternarLinhaExpandida"]))]),t.createVNode(v,{ref:"menuPopup",menuAberto:e.menuAberto,posicao:e.menuPopupPos,acoes:e.menuAberto===null?[]:e.acoesDisponiveisPorLinha(e.menuAberto),linha:e.menuAberto===null?null:e.linhasPaginadas[e.menuAberto],onExecutar:a[0]||(a[0]=({acao:c,linha:$})=>{e.menuAberto=null,c.acao($)})},null,8,["menuAberto","posicao","acoes","linha"]),e.totalPaginas>1&&e.quantidadeFiltrada>0?(t.openBlock(),t.createBlock(y,{key:1,pagina:e.paginaAtual,totalPaginas:e.totalPaginas,maximoBotoes:e.tabela.maximo_botoes_paginacao,onAlterar:e.irParaPagina},null,8,["pagina","totalPaginas","maximoBotoes","onAlterar"])):t.createCommentVNode("",!0)])}const Qe=T(pn,[["render",yn]]),$n=(e,a)=>[e,a],En={install(e){e.component("EliOlaMundo",Me),e.component("EliBotao",_e),e.component("EliBadge",ye),e.component("EliCartao",we),e.component("EliTabela",Qe),e.component("EliEntradaTexto",$e),e.component("EliEntradaNumero",Se),e.component("EliEntradaDataHora",De),e.component("EliEntradaParagrafo",Je),e.component("EliEntradaSelecao",We)}};w.EliBadge=ye,w.EliBotao=_e,w.EliCartao=we,w.EliEntradaDataHora=De,w.EliEntradaNumero=Se,w.EliEntradaParagrafo=Je,w.EliEntradaSelecao=We,w.EliEntradaTexto=$e,w.EliOlaMundo=Me,w.EliTabela=Qe,w.celulaTabela=$n,w.default=En,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|