PageSourceSearch

https://trocafigurinhas.app/assets/ChecklistView-CZ4tp7lU.js

js trocafigurinhas.app collected 2026-10-06 04:46:19 UTC 122,489 bytes, 181 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-hz5OxoC3.js","assets/index-CIhbGVJX.js","assets/index-Bjgpq81W.css","assets/index-AXFh6Dhp.js","assets/synapse-akrKn89j.js","assets/index-DCVUeMBf.js","assets/jspdf.es.min-B_nuur42.js","assets/PremiumModal-Bkrz1MfJ.js","assets/QRCodeTrade-CS99VHGS.js","assets/StickerScanner-DETDorQJ.js","assets/HomeRankingPreview-CI-yrDE6.js","assets/countryFlags-DWRtQPzV.js","assets/highlightsService-Cmo32i75.js","assets/HomeTournamentPreview-C11Tsjtw.js","assets/copaApiService-HhxEReRX.js","assets/copaService-Ciebsx2r.js","assets/DreamTeamGame-C0aVi5ps.js","assets/SuggestionsSheet-CCyw890X.js"])))=>i.map(i=>d[i]);
2import{h as lt,a,l as te,j as e,C as it,m as Os,n as Gs,o as qs,p as Hs,q,v as ot,w as Pt,x as At,y as ie,z as Fa,A as $a,B as ne,S as za,u as It,D as Rt,E as Us,F as Vs,G as Ws,_ as W,H as Ks,J as Ft,T as Lt,K as Qs,M as Ys,P as Zs,N as Js,O as ka,Q as Na,R as nt,U as Ca,V as Xs,X as er,Y as Sa,Z as tr,$ as ar,a0 as sr,a1 as rr}from"./index-CIhbGVJX.js";import{C as nr}from"./CheckinPage-DaQigitX.js";import{L as ir,c as Mt}from"./LegendsGrid-zFJXwhKW.js";import{u as lr,g as or,a as cr}from"./packetService-DAIFC7d8.js";import{f as dr}from"./rankingsService-IHdqY3b0.js";function ur({isOpen:l,onClose:g,message:p="Crie uma conta para salvar seu progresso. Sem cadastro, suas figurinhas e dados podem ser perdidos!"}){const{loginWithEmail:k,registerWithEmail:T,loginWithGoogle:_,loginWithApple:s,checkUsernameAvailable:i}=lt(),[m,C]=a.useState("prompt"),[F,z]=a.useState(""),[$,c]=a.useState(""),[M,N]=a.useState(""),[R,S]=a.useState(!1),[A,v]=a.useState(!1),[f,B]=a.useState([]),[w,b]=a.useState(""),[P,O]=a.useState(!1);if(!l)return null;const Z=async E=>{E.preventDefault(),b(""),O(!0);try{await k(F,$),g()}catch(ve){b(ve instanceof Error?ve.message:"Erro ao fazer login")}finally{O(!1)}},U=async E=>{if(E.preventDefault(),b(""),qs(M)!==null){b("Escolha um nome de usuário válido: 3 a 30 caracteres, sem acentos ou espaços.");return}if(!R||!A){b("Aceite os termos e a exibição de anúncios personalizados para continuar.");return}O(!0);try{if(!await i(M)){B(Hs(M,F)),b("Esse nome de usuário já está em uso. Escolha outro ou toque em uma sugestão abaixo.");return}await T(F,$,M),g()}catch(_e){b(_e instanceof Error?_e.message:"Erro ao criar conta")}finally{O(!1)}},ue=async()=>{b(""),O(!0);try{await _(),g()}catch(E){b(E instanceof Error?E.message:"Erro ao fazer login com Google")}finally{O(!1)}},H=async()=>{b(""),O(!0);try{await s(),g()}catch(E){b(E instanceof Error?E.message:"Erro ao fazer login com Apple")}finally{O(!1)}};return te.createPortal(e.jsx("div",{className:"fixed inset-0 z-9999 flex items-center justify-center bg-black/60 p-4",style:{paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:e.jsxs("div",{className:"relative w-full max-w-sm rounded-2xl bg-white p-6 shadow-2xl",children:[e.jsx("button",{onClick:g,className:"absolute top-3 right-3 rounded-full p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:e.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),m==="prompt"?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-amber-100",children:e.jsx("svg",{className:"h-8 w-8 text-amber-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),e.jsx("h2",{className:"mb-2 text-center text-lg font-bold text-gray-900",children:"Crie sua conta!"}),e.jsx("p",{className:"mb-6 text-center text-sm text-gray-600",children:p}),(it.getPlatform()==="ios"||!it.isNativePlatform())&&e.jsxs("button",{onClick:H,disabled:P,className:"mb-3 flex w-full items-center justify-center gap-2 rounded-xl bg-black py-3 font-semibold text-white transition hover:bg-gray-900 disabled:opacity-50",children:[e.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"white",children:e.jsx("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.7 9.05 7.42c1.27.06 2.15.73 2.87.77.95-.12 1.86-.8 2.89-.84 1.24-.06 2.18.48 2.84 1.27-2.53 1.52-2.12 4.9.35 5.88-.43 1.18-.97 2.35-1.95 3.78zM12.03 7.33c-.13-2.49 1.97-4.52 4.44-4.33.33 2.91-2.61 5.08-4.44 4.33z"})}
2),"Entrar com Apple"]}),e.jsxs("button",{onClick:ue,disabled:P,className:"mb-3 flex w-full items-center justify-center gap-2 rounded-xl border border-gray-200 bg-white py-3 font-semibold text-gray-700 transition hover:bg-gray-50 disabled:opacity-50",children:[e.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Entrar com Google"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>C("login"),className:"flex-1 rounded-xl bg-indigo-600 py-3 font-semibold text-white transition hover:bg-indigo-700",children:"Entrar"}),e.jsx("button",{onClick:()=>C("register"),className:"flex-1 rounded-xl bg-emerald-600 py-3 font-semibold text-white transition hover:bg-emerald-700",children:"Criar Conta"})]}),e.jsx("p",{className:"mt-4 text-center text-xs text-gray-400",children:"Você pode continuar navegando sem conta, mas seus dados não serão salvos."})]}):e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"mb-4 text-center text-lg font-bold text-gray-900",children:m==="login"?"Entrar":"Criar Conta"}),e.jsxs("form",{onSubmit:m==="login"?Z:U,className:"space-y-3",children:[m==="register"&&e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"text",placeholder:"Nome de usuário",value:M,onBlur:E=>N(Gs(E.target.value)),onChange:E=>{N(Os(E.target.value)),B([]),b("")},required:!0,maxLength:30,className:"w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-indigo-500 focus:outline-none"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Use até 30 caracteres. Espaços e acentos são ajustados automaticamente."}),f.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:f.map(E=>e.jsx("button",{type:"button",onClick:()=>{N(E),B([]),b("")},className:"rounded-full bg-indigo-50 px-3 py-1 text-xs font-bold text-indigo-700 transition hover:bg-indigo-100",children:E},E))}),e.jsxs("label",{className:"flex items-start gap-2 text-xs text-gray-600",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 rounded border-2 border-indigo-400 text-indigo-600",checked:R,onChange:E=>S(E.target.checked)}),e.jsx("span",{children:"Aceito os Termos de Uso e a Política de Privacidade."})]}),e.jsxs("label",{className:"flex items-start gap-2 text-xs text-gray-600",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 rounded border-2 border-indigo-400 text-indigo-600",checked:A,onChange:E=>v(E.target.checked)}),e.jsx("span",{children:"Concordo com a exibição de anúncios personalizados."})]})]}),e.jsx("input",{type:"email",placeholder:"Email",value:F,onChange:E=>z(E.target.value),required:!0,className:"w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-indigo-500 focus:outline-none"}),e.jsx("input",{type:"password",placeholder:"Senha",value:$,onChange:E=>c(E.target.value),required:!0,minLength:6,className:"w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-indigo-500 focus:outline-none"}),w&&e.jsx("p",{className:"rounded-lg bg-red-50 p-2 text-center text-xs text-red-600",children:w}),e.jsx("a",{href:"https://wa.me/5562982421465?text=Oi%2C%20estou%20com%20dificuldade%20na%20etapa%20de%20login%20do%20Troca%20Figurinhas.",target:"_blank",rel:"noreferrer",className:"block rounded-lg bg-emerald-50 px-3 py-2 text-center text-xs font-bold text-emerald-700 transition hover:bg-emerald-100",children:"Está tendo alguma dificuldade? fale conosco!"}),e.jsx("button",{type:"submit",disabled:P||m==="register"&&(!R||!A),className:"w-full rounded-xl bg-indigo-600 py-3 font-semibold text-white transition hover:bg-indigo-700 disabled:opacity-50",children:P?"Aguarde...":m==="login"?"Entrar":"Criar Conta"})]}),e.jsx("button",{onClick:()=>{C("prompt"),b("")},className:"mt-3 w-full text-center text-sm text-gray-500 hover:text-gray-700",children:"Voltar"})]})]})}),document.body)}const xr={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},mr={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"};function pr({banner:l,onDismiss:g,onTap:p}){const k=l.action_type!=="none"&&!!p;return e.jsxs("div",{className:q("mx-4 mt-3 flex items-center gap-3 rounded-xl px-4 py-3 shadow-sm",k&&"cursor-pointer active:opacity-80"),style:{backgroundColor:l.bg_color,color:l.text_color},onClick:k?p:void 0,role:k?"button":void 0,tabIndex:k?0:void 0,onKeyDown:k?T=>T.key==="Enter"&&p?.():void 0,children:[l.emoji&&e.jsx("span",{className:"shrink-0 text-xl leading-none",children:l.emoji}),e.jsx("p",{className:q("min-w-0 flex-1 leading-snug",xr[l.font_size]??"text-sm",mr[l.font_weight]??"font-bold"),children:l.text}),k&&e.jsx("i",{className:"fa-solid fa-chevron-right shrink-0 text-xs opacity-60"}),e.jsx("button",{type:"button",onClick:T=>{T.stopPropagation(),g()},className:"shrink-0 opacity-70 transition-opacity hover:opacity-100 ml-1",style:{color:l.text_color},"aria-label":"Fechar aviso",children:e.jsx("i",{className:"fa-solid fa-xmark text-sm"})})]})}function fr({onClose:l}){const{state:g,getStickerCount:p,incrementDuplicate:k,setDuplicateCount:T,showToast:_}=ot(),{user:s}=lt(),{catalog:i}
2=Pt(),m=i.stickers,[C,F]=a.useState("ALL"),[z,$]=a.useState("grid"),[c,M]=a.useState(null),N=a.useMemo(()=>m.filter(w=>g.userData.duplicates.includes(w.id)),[g.userData.duplicates]),R=a.useMemo(()=>{const w=new Map;return N.forEach(b=>{const P=p(b.id)||1;w.set(b.country,(w.get(b.country)||0)+P)}),Array.from(w.entries()).sort((b,P)=>P[1]-b[1])},[N,p]),S=a.useMemo(()=>C==="ALL"?N:N.filter(w=>w.country===C),[C,N]),A=a.useMemo(()=>S.reduce((w,b)=>w+(p(b.id)||1),0),[S,p]),v=a.useCallback(async()=>{if(!s?.uid){_("Você precisa estar logado para compartilhar.");return}const w=await At(s.uid);if(!w){_("Código de convite ainda não está pronto. Tente novamente em instantes.");return}const b={};let P=0;for(const U of N){const ue=p(U.id)||1;b[U.country]||(b[U.country]=[]),b[U.country].push({label:U.label,flag:ie[U.country]||"",qty:ue}),P+=ue}const O=Fa(b),Z=await $a().catch(()=>null);M({open:!0,referralCode:w,duplicatesList:O,duplicatesListCount:P,referredCoins:Z?.referredCoins??50})},[s?.uid,N,p,_]),f=w=>{const b=p(w.id)||1;return e.jsxs("div",{className:"relative flex aspect-square items-center justify-center rounded-lg bg-linear-to-br from-blue-400 to-blue-600 shadow-sm transition hover:scale-105",children:[e.jsx("span",{className:"font-mono text-xs font-bold text-white sm:text-sm",children:w.label}),b>1&&e.jsxs("span",{className:"absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center rounded-full bg-orange-500 text-[9px] font-black text-white shadow",children:["x",b]}),e.jsxs("div",{className:"absolute inset-0 flex items-center justify-center gap-1 rounded-lg bg-black/50 opacity-0 transition hover:opacity-100",children:[e.jsx("button",{onClick:()=>T(w.id,Math.max(0,b-1)),className:"flex h-6 w-6 items-center justify-center rounded-full bg-red-500 text-[10px] text-white",children:e.jsx("i",{className:"fa-solid fa-minus"})}),e.jsx("button",{onClick:()=>k(w.id),className:"flex h-6 w-6 items-center justify-center rounded-full bg-green-500 text-[10px] text-white",children:e.jsx("i",{className:"fa-solid fa-plus"})})]})]},w.id)},B=w=>{const b=p(w.id)||1;return e.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-blue-100 bg-blue-50 p-2.5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-linear-to-br from-blue-400 to-blue-600 font-mono text-xs font-bold text-white shadow",children:w.label}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:w.name}),e.jsxs("p",{className:"text-[10px] text-gray-500",children:[ie[w.country]," ",ne[w.country]]})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("button",{onClick:()=>T(w.id,Math.max(0,b-1)),className:"flex h-7 w-7 items-center justify-center rounded-full bg-red-100 text-red-600 transition hover:bg-red-200",children:e.jsx("i",{className:"fa-solid fa-minus text-xs"})}),e.jsx("span",{className:"w-6 text-center text-lg font-black text-gray-800",children:b}),e.jsx("button",{onClick:()=>k(w.id),className:"flex h-7 w-7 items-center justify-center rounded-full bg-green-100 text-green-600 transition hover:bg-green-200",children:e.jsx("i",{className:"fa-solid fa-plus text-xs"})})]})]},w.id)};return te.createPortal(e.jsxs("div",{className:"modal-overlay fixed inset-0 z-950 flex items-center justify-center p-4",onClick:l,children:[e.jsxs("div",{className:"animate-scale flex max-h-[85vh] w-full max-w-lg flex-col overflow-hidden rounded-2xl bg-white shadow-2xl",onClick:w=>w.stopPropagation(),children:[e.jsx("div",{className:"bg-linear-to-r from-yellow-500 to-orange-500 p-4 text-white",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-black",children:[e.jsx("i",{className:"fa-solid fa-layer-group mr-2"}),"Repetidas"]}),e.jsxs("p",{className:"text-xs opacity-90",children:[A," figurinhas para troca"]}),e.jsx("p",{className:"mt-1 max-w-[260px] text-[11px] leading-snug opacity-90",children:"Controle quantas repetidas tem de cada jogador. Zero = sem repetidas, com a figurinha colada."})]}),e.jsx("button",{onClick:l,className:"rounded-lg p-1.5 text-white/80 transition hover:bg-white/20 hover:text-white",children:e.jsx("i",{className:"fa-solid fa-xmark text-lg"})})]})}),e.jsxs("div",{className:"border-b border-gray-100 bg-gray-50 px-4 py-3",children:[e.jsxs("div",{className:"mb-2 flex gap-1.5 overflow-x-auto pb-1",children:[e.jsxs("button",{onClick:()=>
2F("ALL"),className:q("shrink-0 rounded-full px-3 py-1 text-[11px] font-bold transition",C==="ALL"?"bg-indigo-600 text-white shadow":"bg-white text-gray-600 hover:bg-gray-100"),children:["🌍 Todos (",N.length,")"]}),R.map(([w,b])=>e.jsxs("button",{onClick:()=>F(w),className:q("shrink-0 rounded-full px-3 py-1 text-[11px] font-bold whitespace-nowrap transition",C===w?"bg-indigo-600 text-white shadow":"bg-white text-gray-600 hover:bg-gray-100"),children:[ie[w]," ",ne[w]||w," (",b,")"]},w))]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.jsxs("button",{onClick:()=>$(w=>w==="list"?"grid":"list"),className:"rounded-lg bg-white px-2.5 py-1.5 text-[11px] font-bold text-gray-600 shadow-sm",children:[e.jsx("i",{className:`fa-solid ${z==="list"?"fa-table-cells":"fa-list"} mr-1`}),z==="list"?"Grid":"Lista"]}),e.jsxs("button",{onClick:()=>void v(),disabled:N.length===0,className:"ml-auto rounded-lg bg-linear-to-r from-indigo-600 to-purple-600 px-3 py-1.5 text-[11px] font-bold text-white shadow-sm disabled:opacity-50",children:[e.jsx("i",{className:"fa-solid fa-share-nodes mr-1"})," Compartilhar"]})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:N.length===0?e.jsxs("div",{className:"py-8 text-center text-gray-400",children:[e.jsx("i",{className:"fa-solid fa-layer-group mb-2 text-4xl"}),e.jsx("p",{className:"font-bold",children:"Nenhuma figurinha repetida"}),e.jsx("p",{className:"text-xs",children:'Marque figurinhas como "troca" (azul) para vê-las aqui'})]}):S.length===0?e.jsxs("div",{className:"py-8 text-center text-gray-400",children:[e.jsx("i",{className:"fa-solid fa-filter-circle-xmark mb-2 text-3xl"}),e.jsx("p",{className:"font-bold",children:"Nenhuma repetida nesse filtro"})]}):z==="grid"?e.jsx("div",{className:"grid grid-cols-5 gap-2 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-10",children:S.map(f)}):e.jsx("div",{className:"space-y-2",children:S.map(B)})})]}),c?.open&&e.jsx(za,{open:c.open,onClose:()=>M(null),variant:"duplicates",title:"Minhas repetidas para troca",description:`Compartilhe a lista das ${c.duplicatesListCount} repetidas — quem entrar pelo seu link conta nos rankings.`,ctx:{code:c.referralCode,nickname:s?.displayName||void 0,referredCoins:c.referredCoins,extras:{duplicatesList:c.duplicatesList,duplicatesListCount:c.duplicatesListCount}},onToast:_})]}),document.body)}const hr=[{key:"chromed",color:"from-purple-400 to-purple-700",i18nKey:"sticker.rareTypes.chromed"},{key:"border",color:"from-amber-600 to-amber-900",i18nKey:"sticker.rareTypes.border"},{key:"silver",color:"from-zinc-200 to-zinc-400",i18nKey:"sticker.rareTypes.silver"},{key:"gold",color:"from-yellow-300 to-yellow-600",i18nKey:"sticker.rareTypes.gold"}],Be=l=>Math.min(99,Math.max(0,Math.floor(l)));function Ta({stickerId:l,onClose:g}){const{t:p}=It(),{state:k,setRareTypeCounts:T,setRareCommonCount:_}=ot(),{catalog:s}=Pt(),m=s.stickers.find(v=>v.id===l),C=k.rareTypes?.[l]??{},F=k.stickerData?.[l]?.count??0,[z,$]=a.useState({chromed:C.chromed??0,border:C.border??0,silver:C.silver??0,gold:C.gold??0}),[c,M]=a.useState(F);a.useEffect(()=>{const v=f=>{f.key==="Escape"&&g()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[g]);const N=(v,f)=>{$(B=>({...B,[v]:Be((B[v]??0)+f)}))},R=(v,f)=>{const B=Be(parseInt(f,10)||0);$(w=>({...w,[v]:B}))},S=()=>{T(l,z),_(l,c),g()},A=()=>{T(l,{}),_(l,0),g()};return te.createPortal(e.jsx("div",{className:"fixed inset-0 z-100 flex items-center justify-center bg-black/60 p-4",style:{paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},onClick:g,onTouchStart:v=>v.stopPropagation(),children:e.jsxs("div",{className:"w-full max-w-sm overflow-hidden rounded-2xl bg-white shadow-2xl",onClick:v=>v.stopPropagation(),children:[e.jsxs("div",{className:"bg-linear-to-r from-yellow-500 to-orange-500 p-4 text-white",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"truncate text-base font-bold",children:p("sticker.rareTypes.title")}),e.jsxs("p",{className:"truncate text-xs opacity-90",children:["#",l,m?` — ${m.name}`:""]})]}),e.jsx("button",{type:"button",onClick:g,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-white/20 text-white hover:bg-white/30","aria-label":"Close",children:e.jsx("i",{className:"fa-solid fa-xmark"})})]}),e.jsx("p",{className:"mt-1 text-[11px] opacity-80",children:p("sticker.rareTypes.subtitle")})]}),e.jsxs("div",{className:"space-y-3 p-4",children:[hr.map(v=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`h-6 w-6 shrink-0 rounded-md border border-gray-300 bg-linear-to-br ${v.color}`,"aria-hidden":!0}),e.jsx("span",{className:"flex-1 text-sm font-semibold text-gray-700",children:p(v.i18nKey)}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",onClick:()=>N(v.key,-1),className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gray-200 text-gray-700 hover:bg-gray-300 disabled:opacity-40",disabled:(z[v.key]??0)<=0,"aria-label":`-1 ${p(v.i18nKey)}`,children:e.jsx("i",{className:"fa-solid fa-minus text-xs"})}),e.jsx("input",{type:"number",min:0,max:99,value:z[v.key]??0,onChange:f=>
2R(v.key,f.target.value),className:"w-12 rounded-lg border border-gray-300 py-1 text-center text-sm font-bold text-gray-800 focus:border-yellow-500 focus:outline-none"}),e.jsx("button",{type:"button",onClick:()=>N(v.key,1),className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gray-200 text-gray-700 hover:bg-gray-300 disabled:opacity-40",disabled:(z[v.key]??0)>=99,"aria-label":`+1 ${p(v.i18nKey)}`,children:e.jsx("i",{className:"fa-solid fa-plus text-xs"})})]})]},v.key)),e.jsxs("div",{className:"flex items-center gap-3 border-t border-gray-200 pt-3",children:[e.jsx("div",{className:"h-6 w-6 shrink-0 rounded-md border border-gray-300 bg-linear-to-br from-blue-300 to-blue-500","aria-hidden":!0}),e.jsxs("div",{className:"flex-1",children:[e.jsx("span",{className:"block text-sm font-semibold text-gray-700",children:p("sticker.rareTypes.common")}),e.jsx("span",{className:"block text-[10px] text-gray-500",children:p("sticker.rareTypes.commonHint")})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",onClick:()=>M(v=>Be(v-1)),className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gray-200 text-gray-700 hover:bg-gray-300 disabled:opacity-40",disabled:c<=0,"aria-label":`-1 ${p("sticker.rareTypes.common")}`,children:e.jsx("i",{className:"fa-solid fa-minus text-xs"})}),e.jsx("input",{type:"number",min:0,max:99,value:c,onChange:v=>M(Be(parseInt(v.target.value,10)||0)),className:"w-12 rounded-lg border border-gray-300 py-1 text-center text-sm font-bold text-gray-800 focus:border-yellow-500 focus:outline-none"}),e.jsx("button",{type:"button",onClick:()=>M(v=>Be(v+1)),className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gray-200 text-gray-700 hover:bg-gray-300 disabled:opacity-40",disabled:c>=99,"aria-label":`+1 ${p("sticker.rareTypes.common")}`,children:e.jsx("i",{className:"fa-solid fa-plus text-xs"})})]})]})]}),e.jsxs("div",{className:"flex gap-2 border-t border-gray-200 bg-gray-50 p-3",children:[e.jsx("button",{type:"button",onClick:A,className:"flex-1 rounded-lg bg-gray-200 py-2 text-sm font-semibold text-gray-700 hover:bg-gray-300",children:p("sticker.rareTypes.clear")}),e.jsx("button",{type:"button",onClick:g,className:"flex-1 rounded-lg bg-white py-2 text-sm font-semibold text-gray-700 ring-1 ring-gray-300 hover:bg-gray-50",children:p("sticker.rareTypes.cancel")}),e.jsx("button",{type:"button",onClick:S,className:"flex-1 rounded-lg bg-linear-to-r from-yellow-500 to-orange-500 py-2 text-sm font-bold text-white shadow hover:shadow-lg",children:p("sticker.rareTypes.save")})]})]})}),document.body)}function gr(){const{user:l}=lt(),[g,p]=a.useState(!1),k=a.useRef(0),T=a.useRef(!1),_=a.useCallback(()=>{l||(k.current+=1,(!T.current||k.current%5===0)&&(T.current=!0,p(!0)))},[l]),s=a.useCallback(()=>l?!0:(p(!0),!1),[l]);return{isLoggedIn:!!l,showLoginModal:g,setShowLoginModal:p,guardAction:_,requireAuth:s}}const Da="tf_sticker_gate_marks_v2",_a="tf_sticker_gate_batches_v1",br=200,yr=50;function Ra(l){try{return parseInt(localStorage.getItem(l)??"0",10)||0}catch{return 0}}function La(l,g){try{localStorage.setItem(l,String(g))}catch{}}function vr(){const{isAdFree:l}=ot(),[g,p]=a.useState(!1),[k,T]=a.useState(br),[_,s]=a.useState(yr),[i,m]=a.useState(()=>Ra(Da)),[C,F]=a.useState(()=>Ra(_a)),[z,$]=a.useState(!1),[c,M]=a.useState(!1);a.useEffect(()=>{(async()=>{try{const[b,P,O]=await Promise.all([Rt("sticker_gate_enabled"),Rt("sticker_gate_free_threshold"),Rt("sticker_gate_batch_size")]);b!==null&&p(b==="true"||b==="1");const Z=P?parseInt(P,10):NaN;Number.isFinite(Z)&&Z>=0&&T(Z);const U=O?parseInt(O,10):NaN;Number.isFinite(U)&&U>=1&&s(U)}catch{}})()},[]);const N=g&&!l&&Us(),R=k+C*_,S=N&&i>=R,A=a.useCallback(()=>{N&&m(b=>{const P=b+1;return La(Da,P),P})},[N]),v=a.useCallback(()=>$(!0),[]),f=a.useCallback(()=>$(!1),[]),B=a.useCallback(()=>{F(b=>{const P=b+1;return La(_a,P),P})},[]),w=a.useCallback(async()=>{if(c)return"incomplete";M(!0);try{const b=await Vs();return b.rewarded?(Ws(),B(),"unlocked"):b.notReady?(B(),"unlocked"):"incomplete"}catch{return B(),"unlocked"}finally{M(!1)}},[c,B]);return{active:N,shouldBlock:S,gateOpen:z,marks:i,unlockedTotal:R,batchSize:_,freeThreshold:k,recordMark:A,openGate:v,closeGate:f,watchVideoToUnlock:w,loading:c}}function wr(l){return l.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}async function jr(l){const{owned:g,totalRepetidas:p,missing:k,pct:T,legendsOwned:_,displayName:s,userId:i,referralCode:m}=l,C=(await W(async()=>{const{default:S}=await import("./browser-hz5OxoC3.js").then(A=>A.b);return{default:S}},__vite__mapDeps([0,1,2]))).default,F=Ks(i,m),z=await C.toDataURL(F,{width:280,margin:2,color:{dar
2k:"#0f172a",light:"#ffffff"},errorCorrectionLevel:"M"}),$=360,c=640,M=document.createElement("div");M.style.cssText=`position:fixed;left:-9999px;top:0;width:${$}px;height:${c}px;overflow:hidden;font-family:system-ui,-apple-system,sans-serif;`;const N=(S,A,v)=>`<div style="flex:1;text-align:center;">
3       <div style="color:${v};font-size:20px;font-weight:900;line-height:1;">${S}</div>
4       <div style="color:rgba(255,255,255,0.45);font-size:7px;font-weight:700;text-transform:uppercase;margin-top:3px;letter-spacing:0.5px;">${A}</div>
5     </div>`,R='<div style="width:1px;background:rgba(255,255,255,0.1);align-self:stretch;"></div>';M.innerHTML=`<div style="width:${$}px;height:${c}px;background:#0d1b3e;display:flex;flex-direction:column;align-items:center;padding:30px 20px 24px;box-sizing:border-box;">
6    <div style="display:flex;align-items:center;gap:10px;margin-bottom:18px;width:100%;">
7      <img src="/logo.png" style="width:44px;height:44px;border-radius:10px;flex-shrink:0;" crossorigin="anonymous" />
8      <div>
9        <div style="color:#fff;font-size:17px;font-weight:900;line-height:1.15;">Troca Figurinhas</div>
10        <div style="color:#34d399;font-size:12px;font-weight:700;">2026</div>
11      </div>
12    </div>
13    <div style="width:100%;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.1);border-radius:16px;padding:14px 16px 16px;margin-bottom:16px;">
14      <div style="color:rgba(255,255,255,0.45);font-size:8px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;margin-bottom:4px;">Meu Álbum</div>
15      <div style="color:#fff;font-size:15px;font-weight:900;margin-bottom:10px;word-break:break-word;line-height:1.25;">${wr(s)}</div>
16      <div style="display:flex;align-items:center;gap:8px;margin-bottom:14px;">
17        <div style="flex:1;background:rgba(255,255,255,0.1);border-radius:99px;height:8px;overflow:hidden;">
18          <div style="background:linear-gradient(90deg,#6366f1,#22c55e);border-radius:99px;height:8px;width:${T}%;"></div>
19        </div>
20        <div style="color:#34d399;font-size:10px;font-weight:700;flex-shrink:0;">${T}%</div>
21      </div>
22      <div style="display:flex;align-items:center;">
23        ${N(g,"Coladas","#4ade80")}${R}${N(p,"Repetidas","#60a5fa")}${R}${N(k,"Faltam","#fb923c")}${R}${N(_,"Legends","#c084fc")}
24      </div>
25    </div>
26    <div style="background:#fff;border-radius:16px;padding:12px;margin-bottom:14px;">
27      <img src="${z}" style="width:125px;height:125px;display:block;" />
28    </div>
29    <div style="text-align:center;">
30      <div style="color:#fff;font-size:13px;font-weight:800;line-height:1.4;margin-bottom:8px;">Leia esse QRcode e veja quais<br/>figurinhas podemos trocar!</div>
31      <div style="display:inline-block;background:linear-gradient(90deg,#6366f1,#22c55e);color:#fff;font-size:10px;font-weight:700;padding:4px 14px;border-radius:99px;">trocafigurinhas.app</div>
32    </div>
33  </div>`,document.body.appendChild(M);try{const{default:S}=await W(async()=>{const{default:v}=await import("./html2canvas.esm-B0tyYwQk.js");return{default:v}},[]);return(await S(M.firstElementChild,{scale:3,useCORS:!0,allowTaint:!0,backgroundColor:"#0d1b3e",logging:!1})).toDataURL("image/png")}finally{document.body.removeChild(M)}}async function Ma(l){const g=await jr(l),p=g.split(",")[1]??g;if(it.isNativePlatform()){const{Filesystem:k,Directory:T}=await W(async()=>{const{Filesystem:m,Directory:C}=await import("./index-AXFh6Dhp.js");return{Filesystem:m,Directory:C}},__vite__mapDeps([3,1,2,4])),{Share:_}=await W(async()=>{const{Share:m}=await import("./index-DCVUeMBf.js");return{Share:m}},__vite__mapDeps([5,1,2])),s=`trocafigurinhas_story_${Date.now()}.png`,i=await k.writeFile({path:s,data:p,directory:T.Cache});try{await k.writeFile({path:`TrocaFigurinhas/${s}`,data:p,directory:T.Documents})}catch{}await _.share({title:"Troca Figurinhas 2026",url:i.uri,dialogTitle:"Compartilhar"})}else{const k=await(await fetch(g)).blob(),T=new File([k],"trocafigurinhas_story.png",{type:"image/png"});if(navigator.canShare?.({files:[T]}))await navigator.share({files:[T],title:"Troca Figurinhas 2026"});else{const _=document.createElement("a");_.href=g,_.download="trocafigurinhas_story.png",_.click()}}}const kr="https://trocafigurinhas.app",Nr=`${kr}?utm_source=checklist_pdf&utm_medium=print&utm_campaign=album_pdf`;function De(l){return l.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Cr(l){const g=l.replace(/^[A-Z]+(?: [A-Z]+)? /,"");return g==="00"?"00":g.replace(/^0+(\d)/,"$1")}function Sr(l,g){if(g==="FWC_START"||g==="FWC_END")return"Especiais";if(g==="CC")return"Coca-Cola";const p=l-1;return p<0||p>=48?"Extras":`Grupo ${String.fromCharCode(65+Math.floor(p/4))}`}function Tr(l,g){const p=g??(l.albumOrder?.length?l.albumOrder:Ft),k=new Map;for(const C of l.stickers){const F=k.get(C.country)??[];F.push(C),k.set(C.country,F)}const T=new Set(l.userData.haves),_=new Set(l.userData.duplicates),s=new Set(l.userData.rares),i=new Set(l.userData.wanted);let m="";return p.map((C,F)=>{const z=k.get(C)??[];if(z.length===0)return"";const $=Sr(F,C),c=$!==m?`<tr class="group-row"><td colspan="22">${De($)}</td></tr>`:"";m=$;const M=z.map(S=>{const A=l.stickerData[S.id]?.count??1,v=_.has(S.id),f=s.has(S.id),B=T.has(S.id),w=i.has(S.id),b=f?"rare":v?"duplicate":B?"have":w?"wanted":"missing",P=v?`<span class="dup-badge">${A>9?"9+":A}</span>`:"";return`<td class="sticker-cell ${b}" title="${De(S.label)} - ${De(S.name)}"><span>${De(Cr(S.label))}</span>${P}</td>`}).join(""),N=Array.from({length:Math.max(0,20-z.length)},()=>'<td class="sticker-cell empty"></td>').join(""),R=`${ie[C]??""} ${ne[C]??C}`.trim();return`${c}<tr><th class="country-cell">${De(R)}</th>${M}${N}</tr>`}).join("")}function Dr(l,g,p=!1){const k=l.userData.haves.length+l.userData.duplicates.length+l.userData.rares.length,T=l.userData.duplicates.reduce((m,C)=>
33m+(l.stickerData[C]?.count??1),0),_=new Date().toLocaleString("pt-BR",{timeZone:"America/Sao_Paulo"}),s=l.albumOrder?.length?l.albumOrder:Ft,i=Tr(l,s);return`<!doctype html>
34<html lang="pt-BR">
35<head>
36  <meta charset="utf-8" />
37  <meta name="viewport" content="width=1100" />
38  <title>Troca Figurinhas 2026 – Álbum</title>
39  <style>
40    @page { size: A4 landscape; margin: 4mm; }
41    * { box-sizing: border-box; }
42    body { margin: 0; background: white; color: #111827; font-family: Arial, sans-serif; }
43    .page { padding: 8px 10px; }
44
45    /* ── Hero ─────────────────────────────────────────────────────── */
46    .hero { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px;
47            background: linear-gradient(135deg, #312e81, #0f766e); color: white; margin-bottom: 5px; }
48    .brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
49    .brand img { width: 40px; height: 40px; border-radius: 9px; background: white; object-fit: contain; padding: 3px; flex-shrink: 0; }
50    .brand-text { min-width: 0; }
51    .brand-text h1 { margin: 0; font-size: 15px; font-weight: 900; line-height: 1.1; white-space: nowrap; }
52    .brand-text p  { margin: 1px 0 0; color: rgba(255,255,255,.8); font-size: 9px; }
53    .stats-row { display: flex; gap: 5px; flex-shrink: 0; }
54    .s-pill { background: rgba(255,255,255,.15); border-radius: 6px; padding: 3px 7px;
55              font-size: 8px; font-weight: 900; color: white; white-space: nowrap; line-height: 1.4; }
56    .s-pill small { font-weight: 500; opacity: .8; display: block; font-size: 7px; }
57    .qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
58    .qr-wrap img { width: 72px; height: 72px; border-radius: 8px; background: white; padding: 4px; }
59    .qr-wrap p { margin: 0; font-size: 6.5px; color: rgba(255,255,255,.75); text-align: center; max-width: 72px; }
60
61    /* ── Legend ───────────────────────────────────────────────────── */
62    .legend { display: flex; gap: 10px; align-items: center; margin: 4px 0; font-size: 8px; font-weight: 700; color: #374151; flex-wrap: wrap; }
63    .l-item { display: flex; align-items: center; gap: 3px; }
64    .l-sw { display: inline-block; width: 14px; height: 10px; border-radius: 3px; border: 1px solid #374151; vertical-align: middle; }
65    .l-sw.have { background-image: repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(0,0,0,.38) 3px, rgba(0,0,0,.38) 4.5px); background-color: white; }
66    .l-sw.dup  { background: white; }
67    .l-sw.rare { background-image: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0,0,0,.38) 3px, rgba(0,0,0,.38) 4.5px); background-color: white; }
68    .l-sw.want { background: white; border-style: dashed; }
69    .l-sw.miss { background: white; border-color: #d1d5db; }
70
71    /* ── Table ────────────────────────────────────────────────────── */
72    table { width: 100%; border-collapse: separate; border-spacing: 1px; table-layout: fixed; }
73    .country-cell { width: 82px; padding: 3px 5px; border-radius: 6px; background: #1f2937; color: white;
74                    font-size: 7.5px; font-weight: 700; line-height: 1.25; word-break: break-word;
75                    hyphens: auto; vertical-align: middle; text-align: left; }
76    .group-row td { padding: 5px 4px 2px; color: #312e81; font-size: 9.5px; font-weight: 900;
77                    letter-spacing: .07em; text-transform: uppercase; border-bottom: 1px solid #e5e7eb; }
78    .sticker-cell { position: relative; height: 17px; border: 1px solid #d1d5db; border-radius: 4px;
79                    background: white; text-align: center; vertical-align: middle; line-height: 17px;
80                    font-size: 7.5px; font-weight: 900; color: #9ca3af; overflow: visible; }
81    .sticker-cell span:first-child { position: relative; z-index: 1; }
82
83    /* B&W-friendly status styles */
84    .sticker-cell.have {
85      background-image: repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(0,0,0,.32) 3px, rgba(0,0,0,.32) 4.5px);
86      background-color: white;
87      border: 1.5px solid #374151;
88      color: #111;
89    }
90    .sticker-cell.duplicate {
91      border: 1.5px solid #374151;
92      background: white;
93      color: #111;
94    }
95    /* Bolinha de quantidade na borda inferior direita */
96    .dup-badge {
97      position: absolute;
98      bottom: 1px; right: 1px;
99      min-width: 11px; height: 11px;
100      padding: 0 2px;
101      background: #111;
102      color: white;
103      border-radius: 50%;
104      font-size: 6px; font-weight: 900;
105      line-height: 11px; text-align: center;
106      display: block;
107      z-index: 2;
108    }
109    .sticker-cell.rare {
110      background-image: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0,0,0,.32) 3px, rgba(0,0,0,.32) 4.5px);
111      background-color: white;
112      border: 1.5px solid #374151;
113      color: #111;
114      font-style: italic;
115    }
116    .sticker-cell.wanted   { border: 1px dashed #374151; background: white; color: #374151; }
117    .sticker-cell.missing  { color: #9ca3af; }
118    .sticker-cell.empty    { border-color: transparent; background: transparent; }
119
120    /* ── Footer ───────────────────────────────────────────────────── */
121    .footer { display: flex; justify-content: space-between; margin-top: 5px; font-size: 7.5px; color: #6b7280; }
122    .footer strong { color: #312e81; }
123
124    /* ── Botão Voltar (nativo) ──────────────────────────────────────────── */
125    .back-btn-wrap { margin-bottom: 6px; }
126    .back-btn { background: #312e81; color: #fff; border: none; border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-family: inherit; }
127
128    /* ── Print: zoom para caber em 1 página A4 landscape ───────────────── */
129    @media print {
130      body { background: white; }
131      @page { size: A4 landscape; margin: 4mm; }
132      html { zoom: 0.72; }
133      .back-btn-wrap { display: none !important; }
134    }
135  </style>
136</head>
137<body>
138${p?"":`  <div class="back-btn-wrap">
139    <button class="back-btn" onclick="history.back()">← Voltar ao App</button>
140  </div>
141`}  <main class="page">
142    <header class="hero">
143      <div class="brand">
144        <img src="https://trocafigurinhas.app/logo.png" alt="Troca Figurinhas 2026" />
145        <div class="brand-text">
146          <h1>Troca Figurinhas 2026 – Álbum</h1>
147          <p>@trocafigurinhas_app &nbsp;·&nbsp; Marque aqui, atualize no app depois</p>
148        </div>
149      </div>
150      <div class="stats-row">
151        <div class="s-pill">${l.completionPct}%<small>Completo</small></div>
152        <div class="s-pill">${k}<small>Coladas</small></div>
153        <div class="s-pill">${T}<small>Repetidas</small></div>
154        <div class="s-pill">${l.userData.rares.length}<small>Raras</small></div>
155        <div class="s-pill">${Math.max(l.total-k,0)}<small>Faltantes</small></div>
156      </div>
157      <div class="qr-wrap">
158        <img src="${g}" alt="QR – Baixar app" />
159        <p>Escaneie para baixar o app</p>
160      </div>
161    </header>
162    <section class="legend">
163      <div class="l-item"><span class="l-sw have"></span>Colada (hachura diagonal)</div>
164      <div class="l-item"><span class="l-sw dup"></span>Repetida (bolinha com qtd.)</div>
165      <div class="l-item"><span class="l-sw rare"></span>Rara (hachura horizontal)</div>
166      <div class="l-item"><span class="l-sw want"></span>Desejada (borda tracejada)</div>
167      <div class="l-item"><span class="l-sw miss"></span>Faltante (borda clara)</div>
168    </section>
169    <table aria-label="Checklist do álbum por seleção"><tbody>${i}</tbody></table>
170    <footer class="footer">
171      <span>Gerado em ${De(_)} pelo <strong>Troca Figurinhas 2026</strong></span>
172      <span>Instagram: <strong>@trocafigurinhas_app</strong> · trocafigurinhas.app</span>
173    </footer>
174  </main>
175${p?"":`<script>(function(){var d=false;function p(){if(d)return;d=true;try{window.print();}catch(e){}}window.addEventListener('load',function(){setTimeout(p,350);});})();<\/script>
176`}</body>
177</html>`}async function _r(l){const g=it.isNativePlatform(),p=g?null:window.open("","_blank");if(!g&&!p)return!1;try{const{default:k}=await W(async()=>{const{default:m}=await import("./browser-hz5OxoC3.js").then(C=>C.b);return{default:m}},__vite__mapDeps([0,1,2])),T=await k.toDataURL(Nr,{errorCorrectionLevel:"H",margin:1,width:220}),_=Dr(l,T,g);if(g){const{Filesystem:m,Directory:C}=await W(async()=>{const{Filesystem:S,Directory:A}=await import("./index-AXFh6Dhp.js");return{Filesystem:S,Directory:A}},__vite__mapDeps([3,1,2,4])),{Share:F}=await W(async()=>{const{Share:S}=await import("./index-DCVUeMBf.js");return{Share:S}},__vite__mapDeps([5,1,2])),[{default:z},{jsPDF:$}]=await Promise.all([W(()=>import("./html2canvas.esm-B0tyYwQk.js"),[]),W(()=>import("./jspdf.es.min-B_nuur42.js").then(S=>S.j),__vite__mapDeps([6,1,2]))]),c=(/<style[^>]*>([\s\S]*?)<\/style>/i.exec(_)??["",""])[1],M=(/<body[^>]*>([\s\S]*?)<\/body>/i.exec(_)??["",""])[1],N=document.createElement("style");N.setAttribute("data-pdf-tmp","1"),N.textContent=c,document.head.appendChild(N);const R=document.createElement("div");R.setAttribute("data-pdf-tmp","1"),R.style.cssText="position:absolute;left:-9999px;top:0;width:1122px;background:#fff;z-index:-9999;",R.innerHTML=M,document.body.appendChild(R);try{await new Promise(H=>setTimeout(H,600));const S=await z(R,{scale:2,useCORS:!0,backgroundColor:"#ffffff",logging:!1,width:1122,windowWidth:1122,scrollX:0,scrollY:0}),A=new $({orientation:"portrait",unit:"mm",format:"a4"}),v=210,f=297,B=S.height/S.width*v,w=S.toDataURL("image/jpeg",.93);if(B<=f)A.addImage(w,"JPEG",0,(f-B)/2,v,B);else{const H=f/B,E=v*H;A.addImage(w,"JPEG",(v-E)/2,0,E,f)}const b=A.output("arraybuffer"),P=new Uint8Array(b),O=[];for(let H=0;H<P.length;H+=8192)O.push(String.fromCharCode(...Array.from(P.subarray(H,H+8192))));const Z=btoa(O.join("")),U=`checklist-album-${Date.now()}.pdf`;await m.writeFile({path:U,data:Z,directory:C.Cache});const{uri:ue}=await m.getUri({path:U,directory:C.Cache});return await F.share({title:"Checklist Álbum – Troca Figurinhas 2026",url:ue}),!0}finally{document.head.removeChild(N),document.body.removeChild(R)}}if(!p||p.closed)return!1;const s=new Blob([_],{type:"text/html;charset=utf-8"}),i=URL.createObjectURL(s);return p.location.href=i,setTimeout(()=>URL.revokeObjectURL(i),6e4),!0}catch{return p?.close(),!1}}const Rr=a.lazy(()=>W(()=>
177import("./PremiumModal-Bkrz1MfJ.js"),__vite__mapDeps([7,1,2])));function Lr({marks:l,unlockedTotal:g,batchSize:p,loading:k,onWatchVideo:T,onClose:_,savingsBrl:s=0}){const{t:i}=It(),m=s>20,[C,F]=a.useState(!1),[z,$]=a.useState(0),[c,M]=a.useState(!1),N=l>=g,R=z>0,S=g-l,A=async()=>{M(!1),await T()==="unlocked"?$(f=>f+1):M(!0)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-[9998] flex items-center justify-center bg-black/70 px-6",children:e.jsxs("div",{className:"w-full max-w-sm rounded-3xl bg-slate-900 p-6 text-center shadow-2xl",children:[e.jsx("div",{className:`mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-2xl shadow-lg ${R?"bg-gradient-to-br from-green-400 to-emerald-500 shadow-emerald-500/30":"bg-gradient-to-br from-yellow-400 to-amber-500 shadow-amber-500/30"}`,children:e.jsx("i",{className:`fa-solid text-2xl text-slate-900 ${R?"fa-check":"fa-lock"}`})}),e.jsx("h2",{className:"mb-2 text-xl font-black text-white",children:R?i("stickerGate.unlockedTitle","Liberado! 🎉"):N?i("stickerGate.blockedTitle","Continue marcando!"):i("stickerGate.proactiveTitle","Libere mais figurinhas")}),e.jsxs("div",{className:"mb-3 inline-flex items-center gap-2 rounded-full bg-white/10 px-4 py-1.5",children:[e.jsx("i",{className:"fa-solid fa-lock-open text-emerald-400 text-xs"}),e.jsx("span",{className:"text-xs font-bold text-white",children:i("stickerGate.counter","{{total}} figurinhas liberadas",{total:g})}),S>0&&e.jsxs("span",{className:"text-xs text-white/50",children:["· ",i("stickerGate.remaining","{{n}} restantes",{n:S})]})]}),e.jsx("p",{className:"mb-4 text-sm leading-relaxed text-white/70",children:R?i("stickerGate.unlockedMessage","Você ganhou mais {{batch}} figurinhas! Quer liberar ainda mais agora?",{batch:p}):N?i("stickerGate.blockedMessage","São meses e muitas madrugadas 🌙 construindo o melhor app de troca pra você. Assista um vídeo rápido e libere mais {{batch}} figurinhas pra continuar!",{batch:p}):i("stickerGate.proactiveMessage","Assista um vídeo agora e ganhe {{batch}} figurinhas extras liberadas antes de precisar!",{batch:p})}),e.jsxs("p",{className:"mb-4 flex items-center justify-center gap-1.5 text-xs text-white/50",children:[e.jsx("i",{className:"fa-solid fa-heart text-rose-400"}),i("stickerGate.adsHelp","Os anúncios mantêm o app no ar e evoluindo sempre")]}),e.jsx("p",{className:"mb-4 rounded-2xl bg-emerald-500/10 px-3 py-2 text-xs leading-relaxed text-emerald-200",children:m?e.jsx(Lt,{i18nKey:"stickerGate.youSaved",values:{value:Math.round(s)},components:{b:e.jsx("strong",{className:"font-black text-emerald-300"})},defaults:"💰 Você já economizou <b>R$ {{value}}</b> trocando pelo app — e ainda divulgamos <b>várias promoções</b> pra você economizar mais!"}):e.jsx(Lt,{i18nKey:"stickerGate.avgSavings",components:{b:e.jsx("strong",{className:"font-black text-emerald-300"})},defaults:"💰 Nossos usuários economizam em média <b>R$ 648</b> completando o álbum por trocas!"})}),c&&e.jsx("p",{className:"mb-3 text-xs font-bold text-red-400",children:i("stickerGate.incomplete","Assista o vídeo completo para liberar mais figurinhas.")}),e.jsx("button",{type:"button",onClick:()=>void A(),disabled:k,className:"mb-3 flex w-full items-center justify-center gap-3 rounded-2xl bg-gradient-to-r from-green-500 to-emerald-600 px-6 py-4 text-base font-black text-white shadow-lg shadow-emerald-500/30 transition active:scale-95 disabled:opacity-60",children:k?e.jsxs(e.Fragment,{children:[e.jsx("i",{className:"fa-solid fa-spinner fa-spin text-lg"}),i("stickerGate.loading","Carregando vídeo...")]}):R?e.jsxs(e.Fragment,{children:[e.jsx("i",{className:"fa-solid fa-play text-lg"}),i("stickerGate.watchMore","Assistir mais um vídeo → +{{batch}} figurinhas",{batch:p})]}):e.jsxs(e.Fragment,{children:[e.jsx("i",{className:"fa-solid fa-play text-lg"}),i("stickerGate.watch","Assistir vídeo e liberar +{{batch}}",{batch:p})]})}),e.jsx("div",{className:"mb-3 rounded-2xl bg-white/5 p-3",children:e.jsx("p",{className:"text-xs leading-relaxed text-white/70",children:e.jsx(Lt,{i18nKey:"stickerGate.premiumInfo",components:{b:e.jsx("strong",{className:"font-black text-white"})},defaults:"👑 Com o <b>Premium Pro</b> você marca sem limites e sem anúncios. Custa <b>menos que 2 pacotes</b> e valoriza nosso trabalho. Não quer assinar? Conquiste Premium grátis no <b>check-in diário</b>!"})})}),e.jsxs("button",{type:"button",onClick:()=>F(!0),disabled:k,className:"mb-3 flex w-full items-center justify-center gap-2 rounded-2xl bg-gradient-to-r from-yellow-400 to-amber-500 px-6 py-3 text-sm font-black text-slate-900 shadow-lg shadow-amber-500/30 transition active:scale-95 disabled:opacity-60",children:[e.jsx("i",{className:"fa-solid fa-crown text-base"}),i("stickerGate.buyPremium","Assinar Premium Pro")]}),e.jsx("button",{type:"button",onClick:_,disabled:k,className:"mt-1 text-xs text-white/40 underline transition hover:text-white/60 disabled:opacity-60",children:R?i("stickerGate.continue","Continuar mar
177cando"):i("stickerGate.later","Agora não")})]})}),C&&e.jsx(a.Suspense,{fallback:null,children:e.jsx(Rr,{onClose:()=>F(!1)})})]})}const Mr=a.lazy(()=>W(()=>import("./QRCodeTrade-CS99VHGS.js"),__vite__mapDeps([8,1,2])).then(l=>({default:l.QRCodeTrade}))),Er=a.lazy(()=>W(()=>import("./PremiumModal-Bkrz1MfJ.js"),__vite__mapDeps([7,1,2]))),Ar=a.lazy(()=>W(()=>import("./StickerScanner-DETDorQJ.js"),__vite__mapDeps([9,1,2])).then(l=>({default:l.StickerScanner}))),Pr=a.lazy(()=>W(()=>import("./HomeRankingPreview-CI-yrDE6.js"),__vite__mapDeps([10,1,2,11,12]))),Ir=a.lazy(()=>W(()=>import("./HomeTournamentPreview-C11Tsjtw.js"),__vite__mapDeps([13,1,2,14,15]))),Fr=a.lazy(()=>W(()=>import("./DreamTeamGame-C0aVi5ps.js"),__vite__mapDeps([16,1,2]))),$r=a.lazy(()=>W(()=>import("./SuggestionsSheet-CCyw890X.js"),__vite__mapDeps([17,1,2]))),Et=()=>e.jsx("div",{className:"flex h-full w-full items-center justify-center p-8",children:e.jsx("i",{className:"fa-solid fa-circle-notch fa-spin text-2xl text-gray-400"})}),zr=994,Br=10,Ea=!1,Aa=[{pct:0,title:"Gandula"},{pct:20,title:"Titular"},{pct:50,title:"Artilheiro"},{pct:80,title:"Craque do Torneio"},{pct:100,title:"Lenda do Álbum"}],Or={0:"sticker-none",1:"sticker-have",2:"sticker-swap",3:"sticker-rare",4:"sticker-wanted"},Gr="h-11 flex items-center justify-center rounded-lg cursor-pointer select-none text-[11px] font-mono border border-transparent shadow-sm transition-all duration-200 active:scale-90",qr="h-14 flex flex-col items-center justify-center gap-0.5 py-1 rounded-lg cursor-pointer select-none text-[11px] font-mono border border-transparent shadow-sm transition-all duration-200 active:scale-90",Pa=l=>l.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim(),Ia=1440*60*1e3;function Hr({lastCheckin:l}){const g=a.useCallback(()=>{const s=l?Date.now()-l:1/0;return s<Ia?Ia-s:0},[l]),[p,k]=a.useState(()=>g());a.useEffect(()=>{if(k(g()),g()<=0)return;const i=setInterval(()=>k(m=>Math.max(0,m-1e3)),1e3);return()=>clearInterval(i)},[g]);const T=p<=0,_=(()=>{if(T)return"GO";const s=Math.floor(p/1e3),i=String(Math.floor(s/3600)).padStart(2,"0"),m=String(Math.floor(s%3600/60)).padStart(2,"0"),C=String(s%60).padStart(2,"0");return`${i}:${m}:${C}`})();return e.jsx("div",{className:q("pointer-events-none rounded-lg px-3 py-1 text-xs font-black shadow transition",T?"bg-amber-900 text-amber-100":"bg-amber-900/25 text-amber-900"),children:_})}function Xr({showFullAlbum:l,onProposeTrade:g,onOpenAppImport:p,onOpenMenu:k,autoOpenGame:T,onAutoOpenGameConsumed:_}){const{t:s}=It(),{user:i,profile:m}=lt(),C=`tradeHistory_${i?.uid??"guest"}`,{showLoginModal:F,setShowLoginModal:z,guardAction:$}=gr(),{state:c,toggleSticker:M,getStickerStatus:N,getStickerCount:R,setFilter:S,incrementDuplicate:A,decrementDuplicate:v,showToast:f,onboardingSeen:B,dismissOnboarding:w,setState:b,saveState:P,markStickersPending:O,flushPendingStickersNow:Z,markChecklistSynced:U,doCheckin:ue,setActiveTab:H,openPacketsModal:E,setOpenPacketsModal:ve,tradeRefreshKey:_e,isAdFree:Oe,hidesRotatingBanners:$t,setLegendCount:Ba}=ot(),{getSlot:Ge}=Qs(),{catalog:qe}=Pt(),I=qe.stickers,pe=qe.total||zr,ae=qe.isLive?qe.countries:Ft,Oa=a.useMemo(()=>["album_ad_1","album_ad_2","album_ad_3","album_affiliate_1","album_ad_4","album_ad_5","album_ad_6","album_affiliate_2"],[]),[Ur,Vr]=a.useState(!1),[Ga,zt]=a.useState(!1),[qa,Bt]=a.useState(!1),[Ot,Wr]=a.useState(!1),[He,Gt]=a.useState(null),[J,Re]=a.useState(null),[Ue,ct]=a.useState(null),[Ha,qt]=a.useState(l??!1),[Le,Ve]=a.useState(!1),[Ua,X]=a.useState(!1),[Ht,Ut]=a.useState(!1),[Va,we]=a.useState(!1),[We,je]=a.useState(!1),[Wa,Vt]=a.useState(!1),[Ka,Wt]=a.useState(!1),[Qa,ke]=a.useState(!1),[Ya,dt]=a.useState(!1);a.useEffect(()=>{T&&(dt(!0),_?.())},[T,_]);const[Za,ut]=a.useState(!1),[Ke,xt]=a.useState(!1),[fe,Kt]=a.useState({open:!1,variant:"default",title:""}),[Me,Qe]=a.useState(null),[le,Qt]=a.useState({referrerCoins:50,referredCoins:50}),[Yt,Zt]=a.useState([]),[Ja,Jt]=a.useState(!1),[Ee,Xt]=a.useState(""),[Ae,ea]=a.useState(""),[Ye,ta]=a.useState("Troca externa"),[de,Xa]=a.useState("all"),[he,es]=a.useState("ALL"),[Pe,ts]=a.useState(""),[oe,aa]=a.useState(!1),[mt,sa]=a.useState(0),[Ie,ra]=a.use
177State(0),[se,as]=a.useState(()=>{try{return localStorage.getItem("gridLocked")==="true"}catch{return!1}}),[ss,rs]=a.useState(()=>{try{const t=new Date().toLocaleDateString("sv-SE",{timeZone:"America/Sao_Paulo"});return localStorage.getItem(`streak_reminder_dismissed_${t}`)==="1"}catch{return!1}}),[Q,na]=a.useState(null),[ns,Ze]=a.useState(!1),[pt,is]=a.useState(()=>{try{const t=i?.uid;return t?parseInt(localStorage.getItem(`age_warning_count_${t}`)||"0",10):2}catch{return 2}}),[ls,ia]=a.useState(!1),[os,la]=a.useState(!1),[ft,ht]=a.useState("trade"),[ge,Fe]=a.useState(0),[oa,$e]=a.useState(""),[ca,da]=a.useState(0),gt=a.useRef(null),bt=a.useRef(null);a.useEffect(()=>{try{localStorage.setItem("gridLocked",String(se))}catch{}},[se]);const cs=a.useCallback(()=>{as(t=>!t)},[]),yt=a.useCallback(t=>{i?.uid&&(gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{lr(i.uid,t).catch(()=>{})},800))},[i?.uid]),Je=a.useRef(null),L=a.useMemo(()=>{const t=c.userData,r=new Set(t.wanted),n=new Set(t.rares.filter(V=>!r.has(V))),h=new Set(t.duplicates.filter(V=>!r.has(V)&&!n.has(V))),y=new Set(t.haves.filter(V=>!r.has(V)&&!n.has(V)&&!h.has(V))),o=y.size,x=h.size,d=n.size,j=r.size,u=y.size+h.size+n.size,D=Math.min(100,Math.round(u/pe*100)),G=Math.max(0,pe-u);let Y=0;h.forEach(V=>{Y+=c.stickerData[V]?.count||1});let ce=Aa[0];return Aa.forEach(V=>{D>=V.pct&&(ce=V)}),{havesCount:o,duplicatesCount:x,raresCount:d,wantedCount:j,owned:u,pct:D,missing:G,totalRepetidas:Y,rank:ce}},[c.userData,c.stickerData]),ds=(()=>{if(Oe||(c.checkinStreak??0)<=0||ss)return!1;const t=new Date().toLocaleDateString("sv-SE",{timeZone:"America/Sao_Paulo"});return(c.lastCheckin?new Date(c.lastCheckin).toLocaleDateString("sv-SE",{timeZone:"America/Sao_Paulo"}):null)!==t})();a.useEffect(()=>{const t=m?.email??"",r=m?.city??"";Ys(t,Oe,r).then(n=>{if(!n)return;const h=`top_banner_dismissed_${n.id}`,y=`top_banner_shown_count_${n.id}`;if(localStorage.getItem(h)==="1"){na(n),Ze(!0);return}if(n.max_displays!==null){const o=parseInt(localStorage.getItem(y)??"0",10);if(o>=n.max_displays){Ze(!0);return}localStorage.setItem(y,String(o+1))}na(n),Ze(!1)})},[m?.email,m?.city,Oe]);const us=a.useCallback(()=>{Q&&(localStorage.setItem(`top_banner_dismissed_${Q.id}`,"1"),Ze(!0))},[Q]),xs=a.useCallback(()=>{if(Q)switch(Q.action_type){case"in_app":Q.action_target&&H(Q.action_target);break;case"url":Q.action_target&&window.open(Q.action_target,"_blank","noopener,noreferrer");break;case"app_store":window.dispatchEvent(new CustomEvent("tf:open-store-choice"));break}},[Q,H]),ua=!!Q&&!ns,ms=(()=>{try{if(!Ea)return!1;const t=i?.uid;return!t||os||localStorage.getItem(`trocafigurinhas_trade_age_warned_${t}`)==="1"?!1:We}catch{return!1}})(),ps=(()=>{try{if(!Ea)return!1;const t=i?.uid;if(!t||ls||!m?.createdAt||Date.parse(m.createdAt)>=Zs||localStorage.getItem(`age_warning_corrected_${t}`)==="1"||!m?.birthdate)return!1;const r=new Date(m.birthdate);if(isNaN(r.getTime()))return!1;const n=new Date;let h=n.getFullYear()-r.getFullYear();const y=n.getMonth()-r.getMonth();return(y<0||y===0&&n.getDate()<r.getDate())&&h--,h>=18?!1:pt<2}catch{return!1}})();a.useMemo(()=>c.filter==="ALL"?I.slice(0,50):I.filter(t=>t.country===c.filter),[c.filter]),a.useMemo(()=>[...new Set(I.map(r=>r.country))].map(r=>({code:r,name:ne[r]||r,flag:ie[r]||""})),[]),a.useMemo(()=>[],[]),a.useMemo(()=>Ot?[...new Set(I.map(r=>r.country))].map(r=>{const n=I.filter(x=>x.country===r),h=n.length,y=n.filter(x=>c.userData.haves.includes(x.id)||c.userData.duplicates.includes(x.id)||c.userData.rares.includes(x.id)).length,o=h>0?Math.round(y/h*100):0;return{code:r,name:ne[r]||r,flag:ie[r]||"",has:y,total:h,pct:o}}).sort((r,n)=>n.pct-r.pct):[],[Ot,c.userData]);const xa=a.useCallback(t=>{Gt(t),bt.current&&clearTimeout(bt.current),bt.current=setTimeout(()=>Gt(null),3e3)},[]),vt=a.useRef("groups"),K=vr(),ma=a.useRef(K);ma.current=K;const[fs,pa]=a.useState(0),fa=a.useRef(!1);a.useEffect(()=>{!K.gateOpen||fa.current||!i?.uid||(fa.current=!0,dr(i.uid).then(pa).catch(()=>pa(0)))},[K.gateOpen,i?.uid]);const wt=a.useCallback(t=>{if(se){f(s("album.gridLockedMessage","🔒 Grid travado! Toque no cadeado ao lado do botão SCAN para destravar."));return}const r=ma.current,n=vt.current!=="duplicates"&&N(t.id)===0;if(n&&r.shouldBlock){r.openGate();return}vt.current==="duplicates"?v(t.id):(M(t.id),n&&r.recordMark()),xa(t),$()},[se,v,M,xa,$,f,s,N]),jt=a.useCallback(t=>{if(se){f(s("album.gridLockedMessage","🔒 Grid travado! Toque no cadeado ao lado do botão SCAN para destravar."));return}if(N(t)===3){ct(t);return}Re(t)},[se,f,s,N]);a.useEffect(()=>{i?.uid&&(m?.referralCode?Qe(m.referralCode):At(i.uid).then(t=>{t&&Qe(t)}),$a().then(Qt).catch(()=>Qt({referrerCoins:50,referredCoins:50})))},[i?.uid,m?.referralCode]);const ha=a.useRef({stats:L,legendData:c.legendData,displayName:m?.displayName||m?.username,userId:i?.uid,referralCode:m?.referralCode,isSharingStory:Le,setIsSharingStory:Ve});a.useEffect(()=>{ha.current={stats:L,legendData:c.legendData,displayName:m?.displayName||m?.username,userId:i?.uid,referralCode:m?.referralCode,isSharingStory:Le,setIsSharingStory:Ve}}),a.useEffect(()=>{const t=async()=>{const{stats:r,legendData:n,displayName:h,userId:y,referralCode:o,isSharingStory:x,setIsSharingStory:d}=ha.current;if(!(x||!y)){d(!0);try{await Ma({owned:r.owned,totalRepetidas:r.totalRepetidas,missing:r.missing,pct:r.pct,legendsOwned:Mt(n??{}),displayName:h||"Colecionador",userId:y,referralCode:o})}catch{}finally{d(!1)}}};return window.addEventListener("tf:open-album-share",t),()=>window.removeEventListener("tf:open-album-share",t)},[]);const xe=a.useCallback(async()=>
177{if(Me)return Me;if(m?.referralCode)return Qe(m.referralCode),m.referralCode;if(!i?.uid)return null;const t=await At(i.uid);return t&&Qe(t),t},[Me,m?.referralCode,i?.uid]),hs=a.useCallback(()=>{try{const t=new Date().toLocaleDateString("sv-SE",{timeZone:"America/Sao_Paulo"});localStorage.setItem(`streak_reminder_dismissed_${t}`,"1")}catch{}rs(!0)},[]),gs=a.useCallback(()=>{try{const t=i?.uid;if(t){const r=pt+1;localStorage.setItem(`age_warning_count_${t}`,String(r)),is(r)}}catch{}ia(!0)},[i?.uid,pt]),bs=a.useCallback(()=>{ia(!0),window.dispatchEvent(new Event("tf:open-settings-birthdate"))},[]),ys=a.useCallback(()=>{const t=i?.uid;t&&localStorage.setItem(`trocafigurinhas_trade_age_warned_${t}`,"1"),la(!0)},[i?.uid]),vs=a.useCallback(()=>{const t=i?.uid;t&&localStorage.setItem(`trocafigurinhas_trade_age_warned_${t}`,"1"),la(!0),window.dispatchEvent(new Event("tf:open-settings-birthdate"))},[i?.uid]),ws=a.useCallback(async()=>{if(!await xe()){f("Seu código de convite ainda não está pronto. Tente novamente em instantes.");return}Kt({open:!0,variant:"default",title:s("album.inviteFriend"),description:`Você ganha ${le.referrerCoins} moedas e seu amigo ganha ${le.referredCoins} moedas. Cada amigo que entrar pelo seu link conta nos rankings.`})},[xe,le.referrerCoins,le.referredCoins,f,s]),js=a.useMemo(()=>{const t=Ge("home_actions_banner");if(t)return{...t,affiliateTitle:t.affiliateTitle||"Ofertas e parceiros do Troca Figurinhas",affiliateSubtitle:t.affiliateSubtitle||"Espaço patrocinado para colecionadores",affiliateButtonText:t.affiliateButtonText||"VER",affiliateIcon:t.affiliateIcon||"⚽",affiliateGradient:t.affiliateGradient||"from-emerald-600 to-indigo-700"}},[Ge]),Xe=a.useCallback(async()=>{const t=Js();t!=="web"&&f("Gerando PDF, aguarde...");const r=await _r({stickers:I,albumOrder:ae,userData:c.userData,stickerData:c.stickerData,total:pe,completionPct:L.pct});f(r?t!=="web"?"PDF gerado! Escolha onde salvar.":"PDF aberto. Use Imprimir/Salvar como PDF.":"Não consegui gerar o PDF. Tente novamente.")},[pe,ae,f,c.stickerData,c.userData,L.pct,I]),ks=a.useMemo(()=>{const t=u=>{const D={};for(const G of u)D[G.country]||(D[G.country]=[]),D[G.country].push({label:G.label,flag:ie[G.country]||""});return sr(D)},r=I.filter(u=>!c.userData.haves.includes(u.id)&&!c.userData.duplicates.includes(u.id)&&!c.userData.rares.includes(u.id)),n=c.userData.duplicates.map(u=>I.find(D=>D.id===u)).filter(u=>!!u),h=n.reduce((u,D)=>u+(c.stickerData[D.id]?.count||1),0),y={};for(const u of n)y[u.country]||(y[u.country]=[]),y[u.country].push({label:u.label,flag:ie[u.country]||"",qty:c.stickerData[u.id]?.count||1});const x=[...new Set([...c.userData.haves,...c.userData.duplicates,...c.userData.rares])].map(u=>I.find(D=>D.id===u)).filter(u=>!!u),d=c.userData.rares.map(u=>I.find(D=>D.id===u)).filter(u=>!!u),j=c.userData.wanted.map(u=>I.find(D=>D.id===u)).filter(u=>!!u);return[{id:"missing",title:"Faltantes",description:"Figurinhas que ainda preciso para completar o álbum.",count:r.length,icon:"fa-list-check",iconClassName:"bg-orange-50 text-orange-500",exportText:t(r),inviteVariant:"missing"},{id:"duplicates",title:"Repetidas",description:"Lista pronta para encontrar quem precisa trocar.",count:h,icon:"fa-layer-group",iconClassName:"bg-blue-50 text-blue-500",exportText:Fa(y),inviteVariant:"duplicates"},{id:"owned",title:"Coladas",description:"Tudo que já está marcado no meu álbum.",count:x.length,icon:"fa-circle-check",iconClassName:"bg-emerald-50 text-emerald-500",exportText:t(x)},{id:"pdf-checklist",title:"PDF do álbum",description:"Exporte a lista atualizada para seu filho levar para a escola e depois atualize o app!",count:pe,icon:"fa-file-pdf",iconClassName:"bg-red-50 text-red-600",exportText:""},{id:"rares",title:"Raras",description:"Figurinhas especiais registradas na coleção.",count:d.length,icon:"fa-star",iconClassName:"bg-yellow-50 text-yellow-500",exportText:t(d)},{id:"wanted",title:"Desejadas",description:"Figurinhas marcadas como prioridade de busca.",count:j.length,icon:"fa-heart",iconClassName:"bg-pink-50 text-pink-500",exportText:t(j)}]},[pe,ae,c.stickerData,c.userData,I]),et=a.useCallback((t,r)=>{const n=m?.username||m?.displayName||i?.displayName||void 0,h={code:r,nickname:n,referrerCoins:le.referrerCoins,referredCoins:le.referredCoins},y=x=>{const d=i?.uid,u=[x,"","🏆 Monte sua seleção lendária e busque a Taça! Jogue o 11 Campeões! Duele com amigos!",rr(r)];return d&&u.push("",s("trades.qrTrade.showcaseCtaLine"),Ca(d,r)),u.join(`
178`)};if(t.id==="missing")return y(ka("missing",{...h,extras:{missingList:t.exportText,missingCount:t.count}}));if(t.id==="duplicates")return y(ka("duplicates",{...h,extras:{duplicatesList:t.exportText,duplicatesListCount:t.count}}));const o=["Troca Figurinhas 2026","",`${t.title} (${t.count})`,"",t.exportText?t.exportText:"Nenhuma figurinha nesta lista por enquanto.","",`Meu álbum está ${L.pct}% completo: ${L.owned} coladas, ${L.totalRepetidas} repetidas e ${L.missing} faltantes.`].join(`
179`);return y(o)},[le.referredCoins,le.referrerCoins,m?.displayName,m?.username,L,s,i?.displayName,i?.uid]),Ns=a.useCallback(async t=>{if(t.id==="pdf-checklist"){await Xe();return}const r=await xe();if(!r){f("Seu código de convite ainda não está pronto. Tente novamente em instantes.");return}const n=et(t,r),h=await Na({title:t.title,text:n});if(h==="shared"){f("Lista compartilhada!");return}if(h==="unsupported"){const y=await nt(n);f(y?"Lista copiada para compartilhar.":"Não consegui copiar a lista.")}},[et,xe,Xe,f]),Cs=a.useCallback(async t=>{if(t.id==="pdf-checklist"){await Xe();return}const r=await xe();if(!r){f("Seu código de convite ainda não está pronto. Tente novamente em instantes.");return}const n=await nt(et(t,r));f(n?"Lista copiada.":"Não consegui copiar a lista.")},[et,xe,Xe,f]),tt=a.useCallback(async()=>{const t=i?.uid;if(!t)return null;const r=await xe(),n=Ca(t,r??void 0);return`${s("trades.qrTrade.shareShowcaseMsg",{count:L.totalRepetidas})}
180
181${n}`},[i?.uid,xe,s,L.totalRepetidas]),Ss=a.useCallback(async()=>{const t=await tt();if(!t)return;const r=await Na({title:s("trades.qrTrade.shareShowcase"),text:t});if(r==="shared")f("Vitrine compartilhada!"),we(!1);else if(r==="unsupported"){const n=await nt(t);f(n?"Mensagem da vitrine copiada!":"Não consegui copiar a mensagem."),n&&we(!1)}},[tt,s,f]),Ts=a.useCallback(async()=>{const t=await tt();if(!t){f("Seu link da vitrine ainda não está pronto. Tente novamente em instantes.");return}const r=await nt(t);f(r?"Mensagem da vitrine copiada!":"Não consegui copiar a mensagem.")},[tt,f]),Ne=a.useCallback(t=>{const r=o=>{const x=o.replace(/\s+/g," ").trim().toUpperCase(),d=x.match(/^([A-Z]{2,5})\s*0*([0-9]{1,3})$/);if(!d)return x;const j=parseInt(d[2]??"",10);return Number.isNaN(j)?x:`${d[1]} ${j}`},n=t.split(/[,;\n]+/).map(o=>o.trim()).filter(o=>o.length>0),h=[],y=new Map;for(const o of I)y.set(r(o.label),o.id);for(const o of n){const x=parseInt(o,10);if(!Number.isNaN(x)&&String(x)===o&&x>=1&&x<=994){h.push(x);continue}const d=r(o),j=y.get(d);if(typeof j=="number"){h.push(j);continue}const u=o.replace(/\s+/g,""),D=parseInt(u,10);!Number.isNaN(D)&&String(D)===u&&D>=1&&D<=994&&h.push(D)}return h}
181,[I]),Ce=a.useCallback(t=>!t||t.length===0?"":t.map(r=>I.find(h=>h.id===Number(r))?.label??`#${r}`).join(", "),[I]),at=a.useMemo(()=>({gave:Ne(Ee),received:Ne(Ae)}),[Ee,Ae,Ne]),Se=a.useCallback(()=>{try{const t=localStorage.getItem(C);if(!t)return[];const r=JSON.parse(t);return Array.isArray(r)?r:[]}catch{return[]}},[]);a.useEffect(()=>{!Ke||!i?.uid||(Jt(!0),Xs(i.uid).then(t=>Zt(t)).catch(()=>Zt([])).finally(()=>Jt(!1)))},[Ke,i?.uid,_e]),a.useEffect(()=>{if(!We||!i?.uid)return;const t=i.uid;or(t).then(r=>{Fe(r),$e(r>0?String(r):"")}).catch(()=>Fe(0)),cr(t).then(r=>da(r)).catch(()=>da(L.owned))},[We,i?.uid]),a.useEffect(()=>{E&&(ht("packets"),je(!0),ve(!1))},[E,ve]);const st=a.useMemo(()=>Se(),[Ke,Se]),Ds=a.useMemo(()=>{const t=new Set;return st.forEach(r=>{[...r.gave||[],...r.received||[],...r.stickersGiven||[],...r.stickersReceived||[]].forEach(h=>{const y=I.find(o=>o.id===Number(h));y?.country&&t.add(y.country)})}),Array.from(t).sort()},[st]),be=a.useMemo(()=>{if(de==="digital")return[];const t=Pe.trim().toLowerCase();return st.filter(r=>{if(de!=="all"&&(r.type==="triangulada"?"triangular":r.type)!==de)return!1;const n=r.gave||r.stickersGiven||[],h=r.received||r.stickersReceived||[];return he!=="ALL"&&![...n,...h].some(x=>I.find(j=>j.id===Number(x))?.country===he)?!1:t?[r.partner||"",r.type||"",n.join(","),h.join(","),new Date(r.date).toLocaleString("pt-BR")].join(" ").toLowerCase().includes(t):!0})},[st,de,he,Pe]),ye=a.useMemo(()=>{if(!i?.uid)return[];const t=Yt.filter(n=>n.status==="confirmed");if(de==="manual"||de==="triangular")return[];const r=Pe.trim().toLowerCase();return t.filter(n=>{if(he!=="ALL"){const d=n.fromUserId===i.uid;if(![...d?n.give:n.receive,...d?n.receive:n.give].some(D=>I.find(Y=>Y.id===D)?.country===he))return!1}if(!r)return!0;const h=n.fromUserId===i.uid,y=h?n.give:n.receive,o=h?n.receive:n.give;return[...y,...o,new Date(n.completedAt??n.createdAt).toLocaleString("pt-BR")].join(" ").toLowerCase().includes(r)})},[Yt,de,he,Pe,i?.uid]),kt=a.useMemo(()=>{const t=new Set(be.map(o=>o.partner||"Troca externa")),r=new Set(ye.flatMap(o=>[o.fromUserId,o.toUserId].filter(x=>x!==i?.uid))),n=new Set([...t,...r]),h=be.reduce((o,x)=>{const d=x.gave||x.stickersGiven||[],j=x.received||x.stickersReceived||[];return o+d.length+j.length},0),y=ye.reduce((o,x)=>o+x.give.length+x.receive.length,0);return{total:be.length+ye.length,stickersTraded:h+y,partners:n.size}},[be,ye,i?.uid]),_s=a.useCallback(()=>{const t=Ne(Ee),r=Ne(Ae),n=Ye.trim()||"Troca externa";if(t.length===0&&r.length===0){f(s("manualTrade.atLeastOne"));return}const h=new Map;for(const x of t)h.set(x,(h.get(x)??0)+1);for(const[x,d]of h){const j=I.find(G=>G.id===x),u=j?c.stickerData[j.id]?.count||1:0,D=j&&c.userData.duplicates.includes(j.id)?u:0;if(!j||D<d){f(s("manualTrade.invalidSend",{num:x}));return}}for(const x of r)if(!I.find(j=>j.id===x)){f(s("manualTrade.invalidReceive",{num:x}));return}if(!window.confirm(s("manualTrade.confirmWith",{partner:n})))return;O([...new Set([...t,...r])]),b(x=>{const d={...x,userData:{...x.userData,haves:[...x.userData.haves],duplicates:[...x.userData.duplicates]},stickerData:{...x.stickerData}};for(const j of t){const u=I.find(G=>G.id===j);if(!u)continue;const D=d.stickerData[u.id]?.count||1;if(D>1){d.stickerData[u.id]={count:D-1};continue}delete d.stickerData[u.id],d.userData.duplicates=d.userData.duplicates.filter(G=>G!==u.id),d.userData.haves.includes(u.id)||d.userData.haves.push(u.id)}for(const j of r){const u=I.find(ce=>ce.id===j);if(!u)continue;const D=d.userData.haves.includes(u.id),G=d.userData.duplicates.includes(u.id);if(!D&&!G){d.userData.haves.push(u.id);continue}if(D){d.userData.haves=d.userData.haves.filter(ce=>ce!==u.id),d.userData.duplicates.push(u.id),d.stickerData[u.id]={count:1};continue}const Y=d.stickerData[u.id]?.count||1;d.stickerData[u.id]={count:Y+1}}return d});const y=Se(),o={id:Date.now(),type:"manual",gave:t,received:r,partner:n,date:new Date().toISOString()};localStorage.setItem(C,JSON.stringify([o,...y])),Xt(""),ea(""),ta(s("manualTrade.externalTrade")),je(!1),f(s("manualTrade.success"))},[Se,Ee,Ye,Ae,O,Ne,b,f,c.stickerData,c.userData.duplicates,s]),Rs=a.useCallback(t=>{if(!window.confirm(s("manualTrade.undoConfirm")))return;const r=t.gave||t.stickersGiven||[],n=t.received||t.stickersReceived||[];O([...r.map(Number),...n.map(Number)]),b(y=>{const o={...y,userData:{...y.userData,haves:[...y.userData.haves],duplicates:[...y.userData.duplicates]},stickerData:{...y.stickerData}};for(const x of n){const d=I.find(j=>j.id===Number(x));if(d)if(o.userData.duplicates.includes(d.id)){const j=o.stickerData[d.id]?.count||1;j>1?o.stickerData[d.id]={count:j-1}:(o.userData.duplicates=o.userData.duplicates.filter(u=>u!==d.id),delete o.stickerData[d.id],o.userData.haves.includes(d.id)||o.userData.haves.push(d.id))}else o.userData.haves.includes(d.id)&&(o.userData.haves=o.userData.haves.filter(j=>j!==d.id))}for(const x of r){const d=I.find(j=>j.id===Number(x));if(d)if(o.userData.duplicates.includes(d.id)){const j=o.stickerData[d.id]?.count||1;o.stickerData[d.id]={count:j+1}}else o.userData.haves.includes(d.id)?(o.userData.haves=o.userData.haves.filter(j=>j!==d.id),o.userData.duplicates.push(d.id),o.stickerData[d.id]={count:1}):o.userData.haves.push(d.id)}return o}
181);const h=Se().filter(y=>y.id!==t.id);localStorage.setItem(C,JSON.stringify(h)),P(),f(s("manualTrade.undoSuccess"))},[Se,O,P,b,f,s]),Ls=t=>({GOL:s("album.goalkeeper"),DEF:s("album.defender"),MEI:s("album.midfielder"),ATA:s("album.forward")})[t]||t,Nt=a.useCallback(async()=>{const t=i?.uid;if(!(!t||oe)){aa(!0);try{await Z();const r=await er(t);b(n=>({...n,userData:{...n.userData,haves:r.haves,duplicates:r.duplicates,rares:r.rares,wanted:r.wanted},stickerData:r.stickerData})),U(),P(),f(s("common.checklistUpdated"))}catch{f(s("common.couldNotUpdate"))}aa(!1)}},[Z,oe,U,P,b,f,s,i?.uid]),Ms=t=>{window.scrollY>0||oe||(Je.current=t.touches[0]?.clientY??null)},Es=t=>{if(Je.current===null||oe)return;const n=(t.touches[0]?.clientY??0)-Je.current;n>0&&sa(Math.min(120,n))},As=()=>{mt>=80&&!oe&&Nt(),Je.current=null,sa(0)};a.useEffect(()=>{if(Ie<=0)return;const t=setInterval(()=>{ra(r=>r>0?r-1:0)},1e3);return()=>clearInterval(t)},[Ie]),a.useCallback(()=>{if(!oe){if(Ie>0){f(`Aguarde ${Ie}s para atualizar novamente.`);return}ra(Br),Nt()}},[oe,Ie,Nt,f]);const Ct=a.useRef(!1),Ps=a.useMemo(()=>function({sticker:r}){const n=N(r.id),h=R(r.id),y=n===2,o=a.useRef(null),x=a.useRef(!1),d=a.useRef(!1),j=a.useRef(!1),u=a.useRef(null),D=re=>{j.current=!0,x.current=!1,d.current=!1;const me=re.touches[0];u.current=me?{x:me.clientX,y:me.clientY}:null,(n===2||n===3)&&(o.current=setTimeout(()=>{x.current=!0,jt(r.id)},600))},G=re=>{if(u.current&&re.touches[0]){const me=re.touches[0].clientX-u.current.x,Te=re.touches[0].clientY-u.current.y;(Math.abs(me)>10||Math.abs(Te)>10)&&(d.current=!0,o.current&&clearTimeout(o.current))}},Y=re=>{o.current&&clearTimeout(o.current),!x.current&&!d.current&&(re.preventDefault(),wt(r)),setTimeout(()=>{j.current=!1},300)},ce=()=>{j.current||(x.current=!1,d.current=!1,(n===2||n===3)&&(o.current=setTimeout(()=>{x.current=!0,jt(r.id)},600)))},V=()=>{j.current||(o.current&&clearTimeout(o.current),x.current||wt(r))};return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:q(Ct.current?qr:Gr,Or[n]),onTouchStart:D,onTouchMove:G,onTouchEnd:Y,onTouchCancel:()=>{o.current&&clearTimeout(o.current),setTimeout(()=>{j.current=!1},300)},onMouseDown:ce,onMouseUp:V,onMouseLeave:()=>o.current&&clearTimeout(o.current),children:[r.label,Ct.current&&r.name&&e.jsx("p",{className:"line-clamp-2 w-full px-0.5 text-center text-[8px] leading-tight font-bold break-words",children:r.name})]}),h>1&&y&&e.jsxs("span",{className:"sticker-badge absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-[10px] font-bold text-white shadow-md",children:["x",h]}),y&&e.jsx("button",{className:"sticker-plus-btn absolute -right-1 -bottom-1 z-10 flex h-5 w-5 items-center justify-center rounded-full bg-green-500 text-xs font-bold text-white shadow-md transition hover:bg-green-600",onClick:re=>{if(re.stopPropagation(),se){f(s("album.gridLockedMessage","🔒 Grid travado! Toque no cadeado para destravar."));return}A(r.id)},children:e.jsx("i",{className:"fa-solid fa-plus"})})]})},[N,R,wt,jt,A,se,f,s]),St=a.useMemo(()=>{const t=new Map;for(const r of I){const n=t.get(r.country)??[];n.push(r),t.set(r.country,n)}return t},[]),ga=a.useMemo(()=>{const t={},r=new Set(c.userData.haves),n=new Set(c.userData.duplicates),h=new Set(c.userData.rares);for(const y of ae){const o=St.get(y)??[],x=o.filter(d=>r.has(d.id)||n.has(d.id)||h.has(d.id)).length;t[y]={total:o.length,owned:x}}return t},[St,c.userData.haves,c.userData.duplicates,c.userData.rares]),[rt,ze]=a.useState(!1),[Tt,ba]=a.useState(""),[ee,Is]=a.useState("groups");vt.current=ee;const[Dt,Fs]=a.useState(!1);Ct.current=Dt;const ya=a.useRef({}),va=a.useMemo(()=>{const t=Pa(Tt);return t?ae.filter(r=>{const n=ne[r]??r;return Pa(`${r} ${n}`).includes(t)}):ae},[ae,Tt]),$s=a.useCallback(t=>{const r=ya.current[t];r&&r.scrollIntoView({behavior:"smooth",block:"start"}),ba(""),ze(!1)},[]),wa=6,_t=new Set(["FWC_START","FWC_END","CC"]),zs=a.useMemo(()=>
181{if(ee!=="alpha")return ae;const t=ae.filter(n=>_t.has(n)),r=ae.filter(n=>!_t.has(n)).sort((n,h)=>(ne[n]??n).localeCompare(ne[h]??h));return[...t,...r]},[ae,ee]),Bs=a.useCallback(t=>ee==="missing"?t.filter(r=>{const n=N(r.id);return n===0||n===4}):ee==="duplicates"?t.filter(r=>N(r.id)===2):t,[ee,N]),ja=K.gateOpen?te.createPortal(e.jsx(Lr,{marks:K.marks,unlockedTotal:K.unlockedTotal,batchSize:K.batchSize,loading:K.loading,onWatchVideo:K.watchVideoToUnlock,onClose:K.closeGate,savingsBrl:fs}),document.body):null;return Ha?e.jsxs("section",{className:"animate-fade absolute inset-0 z-30 flex flex-col bg-gray-50",children:[e.jsxs("div",{className:"shrink-0",children:[e.jsxs("div",{className:"bg-indigo-600 px-3 py-2 text-white sm:px-4 sm:py-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>qt(!1),className:"shrink-0 rounded-lg p-1.5 text-white transition hover:bg-white/20",children:e.jsx("i",{className:"fa-solid fa-arrow-left text-sm"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("h2",{className:"truncate text-sm font-black sm:text-base",children:[e.jsx("i",{className:"fa-solid fa-book-open mr-1.5"}),s("album.myAlbum","Meu álbum")]}),e.jsxs("p",{className:"truncate text-[10px] text-gray-200",children:[s("album.progress",{count:L.owned,total:pe})," (",L.pct,"%)"]})]}),e.jsx("button",{onClick:cs,className:q("flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-white transition",se?"bg-red-500/80":"bg-white/20 hover:bg-white/30"),title:se?"Desbloquear grid":"Travar grid",children:e.jsx("i",{className:q("fa-solid text-xs",se?"fa-lock":"fa-lock-open")})}),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex w-40 items-center gap-1.5 rounded-lg bg-white/20 px-2.5 py-1.5 text-white transition focus-within:bg-white/30",children:[e.jsx("i",{className:"fa-solid fa-magnifying-glass text-[10px] text-white/80"}),e.jsx("input",{value:Tt,onChange:t=>{ba(t.target.value),ze(!0)},onFocus:()=>ze(!0),placeholder:`${s("common.search")}...`,"aria-label":s("common.goTo"),className:"min-w-0 flex-1 bg-transparent text-[10px] font-bold text-white outline-hidden placeholder:text-white/70"}),e.jsx("button",{onClick:()=>ze(t=>!t),className:"rounded p-0.5 text-white/90 transition hover:bg-white/10","aria-label":rt?"Fechar busca de seleção":"Abrir busca de seleção",children:e.jsx("i",{className:`fa-solid fa-chevron-${rt?"up":"down"} text-[8px]`})})]}),rt&&e.jsxs("div",{className:"absolute right-0 z-50 mt-1 max-h-72 w-60 overflow-y-auto rounded-xl border border-gray-200 bg-white shadow-2xl",children:[va.length===0&&e.jsx("div",{className:"px-3 py-3 text-xs text-gray-500",children:s("common.noResults")}),va.map(t=>{const r=ga[t],n=r?Math.round(r.owned/r.total*100):0;return e.jsxs("button",{onClick:()=>$s(t),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs transition hover:bg-indigo-50",children:[e.jsx("span",{className:"text-base",children:ie[t]??"🏳️"}),e.jsx("span",{className:"flex-1 font-semibold text-gray-800",children:ne[t]??t}),e.jsxs("span",{className:q("rounded-full px-1.5 py-0.5 text-[9px] font-bold",n===100?"bg-emerald-100 text-emerald-700":n>0?"bg-indigo-100 text-indigo-700":"bg-gray-100 text-gray-500"),children:[n,"%"]})]},t)})]})]})]}),e.jsxs("div",{className:"mt-1 grid grid-cols-5 gap-1 text-center text-[8px] font-bold sm:text-[10px]",children:[e.jsxs("div",{className:"rounded-md bg-green-500 px-1 py-1",children:[e.jsx("div",{className:"text-[7px] font-bold text-white/90 uppercase sm:text-[9px]",children:s("sticker.have")}),e.jsx("div",{className:"text-sm font-black text-white sm:text-base",children:L.owned})]}),e.jsxs("div",{className:"rounded-md bg-blue-500 px-1 py-1",children:[e.jsx("div",{className:"text-[7px] font-bold text-white/90 uppercase sm:text-[9px]",children:s("sticker.swap")}),e.jsx("div",{className:"text-sm font-black text-white sm:text-base",children:L.totalRepetidas})]}),e.jsxs("div",{className:"rounded-md bg-yellow-500 px-1 py-1",children:[e.jsx("div",{className:"text-[7px] font-bold text-white/90 uppercase sm:text-[9px]",children:s("sticker.rare")}),e.jsx("div",{className:"text-sm font-black text-white sm:text-base",children:L.raresCount})]}),e.jsxs("div",{className:"rounded-md bg-orange-500 px-1 py-1",children:[e.jsx("div",{className:"text-[7px] font-bold text-white/90 uppercase sm:text-[9px]",children:s("sticker.wanted")}),e.jsx("div",{className:"text-sm font-black text-white sm:text-base",children:L.wantedCount})]}),e.jsxs("div",{className:"rounded-md bg-gray-500 px-1 py-1",children:[e.jsx("div",{className:"text-[7px] font-bold text-white/90 uppercase sm:text-[9px]",children:s("sticker.needed")}),e.jsx("div",{className:"text-sm font-black text-white sm:text-base",children:L.missing})]})]}),e.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[e.jsx("div",{className:"h-2.5 flex-1 overflow-hidden rounded-full bg-white/20",children:e.jsx("div",{className:"h-2.5 rounded-full bg-linear-to-r from-green-400 to-emerald-400",style:{width:`${L.pct}%`}})}),e.jsxs("span",{className:"text-[10px] font-bold text-emerald-300",children:[L.pct,"%"]})]})]}),e.jsx("div",{className:"border-b border-gray-200 bg-white/95 px-1 py-0.5 backdrop-blur-sm",children:e.jsxs("div",{className:"flex items-center justify-center gap-x-1.5 text-[7px] font-medium text-gray-600 sm:gap-x-2 sm:text-[10px]",children:[e.jsxs("span",{children:["1º=",e.jsx("b",{className:"text-green-600",children:s("sticker.have")}
181)]}),e.jsxs("span",{children:["2º=",e.jsx("b",{className:"text-blue-600",children:s("sticker.swap")})]}),e.jsxs("span",{children:["3º=",e.jsx("b",{className:"text-yellow-600",children:s("sticker.rare")})]}),e.jsxs("span",{children:["4º=",e.jsx("b",{className:"text-orange-600",children:s("sticker.wanted")})]}),e.jsxs("span",{children:["5º=",e.jsx("b",{className:"text-gray-500",children:s("sticker.missing")})]}),e.jsxs("span",{className:"whitespace-nowrap",children:[e.jsx("i",{className:"fa-solid fa-hand-pointer text-[7px]"})," ",s("sticker.holdForQty")]})]})}),e.jsxs("div",{className:"flex items-center gap-1 border-b border-gray-100 bg-white px-3 py-1.5",children:[[{key:"groups",label:s("album.viewGroups","Grupos")},{key:"alpha",label:s("album.viewAlpha","A-Z")},{key:"missing",label:s("album.viewMissing","Faltam")},{key:"duplicates",label:s("album.viewDuplicates","Repetidas")}].map(t=>e.jsx("button",{onClick:()=>Is(t.key),className:q("rounded-full px-2 py-1 text-[10px] font-bold transition",ee===t.key?"bg-indigo-600 text-white shadow-sm":"bg-gray-100 text-gray-500 hover:bg-gray-200"),children:t.label},t.key)),e.jsx("span",{className:"h-4 w-px shrink-0 bg-gray-200"}),e.jsx("button",{onClick:()=>Fs(t=>!t),className:q("rounded-full px-2 py-1 text-[10px] font-bold transition",Dt?"bg-violet-600 text-white shadow-sm":"bg-gray-100 text-gray-500 hover:bg-gray-200"),children:s("album.viewNominal","Nomes")}),K.active&&e.jsxs("button",{type:"button",onClick:K.openGate,className:"ml-auto shrink-0 text-[10px] font-bold text-amber-500 transition active:opacity-70",title:s("stickerGate.chipLabel","Figurinhas liberadas"),children:[K.marks,"/",K.unlockedTotal]})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-2 pb-32",children:[e.jsx(ir,{legendData:c.legendData??{},setLegendCount:Ba}),!$t&&e.jsx("div",{className:"mb-2",children:e.jsx(Sa,{slotId:"album_top",position:"checklist"})}),zs.map((t,r)=>{const n=St.get(t)??[],h=Bs(n),y=ga[t],o=y?Math.round(y.owned/y.total*100):0;if(h.length===0&&ee!=="groups")return null;const x=_t.has(t),d=ee==="groups",j=d&&r>0&&r%wa===0,u=Math.floor(r/wa)-1,D=j?Oa[u]:void 0,G=D?Ge(D):void 0,Y=r-1,ce=Math.floor(Y/4),V=d&&!x&&Y>=0&&Y<48&&Y%4===0,re=String.fromCharCode(65+ce),me=ee==="alpha"&&x?r===0?"⭐ ESPECIAIS":null:t==="FWC_START"||t==="FWC_END"?"⭐ ESPECIAIS":t==="CC"?"🥤 COCA-COLA":null;return e.jsxs("div",{children:[j&&G?.enabled&&e.jsx("div",{className:"my-3",children:e.jsx(tr,{slot:G,className:"rounded-xl",compact:!0})}),V&&e.jsxs("div",{className:"mt-3 mb-2 flex items-center gap-2",children:[e.jsx("div",{className:"h-px flex-1 bg-indigo-200"}),e.jsxs("span",{className:"rounded-full bg-indigo-600 px-3 py-0.5 text-[10px] font-black tracking-wider text-white",children:["GRUPO ",re]}),e.jsx("div",{className:"h-px flex-1 bg-indigo-200"})]}),me&&e.jsxs("div",{className:"mt-4 mb-2 flex items-center gap-2",children:[e.jsx("div",{className:"h-px flex-1 bg-amber-300"}),e.jsx("span",{className:"rounded-full bg-amber-500 px-3 py-0.5 text-[10px] font-black tracking-wider text-white",children:me}),e.jsx("div",{className:"h-px flex-1 bg-amber-300"})]}),e.jsxs("div",{ref:Te=>{ya.current[t]=Te},className:"mb-3 scroll-mt-40",children:[e.jsxs("div",{className:"mb-1.5 flex items-center gap-2 rounded-xl border border-gray-100 bg-white px-3 py-2 shadow-sm",children:[e.jsx("span",{className:"text-2xl",children:ie[t]??"🏳️"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"truncate text-xs font-black text-gray-800",children:ne[t]??t}),e.jsx("p",{className:"text-[9px] text-gray-500",children:ee==="groups"||ee==="alpha"?`${y?.owned??0}/${y?.total??0} ${s("sticker.stickers")}`:`${h.length} ${s("sticker.stickers")}`})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"h-2 w-16 overflow-hidden rounded-full bg-gray-200",children:e.jsx("div",{className:q("h-full rounded-full transition-all",o===100?"bg-linear-to-r from-emerald-400 to-green-500":"bg-linear-to-r from-indigo-400 to-purple-500"),style:{width:`${o}%`}})}),e.jsxs("span",{className:q("text-[10px] font-bold",o===100?"text-emerald-600":"text-indigo-600"),children:[o,"%"]})]})]}),e.jsx("div",{className:q("grid gap-1.5 rounded-xl bg-gray-50 p-2 sm:gap-2",Dt?"grid-cols-4 sm:grid-cols-6":"grid-cols-5 sm:grid-cols-10"),children:h.map(Te=>e.jsx(Ps,{sticker:Te},Te.id))})]})]},t)}),(()=>{const t=Ge("album_affiliate_2");return t?.enabled?e.jsx("div",{className:"my-3",children:e.jsx(ar,{slot:t})}):null})()]}),rt&&e.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>ze(!1)}),J!==null&&te.createPortal(e.jsx("div",{className:"modal-overlay fixed inset-0 z-950 flex items-center justify-center p-4",style:{paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},onClick:()=>Re(null),children:e.jsxs("div",{className:"animate-scale w-full max-w-xs overflow-hidden rounded-2xl bg-white shadow-2xl",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"bg-linear-to-r from-blue-500 to-indigo-600 p-4 text-center text-white",children:[e.jsx("h3",{className:"text-lg font-black",children:s("duplicatesModal.title",{label:I.find(t=>
181t.id===J)?.label||J})}),e.jsx("p",{className:"text-xs opacity-90",children:s("duplicatesModal.adjustQty")})]}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-center gap-4",children:[e.jsx("button",{onClick:()=>v(J),className:"flex h-12 w-12 items-center justify-center rounded-full bg-red-100 text-xl font-bold text-red-600 transition hover:bg-red-200",children:e.jsx("i",{className:"fa-solid fa-minus"})}),e.jsx("span",{className:"text-4xl font-black text-gray-800",children:R(J)||1}),e.jsx("button",{onClick:()=>A(J),className:"flex h-12 w-12 items-center justify-center rounded-full bg-green-100 text-xl font-bold text-green-600 transition hover:bg-green-200",children:e.jsx("i",{className:"fa-solid fa-plus"})})]}),e.jsx("button",{onClick:()=>Re(null),className:"w-full rounded-lg bg-indigo-600 py-2.5 font-bold text-white transition hover:bg-indigo-700",children:s("common.close")})]})]})}),document.body),Ue!==null&&e.jsx(Ta,{stickerId:Ue,onClose:()=>ct(null)}),ja]}):e.jsxs("section",{className:"animate-fade flex min-h-full flex-col",onTouchStart:Ms,onTouchMove:Es,onTouchEnd:As,style:{paddingBottom:50},children:[(mt>0||oe)&&e.jsxs("div",{className:"px-4 py-1 text-center text-xs text-indigo-200",children:[e.jsx("i",{className:q("fa-solid mr-1",oe?"fa-spinner fa-spin":"fa-arrows-rotate")}),oe?s("common.updating"):mt>=80?s("common.releaseToRefresh"):s("common.pullToRefresh")]}),ua&&Q&&e.jsx(pr,{banner:Q,onDismiss:us,onTap:xs}),!ua&&ds&&e.jsxs("div",{className:"mx-4 mt-3 flex items-center gap-3 rounded-xl border border-orange-200 bg-orange-50 px-4 py-3 shadow-sm",children:[e.jsx("i",{className:"fa-solid fa-fire shrink-0 text-2xl text-orange-500"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm font-bold text-orange-800",children:(c.checkinStreak??0)===1?"Não perca sua sequência!":`Sequência de ${c.checkinStreak} dias em risco!`}),e.jsx("p",{className:"text-xs text-orange-600",children:"Faça seu check-in hoje para manter o streak. 🔥"})]}),e.jsx("button",{onClick:hs,className:"shrink-0 text-orange-400 transition-colors hover:text-orange-600","aria-label":"Fechar aviso",children:e.jsx("i",{className:"fa-solid fa-xmark text-sm"})})]}),ps&&e.jsxs("div",{className:"mx-4 mt-3 flex items-center gap-3 rounded-xl border border-yellow-200 bg-yellow-50 px-4 py-3 shadow-sm",children:[e.jsx("i",{className:"fa-solid fa-triangle-exclamation shrink-0 text-xl text-yellow-500"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm font-bold text-yellow-800",children:"Revise seu perfil"}),e.jsxs("p",{className:"text-xs text-yellow-700",children:["Confira se seus dados estão atualizados para aproveitar melhor o app."," ",e.jsx("button",{onClick:bs,className:"font-bold underline",children:"Abrir perfil"})]})]}),e.jsx("button",{onClick:gs,className:"shrink-0 text-yellow-400 transition-colors hover:text-yellow-600","aria-label":"Fechar aviso",children:e.jsx("i",{className:"fa-solid fa-xmark text-sm"})})]}),!Oe&&e.jsxs("div",{className:"mx-4 mt-3 mb-1 flex cursor-pointer items-center justify-between rounded-xl bg-linear-to-r from-yellow-400 to-amber-500 px-4 py-1.5 shadow-lg transition active:scale-[0.98]",onClick:()=>{zt(!0)},children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("i",{className:"fa-solid fa-calendar-check text-amber-900"}),e.jsx("span",{className:"text-sm font-black text-amber-900",children:"Ganhe o Premium Pro"})]}),e.jsx(Hr,{lastCheckin:c.lastCheckin})]}),e.jsxs("div",{className:"relative mx-4 mt-3 mb-1 flex items-center gap-3 rounded-2xl border border-gray-100 bg-white p-4 shadow-sm",children:[e.jsxs("div",{className:"relative flex h-16 w-16 shrink-0 items-center justify-center",children:[e.jsxs("svg",{width:"64",height:"64",viewBox:"0 0 64 64",className:"-rotate-90",children:[e.jsx("circle",{cx:"32",cy:"32",r:"22",fill:"none",stroke:"#f3f4f6",strokeWidth:"7"}),e.jsx("circle",{cx:"32",cy:"32",r:"22",fill:"none",stroke:"url(#albumGrad)",strokeWidth:"7",strokeLinecap:"round",strokeDasharray:`${L.pct/100*138.2} 138.2`}),e.jsx("defs",{children:e.jsxs("linearGradient",{id:"albumGrad",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#6366f1"}),e.jsx("stop",{offset:"100%",stopColor:"#22c55e"})]})})]}),e.jsxs("span",{className:"absolute text-[13px] font-black text-indigo-600",children:[L.pct,"%"]})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] font-bold tracking-wider text-gray-400 uppercase",children:s("album.myAlbum","Meu 
181álbum")}),e.jsx("button",{onClick:async()=>{if(!Le){Ve(!0);try{await Ma({owned:L.owned,totalRepetidas:L.totalRepetidas,missing:L.missing,pct:L.pct,legendsOwned:Mt(c.legendData??{}),displayName:m?.displayName||m?.username||"Colecionador",userId:i?.uid??"",referralCode:m?.referralCode})}catch{f("Não foi possível gerar a postagem. Tente novamente.")}finally{Ve(!1)}}},disabled:Le,className:"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-50 text-indigo-500 transition hover:bg-indigo-100 disabled:opacity-50","aria-label":"Compartilhar no Instagram Stories",title:"Compartilhar no Instagram Stories",children:Le?e.jsx("i",{className:"fa-solid fa-spinner fa-spin text-[10px]"}):e.jsx("i",{className:"fa-solid fa-share-nodes text-[10px]"})})]}),e.jsx("div",{className:"mb-2 h-2 w-full overflow-hidden rounded-full bg-gray-100",children:e.jsx("div",{className:"h-full rounded-full bg-linear-to-r from-indigo-500 to-emerald-500",style:{width:`${L.pct}%`}})}),e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] leading-none font-black text-green-600",children:L.owned}),e.jsx("div",{className:"text-[9px] font-semibold text-gray-400 uppercase",children:"Coladas"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] leading-none font-black text-blue-600",children:L.totalRepetidas}),e.jsx("div",{className:"text-[9px] font-semibold text-gray-400 uppercase",children:"Repetidas"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] leading-none font-black text-orange-500",children:L.missing}),e.jsx("div",{className:"text-[9px] font-semibold text-gray-400 uppercase",children:"Faltam"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] leading-none font-black text-purple-600",children:Mt(c.legendData??{})}),e.jsx("div",{className:"text-[9px] font-semibold text-gray-400 uppercase",children:"Legends"})]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-5 gap-2 px-4 pt-2 pb-1",children:[e.jsxs("button",{onClick:()=>qt(!0),className:"col-span-2 flex min-w-0 items-center justify-center gap-2 rounded-2xl bg-linear-to-r from-green-500 to-emerald-500 py-3 text-sm font-black text-white shadow-lg transition active:scale-[0.98]",title:s("album.fullAlbum"),children:[e.jsx("i",{className:"fa-solid fa-book-open text-lg"}),e.jsxs("div",{className:"min-w-0 text-left",children:[e.jsx("div",{children:s("album.myAlbum","Meu álbum")}),e.jsx("div",{className:"text-[10px] font-medium opacity-75",children:s("album.fullListSubtitle","Registrar figurinhas")})]})]}),e.jsxs("button",{onClick:()=>dt(!0),className:"col-span-2 flex min-w-0 flex-col items-center justify-center gap-0.5 rounded-2xl bg-linear-to-r from-amber-400 via-yellow-500 to-amber-500 px-1 py-3 text-center text-xs font-black text-amber-950 shadow-lg transition active:scale-[0.98]",title:s("copa.dreamTeam.title"),children:[e.jsx("i",{className:"fa-solid fa-trophy text-lg"}),e.jsx("span",{className:"leading-tight",children:s("copa.dreamTeam.title")})]}),e.jsxs("button",{onClick:()=>ke(!0),className:"flex min-w-0 flex-col items-center justify-center gap-1 rounded-2xl bg-linear-to-r from-purple-500 to-violet-600 px-1 py-3 text-xs font-black text-white shadow-lg transition active:scale-[0.98]",title:s("album.scannerTitle"),children:[e.jsx("i",{className:"fa-solid fa-qrcode text-lg"}),e.jsx("span",{className:"leading-none",children:"Scan"})]})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-2 px-4 pt-2 pb-3",children:[e.jsxs("button",{onClick:()=>{p?p():f("Área de importação indisponível no momento.")},className:"flex min-w-0 flex-col items-center justify-center gap-0.5 rounded-xl bg-linear-to-r from-violet-500 to-purple-600 px-1 py-2.5 text-[10px] font-black text-white shadow-md transition active:scale-[0.97]",title:"Importar de outro app",children:[e.jsx("i",{className:"fa-solid fa-file-import text-sm"}),"Importar"]}),e.jsxs("button",{onClick:()=>we(!0),className:"flex min-w-0 flex-col items-center justify-center gap-0.5 rounded-xl bg-linear-to-r from-sky-500 to-blue-600 px-1 py-2.5 text-[10px] font-black text-white shadow-md transition active:scale-[0.97]",title:"Compartilhar listas",children:[e.jsx("i",{className:"fa-solid fa-share-nodes text-sm"}),"Compartilhar"]}),e.jsxs("button",{onClick:()=>X(!0),className:"flex min-w-0 flex-col items-center justify-center gap-0.5 rounded-xl border border-gray-200 bg-white px-1 py-2.5 text-[10px] font-black text-gray-800 shadow-sm transition active:scale-[0.97]",children:[e.jsx("i",{className:"fa-solid fa-wrench text-sm text-gray-500"}),s("album.tools","Ferramentas")]}),e.jsx("button",{onClick:()=>Ut(!0),className:"flex min-w-0 flex-col items-center justify-center rounded-xl bg-linear-to-r from-amber-400 to-yellow-500 px-1 py-2.5 text-[10px] font-black text-gray-900 shadow-md transition active:scale-[0.97]",children:s("suggestions.buttonLabel")})]}),!$t&&e.jsx("div",{className:"px-4 pb-2",children:e.jsx(Sa,{slotId:"home_actions_banner",fallbackSlot:js,position:"checklist"})}),Ua&&te.createPortal(e.jsx("div",{className:"fixed inset-0 z-50 flex items-end justify-center",style:{background:"rgba(0,0,0,0.45)"},onClick:t=>{t.target===t.currentTarget&&X(!1)},children:e.jsxs("div",{className:"w-full max-w-lg rounded-t-3xl bg-gray-50 px-4 pt-3 pb-10 shadow-2xl",style:{paddingBottom:"var(--app-bottom-inset, 0px)"},children:[e.jsx("div",{className:"mx-auto mb-4 h-1 w-9 rounded-full bg-gray-300"}),e.jsx("div",{className:"mb-3 text-center text-xs font-bold tracking-wider text-gray-400 uppercase",children:s("album.tools","Ferramentas")}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsxs("button",{onClick:()=>{Vt(!0),X(!1)},className:"flex flex-col items-center gap-2 rounded-2xl bg-white p-4 shadow-sm transition active:scale-95",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-orange-50 text-xl",children:e.jsx("i",{className:"fa-solid fa-layer-group text-orange-500"})}),e.jsx("span",{className:"text-center text-[11px] leading-tight font-bold text-gray-700",children:"Repetidas"})]}),e.jsxs("button",{onClick:()=>{je(!0),X(!1)},className:"flex flex-col items-center gap-2 rounded-2xl bg-white p-4 shadow-sm transition active:scale-95",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-green-50 text-xl",children:e.jsx("i",{className:"fa-solid fa-arrow-right-arrow-left text-green-500"})}),e.jsx("span",{className:"text-center text-[11px] leading-tight font-bold text-gray-700",children:"Registrar"})]}),e.jsxs("button",{onClick:()=>{ws(),X(!1)},className:"flex flex-col items-center gap-2 rounded-2xl bg-white p-4 shadow-sm transition active:scale-95",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-pink-50 text-xl",children:e.jsx("i",{className:"fa-solid fa-user-plus text-pink-500"})}),e.jsx("span",{className:"text-center text-[11px] leading-tight font-bold text-gray-700",children:"Convidar amigo"})]}),e.jsxs("button",{onClick:()=>{ke(!0),X(!1)},className:"flex flex-col items-center gap-2 rounded-2xl bg-white p-4 shadow-sm transition active:scale-95",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-purple-50 text-xl",children:e.jsx("i",{className:"fa-solid fa-qrcode text-purple-500"})}),e.jsx("span",{className:"text-center text-[11px] leading-tight font-bold text-gray-700",children:"Scan"})]}),e.jsxs("button",{onClick:()=>{we(!0),X(!1)},className:"flex flex-col items-center gap-2 rounded-2xl bg-white p-4 shadow-sm transition active:scale-95",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-sky-50 text-xl",children:e.jsx("i",{className:"fa-solid fa-file-export text-sky-500"})}),e.jsx("span",{className:"text-center text-[11px] leading-tight font-bold text-gray-700",children:"Exportar listas"})]}),e.jsxs("button",{onClick:()=>{xt(!0),X(!1)},className:"flex flex-col items-center gap-2 rounded-2xl bg-white p-4 shadow-sm transition active:scale-95",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-blue-50 text-xl",children:e.jsx("i",{className:"fa-solid fa-clock-rotate-left text-blue-500"})}),e.jsx("span",{className:"text-center text-[11px] leading-tight font-bold text-gray-700",children:"Histórico"})]}),e.jsxs("button",{onClick:()=>{H("shopping"),X(!1)},className:"flex flex-col items-center gap-2 rounded-2xl bg-white p-4 shadow-sm transition active:scale-95",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-emerald-50 text-xl",children:e.jsx("i",{className:"fa-solid fa-bag-shopping text-emerald-500"})}),e.jsx("span",{className:"text-center text-[11px] leading-tight font-bold text-gray-700",children:"Ofertas"})]}),e.jsxs("button",{onClick:()=>{H("trades"),X(!1)},className:"flex flex-col items-center gap-2 rounded-2xl bg-white p-4 shadow-sm transition active:scale-95",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-indigo-50 text-xl",children:e.jsx("i",{className:"fa-solid fa-handshake text-indigo-500"})}),e.jsx("span",{className:"text-center text-[11px] leading-tight font-bold text-gray-700",children:"Trocas"})]}),e.jsxs("button",{onClick:()=>{X(!1),k?k():H("settings")},className:"flex flex-col items-center gap-2 rounded-2xl bg-white p-4 shadow-sm transition active:scale-95",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-gray-100 text-xl",children:e.jsx("i",{className:"fa-solid fa-bars text-gray-600"})}),e.jsx("span",{className:"text-center text-[11px] leading-tight font-bold text-gray-700",children:"Menu"})]})]}),e.jsxs("button",{onClick:()=>{Bt(!0),X(!1)},className:"mt-3 flex w-full items-center justify-between rounded-2xl bg-linear-to-r from-amber-400 to-orange-500 px-4 py-3 text-left font-black text-amber-950 shadow-lg transition active:scale-[0.98]",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("i",{className:"fa-solid fa-crown text-base"}),"Premium Pro"]}),e.jsx("i",{className:"fa-solid fa-chevron-right text-sm opacity-70"})]})]})}),document.body),e.jsx(a.Suspense,{fallback:e.jsx("div",{className:"mx-4 my-3 h-48 animate-pulse rounded-2xl bg-gray-100"}),children:e.jsx(Pr,{onNavigate:()=>H("ranking_indications"),onNavigateTab:t=>H(t)})}),e.jsx(a.Suspense,{fallback:e.jsx("div",{className:"mx-4 my-3 h-40 animate-pulse rounded-2xl bg-gray-100"}),children:e.jsx(Ir,{onNavigate:()=>H("copa")})}),He&&e.jsxs("div",{className:"fixed right-0 left-0 z-9999 bg-gray-900/90 px-4 py-2 text-white transition-all",style:{bottom:"var(--native-ad-bottom, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"font-mono font-bold text-yellow-400",children:["#",He.label]}),e.jsx("span",{className:"font-bold",children:He.name})]}),e.jsx("span",{className:"text-xs text-gray-300",children:Ls(He.role)})]}),Ht&&e.jsx(a.Suspense,{fallback:null,children:e.jsx($r,{open:Ht,onClose:()=>Ut(!1)})}),fe.open&&Me&&e.jsx(za,{open:fe.open,onClose:()=>Kt(t=>({...t,open:!1}
181)),variant:fe.variant,title:fe.title,description:fe.description,ctx:{code:Me,nickname:m?.username||m?.displayName||i?.displayName||void 0,referrerCoins:le.referrerCoins,referredCoins:le.referredCoins,extras:{missingList:fe.missingList,missingCount:fe.missingCount}},onToast:f}),Va&&te.createPortal(e.jsx("div",{className:"modal-overlay fixed inset-0 z-950 flex items-end justify-center p-0 sm:items-center sm:p-4",style:{paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},onClick:()=>we(!1),children:e.jsxs("div",{className:"animate-slide-up sm:animate-scale max-h-[92vh] w-full max-w-lg overflow-hidden rounded-t-3xl bg-white shadow-2xl sm:rounded-3xl",onClick:t=>t.stopPropagation(),children:[e.jsx("div",{className:"bg-linear-to-r from-sky-600 to-indigo-700 px-5 py-4 text-white",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h3",{className:"text-lg font-black",children:[e.jsx("i",{className:"fa-solid fa-share-nodes mr-2"}),"Exportar e compartilhar"]}),e.jsx("p",{className:"mt-0.5 text-xs text-sky-100",children:"Escolha o tipo de exportação."})]}),e.jsx("button",{onClick:()=>we(!1),className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-white/15 text-white transition hover:bg-white/25","aria-label":"Fechar",children:e.jsx("i",{className:"fa-solid fa-xmark"})})]})}),e.jsxs("div",{className:"max-h-[calc(92vh-76px)] overflow-y-auto bg-gray-50 p-4",children:[e.jsxs("div",{className:"mb-3 grid grid-cols-3 gap-2 text-center",children:[e.jsxs("div",{className:"rounded-2xl bg-white px-2 py-3 shadow-sm",children:[e.jsx("p",{className:"text-base font-black text-emerald-600",children:L.owned}),e.jsx("p",{className:"text-[10px] font-bold text-gray-400 uppercase",children:"Coladas"})]}),e.jsxs("div",{className:"rounded-2xl bg-white px-2 py-3 shadow-sm",children:[e.jsx("p",{className:"text-base font-black text-blue-600",children:L.totalRepetidas}),e.jsx("p",{className:"text-[10px] font-bold text-gray-400 uppercase",children:"Repetidas"})]}),e.jsxs("div",{className:"rounded-2xl bg-white px-2 py-3 shadow-sm",children:[e.jsx("p",{className:"text-base font-black text-orange-500",children:L.missing}),e.jsx("p",{className:"text-[10px] font-bold text-gray-400 uppercase",children:"Faltam"})]})]}),e.jsxs("div",{className:"space-y-2.5",children:[i?.uid&&e.jsx("div",{className:"rounded-2xl border border-emerald-100 bg-gradient-to-r from-emerald-50 to-green-50 p-3 shadow-sm",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-emerald-100 text-lg text-emerald-600",children:e.jsx("i",{className:"fa-solid fa-store"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("p",{className:"text-sm leading-tight font-black text-gray-800",children:s("trades.qrTrade.shareShowcase")}),e.jsx("span",{className:"inline-flex items-center justify-center rounded-full bg-emerald-500 px-2 py-0.5 text-center text-[9px] font-black text-white uppercase",children:"Novo"})]}),e.jsx("p",{className:"mt-0.5 text-[11px] leading-snug text-gray-500",children:s("trades.qrTrade.shareShowcaseSubtitle")})]}),e.jsx("button",{onClick:()=>void Ss(),className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-emerald-600 text-white transition active:scale-[0.98]","aria-label":s("trades.qrTrade.shareShowcase"),title:s("trades.qrTrade.shareShowcase"),children:e.jsx("i",{className:"fa-solid fa-share-nodes text-sm"})}),e.jsx("button",{onClick:()=>void Ts(),className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-emerald-200 bg-white text-emerald-600 transition active:scale-[0.98]","aria-label":s("trades.qrTrade.copyShowcaseMessage"),title:s("trades.qrTrade.copyShowcaseMessage"),children:e.jsx("i",{className:"fa-solid fa-copy text-sm"})})]})}),ks.map(t=>e.jsx("div",{className:"rounded-2xl border border-gray-100 bg-white p-3 shadow-sm",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:q("flex h-11 w-11 shrink-0 items-center justify-center rounded-xl text-lg",t.iconClassName),children:e.jsx("i",{className:q("fa-solid",t.icon)})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm leading-tight font-black break-words text-gray-800",children:t.title}),e.jsx("p",{className:"mt-0.5 text-[11px] leading-snug text-gray-500",children:t.description})]}),e.jsx("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-black text-gray-500",children:t.count}),e.jsxs("button",{onClick:()=>void Ns(t),className:q("flex h-9 shrink-0 items-center justify-center rounded-xl bg-gray-900 text-white transition active:scale-[0.98]",t.id==="pdf-checklist"?"w-20 gap-1.5 px-2 text-[11px] font-black":"w-9"),"aria-label":t.id==="pdf-checklist"?"Gerar PDF do álbum":`Compartilhar ${t.title}
181`,title:t.id==="pdf-checklist"?"Gerar PDF do álbum":`Compartilhar ${t.title}`,children:[e.jsx("i",{className:q("fa-solid text-sm",t.id==="pdf-checklist"?"fa-file-pdf":"fa-share-nodes")}),t.id==="pdf-checklist"&&e.jsx("span",{children:"PDF"})]}),t.id!=="pdf-checklist"&&e.jsx("button",{onClick:()=>void Cs(t),className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-gray-200 bg-white text-gray-600 transition active:scale-[0.98]","aria-label":`Copiar ${t.title}`,title:`Copiar ${t.title}`,children:e.jsx("i",{className:"fa-solid fa-copy text-sm"})})]})},t.id))]})]})]})}),document.body),J!==null&&te.createPortal(e.jsx("div",{className:"modal-overlay fixed inset-0 z-950 flex items-center justify-center p-4",style:{paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},onClick:()=>Re(null),children:e.jsxs("div",{className:"animate-scale w-full max-w-xs overflow-hidden rounded-2xl bg-white shadow-2xl",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"bg-linear-to-r from-blue-500 to-indigo-600 p-4 text-center text-white",children:[e.jsx("h3",{className:"text-lg font-black",children:s("duplicatesModal.title",{label:I.find(t=>t.id===J)?.label||J})}),e.jsx("p",{className:"text-xs opacity-90",children:s("duplicatesModal.adjustQty")})]}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-center gap-4",children:[e.jsx("button",{onClick:()=>v(J),className:"flex h-12 w-12 items-center justify-center rounded-full bg-red-100 text-xl font-bold text-red-600 transition hover:bg-red-200",children:e.jsx("i",{className:"fa-solid fa-minus"})}),e.jsx("span",{className:"text-4xl font-black text-gray-800",children:R(J)||1}),e.jsx("button",{onClick:()=>A(J),className:"flex h-12 w-12 items-center justify-center rounded-full bg-green-100 text-xl font-bold text-green-600 transition hover:bg-green-200",children:e.jsx("i",{className:"fa-solid fa-plus"})})]}),e.jsx("button",{onClick:()=>Re(null),className:"w-full rounded-lg bg-indigo-600 py-2.5 font-bold text-white transition hover:bg-indigo-700",children:s("common.close")})]})]})}),document.body),Ue!==null&&e.jsx(Ta,{stickerId:Ue,onClose:()=>ct(null)}),We&&te.createPortal(e.jsx("div",{className:"modal-overlay fixed inset-0 z-950 flex items-center justify-center p-4",style:{paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},onClick:()=>je(!1),children:e.jsxs("div",{className:"animate-scale max-h-[90vh] w-full max-w-sm overflow-y-auto rounded-2xl bg-white shadow-2xl",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"bg-linear-to-r from-green-500 to-emerald-600 p-4 text-white",children:[e.jsxs("h3",{className:"text-lg font-black",children:[e.jsx("i",{className:"fa-solid fa-pen-to-square mr-2"}),s("album.registerTrade")]}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[e.jsxs("button",{onClick:()=>ht("trade"),className:q("flex-1 rounded-lg py-1.5 text-xs font-bold transition",ft==="trade"?"bg-white text-emerald-700":"bg-white/20 text-white"),children:["🔄 ",s("manualTrade.title")]}),e.jsxs("button",{onClick:()=>ht("packets"),className:q("flex-1 rounded-lg py-1.5 text-xs font-bold transition",ft==="packets"?"bg-white text-emerald-700":"bg-white/20 text-white"),children:["📦 ",s("album.packetsTab")]})]})]}),ms&&e.jsxs("div",{className:"flex items-start justify-between gap-2 border-b border-amber-200 bg-amber-50 px-4 py-3",children:[e.jsxs("div",{className:"flex-1 text-xs leading-relaxed text-amber-800",children:[e.jsx("span",{className:"font-bold",children:"Revise seu perfil."})," Confira se seus dados estão atualizados antes de propor trocas."," ",e.jsx("button",{type:"button",onClick:vs,className:"font-bold text-amber-700 underline",children:"Abrir perfil →"})]}),e.jsx("button",{type:"button",onClick:ys,className:"mt-0.5 shrink-0 text-amber-400 hover:text-amber-600","aria-label":"Fechar aviso",children:"✕"})]}),ft==="trade"?e.jsxs("div",{className:"space-y-3 p-4",children:[e.jsx("div",{className:"rounded-lg bg-indigo-50 p-2 text-[11px] text-indigo-700",children:s("manualTrade.hint")}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs font-bold text-red-600",children:s("manualTrade.stickersGave")}),e.jsx("input",{value:Ee,onChange:t=>Xt(t.target.value),placeholder:"Ex: BRA 01, ARG 05, FWC 7",className:"w-full rounded-lg border-2 border-red-300 px-3 py-2 text-sm focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs font-bold text-green-600",children:s("manualTrade.stickersReceived")}),e.jsx("input",{value:Ae,onChange:t=>ea(t.target.value),placeholder:"Ex: BRA 02, ITA 10",className:"w-full rounded-lg border-2 border-green-300 px-3 py-2 text-sm focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs font-bold text-gray-600",children:s("manualTrade.tradedWith")}),e.jsx("input",{value:Ye,onChange:t=>ta(t.target.value),placeholder:s("manualTrade.externalTrade"),className:"w-full rounded-lg border-2 border-gray-200 px-3 py-2 text-sm focus:outline-none"})]}),e.jsxs("div",{className:"rounded-lg border border-gray-200 bg-gray-50 p-2 text-xs",children:[e.jsx("p",{className:"mb-1 font-bold text-gray-700",children:s("common.preview")}),e.jsxs("p",{className:"text-red-600",children:[s("manualTrade.gave"),": ",Ce(at.gave)||"-"]}
181),e.jsxs("p",{className:"text-red-500",children:["Total entregues: ",e.jsx("b",{children:at.gave.length})]}),e.jsxs("p",{className:"text-green-600",children:[s("manualTrade.received"),": ",Ce(at.received)||"-"]}),e.jsxs("p",{className:"text-green-500",children:["Total recebidas: ",e.jsx("b",{children:at.received.length})]}),e.jsxs("p",{className:"text-gray-500",children:[s("manualTrade.partner"),": ",Ye.trim()||s("manualTrade.externalTrade")]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>je(!1),className:"flex-1 rounded-lg bg-gray-200 py-2.5 font-bold text-gray-700 transition hover:bg-gray-300",children:s("common.cancel")}),e.jsx("button",{onClick:_s,className:"flex-1 rounded-lg bg-linear-to-r from-green-500 to-emerald-600 py-2.5 font-bold text-white transition hover:shadow",children:s("common.confirm")})]})]}):e.jsxs("div",{className:"space-y-4 p-4",children:[e.jsxs("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-3",children:[e.jsxs("p",{className:"text-sm font-black text-amber-800",children:["📦 ",s("album.packetsControlTitle")]}),e.jsx("p",{className:"mt-1 text-xs text-amber-700",children:s("album.packetsControlDescription")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs font-bold text-gray-700",children:s("album.packetsOpenedLabel")}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>{const t=Math.max(0,ge-1);Fe(t),$e(String(t)),yt(t)},className:"flex h-10 w-10 items-center justify-center rounded-full bg-amber-100 text-xl font-black text-amber-700 hover:bg-amber-200",children:"−"}),e.jsx("input",{type:"number",inputMode:"numeric",value:oa,onChange:t=>{$e(t.target.value)},onBlur:()=>{const t=parseInt(oa,10);!isNaN(t)&&t>=0?(Fe(t),yt(t)):$e(String(ge))},min:0,className:"flex-1 rounded-lg border-2 border-amber-300 px-3 py-2 text-center text-lg font-black focus:outline-none"}),e.jsx("button",{onClick:()=>{const t=ge+1;Fe(t),$e(String(t)),yt(t)},className:"flex h-10 w-10 items-center justify-center rounded-full bg-amber-500 text-xl font-black text-white hover:bg-amber-600",children:"+"})]})]}),ge>0&&e.jsx("div",{className:"rounded-xl border border-gray-200 bg-gray-50 p-3",children:e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center text-xs",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-lg font-black text-amber-700",children:ge}),e.jsx("p",{className:"text-gray-500",children:s("album.packetsStatPackets")})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-lg font-black text-indigo-700",children:ca}),e.jsx("p",{className:"text-gray-500",children:s("album.packetsStatGlued")})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-lg font-black text-emerald-700",children:ge>0?`${Math.min(100,ca/(ge*7)*100).toFixed(0)}%`:"-"}),e.jsx("p",{className:"text-gray-500",children:s("album.packetsStatEfficiency")})]})]})}),e.jsx("button",{onClick:()=>je(!1),className:"w-full rounded-lg bg-gray-200 py-2.5 font-bold text-gray-700 transition hover:bg-gray-300",children:s("common.close")})]})]})}),document.body),Ke&&te.createPortal(e.jsx("div",{className:"modal-overlay fixed inset-0 z-950 flex items-center justify-center p-4",style:{paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},onClick:()=>xt(!1),children:e.jsxs("div",{className:"animate-scale max-h-[85vh] w-full max-w-2xl overflow-hidden rounded-2xl bg-white shadow-2xl",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"bg-linear-to-r from-indigo-900 to-purple-900 p-4 text-white",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h3",{className:"text-lg font-black",children:[e.jsx("i",{className:"fa-solid fa-clock-rotate-left mr-2"})," ",s("tradeHistory.title")]}),e.jsx("button",{onClick:()=>xt(!1),className:"rounded-lg p-1.5 text-white/80 transition hover:bg-white/20",children:e.jsx("i",{className:"fa-solid fa-xmark text-lg"})})]}),e.jsxs("div",{className:"mt-3 grid grid-cols-3 gap-2 text-center text-xs",children:[e.jsxs("div",{className:"rounded-lg bg-white/20 p-2",children:[e.jsx("p",{className:"font-black",children:kt.total}),e.jsx("p",{children:s("tradeHistory.trades")})]}),e.jsxs("div",{className:"rounded-lg bg-white/20 p-2",children:[e.jsx("p",{className:"font-black",children:kt.stickersTraded}),e.jsx("p",{children:s("tradeHistory.stickersTraded")})]}),e.jsxs("div",{className:"rounded-lg bg-white/20 p-2",children:[e.jsx("p",{className:"font-black",children:kt.partners}),e.jsx("p",{children:s("tradeHistory.partners")})]})]})]}),e.jsxs("div",{className:"space-y-3 p-4",children:[e.jsxs("div",{className:"grid gap-2 sm:grid-cols-4",children:[e.jsxs("select",{value:de,onChange:t=>Xa(t.target.value),className:"rounded-lg border border-gray-200 px-2 py-2 text-xs font-bold",children:[e.jsx("option",{value:"all",children:s("tradeHistory.filterAll")}),e.jsxs("option",{value:"digital",children:["📱 ",s("album.tradeHistoryDigital")]}),e.jsx("option",{value:"manual",children:s("tradeHistory.filterManual")}),e.jsx("option",{value:"triangular",children:s("tradeHistory.filterTriangular")})]}
181),e.jsxs("select",{value:he,onChange:t=>es(t.target.value),className:"rounded-lg border border-gray-200 px-2 py-2 text-xs font-bold",children:[e.jsx("option",{value:"ALL",children:s("tradeHistory.allCountries")}),Ds.map(t=>e.jsxs("option",{value:t,children:[ie[t]," ",ne[t]||t]},t))]}),e.jsx("input",{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",value:Pe,onChange:t=>ts(t.target.value),placeholder:s("tradeHistory.searchPlaceholder"),className:"rounded-lg border border-gray-200 px-2 py-2 text-xs sm:col-span-2"})]}),e.jsxs("div",{className:"max-h-[52vh] space-y-2 overflow-y-auto",children:[Ja?e.jsxs("div",{className:"flex items-center justify-center py-4",children:[e.jsx("i",{className:"fa-solid fa-spinner fa-spin mr-2 text-indigo-400"}),e.jsx("span",{className:"text-xs text-gray-400",children:s("album.loadingDigitalTrades")})]}):ye.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-[11px] font-bold text-indigo-600",children:[e.jsx("i",{className:"fa-solid fa-mobile-screen-button mr-1"})," ",s("album.tradesByApp")]}),ye.map(t=>{const r=t.fromUserId===i?.uid,n=r?t.give:t.receive,h=r?t.receive:t.give;return e.jsxs("div",{className:"rounded-xl border border-indigo-200 bg-indigo-50 p-3",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[e.jsxs("span",{className:"rounded-full bg-indigo-100 px-2 py-0.5 text-[9px] font-bold text-indigo-600",children:[e.jsx("i",{className:"fa-solid fa-mobile-screen-button mr-0.5"})," ",s("album.tradeHistoryDigital")]}),e.jsx("span",{className:"text-[10px] text-gray-500",children:new Date(t.completedAt??t.createdAt).toLocaleDateString("pt-BR")})]}),n.length>0&&e.jsxs("p",{className:"text-[11px] text-red-600",children:[s("album.iDelivered"),": ",Ce(n)]}),h.length>0&&e.jsxs("p",{className:"text-[11px] text-green-600",children:[s("album.iReceived"),": ",Ce(h)]})]},t.id)}),be.length>0&&de!=="digital"&&e.jsxs("p",{className:"pt-1 text-[11px] font-bold text-gray-500",children:[e.jsx("i",{className:"fa-solid fa-pen mr-1"})," ",s("album.tradeHistoryManual")]})]}):null,be.length===0&&ye.length===0?e.jsxs("div",{className:"py-8 text-center text-gray-400",children:[e.jsx("i",{className:"fa-solid fa-inbox mb-2 text-3xl"}),e.jsx("p",{className:"font-bold",children:s("tradeHistory.noTrades")})]}):be.map(t=>{const r=t.gave||t.stickersGiven||[],n=t.received||t.stickersReceived||[];return e.jsxs("div",{className:"rounded-xl border border-gray-200 bg-gray-50 p-3",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[e.jsx("p",{className:"text-xs font-black text-gray-700",children:(t.partner||s("manualTrade.externalTrade")).toUpperCase()}),e.jsx("span",{className:"text-[10px] text-gray-500",children:new Date(t.date).toLocaleString("pt-BR")})]}),e.jsxs("p",{className:"text-[11px] text-red-600",children:[s("manualTrade.gave"),": ",Ce(r)||"-"]}),e.jsxs("p",{className:"text-[11px] text-green-600",children:[s("manualTrade.received"),": ",Ce(n)||"-"]}),e.jsx("div",{className:"mt-2 flex justify-end",children:e.jsx("button",{onClick:()=>Rs(t),className:"rounded-lg bg-red-100 px-3 py-1.5 text-xs font-bold text-red-600",children:s("tradeHistory.undo")})})]},t.id)})]})]})]})}),document.body),Wa&&e.jsx(fr,{onClose:()=>Vt(!1)}),Ka&&e.jsx(a.Suspense,{fallback:e.jsx(Et,{}),children:e.jsx(Ar,{userId:i?.uid??"",onClose:()=>Wt(!1),onStickersAdded:t=>{f(`✅ ${t} figurinha(s) marcada(s)!`)}})}),Ya&&e.jsx(a.Suspense,{fallback:e.jsx(Et,{}),children:e.jsx(Fr,{onClose:()=>dt(!1)})}),Qa&&te.createPortal(e.jsx("div",{className:"fixed inset-0 z-150 flex items-center justify-center bg-black/60 p-4",style:{paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},onClick:()=>ke(!1),children:e.jsxs("div",{className:"pb-safe w-full max-w-sm overflow-hidden rounded-2xl bg-white shadow-2xl",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"bg-linear-to-r from-purple-600 to-violet-600 px-5 py-4",children:[e.jsxs("h2",{className:"text-lg font-black text-white",children:[e.jsx("i",{className:"fa-solid fa-camera mr-2"}),s("album.scannerTitle")]}),e.jsx("p",{className:"mt-0.5 text-xs text-purple-200",children:s("album.scanChooseAction")})]}),e.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[e.jsxs("button",{onClick:()=>{ke(!1),Wt(!0)}
181,className:"relative flex items-center gap-4 rounded-xl border-2 border-purple-100 bg-purple-50 px-4 py-4 text-left transition hover:border-purple-300 active:scale-[0.98]",children:[e.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-xl bg-purple-600 text-white",children:e.jsx("i",{className:"fa-solid fa-magnifying-glass text-xl"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"font-black text-gray-800",children:s("album.recognizeStickers")}),e.jsx("p",{className:"mt-0.5 text-xs text-gray-500",children:s("album.recognizeStickersDesc")})]}),e.jsx("i",{className:"fa-solid fa-chevron-right ml-auto text-purple-300"})]}),e.jsxs("button",{onClick:()=>{ke(!1),ut(!0)},className:"flex items-center gap-4 rounded-xl border-2 border-green-100 bg-green-50 px-4 py-4 text-left transition hover:border-green-300 active:scale-[0.98]",children:[e.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-xl bg-green-600 text-white",children:e.jsx("i",{className:"fa-solid fa-qrcode text-xl"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-black text-gray-800",children:s("album.inPersonTradeQR")}),e.jsx("p",{className:"mt-0.5 text-xs text-gray-500",children:s("album.inPersonTradeQRDesc")})]}),e.jsx("i",{className:"fa-solid fa-chevron-right ml-auto text-green-400"})]}),e.jsx("button",{onClick:()=>ke(!1),className:"rounded-xl py-3 text-sm font-bold text-gray-400 transition hover:text-gray-600",children:s("common.cancel")})]})]})}),document.body),Za&&te.createPortal(e.jsxs("div",{className:"fixed inset-0 z-150 flex flex-col bg-white",style:{paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-gray-100 bg-white px-4 py-3 shadow-sm",children:[e.jsx("button",{onClick:()=>ut(!1),className:"flex h-9 w-9 items-center justify-center rounded-full bg-gray-100 text-gray-600 transition hover:bg-gray-200",children:e.jsx("i",{className:"fa-solid fa-arrow-left"})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"text-base font-black text-gray-800",children:[e.jsx("i",{className:"fa-solid fa-qrcode mr-2 text-green-600"}),s("album.inPersonTrade")]}),e.jsx("p",{className:"text-xs text-gray-400",children:s("album.viaQRCode")})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(a.Suspense,{fallback:e.jsx(Et,{}),children:e.jsx(Mr,{onSelectUser:t=>{ut(!1);const r=t?.id||t?.uid;r&&g?g(r,t):H("trades")}})})})]}),document.body),qa&&e.jsx(a.Suspense,{fallback:null,children:e.jsx(Er,{onClose:()=>Bt(!1)})}),ja,Ga&&e.jsx(nr,{onBack:()=>zt(!1),onComplete:()=>ue(),checkinStreak:c.checkinStreak,lastCheckin:c.lastCheckin}),e.jsx(ur,{isOpen:F,onClose:()=>z(!1),message:s("album.loginRequiredMessage")})]})}export{Xr 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.