1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2255046,e=>{"use strict";var r=e.i(7843476),t=e.i(262501),a=e.i(2217255),s=e.i(5271645),i=e.i(51169),o=e.i(802625),n=e.i(9387649),l=e.i(7387515),c=e.i(6948148),d=e.i(9436849),u=e.i(118581),m=e.i(5319662),f=e.i(2320447),p=e.i(5112449),h=e.i(7390150),x=e.i(2062402),g=e.i(4043096),j=e.i(653145),v=e.i(1385564);let y=()=>{let{data:e}=(0,a.useSession)(),t=(0,c.useTranslations)(),o=e?.isNewUser??!1,{actions:{setMobileNumber:l,setAuthState:y}}=(0,s.useContext)(i.authFormContext),[b,{loading:N}]=(0,d.useUpdateMobileAndEmailWithVerificationMutation)(),w=(0,j.useForm)({defaultValues:{prefix:v.defaultPrefixPhone}}),{register:C,control:S,formState:{errors:k},getValues:P,setError:E,handleSubmit:A}=w,I=async({phone:e,prefix:r})=>{try{if(!e||!r)throw Error("Prefix and phone are required");await b({variables:{input:{checkTourist:o,channel:"WHATSAPP",phone:e.trim(),phonePrefix:r}}}),l({phone:e,prefix:r}),y(n.AuthFormView.MOBILE_VERIFICATION)}catch(e){E("phone",{type:"validate",message:t("inputs.errors.addMobilePhone")})}};return(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("p",{className:(0,h.headingStyles)({variant:"title2"}),children:t("common.addMobilePhone.title")}),(0,r.jsx)("p",{className:"text-typo-secondary",children:t("common.addMobilePhone.description")})]}),(0,r.jsx)(j.FormProvider,{...w,children:(0,r.jsx)(f.FormControl,{className:"flex-1",error:k.phone?.message,children:(0,r.jsxs)("form",{className:"flex gap-2",onSubmit:A(I),children:[(0,r.jsx)(j.Controller,{control:S,name:"prefix",render:({field:{onChange:e,value:t}})=>(0,r.jsx)(u.default,{value:t,onValueChange:e,selectProps:{error:k.phone?.message,className:"w-32"}})}),(0,r.jsx)(p.TextField,{startEnhancer:()=>(0,r.jsx)(x.MobilePhone,{}),error:k.phone?.message,...C("phone",{required:{value:!0,message:t("inputs.errors.required")},validate:{isValidPhoneNumber:()=>(0,g.default)(`${P("prefix")}${P("phone")}`)?.isValid()||t("inputs.errors.invalidMobileNumber")}}),label:t("common.phone")})]})})}),(0,r.jsx)(m.Button,{variant:"primary",onClick:A(I),loading:N,children:t("actions.save")})]})};var b=e.i(2162711);let N=()=>{let e=(0,c.useTranslations)(),{values:{authState:t}}=(0,s.useContext)(i.authFormContext),{update:o}=(0,a.useSession)();return(0,r.jsxs)("div",{children:[t===n.AuthFormView.ADD_PHONE&&(0,r.jsx)(y,{}),t===n.AuthFormView.MOBILE_VERIFICATION&&(0,r.jsx)(b.default,{onVerificationSuccess:()=>{o(),(0,l.default)({message:e("common.verifiedMobile"),status:"success"})}})]})};e.s(["default",0,()=>{let{data:e,status:l}=(0,a.useSession)(),{logout:c}=(0,o.default)(),d=e?.profile?.phoneValidated??!0,u=e?.profile?.phone!==null||e?.profile?.phonePrefix!==null,[m,f]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{f(!d)},[d]),"unauthenticated"===l||d)?null:(0,r.jsx)(i.default,{formView:u?n.AuthFormView.MOBILE_VERIFICATION:n.AuthFormView.ADD_PHONE,phone:e?.profile?.phone,prefix:e?.profile?.phonePrefix,children:(0,r.jsx)(t.Dialog,{open:m,onOpenChange:e=>{e||c(),f(e)},children:(0,r.jsx)(t.Dialog.Content,{children:(0,r.jsx)(t.Dialog.Body,{children:(0,r.jsx)(N,{})})})})})}],2255046)},851894,e=>{"use strict";var r=e.i(7843476),t=e.i(4774356),a=e.i(1096259),s=e.i(3249023),i=e.i(5319662),o=e.i(8847440),n=e.i(6
1534971),l=e.i(7390150),c=e.i(2062402),d=e.i(2217255),u=e.i(6948148),m=e.i(802625);e.s(["default",0,()=>{let e=(0,d.useSession)(),{logout:f}=(0,m.default)(),p=(0,u.useTranslations)(),{data:h}=e;return e?.data?.user?(0,r.jsxs)(o.Popover,{children:[(0,r.jsx)(o.Popover.Trigger,{children:(0,r.jsx)(s.default,{})}),(0,r.jsxs)(o.Popover.Content,{className:"flex w-fit flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{title:`${h?.profile?.firstName} ${h?.profile?.lastName}`,className:"line-clamp-1 text-lg",children:[h?.profile?.firstName," ",h?.profile?.lastName]}),(0,r.jsx)("span",{className:"text-sm text-typo-secondary",children:h?.user?.email})]}),(0,r.jsx)(t.default,{})]}),(0,r.jsx)(n.Separator,{}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 [&>a]:justify-between",children:[(0,r.jsxs)(a.NavLink,{variant:"outline",href:"/profile/bookings",children:[p("profileConfiguration.sections.bookings.title"),(0,r.jsx)(c.CalendarToday,{})]}),(0,r.jsxs)(a.NavLink,{variant:"outline",href:"/profile/esims",children:[p("profileConfiguration.sections.esims.title"),(0,r.jsx)(c.Esim,{})]}),(0,r.jsxs)(a.NavLink,{variant:"outline",href:"/profile/settings",children:[p("common.accountSettings"),(0,r.jsx)(c.Gear,{})]})]}),(0,r.jsxs)(i.Button,{variant:"secondary",className:"justify-between",onClick:()=>f(),children:[p("actions.logout"),(0,r.jsx)(c.Logout,{})]})]})]}):(0,r.jsx)(a.NavLink,{variant:"primary",href:"/login",children:(0,r.jsx)("span",{className:(0,l.textStyles)({weight:"medium",className:"text-white"}),children:p("actions.login")})})}])},4774356,e=>{"use strict";var r=e.i(7843476),t=e.i(9436849),a=e.i(5319662),s=e.i(262501),i=e.i(5271645),o=e.i(261881);let n=(0,i.forwardRef)((e,t)=>{let{id:a,inputClassName:s,children:i,className:n,...l}=e;return(0,r.jsxs)("label",{htmlFor:a,className:(0,o.cn)("relative cursor-pointer",n),children:[i,(0,r.jsx)("input",{type:"file",id:a,ref:t,className:(0,o.cn)("absolute sr-only p-0 -m-1 overflow-hidden whitespace-nowrap border-0",s),...l})]})});n.displayName="FileInputArea";var l=e.i(1591841),c=e.i(2062402),d=e.i(2217255),u=e.i(6948148),m=e.i(8128769);let f=["image/png","image/jpeg","image/jpg"];e.s(["default",0,({className:e})=>{let{data:o,update:p}=(0,d.useSession)(),h=(0,u.useTranslations)(),[x,g]=(0,i.useState)(!1),[j,v]=(0,i.useState)(null);(0,i.useEffect)(()=>{v(o?.profile?.image?.mediaLink??null)},[o?.profile?.image?.mediaLink]);let y=o?.profile?.image?.mediaLink??null,[b]=(0,t.useModifyUserMutation)(),[N]=(0,t.useDeleteUserProfileImageMutation)(),w=async e=>{await b({variables:{input:{id:o?.profile?.id,image:e}}});let r=new FileReader;r.onload=()=>{let e=r.result;v(e?.toString()??null)},e&&r.readAsDataURL(e)},C=async()=>{await N({variables:{userID:o?.profile?.id}}),v(null)};return(0,r.jsxs)(s.Dialog,{open:x,onOpenChange:e=>{g(e),e||j===y||p()},children:[(0,r.jsxs)("div",{className:(0,m.twMerge)("relative aspect-square size-20 overflow-hidden",e),children:[j&&(0,r.jsx)("img",{loading:"lazy",alt:o?.profile?.firstName,className:"aspect-square size-full rounded-full object-cover",src:j}),(0,r.jsx)(s.Dialog.Trigger,{asChild:!0,children:(0,r.jsx)(a.Button,{size:"iconSm",rounding:"full",variant:"secondary",className:"absolute bottom-0 right-1 z-10","aria-label":h(j?"actions.editProfileImage":"actions.addProfileImage"),title:h(j?"actions.editProfileImage":"actions.addProfileImage"),children:(0,r.jsx)(c.Pencil,{})})}),!j&&(0,r.jsx)("div",{className:"bg-dalai-brand-500 absolute inset-0 flex select-none items-center justify-center rounded-full text-white",children:(0,r.jsx)("span",{className:"text-3xl font-bold",children:o?.profile?.firstName?.charAt(0)})})]}),(0,r.jsxs)(s.Dialog.Content,{children:[(0,r.jsx)(s.Dialog.Header,{children:(0,r.jsx)(s.Dialog.Title,{children:h(j?"actions.editProfileImage":"actions.addProfileImage")})}),(0,r.jsx)(s.Dialog.Body,{children:(0,r.jsxs)("div",{className:"relative block w-fit self-center overflow-hidden",children:[j&&(0,r.jsx)("img",{height:288,width:288,className:"aspect-square rounded-full object-cover",src:j}),j&&(0,r.jsxs)("div",{title:h("actions.editProfileImage"),className:"group absolute inset-0 aspect-square h-72 w-72 cursor-pointer overflow-hidden rounded-full",children:[(0,r.jsx)(n,{accept:f.join(","),"aria-label":h("actions.editProfileImage"),title:h("actions.editProfileImage"),onChange:e=>{let[r]=e.target.files;r&&w(r)},className:"absolute inset-0 h-full w-full"}),(0,r.jsxs)("div",{className:"absolute inset-x-0 bottom-0 flex h-20 translate-y-0 items-center justify-center gap-2 px-20 transition-transform duration-300 ease-in-out group-hover:translate-y-0 md:translate-y-full",children:[(0,r.jsx)(a.Button,{variant:"outline","aria-label":h("actions.deleteProfileImage"),title:h("actions.deleteProfileImage"),onClick:()=>{C()},children:(0,r.jsx)(c.Trash,{})}),(0,r.jsx)(n,{accept:f.join(","),title:h("actions.editProfileImage"),"aria-label":h("actions.editProfileImage"),onChange:e=>{let[r]=e.target.files;r&&w(r)},className:l.theme.button({variant:"outline"}),children:(0,r.jsx)(c.Pencil,{})})]})]}),!j&&(0,r.jsxs)("div",{className:"bg-dalai-brand-500 relative flex aspect-square h-72 w-72 items-center justify-center rounded-full text-white",children:[(0,r.jsx)(n,{accept:f.join(","),"aria-label":h("actions.addProfileImage"),title:h("actions.addProfileImage"),className:"absolute inset-0 rounded-full",onCh
1ange:e=>{let[r]=e.target.files;r&&w(r)}}),(0,r.jsx)("span",{className:"text-7xl font-bold capitalize",children:o?.profile?.firstName?.charAt(0)})]})]})}),!j&&(0,r.jsx)(s.Dialog.Footer,{children:(0,r.jsxs)(n,{accept:f.join(","),className:l.theme.button({variant:"outline",className:"w-full"}),children:[(0,r.jsx)(c.Image,{}),h("actions.addProfileImage")]})})]})]})}],4774356)},1601454,e=>{"use strict";var r=e.i(7843476),t=e.i(2997116);let a="/assets/logos/andorra",s=[{pathnames:["/login","/terms-and-conditions","/privacy-policy","/cookies-policy","/profile/settings","/profile/bookings","/profile/bookings/[orderId]","/profile/bookings/stay/[orderId]","/profile","/profile/esims/[esimId]","/profile/esims","/move/go"],logo:"Logo-Andorracom-03.svg"},{pathnames:["/"],logo:"Logo-Andorracom-04.svg"}];e.s(["default",0,({className:e})=>{let i,o=(0,t.usePathname)();return(0,r.jsx)(t.Link,{href:"/",className:e,children:(0,r.jsx)("img",{src:(i=s.find(({pathnames:e})=>e.includes(o)))?`${a}/${i.logo}`:`${a}/Logo-Andorracom-05.svg`,alt:"Andorra logo",className:"h-8 w-auto object-contain",width:100,height:28})})}],1601454)},6210872,e=>{"use strict";var r=e.i(7843476),t=e.i(5861745),a=e.i(6948148),s=e.i(2997116),i=e.i(5618566),o=e.i(5271645),n=e.i(9903214),l=e.i(7634915),c=e.i(7423242),d=e.i(7739701),u=e.i(2062402),m=e.i(8128769),f=e.i(4971019);let p=[{value:"es",label:"Español",flag:(0,r.jsx)(u.FlagEs,{})},{value:"ca",label:"Català ",flag:(0,r.jsx)(u.FlagAd,{})},{value:"en",label:"English",flag:(0,r.jsx)(u.FlagGb,{})},{value:"fr",label:"Français",flag:(0,r.jsx)(u.FlagFr,{})}];e.s(["default",0,({variant:e="DEFAULT",className:u})=>{let h=(0,a.useTranslations)(),x=(0,t.useLocale)(),{switchLocale:g}=function(){let e=(0,s.useRouter)(),r=(0,i.useRouter)(),t=(0,s.usePathname)(),a=(0,i.useParams)(),[n,l]=(0,o.useTransition)();return{switchLocale:i=>{let o=document.querySelector(`link[rel="alternate"][hreflang="${i}"]`);l(()=>{if(o?.href){let e=new URL(o.href,location.origin).pathname;(0,s.isLocale)(e.split("/")[1])||(e=`/${i}${"/"===e?"":e}`),r.replace(e+location.search)}else e.replace({pathname:t,params:a,query:Object.fromEntries(new URLSearchParams(location.search))},{locale:i});e.refresh()})},isPending:n}}(),j=e=>{g(e)};return"DEFAULT"===e?(0,r.jsxs)(c.Select,{value:x,onValueChange:e=>j(e),children:[(0,r.jsx)(c.Select.Trigger,{variant:"default","aria-label":h("actions.changeLanguage"),defaultValue:f.default,className:(0,m.twMerge)("w-36",u),children:(0,r.jsx)("span",{className:"flex gap-2",children:(0,r.jsx)(c.Select.Value,{})})}),(0,r.jsx)(c.Select.Content,{children:p.map(e=>(0,r.jsx)(c.Select.Item,{"aria-label":e.label,value:e.value,children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(l.Icon,{children:e.flag}),(0,r.jsx)("span",{children:e.label})]})},e.value))})]}):(0,r.jsxs)(n.HoverCard,{openDelay:200,children:[(0,r.jsx)(n.HoverCard.Trigger,{className:(0,m.twMerge)("flex cursor-pointer items-center",u),asChild:!0,children:(0,r.jsx)(l.Icon,{children:p.find(e=>e.value===x)?.flag??null})}),(0,r.jsx)(n.HoverCard.Content,{className:"w-fit items-center p-0.5",children:(0,r.jsx)(d.ToggleGroup,{className:"flex-col items-start",onValueChange:e=>j(e),type:"single",children:p.map(e=>(0,r.jsx)(d.ToggleGroup.Item,{value:e.value,"aria-label":e.label,title:e.label,variant:"default",className:"flex w-full justify-center",children:(0,r.jsxs)("div",{className:"flex w-full items-center gap-2",children:[(0,r.jsx)(l.Icon,{size:"lg",children:e.flag}),(0,r.jsx)("span",{className:"text-sm",children:e.label})]})},e.value))})})]})}],6210872)},3249023,e=>{"use strict";var r=e.i(7843476),t=e.i(2217255),a=e.i(8128769);e.s(["default",0,({className:e})=>{let{data:s}=(0,t.useSession)();if(!s?.profile)return null;let i=s?.profile.image?.mediaLink??null;return(0,r.jsxs)("div",{className:(0,a.twMerge)("relative aspect-square size-10 overflow-hidden rounded-full",e),children:[i&&(0,r.jsx)("img",{width:40,height:40,className:"aspect-square rounded-full object-cover",alt:s.profile.firstName,src:i}),!i&&(0,r.jsx)("div",{className:(0,a.twMerge)("bg-dalai-brand-500 absolute inset-0 flex size-full items-center justify-center text-white",e),children:(0,r.jsx)("span",{className:"text-lg font-bold",children:s.profile.firstName?.charAt(0)})})]})}])},484750,e=>{"use strict";var r=e.i(7843476),t=e.i(2997116),a=e.i(2047995),s=e.i(6948148),i=e.i(1096259);let o=()=>{let e=Object.values((0,s.useTranslations)().raw("footer.links"));return(0,r.jsx)("ul",{className:"m-auto grid w-fit grid-cols-1 grid-rows-1 gap-x-32 gap-y-8 md:grid-cols-3",children:e.map((e,t)=>(0,r.jsxs)("li",{className:`flex flex-col items-center gap-2 md:items-start ${0===t?"row-span-2":"col-span-1"} `,children:[(0,r.jsx)("span",{className:"text-lg font-bold text-typo-primary",children:e.title}),(0,r.jsx)("nav",{className:"flex flex-col items-center gap-2 md:items-start","aria-label":e.title,children:e.links?.map(e=>(0,r.jsx)(i.NavLink,{size:"lg",className:"m-0 h-fit p-0 text-typo-secondary",href:"url"in e?e.url:"parish"in e?{pathname:"/stay/search",query:(0,a.getStayHrefQueryParams)({parish:e.parish})}:"#",children:e.text},e.text))})]},e.title))})};var n,l=e.i(5319662),c=e.i(262501),d=e.i(6534971),u=e.i(1003903),m=e.i(5618566),f=e.i(7438847),p=e.i(5271645),h=e.i(6247167),x=function(){return(x=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var s in r=arguments[t])Object.prototype.hasOwnProperty.call(r,s)&&
1(e[s]=r[s]);return e}).apply(this,arguments)},g=function(e){var r;e?function(e){if(e)for(;e.lastChild;)e.lastChild.remove()}("string"==typeof e?document.getElementById(e):e):(r=document.querySelector(".grecaptcha-badge"))&&r.parentNode&&document.body.removeChild(r.parentNode)},j=function(e,r){g(r),window.___grecaptcha_cfg=void 0;var t,a=document.querySelector("#"+e);a&&a.remove(),(t=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))&&t.remove()},v=function(e){var r=e.render,t=e.onLoadCallbackName,a=e.language,s=e.onLoad,i=e.useRecaptchaNet,o=e.useEnterprise,n=e.scriptProps,l=void 0===n?{}:n,c=l.nonce,d=void 0===c?"":c,u=l.defer,m=l.async,f=l.id,p=l.appendTo,h=(void 0===f?"":f)||"google-recaptcha-v3";if(document.querySelector("#"+h))s();else{var x,g="https://www."+((x={useEnterprise:o,useRecaptchaNet:i}).useRecaptchaNet?"recaptcha.net":"google.com")+"/recaptcha/"+(x.useEnterprise?"enterprise.js":"api.js"),j=document.createElement("script");j.id=h,j.src=g+"?render="+r+("explicit"===r?"&onload="+t:"")+(a?"&hl="+a:""),d&&(j.nonce=d),j.defer=!!(void 0!==u&&u),j.async=!!(void 0!==m&&m),j.onload=s,("body"===p?document.body:document.getElementsByTagName("head")[0]).appendChild(j)}},y=function(e){void 0===h.default||h.default.env,console.warn(e)};(n||(n={})).SCRIPT_NOT_AVAILABLE="Recaptcha script is not available";var b=(0,p.createContext)({executeRecaptcha:function(){throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")}});function N(e){var r=e.reCaptchaKey,t=e.useEnterprise,a=void 0!==t&&t,s=e.useRecaptchaNet,i=void 0!==s&&s,o=e.scriptProps,l=e.language,c=e.container,d=e.children,u=(0,p.useState)(null),m=u[0],f=u[1],h=(0,p.useRef)(r),g=JSON.stringify(o),N=JSON.stringify(null==c?void 0:c.parameters);(0,p.useEffect)(function(){if(r){var e=(null==o?void 0:o.id)||"google-recaptcha-v3",t=(null==o?void 0:o.onLoadCallbackName)||"onRecaptchaLoadCallback";return window[t]=function(){var e=a?window.grecaptcha.enterprise:window.grecaptcha,t=x({badge:"inline",size:"invisible",sitekey:r},(null==c?void 0:c.parameters)||{});h.current=e.render(null==c?void 0:c.element,t)},v({render:(null==c?void 0:c.element)?"explicit":r,onLoadCallbackName:t,useEnterprise:a,useRecaptchaNet:i,scriptProps:o,language:l,onLoad:function(){if(window&&window.grecaptcha){var e=a?window.grecaptcha.enterprise:window.grecaptcha;e.ready(function(){f(e)})}else y("<GoogleRecaptchaProvider /> "+n.SCRIPT_NOT_AVAILABLE)},onError:function(){y("Error loading google recaptcha script")}}),function(){j(e,null==c?void 0:c.element)}}y("<GoogleReCaptchaProvider /> recaptcha key not provided")},[a,i,g,N,l,r,null==c?void 0:c.element]);var w=(0,p.useCallback)(function(e){if(!m||!m.execute)throw Error("<GoogleReCaptchaProvider /> Google Recaptcha has not been loaded");return m.execute(h.current,{action:e})},[m,h]),C=(0,p.useMemo)(function(){return{executeRecaptcha:m?w:void 0,container:null==c?void 0:c.element}},[w,m,null==c?void 0:c.element]);return p.default.createElement(b.Provider,{value:C},d)}function w(e,r){return e(r={exports:{}},r.exports),r.exports}b.Consumer;var C="function"==typeof Symbol&&Symbol.for,S=C?Symbol.for("react.element"):60103,k=C?Symbol.for("react.portal"):60106,P=C?Symbol.for("react.fragment"):60107,E=C?Symbol.for("react.strict_mode"):60108,A=C?Symbol.for("react.profiler"):60114,I=C?Symbol.for("react.provider"):60109,L=C?Symbol.for("react.context"):60110,T=C?Symbol.for("react.async_mode"):60111,F=C?Symbol.for("react.concurrent_mode"):60111,q=C?Symbol.for("react.forward_ref"):60112,O=C?Symbol.for("react.suspense"):60113,R=C?Symbol.for("react.suspense_list"):60120,M=C?Symbol.for("react.memo"):60115,$=C?Symbol.for("react.lazy"):60116,D=C?Symbol.for("react.block"):60121,_=C?Symbol.for("react.fundamental"):60117,z=C?Symbol.for("react.responder"):60118,B=C?Symbol.for("react.scope"):60119;function V(e){if("object"==typeof e&&null!==e){var r=e.$$typeof;switch(r){case S:switch(e=e.type){case T:case F:case P:case A:case E:case O:return e;default:switch(e=e&&e.$$typeof){case L:case q:case $:case M:case I:return e;default:return r}}case k:return r}}}function K(e){return V(e)===F}var U={AsyncMode:T,ConcurrentMode:F,ContextConsumer:L,ContextProvider:I,Element:S,ForwardRef:q,Fragment:P,Lazy:$,Memo:M,Portal:k,Profiler:A,StrictMode:E,Suspense:O,isAsyncMode:function(e){return K(e)||V(e)===T},isConcurrentMode:K,isContextConsumer:function(e){return V(e)===L},isContextProvider:function(e){return V(e)===I},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===S},isForwardRef:function(e){return V(e)===q},isFragment:function(e){return V(e)===P},isLazy:function(e){return V(e)===$},isMemo:function(e){return V(e)===M},isPortal:function(e){return V(e)===k},isProfiler:function(e){return V(e)===A},isStrictMode:function(e){return V(e)===E},isSuspense:function(e){return V(e)===O},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===P||e===F||e===A||e===E||e===O||e===R||"object"==typeof e&&null!==e&&(e.$$typeof===$||e.$$typeof===M||e.$$typeof===I||e.$$typeof===L||e.$$typeof===q||e.$$typeof===_||e.$$typeof===z||e.$$typeof===B||e.$$typeof===D)},typeOf:V},H=w(function(e,r){}),G=(H.AsyncMode,H.ConcurrentMode,H.ContextConsumer,H.ContextProvider,H.Element,H.ForwardRef,H.Fragment,H.Lazy,H.Memo,H.Portal,H.Profiler,H.StrictMode,H.Suspense,H.isAsyncMode,H.isConcurrentMode,H.isContextConsumer,H.isContextProvider,H.isElement,H.isForwardRef,H.isFragment,H.isLazy,H.isMemo,H.isPortal,H.isProfiler,H.isStrictMode,H.isSuspense,H.isValidElementType,H.typeOf,w(function(e){e.exports=U})),Z={};Z[G.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Z[G.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};
1var W=e.i(3006164),J=e.i(2320447),Q=e.i(7634915),Y=e.i(4494975),X=e.i(7423242),ee=e.i(2062402),er=e.i(653145),et=e.i(7387515),ea=e.i(4095187);let es=(0,ea.createServerReference)("408329443f840c34dbba3b6f18c6223be3daeed5df",ea.callServer,void 0,ea.findSourceMapURL,"sendBusinessEmail"),ei=({onSubmit:e})=>{let t=(0,s.useTranslations)(),a=(0,er.useForm)(),i=Object.values(t.raw("common.businessTypes")),{control:o,register:n,handleSubmit:c,formState:{errors:d}}=a,[u,m]=(0,p.useTransition)(),f=async r=>{m(async()=>{200!=(await es(r)).status?(0,et.default)({message:t("common.emailNotSended"),status:"danger"}):((0,et.default)({message:t("common.emailSended"),status:"success"}),e?.())})};return(0,r.jsxs)("div",{className:"flex flex-col gap-4 px-8 pb-4 md:flex-row md:gap-8",children:[(0,r.jsxs)("div",{className:"space-y-6 text-dalai-brand-500 md:w-3/4",children:[(0,r.jsx)("p",{className:"text-pretty text-3xl font-bold md:text-4xl",children:t("common.businessContact.title")}),(0,r.jsx)("p",{className:"text-pretty",children:t("common.businessContact.description")})]}),(0,r.jsx)(er.FormProvider,{...a,children:(0,r.jsxs)("form",{onSubmit:c(f),className:"grow space-y-4",children:[(0,r.jsx)(J.FormControl,{error:d.name?.message,children:(0,r.jsx)(Y.Input,{...n("name",{required:t("inputs.errors.required")}),placeholder:t("common.name"),startEndhancer:()=>(0,r.jsx)(ee.Person,{})})}),(0,r.jsx)(J.FormControl,{error:d.businessName?.message,children:(0,r.jsx)(Y.Input,{...n("businessName",{required:t("inputs.errors.required")}),placeholder:t("common.businessName"),startEndhancer:()=>(0,r.jsx)(ee.Building,{})})}),(0,r.jsx)(J.FormControl,{error:d.phone?.message,children:(0,r.jsx)(Y.Input,{type:"tel",...n("phone",{required:t("inputs.errors.required")}),placeholder:t("common.phone"),startEndhancer:()=>(0,r.jsx)(ee.Phone,{})})}),(0,r.jsx)(J.FormControl,{error:d.email?.message,children:(0,r.jsx)(Y.Input,{...n("email",{required:t("inputs.errors.required"),pattern:{value:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/,message:t("inputs.errors.email")}}),placeholder:t("inputs.andorraContactEmailPlaceholder"),startEndhancer:()=>(0,r.jsx)(ee.Envelope,{})})}),(0,r.jsx)(er.Controller,{control:o,name:"businessType",rules:{required:t("inputs.errors.required")},render:({field:e})=>(0,r.jsx)(J.FormControl,{error:d.businessType?.message,children:(0,r.jsxs)(X.Select,{value:e.value,onValueChange:r=>e.onChange(r),children:[(0,r.jsx)(X.Select.Trigger,{children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(Q.Icon,{children:(0,r.jsx)(ee.Shop,{})}),(0,r.jsx)(X.Select.Value,{placeholder:t("common.businessType")})]})}),(0,r.jsx)(X.Select.Content,{children:i.map(e=>(0,r.jsx)(X.Select.Item,{value:e,children:e},e))})]})})}),(0,r.jsx)("input",{className:"hidden",...n("dummy")}),(0,r.jsx)(l.Button,{type:"submit",className:"w-full",variant:"primary",loading:u,children:t("actions.contact")}),(0,r.jsx)("p",{className:"text-xs text-typo-secondary",children:t("common.googleCaptchaWarning")})]})})]})};var eo=e.i(7348711),en=e.i(2217255);let el=(0,ea.createServerReference)("40cd87b809ff84113e9eb9cca77c89f3ed84ee6560",ea.callServer,void 0,ea.findSourceMapURL,"sendContactEmail"),ec=({onSubmit:e})=>{let{data:t}=(0,en.useSession)(),a=(0,s.useTranslations)(),{executeRecaptcha:i}=(0,p.useContext)(b),o=(0,er.useForm)({defaultValues:{email:t?.profile?.email??"",name:t?.profile?.firstName??"",phone:t?.profile?.phone??""}}),{register:n,handleSubmit:c,formState:{errors:d}}=o,[u,m]=(0,p.useTransition)(),f=async r=>{if(!i)return;let t=await i();m(async()=>{200!=(await el({...r,recaptchaToken:t})).status?(0,et.default)({message:a("common.emailNotSended"),status:"danger"}):((0,et.default)({message:a("common.emailSended"),status:"success"}),e?.())})};return(0,r.jsxs)("div",{className:"flex flex-col gap-4 px-8 pb-4 md:flex-row md:gap-8",children:[(0,r.jsxs)("div",{className:"text-dalai-brand-500 space-y-6 md:w-3/4",children:[(0,r.jsx)("p",{className:"text-pretty text-3xl font-bold md:text-4xl",children:a("common.andorraContact.title")}),(0,r.jsx)("p",{className:"text-pretty",children:a("common.andorraContact.description")})]}),(0,r.jsx)(er.FormProvider,{...o,children:(0,r.jsxs)("form",{onSubmit:c(f),
1className:"grow space-y-4",children:[(0,r.jsx)(J.FormControl,{error:d.name?.message,children:(0,r.jsx)(Y.Input,{...n("name",{required:a("inputs.errors.required")}),placeholder:a("common.name"),startEndhancer:()=>(0,r.jsx)(ee.Person,{})})}),(0,r.jsx)(J.FormControl,{error:d.phone?.message,children:(0,r.jsx)(Y.Input,{...n("phone",{required:a("inputs.errors.required")}),placeholder:a("common.phone"),startEndhancer:()=>(0,r.jsx)(ee.Phone,{})})}),(0,r.jsx)(J.FormControl,{error:d.email?.message,children:(0,r.jsx)(Y.Input,{...n("email",{required:a("inputs.errors.required"),pattern:{value:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/,message:a("inputs.errors.email")}}),placeholder:a("inputs.andorraContactEmailPlaceholder"),startEndhancer:()=>(0,r.jsx)(ee.Envelope,{})})}),(0,r.jsx)(J.FormControl,{error:d.message?.message,children:(0,r.jsx)(eo.Textarea,{error:d.message?.message,rows:6,...n("message",{required:a("inputs.errors.required")}),placeholder:a("actions.writeYourMessage")})}),(0,r.jsx)("input",{className:"hidden",...n("dummy")}),(0,r.jsx)(l.Button,{loading:u,type:"submit",className:"w-full",variant:"primary",children:a("actions.contact")}),(0,r.jsx)("p",{className:"text-typo-secondary text-xs",children:a("common.googleCaptchaWarning")})]})})]})};var ed=e.i(6210872),eu=e.i(4032403);e.s(["default",0,()=>{let e=(0,s.useTranslations)(),a=(0,t.useRouter)(),n=(0,t.usePathname)(),h=(0,m.useParams)(),x=(0,m.useSearchParams)(),[g,j]=(0,f.useQueryState)("contact",f.parseAsBoolean.withDefault(!1)),[v,y]=(0,p.useState)("true"===(0,u.getCookie)("contact_modal"));g&&window.scrollTo({top:document.body.scrollHeight,behavior:"instant"});let{replace:b}=(0,t.useRouter)();return(0,r.jsx)(N,{reCaptchaKey:W.default.NEXT_PUBLIC_GOOGLE_CAPTCHA,children:(0,r.jsx)("footer",{className:"mt-14 py-2",children:(0,r.jsxs)(eu.default,{className:"flex w-full flex-col items-center gap-8 lg:items-start",children:[(0,r.jsxs)("div",{className:"flex w-full flex-col-reverse items-center justify-start gap-12 lg:flex-row lg:items-start lg:gap-32",children:[(0,r.jsx)("div",{className:"flex w-full justify-center lg:w-auto lg:justify-start",children:(0,r.jsx)(t.Link,{href:"/",children:(0,r.jsx)("img",{loading:"lazy",src:"/assets/logos/andorra/Simbolo-Andorracom-01.svg",alt:"Andorra logo",width:130,height:29})})}),(0,r.jsx)("div",{className:"w-full lg:w-auto",children:(0,r.jsx)(o,{})})]}),(0,r.jsx)(ed.default,{}),(0,r.jsx)(d.Separator,{}),(0,r.jsxs)("div",{className:"text-typo-disabled flex w-full flex-col items-center justify-between gap-4 text-sm lg:flex-row",children:[(0,r.jsx)("p",{children:e("footer.copyright",{year:new Date().getFullYear()})}),(0,r.jsxs)("div",{className:"flex flex-col items-center md:flex-row",children:[(0,r.jsxs)(c.Dialog,{open:g,onOpenChange:e=>{if(j(e),!e&&g){let e=new URLSearchParams(x.toString());e.delete("contact"),a.replace({pathname:n,params:h,query:Object.fromEntries(e)})}},children:[(0,r.jsx)(c.Dialog.Trigger,{asChild:!0,children:(0,r.jsx)(l.Button,{variant:"link",className:"text-typo-disabled",children:e("common.contact")})}),(0,r.jsxs)(c.Dialog.Content,{className:"md:min-w-[850px]",children:[(0,r.jsx)(c.Dialog.Header,{}),(0,r.jsx)(c.Dialog.Body,{children:(0,r.jsx)(ec,{onSubmit:()=>j(!1)})})]})]}),(0,r.jsxs)(c.Dialog,{open:v,onOpenChange:e=>{y(e),e||((0,u.deleteCookie)("contact_modal"),b("/",{scroll:!1}))},children:[(0,r.jsx)(c.Dialog.Trigger,{asChild:!0,children:(0,r.jsx)(l.Button,{variant:"link",className:"text-typo-disabled",children:e("common.joinAndorra")})}),(0,r.jsxs)(c.Dialog.Content,{className:"md:min-w-[850px]",children:[(0,r.jsx)(c.Dialog.Header,{}),(0,r.jsx)(c.Dialog.Body,{children:(0,r.jsx)(ei,{onSubmit:()=>y(!1)})})]})]})]}),(0,r.jsxs)("div",{className:"[&>a]:text-typo-disabled flex flex-col items-center lg:flex-row",children:[(0,r.jsx)(i.NavLink,{href:"/terms-and-conditions",children:e("footer.legal.title")}),(0,r.jsx)(i.NavLink,{href:"/privacy-policy",children:e("footer.privacy.title")}),(0,r.jsx)(i.NavLink,{href:"/cookies-policy",children:e("footer.cookies.title")})]}),(0,r.jsx)("p",{children:"Viu Andorra."})]})]})})})}],484750)},8059372,1268689,e=>{"use strict";var r=e.i(7843476),t=e.i(2997116),a=e.i(1096259),s=e.i(3249023),i=e.i(5319662),o=e.i(7634915),n=e.i(7390150),l=e.i(2062402),c=e.i(2217255),d=e.i(6948148);let u=()=>{let{data:e,status:t}=(0,c.useSession)(),u=(0,d.useTranslations)();return"authenticated"===t?(0,r.jsxs)("div",{className:"w-full space-y-4",children:[(0,r.jsxs)(a.NavLink,{variant:"outline",href:"/profile/settings",className:"h-fit w-full items-center gap-4","aria-label":u("common.accountSettings"),children:[(0,r.jsx)(o.Icon,{size:"lg",children:(0,r.jsx)(s.default,{})}),(0,r.jsxs)("div",{className:"flex w-fit flex-1 flex-col items-start",children:[(0,r.jsxs)("span",{className:"text-lg font-bold",children:[e?.profile?.firstName," ",e?.profile?.lastName]}),(0,r.jsx)("span",{className:(0,n.textStyles)({size:"compact",color:"subtile"}),children:e?.user?.email})]}),(0,r.jsx)(o.Icon,{children:(0,r.jsx)(l.ArrowRight,{})})]}),(0,r.jsxs)(i.Button,{onClick:()=>(0,c.signOut)(),variant:"secondary",className:"w-full",children:[(0,r.jsx)(l.L
1ogout,{}),u("actions.logout")]})]}):(0,r.jsx)(a.NavLink,{variant:"primary",href:"/login",className:"w-full text-white",children:u("actions.login")})};var m=e.i(1601454),f=e.i(6210872),p=e.i(2889172),h=e.i(8128769);let x=[{translationKey:"header.andorraEssentials.title",children:[{translationKey:"header.andorraEssentials.children.connect",href:"/internet-andorra/esims"}]},{translationKey:"header.whatToDo",children:[{translationKey:"mainNavigation.experiences",href:"/experiences"},{translationKey:"mainNavigation.stay",href:"/stay"},{translationKey:"mainNavigation.shopping",href:"/shops-andorra/shopping"},{translationKey:"mainNavigation.eat",href:"/restaurants-andorra/eat"}]},{translationKey:"header.blog",href:"/blog"}];e.s(["headerLinks",0,x],1268689),e.s(["default",0,({className:e})=>{let s=(0,d.useTranslations)();return(0,r.jsxs)("header",{className:(0,h.twMerge)("flex h-auto items-center justify-between gap-4 py-2 lg:hidden",e),children:[(0,r.jsx)(m.default,{}),(0,r.jsxs)(p.Sheet,{children:[(0,r.jsx)(p.Sheet.Trigger,{asChild:!0,children:(0,r.jsx)(i.Button,{type:"button",variant:"ghost",size:"iconLg",className:"text-inherit",children:(0,r.jsx)(l.Menu,{})})}),(0,r.jsxs)(p.Sheet.Content,{className:"fixed flex min-w-full flex-col gap-6",children:[(0,r.jsx)(p.Sheet.Header,{className:"pb-0",children:(0,r.jsx)(t.Link,{href:"/",children:(0,r.jsx)("img",{src:"/assets/logos/andorra/Logo-Andorracom-03.svg",alt:"Andorra logo",width:150,height:28})})}),(0,r.jsx)(p.Sheet.Body,{className:"flex-1 py-0",children:(0,r.jsx)("nav",{className:"flex flex-1 flex-col gap-6",children:x.map(e=>e.children?(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("span",{className:(0,n.headingStyles)({variant:"title3"}),children:s(e.translationKey)}),(0,r.jsx)("nav",{className:"flex flex-col","aria-label":s(e.translationKey),children:e.children.map(e=>(0,r.jsx)(a.NavLink,{href:e.href,className:"justify-start p-0 text-start",size:"lg",children:s(e.translationKey)},e.translationKey))})]},e.translationKey):(0,r.jsx)("div",{className:"flex flex-col",children:(0,r.jsx)(a.NavLink,{href:e.href,size:"lg",target:"_blank",className:"justify-start p-0 text-left",children:s(e.translationKey)})},e.translationKey))})}),(0,r.jsx)(p.Sheet.Footer,{children:(0,r.jsxs)("div",{className:"w-full space-y-4",children:[(0,r.jsx)(u,{}),(0,r.jsx)(f.default,{className:"w-full"})]})})]})]})]})}],8059372)},1003903,(e,r,t)=>{"use strict";var a=e.e&&e.e.__assign||function(){return(a=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var s in r=arguments[t])Object.prototype.hasOwnProperty.call(r,s)&&
1(e[s]=r[s]);return e}).apply(this,arguments)},s=e.e&&e.e.__rest||function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);s<a.length;s++)0>r.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(t[a[s]]=e[a[s]]);return t};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCookie=t.deleteCookie=t.setCookie=t.getCookie=t.getCookies=void 0;var i=e.r(2462819),o=function(){return"u">typeof window},n=function(e){return!!e&&"getAll"in e&&"set"in e&&"function"==typeof e.getAll&&"function"==typeof e.set},l=function(e){return!!(null==e?void 0:e.req)&&"cookies"in e.req&&n(null==e?void 0:e.req.cookies)||!!(null==e?void 0:e.res)&&"cookies"in e.res&&n(null==e?void 0:e.res.cookies)||!!(null==e?void 0:e.cookies)&&n(e.cookies())},c=function(e){var r={};return e.getAll().forEach(function(e){var t=e.name,a=e.value;r[t]=a}),r},d=function(e){try{if("string"==typeof e)return e;return JSON.stringify(e)}catch(r){return e}};t.getCookies=function(e){if(l(e)){if(null==e?void 0:e.req)return c(e.req.cookies);if(null==e?void 0:e.cookies)return c(e.cookies())}if(e&&(r=e.req),!o())return r&&r.cookies?r.cookies:r&&r.headers.cookie?(0,i.parse)(r.headers.cookie):{};for(var r,t={},a=document.cookie?document.cookie.split("; "):[],s=0,n=a.length;s<n;s++){var d=a[s].split("="),u=d.slice(1).join("=");t[d[0]]=u}return t},t.getCookie=function(e,r){var a=(0,t.getCookies)(r)[e];if(void 0!==a)return a?a.replace(/(%[0-9A-Z]{2}
1)+/g,decodeURIComponent):a},t.setCookie=function(e,r,t){if(l(t)){var n,c,u,m=t.req,f=t.res,p=t.cookies,h=s(t,["req","res","cookies"]),x=a({name:e,value:d(r)},h);m&&m.cookies.set(x),f&&f.cookies.set(x),p&&p().set(x);return}if(t){var m=t.req,f=t.res,g=s(t,["req","res"]);c=m,u=f,n=g}var j=(0,i.serialize)(e,d(r),a({path:"/"},n));if(o())document.cookie=j;else if(u&&c){var v=u.getHeader("Set-Cookie");if(Array.isArray(v)||(v=v?[String(v)]:[]),u.setHeader("Set-Cookie",v.concat(j)),c&&c.cookies){var y=c.cookies;""===r?delete y[e]:y[e]=d(r)}if(c&&c.headers&&c.headers.cookie){var y=(0,i.parse)(c.headers.cookie);""===r?delete y[e]:y[e]=d(r),c.headers.cookie=Object.entries(y).reduce(function(e,r){return e.concat("".concat(r[0],"=").concat(r[1],";"))},"")}}},t.deleteCookie=function(e,r){return(0,t.setCookie)(e,"",a(a({},r),{maxAge:-1}))},t.hasCookie=function(e,r){return!!e&&(0,t.getCookies)(r).hasOwnProperty(e)}}]);
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.