PageSourceSearch

https://7maravilhas.pt/build/assets/index-CJtp0vBI.js

js 7maravilhas.pt collected 2026-09-24 23:51:05 UTC 8,332 bytes, 1 lines download raw bytes

1import{r as x,j as e,Y as c}from"./app-Ce8cAmW-.js";import{M as C,F as M}from"./main-layout-C-X_DRHS.js";import{I as h}from"./info-CxJPxxjS.js";import{B as D}from"./book-open-CsbnQx_s.js";import{L as g}from"./lock-DEFVVLPn.js";import{C as b}from"./circle-check-big-C7TBtmx5.js";import{C as L}from"./circle-alert-By6rAmmI.js";import{C as j}from"./chevron-right-Cn40fT_Z.js";/* empty css            */import"./index-skiHflQy.js";import"./primary-button-hvRD1VpQ.js";import"./index-BLDRET_f.js";function S(s){return s?s==="Açores"?"Região Autónoma dos Açores":s==="Madeira"?"Região Autónoma da Madeira":`Distrito de ${s}`:"—"}function V(s){return s?`Região de ${s}`:"—"}function E({targetDate:s}){const[t,r]=x.useState({days:0,hours:0,minutes:0,seconds:0});return x.useEffect(()=>{const o=new Date(s).getTime(),a=()=>{const u=new Date().getTime(),n=o-u;if(n<=0){r({days:0,hours:0,minutes:0,seconds:0});return}r({days:Math.floor(n/(1e3*60*60*24)),hours:Math.floor(n%(1e3*60*60*24)/(1e3*60*60)),minutes:Math.floor(n%(1e3*60*60)/(1e3*60)),seconds:Math.floor(n%(1e3*60)/1e3)})};a();const d=setInterval(a,1e3);return()=>clearInterval(d)},[s]),e.jsx("div",{className:"flex justify-center gap-3",children:[{value:t.days,label:"Dias"},{value:t.hours,label:"Horas"},{value:t.minutes,label:"Min"},{value:t.seconds,label:"Seg"}].map((o,a)=>e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:"bg-primary text-primary-foreground min-w-[55px] rounded-lg px-3 py-2 text-center text-2xl font-bold",children:String(o.value).padStart(2,"0")}),e.jsx("span",{className:"text-muted-foreground mt-1 text-xs",children:o.label})]},a))})}function A({category:s}){const t=s.monumentCount===0,r=s.maxVotes>0?s.selectedCount/s.maxVotes*100:0;return e.jsxs(c,{href:route("voting.category",{slug:s.slug}),className:`bg-card border-border hover:border-primary/50 block rounded-xl border p-5 transition-all hover:shadow-md ${s.isComplete&&!t?"ring-primary/20 ring-2":""} ${t?"opacity-70":""}`,children:[e.jsxs("div",{className:"mb-3 flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-foreground text-sm font-semibold",children:s.shortLabel}),e.jsxs("p",{className:"text-muted-foreground mt-1 text-xs",children:[s.monumentCount," monumentos"]})]}),e.jsx("div",{className:"flex items-center gap-2",children:t?e.jsxs("div",{className:"bg-muted text-muted-foreground flex items-center gap-1 rounded-full px-2 py-1",children:[e.jsx(h,{className:"h-3 w-3"}),e.jsx("span",{className:"text-xs font-medium",children:"Sem monumentos"})]}):s.isSubmitted?e.jsxs("div",{className:"flex items-center gap-1 rounded-full bg-green-50 px-2 py-1 text-green-600",children:[e.jsx(g,{className:"h-3 w-3"}),e.jsx("span",{className:"text-xs font-medium",children:"Submetido"})]}):s.isComplete?e.jsxs("div",{className:"text-primary bg-primary/10 flex items-center gap-1 rounded-full px-2 py-1",children:[e.jsx(b,{className:"h-3 w-3"}),e.jsx("span",{className:"text-xs font-medium",children:"Completo"})]}):e.jsx(j,{className:"text-muted-foreground h-5 w-5"})})]}),t?e.jsx("p",{className:"text-muted-foreground text-xs",children:"Sem patrimónios disponíveis nesta categoria para o seu território."}):e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{className:"text-muted-foreground",children:"Selecionados"}),e.jsxs("span",{className:"text-foreground font-medium",children:[s.selectedCount,"/",s.maxVotes]})]}),e.jsx("div",{className:"bg-muted h-2 w-full rounded-full",children:e.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${r}%`}})})]})]})}function R(s,t,r){if(t)return{label:"Votação submetida",tone:"submitted"};if(s>0)return{label:"A votação está aberta",tone:"open"};if(r){const o=new Date(r);if(Date.now()>o.getTime())return{label:"Votação encerrada",tone:"closed"}}return{label:"A votação ainda não está aberta",tone:"pending"}}function z({categories:s,phaseStatus:t,statusMessage:r,isBetweenPhases:o,phase:a,isLocked:d,p
1hase1End:u,phase2End:n,specialist:l}){const N=t==="fase_1_aberta"||t==="fase_2_aberta",f=a===1?u:n,p=s.filter(m=>m.isComplete).length,v=p===s.length&&s.length>0,y=x.useMemo(()=>S(l.district),[l.district]),w=x.useMemo(()=>V(l.region),[l.region]),i=R(a,d,n);return e.jsx(C,{title:"Votação de Especialistas",children:e.jsx("div",{className:"bg-background min-h-screen py-8",children:e.jsxs("div",{className:"container mx-auto max-w-7xl px-4",children:[e.jsxs("div",{className:"mt-6 mb-8 text-center",children:[e.jsx("h1",{className:"text-foreground mb-2 text-3xl font-bold",children:"Votação de Especialistas"}),e.jsx("p",{className:"text-muted-foreground",children:"Novas 7 Maravilhas de Portugal®"})]}),e.jsx("div",{className:"bg-card border-border mb-6 rounded-xl border p-5",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"bg-primary/10 shrink-0 rounded-full p-3",children:e.jsx(h,{className:"text-primary h-5 w-5"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("h2",{className:"text-foreground font-semibold",children:["Bem-vindo(a), ",l.name]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:a===2?e.jsxs(e.Fragment,{children:["Região de votação:"," ",e.jsx("span",{className:"text-primary font-medium",children:w})]}):e.jsxs(e.Fragment,{children:["Território de votação:"," ",e.jsx("span",{className:"text-primary font-medium",children:y})]})})]})]})}),e.jsxs("div",{className:"bg-card border-border mb-6 rounded-xl border p-5",children:[e.jsx("h3",{className:"text-foreground mb-2 font-semibold",children:"Antes de começar"}),e.jsx("p",{className:"text-muted-foreground mb-4 text-sm",children:a===2?"Encontra-se na Fase 2 da votação. Deverá ordenar até 3 patrimónios por categoria, a partir dos apurados na fase anterior. Em todas as categorias, o 1.º lugar deve corresponder ao património que considera mais relevante.":"Encontra-se na Fase 1 da votação. Deverá ordenar até 7 patrimónios por categoria. Em todas as categorias, o 1.º lugar deve corresponder ao património que considera mais relevante."}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(c,{href:route("voting.rules"),className:"bg-primary text-primary-foreground hover:bg-primary/90 inline-flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors",children:[e.jsx(D,{className:"h-4 w-4"}),"Consultar regras de votação"]}),e.jsxs(c,{href:route("regulamento"),className:"bg-muted text-foreground hover:bg-muted/80 inline-flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors",children:[e.jsx(M,{className:"h-4 w-4"}),"Consultar regulamento completo"]})]})]}),e.jsxs("div",{className:"bg-card border-border mb-6 rounded-xl border p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[i.tone==="submitted"?e.jsx(g,{className:"h-5 w-5 text-green-500"}):i.tone==="open"?e.jsx(b,{className:"h-5 w-5 text-green-500"}):e.jsx(L,{className:"text-muted-foreground h-5 w-5"}),e.jsx("h3",{className:"text-foreground font-semibold",children:i.label})]}),i.tone==="open"&&f&&e.jsxs("div",{className:"mt-4",children:[e.jsx("p",{className:"text-muted-foreground mb-3 text-center text-sm",children:"Tempo restante:"}),e.jsx(E,{targetDate:f})]}),i.tone==="submitted"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:"Os seus votos foram submetidos com sucesso e não podem ser alterados."}),o&&e.jsx("p",{className:"text-muted-foreground text-sm",children:r})]})]}),N&&s.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("h3",{className:"text-foreground mb-4 font-semibold",children:["Categorias (",p,"/",s.length," concluídas)"]}),e.jsx("div",{className:"mb-6 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:s.map(m=>e.jsx(A,{category:m},m.slug))}),v&&!d&&e.jsx("div",{className:"text-center",children:e.jsxs(c,{href:route("voting.summary"),className:"bg-primary hover:bg-primary/90 text-primary-foreground inline-flex items-center gap-2 rounded-xl px-8 py-3 font-semibold transition-colors",children:["Rever e Submeter Votos",e.
1jsx(j,{className:"h-5 w-5"})]})})]})]})})})}export{z 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.