1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[208],{1104:(e,t,a)=>{a.d(t,{A:()=>y});var s=a(7876),r=a(4232),i=a(4587),n=a.n(i),o=a(8230),l=a.n(o),c=a(4e3),d=a(9038),u=a(4146),p=a(9099);let h={pt:"pt_pt",en:"en_uk"},m={pt:"Ouvir",en:"Listen"},x={pt:"Ouvir com ReadSpeaker webReader",en:"Listen with ReadSpeaker webReader"};function g(e){let t=String(e||"").toLowerCase();return t.startsWith("en")?"en":t.startsWith("pt")?"pt":""}function f(e){let{selectedLang:t}=e,a=(0,p.useRouter)(),i=(0,r.useMemo)(()=>{let e=g(a.locale);if(e)return e;let s=g(function(){if("undefined"==typeof document)return"pt";let e=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith("googtrans="));if(!e)return"pt";let t=decodeURIComponent(e.split("=")[1]||"").split("/").filter(Boolean);return(t[1]||t[0]||"pt").toLowerCase()}());if(s)return s;let r=g(t);return r||"pt"},[a.locale,t]),n=h[i],o=m[i],l=x[i];if((0,r.useEffect)(()=>{window.ReadSpeaker&&window.ReadSpeaker.q(()=>{var e,t;(null==(t=window.rspkr)||null==(e=t.ui)?void 0:e.addClickEvents)&&window.rspkr.ui.addClickEvents()});let e=()=>{window.ReadSpeaker&&window.ReadSpeaker.q(()=>{var e,t,a;let s=null==(a=window.rspkr)||null==(t=a.ui)||null==(e=t.getActivePlayer)?void 0:e.call(t);(null==s?void 0:s.close)&&s.close()})};return a.events.on("routeChangeStart",e),()=>{a.events.off("routeChangeStart",e)}},[a.events]),!n)return null;let c=window.location.href;return(0,s.jsx)("div",{id:"readspeaker_button1",className:"rs_skip rsbtn rs_preserve",children:(0,s.jsxs)("a",{rel:"nofollow",className:"rsbtn_play",title:l,href:"".concat("https://app-eu.readspeaker.com/cgi-bin/rsent","?customerid=").concat("12119","&lang=").concat(n,"&readid=maincontent&url=").concat(encodeURIComponent(c)),children:[(0,s.jsx)("span",{className:"rsbtn_left rsimg rspart",children:(0,s.jsx)("span",{className:"rsbtn_text",children:(0,s.jsx)("span",{children:o})})}),(0,s.jsx)("span",{className:"rsbtn_right rsimg rsplay rspart"})]})})}function b(e){let{label:t="Hor\xe1rio",rows:a=[],className:r="",href:i=""}
1=e,n=Array.isArray(a)?a.filter(Boolean):[];if(!n.length)return null;let o=["w-72 min-[480px]:w-80 p-[16px_20px_18px] min-[480px]:p-[24px_28px_24px] border-[0.5px] border-white bg-black/15 text-white backdrop-blur-[1px] [-webkit-backdrop-filter:blur(1px)] font-medium",i?"block transition-colors duration-200 hover:bg-black/25 focus:outline-none focus:ring-2 focus:ring-white/70":"",r].join(" "),c=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex items-center justify-start pb-2 mb-2 min-[480px]:pb-[9px] min-[480px]:mb-[10px] border-b-[0.5px] border-white",children:(0,s.jsx)("span",{className:"text-[12px] sm:text-lg uppercase text-white",children:t})}),n.map((e,t)=>(0,s.jsxs)("div",{className:"grid grid-cols-[minmax(72px,auto)_max-content] items-baseline gap-5 text-[12px] min-[480px]:text-[14px] leading-[1.7] text-white",children:[e.days?(0,s.jsx)("span",{className:"tracking-[0.04em] text-white",children:e.days}):null,(0,s.jsx)("span",{className:["whitespace-nowrap tabular-nums tracking-[0.03em] text-white",e.days?"text-right":"text-left",e.closed?"tracking-[0.05em]":""].join(" "),children:e.hours})]},"".concat(e.days,"-").concat(e.hours,"-").concat(t)))]});return i?(0,s.jsx)(l(),{href:i,className:o,"aria-label":"Ver hor\xe1rio na p\xe1gina Visitar",children:c}):(0,s.jsx)("div",{className:o,role:"complementary","aria-label":"Hor\xe1rio de funcionamento",children:c})}var w=a(4048);function v(e){let t=String(e||"").trim();if(!t)return null;let a=t.includes("|")?"|":t.includes(":")?":":null,s=t.toLowerCase().includes("encerr");if(!a)return{days:"",hours:t,closed:s};let[r,...i]=t.split(a),n=i.join(a).trim();return n?{days:r.trim(),hours:n,closed:s}:{days:"",hours:t,closed:s}}function y(e){let{titulo:t,title:a,images:i=[],horario:o,contentPaddingClass:p="pl-2 sm:pl-20",showScheduleBadge:h=!1,scheduleBadgeHref:m=""}=e,x=(0,c.useRouter)(),[g,y]=(0,r.useState)(!1),[j,N]=(0,r.useState)(0),[k,A]=(0,r.useState)(!1),[S,P]=(0,r.useState)("pt"),E=(0,r.useRef)(null),C=("string"==typeof a?a:"string"==typeof t?t:"").trim(),T=C.length>0?C:"",L=(null==o?void 0:o.titulo)||"Hor\xe1rio",R=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.map(v).filter(Boolean)}((null==o?void 0:o.linha1)||"Aberto: 9h30 - 17h00",(null==o?void 0:o.linha2)||""),[B,M]=(0,r.useState)(!1),[O,_]=(0,r.useState)(""),[U,z]=(0,r.useState)([]),[I,$]=(0,r.useState)(!1),[q,D]=(0,r.useState)(null),F=(0,r.useRef)(null),Q=(0,r.useRef)(null),V="".concat("https://api.palaciodosbiscainhos.pt","/api"),J=[{key:"index-agenda",type:"P\xe1gina",page:"/agenda",anchor:"",title:"AGENDA",text:"Agenda â Eventos"},{key:"index-exposicoes",type:"P\xe1gina",page:"/exposicoes",anchor:"",title:"EXPOSI\xc7\xd5ES",text:"Todas as Exposi\xe7\xf5es"},{key:"index-mediacao",type:"P\xe1gina",page:"/mediacao",anchor:"",title:"MEDIA\xc7\xc3O",text:"Media\xe7\xe3o â Programa de Media\xe7\xe3o â Inscri\xe7\xe3o"},{key:"index-repositorio",type:"P\xe1gina",page:"/repositorio",anchor:"",title:"REPOSIT\xd3RIO",text:"Reposit\xf3rio â Publica\xe7\xf5es e PDFs"},{key:"index-sobre",type:"P\xe1gina",page:"/sobre-nos",anchor:"",title:"SOBRE N\xd3S",text:"Sobre n\xf3s â Sobre N\xf3s"},{key:"index-sobre-candidatura",type:"P\xe1gina",page:"/sobre-nos",anchor:"",title:"SOBRE N\xd3S",text:"Candidatura"},{key:"index-sobre-equipa",type:"P\xe1gina",page:"/sobre-nos",anchor:"",title:"SOBRE N\xd3S",text:"Equipa"},{key:"index-museu",type:"P\xe1gina",page:"/museu",anchor:"",title:"PAL\xc1CIO",text:"Sobre o Pal\xe1cio"},{key:"index-jardim",type:"P\xe1gina",page:"/jardim",anchor:"",title:"JARDINS",text:"Sobre os Jardins"},{key:"index-visitar",type:"P\xe1gina",page:"/visitar",anchor:"",title:"VISITAR",text:"Como chegar ao Pal\xe1cio"}];(0,r.useEffect)(()=>{if(!i.length||1===i.length)return;let e=setInterval(()=>{N(e=>e===i.length-1?0:e+1)},2500);return()=>clearInterval(e)},[i.length]),(0,r.useEffect)(()=>{let e=e=>{E.current&&!E.current.contains(e.target)&&A(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let Y=(e,t)=>
1{switch(e){case"Agenda":return"/agenda/".concat(t.documentId||t.id||"");case"Exposi\xe7\xf5es":return"/exposicoes/".concat(t.documentId||t.id||"");case"Jardins":return"/jardim/";case"Pal\xe1cio":case"P\xe1gina Pal\xe1cio":return"/museu";case"Sobre N\xf3s":case"P\xe1gina Sobre N\xf3s":return"/sobre-nos";case"P\xe1gina Agenda":return"/agenda";case"P\xe1gina Exposi\xe7\xf5es":return"/exposicoes";case"P\xe1gina Inicial":default:return"/";case"P\xe1gina Jardins":return"/jardim";case"P\xe1gina Media\xe7\xe3o":return"/mediacao";case"P\xe1gina Reposit\xf3rio":return"/repositorio";case"P\xe1gina Visitar":return"/visitar";case"P\xe1gina":return t.page||"/"}},G=[{key:"Agenda",path:"/agendas?filters[$or][0][Titulo][$containsi]=QUERY&filters[$or][1][Destaque][$containsi]=QUERY&populate=*"},{key:"Equipa",path:"/equipas?filters[$or][0][Nome][$containsi]=QUERY&filters[$or][1][Cargo][$containsi]=QUERY&populate=*"},{key:"Exposi\xe7\xf5es",path:"/exposicoess?filters[$or][0][Titulo][$containsi]=QUERY&filters[$or][1][Destaque][$containsi]=QUERY&populate=*"},{key:"Jardins",path:"/jardims?filters[$or][0][Titulo][$containsi]=QUERY&filters[$or][1][Texto][$containsi]=QUERY&populate=*"},{key:"Pal\xe1cio",path:"/museus?filters[$or][0][Titulo][$containsi]=QUERY&filters[$or][1][Texto][$containsi]=QUERY&populate=*"}],W=[{key:"P\xe1gina Agenda",path:"/agenda"},{key:"P\xe1gina Exposi\xe7\xf5es",path:"/exposicoes"},{key:"P\xe1gina Inicial",path:"/"},{key:"P\xe1gina Jardins",path:"/jardim"},{key:"P\xe1gina Media\xe7\xe3o",path:"/mediacao"},{key:"P\xe1gina Pal\xe1cio",path:"/museu"},{key:"P\xe1gina Reposit\xf3rio",path:"/repositorio"},{key:"P\xe1gina Sobre N\xf3s",path:"/sobre-nos"},{key:"P\xe1gina Visitar",path:"/visitar"}],H=async()=>{if(!q)try{let e=await Promise.all(W.map(async e=>{try{let t=await fetch("".concat(V).concat(e.path,"?populate=*"));if(!t.ok)return{key:e.key,data:null};let a=await t.json();return{key:e.key,data:(null==a?void 0:a.data)||null}}catch(t){return{key:e.key,data:null}}})),t={};e.forEach(e=>t[e.key]=e.data),D(t)}catch(e){console.error("Erro prefetch singles:",e)}},X=async(e,t)=>{let a=encodeURIComponent(e),s=G.map(async e=>{let s=e.path.replace(/QUERY/g,a),r="".concat(V).concat(s);try{let a=await fetch(r,{signal:t});if(!a.ok)return[];let s=await a.json();if(Array.isArray(s.data))return s.data.map(t=>({id:t.id,type:e.key,title:((e,t)=>{let a=t||{};return a.Titulo||a.titulo||a.Nome||a.nome||a.title||a.intro||t.title||e})(e.key,t),raw:t}));return[]}catch(t){if("AbortError"===t.name)throw t;return console.error("Erro cole\xe7\xe3o",e.key,t),[]}});return(await Promise.allSettled(s)).filter(e=>"fulfilled"===e.status).flatMap(e=>e.value)},K=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,s=String(e),r=t.toLowerCase(),i=s.toLowerCase().indexOf(r);if(-1===i)return s.length>120?s.slice(0,120)+"...":s;let n=Math.max(0,i-a),o=Math.min(s.length,i+t.length+a);return(n>0?"... ":"")+s.slice(n,o)+(o<s.length?" ...":"")},[Z,ee]=(0,r.useState)(!1),[et,ea]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e;return g?e=setTimeout(()=>ee(!0),300):ee(!1),()=>clearTimeout(e)},[g]),(0,r.useEffect)(()=>{if(!B){_(""),z([]),$(!1),Q.current&&(Q.current.abort(),Q.current=null);return}H()},[B]),(0,r.useEffect)(()=>{if(B){if(F.current&&clearTimeout(F.current),!O||O.trim().length<2){z([]),$(!1);return}return $(!0),F.current=setTimeout(async()=>{Q.current&&Q.current.abort();let e=new AbortController;Q.current=e;try{let t=await X(O,e.signal),a=(e=>{if(!q)return[];let t=e.toLowerCase(),a=[];for(let e of Object.keys(q)){let s=q[e];s&&s.attributes&&Object.values(s.attributes).filter(e=>"string"==typeof e).join(" ").toLowerCase().includes(t)&&a.push({id:s.id,type:e,title:e,raw:s})}return a})(O),s=(e=>{let t=e.toLowerCase(),a=[];for(let s of J)if(s.text&&(s.text.toLowerCase().includes(t)||s.title.toLowerCase().includes(t))){let t=K(s.text,e);a.push({id:s.key,type:"P\xe1gina",title:s.title,raw:{...s,snippet:t}})}return a})(O),r=[...t,...a,...s].map(e=>{var t;if("P\xe1gina"===e.type&&(null==(t=e.raw)?void 0:t.snippet))return{...e,snippet:e.raw.snippet};let a=((e,t)=>{try{let a=(null==e?void 0:e.attributes)||{},s=t.toLowerCase();for(let e of Object.keys(a)){let r=a[e];if("string"==typeof r){let e=r.toLowerCase().indexOf(s);if(-1!==e)return K(r,t)}if("object"==typeof r&&null!==r){let e=JSON.stringify(r),a=e.toLowerCase().indexOf(s);if(-1!==a)return K(e,t)}}let r=a.Titulo||a.title||a.Nome||a.nome||"";if(r.toLowerCase().includes(s))return K(r,t)}catch(e){}return""})(e.raw,O);return{...e,snippet:a}}),i=new Set,n=r.filter(e=>{var t,a;let s="".concat(e.type,"-").concat(e.id||(null==(t=e.raw)?void 0:t.key)||(null==(a=e.raw)?void 0:a.anchor)||"");return!i.has(s)&&(i.add(s),!0)});z(n)}catch(e){if("AbortError"===e.name)return;console.error("Erro na pesquisa:",e)}finally{$(!1),Q.current=null}},300),()=>{F.current&&clearTimeout(F.current)}}},[O,B]);let es=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e)return null;let a=t.trim();if(!a)return(0,s.jsx)("div",{className:"text-sm text-white/60",children:e});let r=RegExp("(".concat(er(a),")"),"ig"),i=e.split(r);return(0,s.jsx)("div",{className:"text-sm text-white/60",children:i.map((e,t)=>r.test(e)?(0,s.jsx)("mark",{className:"bg-yellow-300 text-black px-0.5 rounded",children:e},t):(0,s.jsx)("span",{children:e},t))})},er=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),ei=[{code:"pt",short:"PT",full:"Portugu\xeas"},{code:"en",short:"EN",full:"English"},{code:"es",short:"ES",full:"Espa\xf1ol"},{code:"fr",short:"FR",full:"Fran\xe7ais"}],en=ei.find(e=>e.code===S)||ei[0];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"fixed top-0 right-0 h-full w-[80%] sm:w-[60%] md:w-[400px] z-30 transition-transform duration-300 ease-in-out\n ".concat(g?"translate-x-0":"translate-x-full","\n bg-[#8B1A11] text-white flex flex-col"),children:[(0,s.jsxs)("div",{className:"px-6 sm:px-10 sm:pt-6 flex justify-between items-center",children:[(0,s.jsx)("button",{onClick:()=>y(!1),className:"text-white","aria-label":"Fechar",children:(0,s.jsx)(d.QCr,{size:26})}),(0,s.jsx)(l(),{href:"/",className:"pt-10 mb-10 sm:pt-6 transition-opacity duration-300 ".concat(Z?"o
1pacity-100":"opacity-0"),children:(0,s.jsx)(n(),{src:"/images/LOGO2-BRANCO.png",alt:"Pal\xe1cio dos Biscainhos Logo",width:250,height:80,className:"h-15 w-auto"})})]}),(0,s.jsx)("div",{className:"px-6 sm:px-10 mt-2 lg:hidden transition-opacity duration-300 ".concat(Z?"opacity-100":"opacity-0"),children:(0,s.jsxs)("div",{className:"flex justify-end items-center space-x-4",children:[(0,s.jsx)("a",{href:"https://www.facebook.com/museubiscainhos",target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80 border border-white p-1.5 sm:p-2","aria-label":"Facebook",children:(0,s.jsx)(d.ok6,{size:22})}),(0,s.jsx)("a",{href:"https://www.instagram.com/museudosbiscainhos/",target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80 border border-white p-1.5 sm:p-2","aria-label":"Instagram",children:(0,s.jsx)(d.ao$,{size:22})}),(0,s.jsx)("button",{onClick:()=>M(!0),className:"hover:opacity-80 border border-white p-1.5 sm:p-2","aria-label":"Pesquisar",children:(0,s.jsx)(d.KSO,{size:22})})]})}),(0,s.jsx)("div",{className:"flex-1 flex flex-col justify-center px-6 sm:px-10 space-y-6",children:(0,s.jsxs)("ul",{className:"mt-8 space-y-2 sm:space-y-4 text-2xl sm:text-2xl md:text-3xl tracking-wide text-start transition-opacity duration-200 ".concat(Z?"opacity-100":"opacity-0"),children:[[{href:"/museu",label:"Pal\xe1cio"},{href:"/jardim",label:"Jardins"},{href:"https://arquiva.patrimoniocultural.gov.pt/index.php/museu-dos-biscainhos-2 ",label:"Cole\xe7\xe3o",external:!0},{href:"/agenda",label:"Agenda"},{href:"/exposicoes",label:"Exposi\xe7\xf5es"},{href:"/mediacao",label:"Media\xe7\xe3o"},{href:"/repositorio",label:"Reposit\xf3rio"},{href:"https://bibliotecas.museusemonumentos.pt/Opac/Pages/Help/Start.aspx",label:"Biblioteca",external:!0},{href:"/visitar",label:"Visitar"},{href:"https://visitasvirtuais.patrimoniocultural.gov.pt/MBIS/",label:"Visita Virtual",external:!0},{href:"/sobre-nos",label:"Sobre N\xf3s"}].map(e=>(0,s.jsx)("li",{className:"relative group",children:e.external?(0,s.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center hover:text-gray-300 relative",children:(0,s.jsxs)("span",{className:"relative inline-block",children:[e.label,(0,s.jsx)("span",{className:"absolute left-0 -bottom-1 h-[2px] bg-white scale-x-0 group-hover:scale-x-100 origin-left transition-transform duration-300 w-full"})]})}):(0,s.jsx)(l(),{href:e.href,className:"flex items-center hover:text-gray-300 relative",children:(0,s.jsxs)("span",{className:"relative inline-block",children:[e.label,(0,s.jsx)("span",{className:"absolute left-0 -bottom-1 h-[2px] bg-white scale-x-0 group-hover:scale-x-100 origin-left transition-transform duration-300 w-full"})]})})},e.href)),(0,s.jsx)("li",{className:"lg:hidden mt-2",children:(0,s.jsxs)(w.A,{as:"a",href:"https://mmp.bymeoblueticket.pt/Evento?IdEvento=14754&Name=MUSEU-DOS-BISCAINHOS",target:"_blank",rel:"noopener noreferrer",onClick:()=>y(!1),variant:"brand",arrow:!1,className:"px-2 py-1.5 !text-sm tracking-wide sm:px-4 sm:py-2 sm:!text-base",children:[(0,s.jsx)("span",{children:"Bilhetes"}),(0,s.jsx)(u.hgX,{size:16})]})})]})}),(0,s.jsx)("div",{className:"px-6 sm:px-10 pb-6 text-xl flex justify-end space-x-4 transition-opacity duration-300 ".concat(Z?"opacity-100":"opacity-0"),children:(0,s.jsx)(l(),{href:"/",className:"hover:text-gray-300",children:"Museus e Monumentos de Portugal"})})]}),g&&(0,s.jsx)("div",{className:"fixed inset-0 z-20 bg-black/40",onClick:()=>y(!1)}),B&&(0,s.jsxs)("div",{className:"fixed inset-0 z-40 bg-black/80 flex flex-col items-center justify-start pt-32 px-4",children:[(0,s.jsx)("button",{className:"absolute top-6 right-6 text-white text-2xl",onClick:()=>{M(!1),_(""),z([])},"aria-label":"Fechar pesquisa",children:(0,s.jsx)(d.QCr,{size:26})}),(0,s.jsxs)("div",{className:"w-full max-w-3xl",children:[(0,s.jsx)("input",{type:"text",placeholder:"Pesquisar conte\xfado...",value:O,onChange:e=>_(e.target.value),className:"w-full px-4 py-3 rounded-lg text-white text-lg",autoFocus:!0}),(0,s.jsxs)("div",{className:"mt-4 bg-white/5 rounded-lg max-h-[60vh] overflow-y-auto p-2",children:[I&&(0,s.jsx)("div",{className:"p-4 text-gray-300",children:"A pesquisar..."}),!I&&0===U.length&&O.length>=2&&(0,s.jsx)("div",{className:"p-4 text-gray-400",children:"Nenhum resultado encontrado."}),!I&&0===U.length&&O.length<2&&(0,s.jsx)("div",{className:"p-4 text-gray-400",children:"Escreve pelo menos 2 caracteres para pesquisar."}),(0,s.jsx)("ul",{children:!I&&U.map((e,t)=>{var a,r,i,n;let o=Y(e.type,e.raw||{id:e.id}),l=(null==(a=e.raw)?void 0:a.anchor)||"",c=l?"".concat(o,"#").concat(l):o,d=e.title;if(("Agenda"===e.type||"Exposi\xe7\xf5es"===e.type)&&e.raw){let t=e.raw||{};d=t.Titulo||t.titulo||t.title||d}return(0,s.jsx)("li",{className:"border-b border-white/10",children:(0,s.jsxs)("a",{href:c,onClick:t=>((e,t)=>{var a,s;let r=Y(t.type,t.raw||{id:t.id}),i=(null==(a=t.raw)?void 0:a.anchor)||(null==(s=t.raw)?void 0:s.slugAnchor)||"",n=i?"".concat(r,"#").concat(i):r;try{let t=new URL(n,window.location.origin).pathname.replace(/\/+$/,""),a=window.location.pathname.replace(/\/+$/,"");if(i&&t===a){e.preventDefault(),M(!1),_(""),z([]),setTimeout(()=>{let e=document.getElementById(i)||document.querySelector('[name="'.concat(i,'"]'));if(e){e.scrollIntoView({behavior:"smooth",block:"start"});try{e&&"function"==typeof e.focus&&e.focus()}catch(e){}}else window.location.hash=i},120);return}e.preventDefault(),M(!1),_(""),z([]),x.push(n),i&&setTimeout(()=>{let e=document.getElementById(i)||document.querySelector('[name="'.concat(i,'"]'));e&&e.scrollIntoView({behavior:"smooth",block:"start"})},500)}catch(e){M(!1),_(""),z([]),window.location.href=n}})(t,e),className:"block px-4 py-3 hover:bg-white/5",children:[(0,s.jsx)("div",{className:"text-sm text-white/70",children:e.type}),(0,s.jsx)("div",{className:"text-lg font-medium text-white",children:d}),e.snippet?es(e.snippet,O):(null==(r=e.raw)?void 0:r.snippet)?es(e.raw.snippet,O):null,"P\xe1gina"===e.type&&(null==(i=e.raw)?void 0:i.anchor)&&(0,s.jsxs)("div",{className:"text-xs text-white/40 mt-1",children:["Sec\xe7\xe3o: ",e.raw.anchor]})]})},"".concat(e.type,"-").concat(e.id||(null==(n=e.raw)?void 0:n.key)||t))})})]})]})]}),(0,s.jsx)("div",{className:"transition-transform duration-300 ".concat(g?"translate-x-[-79%] md:translate-x-[-400px]":"translate-x-0"),children:(0,s.jsxs)("section",{className:"relative w-full h-screen overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute inset-0 z-0",children:Array.isArray(i)&&i.length>0?i.map((e,t)=>(0,s.jsx)("div",{className:"absolute inset-0 bg-cover bg-top transition-opacity duration-700 ease-in-out\n ".concat(t===j?"opacity-100 z-10":"opacity-0 z-0"),style:{backgroundImage:"url('".concat(e,"')")}},t)):(0,s.jsx)("div",{className:"absolute inset-0 bg-gray-800"})}),(0,s.jsx)("div",{className:"absolute inset-0 z-10 pointer-events-none",children:(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-black/70 via-black/5 to-transparent"})}),i.length>1&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{onClick:()=>{i.length&&N(e=>0===e?i.length-1:e-1)},"aria-label":"Anterior",className:"absolute left-4 top-1/2 -translate-y-1/2 z-20 group border border-white px-3 py-3 overflow-hidden",children:[(0,s.jsx)("span",{className:"absolute inset-0 bg-white scale-x-0 group-hover:scale-x-100 origin-left transition-transform duration-500 ease-out"}),(0,s.jsx)("span",{className:"relative z-10 text-white group-hover:text-black transition-colors duration-300",children:(0,s.jsx)(d._Jj,{size:20})})]}),(0,s.jsxs)("button",{onClick:()=>{i.length&&N(e=>e===i.length-1?0:e+1)},"aria-label":"Seguinte",className:"absolute right-4 top-1/2 -translate-y-1/2 z-20 group border border-white px-3 py-3 overflow-hidden",children:[(0,s.jsx)("span",{className:"absolute inset-0 bg-white scale-x-0 group-hover:scale-x-100 origin-left transition-transform duration-500 ease-out"}),(0,s.jsx)("span",{className:"relative z-10 text-white group-hover:text-black transition-colors duration-300",children:(0,s.jsx)(d.X6T,{size:20})})]})]}),(0,s.jsxs)("section",{className:"relative h-screen overflow-hidden flex items-end justify-start text-white bg-cover bg-top object-cover ".concat(p),children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-black/70 via-black/5 to-transparent z-0"}),(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/5 to-transparent z-0"}),T&&(0,s.jsx)("div",{className:"relative z-10 w-full pb-20 pr-2 sm:pr-20 flex flex-col items-start sm:flex-row sm:items-end sm:justify-start",children:(0,s.jsx)("h1",{className:"text-4xl sm:text-7xl font-light leading-none",children:T})})]}),(0,s.jsx)("nav",{className:"absolute top-0 left-0 right-0 z-20 px-2 sm:px-20 pt-6 sm:pt-12",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(l(),{href:"/",className:"flex items-center",children:(0,s.jsx)(n(),{src:"/images/LOGO2-BRANCO.png",alt:"Pal\xe1cio dos Biscainhos Logo",width:500,height:160,className:"h-12 sm:h-16 lg:h-30 w-auto"})}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-3 sm:gap-5 text-white",children:[(0,s.jsxs)(w.A,{as:l(),href:"https://mmp.bymeoblueticket.pt/pt/event/14754/museu-dos-biscainhos",target:"_blank",rel:"noopener noreferrer",variant:"light",arrow:!1,className:"px-2 py-1.5 !text-sm tracking-wide sm:px-4 sm:py-2 sm:!text-base",children:[(0,s.jsx)("span",{className:"hidden sm:inline",children:"Bilhetes"}),(0,s.jsx)("span",{children:(0,s.jsx)(u.hgX,{size:16})})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("a",{href:"https://www.facebook.com/museubiscainhos",target:"_blank",rel:"noopener noreferrer",className:"hidden lg:block hover:opacity-70 border border-white p-2",children:(0,s.jsx)(d.ok6,{size:26})}),(0,s.jsx)("a",{href:"https://www.instagram.com/museudosbiscainhos/",target:"_blank",rel:"noopener noreferrer",className:"hidden lg:block hover:opacity-70 border border-white p-2",children:(0,s.jsx)(d.ao$,{size:26})})]}),(0,s.jsxs)("div",{className:"relative inline-block",ref:E,children:[(0,s.jsxs)("button",{onClick:()=>A(e=>!e),className:"inline-flex w-14 sm:w-44 items-center justify-between gap-2 border border-white px-2 sm:px-4 py-1.5 sm:py-2 text-sm sm:text-base tracking-wide text-white hover:bg-white/10 transition font-medium","aria-label":"Selecionar idioma",children:[(0,s.jsx)("span",{className:"sm:hidden",children:en.short}),(0,s.jsx)("span",{className:"hidden sm:inline",children:en.full}),(0,s.jsx)("svg",{className:"h-4 w-4 transition-transform ".concat(k?"rotate-180":""),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M5.23 7.21a.75.75 0 0 1 1.06.02L10 10.94l3.71-3.71a.75.75 0 1 1 1.06 1.06l-4.24 4.25a.75.75 0 0 1-1.06 0L5.21 8.29a.75.75 0 0 1 .02-1.08z"})})]}
1),k&&(0,s.jsx)("div",{className:"absolute right-0 mt-2 w-14 sm:w-44 border border-white bg-black/40 backdrop-blur-sm text-white font-medium",children:ei.map(e=>(0,s.jsxs)("button",{onClick:()=>{P(e.code),A(!1),function(e){e=String(e).toLowerCase();let t=document.querySelector("select.goog-te-combo");if(t){t.value=e,t.dispatchEvent(new Event("change",{bubbles:!0}));return}try{let t="/".concat("pt","/").concat(e);document.cookie="googtrans=".concat(t,";path=/");try{let e=window.location.hostname;document.cookie="googtrans=".concat(t,";path=/;domain=").concat(e)}catch(e){}setTimeout(()=>{location.reload()},300)}catch(e){console.warn("N\xe3o foi poss\xedvel for\xe7ar a tradu\xe7\xe3o:",e)}}(e.code)},className:"w-full px-4 py-2 text-left hover:bg-white/10 transition border-t border-white/40 first:border-t-0",children:[(0,s.jsx)("span",{className:"sm:hidden uppercase",children:e.short}),(0,s.jsx)("span",{className:"hidden sm:inline",children:e.full})]},e.code))})]}),(0,s.jsx)("div",{id:"google_translate_element",className:"hidden"}),(0,s.jsx)("button",{onClick:()=>M(!0),className:"hidden lg:block hover:text-gray-300 border border-white p-1.5 sm:p-2","aria-label":"Pesquisar",children:(0,s.jsx)(d.KSO,{size:26})}),(0,s.jsx)("button",{className:"text-white p-1",onClick:()=>y(!0),"aria-label":"Abrir menu",children:(0,s.jsx)(d.OXb,{className:"text-2xl sm:text-3xl md:text-4xl"})})]})]})}),(0,s.jsx)("div",{className:"absolute top-28 right-12 z-20 hidden justify-end sm:top-40 sm:right-20 sm:flex",children:(0,s.jsx)(f,{selectedLang:S})}),h&&(0,s.jsx)(b,{label:L,rows:R,href:m,className:"absolute bottom-10 right-6 z-20 sm:bottom-16 sm:right-20"})]})})]})}},4048:(e,t,a)=>{a.d(t,{A:()=>n});var s=a(7876),r=a(294);let i={light:"border-white/50 text-white hover:border-[#8B1A11] hover:bg-[#8B1A11] group-hover:border-[#8B1A11] group-hover:bg-[#8B1A11]",dark:"border-[#8B1A11] text-[#8B1A11] hover:bg-[#8B1A11] hover:text-white group-hover:bg-[#8B1A11] group-hover:text-white",brand:"border-white/70 text-white hover:bg-white hover:text-[#8B1A11]"};function n(e){let{as:t="span",children:a,className:n="",variant:o="light",arrow:l=!0,...c}=e,d=i[o]||i.light;return(0,s.jsxs)(t,{className:["inline-flex items-center justify-center gap-2 border px-4 py-2 text-[12px] font-semibold uppercase tracking-[0.2em] transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-[#8B1A11]/40 disabled:cursor-not-allowed disabled:opacity-60 sm:px-5 sm:text-lg",d,n].join(" "),...c,children:[a,l&&(0,s.jsx)(r.dyV,{"aria-hidden":"true",className:"h-3 w-3 sm:h-4 sm:w-4"})]})}},4985:(e,t,a)=>{a.d(t,{A:()=>f});var s=a(7876),r=a(4232),i=a(9038),n=a(8230),o=a.n(n),l=a(4048);let c=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,d="https://api.palaciodosbiscainhos.pt",u="https://api.palaciodosbiscainhos.pt",p=u.includes("apibiscainhos.museusemonumentostestes5.eu")?d:u||d,h={logoMuseu:{src:"/images/LOGO2-BRANCO.png",alt:"Pal\xe1cio dos Biscainhos"},address:{lines:["Rua dos Biscainhos","4700 - 415 Braga"],href:"/visitar#location"},partnerLogos:[{src:"/images/MMP_LOGO.png",alt:"Museus e Monumentos de Portugal",href:"https://www.museusemonumentos.pt/pt"},{src:"/images/Digital_1C_V_CJD_Neg.png",alt:"Rep\xfablica Portuguesa",href:"https://www.portugal.gov.pt/pt/gc25/area-de-governo/cultura-juventude-e-desporto"}],contactsTitle:"Contactos",phone:"+351 253 204 650",emails:["[email protected]","[email protected]","[email protected]"],facebookUrl:"https://www.facebook.com/museubiscainhos",instagramUrl:"https://www.instagram.com/museudosbiscainhos/",accessTitle:"Acessos",accessLinks:[{text:"Ced\xeancia de Espa\xe7os",href:"https://www.museusemonumentos.pt/pt/pagina/cedencia-de-espacos",newTab:!0},{text:"Pol\xedtica de Privacidade",href:"https://www.museusemonumentos.pt/pt/pagina/politica-de-privacidade",newTab:!0}],newsletter:{title:"Assine a nossa newsletter!",placeholder:"Digite o seu e-mail",consent:"Autorizo o envio de comunica\xe7\xf5es por email pelo Pal\xe1cio dos Biscainhos.",submit:"Subscrever",submitting:"A enviar...",success:"Subscri\xe7\xe3o efetuada com sucesso."},descriptionTitle:"Pal\xe1cio dos Biscainhos",descriptionText:"",copyright:"\xa9Museus e Monumentos de Portugal"};function m(e,t){return"string"==typeof e&&e.trim()?e.trim():t}function x(e,t){var a,s;let r=(null==e?void 0:e.url)||(null==e||null==(s=e.data)||null==(a=s.attributes)?void 0:a.url);return r?r.startsWith("http")?r:p?"".concat(p).concat(r):r:t}function g(e){let{href:t,newTab:a=!1,className:r,children:i,ariaLabel:n}=e;if(!t)return(0,s.jsx)(s.Fragment,{children:i});let l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return/^(https?:)?\/\//.test(e)||e.startsWith("mailto:")||e.startsWith("tel:")}(t);return l||a?(0,s.jsx)("a",{href:t,className:r,target:a||l?"_blank":void 0,rel:a||l?"noopener noreferrer":void 0,"aria-label":n,children:i}):(0,s.jsx)(o(),{href:t,className:r,"aria-label":n,children:i})}function f(){let[e,t]=(0,r.useState)(h),[a,n]=(0,r.useState)(""),[d,u]=(0,r.useState)(!1),[f,b]=(0,r.useState)(null),[w,v]=(0,r.useState)(!1);(0,r.useEffect)(()=>
1{if(!p)return;let e=!1;return async function(){try{let a=await fetch("".concat(p,"/api/rodape-site?populate=*"));if(!a.ok)return;let s=await a.json();!e&&(null==s?void 0:s.data)&&t(function(e){var t;let a=(null==e?void 0:e.attributes)||e||{},s=(Array.isArray(t=a.Acessos)?t:Array.isArray(null==t?void 0:t.data)?t.data.map(e=>(null==e?void 0:e.attributes)||e).filter(Boolean):[]).map(e=>({text:m(e.Texto,""),href:m(e.Url,""),newTab:!1!==e.AbrirNovaAba})).filter(e=>e.text&&e.href);return{logoMuseu:{src:x(a.LogoMuseu,h.logoMuseu.src),alt:h.logoMuseu.alt},address:{lines:[m(a.MoradaLinha1,h.address.lines[0]),m(a.MoradaLinha2,h.address.lines[1])].filter(Boolean),href:m(a.MoradaUrl,h.address.href)},partnerLogos:[{src:x(a.LogoMMP,h.partnerLogos[0].src),alt:h.partnerLogos[0].alt,href:m(a.LogoMMPUrl,h.partnerLogos[0].href)},{src:x(a.LogoGoverno,h.partnerLogos[1].src),alt:h.partnerLogos[1].alt,href:m(a.LogoGovernoUrl,h.partnerLogos[1].href)}],contactsTitle:m(a.ContactosTitulo,h.contactsTitle),phone:h.phone,emails:h.emails,facebookUrl:m(a.FacebookUrl,h.facebookUrl),instagramUrl:m(a.InstagramUrl,h.instagramUrl),accessTitle:m(a.AcessosTitulo,h.accessTitle),accessLinks:s.length?s:h.accessLinks,newsletter:{title:m(a.NewsletterTitulo,h.newsletter.title),placeholder:m(a.NewsletterPlaceholder,h.newsletter.placeholder),consent:m(a.NewsletterConsentimento,h.newsletter.consent),submit:m(a.NewsletterBotao,h.newsletter.submit),submitting:m(a.NewsletterBotaoAEnviar,h.newsletter.submitting),success:m(a.NewsletterMensagemSucesso,h.newsletter.success)},descriptionTitle:m(a.DescricaoTitulo,h.descriptionTitle),descriptionText:function e(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof t)return t.replace(/<br\s*\/?>/gi,"\n").replace(/<\/(p|div|li|h[1-6])>/gi,"\n").replace(/<[^>]+>/g,"").replace(/\u00a0/g," ").trim()||a;if(Array.isArray(t))return t.map(t=>e(t,"")).filter(Boolean).join("\n\n")||a;if(t&&"object"==typeof t){var s;if("string"==typeof t.text)return e(t.text,a);if(Array.isArray(t.children))return e(t.children,a);if(Array.isArray(t.blocks))return e(t.blocks,a);if("string"==typeof(null==(s=t.data)?void 0:s.text))return e(t.data.text,a)}return a}(a.DescricaoTexto,h.descriptionText),copyright:m(a.Copyright,h.copyright)}}(s.data))}catch(e){}}(),()=>{e=!0}},[]);let y=async t=>{t.preventDefault();let s=a.trim();if(!c.test(s))return void b({type:"error",message:"Insira um email v\xe1lido."});if(!d)return void b({type:"error",message:"Confirme o consentimento para subscrever."});v(!0),b({type:"loading",message:"A enviar..."});try{let t=await fetch("/api/closumNewsletter",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:s,consent:d})}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||"N\xe3o foi poss\xedvel concluir a subscri\xe7\xe3o.");n(""),u(!1),b({type:"success",message:a.message||e.newsletter.success})}catch(e){b({type:"error",message:e.message||"N\xe3o foi poss\xedvel concluir a subscri\xe7\xe3o. Tente novamente."})}finally{v(!1)}};return(0,s.jsx)("footer",{className:"bg-[#8B1A11] text-white py-12",children:(0,s.jsxs)("div",{className:"container max-w-screen px-5 ",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8 border-b border-white pb-8",children:[(0,s.jsxs)("div",{className:"md:border-r border-white pr-8",children:[(0,s.jsx)(o(),{href:"/",children:(0,s.jsx)("img",{src:e.logoMuseu.src,alt:e.logoMuseu.alt,className:"h-25 mb-4 -ml-3"})}),(0,s.jsx)(g,{href:e.address.href,children:(0,s.jsx)("p",{className:"text-sm font-light mb-4 ",children:e.address.lines.map(e=>(0,s.jsxs)("span",{children:[e,(0,s.jsx)("br",{})]},e))})}),(0,s.jsx)("div",{className:"flex space-x-12",children:e.partnerLogos.map(e=>(0,s.jsx)(g,{href:e.href,newTab:!0,children:(0,s.jsx)("img",{src:e.src,alt:e.alt,className:"h-12 hover:cursor-pointer"})},e.alt))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-xl mb-4",children:e.contactsTitle}),e.phone&&(0,s.jsx)("p",{className:"text-sm font-light mb-2",children:e.phone}),(0,s.jsx)("div",{className:"mb-4 flex flex-col gap-2",children:e.emails.map(e=>(0,s.jsx)("p",{className:"text-sm font-light",children:e},e))}),(0,s.jsxs)("div",{className:"flex space-x-4",children:[e.facebookUrl&&(0,s.jsx)("a",{href:e.facebookUrl,"aria-label":"Facebook",className:"border border-white p-1.5
1sm:p-2",children:(0,s.jsx)(i.ok6,{})}),e.instagramUrl&&(0,s.jsx)("a",{href:e.instagramUrl,"aria-label":"Instagram",className:"border border-white p-1.5 sm:p-2",children:(0,s.jsx)(i.ao$,{})})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-xl mb-4",children:e.accessTitle}),(0,s.jsx)("div",{className:"space-y-2",children:e.accessLinks.map(e=>(0,s.jsx)(g,{href:e.href,newTab:e.newTab,className:"text-sm font-light",children:(0,s.jsx)("p",{className:"text-white mb-2",children:e.text})},"".concat(e.text,"-").concat(e.href)))}),(0,s.jsxs)("form",{className:"mt-6",onSubmit:y,noValidate:!0,children:[(0,s.jsx)("h4",{className:"text-sm font-light mb-2",children:e.newsletter.title}),(0,s.jsx)("label",{className:"sr-only",htmlFor:"footer-newsletter-email",children:"Email"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)("input",{id:"footer-newsletter-email",type:"email",value:a,onChange:e=>{n(e.target.value),(null==f?void 0:f.type)==="error"&&b(null)},placeholder:e.newsletter.placeholder,className:"min-w-0 flex-1 bg-white px-4 py-2 text-sm text-black placeholder:text-gray-500 outline-none ring-1 ring-transparent focus:ring-white",autoComplete:"email",disabled:w}),(0,s.jsx)(l.A,{as:"button",type:"submit",variant:"brand",className:"px-4 py-2 !text-sm sm:!text-sm",disabled:w,children:w?e.newsletter.submitting:e.newsletter.submit})]}),(0,s.jsxs)("label",{className:"mt-3 flex items-start gap-2 text-xs font-light leading-snug",children:[(0,s.jsx)("input",{type:"checkbox",checked:d,onChange:e=>{u(e.target.checked),(null==f?void 0:f.type)==="error"&&b(null)},className:"mt-0.5 h-4 w-4 shrink-0 accent-white",disabled:w,required:!0}),(0,s.jsx)("span",{children:e.newsletter.consent})]}),f&&(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("success"===f.type?"text-green-200":"loading"===f.type?"text-white":"text-red-200"),role:"error"===f.type?"alert":"status",children:f.message})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-xl mb-4",children:e.descriptionTitle}),(0,s.jsx)("p",{className:"text-sm font-light whitespace-pre-line",children:e.descriptionText})]})]}),(0,s.jsx)("div",{className:"flex justify-between items-center py-4 text-sm font-light",children:(0,s.jsx)("p",{children:e.copyright})})]})})}}}]);
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.