1import{K as oe,l as g,m as re,d as de,O as ce,ac as ue,ae as pe,w as me,o as ye,a as ge,b as u,c as m,h as t,t as c,e as o,f as r,g as xe,u as i,_ as ve,a3 as fe,F as S,j as z,n as be,Z as he,a5 as _e,I as Ce,k as B,af as ke,i as O,a2 as Z,q as Se,a0 as De,a1 as Pe,H as we,y as N}from"./index-BzhcABJU.js";import{P as Te,_ as Re}from"./producer-event-dashboards.repository.impl-DFdYOE3s.js";import{C as D}from"./auto-sRkgK8jz.js";class Ie extends oe{constructor(s){super(),this.repository=s}analyticsData=g(null);isDetailLoading=g(!1);isDetailModalOpen=g(!1);detailModalTitle=g("");detailData=g([]);detailCurrentPage=g(1);detailTotalItems=g(0);detailPerPage=g(10);activeFilters=g({});currentEventId="";currentDetailFilters={};currentDateRange={};async loadAnalytics(s,y,h){this.currentEventId=s,this.currentDateRange={from:y,to:h},await this.execute(async()=>{const _=await this.repository.getPaymentAnalytics(s,{from:y,to:h});_.isRight()?this.analyticsData.value=_.value:this.toast.toast({severity:"error",title:"Erro",description:"Não foi possÃvel carregar os dados de pagamento."})})}async openDetail(s,y){this.detailModalTitle.value=s,this.detailCurrentPage.value=1,this.currentDetailFilters={...y},this.isDetailModalOpen.value=!0,await this._fetchDetail()}closeDetail(){this.isDetailModalOpen.value=!1,this.detailData.value=[]}async loadDetailPage(s){this.detailCurrentPage.value=s,await this._fetchDetail()}async handlePerPageChange(s){this.detailPerPage.value=s,this.detailCurrentPage.value=1,await this._fetchDetail()}setFilter(s,y,h){this.activeFilters.value={...this.activeFilters.value,[s]:{value:y,label:h}}}clearFilter(s){const y={...this.activeFilters.value};delete y[s],this.activeFilters.value=y}clearAllFilters(){this.activeFilters.value={}}formatCurrency(s){return s.toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}formatDate(s){return new Date(s).toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}async _fetchDetail(){this.isDetailLoading.value=!0;try{const s={...this.currentDetailFilters,...this.currentDateRange,page:this.detailCurrentPage.value,perPage:this.detailPerPage.value},y=await this.repository.getPaymentAnalyticsDetail(this.currentEventId,s);y.isRight()?(this.detailData.value=y.value.data??[],this.detailTotalItems.value=y.value.total??this.detailData.value.length):this.toast.toast({severity:"error",title:"Erro",description:"Não foi possÃvel carregar os detalhes."})}finally{this.isDetailLoading.value=!1}}}const Ae=()=>{const P=re("httpClient"),s=new Te(P);return new Ie(s)},Fe={class:"w-full"},Le={class:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4 mb-8"},$e={class:"text-neutral-400"},je={class:"flex items-center gap-2 flex-shrink-0"},Ee={class:"flex items-center gap-2 flex-wrap"},Me={class:"flex items-center gap-1 bg-neutral-800/60 rounded-lg p-1"},ze=["onClick"],Be={key:0,class:"flex items-center justify-center py-24"},Oe={class:"flex flex-col items-center gap-3"},Ne={class:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-8"},He={class:"text-2xl font-bold text-white mt-1"},Ue={class:"text-2xl font-bold text-white mt-1"},Ve={class:"flex items-center gap-2 mt-1"},qe={class:"text-2xl font-bold text-red-500"},Xe={class:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6"},Ge={key:0,class:"flex flex-col items-center justify-center py-12 gap-2"},We={key:1,class:"flex flex-col sm:flex-row sm:items-center gap-6"},Ze={class:"relative h-[260px] w-[260px] shrink-0 mx-auto sm:mx-0"},Qe={class:"flex-1 flex flex-col justify-center space-y-2 sm:pl-4"},Ye=["onClick"],Je={class:"flex items-center gap-2 min-w-0"},Ke={class:"text-xs text-neutral-300 truncate"},et={class:"text-xs font-semibold text-white shrink-0 ml-2"},tt={key:0,class:"flex flex-col items-center justify-center py-12 gap-2"},at={key:1,class:"relative h-[280px]"},st={key:0,class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-4 mb-8"},nt={class:"flex items-center justify-between mb-1"},lt=["title"],it={class:"text-xs font-bold text-white shrink-0 ml-1"},ot={class:"text-lg font-bold text-white mt-1"},rt={class:"text-xs text-neutral-500 mt-0.5"},dt={class:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6"},ct={key:0,class:"flex flex-col items-center justify-center py-12 gap-2"},ut={key:1,class:"relative h-[280px]"},pt={key:0,class:"flex flex-col items-center justify-center py-12 gap-2"},mt={key:1,class:"relative h-[280px]"},yt={class:"flex items-center justify-between p-4"},gt=["title","onClick"],xt={class:"flex items-center gap-3 min-w-[160px]"},vt={class:"text-xs text-neutral-400 whitespace-nowrap"},ft={class:"text-xs font-semibold text-green-400"},bt={class:"text-xs font-semibold text-amber-400"},ht={class:"text-xs text-neutral-400"},_t={key:2,class:"flex items-center justify-center py-24"},Ct={class:"flex flex-col items-center gap-3 text-center"},kt={key:0,class:"flex items-center justify-center py-16"},St={class:"text-xs text-neutral-400 whitespace-nowrap"},Dt={class:"text-xs font-medium text-white"},Pt={class:"text-xs text-neutral-300"},wt={class:"text-xs text-neutral-400"},Tt={class:"text-xs font-semibold text-white"},Rt=["title","onClick"],v="#737373",H="rgba(255,255,255,0.06)",Lt=de({__name:"event-payment-analytics.page",setup(P){const s=Ae(),y=ce(),h=ue(),_=pe(),U=N(()=>y.params.id),w=g(!1),Q=N(()=>y.query.name),Y=[{id:"today",label:"Hoje"},{id:"7d",label:"7d"},{id:"30d",label:"30d"},{id:"all",label:"Desde o inÃcio"}],V=g("30d");function J(l){V.value=l;const e=new Date;let n;if(l==="today"){const d=new Date(e);d.setHours(0,0,0,0),n=d.toISOString()}else if(l==="7d"){const d=new Date(e);d.setDate(d.getDate()-7),n=d.toISOString()}else if(l==="30d"){const d=new Date(e);d.setDate(d.getDate()-30),n=d.toISOString()}
1s.loadAnalytics(U.value,n,l==="all"?void 0:e.toISOString())}const K=N(()=>{const l=s.analyticsData.value;return l?.byChargeStatus?l.byChargeStatus.filter(e=>["expired","failed","rejected"].includes(e.chargeStatus)).reduce((e,n)=>e+n.count,0):0}),T={open:"Aberto",paid:"Pago",expired:"Expirada",canceled:"Cancelada",refunded:"Reembolsada",failed:"Falhou",rejected:"Rejeitada"},ee={paid:"success",open:"primary",expired:"warning",canceled:"danger",refunded:"ghost",failed:"danger",rejected:"warning"},R={reserved:"Reservada",pending_payment:"Aguardando",partially_paid:"Parcialmente paga",paid:"Paga",expired:"Expirada",cancelled:"Cancelada",refunded:"Reembolsada"},te={paid:"#10b981",open:"#3b82f6",expired:"#f59e0b",canceled:"#ef4444",refunded:"#8b5cf6",failed:"#dc2626",rejected:"#f97316"},q=["#10b981","#06b6d4","#3b82f6","#a78bfa","#f59e0b","#ef4444","#8b5cf6"],C=["#10b981","#3b82f6","#8b5cf6","#f59e0b","#06b6d4","#ef4444","#64748b","#a78bfa","#f97316"],ae=[{key:"invoiceId",label:"Fatura"},{key:"progress",label:"Progresso"},{key:"paidAmount",label:"Pago"},{key:"remaining",label:"Restante"},{key:"nextDueDate",label:"Próx. vencimento"}],se=[{key:"dueDate",label:"Vencimento"},{key:"payer",label:"Pagador"},{key:"paymentMethod",label:"Método"},{key:"installment",label:"Parcela"},{key:"chargeStatus",label:"Status Cobrança"},{key:"invoiceStatus",label:"Status Fatura"},{key:"amount",label:"Valor"},{key:"invoiceId",label:"Fatura"}],ne={paymentMethod:"Método",chargeStatus:"Status Cobrança",invoiceStatus:"Status Fatura",invoiceId:"Fatura",installmentCount:"Parcelamento"};async function f(l,e,n){s.setFilter(l,e,n),await s.openDetail(`${ne[l]??l}: ${n}`,{[l]:e})}function X(l){navigator.clipboard.writeText(l).then(()=>{_.toast({severity:"success",title:"Copiado!",description:l})})}const I=g(null),A=g(null),F=g(null),L=g(null);let $=null,j=null,E=null,M=null;function G(){$?.destroy(),$=null,j?.destroy(),j=null,E?.destroy(),E=null,M?.destroy(),M=null}function le(l){I.value&&l.byPaymentType?.length&&($=new D(I.value,{type:"doughnut",data:{labels:l.byPaymentType.map(e=>e.paymentType??"â"),datasets:[{data:l.byPaymentType.map(e=>e.amount),backgroundColor:l.byPaymentType.map((e,n)=>C[n%C.length]),borderWidth:0,spacing:2}]},options:{cutout:"68%",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},onClick:(e,n)=>{const d=n[0];if(!d||!l.byPaymentType)return;const p=l.byPaymentType[d.index];p&&f("paymentMethod",p.paymentType??"",p.paymentType??"â")},onHover:(e,n)=>{(e.native?.target).style.cursor=n.length?"pointer":"default"}}})),A.value&&l.byChargeStatus?.length&&(j=new D(A.value,{type:"bar",data:{labels:l.byChargeStatus.map(e=>T[e.chargeStatus]??e.chargeStatus),datasets:[{label:"Valor",data:l.byChargeStatus.map(e=>e.amount),backgroundColor:l.byChargeStatus.map(e=>te[e.chargeStatus]??"#64748b"),borderRadius:6}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{callbacks:{label:e=>{const n=l.byChargeStatus?.[e.dataIndex];return`${s.formatCurrency(e.raw)}${n?` (${n.count} cobranças)`:""}`}}}},scales:{y:{ticks:{callback:e=>{const n=Number(e);return n>=1e3?`R$ ${(n/1e3).toFixed(n%1e3===0?0:1)}k`:`R$ ${n.toFixed(0)}`},color:v},grid:{color:H}},x:{grid:{display:!1},ticks:{color:v}}},onClick:(e,n)=>{const d=n[0];if(!d||!l.byChargeStatus)return;const p=l.byChargeStatus[d.index];p&&f("chargeStatus",p.chargeStatus,T[p.chargeStatus]??p.chargeStatus)},onHover:(e,n)=>{(e.native?.target).style.cursor=n.length?"pointer":"default"}}})),F.value&&l.byInvoiceStatus?.length&&(E=new D(F.value,{type:"bar",data:{labels:l.byInvoiceStatus.map(e=>R[e.invoiceStatus]??e.invoiceStatus),datasets:[{data:l.byInvoiceStatus.map(e=>e.count),backgroundColor:l.byInvoiceStatus.map((e,n)=>q[n%q.length]),borderRadius:6,maxBarThickness:36}]},options:{indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{x:{grid:{color:H},ticks:{color:v}},y:{grid:{display:!1},ticks:{color:v}}},onClick:(e,n)=>{const d=n[0];if(!d||!l.byInvoiceStatus)return;const p=l.byInvoiceStatus[d.index];p&&f("invoiceStatus",p.invoiceStatus,R[p.invoiceStatus]??p.invoiceStatus)},onHover:(e,n)=>{(e.native?.target).style.cursor=n.length?"pointer":"default"}}}
1)),L.value&&l.installmentDistribution?.length&&(M=new D(L.value,{type:"bar",data:{labels:l.installmentDistribution.map(e=>`${e.installmentCount}x`),datasets:[{label:"Quantidade",data:l.installmentDistribution.map(e=>e.count),backgroundColor:"#3b82f6",borderRadius:6,yAxisID:"y"},{label:"Valor Total",data:l.installmentDistribution.map(e=>e.totalAmount),type:"line",borderColor:"#f59e0b",backgroundColor:"transparent",tension:.4,pointRadius:5,pointBackgroundColor:"#f59e0b",yAxisID:"y1"}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,padding:16,boxWidth:8,color:v}}},scales:{y:{beginAtZero:!0,grid:{color:H},ticks:{color:v}},y1:{position:"right",grid:{display:!1},ticks:{callback:e=>{const n=Number(e);return n>=1e3?`R$ ${(n/1e3).toFixed(n%1e3===0?0:1)}k`:`R$ ${n.toFixed(0)}`},color:v}},x:{grid:{display:!1},ticks:{color:v}}},onClick:(e,n)=>{const d=n[0];if(!d||!l.installmentDistribution)return;const p=l.installmentDistribution[d.index];p&&f("installmentCount",String(p.installmentCount),`${p.installmentCount}x`)},onHover:(e,n)=>{(e.native?.target).style.cursor=n.length?"pointer":"default"}}}))}return me(()=>s.analyticsData.value,l=>{l&&setTimeout(()=>{G(),le(l)},0)}),ye(async()=>{await s.loadAnalytics(U.value)}),ge(()=>{G()}),(l,e)=>{const n=xe,d=ve,p=fe,x=he,k=_e,W=ke;return u(),m("div",Fe,[t("div",Le,[t("div",null,[e[7]||(e[7]=t("h1",{class:"text-3xl font-bold text-white mb-2"},"Analiticos de Pagamento",-1)),t("p",$e,c(Q.value??"Dashboard de Pagamento"),1)]),t("div",je,[o(d,{variant:"outlineBase",size:"md",class:"flex items-center gap-2 p-4",onClick:e[0]||(e[0]=a=>i(h).back())},{default:r(()=>[o(n,{name:"ArrowLeft",size:"md"}),e[8]||(e[8]=t("span",null,"Voltar",-1))]),_:1})])]),o(p,{icon:"HelpCircle",color:"brand",size:"md","icon-size":"lg",position:"bottom-right","trigger-on":"click",onMainClick:e[1]||(e[1]=a=>w.value=!0)}),o(Re,{modelValue:w.value,"onUpdate:modelValue":e[2]||(e[2]=a=>w.value=a),dashboard:"payment-analytics"},null,8,["modelValue"]),o(x,{variant:"outline",radius:"lg",padding:"p-4",class:"mb-6"},{default:r(()=>[t("div",Ee,[e[9]||(e[9]=t("span",{class:"text-xs text-neutral-500 shrink-0"},"PerÃodo:",-1)),t("div",Me,[(u(),m(S,null,z(Y,a=>t("button",{key:a.id,type:"button",class:be(["px-3 py-1 text-xs rounded-md transition-all cursor-pointer",V.value===a.id?"bg-neutral-700 shadow-sm text-white font-medium":"text-neutral-400 hover:text-neutral-200 hover:bg-neutral-700/50"]),onClick:b=>J(a.id)},c(a.label),11,ze)),64))])])]),_:1}),i(s).getIsLoading().value?(u(),m("div",Be,[t("div",Oe,[o(n,{name:"Loader2",size:"4xl",class:"text-neutral-400 animate-spin"}),e[10]||(e[10]=t("p",{class:"text-sm text-neutral-400"},"Carregando analytics...",-1))])])):i(s).analyticsData.value?(u(),m(S,{key:1},[t("div",Ne,[o(x,{variant:"outline",radius:"lg",padding:"p-4"},{default:r(()=>[e[11]||(e[11]=t("p",{class:"text-xs font-medium text-neutral-500 uppercase tracking-wide"}," Total Cobranças ",-1)),t("p",He,c(i(s).analyticsData.value.totalCharges.toLocaleString("pt-BR")),1),e[12]||(e[12]=t("p",{class:"text-xs text-neutral-500 mt-1"},"cobranças geradas no perÃodo",-1))]),_:1}),o(x,{variant:"outline",radius:"lg",padding:"p-4"},{default:r(()=>[e[13]||(e[13]=t("p",{class:"text-xs font-medium text-neutral-500 uppercase tracking-wide"},"Valor Total",-1)),t("p",Ue,c(i(s).formatCurrency(i(s).analyticsData.value.totalAmount)),1),e[14]||(e[14]=t("p",{class:"text-xs text-neutral-500 mt-1"},"somatório das cobranças",-1))]),_:1}),o(x,{variant:"outline",radius:"lg",padding:"p-4"},{default:r(()=>[e[15]||(e[15]=t("p",{class:"text-xs font-medium text-neutral-500 uppercase tracking-wide"}," Taxa de Falha / Expiração ",-1)),t("div",Ve,[t("p",qe,c((i(s).analyticsData.value.failedAndExpiredRate*100).toFixed(1))+"% ",1),o(k,{label:`${K.value} cobranças`,variant:"solid",color:"danger",size:"sm"},null,8,["label"])]),e[16]||(e[16]=t("p",{class:"text-xs text-neutral-500 mt-1"},"expired + failed + rejected",-1))]),_:1})]),t("div",Xe,[o(x,{variant:"outline",radius:"lg",padding:"p-6"},{default:r(()=>[e[18]||(e[18]=t("div",{class:"flex items-center justify-between mb-5"},[t("h4",{class:"text-sm font-semibold text-white"},"Por Método de Pagamento"),t("span",{class:"hidden sm:block text-xs text-neutral-500"},"clique numa fatia")],-1)),i(s).analyticsData.value.byPaymentType?.length?(u(),m("div",We,[t("div",Ze,[t("canvas",{ref_key:"paymentTypeCanvasRef",ref:I},null,512)]),t("div",Qe,[(u(!0),m(S,null,z(i(s).analyticsData.value.byPaymentType??[],(a,b)=>(u(),m("div",{key:a.paymentType??b,class:"flex items-center justify-between hover:bg-neutral-700/40 rounded px-2 py-1 cursor-pointer",onClick:ie=>f("paymentMethod",a.paymentType??"",a.paymentType??"â")},[t("div",Je,[t("span",{class:"w-2.5 h-2.5 rounded-full shrink-0",style:Ce({background:C[b%C.length]})},null,4),t("span",Ke,c(a.paymentType??"â"),1)]),t("span",et,c((a.percentage*100).toFixed(1))+"% ",1)],8,Ye))),128))])])):(u(),m("div",Ge,[o(n,{name:"CreditCard",size:"2xl",class:"text-neutral-600"}),e[17]||(e[17]=t("p",{class:"text-sm text-neutral-500"},"Sem dados de método de pagamento",-1))]))]),_:1}
1),o(x,{variant:"outline",radius:"lg",padding:"p-6"},{default:r(()=>[e[20]||(e[20]=t("div",{class:"flex items-center justify-between mb-5"},[t("h4",{class:"text-sm font-semibold text-white"},"Por Status da Cobrança"),t("span",{class:"hidden sm:block text-xs text-neutral-500"},"clique numa barra")],-1)),i(s).analyticsData.value.byChargeStatus?.length?(u(),m("div",at,[t("canvas",{ref_key:"chargeStatusCanvasRef",ref:A},null,512)])):(u(),m("div",tt,[o(n,{name:"BarChart2",size:"2xl",class:"text-neutral-600"}),e[19]||(e[19]=t("p",{class:"text-sm text-neutral-500"},"Sem dados de status de cobrança",-1))]))]),_:1})]),e[26]||(e[26]=t("h4",{class:"text-sm font-semibold text-white mb-4"},"Detalhamento por Método",-1)),i(s).analyticsData.value.byPaymentType?.length?(u(),m("div",st,[(u(!0),m(S,null,z(i(s).analyticsData.value.byPaymentType,(a,b)=>(u(),B(x,{key:a.paymentType??b,variant:"outline",radius:"lg",padding:"p-4",class:"cursor-pointer hover:bg-neutral-800/60 transition-colors",onClick:ie=>f("paymentMethod",a.paymentType??"",a.paymentType??"â")},{default:r(()=>[t("div",nt,[t("span",{class:"text-xs font-semibold text-neutral-400 truncate",title:a.paymentType??""},c(a.paymentType??"â"),9,lt),t("span",it,c((a.percentage*100).toFixed(1))+"% ",1)]),t("p",ot,c(i(s).formatCurrency(a.amount)),1),t("p",rt,c(a.count.toLocaleString("pt-BR"))+" cobranças ",1),o(W,{value:a.percentage*100,max:100,variant:"brand",size:"sm","show-value":!1,"class-name":"mt-3"},null,8,["value"])]),_:2},1032,["onClick"]))),128))])):O("",!0),t("div",dt,[o(x,{variant:"outline",radius:"lg",padding:"p-6"},{default:r(()=>[e[22]||(e[22]=t("div",{class:"flex items-center justify-between mb-5"},[t("h4",{class:"text-sm font-semibold text-white"},"Status das Invoices"),t("span",{class:"hidden sm:block text-xs text-neutral-500"},"clique numa barra")],-1)),i(s).analyticsData.value.byInvoiceStatus?.length?(u(),m("div",ut,[t("canvas",{ref_key:"invoiceStatusCanvasRef",ref:F},null,512)])):(u(),m("div",ct,[o(n,{name:"FileText",size:"2xl",class:"text-neutral-600"}),e[21]||(e[21]=t("p",{class:"text-sm text-neutral-500"},"Sem dados de status de invoice",-1))]))]),_:1}),o(x,{variant:"outline",radius:"lg",padding:"p-6"},{default:r(()=>[e[24]||(e[24]=t("div",{class:"flex items-center justify-between mb-5"},[t("h4",{class:"text-sm font-semibold text-white"},"Parcelamento (Cartão + PIX)"),t("span",{class:"hidden sm:block text-xs text-neutral-500"},"clique numa barra")],-1)),i(s).analyticsData.value.installmentDistribution?.length?(u(),m("div",mt,[t("canvas",{ref_key:"installmentCanvasRef",ref:L},null,512)])):(u(),m("div",pt,[o(n,{name:"Layers",size:"2xl",class:"text-neutral-600"}),e[23]||(e[23]=t("p",{class:"text-sm text-neutral-500"},"Sem dados de parcelamento",-1))]))]),_:1})]),i(s).analyticsData.value.partiallyPaidPixInvoices?.length?(u(),B(x,{key:1,variant:"outline",radius:"lg",padding:"p-0",class:"mb-6"},{default:r(()=>[t("div",yt,[e[25]||(e[25]=t("div",null,[t("h4",{class:"text-sm font-semibold text-white"},"PIX Parcialmente Pago"),t("p",{class:"text-xs text-neutral-500 mt-0.5"}," Invoices PIX com parcelas pagas e parcelas em aberto ")],-1)),o(k,{label:`${i(s).analyticsData.value.partiallyPaidPixInvoices.length} invoice(s)`,variant:"solid",color:"warning",size:"sm"},null,8,["label"])]),o(Z,{columns:ae,rows:i(s).analyticsData.value.partiallyPaidPixInvoices,variant:"outline",radius:"none",padding:"p-0","empty-message":"Sem dados.",onRowClick:e[3]||(e[3]=a=>f("invoiceId",a.invoiceId,a.invoiceId.slice(0,8).toUpperCase()))},{"cell-invoiceId":r(({value:a})=>[t("button",{type:"button",class:"text-xs font-mono text-brand-400 hover:text-white transition-colors cursor-pointer",title:a,onClick:Se(b=>X(a),["stop"])},c(a.slice(0,8).toUpperCase()),9,gt)]),"cell-progress":r(({row:a})=>[t("div",xt,[o(W,{value:a.installmentsPaid/a.installmentsTotal*100,max:100,variant:"brand",size:"sm","show-value":!1,"class-name":"flex-1"},null,8,["value"]),t("span",vt,c(a.installmentsPaid)+"/"+c(a.installmentsTotal),1)])]),"cell-paidAmount":r(({value:a})=>[t("span",ft,c(i(s).formatCurrency(a)),1)]),"cell-remaining":r(({row:a})=>[t("span",bt,c(i(s).formatCurrency(a.totalAmount-a.paidAmount)),1)]),"cell-nextDueDate":r(({value:a})=>[t("span",ht,c(a?new Date(a).toLocaleDateString("pt-BR"):"â"),1)]),_:1},8,["rows"])]),_:1})):O("",!0)],64)):i(s).getIsLoading().value?O("",!0):(u(),m("div",_t,[t("div",Ct,[o(n,{name:"CreditCard",size:"4xl",class:"text-neutral-700 mb-2"}
1),e[27]||(e[27]=t("p",{class:"text-sm text-neutral-400"},"Nenhum dado encontrado para o perÃodo selecionado.",-1))])])),o(we,{"model-value":i(s).isDetailModalOpen.value,title:"Detalhe de Cobranças",subtitle:i(s).detailModalTitle.value,size:"full","close-on-backdrop":!0,"content-padding":"p-0","onUpdate:modelValue":e[6]||(e[6]=a=>{a||i(s).closeDetail()})},{default:r(()=>[i(s).isDetailLoading.value?(u(),m("div",kt,[o(n,{name:"Loader2",size:"2xl",class:"text-neutral-400 animate-spin"})])):(u(),B(Z,{key:1,columns:se,rows:i(s).detailData.value,variant:"outline",radius:"none",padding:"p-0",class:"text-neutral-300","empty-message":"Nenhum resultado encontrado."},De({"cell-dueDate":r(({row:a})=>[t("span",St,c(a.dueDate?i(s).formatDate(a.dueDate):"â"),1)]),"cell-payer":r(({row:a})=>[t("p",Dt,c(a.payerName??"â"),1)]),"cell-paymentMethod":r(({value:a})=>[t("span",Pt,c(a??"â"),1)]),"cell-installment":r(({row:a})=>[t("span",wt,c(a.installmentNumber)+"/"+c(a.installmentCount??1),1)]),"cell-chargeStatus":r(({value:a})=>[o(k,{label:T[a]??a,variant:"solid",color:ee[a]??"gray",size:"sm"},null,8,["label","color"])]),"cell-invoiceStatus":r(({value:a})=>[o(k,{label:R[a]??a,variant:"soft",color:"gray",size:"sm"},null,8,["label"])]),"cell-amount":r(({value:a})=>[t("span",Tt,c(i(s).formatCurrency(a)),1)]),"cell-invoiceId":r(({value:a})=>[t("button",{type:"button",class:"text-xs font-mono text-neutral-500 hover:text-white transition-colors cursor-pointer",title:a,onClick:b=>X(a)},c(a.slice(0,8).toUpperCase()),9,Rt)]),_:2},[i(s).detailTotalItems.value>0?{name:"footer",fn:r(()=>[o(Pe,{"current-page":i(s).detailCurrentPage.value,"page-size":i(s).detailPerPage.value,total:i(s).detailTotalItems.value,from:(i(s).detailCurrentPage.value-1)*i(s).detailPerPage.value+1,to:Math.min(i(s).detailCurrentPage.value*i(s).detailPerPage.value,i(s).detailTotalItems.value),"onUpdate:currentPage":e[4]||(e[4]=a=>i(s).loadDetailPage(a)),"onUpdate:pageSize":e[5]||(e[5]=a=>i(s).handlePerPageChange(a))},null,8,["current-page","page-size","total","from","to"])]),key:"0"}:void 0]),1032,["rows"]))]),_:1},8,["model-value","subtitle"])])}}});export{Lt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.