PageSourceSearch

https://alinhafood.com.br/_next/static/chunks/5127.b6e728556019cef9.js

js alinhafood.com.br collected 2026-09-24 14:35:29 UTC 37,099 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5127],{5127:(e,a,t)=>{t.r(a),t.d(a,{default:()=>V});var s=t(95155),o=t(12115),r=t(14272),l=t(78384),n=t(28394),i=t(10052),d=t(38971),c=t(24033),x=t(27937),p=t(19204),m=t(39867),u=t(89559),b=t(7013),h=t(67840),g=t(1524),f=t(26921),j=t(52056),v=t(92927),y=t(10383),N=t(65229),w=t(26265),k=t(35161),_=t(68425),S=t(47734),A=t(73697),z=t(33420),C=t(37665),D=t(68202),F=t(14989),E=t(57095),R=t(98128),L=t(12723),B=t(4035),P=t(69386),T=t(80019),I=t(94621),O=t(1790);let M={fixa:"#1A56DB",variavel:"#F97316",fornecedor:"#10B981",imposto:"#F59E0B",financeira:"#8B5CF6",frota:"#EC4899",investimento:"#0EA5E9",nao_operacional:"#94A3B8"};async function K(){var e,a;let{data:t}=await (0,r.U)("admin").auth.getSession();return null!=(a=null==(e=t.session)?void 0:e.access_token)?a:""}let U=e=>(Number.isFinite(e)?e:0).toLocaleString("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:2}),W=e=>Math.abs(e)>=1e3?"R$ ".concat((e/1e3).toFixed(1),"k"):U(e),H=e=>0===e?(0,s.jsx)("span",{className:"text-slate-300",children:"R$ 0,00"}):(0,s.jsx)(s.Fragment,{children:U(e)}),G=(e,a)=>0===a||0===e?(0,s.jsx)("span",{className:"text-slate-300",children:"—"}):(0,s.jsxs)(s.Fragment,{children:[(e/a*100).toFixed(1).replace(".",","),"%"]}),q=e=>new Date(e+"T00:00:00").toLocaleDateString("pt-BR",{day:"2-digit",month:"short"});function V(){var e,a,t,r,I;let{restaurantId:V}=(0,l.p)(),$=new Date().getFullYear(),[Q,Y]=(0,o.useState)($),[Z,X]=(0,o.useState)(!1),[ee,ea]=(0,o.useState)("caixa"),[et,es]=(0,o.useState)(""),[eo,er]=(0,o.useState)(!1),[el,en]=(0,o.useState)(!1),[ei,ed]=(0,o.useState)(null),[ec,ex]=(0,o.useState)(!0),[ep,em]=(0,o.useState)(new Set),[eu,eb]=(0,o.useState)([]),[eh,eg]=(0,o.useState)(null),[ef,ej]=(0,o.useState)(!1),[ev,ey]=(0,o.useState)(90),[eN,ew]=(0,o.useState)(null),[ek,e_]=(0,o.useState)(!1),[eS,eA]=(0,o.useState)(new Date().getMonth()+1),[ez,eC]=(0,o.useState)($),[eD,eF]=(0,o.useState)({open:!1,titulo:"",loading:!1,items:[],total:0}),eE=(0,o.useCallback)(async()=>{if(!V){ed(null),ex(!1);return}ex(!0);let e=await K(),a=(0,n.H)("/api/admin/financeiro/fluxo-caixa",V,{ano:Q,incluir_pendentes:Z?"1":"0",regime:ee,conta_id:et||void 0,comparar:eo?"1":"0"}),t=await fetch(a,{headers:{authorization:"Bearer ".concat(e)}});ed(t.ok?await t.json():null),ex(!1)},[V,Q,Z,ee,et,eo]),eR=(0,o.useCallback)(async()=>{if(!V)return;ej(!0);let e=await K(),a=(0,n.H)("/api/admin/financeiro/fluxo-caixa/projecao",V,{dias:ev,conta_id:et||void 0}),t=await fetch(a,{headers:{authorization:"Bearer ".concat(e)}});eg(t.ok?await t.json():null),ej(!1)},[V,ev,et]),eL=(0,o.useCallback)(async()=>{if(!V)return;e_(!0);let e=await K(),a=(0,n.H)("/api/admin/financeiro/fluxo-caixa/calendario",V,{ano:ez,mes:eS}),t=await fetch(a,{headers:{authorization:"Bearer ".concat(e)}});ew(t.ok?await t.json():null),e_(!1)},[V,eS,ez]),eB=(0,o.useCallback)(async()=>{if(!V)return;let e=await K(),a=(0,n.H)("/api/admin/financeiro/contas-bancarias",V),t=await fetch(a,{headers:{authorization:"Bearer ".concat(e)}});if(t.ok){let e=await t.json();eb(Array.isArray(e)?e:[])}},[V]);(0,o.useEffect)(()=>{eE()},[eE]),(0,o.useEffect)(()=>{eR()},[eR]),(0,o.useEffect)(()=>{eL()},[eL]),(0,o.useEffect)(()=>{eB()},[eB]);let eP=(0,o.useMemo)(()=>[$-2,$-1,$,$+1],[$]),eT=async e=>{if(!V)return;eF({open:!0,titulo:e.titulo,loading:!0,items:[],total:0});let a=await K(),t=(0,n.H)("/api/admin/financeiro/fluxo-caixa/lancamentos",V,{ano:Q,mes:e.mes,tipo:e.tipo,conta_id:e.planoContaId,grupo:e.grupo,regime:ee,incluir_pendentes:Z?"1":"0"}),s=await fetch(t,{headers:{authorization:"Bearer ".concat(a)}});if(s.ok){var o,r;let a=await s.json();eF({open:!0,titulo:e.titulo,loading:!1,items:null!=(o=a.lancamentos)?o:[],total:Number(null!=(r=a.total)?r:0)})}else eF({open:!0,titulo:e.titulo,loading:!1,items:[],total:0})},eI=null!=(a=null==ei?void 0:ei.meses)?a:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],eO=null!=(t=null==ei?void 0:ei.receitas.total_ano)?t:0,eM=(e,a,t,o,r)=>{let l=ep.has(e),n="receita"===r.variant?"text-emerald-700 bg-emerald-50/60":"lucro"===r.variant?o>=0?"text-blue-700 bg-blue-50/60":"text-red-700 bg-red-50/60":"saldo"===r.variant?o>=0?"text-indigo-700 bg-indigo-100/70":"text-red-700 bg-red-100/70":"text-slate-800 bg-slate-50/60";return(0,s.jsxs)("tr",{className:"".concat(n," font-black border-t border-slate-200 ").concat(r.expandable?"curs
1or-pointer hover:brightness-95":""),onClick:r.expandable?()=>{em(a=>{let t=new Set(a);return t.has(e)?t.delete(e):t.add(e),t})}:void 0,children:[(0,s.jsx)("td",{className:"sticky left-0 z-10 whitespace-nowrap bg-inherit px-3 py-2.5 max-md:px-2 max-md:py-2",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[r.expandable?l?(0,s.jsx)(c.A,{size:13}):(0,s.jsx)(x.A,{size:13}):(0,s.jsx)("span",{className:"inline-block w-[13px]"}),a]})}),t.map((e,a)=>(0,s.jsx)("td",{className:"px-3 py-2.5 text-right font-mono tabular-nums whitespace-nowrap max-md:px-2 max-md:py-2 ".concat(r.clickable&&e>0?"cursor-pointer hover:underline":""),onClick:t=>{r.clickable&&e>0&&(t.stopPropagation(),r.clickable(a+1))},children:el&&("despesa"===r.variant||"lucro"===r.variant)&&eO>0?G(e,eO):H(e)},a)),(0,s.jsx)("td",{className:"px-3 py-2.5 text-right font-mono tabular-nums whitespace-nowrap max-md:px-2 max-md:py-2 border-l border-slate-300/60",children:el&&("despesa"===r.variant||"lucro"===r.variant)&&eO>0?G(o,eO):H(o)})]},e)},eK=(e,a)=>(0,s.jsxs)("tr",{className:"bg-white text-xs hover:bg-slate-50",children:[(0,s.jsxs)("td",{className:"sticky left-0 z-10 whitespace-nowrap bg-inherit px-3 py-1.5 pl-8 text-slate-500",children:[(0,s.jsx)("span",{className:"mr-2 font-mono text-[10px] text-slate-400",children:e.codigo}),e.nome]}),e.valores.map((t,o)=>(0,s.jsx)("td",{className:"px-3 py-1.5 text-right font-mono tabular-nums whitespace-nowrap text-slate-600 ".concat(t>0?"cursor-pointer hover:underline hover:text-blue-700":""),onClick:()=>{t>0&&eT({titulo:"".concat(e.codigo," ").concat(e.nome," \xb7 ").concat(eI[o],"/").concat(Q),mes:o+1,tipo:a,planoContaId:e.conta_id})},children:el&&"despesa"===a&&eO>0?G(t,eO):H(t)},o)),(0,s.jsx)("td",{className:"border-l border-slate-200 px-3 py-1.5 text-right font-mono tabular-nums whitespace-nowrap font-bold text-slate-700",children:el&&"despesa"===a&&eO>0?G(e.total,eO):H(e.total)})]},e.conta_id);return(0,s.jsxs)("div",{className:"space-y-6 max-md:space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h2",{className:"inline-flex items-center gap-2 text-xl font-black text-slate-900 font-[family-name:var(--font-heading)] max-md:text-lg",children:["Fluxo de Caixa",(0,s.jsx)(d.V,{title:"Fluxo de Caixa",size:"sm",children:"Entradas e sa\xeddas de dinheiro agrupadas por m\xeas e por grupo de contas (fixa, vari\xe1vel, fornecedor, imposto, financeira, frota, investimento, n\xe3o operacional). Voc\xea escolhe regime de caixa (data de pagamento) ou compet\xeancia (data do fato gerador)."})]}),(0,s.jsxs)("p",{className:"mt-0.5 text-xs text-slate-400 max-md:text-[11px]",children:["Ano ",Q," \xb7 regime ","caixa"===ee?"caixa":"compet\xeancia",et?" \xb7 conta ".concat(null!=(r=null==(e=eu.find(e=>e.id===et))?void 0:e.nome)?r:"selecionada"):" \xb7 todas as contas"]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("div",{className:"flex overflow-hidden rounded-xl border border-slate-200 bg-white",children:eP.map(e=>(0,s.jsx)("button",{onClick:()=>Y(e),className:"cursor-pointer px-3 py-2 text-xs font-bold transition-colors max-md:px-2.5 max-md:py-1.5 max-md:text-[11px] ".concat(Q===e?"bg-primary text-white":"text-slate-500 hover:bg-slate-50"),children:e},e))}),(0,s.jsx)("div",{className:"flex overflow-hidden rounded-xl border border-slate-200 bg-white",children:["caixa","competencia"].map(e=>(0,s.jsx)("button",{onClick:()=>ea(e),className:"cursor-pointer px-3 py-2 text-xs font-bold uppercase tracking-wide transition-colors max-md:px-2.5 max-md:py-1.5 max-md:text-[11px] ".concat(ee===e?"bg-primary text-white":"text-slate-500 hover:bg-slate-50"),title:"caixa"===e?"Agrupa pela data de pagamento (sa\xedda/entrada real)":"Agrupa pela data do fato gerador (regime cont\xe1bil)",children:"caixa"===e?"Caixa":"Compet\xeancia"},e))}),(0,s.jsxs)("select",{value:et,onChange:e=>es(e.target.value),className:"cursor-pointer rounded-xl border border-slate-200 bg-white px-3 py-2 text-xs font-bold text-slate-600 focus:border-primary focus:outline-none max-md:rounded-lg max-md:px-2.5 max-md:py-1.5 max-md:text-[11px]",children:[(0,s.jsx)("option",{value:"",children:"Todas as contas"}),eu.map(e=>(0,s.jsx)("option",{value:e.id,children:e.nome},e.id))]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-xl border border-slate-200 bg-white px-3 py-2 text-xs font-bold text-slate-600",children:[(0,s.jsx)("input",{type:"checkbox",checked:Z,onChange:e=>X(e.target.checked),className:"accent-primary"}),"Incluir pendentes"]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-xl border border-slate-200 bg-white px-3 py-2 text-xs font-bold text-slate-600",children:[(0,s.jsx)("input",{type:"checkbox",checked:eo,onChange:e=>er(e.target.checked),className:"accent-primary"}),"Comparar c/ ",Q-1]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-xl border border-slate-200 bg-white px-3 py-2 text-xs font-bold text-slate-600",children:[(0,s.jsx)("input",{type:"checkbox",checked:el,onChange:e=>en(e.target.checked),className:"accent-primary"}),(0,s.jsx)(p.A,{size:11})," An\xe1lise vertical"]}),(0,s.jsxs)("button",{onClick:()=>
1{if(!ei)return;let e=e=>Number(e||0).toLocaleString("pt-BR",{style:"currency",currency:"BRL"}),a=(a,t,s)=>{let o={conta:a};return ei.meses.forEach((a,s)=>{var r;o[a]=e(null!=(r=t[s])?r:0)}),o.Total=e(s),o},t=[];for(let e of(t.push(a("RECEITAS",ei.receitas.total,ei.receitas.total_ano)),ei.receitas.contas))t.push(a("  ".concat(e.codigo," ").concat(e.nome),e.valores,e.total));for(let e of(t.push(a("DESPESAS TOTAIS",ei.despesas.total,ei.despesas.total_ano)),ei.despesas.grupos))for(let s of(t.push(a(e.label.toUpperCase(),e.total,e.total_ano)),e.contas))t.push(a("  ".concat(s.codigo," ").concat(s.nome),s.valores,s.total));if(t.push(a("LUCRO / PREJU\xcdZO DO M\xcaS",ei.lucro_prejuizo,ei.lucro_ano)),ei.saldo_bancario){var s;let e=ei.saldo_bancario;t.push(a("SALDO ACUMULADO",e.por_mes,null!=(s=e.por_mes[e.por_mes.length-1])?s:e.atual))}let o={conta:"Grupo / Conta"};ei.meses.forEach(e=>{o[e]=e}),o.Total="Total",(0,i.P)(t,"fluxo-caixa-".concat(Q),{title:"Fluxo de Caixa",subtitle:"Ano: ".concat(Q),landscape:!0,headers:o})},className:"flex cursor-pointer items-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-2 text-xs font-bold text-slate-600 transition-colors hover:bg-slate-50 max-md:gap-1.5 max-md:rounded-lg max-md:px-2.5 max-md:py-1.5 max-md:text-[11px]",children:[(0,s.jsx)(m.A,{size:13})," Exportar PDF"]}),(0,s.jsxs)("button",{onClick:eE,className:"flex cursor-pointer items-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-2 text-xs font-bold text-slate-600 transition-colors hover:bg-slate-50 max-md:gap-1.5 max-md:rounded-lg max-md:px-2.5 max-md:py-1.5 max-md:text-[11px]",children:[(0,s.jsx)(u.A,{size:13})," Atualizar"]})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4 max-md:gap-2",children:(()=>{var e,a,t,o,r,l,n;let i=null!=(t=null==ei?void 0:ei.operacional.receitas_ano)?t:0,d=null!=(o=null==ei?void 0:ei.despesas.total_ano)?o:0,c=null!=(r=null==ei?void 0:ei.lucro_ano)?r:0,x=null!=(l=null==ei?void 0:ei.operacional.receitas_ano)?l:0,p=null!=(n=null==ei?void 0:ei.operacional.resultado_ano)?n:0,m=x>0?p/x*100:0,u=c>=0,j=null==ei||null==(e=ei.comparativo_anterior)?void 0:e.delta_receita_pct,v=null==ei||null==(a=ei.comparativo_anterior)?void 0:a.delta_lucro_pct;return[{label:"Receitas do Ano",val:U(i),Icon:b.A,cls:"text-emerald-700",bg:"bg-emerald-50 border-emerald-200",delta:j,deltaGood:e=>e>=0},{label:"Despesas do Ano",val:U(d),Icon:h.A,cls:"text-red-700",bg:"bg-red-50 border-red-200"},{label:"Lucro / Preju\xedzo",val:U(c),Icon:u?g.A:f.A,cls:u?"text-blue-700":"text-red-700",bg:u?"bg-blue-50 border-blue-200":"bg-red-50 border-red-200",delta:v,deltaGood:e=>e>=0},{label:"Margem Operacional",val:"".concat(m.toFixed(1),"%"),Icon:g.A,cls:m>=0?"text-purple-700":"text-red-700",bg:m>=0?"bg-purple-50 border-purple-200":"bg-red-50 border-red-200"}].map((e,a)=>{var t;return(0,s.jsxs)("div",{className:"rounded-2xl border p-4 max-md:rounded-xl max-md:p-3 ".concat(e.bg),children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,s.jsx)(e.Icon,{size:14,className:e.cls}),(0,s.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-slate-400 max-md:text-[9px] max-md:tracking-wider",children:e.label})]}),(0,s.jsx)("p",{className:"text-xl font-black tabular-nums max-md:text-base ".concat(e.cls),children:e.val}),eo&&void 0!==e.delta&&(0,s.jsxs)("p",{className:"mt-1 text-[10px] font-black ".concat(e.deltaGood&&e.deltaGood(e.delta)?"text-emerald-600":"text-rose-600"),children:[(t=e.delta,"".concat(t>=0?"+":"").concat(t.toFixed(1).replace(".",","),"%"))," vs ",Q-1]})]},a)})})()}),(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("h3",{className:"inline-flex items-center gap-2 text-sm font-black text-slate-800",children:[(0,s.jsx)("div",{className:"rounded-xl bg-blue-600/10 p-1.5",children:(0,s.jsx)(g.A,{size:14,className:"text-blue-600"})}),"Proje\xe7\xe3o de saldo \xb7 pr\xf3ximos ",ev," dias",(0,s.jsx)(d.V,{title:"Proje\xe7\xe3o",size:"sm",children:"Considera o saldo atual das contas + contas a pagar/receber pendentes para projetar o saldo dia a dia. Vencidas entram em “hoje”."})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"flex overflow-hidden rounded-xl border border-slate-200 bg-white",children:[30,60,90].map(e=>(0,s.jsxs)("button",{onClick:()=>ey(e),className:"cursor-pointer px-3 py-1.5 text-[11px] font-black transition-colors ".concat(ev===e?"bg-primary text-white":"text-slate-500 hover:bg-slate-50"),children:[e," dias"]},e))}),(0,s.jsxs)("button",{onClick:eR,className:"flex cursor-pointer items-center gap-1.5 rounded-xl border border-slate-200 bg-white px-3 py-1.5 text-[11px] font-bold text-slate-500 hover:bg-slate-50",children:[(0,s.jsx)(u.A,{size:11})," Atualizar"]})]})]}),ef?(0,s.jsx)(O.He,{}):eh?(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4 max-md:gap-2",children:[(0,s.jsx)(J,{label:"Saldo hoje",value:U(eh.saldo_atual),color:"text-blue-700",bg:"bg-blue-50 border-blue-200"}),(0,s.jsx)(J,{label:"Entradas previstas",value:U(eh.total_entradas),color:"text-emerald-700",bg:"bg-emerald-50 border-emerald-200"}),(0,s.jsx)(J,{label:"Sa\xeddas previstas",value:U(eh.total_saidas),color:"text-rose-700",bg:"bg-rose-50 border-rose-200"}),(0,s.jsx)(J,{label:"Saldo final projetado",value:U(eh.saldo_final),color:eh.saldo_final>=0?"text-purple-700":"text-rose-700",bg:eh.saldo_final>=0?"bg-purple-50 border-purple-200":"bg-rose-50 border-rose-200"})]}),eh.primeira_quebra&&(0,s.jsx)("div",{className:"rounded-2xl border border-rose-200 bg-rose-50 p-4 max-md:rounded-xl max-md:p-3",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(j.A,{size:16,className:"mt-0.5 text-rose-600"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-[12px] font-black uppercase tracking-widest text-rose-700",children:"Alerta de quebra de caixa"}),(0,s.jsxs)("p",{className:"mt-1 text-[13px] font-bold text-rose-900",children:["Saldo fica negativo em ",q(eh.primeira_quebra)," \xb7"," ",eh.dias_em_alerta," dia",1===eh.dias_em_alerta?"":"s"," em alerta 
1no per\xedodo."]}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-rose-700",children:"Antecipe receb\xedveis, renegocie pagamentos ou reforce o caixa antes dessa data."})]})]})}),(0,s.jsx)("div",{className:"rounded-2xl border border-slate-100 bg-white p-5 shadow-sm max-md:rounded-xl max-md:p-3",children:(0,s.jsx)(w.u,{width:"100%",height:240,children:(0,s.jsxs)(k.X,{data:eh.dias,children:[(0,s.jsx)(_.d,{strokeDasharray:"3 3",stroke:"#f1f5f9",vertical:!1}),(0,s.jsx)(S.W,{dataKey:"data",tickFormatter:e=>q(e),tick:{fontSize:10,fill:"#94a3b8"},axisLine:!1,tickLine:!1,interval:Math.max(0,Math.floor(eh.dias.length/12))}),(0,s.jsx)(A.h,{tickFormatter:e=>W(Number(e)),tick:{fontSize:10,fill:"#94a3b8"},axisLine:!1,tickLine:!1,width:70}),(0,s.jsx)(z.m,{contentStyle:{background:"#0F172A",border:"none",borderRadius:12,fontSize:11,color:"#fff"},labelFormatter:e=>q(e),formatter:(e,a)=>[U(Number(null!=e?e:0)),String(null!=a?a:"")]}),(0,s.jsx)(C.s,{iconType:"circle",iconSize:8,wrapperStyle:{fontSize:11,paddingTop:8}}),(0,s.jsx)(D.e_,{y:0,stroke:"#fca5a5",strokeDasharray:"3 3"}),(0,s.jsx)(F.yP,{dataKey:"entradas",name:"Entradas",fill:"#10B981",barSize:6}),(0,s.jsx)(F.yP,{dataKey:"saidas",name:"Sa\xeddas",fill:"#F43F5E",barSize:6}),(0,s.jsx)(E.N1,{type:"monotone",dataKey:"saldo",name:"Saldo projetado",stroke:"#1A56DB",strokeWidth:2.5,dot:!1,activeDot:{r:4}})]})})})]}):(0,s.jsx)("div",{className:"rounded-2xl border border-slate-100 bg-white p-8 text-center max-md:rounded-xl max-md:p-5 text-sm text-slate-400",children:"Sem dados de proje\xe7\xe3o"})]}),ec?(0,s.jsx)(O.He,{}):ei?(0,s.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm",children:[(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[860px] border-collapse text-left text-[12px] sm:text-sm",children:[(0,s.jsx)("thead",{className:"sticky top-0 z-20 bg-slate-100 text-[9px] sm:text-[10px] font-black uppercase tracking-wider text-slate-500",children:(0,s.jsxs)("tr",{children:[(0,s.jsxs)("th",{className:"sticky left-0 z-30 min-w-[160px] sm:min-w-[200px] border-b border-slate-300 bg-slate-100 px-2 sm:px-3 py-2 sm:py-3",children:["Grupos / Contas",el&&(0,s.jsx)("span",{className:"ml-2 rounded bg-blue-100 px-1.5 py-0.5 text-[9px] font-black text-blue-700",children:"% VERTICAL"})]}),eI.map(e=>(0,s.jsx)("th",{className:"whitespace-nowrap border-b border-slate-300 px-1.5 sm:px-3 py-2 sm:py-3 text-right",children:e},e)),(0,s.jsx)("th",{className:"whitespace-nowrap border-b border-l border-slate-300 px-2 sm:px-3 py-2 sm:py-3 text-right",children:"Total"})]})}),(0,s.jsxs)("tbody",{children:[eM("receitas","RECEITAS",ei.receitas.total,ei.receitas.total_ano,{variant:"receita",expandable:ei.receitas.contas.length>0,clickable:e=>eT({titulo:"Receitas \xb7 ".concat(eI[e-1],"/").concat(Q),mes:e,tipo:"receita"})}),ep.has("receitas")&&ei.receitas.contas.map(e=>eK(e,"receita")),eM("despesas_totais","DESPESAS TOTAIS",ei.despesas.total,ei.despesas.total_ano,{variant:"despesa",expandable:!1,clickable:e=>eT({titulo:"Despesas \xb7 ".concat(eI[e-1],"/").concat(Q),mes:e,tipo:"despesa"})}),ei.despesas.grupos.flatMap(e=>{if(0===e.total_ano&&0===e.contas.length)return[];let a="g_".concat(e.grupo),t=[eM(a,e.label.toUpperCase(),e.total,e.total_ano,{variant:"despesa",expandable:e.contas.length>0,clickable:a=>eT({titulo:"".concat(e.label," \xb7 ").concat(eI[a-1],"/").concat(Q),mes:a,tipo:"despesa",grupo:e.grupo})})];return ep.has(a)&&t.push(...e.contas.map(e=>eK(e,"despesa"))),t}),eM("lucro","LUCRO / PREJU\xcdZO DO M\xcaS",ei.lucro_prejuizo,ei.lucro_ano,{variant:"lucro",expandable:!1}),ei.saldo_bancario&&eM("saldo_acum","SALDO ACUMULADO",ei.saldo_bancario.por_mes,null!=(I=ei.saldo_bancario.por_mes[ei.saldo_bancario.por_mes.length-1])?I:ei.saldo_bancario.atual,{variant:"saldo",expandable:!1})]})]})}),(0,s.jsxs)("div",{className:"border-t border-slate-200 bg-slate-50/70 px-3 sm:px-4 py-2.5 sm:py-3 text-[10px] sm:text-[11px] font-semibold text-slate-400",children:[(0,s.jsx)("strong",{className:"text-slate-500",children:"Lucro / Preju\xedzo do m\xeas"})," \xe9 o resultado de cada m\xeas isolado (n\xe3o acumula). ",(0,s.jsx)("strong",{className:"text-indigo-600",children:"Saldo acumulado"})," \xe9 o quanto sobra em caixa e passa para o m\xeas seguinte. Clique nas c\xe9lulas com valor para ver os lan\xe7amentos individuais. Setas expandem as contas. Regime:"," ","caixa"===ee?"caixa (d
1ata de pagamento)":"compet\xeancia (data do fato gerador)",".",ei.incluir_pendentes&&" Incluindo pendentes/vencidos.",el&&" Em modo an\xe1lise vertical (% sobre a receita)."]})]}):(0,s.jsx)("div",{className:"rounded-2xl border border-slate-100 bg-white p-10 text-center max-md:rounded-xl max-md:p-6 text-sm font-semibold text-slate-400",children:"Nenhum dado dispon\xedvel"}),ei&&(ei.receitas.total_ano>0||ei.despesas.total_ano>0)&&(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-slate-100 bg-white p-4 shadow-sm max-md:rounded-xl max-md:p-3 lg:col-span-2",children:[(0,s.jsxs)("p",{className:"mb-3 text-[10px] font-black uppercase tracking-widest text-slate-400",children:["Receitas \xd7 Despesas por m\xeas",(null==ei?void 0:ei.saldo_bancario)?" \xb7 saldo acumulado":""," ",eo&&"(\xd7 ".concat(Q-1,")")]}),(0,s.jsx)(w.u,{width:"100%",height:240,children:(0,s.jsxs)(R.E,{data:eI.map((e,a)=>({mes:e,Receitas:ei.receitas.total[a],Despesas:ei.despesas.total[a],Lucro:ei.lucro_prejuizo[a],...ei.saldo_bancario?{SaldoAcum:ei.saldo_bancario.por_mes[a]}:{},...eo&&ei.comparativo_anterior?{ReceitasAnt:ei.comparativo_anterior.receitas[a],DespesasAnt:ei.comparativo_anterior.despesas[a]}:{}})),children:[(0,s.jsx)(_.d,{strokeDasharray:"3 3",stroke:"#f1f5f9",vertical:!1}),(0,s.jsx)(S.W,{dataKey:"mes",tick:{fontSize:10,fill:"#94a3b8",fontWeight:700},axisLine:!1,tickLine:!1}),(0,s.jsx)(A.h,{tickFormatter:e=>W(e),tick:{fontSize:10,fill:"#94a3b8"},axisLine:!1,tickLine:!1,width:56}),ei.saldo_bancario&&(0,s.jsx)(A.h,{yAxisId:"saldo",orientation:"right",tickFormatter:e=>W(e),tick:{fontSize:10,fill:"#6366f1"},axisLine:!1,tickLine:!1,width:56}),(0,s.jsx)(z.m,{cursor:{fill:"rgba(148, 163, 184, 0.08)"},contentStyle:{background:"#0F172A",border:"none",borderRadius:12,fontSize:11,color:"#fff"},formatter:e=>U(Number(null!=e?e:0))}),(0,s.jsx)(C.s,{iconType:"circle",iconSize:8,wrapperStyle:{fontSize:11,paddingTop:8}}),(0,s.jsx)(D.e_,{y:0,stroke:"#cbd5e1"}),(0,s.jsx)(F.yP,{dataKey:"Receitas",fill:"#10B981",radius:[4,4,0,0]}),(0,s.jsx)(F.yP,{dataKey:"Despesas",fill:"#F43F5E",radius:[4,4,0,0]}),(0,s.jsx)(F.yP,{dataKey:"Lucro",fill:"#1A56DB",radius:[4,4,0,0]}),ei.saldo_bancario&&(0,s.jsx)(E.N1,{yAxisId:"saldo",type:"monotone",dataKey:"SaldoAcum",name:"Saldo acumulado",stroke:"#6366f1",strokeWidth:2.5,dot:{r:2.5,fill:"#6366f1"},activeDot:{r:4}}),eo&&ei.comparativo_anterior&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(E.N1,{dataKey:"ReceitasAnt",name:"Receita ".concat(Q-1),stroke:"#10B981",strokeDasharray:"4 4",strokeWidth:2,dot:!1}),(0,s.jsx)(E.N1,{dataKey:"DespesasAnt",name:"Despesa ".concat(Q-1),stroke:"#F43F5E",
1strokeDasharray:"4 4",strokeWidth:2,dot:!1})]})]})})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-slate-100 bg-white p-4 shadow-sm max-md:rounded-xl max-md:p-3",children:[(0,s.jsx)("p",{className:"mb-3 text-[10px] font-black uppercase tracking-widest text-slate-400",children:"Mix de despesas do ano"}),(0,s.jsx)(w.u,{width:"100%",height:240,children:(0,s.jsxs)(L.r,{children:[(0,s.jsx)(B.Fq,{data:ei.despesas.grupos.filter(e=>e.total_ano>0).map(e=>({name:e.label,value:e.total_ano,grupo:e.grupo})),dataKey:"value",nameKey:"name",innerRadius:50,outerRadius:85,paddingAngle:2,children:ei.despesas.grupos.filter(e=>e.total_ano>0).map(e=>{var a;return(0,s.jsx)(P.f,{fill:null!=(a=M[e.grupo])?a:"#94A3B8"},e.grupo)})}),(0,s.jsx)(z.m,{contentStyle:{background:"#0F172A",border:"none",borderRadius:12,fontSize:11,color:"#fff"},formatter:(e,a)=>[U(Number(null!=e?e:0)),String(a)]})]})}),(0,s.jsx)("div",{className:"mt-2 grid grid-cols-2 gap-x-2 gap-y-1",children:ei.despesas.grupos.filter(e=>e.total_ano>0).map(e=>{var a;return(0,s.jsxs)("div",{className:"flex items-center gap-1.5 truncate text-[10px] font-semibold text-slate-500",children:[(0,s.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:null!=(a=M[e.grupo])?a:"#94A3B8"}}),(0,s.jsx)("span",{className:"truncate",children:e.label})]},e.grupo)})})]}),ei.saldo_bancario&&(0,s.jsxs)("div",{className:"rounded-2xl border border-slate-100 bg-white p-4 shadow-sm max-md:rounded-xl max-md:p-3 lg:col-span-3",children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("p",{className:"inline-flex items-center gap-1.5 text-[10px] font-black uppercase tracking-widest text-slate-400",children:[(0,s.jsx)(v.A,{size:11}),"Evolu\xe7\xe3o do saldo banc\xe1rio"]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 text-[11px]",children:[(0,s.jsx)("span",{className:"text-slate-400",children:"In\xedcio do ano:"}),(0,s.jsx)("span",{className:"font-mono font-black text-slate-700",children:U(ei.saldo_bancario.inicial)}),(0,s.jsx)("span",{className:"text-slate-300",children:"\xb7"}),(0,s.jsx)("span",{className:"text-slate-400",children:"Hoje:"}),(0,s.jsx)("span",{className:"font-mono font-black text-blue-700",children:U(ei.saldo_bancario.atual)})]})]}),(0,s.jsx)(w.u,{width:"100%",height:200,children:(0,s.jsxs)(T.b,{data:eI.map((e,a)=>({mes:e,Saldo:ei.saldo_bancario.por_mes[a]})),children:[(0,s.jsx)(_.d,{strokeDasharray:"3 3",stroke:"#f1f5f9",vertical:!1}),(0,s.jsx)(S.W,{dataKey:"mes",tick:{fontSize:10,fill:"#94a3b8",fontWeight:700},axisLine:!1,tickLine:!1}),(0,s.jsx)(A.h,{tickFormatter:e=>W(e),tick:{fontSize:10,fill:"#94a3b8"},axisLine:!1,tickLine:!1,width:56}),(0,s.jsx)(z.m,{contentStyle:{background:"#0F172A",border:"none",borderRadius:12,fontSize:11,color:"#fff"},formatter:e=>U(Number(null!=e?e:0))}),(0,s.jsx)(D.e_,{y:0,stroke:"#fca5a5",strokeDasharray:"3 3"}),(0,s.jsx)(D.e_,{y:ei.saldo_bancario.inicial,stroke:"#cbd5e1",strokeDasharray:"2 4",label:{value:"inicial",position:"insideTopRight",fontSize:9,fill:"#94a3b8"}}),(0,s.jsx)(E.N1,{type:"monotone",dataKey:"Saldo",stroke:"#1A56DB",strokeWidth:2.5,dot:{r:3,fill:"#1A56DB",strokeWidth:0},activeDot:{r:5}})]})})]})]}),(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("h3",{className:"inline-flex items-center gap-2 text-sm font-black text-slate-800",children:[(0,s.jsx)("div",{className:"rounded-xl bg-blue-600/10 p-1.5",children:(0,s.jsx)(y.A,{size:14,className:"text-blue-600"})}),"Calend\xe1rio de vencimentos",(0,s.jsx)(d.V,{title:"Calend\xe1rio",size:"sm",children:"Cada dia mostra entradas (a receber) e sa\xeddas (a pagar) do m\xeas. Dias com saldo negativo no dia ficam destacados."})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("select",{value:eS,onChange:e=>eA(Number(e.target.value)),className:"cursor-pointer rounded-xl border border-slate-200 bg-white px-3 py-1.5 text-[11px] font-bold text-slate-600",children:Array.from({length:12},(e,a)=>a+1).map(e=>(0,s.jsx)("option",{value:e,children:new Date(2e3,e-1,1).toLocaleStr
1ing("pt-BR",{month:"long"})},e))}),(0,s.jsx)("select",{value:ez,onChange:e=>eC(Number(e.target.value)),className:"cursor-pointer rounded-xl border border-slate-200 bg-white px-3 py-1.5 text-[11px] font-bold text-slate-600",children:eP.map(e=>(0,s.jsx)("option",{value:e,children:e},e))})]})]}),ek?(0,s.jsx)(O.He,{}):eN?(0,s.jsx)("div",{className:"rounded-2xl border border-slate-200 bg-white p-4 shadow-sm max-md:rounded-xl max-md:p-3",children:(0,s.jsx)("div",{className:"max-md:overflow-x-auto",children:(0,s.jsxs)("div",{className:"grid grid-cols-7 gap-1.5 max-md:min-w-[560px]",children:[["Dom","Seg","Ter","Qua","Qui","Sex","S\xe1b"].map(e=>(0,s.jsx)("div",{className:"text-[10px] font-black uppercase tracking-widest text-slate-400 text-center py-1",children:e},e)),[...Array.from({length:new Date(ez,eS-1,1).getDay()},(e,a)=>a).map(e=>(0,s.jsx)("div",{},"b".concat(e))),...eN.dias.map(e=>{let a=e.eventos.length>0,t=e.liquido;return(0,s.jsxs)("div",{className:"min-h-[68px] rounded-xl border p-1.5 ".concat(t>0?"border-emerald-300 bg-emerald-50/60":t<0?"border-rose-300 bg-rose-50/60":a?"border-slate-200 bg-white":"border-slate-100 bg-slate-50/40"," ").concat(a?"cursor-pointer hover:border-blue-400":""),onClick:()=>{a&&eT({titulo:"Movimenta\xe7\xf5es de ".concat(e.dia,"/").concat(eS,"/").concat(ez),mes:eS})},title:a?e.eventos.slice(0,4).map(e=>"".concat(e.descricao," \xb7 ").concat(U(e.valor))).join("\n"):"",children:[(0,s.jsx)("p",{className:"text-[11px] font-black text-slate-700",children:e.dia}),e.entradas>0&&(0,s.jsxs)("p",{className:"mt-0.5 text-[9px] font-bold tabular-nums text-emerald-700 truncate",children:["+",W(e.entradas)]}),e.saidas>0&&(0,s.jsxs)("p",{className:"text-[9px] font-bold tabular-nums text-rose-600 truncate",children:["−",W(e.saidas)]})]},e.dia)})]]})})}):(0,s.jsx)("div",{className:"rounded-2xl border border-slate-100 bg-white p-8 text-center max-md:rounded-xl max-md:p-5 text-sm text-slate-400",children:"Sem dados"})]}),ei&&ei.receitas.total_ano+ei.despesas.total_ano>0&&(0,s.jsxs)("div",{className:"rounded-2xl border border-slate-100 bg-white p-5 max-md:rounded-xl max-md:p-3.5",children:[(0,s.jsx)("p",{className:"mb-3 text-[11px] font-black uppercase tracking-widest text-slate-400",children:"Resumo por grupo"}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 lg:grid-cols-4",children:[{label:"Receitas",val:ei.receitas.total_ano,cls:"text-emerald-700"},...ei.despesas.grupos.filter(e=>e.total_ano>0).map(e=>({label:e.label,val:e.total_ano,cls:"text-red-600"}))].map((e,a)=>(0,s.jsxs)("div",{className:"rounded-xl border border-slate-100 bg-slate-50 px-3 py-2",children:[(0,s.jsx)("p",{className:"truncate text-[10px] font-bold uppercase tracking-widest text-slate-400",children:e.label}),(0,s.jsx)("p",{className:"text-sm font-black tabular-nums ".concat(e.cls),children:U(e.val)})]},a))})]}),eD.open&&(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:()=>eF({...eD,open:!1}),children:(0,s.jsxs)("div",{className:"w-full max-w-3xl max-h-[85vh] overflow-hidden rounded-2xl bg-white shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-slate-100 px-6 py-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-black text-slate-900",children:eD.titulo}),(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-slate-500",children:eD.loading?"Carregando…":"".concat(eD.items.length," lan\xe7amento").concat(1===eD.items.length?"":"s"," \xb7 Total ").concat(U(eD.total))})]}),(0,s.jsx)("button",{onClick:()=>eF({...eD,open:!1}),className:"cursor-pointer rounded-full p-2 text-slate-400 hover:bg-slate-100",children:(0,s.jsx)(N.A,{size:18})})]}),(0,s.jsx)("div",{className:"max-h-[60vh] overflow-y-auto overflow-x-auto",children:eD.loading?(0,s.jsx)(O.He,{}):0===eD.items.length?(0,s.jsx)("div",{className:"py-10 text-center text-sm text-slate-400",children:"Nenhum lan\xe7amento neste filtro."}):(0,s.jsxs)("table",{className:"w-full border-collapse text-left",children:[(0,s.jsx)("thead",{className:"sticky top-0 z-10 bg-slate-50 text-[10px] font-black uppercase tracking-widest text-slate-500",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"border-b border-slate-200 px-4 py-2",children:"Data"}),(0,s.jsx)("th",{className:"border-b border-slate-200 px-4 py-2",children:"Descri\xe7\xe3o"}),(0,s.jsx)("th",{className:"border-b border-slate-200 px-4 py-2",children:"Conta"}),(0,s.jsx)("th",{className:"border-b border-slate-200 px-4 py-2",children:"Banco"}),(0,s.jsx)("th",{className:"border-b border-slate-200 px-4 py-2",children:"Status"}),(0,s.jsx)("th",{className:"border-b border-slate-200 px-4 py-2 text-right",children:"Valor"})]})}),(0,s.jsx)("tbody",{children:eD.items.map(e=>{var a,t,o,r,l,n,i,d;let c="credito"===e.tipo,x=null!=(l=null!=(r="caixa"===ee?e.data_pagamento:e.data_competencia)?r:e.data_pagamento)?l:e.data_competencia;return(0,s.jsxs)("tr",{className:"text-[12px] hover:bg-slate-50",children:[(0,s.jsx)("td",{className:"border-b border-slate-100 px-4 py-2 font-mono text-[11px] text-slate-500 
1whitespace-nowrap",children:null!=x?x:"—"}),(0,s.jsx)("td",{className:"border-b border-slate-100 px-4 py-2 font-semibold text-slate-800",children:null!=(n=e.descricao)?n:"—"}),(0,s.jsxs)("td",{className:"border-b border-slate-100 px-4 py-2 text-[11px] text-slate-500",children:[(null==(a=e.plano_contas)?void 0:a.codigo)?"".concat(e.plano_contas.codigo," \xb7 "):"",null!=(i=null==(t=e.plano_contas)?void 0:t.nome)?i:"—"]}),(0,s.jsx)("td",{className:"border-b border-slate-100 px-4 py-2 text-[11px] text-slate-500",children:null!=(d=null==(o=e.contas_bancarias)?void 0:o.nome)?d:"—"}),(0,s.jsx)("td",{className:"border-b border-slate-100 px-4 py-2 text-[11px]",children:(0,s.jsx)("span",{className:"inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-black uppercase tracking-widest ".concat("pago"===e.status?"bg-emerald-100 text-emerald-700":"vencido"===e.status?"bg-rose-100 text-rose-700":"bg-amber-100 text-amber-700"),children:e.status})}),(0,s.jsxs)("td",{className:"border-b border-slate-100 px-4 py-2 text-right font-mono font-bold tabular-nums ".concat(c?"text-emerald-600":"text-rose-500"),children:[c?"+":"-",U(Math.abs(Number(e.valor)))]})]},e.id)})})]})})]})})]})}function J(e){let{label:a,value:t,color:o,bg:r}=e;return(0,s.jsxs)("div",{className:"rounded-2xl border p-4 max-md:rounded-xl max-md:p-3 ".concat(r),children:[(0,s.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-slate-400 max-md:text-[9px] max-md:tracking-wider",children:a}),(0,s.jsx)("p",{className:"mt-2 text-lg font-black tabular-nums max-md:mt-1 max-md:text-base ".concat(o),children:t})]})}I.Gk},10052:(e,a,t)=>{function s(e){return null==e?"":String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function o(e,a,t){var o;let r=e.length?Object.keys(e[0]):Object.keys(null!=(o=t.headers)?o:{}),l=r.map(a=>{let t=e.find(e=>""!==e[a]&&null!==e[a]&&void 0!==e[a]);return!!t&&function(e){if("number"==typeof e)return!0;if(null==e)return!1;let a=String(e).trim();return/\d/.test(a)&&/^-?\s*R?\$?\s*-?[\d.]+(,\d+)?\s*%?$/.test(a)}(t[a])}),n="<tr>".concat(r.map((e,a)=>{var o,r;return'<th style="text-align:'.concat(l[a]?"right":"left",'">').concat(s(null!=(r=null==(o=t.headers)?void 0:o[e])?r:e),"</th>")}).join(""),"</tr>"),i=e.length?e.map(e=>"<tr>".concat(r.map((a,t)=>'<td style="text-align:'.concat(l[t]?"right":"left",'">').concat(s(e[a]),"</td>")).join(""),"</tr>")).join(""):'<tr><td colspan="'.concat(r.length||1,'" style="text-align:center;color:#94a3b8;padding:24px">Nenhum registro encontrado no per\xedodo.</td></tr>'),d=new Date().toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}),c='<!DOCTYPE html><html lang="pt-BR"><head><meta charset="utf-8"><title>'.concat(s(a),"</title>\n<style>\n  @page { size: ").concat(t.landscape?"landscape":"portrait","; margin: 1.4cm; }\n  * { box-sizing: border-box; }\n  body { font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; color: #0F172A; margin: 0; }\n  .head { display:flex; justify-content:space-between; align-items:flex-start; border-bottom:2px solid #1A56DB; padding-bottom:10px; margin-bottom:16px; }\n  .head h1 { font-size:18px; margin:0; }\n  .head .sub { font-size:12px; color:#475569; margin-top:3px; }\n  .head .meta { font-size:11px; color:#94a3b8; text-align:right; white-space:nowrap; }\n  table { width:100%; border-collapse:collapse; font-size:11px; }\n  th { background:#EFF6FF; color:#1E3A8A; font-weight:700; text-transform:uppercase; letter-spacing:.03em; font-size:10px; padding:7px 8px; border-bottom:1px solid #BFDBFE; }\n  td { padding:6px 8px; border-bottom:1px solid #E2E8F0; }\n  tr:nth-child(even) td { background:#F8FAFC; }\n  tr { page-break-inside:avoid; }\n  thead { display:table-header-group; }\n  .foot { margin-top:14px; font-size:10px; color:#94a3b8; }\n</style></head>\n<body>\n  <div class=\"head\">\n    <div>\n      <h1>").concat(s(t.title),"</h1>\n      ").concat(t.subtitle?'<div class="sub">'.concat(s(t.subtitle),"</div>"):"",'\n    </div>\n    <div class="meta">Gerado em ').concat(s(d),"<br>").concat(e.length," ").concat(1===e.length?"registro":"registros","</div>\n  </div>\n  <table><thead>").concat(n,"</thead><tbody>").concat(i,"</tbody></table>\n  ").concat(t.footer?'<div class="foot">'.concat(s(t.footer),"</div>"):"","\n  <script>window.onload=function(){window.focus();window.print();};window.onafterprint=function(){window.close();};<\/script>\n</body></html>"),x=window.open("","_blank");if(!x)return void alert("Permita pop-ups para este site para gerar o PDF.");x.document.open(),x.document.write(c),x.document.close()}t.d(a,{P:()=>o})}}]);

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.