PageSourceSearch

https://fisioemortopedia.com.br/assets/admin.index-jKEX2DsG.js

js fisioemortopedia.com.br collected 2026-10-08 12:08:22 UTC 12,519 bytes, 2 lines download raw bytes

1import{r as l,bM as f,j as e,bL as L,bO as C,a2 as k,b0 as _,an as D,ap as O,z as P,bf as w}from"./index-Cixu7iNo.js";import{B as N}from"./button-B0Q__5R5.js";import{I as v}from"./input-D77scmna.js";import{T as F,a as I,b as y,c as A}from"./tabs-CBVkS3wa.js";import{A as B,g as S,a as j,r as R,b as T,C as M,c as G,B as U,M as z,S as $,F as q,L as H,d as V}from"./AdminGate-Ccasvptl.js";import{L as Z}from"./log-out-Fv5sXPgO.js";import{Z as E}from"./zap-CIKt3ls2.js";import{A as K}from"./activity-LYewYSox.js";const W="/__l5e/assets-v1/4edaeabd-b6c2-443f-8ca3-a0a38dd3a8be/logo-horizontal-colorido-branco.webp",J={url:W},Q="/__l5e/assets-v1/11ccd767-7a8f-4ce6-9a14-feb6a0f09ce7/logo-horizontal-colorido-escuro.webp",X={url:Q};function de(){const[h,b]=l.useState(!0),[p,i]=l.useState(!1),[x,o]=l.useState(null);return l.useEffect(()=>{let c=!1;async function r(){const{data:d}=await f.auth.getSession();if(!c){if(!d.session){i(!1),o(null),b(!1);return}i(!0);try{const a=await S();if(c)return;o({isMaster:a.isMaster,pages:a.pages,status:a.status})}catch{if(c)return;o({isMaster:!1,pages:[],status:null})}b(!1)}}r();const{data:u}=f.auth.onAuthStateChange((d,a)=>{if(d==="SIGNED_OUT"||!a){i(!1),o(null);return}(d==="SIGNED_IN"||d==="USER_UPDATED")&&r()});return()=>{c=!0,u.subscription.unsubscribe()}},[]),h?e.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:"Carregando..."}):p&&x&&(x.isMaster||x.status==="active")?e.jsx(B,{children:e.jsx(ae,{access:x})}):e.jsx(Y,{onAuthed:c=>{i(!0),o(c)}})}function Y({onAuthed:h}){const[b,p]=l.useState("login"),[i,x]=l.useState(""),[o,c]=l.useState(""),[r,u]=l.useState(!1),[d,a]=l.useState(!1),n=async t=>{t.preventDefault(),u(!0);try{const{error:m}=await f.auth.signInWithPassword({email:i.trim(),password:o});if(m)throw m;const g=await S();if(!g.isMaster&&g.status!=="active"){a(!0),await f.auth.signOut(),u(!1);return}w.success("Acesso liberado"),h({isMaster:g.isMaster,pages:g.pages,status:g.status})}catch(m){w.error(m instanceof Error?m.message:"Credenciais inválidas")}finally{u(!1)}},s=async t=>{t.preventDefault(),u(!0);try{await V({data:{email:i.trim()}}),w.success("Link de redefinição enviado para o e-mail."),p("login")}catch(m){w.error(m instanceof Error?m.message:"Erro ao enviar e-mail")}finally{u(!1)}};return d?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-[#0b0a1f] via-[#13123a] to-[#1a1850] px-4",children:e.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-white/10 bg-white/5 backdrop-blur-xl p-8 shadow-2xl text-center",children:[e.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight uppercase mb-2",children:"Acesso não liberado"}),e.jsx("p",{className:"text-admin-accent font-semibold uppercase tracking-wider mb-6",children:"FALAR COM RUPEL PARA GARANTIR SEU ACESSO"}),e.jsx("button",{onClick:()=>a(!1),className:"text-sm text-white/60 hover:text-white underline",children:"Voltar para o login"})]})}):e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-[#0b0a1f] via-[#13123a] to-[#1a1850] px-4 relative overflow-hidden",children:e.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-white/10 bg-white/5 backdrop-blur-xl p-8 shadow-2xl relative animate-scale-in",children:[e.jsxs("div",{className:"flex flex-col items-center mb-6 animate-fade-in",children:[e.jsx("img",{src:P,alt:"Fisio em Ortopedia",className:"h-14 w-auto drop-shadow-[0_4px_20px_rgba(245,176,34,0.3)]"}),e.jsx("h1",{className:"mt-4 text-2xl font-bold text-white tracking-tight uppercase",children:"Painel de Controle"}),e.jsx("p",{className:"mt-2 text-xs font-semibold uppercase tracking-[0.25em] text-admin-accent",children:"Acesso restrito"})]}),e.jsxs(F,{value:b,onValueChange:t=>p(t),className:"w-full",children:[e.jsxs(I,{className:"grid w-full grid-cols-2 bg-white/5 border border-white/10 mb-6",children:[e.jsx(y,{value:"login",className:"data-[state=active]:bg-[#f5b022] data-[state=active]:text-[#13123a] text-white/70",children:"Entrar"}),e.jsx(y,{value:"reset",className:"data-[state=active]:bg-[#f5b022] data-[state=active]:text-[#13123a] text-white/70",children:"Senha"})]}),e.jsx(A,{value:"login",children:e.jsxs("form",{onSubmit:n,className:"space-y-3",children:[e.jsx(v,{type:"email",required:!0,value:i,onChange:t=>x(t.target.value),autoComplete:"email",placeholder:"E-mail",className:"bg-white/5 border-white/10 text-white placeholder:text-white/40"}),e.jsx(v,{type:"password",required:!0,value:o,onChange:t=>c(t.target.value),autoComplete:"current-password",placeholder:"Senha",className:"bg-white/5 border-white/10 text-white placeholder:text-white/40"}),e.jsx(N,{type:"submit",className:"w-full bg-[#f5b022] hover:bg-[#e09f17] text-[#13123a] font-semibold shadow-lg shadow-[#f5b022]/20",disabled:r,children:r?"Entrando...":"Entrar"})]})}),e.jsx(A,{value:"reset",children:e.jsxs("form",{onSubmit:s,className:"space-y-3",children:[e.jsx(v,{type:"email",required:!0,value:i,onChange:t=>x(t.target.value),autoComplete:"email",placeholder:"E-mail da conta",className:"bg-white/5 border-white/10 text-white placeholder:text-white/40"}),e.jsx(N,{type:"submit",className:"w-full bg-[#f5b022] hover:bg-[#e09f17] text-[#13123a] font-semibold shadow-lg shadow-[#f5b022]/20",disabled:r,children:r?"Enviando...":"Enviar link de redefinição"})]})})]})]})})}const ee={LayoutDashboard:H,BarChart3:M,Users:O,FileBarChart:q,ShoppingBag:$,Activity:K,ClipboardList:C,Zap:E,Sparkles:D,MapIcon:z,Building2:U,Shield:G,BookOpen:_};function ae({access:h}){const b=L(),[p,i]=l.useState(!0);l.useEffect(()=>{const a=setTimeout(()=>i(!1),1800);return()=>clearTimeout(a)},[]);const x=async()=>{await f.auth.signOut(),b({to:"/admin"})},o=h.isMaster?j.filter(a=>a.route!=="/admin/"):j.filter(a=>h.pages.includes(R(a.route))&&a.route!=="/admin/"),c=T(),r=Object.entries(c).map(([a,n])=>({label:a,cards:n.filter(s=>o.some(t=>t.route===s.route))})).filter(a=>a.cards.length>0);if(h.isMaster){const a=j.find(s=>s.route==="/admin/acessos"),n=r.find(s=>
1s.label==="CONFIGURAÇÕES");n?n.cards.some(s=>s.route==="/admin/acessos")||n.cards.push(a):r.push({label:"CONFIGURAÇÕES",cards:[a]})}let u=0;const d=({className:a})=>e.jsxs("span",{className:"relative inline-flex shrink-0",children:[e.jsx("img",{decoding:"async",src:J.url,alt:"Fisio em Ortopedia",className:`${a} admin-logo-on-dark`}),e.jsx("img",{decoding:"async",src:X.url,alt:"","aria-hidden":"true",className:`${a} admin-logo-on-light`})]});return e.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[p&&e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-[#0b0a1f] animate-fade-out",style:{animationDelay:"1.3s",animationFillMode:"forwards"},children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 rounded-full bg-[#f5b022]/30 blur-3xl animate-pulse"}),e.jsx(d,{className:"relative h-24 w-auto animate-scale-in drop-shadow-[0_4px_30px_rgba(245,176,34,0.5)]"})]}),e.jsxs("div",{className:"mt-8 flex items-center gap-2 text-white/70 text-sm tracking-[0.3em] uppercase animate-fade-in",style:{animationDelay:"0.4s",animationFillMode:"backwards"},children:[e.jsx("span",{className:"h-px w-8 bg-[#f5b022]"}),"Acessando painel",e.jsx("span",{className:"h-px w-8 bg-[#f5b022]"})]}),e.jsx("div",{className:"mt-6 h-0.5 w-48 bg-white/10 overflow-hidden rounded-full",children:e.jsx("div",{className:"h-full w-full bg-gradient-to-r from-transparent via-[#f5b022] to-transparent animate-[slide-in-right_1.3s_ease-out]"})})]}),e.jsx("div",{className:"pointer-events-none absolute inset-0",style:{background:"radial-gradient(ellipse at center, transparent 0%, rgba(11,10,31,0.45) 100%)"}}),e.jsx("div",{className:"relative px-3 py-8 sm:px-4 sm:py-12",children:e.jsxs("div",{className:"mx-auto max-w-6xl",children:[e.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] items-start gap-3 mb-8 sm:flex sm:items-center sm:justify-between sm:mb-12 animate-fade-in",style:{animationDelay:"1.5s",animationFillMode:"backwards"},children:[e.jsxs("div",{className:"flex items-center gap-3 sm:gap-4 min-w-0",children:[e.jsx(d,{className:"h-10 sm:h-12 w-auto drop-shadow-[0_4px_20px_rgba(245,176,34,0.3)]"}),e.jsx("div",{className:"hidden sm:block h-10 w-px bg-white/10"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-bold text-white tracking-tight truncate",children:"Painel de Controle"}),e.jsx("p",{className:"text-[10px] sm:text-xs text-white/50 mt-0.5 uppercase tracking-widest truncate",children:"Fisio em Ortopedia · Admin"})]})]}),e.jsx("div",{className:"flex flex-col sm:flex-row items-end sm:items-center gap-2 shrink-0",children:e.jsxs(N,{variant:"outline",size:"sm",onClick:x,className:"bg-white/5 border-white/10 text-white hover:bg-white/10 hover:text-white",children:[e.jsx(Z,{className:"h-4 w-4 sm:mr-2"})," ",e.jsx("span",{className:"hidden sm:inline",children:"Sair"})]})})]}),e.jsxs("div",{className:"space-y-10",children:[(h.isMaster||h.pages.includes("/admin/planos"))&&e.jsxs("section",{className:"black-campaign-vars animate-fade-in",style:{animationDelay:"1.55s",animationFillMode:"backwards"},children:[e.jsxs("div",{className:"flex items-center gap-4 mb-5",children:[e.jsx("span",{className:"text-xs font-bold tracking-[0.2em] uppercase text-black-campaign-cyan",children:"BLACK 2x1 2026"}),e.jsx("span",{className:"flex-1 h-px bg-gradient-to-r from-black-campaign-purple/60 via-black-campaign-cyan/30 to-transparent"})]}),e.jsx("div",{className:"grid gap-4 sm:grid-cols-3",children:[["/admin/plano-black-2x1","PLANO DA AÇÃO","Plano completo, fluxos, links e regras",C],["/admin/black-dashboard","DASHBOARD DA AÇÃO","Leads e vendas da Black em tempo real",M],["/black-lista","LP DE CAPTURA","Página principal da lista · /black-lista",E]].map(([a,n,s,t])=>e.jsxs(k,{to:a,target:a==="/black-lista"?"_blank":void 0,className:"group relative rounded-2xl border p-6 shadow-xl transition-all duration-300 overflow-hidden backdrop-blur-sm border-black-campaign-purple/50 bg-black-campaign hover:shadow-2xl hover:border-black-campaign-cyan/60",children:[e.jsx("div",{className:"inline-flex items-center justify-center h-12 w-12 rounded-xl bg-gradient-to-br from-black-campaign-purple/30 to-black-campaign-cyan/10 border border-black-campaign-lilac/30 mb-4",children:e.jsx(t,{className:"h-6 w-6 text-black-campaign-cyan"})}),e.jsx("h2",{className:"text-base font-bold text-white tracking-wide",children:n}),e.jsx("p",{className:"mt-1.5 text-sm text-white/60 leading-relaxed",children:s})]},a))})]}),r.map((a,n)=>e.jsxs("section",{className:"animate-fade-in",style:{animationDelay:`${1.6+n*.15}s`,animationFillMode:"backwards"},children:[e.jsxs("div",{className:"flex items-center gap-4 mb-5",children:[e.jsx("span",{className:"text-xs font-bold tracking-[0.2em] uppercase text-admin-accent",children:a.label}),e.jsx("span",{className:"flex-1 h-px bg-gradient-to-r from-[#f5b022]/40 to-transparent"})]}),e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:a.cards.map(s=>{const t=u++,m=ee[s.icon.name]??s.icon;return e.jsxs(k,{to:s.route,className:"group relative rounded-2xl border p-6 shadow-xl transition-all duration-300 animate-fade-in overflow-hidden backdrop-blur-sm border-white/10 bg-white/5 hover:shadow-2xl hover:border-[#f5b022]/50 hover:bg-white/[0.08]",style:{animationDelay:`${1.65+t*.05}s`,animationFillMode:"backwards"},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-[#f5b022]/0 via-trans
1parent to-[#f5b022]/0 group-hover:from-[#f5b022]/10 group-hover:to-transparent transition-all duration-500"}),s.beta&&e.jsx("span",{className:"absolute top-3 right-3 text-[9px] font-semibold tracking-widest uppercase text-white/50 bg-white/5 border border-white/10 px-2 py-0.5 rounded-full",children:"Beta"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"inline-flex items-center justify-center h-12 w-12 rounded-xl bg-gradient-to-br from-[#f5b022]/20 to-[#f5b022]/5 border border-[#f5b022]/20 mb-4 group-hover:scale-110 group-hover:rotate-3 transition-transform duration-300",children:e.jsx(m,{className:"h-6 w-6 text-admin-accent"})}),e.jsx("h2",{className:"text-base font-bold text-white tracking-wide",children:s.title}),e.jsx("p",{className:"mt-1.5 text-sm text-white/60 leading-relaxed",children:s.desc})]})]},s.route)})})]},a.label))]})]})})]})}export{de as component};
2//# sourceMappingURL=admin.index-jKEX2DsG.js.map

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.