1import{r as f,j as e,L as u,B as z,S as T,e as j,u as F}from"./index-CDarmjNK.js";import{l as L,s as _,g as R}from"./families-store-BvTt-0_I.js";import{s as C}from"./active-map-C-xEYSxi.js";import{g as I}from"./map-art-CuajGk46.js";import{r as W,s as Z,k as A,l as $}from"./wallet-CaFBWQFZ.js";import{C as B,T as S}from"./trophy-DuIbameN.js";import{C as Q,R as H,L as O}from"./rotate-ccw-B5YpvlLe.js";import{S as Y}from"./sparkles-C5_N6dO6.js";import{F as U}from"./flask-conical-BPUJlyhX.js";import{P as q}from"./play-XXm1fob8.js";import"./lab-master-token-Dgq_qWKx.js";import"./createServerFn-CNGAtMsd.js";import"./biome-floor-volcano-bT8gJOPW.js";import"./createLucideIcon-BfXV4Vl5.js";const D={normal:"N",medium:"M",hard:"H",endless:"â"},K={normal:"Normal",medium:"Médio",hard:"DifÃcil",endless:"Infinito"},P={normal:1,medium:2,hard:3,endless:4},G={coins:0,ownedWeaponIds:[],ownedPassiveIds:[],disabledWeaponIds:[],disabledPassiveIds:[],mapProgress:{},ownedCharacterIds:["md-classic"],disabledCharacterIds:[],activeCharacterId:"md-classic"};function J({backTo:n="/hub",backLabel:a="hub",showExtras:p=!1}){const[t,o]=f.useState(G),[i,m]=f.useState(()=>L());f.useEffect(()=>(o(W()),Z(o)),[]),f.useEffect(()=>(m(L()),_(m)),[]);const c=f.useMemo(()=>[...i].sort((r,l)=>r.trailOrder-l.trailOrder),[i]),y=f.useMemo(()=>{const r=new Set;let l=!0;for(const x of c)l&&r.add(x.id),l=!!t.mapProgress[x.id];return r},[c,t.mapProgress]),d=c.filter(r=>t.mapProgress[r.id]).length,g=c.filter(r=>t.mapProgress[r.id]==="endless").length;return e.jsxs("div",{className:"min-h-[calc(100vh-3rem)] bg-paper text-ink",children:[e.jsx("header",{className:"border-b-2 border-ink bg-paper-2",children:e.jsxs("div",{className:"container mx-auto px-4 py-6 flex flex-wrap items-end justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex items-start gap-3",children:[e.jsxs(u,{to:n,className:"mt-1 inline-flex items-center gap-1 border-2 border-ink bg-paper px-2.5 py-1.5 text-xs font-mono uppercase tracking-wider shadow-flat hover:-translate-y-[1px] transition-transform",children:[e.jsx(B,{size:12})," ",a]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-ink/60",children:"single-player · trilha"}),e.jsx("h1",{className:"font-display text-3xl sm:text-4xl font-black leading-tight",children:"Caminho do Pincel"}),e.jsx("p",{className:"text-sm text-ink/70 mt-1 max-w-xl",children:"10 mapas. Cada boss fecha o run. Zere Normal â libera o próximo bioma e o tier Médio do atual."})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 font-mono text-[11px] uppercase tracking-wider",suppressHydrationWarning:!0,children:[e.jsx(M,{icon:e.jsx(Q,{size:12}),label:"moedas",value:t.coins,accent:"bg-postit-mustard"}),e.jsx(M,{icon:e.jsx(Y,{size:12}),label:"mapas",value:`${d}/${c.length}`,accent:"bg-postit-jade"}),e.jsx(M,{icon:e.jsx(S,{size:12}),label:"â zerados",value:g,accent:"bg-postit-violet"}),p&&e.jsxs(e.Fragment,{children:[e.jsxs(u,{to:"/lab",className:"inline-flex items-center gap-1 border-2 border-ink bg-postit-lemon px-3 py-1.5 text-ink shadow-flat hover:-translate-y-[1px] transition-transform",children:[e.jsx(U,{size:12})," lab"]}),e.jsxs(u,{to:"/leaderboard",className:"inline-flex items-center gap-1 border-2 border-ink bg-paper px-3 py-1.5 text-ink shadow-flat hover:-translate-y-[1px] transition-transform",children:[e.jsx(S,{size:12})," ranking"]})]})]})]})}),e.jsxs("main",{className:"container mx-auto px-4 py-8",children:[e.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:c.map(r=>{const l=z[r.biomeId],x=r.cardHeroFamilyIds.map(s=>R(s)).filter(Boolean),b=x[0],k=y.has(r.id),v=t.mapProgress[r.id]??null;return e.jsx(V,{mapId:r.id,order:r.trailOrder,name:r.displayName,tagline:T[r.id]??"",paper:l?.palette.paper??"#f5f0e6",accent:l?.palette.accent??"#b9382f",haze:l?.palette.haze??"#dcd3c2",families:x.map(s=>({id:s.id,name:s.displayName,baseId:s.baseManifestId})),bossName:b?.displayName??"Boss desconhecido",unlocked:k,progress:v,onMarkTier:s=>A(r.id,s)},r.id)})}),e.jsxs("div",{className:"mt-10 flex items-center justify-between border-t-2 border-dashed border-ink/30 pt-4 text-xs text-ink/60 font-mono uppercase tracking-wider",children:[e.jsx("span",{children:"dev tools â runtime wiring chega no PR-7 (engine vai marcar progresso sozinho)."}),e.jsxs("button",{type:"button",onClick:()=>{confirm("Zerar progresso, moedas e armas? (mantém Hissen)")&&$()},className:"inline-flex items-center gap-1 border-2 border-ink bg-paper px-2 py-1 shadow-flat hover:bg-postit-cinnabar hover:text-paper",children:[e.jsx(H,{size:11})," reset wallet"]})]})]})]})}function V({mapId:n,order:a,name:p,tagline:t,paper:o,accent:i,haze:m,families:c,bossName:y,unlocked:d,progress:g,onMarkTier:r}){const l=["normal","medium","hard","endless"],x=g?P[g]:0,b=F(),k=s=>{if(d){try{localStorage.setItem("md.meta.activeMap",n),C(s)}catch{}b({to:"/hub/loadout"})}},v=()=>{if(d)try{localStorage.setItem("md.meta.activeMap",n),C("normal")}catch{}};return e.jsxs("article",{className:j("relative border-2 border-ink shadow-flat-lg overflow-hidden flex flex-col",!d&&"opacity-70"),style:{background:o},children:[e.jsxs("div",{className:"relative aspect-[4/3] border-b-2 border-ink overflow-hidden",style:{background:`linear-gradient(180deg, ${m} 0%, ${o} 100%)`},children:[(()=>{const s=I(n);return s?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:s.src,alt:"","aria-hidden":!0,draggable:!1,
1className:"absolute inset-0 h-full w-full pointer-events-none select-none",style:{objectFit:s.fit??"cover",objectPosition:s.position??"center",transform:s.scale&&s.scale!==1?`scale(${s.scale})`:void 0,transformOrigin:"center"}}),s.tint&&s.tint>0?e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 pointer-events-none mix-blend-multiply",style:{background:i,opacity:s.tint}}):null]}):null})(),e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 opacity-50 mix-blend-multiply pointer-events-none",style:{backgroundImage:`radial-gradient(circle, ${i}55 1px, transparent 1.4px)`,backgroundSize:"9px 9px"}}),e.jsx("div",{"aria-hidden":!0,className:"absolute top-0 left-0 right-0 h-1.5",style:{background:i}}),e.jsx("span",{className:"absolute top-2 left-2 grid h-10 w-10 place-items-center border-2 border-ink bg-paper font-display text-xl font-black",style:{color:i},children:String(a).padStart(2,"0")}),!I(n)&&e.jsx(X,{families:c,accent:i}),!d&&e.jsx("div",{className:"absolute inset-0 grid place-items-center bg-ink/55 text-paper",children:e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(O,{size:28,strokeWidth:2.5}),e.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest",children:"conclua o anterior"})]})})]}),e.jsxs("div",{className:"p-3 flex flex-col gap-2 flex-1",children:[e.jsx("h2",{className:"font-display text-lg font-black leading-tight",children:p}),e.jsx("p",{className:"text-[12px] text-ink/70 italic leading-snug min-h-[2.2em]",children:t}),e.jsx("div",{className:"flex flex-wrap gap-1 font-mono text-[9px] uppercase tracking-wider",children:c.map(s=>e.jsx("span",{className:"border border-ink bg-paper-2 px-1.5 py-0.5",children:s.baseId},s.id))}),e.jsxs("div",{className:"text-[10px] font-mono uppercase tracking-wider text-ink/60",children:["boss: ",e.jsx("span",{className:"text-ink font-bold",children:y})]}),e.jsx("div",{className:"mt-2 grid grid-cols-4 gap-1.5",children:l.map(s=>{const N=P[s],w=x>=N,h=d&&(N===1||x>=N-1);return e.jsx("button",{type:"button",disabled:!h,onClick:E=>{if(h){if(E.shiftKey){r(s);return}k(s)}},title:`${K[s]} â ${w?"completo · clique pra rejogar":h?"jogar este tier (shift-click = marcar dev)":"destrave o anterior"}`,className:j("h-10 border-2 border-ink font-display text-lg font-black grid place-items-center transition-transform",w&&"bg-postit-jade text-ink shadow-flat hover:-translate-y-[1px]",!w&&h&&"bg-paper text-ink hover:-translate-y-[1px] shadow-flat",!h&&"bg-paper-2 text-ink/30 cursor-not-allowed"),children:D[s]},s)})}),e.jsxs(u,{to:"/hub/loadout",onClick:v,className:j("mt-2 inline-flex items-center justify-center gap-1.5 border-2 border-ink px-3 py-2 font-display text-sm font-bold shadow-flat transition-transform",d?"bg-ink text-paper hover:-translate-y-[1px]":"bg-paper-2 text-ink/40 pointer-events-none"),children:[e.jsx(q,{size:13,fill:"currentColor"}),d?"jogar":"bloqueado"]})]})]})}function X({families:n,accent:a}){const p=n.slice(0,3);return e.jsx("div",{className:"absolute inset-0 flex items-end justify-center gap-3 pb-3 pointer-events-none",children:p.map((t,o)=>{const i=o===0,m=i?110:70-o*10;return e.jsx("svg",{viewBox:"0 0 100 120",width:m,height:m*1.2,className:"drop-shadow-[0_4px_0_rgba(0,0,0,0.15)]",style:{opacity:i?.85:.95,transform:i?"translateY(6px)":"translateY(0px)"},children:e.jsx(ee,{id:t.baseId,fill:i?"#0a0a0a":a})},t.id+o)})})}function ee({id:n,fill:a}){switch(n){case"oni-blot":return e.jsxs("g",{fill:a,children:[e.jsx("ellipse",{cx:"50",cy:"65",rx:"35",ry:"40"}),e.jsx("path",{d:"M22 38 L30 18 L38 38 Z"}),e.jsx("path",{d:"M78 38 L70 18 L62 38 Z"}),e.jsx("circle",{cx:"40",cy:"60",r:"4",fill:"#f5f0e6"}),e.jsx("circle",{cx:"60",cy:"60",r:"4",fill:"#f5f0e6"})]});case"nure-onna":return e.jsxs("g",{fill:a,children:[e.jsx("path",{d:"M50 12 Q70 30 60 55 Q80 70 65 100 Q50 115 35 100 Q20 70 40 55 Q30 30 50 12 Z"}),e.jsx("circle",{cx:"44",cy:"40",r:"3",fill:"#f5f0e6"}),e.jsx("circle",{cx:"56",cy:"40",r:"3",fill:"#f5f0e6"})]});case"mokumokuren":return e.jsxs("g",{fill:a,children:[e.jsx("rect",{x:"15",y:"20",width:"70",height:"80",rx:"4"}
1),e.jsx("circle",{cx:"32",cy:"45",r:"6",fill:"#f5f0e6"}),e.jsx("circle",{cx:"32",cy:"45",r:"2",fill:a}),e.jsx("circle",{cx:"50",cy:"45",r:"6",fill:"#f5f0e6"}),e.jsx("circle",{cx:"50",cy:"45",r:"2",fill:a}),e.jsx("circle",{cx:"68",cy:"45",r:"6",fill:"#f5f0e6"}),e.jsx("circle",{cx:"68",cy:"45",r:"2",fill:a}),e.jsx("circle",{cx:"40",cy:"70",r:"6",fill:"#f5f0e6"}),e.jsx("circle",{cx:"40",cy:"70",r:"2",fill:a}),e.jsx("circle",{cx:"60",cy:"70",r:"6",fill:"#f5f0e6"}),e.jsx("circle",{cx:"60",cy:"70",r:"2",fill:a})]});case"karakasa":return e.jsxs("g",{fill:a,children:[e.jsx("path",{d:"M15 50 Q50 5 85 50 Z"}),e.jsx("rect",{x:"48",y:"50",width:"4",height:"55"}),e.jsx("ellipse",{cx:"50",cy:"105",rx:"14",ry:"4"}),e.jsx("circle",{cx:"50",cy:"38",r:"6",fill:"#f5f0e6"}),e.jsx("circle",{cx:"50",cy:"38",r:"3",fill:a})]});case"tengu":return e.jsxs("g",{fill:a,children:[e.jsx("circle",{cx:"50",cy:"55",r:"32"}),e.jsx("path",{d:"M50 30 L78 55 L50 50 Z"}),e.jsx("path",{d:"M18 40 L5 25 L22 35 Z"}),e.jsx("path",{d:"M82 40 L95 25 L78 35 Z"}),e.jsx("circle",{cx:"40",cy:"58",r:"3",fill:"#f5f0e6"}),e.jsx("circle",{cx:"60",cy:"58",r:"3",fill:"#f5f0e6"})]});default:return e.jsx("circle",{cx:"50",cy:"60",r:"30",fill:a})}}function M({icon:n,label:a,value:p,accent:t}){return e.jsxs("span",{className:j("inline-flex items-center gap-1.5 border-2 border-ink px-2 py-1 shadow-flat",t),children:[n,e.jsx("span",{className:"opacity-70",children:a}),e.jsx("span",{className:"font-display text-sm font-black",children:p})]})}const he=()=>e.jsx(J,{backTo:"/hub",backLabel:"hub",showExtras:!0});export{he as component};
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.