PageSourceSearch

https://air.bg/_next/static/chunks/app/(frontend)/%5Blocale%5D/layout-950c9b21c591ef0e.js

js air.bg collected 2026-10-02 10:05:58 UTC 101,242 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6916],{1876:(e,t,r)=>{"use strict";r.d(t,{default:()=>Y});var n=r(39586),l=r(21886),i=r(68076),a=r(82075),s=r(72643),o=r(25140),d=r(81358),c=r(56181),u=r(45841),m=r(19715),h=r(74058),p=r(59063),x=r(38895),g=r(30643),f=r(61006),b=r(78856),v=r(1905),w=r(54529),y=r(76231),j=r(21031),C=r(70205),S=r(33555),k=r(93472),E=r(9150),F=r(2410),A=r(78477),D=r(13501),_=r(77229),T=r(19709);let z={facebook:(0,n.jsx)(y.A,{size:20}),instagram:(0,n.jsx)(j.A,{size:20}),linkedin:(0,n.jsx)(C.A,{size:20}),x:(0,n.jsx)(S.A,{size:20}),youtube:(0,n.jsx)(k.A,{size:20})};function Y(e){var t,r,y,j,C,S,k,Y,I,N,B,M,P,R;let{data:L}=e,O=(0,v.U)("(max-width: 768px)"),U=(0,v.U)("(max-width: 1024px)"),W=(0,E.c3)("common"),q=(0,w.Ym)(),[H,G]=(0,F.useState)(""),[V,K]=(0,F.useState)(!1),[$,X]=(0,F.useState)(""),[J,Z]=(0,F.useState)(""),[Q,ee]=(0,F.useState)(!1),[et,er]=(0,F.useState)(!1),{widgetRef:en,turnstileError:el,onSuccess:ei,onError:ea,onExpire:es,resetTurnstile:eo,validateTurnstile:ed}=(0,T.A)(),ec=async(e,t)=>{let r="bg"===q?"bg-BG":"en-US",n=await fetch("/api/newsletter-subscribe-public",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,lang:r,type:"Subscribed",turnstileToken:t})}),l=await n.json();if(!n.ok){var i,a;throw Error((null==l?void 0:l.error)||(null==l||null==(a=l.errors)||null==(i=a[0])?void 0:i.message)||"Subscription failed")}return l},eu=e=>/^\S+@\S+\.\S+$/.test(e),em=async()=>{let e=!1;if(eu(H)?Z(""):(Z(W("invalidEmail")),e=!0),V?X(""):(X(W("consentRequired")),e=!0),e)return;let t=ed();if(t)try{ee(!0),er(!1),await ec(H,t),er(!0),eo()}catch(e){if(e instanceof Error){let t=e.message.toLowerCase();console.log(t),t.includes("captcha_failed")||t.includes("captcha_expired")||t.includes("captcha_required")?Z(W("captchaFailed")):t.includes("invalid")&&t.includes("address")?Z(W("invalidEmail")):t.includes("email")?Z(W("alreadySubscribed")):Z(W("somethingWentWrong"))}else Z(W("somethingWentWrong"));eo()}finally{ee(!1)}},eh=eu(H)&&V;return L?(0,n.jsxs)(i.Box,{bg:"gray.1",component:"footer",pb:0,pt:"xl",mt:96,children:[(0,n.jsxs)(a.Container,{mx:{base:"auto",sm:"auto"},my:0,px:O?"1rem":U?"1.5rem":0,children:[(0,n.jsxs)(s.Flex,{direction:{base:"column",md:"row"},gap:U?"md":"xl",mb:"xl",children:[(0,n.jsxs)(o.Stack,{align:"flex-start",gap:"xs",style:{gridColumn:"span 5",marginRight:"auto"},w:{base:"100%",md:"212px"},children:[(0,n.jsxs)(d.Y,{justify:O||U?"center":"flex-start",w:"100%",children:[(0,n.jsx)(i.Box,{w:"100%",style:{display:"flex",justifyContent:"center"},children:(0,n.jsx)(l.N_,{href:"/",children:(0,n.jsx)(A.g,{width:200,height:79,locale:q})})}),(0,n.jsx)(c.Text,{c:"dimmed",size:"sm",children:L.description})]}),(0,n.jsx)(d.Y,{gap:"md",justify:O||U?"center":"flex-start",mt:"xs",w:"100%",children:null==(t=L.socialLinks)?void 0:t.map(e=>(0,n.jsx)(u.M,{c:"gray.7",href:e.url,rel:"noopener noreferrer",target:"_blank",children:(0,n.jsx)(i.Box,{bg:"white",h:30,p:7,style:{alignItems:"center",borderRadius:"50%",display:"flex",justifyContent:"center"},w:30,children:z[e.platform]})},e.platform))})]}),O||U?(0,n.jsx)(m.n,{children:L.navigationColumns&&L.navigationColumns.length>0&&L.navigationColumns.map(e=>{var t;return(0,n.jsxs)(m.n.Item,{value:e.title,children:[(0,n.jsx)(m.n.Control,{p:0,children:(0,n.jsx)(c.Text,{fw:700,size:"sm",style:{whiteSpace:"nowrap"},children:e.title})}),(0,n.jsx)(m.n.Panel,{children:(0,n.jsx)(o.Stack,{gap:"xs",children:null==(t=e.links)?void 0:t.map(e=>{var t,r;return(0,n.jsx)(u.M,{c:"gray.7",href:e.url,target:(null==(t=e.url)?void 0:t.startsWith("https:"))?"_blank":void 0,rel:(null==(r=e.url)?void 0:r.startsWith("https:"))?"noopener noreferrer":void 0,size:"sm",children:e.label},e.label)})})})]},e.title)})}):(0,n.jsx)(i.Box,{style:{display:"grid",gridTemplateColumns:U?"repeat(".concat(Math.min((null==(r=L.navigationColumns)?void 0:r.length)||1,2),", minmax(120px, 1fr))"):"repeat(".concat((null==(y=L.navigationColumns)?void 0:y.length)||1,", minmax(150px, 1fr))"),gap:U?"var(--mantine-spacing-md)":"var(--mantine-spacing-xl)",flex:1,width:"100%"},children:L.navigationColumns&&L.navigationColumns.length>0&&L.navigationColumns.map(e=>{var t;
1return(0,n.jsxs)(o.Stack,{align:"flex-start",gap:2,style:{minWidth:0,maxWidth:"100%"},children:[(0,n.jsx)(c.Text,{fw:700,mb:"md",size:"sm",style:{width:"100%"},children:e.title}),null==(t=e.links)?void 0:t.map(e=>{var t,r;return(0,n.jsx)(u.M,{c:"gray.7",href:e.url,target:(null==(t=e.url)?void 0:t.startsWith("https:"))?"_blank":void 0,rel:(null==(r=e.url)?void 0:r.startsWith("https:"))?"noopener noreferrer":void 0,mb:5,size:"sm",style:{whiteSpace:"normal",wordWrap:"break-word",overflowWrap:"break-word",maxWidth:"100%",display:"block"},children:e.label},e.label)})]},e.title)})})]}),(0,n.jsxs)(h.Z,{mb:"xl",p:0,radius:"1rem",style:{alignItems:"center",display:"flex",flexDirection:O||U?"column":"row"},children:[(0,n.jsxs)(s.Flex,{direction:"column",flex:1,m:O||U?20:40,p:0,w:"100%",children:[(0,n.jsx)(c.Text,{c:"gray.7",lts:"0.25px",mb:8,size:"sm",ta:O||U?"center":"left",children:null==(j=L.appSection)?void 0:j.title}),(0,n.jsx)(c.Text,{fw:700,fz:"lg",mb:"xl",mx:"auto",ta:O||U?"center":"left",w:O||U?"70%":"100%",children:null==(C=L.appSection)?void 0:C.description}),(0,n.jsx)(d.Y,{gap:"xs",justify:O||U?"center":"flex-start",children:null==(k=L.appSection)||null==(S=k.appButtons)?void 0:S.map(e=>(0,n.jsx)(u.M,{href:e.url,rel:"noopener noreferrer",target:"_blank",children:e.icon?(0,n.jsx)(p.Image,{alt:e.store,h:{base:40,sm:40},src:e.icon.url||""}):(0,n.jsx)(x.Button,{size:"xs",variant:"default",children:e.store})},e.store))})]}),(null==(Y=L.appSection)?void 0:Y.image)&&(0,n.jsx)(i.Box,{style:{height:O||U?"12rem":"15rem"},children:(0,n.jsx)(p.Image,{alt:(null==(I=L.appSection)?void 0:I.image).alt||"",h:"100%",src:(null==(N=L.appSection)?void 0:N.image).url||"",fit:"cover",style:{marginLeft:"-2.5%"}})})]}),(0,n.jsx)(h.Z,{bd:{base:0,md:"1px solid var(--mantine-color-gray-3)"},bg:"gray.1",mb:"xl",p:{base:4,md:40},radius:"1rem",children:(0,n.jsxs)(s.Flex,{direction:{base:"column",md:"row"},gap:U?"md":"xl",justify:"space-between",children:[(0,n.jsxs)(o.Stack,{gap:"xs",children:[(0,n.jsx)(c.Text,{fw:700,fz:"h5",children:null==(B=L.newsletter)?void 0:B.title}),(0,n.jsx)(c.Text,{c:"gray.11",size:"sm",children:null==(M=L.newsletter)?void 0:M.description})]}),et?(0,n.jsx)(c.Text,{c:"green.7",size:"sm",mt:"xs",children:W("newsletterSuccess")}):(0,n.jsxs)(o.Stack,{children:[(0,n.jsx)(d.Y,{align:"flex-end",gap:"xs",wrap:"nowrap",children:(0,n.jsx)(g.k,{value:H,onChange:e=>{G(e.currentTarget.value),Z("")},error:J,placeholder:W("yourEmail"),rightSection:(0,n.jsx)(x.Button,{mr:2,style:{height:"2.875rem"},onClick:em,disabled:!eh||Q,loading:Q,children:W("submit")}),rightSectionProps:{style:{width:"fit-content"}},styles:{input:{padding:"1.25rem 1rem",height:"3.5rem"},root:{flex:1}}})}),(0,n.jsx)(f.S,{checked:V,onChange:e=>{K(e.currentTarget.checked),X("")},c:"gray.7",label:null==(P=L.newsletter)?void 0:P.consentText,radius:"4px",size:O||U?"xs":"sm",error:$,styles:{input:{border:"1px solid var(--Gray-G600-Text-S, #607885)",backgroundColor:"transparent"},label:{fontSize:"12px"},icon:{color:"var(--mantine-color-brandBlue-8)"}}}),(0,n.jsx)(_.A,{ref:en,error:el,onSuccess:ei,onError:ea,onExpire:es})]})]})})]}),!(O||U)&&(0,n.jsx)(b.c,{}),(0,n.jsx)(a.Container,{mb:"0",mt:"sm",mx:{base:"auto",sm:"auto"},px:O?"1rem":U?"1.5rem":0,pb:{base:"0",md:"1rem"},children:(0,n.jsxs)(s.Flex,{align:"center",direction:{base:"column-reverse",md:"row"},gap:{base:"lg",md:0},justify:"space-between",pb:{base:"lg",md:0},children:[(0,n.jsx)(c.Text,{c:"gray.11",size:O?"14px":"xs",style:{textAlign:O?"center":"left"},children:null!=(R=L.copyright)?R:""}),(0,n.jsxs)(d.Y,{gap:4,children:[(0,n.jsx)(c.Text,{c:"gray.11",size:O?"14px":"md",children:"Powered by"}),(0,n.jsx)(u.M,{c:"dimmed",href:"https://www.denshi.bg/",rel:"noopener noreferrer",size:"xs",target:"_blank",children:(0,n.jsx)(p.Image,{alt:"Denshi AD Logo",h:24,src:(0,D.e)("/media/logo/denshi.svg")})})]})]})})]}):null}},4662:(e,t,r)=>{"use strict";r.d(t,{Cl:()=>a,Sd:()=>i,v4:()=>s,yK:()=>o});var n=r(53093),l=r(34952);l.env.NEXT_PUBLIC_BG_AIR_GTM,l.env.NEXT_PUBLIC_BG_AIR_AMADEUS_GTM;let i=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)},a=e=>{if(!e)return"/";let t=e.replace(/\/+$/,"");return t.length>0?t:"/"},s=e=>e===n.OE.E_TICKET?"eticket":"booking_reference",o=e=>{var t,r;let n=e?"granted":"denied";null==(t=(r=window).gtag)||t.call(r,"consent","update",{analytics_storage:n,ad_storage:n,ad_user_data:n,ad_personalization:n})}},5805:(e,t,r)=>{"use strict";r.d(t,{R9:()=>u,VQ:()=>m,_V:()=>h,en:()=>i,jV:()=>s,s_:()=>a});var n=r(13501);let l=["thumbnail","small","medium","large","xlarge"],i=1920,a=e=>2*e,s=e=>{if(!e||"string"!=typeof e)return"";let t=e.trim();if(/%[0-9A-Fa-f]{2}/.test(t))try{t=decodeURIComponent(t)}catch(e){}return t},o=(e,t)=>(0,n.e)(s(e),t).replace(/ /g,"%20").replace(/,/g,"%2C"),d=e=>{let t=[];for(let n of l){var r;let l=null==(r=e.sizes)?void 0:r[n];(null==l?void 0:l.url)&&l.width&&t.push({url:l.url,width:l.width})}t.sort((e,t)=>
1e.width-t.width);let n=t[t.length-1];return e.url&&e.width&&(!n||e.width>n.width)&&t.push({url:e.url,width:e.width}),t},c=(e,t)=>{var r;return null!=(r=e.find(e=>e.width>=t))?r:e[e.length-1]},u=(e,t)=>{var r;if(!e||"object"!=typeof e)return"";let n=c(d(e),t);return o(null!=(r=null==n?void 0:n.url)?r:e.url,e.updatedAt)},m=e=>{if(!e||"object"!=typeof e)return;let t=d(e);if(0===t.length)return;let{updatedAt:r}=e;return e=>{var n;let{width:l}=e;return o((null!=(n=c(t,l))?n:t[0]).url,r)}},h=(e,t)=>{var r,n,l;if(!e||"object"!=typeof e||!e.url)return null;let i=d(e),a={src:o(null!=(n=null==(r=c(i,1400))?void 0:r.url)?n:e.url,e.updatedAt),alt:null!=(l=e.alt)?l:""};return i.length>1&&(a.srcSet=i.map(t=>"".concat(o(t.url,e.updatedAt)," ").concat(t.width,"w")).join(", "),t&&(a.sizes=t)),a}},7831:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});let n=(0,r(54412).a)({breakpoints:{lg:"74em",md:"64em",sm:"48em",xl:"90em",xs:"30em"},colors:{brandBlue:["#EFF9FF","#DEF2FF","#B4EFFF","#76D5FF","#2DC1FF","#02AAF5","#08B7D2","#006CAA","#005B8C","#074B73","#002234"],brandGreen:["#F0FDF4","#DDFBE6","#BDF5D0","#89ECAA","#4ED7D7","#27C058","#18A46A","#187D9B","#186393","#16512B","#062D15"],brandRed:["#FFE2F2","#FFE1E2","#FFC9CB","#FFA2A5","#FC6D72","#F84346","#E11F26","#D6171C","#821A1E","#47808A"],gray:["#FCFCFD","#F0F2F4","#ECEFF7","#DCE1E5","#B8BEC7","#8898AB","#6C7895","#607885","#45535F","#3C4750","#353D45","#23292E"],warning:["#FFF4E5","#663C00","#A1400B","#FFF4E5","#663C00","#A1400B","#FFF4E5","#663C00","#A1400B","#FFF4E5","#663C00","#A1400B"],info:["#B6E7FF","#1E40AF","#3B82F6","#B6E7FF","#1E40AF","#3B82F6","#B6E7FF","#1E40AF","#3B82F6","#B6E7FF","#1E40AF","#3B82F6"],danger:["#FEE2E2","#991B1B","#DC2626","#FEE2E2","#991B1B","#DC2626","#FEE2E2","#991B1B","#DC2626","#FEE2E2","#991B1B","#DC2626"]},components:{Container:{defaultProps:{style:{maxWidth:"81.25rem"}}},DatePickerInput:{defaultProps:{height:"2.5rem",radius:"md",size:"sm"}},Input:{defaultProps:{height:"2.5rem",radius:"md",size:"sm"}}},defaultRadius:"0.5rem",fontFamily:"var(--font-raleway), Arial, sans-serif",fontFamilyMonospace:"var(--font-raleway), Arial, sans-serif",fontSizes:{caption:"1rem",lg:"1.125rem",md:"1rem",sm:"1rem",xl:"2.5rem",xs:"1rem",xxs:".625rem"},headings:{fontFamily:"var(--font-raleway), Arial, sans-serif",fontWeight:"700",sizes:{h1:{fontSize:"3rem",fontWeight:"700",lineHeight:"3.5rem"},h2:{fontSize:"2.5rem",fontWeight:"700",lineHeight:"3rem"},h3:{fontSize:"2rem",fontWeight:"700",lineHeight:"2.5rem"},h4:{fontSize:"1.5rem",fontWeight:"700",lineHeight:"2rem"},h5:{fontSize:"1.25rem",fontWeight:"700",lineHeight:"1.75rem"},h6:{fontSize:"1.125rem",fontWeight:"700",lineHeight:"1.625rem"}}},lineHeights:{caption:"1.5rem",lg:"3rem",md:"1.5rem",sm:"1.5rem",xl:"2.5rem",xs:"1.5rem",xxs:".875rem"},primaryColor:"brandBlue",primaryShade:8})},9285:(e,t,r)=>{"use strict";r.d(t,{default:()=>eI});var n=r(39586),l=r(2410),i=r(35996),a=r(45054),s=r.n(a);function o(){return(0,n.jsx)("div",{className:s().wrapper,children:(0,n.jsx)("span",{"aria-hidden":"true",className:s().spinner})})}var d=r(21886),c=r(51218),u=r(2333),m=r(72643),h=r(14187),p=r(69401),x=r(68076),g=r(56181),f=r(82075),b=r(81358),v=r(38554),w=r(78856),y=r(76231),j=r(21031),C=r(70205),S=r(33555),k=r(93472),E=r(54529),F=r(1905),A=r(35812),D=r(18277),_=r(91236),T=r(96524),z=r(59290),Y=r(38895),I=r(38104),N=r(33087),B=r(60678),M=r(9150),P=r(196),R=r(57959),L=r(70145),O=r(77229),U=r(19709),W=r(74907);let q=function(){let e=(0,N.xd)(),t=(0,M.c3)("user.auth.forgotPassword"),r=(0,M.c3)("forms"),i=(0,d.rd)(),[a,s]=(0,l.useState)(""),[o,c]=(0,l.useState)(!1),[u]=(0,l.useState)(Date.now()),{widgetRef:h,turnstileError:p,onSuccess:x,onError:f,onExpire:v,resetTurnstile:w,validateTurnstile:y}=(0,U.A)(),[j,C]=(0,l.useState)(!1),[,S]=(0,l.useState)(null),{control:k}=(0,P.mN)({defaultValues:{email:""},resolver:(0,I.u)(z.object({email:z.email(r("invalidEmail")).min(1,r("required"))}))});return(0,n.jsx)(b.Y,{h:{base:"100%",md:"100vh"},justify:"center",w:{base:"90%",md:"60%"},style:{overflowY:"auto",overflowX:"hidden"},children:(0,n.jsx)(B.t,{maw:{base:"100%",md:"556px"},pt:{base:"0",md:"5rem"},w:{base:"100%",md:"80%"},children:(0,n.jsxs)(P.lV,{control:k,onSubmit:async e=>{if(a)return void console.info("Bot detected: text honeypot");if(o)return void console.info("Bot detected: checkbox honeypot");if(Date.now()-u<2e3)return void console.info("Bot detected: too fast");let t=y();if(t)try{C(!0),S(null),await (0,T.BD)({email:e.data.email,turnstileToken:t}),i.push({pathname:"/user/sign",query:{success:(0,W.w)("password-reset-sent")}})}catch(e){S(e instanceof Error?e.message:"Failed to send email for forgotten password"),w()}finally{C(!1)}},children:[(0,n.jsx)("input",{type:"text",name:"field_hp_url",value:a,onChange:e=>s(e.target.value),autoComplete:"one-time-code",tabIndex:-1,style:{position:"absolute",left:"-9999px",width:"1px",height:"1px",opacity:0,pointerEvents:"none"},"aria-hidden":"true","data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":!0,"data-protonpass-ignore":!0,"data-form-type":"other"}),(0,n.jsx)("input",{type:"checkbox",name:"field_hp_check",checked:o,onChange:e=>c(e.target.checked),tabIndex:-1,style:{position:"absolute",left:"-9999px",width:"1px",height:"1px",opacity:0,pointerEvents:"none"},"aria-hidden":"true","data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":!0,"data-protonpass-ignore":!0,"data-form-type":"other"}),(0,n.jsx)(g.Text,{fw:700,fz:{base:"2rem",md:"xl"},lh:{base:"0.8",md:"1"},mb:"md",ta:"left",children:t("title")}),(0,n.jsx)(g.Text,{c:"dimmed",fz:"md",lh:"1.2",mb:"1.5rem",ta:"left",children:t("subtitle")}),(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(R.ks,{autoComplete:"email",control:k,id:"forgot-password-email",mb:2,name:"email",withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:t("emailPlaceholder")}),radius:e.radius.sm,required:!0,size:"md",type:"email",styles:{input:{height:56}}})}),(0,n.jsx)(O.A,{ref:h,error:p,onSuccess:x,onError:f,onExpire:v}),(0,n.jsx)(Y.Button,{bg:"brandBlue.8",c:"white",fw:700,fz:"1.25rem",mt:"2rem",radius:8,size:"lg",type:"submit",w:{base:"100%",md:"auto"},children:t(j?"loading":"submit")})]})})})},H=function(){let e=(0,N.xd)(),t=(0,M.c3)("user.auth.resetPassword"),r=(0,M.c3)("forms"),a=(0,i.useSearchParams)().get("token"),s=(0,d.rd)();(0,l.useEffect)(()=>{a||s.push({pathname:"/user/sign"})},[a,s]);let[o,c]=(0,l.useState)(!1),[,u]=(0,l.useState)(null),{control:h}=(0,P.mN)({defaultValues:{newPassword:"",confirmNewPassword:""},resolver:(0,I.u)(z.object({newPassword:z.string().min(8,r("password.min8")).regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,r("password.mustBeComplex")),confirmNewPassword:z.string().min(8,r("password.min8")).regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,r("password.mustBeComplex"))}).refine(e=>e.newPassword===e.confirmNewPassword,{message:r("password.mustMatch"),path:["confirmNewPassword"]}))}),[p,x]=(0,l.useState)(""),[f,v]=(0,l.useState)(!1),[w]=(0,l.useState)(Date.now());return(0,n.jsx)(b.Y,{h:{base:"100%",md:"100vh"},justify:"center",w:{base:"90%",md:"60%"},style:{overflowY:"auto",overflowX:"hidden"},children:(0,n.jsx)(B.t,{maw:{base:"100%",md:"556px"},pt:{base:"0",md:"5rem"},w:{base:"100%",md:"80%"},children:(0,n.jsxs)(P.lV,{control:h,onSubmit:async e=>{if(p)return void console.info("Bot detected: text honeypot");if(f)return void console.info("Bot detected: checkbox honeypot");if(Date.now()-w<2e3)return void console.info("Bot detected: too fast");try{c(!0),u(null),await (0,T.xw)({password:e.data.newPassword,token:a}),s.push({pathname:"/user/sign",query:{success:(0,W.w)("password-reset-successfully")}})}catch(e){u(e instanceof Error?e.message:"Failed to login")}finally{c(!1)}},children:[(0,n.jsx)(g.Text,{fw:700,fz:{base:"2rem",md:"xl"},lh:{base:"0.8",md:"1"},mb:"1.5rem",ta:"left",children:t("title")}),(0,n.jsx)("input",{type:"text",name:"field_hp_url",value:p,onChange:e=>x(e.target.value),autoComplete:"one-time-code",tabIndex:-1,style:{position:"absolute",left:"-9999px",width:"1px",height:"1px",opacity:0,pointerEvents:"none"},"aria-hidden":"true","data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":!0,"data-protonpass-ignore":!0,"data-form-type":"other"}),(0,n.jsx)("input",{type:"checkbox",name:"field_hp_check",checked:f,onChange:e=>v(e.target.checked),tabIndex:-1,style:{position:"absolute",left:"-9999px",width:"1px",height:"1px",opacity:0,pointerEvents:"none"},"aria-hidden":"true","data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":!0,"data-protonpass-ignore":!0,"data-form-type":"other"}),(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(R.yA,{autoComplete:"new-password",control:h,id:"new-password",maxLength:32,mb:2,name:"newPassword",withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:t("newPasswordPlaceholder")}),radius:e.radius.sm,required:!0,size:"md",styles:{input:{height:56}}})}),(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(R.yA,{autoComplete:"confirm-new-password",control:h,id:"confirm-new-password",maxLength:32,mb:2,name:"confirmNewPassword",withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:t("confirmNewPasswordPlaceholder")}),radius:e.radius.sm,required:!0,size:"md",styles:{input:{height:56}}})}),(0,n.jsx)(Y.Button,{bg:"brandBlue.8",c:"white",fw:700,fz:"1.25rem",mt:"2rem",radius:8,size:"lg",type:"submit",w:{base:"100%",md:"auto"},children:t(o?"loading":"confirm")})]})})})};var G=r(71861),V=r.n(G),K=r(97844),$=r(61006),X=r(25140),J=r(97561);let Z=e=>{let{honeypot:t,honeypotCheckbox:r,formStartTime:n}=e;return t?"text-honeypot":r?"checkbox-honeypot":Date.now()-n<2e3?"too-fast":null},Q={EMAIL_NOT_VERIFIED:{en:"Please verify your email address.",bg:"Моля, потвърдете вашия имейл адрес."},INVALID_CREDENTIALS:{en:"Invalid email or password.",bg:"Невалиден имейл или парола."},LOCKED:{en:"Account temporarily locked due to too many failed login attempts. Please try again in 10 minutes.",bg:"Акаунтът Ви е временно заключен поради твърде много неуспешни опити за вход. Моля, опитайте отново след 10 минути."},CAPTCHA_FAILED:{en:"CAPTCHA verification failed. Please try again.",bg:"Неуспешна CAPTCHA проверка. Моля, опитайте отново."},CAPTCHA_EXPIRED:{en:"CAPTCHA expired. Please complete it again.",bg:"CAPTCHA изтече. Моля, опитайте отново."},CAPTCHA_REQUIRED:{en:"Please complete the CAPTCHA verification.",bg:"Моля, завършете CAPTCHA проверката."},DEFAULT:{en:"Something went wrong.",bg:"Възникна грешка."}},ee={QUERY_PARAMS:{SUCCESS:"success",INFO:"info"},SUCCESS_MESSAGES:{PASSWORD_RESET_SENT:"password-reset-sent",PASSWORD_RESET_SUCCESSFULLY:"password-reset-successfully",USER_CREATED_VERIFY_EMAIL:"user-created-ver
1ify-email",USER_VERIFIED_EMAIL:"user-verified-email"},INFO_MESSAGES:{LOGIN_NEEDED_CLAIMS:"login-needed-claims"}};var et=r(72149),er=r(55338);function en(e){let{title:t,msg:r}=e;return(0,n.jsx)(et.F,{title:t,radius:4,bg:"#e7f5ff",variant:"light",icon:(0,n.jsx)(er.A,{size:20}),mb:"lg",styles:{title:{color:"#1c7ed6",fontWeight:700},icon:{color:"#1c7ed6"}},children:(0,n.jsx)(b.Y,{align:"center",gap:"sm",children:(0,n.jsx)(g.Text,{size:"sm",children:r})})})}var el=r(2257);function ei(e){let{success:t}=e,r=(0,M.c3)("user.auth.login");return t&&({[ee.SUCCESS_MESSAGES.PASSWORD_RESET_SENT]:(0,n.jsx)(el.n,{title:r("passwordResetSentTitle"),msg:r("passwordResetSent")}),[ee.SUCCESS_MESSAGES.PASSWORD_RESET_SUCCESSFULLY]:(0,n.jsx)(el.n,{title:r("passwordResetSuccessfullyTitle"),msg:r("passwordResetSuccessfully")}),[ee.SUCCESS_MESSAGES.USER_CREATED_VERIFY_EMAIL]:(0,n.jsx)(el.n,{title:r("confirmEmailTitle"),msg:r("confirmEmail")}),[ee.SUCCESS_MESSAGES.USER_VERIFIED_EMAIL]:(0,n.jsx)(el.n,{title:r("verifiedEmailTitle"),msg:r("verifiedEmail")})})[t]||null}let ea={position:"absolute",left:"-9999px",width:"1px",height:"1px",opacity:0,pointerEvents:"none"};function es(e){let{honeypot:t,honeypotCheckbox:r,onHoneypotChange:l,onHoneypotCheckboxChange:i}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("input",{type:"text",name:"field_hp_url",value:t,onChange:e=>l(e.target.value),autoComplete:"one-time-code",tabIndex:-1,style:ea,"aria-hidden":"true","data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":!0,"data-protonpass-ignore":!0,"data-form-type":"other"}),(0,n.jsx)("input",{type:"checkbox",name:"field_hp_check",checked:r,onChange:e=>i(e.target.checked),tabIndex:-1,style:ea,"aria-hidden":"true","data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":!0,"data-protonpass-ignore":!0,"data-form-type":"other"})]})}var eo=r(13956),ed=r(77592),ec=r(50055),eu=r(30643),em=r(85109),eh=r(83844);function ep(e){let{control:t,onSubmit:r,profileError:l,isSubmitting:i,locale:a,theme:s,minBirthDate:o,maxBirthDate:d,parseDateInput:c,trigger:u,t:h,profileTranslations:p}=e;return(0,n.jsxs)(P.lV,{control:t,onSubmit:r,children:[(0,n.jsx)(g.Text,{fw:700,fz:{base:"2rem",md:"xl"},lh:{base:"0.8",md:"1"},mb:"md",ta:"left",children:h("completeProfileTitle")}),(0,n.jsx)(g.Text,{c:"dimmed",fz:"md",lh:"1.2",mb:"1.5rem",ta:"left",children:h("completeProfileSubtitle")}),(0,n.jsx)(P.xI,{name:"gender",control:t,render:e=>{let{field:t,fieldState:r}=e;return(0,n.jsxs)(m.Flex,{w:"100%",pos:"relative",direction:"column",mb:12,children:[(0,n.jsxs)(b.Y,{children:[(0,n.jsx)(ed.s,{value:"Male",label:p("male"),checked:"Male"===t.value,onChange:()=>t.onChange("Male")}),(0,n.jsx)(ed.s,{value:"Female",label:p("female"),checked:"Female"===t.value,onChange:()=>t.onChange("Female")})]}),r.error&&(0,n.jsx)(g.Text,{c:"red",size:"sm",mt:4,children:r.error.message})]})}}),(0,n.jsx)(P.xI,{name:"firstName",control:t,render:e=>{var r;let{field:l,fieldState:i}=e;return(0,n.jsxs)(ec.x,{gutter:"lg",mt:"sm",children:[(0,n.jsx)(ec.x.Col,{span:{base:12,md:6},py:3,children:(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(eu.k,{...l,id:"complete-profile-first-name",mb:2,withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:"".concat(p("firstName"),"*")}),radius:s.radius.sm,size:"md",styles:{input:{height:56}},required:!0,error:null==(r=i.error)?void 0:r.message})})}),(0,n.jsx)(ec.x.Col,{span:{base:12,md:6},py:3,children:(0,n.jsx)(P.xI,{name:"lastName",control:t,render:e=>{var t;let{field:r,fieldState:l}=e;return(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(eu.k,{...r,id:"complete-profile-last-name",mb:2,withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:"".concat(p("lastName"),"*")}),radius:s.radius.sm,size:"md",styles:{input:{height:56}},required:!0,error:null==(t=l.error)?void 0:t.message})})}})})]})}}),(0,n.jsxs)(ec.x,{mt:"sm",children:[(0,n.jsx)(ec.x.Col,{span:{base:12,md:6},py:3,children:(0,n.jsx)(P.xI,{name:"birthDate",control:t,render:e=>{var t;let{field:r,fieldState:l}=e;return(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(eo.J,{clearable:!0,dateParser:c,defaultLevel:"decade",defaultValue:d,error:null==(t=l.error)?void 0:t.message,locale:a,maxDate:d,minDate:o,onChange:e=>{r.onChange(e||"")},onBlur:e=>{let t=e.currentTarget.value;if(t){let e=c(t);e&&r.onChange(V()(e).format("YYYY-MM-DD"))}u("birthDate")},withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:"".concat(p("birthDate"),"*")}),radius:s.radius.sm,required:!0,size:"md",value:r.value?V()(r.value).toDate():null,valueFormat:"DD.MM.YYYY",className:"form-input"})})}})}),(0,n.jsx)(ec.x.Col,{span:{base:12,md:6},py:3,children:(0,n.jsx)(P.xI,{name:"nationality",control:t,render:e=>{let{field:t,fieldState:r}=e;return(0,n.jsx)(em.A,{field:t,fieldState:r,id:"complete-profile",label:"".concat(p("nationality"),"*")})}})})]}),(0,n.jsx)(P.xI,{name:"phoneNumber",control:t,render:e=>{var r;let{field:l,fieldState:i}=e;return(0,n.jsxs)(ec.x,{mt:"sm",children:[(0,n.jsx)(ec.x.Col,{h:"100%",span:{base:5.2,md:4},py:3,children:(0,n.jsx)(P.xI,{control:t,name:"phoneCode",render:e=>{let{field:t,fieldState:r}=e;return(0,n.jsx)(eh.A,{field:t,fieldState:r,id:"complete-profile"})}})}),(0,n.jsx)(ec.x.Col,{span:{base:6.8,md:8},py:3,children:(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(eu.k,{...l,id:"complete-profile-phone",mb:2,withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:"".concat(p("phoneNumber"),"*")}),radius:s.radius.sm,size:"md",styles:{input:{height:56}},required:!0,error:null==(r=i.error)?void 0:r.message})})})]})}}),l&&(0,n.jsx)(g.Text,{c:"red",mt:"md",children:l}),(0,n.jsx)(Y.Button,{type:"submit",bg:"brandBlue.8",c:"white",fw:700,fz:"1.25rem",mt:{base:"2rem",md:"3.75rem"},mb:{base:"2rem",md:"3rem"},radius:8,size:"lg",w:{base:"100%",md:"auto"},loading:i,disabled:i,children:h("continue")})]})}
1var ex=r(92585),eg=r(80332);let ef=function(e){var t;let{switchForm:r}=e,a=(0,N.xd)(),s=(0,E.Ym)(),o=(0,d.rd)(),c=(0,i.useSearchParams)(),u=(0,W.s)(c.get(ee.QUERY_PARAMS.SUCCESS)),h=(0,W.s)(c.get(ee.QUERY_PARAMS.INFO)),{isAuthenticated:p,authenticate:x,user:f,setAuthUser:v}=(0,D.A)(),w=(0,M.c3)("user.auth.login"),y=(0,M.c3)("forms"),j=(0,M.c3)("user.profile.editData"),[C,S]=(0,l.useState)(!1),[k,F]=(0,l.useState)(!1),[A,q]=(0,l.useState)(!1),[H,G]=(0,l.useState)(null),[et,er]=(0,l.useState)(null),[el,ea]=(0,l.useState)(!1),[eo,ed]=(0,l.useState)(null),[ec,eu]=(0,l.useState)("idle"),[em,eh]=(0,l.useState)(null),{honeypot:ef,honeypotCheckbox:eb,formStartTime:ev,setHoneypot:ew,setHoneypotCheckbox:ey}=function(){let[e,t]=(0,l.useState)(""),[r,n]=(0,l.useState)(!1),[i]=(0,l.useState)(Date.now());return{honeypot:e,honeypotCheckbox:r,formStartTime:i,setHoneypot:t,setHoneypotCheckbox:n}}(),{widgetRef:ej,turnstileError:eC,onSuccess:eS,onError:ek,onExpire:eE,resetTurnstile:eF,validateTurnstile:eA}=(0,U.A)(),{control:eD}=(0,P.mN)({defaultValues:{email:"",password:""},resolver:(0,I.u)(z.object({email:z.email(y("emailInvalid")).min(1,y("required")),password:z.string().min(1,y("required"))}))}),e_=null!=(t=(0,P.FH)({control:eD,name:"email"}))?t:"",eT=null!==eo&&e_.trim().toLowerCase()===eo.trim().toLowerCase(),ez=(0,l.useMemo)(()=>(0,eg.r)(y),[y]),eY=V()().subtract(100,"year").toDate(),eI=V()().subtract(16,"year").toDate(),eN=(0,l.useMemo)(()=>{if(!(null==f?void 0:f.birthDate))return"";let e=V()(f.birthDate);return e.isValid()?e.format("YYYY-MM-DD"):""},[null==f?void 0:f.birthDate]),{control:eB,reset:eM,trigger:eP}=(0,P.mN)({defaultValues:{gender:(null==f?void 0:f.gender)==="Male"||(null==f?void 0:f.gender)==="Female"?f.gender:"",firstName:(null==f?void 0:f.firstName)||"",lastName:(null==f?void 0:f.lastName)||"",birthDate:eN,nationality:(null==f?void 0:f.nationality)||"",phoneCode:(null==f?void 0:f.phoneCode)||"BG",phoneNumber:(null==f?void 0:f.phoneNumber)||""},resolver:(0,I.u)(ez)}),eR=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(!el){eR.current=!1;return}eR.current||(eM({gender:(null==f?void 0:f.gender)==="Male"||(null==f?void 0:f.gender)==="Female"?f.gender:"",firstName:(null==f?void 0:f.firstName)||"",lastName:(null==f?void 0:f.lastName)||"",birthDate:eN,nationality:(null==f?void 0:f.nationality)||"",phoneCode:(null==f?void 0:f.phoneCode)||"BG",phoneNumber:(null==f?void 0:f.phoneNumber)||""}),eR.current=!0)},[el,f,eM,eN]),(0,l.useEffect)(()=>{if(p&&!A){if((0,_.eO)(f).length>0)return void ea(!0);ea(!1),o.refresh(),o.push("/")}},[p,f,o,A]);let eL=(0,J.S)(),eO=(0,l.useCallback)(async e=>{let t=Z({honeypot:ef,honeypotCheckbox:eb,formStartTime:ev});if(t)return void console.info("Bot detected: ".concat(t));let r=eA();if(r)try{S(!0),G(null),eu("idle"),eh(null);let t=await x(e.data.email,e.data.password,r);if((0,_.eO)(t).length>0)return void ea(!0);h===ee.INFO_MESSAGES.LOGIN_NEEDED_CLAIMS&&await eL(e.data.email),o.refresh(),o.push("/")}catch(t){G(((e,t)=>{let r=e instanceof Error&&e.message in Q?e.message:"DEFAULT";return Q[r][t]})(t,s)),t instanceof Error&&"EMAIL_NOT_VERIFIED"===t.message?ed(e.data.email.trim()):ed(null),eu("idle"),eF()}finally{S(!1)}},[ef,eb,ev,x,h,eL,o,s,eA,eF]),eU=(0,l.useCallback)(()=>{o.push("/user/forgot-password")},[o]),eW=(0,l.useCallback)(async()=>{if(!eo)return;let e=eA();if(e){eu("loading"),eh(null);try{await (0,T.nA)({email:eo,turnstileToken:e,locale:s}),eu("sent"),eF()}catch(e){e instanceof T.UQ&&"RESEND_VERIFICATION_RATE_LIMIT"===e.code&&null!=e.retryAfterSeconds?(eh(Math.max(1,Math.ceil(e.retryAfterSeconds/60))),eu("rateLimited")):eu("error"),eF()}}},[s,eF,eA,eo]),eq=h===ee.INFO_MESSAGES.LOGIN_NEEDED_CLAIMS,eH=(0,l.useCallback)(async e=>{try{er(null),F(!0);let t=await (0,T.Rb)(e.data);v(t.user),q(!0),o.refresh(),o.push("/")}catch(e){er(e instanceof Error?e.message:w("completeProfileUpdateFailed"))}finally{F(!1)}},[o,v,w]);return(0,n.jsx)(b.Y,{h:{base:"100%",md:"100vh"},justify:"center",w:{base:"90%",md:"60%"},style:{overflowY:"auto",overflowX:"hidden"},children:(0,n.jsxs)(B.t,{maw:{base:"100%",md:"556px"},pt:{base:"0",md:"5rem"},w:{base:"100%",md:"80%"},children:[eq&&(0,n.jsx)(en,{title:w("loginNeededClaimsTitle"),msg:w("loginNeededClaims")}),(0,n.jsx)(ei,{success:u}),el||A?(0,n.jsx)(ep,{control:eB,onSubmit:eH,profileError:et,isSubmitting:k,locale:s,theme:a,minBirthDate:eY,maxBirthDate:eI,parseDateInput:e=>(0,ex.L6)(e,{locale:s,minDate:eY,maxDate:eI}),trigger:eP,t:w,profileTranslations:j}):(0,n.jsxs)(P.lV,{control:eD,onSubmit:eO,children:[(0,n.jsx)(es,{honeypot:ef,honeypotCheckbox:eb,onHoneypotChange:ew,onHoneypotCheckboxChange:e
1y}),(0,n.jsx)(g.Text,{fw:700,fz:{base:"2rem",md:"xl"},lh:{base:"0.8",md:"1"},mb:"md",ta:"left",children:w("title")}),(0,n.jsxs)(g.Text,{c:"dimmed",fz:"md",lh:"1.2",mb:"1.5rem",ta:"left",children:[w("subtitle")," ",(0,n.jsx)(K.N,{c:"brandBlue.8",onClick:r,style:{textDecoration:"underline",textUnderlineOffset:"0.25rem"},children:w("createAccount")})]}),(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(R.ks,{autoComplete:"email",control:eD,id:"login-email",mb:2,name:"email",withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:w("emailPlaceholder")}),radius:a.radius.sm,size:"md",type:"email",styles:{input:{height:56}},required:!0})}),(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(R.yA,{autoComplete:"current-password",control:eD,id:"login-password",maxLength:32,mb:16,name:"password",withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:w("passwordPlaceholder")}),radius:a.radius.sm,size:"md",styles:{input:{height:56}},required:!0})}),(0,n.jsxs)(b.Y,{justify:"space-between",mb:24,children:[(0,n.jsx)($.S,{c:"gray.7",label:w("rememberMe"),styles:{label:{fontSize:"1rem"}}}),(0,n.jsx)(K.N,{c:"brandBlue.8",style:{fontSize:"1rem"},onClick:eU,children:w("forgotPassword")})]}),(0,n.jsx)(O.A,{ref:ej,error:eC,onSuccess:eS,onError:ek,onExpire:eE}),H&&(0,n.jsxs)(X.Stack,{gap:"sm",mt:"md",children:[(0,n.jsx)(g.Text,{c:"red",children:H}),eT&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.Text,{c:"dimmed",size:"sm",children:w("confirmEmailResendHint")}),(0,n.jsx)(K.N,{c:"brandBlue.8",disabled:"loading"===ec,onClick:eW,style:{textDecoration:"underline",textUnderlineOffset:"0.25rem",alignSelf:"flex-start"},type:"button",children:"loading"===ec?w("resendVerificationLoading"):w("resendVerificationLink")}),"sent"===ec&&(0,n.jsx)(g.Text,{c:"dimmed",size:"sm",children:w("resendVerificationSent")}),"rateLimited"===ec&&null!=em&&(0,n.jsx)(g.Text,{c:"dimmed",size:"sm",children:w("resendVerificationRateLimited",{minutes:em})}),"error"===ec&&(0,n.jsx)(g.Text,{c:"red",size:"sm",children:w("resendVerificationError")})]})]}),(0,n.jsx)(Y.Button,{type:"submit",bg:"brandBlue.8",c:"white",fw:700,fz:"1.25rem",mb:"xl",mt:{base:"2rem",md:"3.75rem"},radius:8,size:"lg",w:{base:"100%",md:"auto"},loading:C,disabled:C,children:w("loginButton")})]})]})})};var eb=r(43067),ev=r.n(eb);r(14462);let ew=["DD.MM.YYYY","DD.MM.YY","D.M.YYYY","D.M.YY","DD/MM/YYYY","DD/MM/YY","D/M/YYYY","D/M/YY"],ey=["DD/MM/YYYY","DD/MM/YY","D/M/YYYY","D/M/YY","DD.MM.YYYY","DD.MM.YY","D.M.YYYY","D.M.YY"],ej=async e=>{let{email:t,locale:r}=e;(await fetch("/api/newsletter-subscribe-public",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,lang:"bg"===r?"bg-BG":"en-US",type:"Register Subscribed"})})).ok||console.error("Newsletter subscribe during registration failed")},eC={EMAIL_ALREADY_EXISTS:{en:"Email already exists.",bg:"Имейл адресът вече съществува."},CAPTCHA_FAILED:{en:"CAPTCHA verification failed. Please try again.",bg:"Неуспешна CAPTCHA проверка. Моля, опитайте отново."},CAPTCHA_EXPIRED:{en:"CAPTCHA expired. Please complete it again.",bg:"CAPTCHA изтече. Моля, опитайте отново."},CAPTCHA_REQUIRED:{en:"Please complete the CAPTCHA verification.",bg:"Моля, завършете CAPTCHA проверката."},DEFAULT:{en:"Something went wrong.",bg:"Възникна грешка."}};function eS(e){let{redirectToLogin:t}=e,r=(0,E.Ym)(),i="bg"===r?"bg":"en",a=(0,N.xd)(),s=(0,M.c3)("user.auth.register"),o=(0,M.c3)("forms"),c=(0,d.rd)(),[u,h]=(0,l.useState)(""),[p,x]=(0,l.useState)(!1),[f]=(0,l.useState)(Date.now()),{widgetRef:v,turnstileError:w,onSuccess:y,onError:j,onExpire:C,resetTurnstile:S,validateTurnstile:k}=(0,U.A)(),[F,A]=(0,l.useState)(!1),[D,_]=(0,l.useState)(null),{control:B,trigger:q}=(0,P.mN)({defaultValues:{confirmPassword:"",birthDate:"",email:"",firstName:"",lastName:"",nationality:"",newsletter:!1,password:"",phoneCode:"BG",phoneNumber:"",terms:!1,gender:""},mode:"onBlur",reValidateMode:"onChange",resolver:(0,I.u)(z.object({confirmPassword:z.string(),email:z.email(o("emailInvalid")),...(0,eg.J)(o),newsletter:z.boolean().optional(),password:z.string().min(8,o("password.min8")).regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,o("password.mustBeComplex")),phoneCode:z.string().min(1,o("required")),terms:z.boolean().refine(e=>!0===e,{message:o("agreeToTerms")})}).refine(e=>e.password===e.confirmPassword,{message:o("password.mustMatch"),path:["confirmPassword"]}))}
1),H=e=>((e,t)=>{if(!e||"string"!=typeof e)return null;let r=e.trim();if(!r)return null;let n=V()().subtract(16,"year").toDate(),l=V()().subtract(100,"year").toDate();if(/^\d+$/.test(r)){if(8===r.length){let e=parseInt(r.substring(0,2),10),t=parseInt(r.substring(2,4),10),i=parseInt(r.substring(4,8),10);if(e>=1&&e<=31&&t>=1&&t<=12){let r=V()("".concat(i,"-").concat(t.toString().padStart(2,"0"),"-").concat(e.toString().padStart(2,"0")));if(r.isValid()){let e=r.toDate();if(e<=n&&e>=l)return e}}}else if(6===r.length){let e=parseInt(r.substring(0,2),10),t=parseInt(r.substring(2,4),10),i=parseInt(r.substring(4,6),10);if(e>=1&&e<=31&&t>=1&&t<=12){let r=V()("".concat(i<50?2e3+i:1900+i,"-").concat(t.toString().padStart(2,"0"),"-").concat(e.toString().padStart(2,"0")));if(r.isValid()){let e=r.toDate();if(e<=n&&e>=l)return e}}}}let i=r.match(/^(\d{1,2})[./-](\d{1,2})[./-](\d{2,4})$/);if(i){let[,e,t,r]=i,a=parseInt(e,10),s=parseInt(t,10),o=parseInt(r,10);if(2===r.length&&(o=o<50?2e3+o:1900+o),a>=1&&a<=31&&s>=1&&s<=12&&o>=1900&&o<=2100){let e="".concat(o,"-").concat(s.toString().padStart(2,"0"),"-").concat(a.toString().padStart(2,"0")),t=V()(e,"YYYY-MM-DD",!0);if(t.isValid()){let e=t.toDate();if(e<=n&&e>=l)return e}}}for(let e of"bg"===t?ew:ey){let t=V()(r,e,!0);if(t.isValid()){let e=t.toDate();if(e<=n&&e>=l)return e}}return null})(e,i);return(0,n.jsxs)(P.lV,{control:B,onSubmit:async e=>{let t=Z({honeypot:u,honeypotCheckbox:p,formStartTime:f});if(t)return void console.info("Bot detected: ".concat(t));let r=k();if(r)try{A(!0),_(null),await (0,T.kz)({...e.data,turnstileToken:r},i),e.data.newsletter&&await ej({email:e.data.email,locale:i}),c.push({pathname:"/user/sign",query:{success:(0,W.w)("user-created-verify-email")}})}catch(e){_(((e,t)=>{let r=e instanceof Error&&e.message in eC?e.message:"DEFAULT";return eC[r][t]})(e,i)),S()}finally{A(!1)}},children:[(0,n.jsx)("input",{type:"text",name:"field_hp_url",value:u,onChange:e=>h(e.target.value),autoComplete:"one-time-code",tabIndex:-1,style:{position:"absolute",left:"-9999px",width:"1px",height:"1px",opacity:0,pointerEvents:"none"},"aria-hidden":"true","data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":!0,"data-protonpass-ignore":!0,"data-form-type":"other"}),(0,n.jsx)("input",{type:"checkbox",name:"field_hp_check",checked:p,onChange:e=>x(e.target.checked),tabIndex:-1,style:{position:"absolute",left:"-9999px",width:"1px",height:"1px",opacity:0,pointerEvents:"none"},"aria-hidden":"true","data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":!0,"data-protonpass-ignore":!0,"data-form-type":"other"}),(0,n.jsxs)(ec.x,{gutter:"lg",mt:"sm",children:[(0,n.jsx)(ec.x.Col,{span:12,children:(0,n.jsx)(P.xI,{name:"gender",control:B,render:e=>{let{field:t,fieldState:r}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(b.Y,{mt:"xs",children:[(0,n.jsx)(ed.s,{value:"male",label:s("male"),labelPosition:"left",checked:"Male"===t.value,onChange:()=>t.onChange("Male"),c:"gray.7",fw:"600"}),(0,n.jsx)(ed.s,{value:"female",label:s("female"),labelPosition:"left",checked:"Female"===t.value,onChange:()=>t.onChange("Female"),c:"gray.7",fw:"600"})]}),r.error&&(0,n.jsx)(g.Text,{c:"red",size:"sm",mt:4,children:r.error.message})]})}})}),(0,n.jsx)(ec.x.Col,{span:{base:12,md:6},py:3,children:(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(R.ks,{control:B,id:"register-first-name",name:"firstName",withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:s("name")}),radius:a.radius.sm,required:!0,size:"md",className:"form-input"})})}),(0,n.jsx)(ec.x.Col,{span:{base:12,md:6},py:3,children:(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(R.ks,{control:B,id:"register-last-name",name:"lastName",withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:s("surname")}),radius:a.radius.sm,required:!0,size:"md",className:"form-input"})})})]}),(0,n.jsxs)(ec.x,{mt:"sm",children:[(0,n.jsx)(ec.x.Col,{span:{base:12,md:6},py:3,children:(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(P.xI,{control:B,name:"birthDate",render:e=>{var t;let{field:l,fieldState:i}=e;return(0,n.jsx)(eo.J,{clearable:!0,dateParser:H,defaultLevel:"decade",defaultValue:V()().subtract(16,"year").toDate(),error:null==(t=i.error)?void 0:t.message,locale:r,maxDate:V()().subtract(16,"year").toDate(),minDate:V()().subtract(100,"year").toDate(),onChange:e=>{l.onChange(e||"")},onBlur:e=>{let t=e.currentTarget.value;if(t){let e=H(t);e&&l.onChange(V()(e).format("YYYY-MM-DD"))}q("birthDate")},withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:s("birthDate")}),radius:a.radius.sm,required:!0,size:"md",value:l.value?V()(l.value).toDate():null,valueFormat:"DD.MM.YYYY",className:"form-input"})}})})}),(0,n.jsx)(ec.x.Col,{span:{base:12,md:6},py:3,children:(0,n.jsx)(P.xI,{control:B,name:"nationality",render:e=>{let{field:t,fieldState:r}=e;return(0,n.jsx)(em.A,{field:t,fieldState:r,id:"register-personal",label:s("nationality")})}})})]}),(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",mt:"sm",direction:"column",children:(0,n.jsx)(R.ks,{control:B,id:"register-email",name:"email",withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:s("emailAddress"),top:"auto"}),radius:a.radius.sm,required:!0,size:"md",type:"email",className:"form-input"})}),(0,n.jsxs)(ec.x,{mt:"sm",children:[(0,n.jsx)(ec.x.Col,{h:"100%",span:{base:5.2,md:4},py:3,children:(0,n.jsx)(P.xI,{control:B,name:"phoneCode",render:e=>{let{field:t,fieldState:r}=e;return(0,n.jsx)(eh.A,{field:t,fieldState:r,id:"register-personal"})}})}),(0,n.jsx)(ec.x.Col,{span:{base:6.8,md:8},py:3,children:(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(R.ks,{control:B,id:"register-phone",name:"phoneNumber",withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:s("phoneNumber")}),radius:a.radius.sm,required:!0,size:"md",type:"tel",className:"form-input"})})})]}),(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",mt:"sm",direction:"column",children:(0,n.jsx)(R.yA,{control:B,id:"register-password",maxLength:32,name:"password",onChange:()=>q("confirmPassword"),withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:s("password"),top:"auto"}),radius:a.radius.sm,required:!0,size:"md",styles:{input:{height:56}}})}),(0,n.jsx)(m.Flex,{w:"100%",pos:"relative",mt:"0",direction:"column",children:(0,n.jsx)(R.yA,{control:B,id:"register-confirm-password",maxLength:32,name:"confirmPassword",onChange:()=>q("password"),withAsterisk:!1,label:(0,n.jsx)(L.Y,{text:s("repeatPassword"),top:"auto"}),radius:a.radius.sm,required:!0,size:"md",styles:{input:{height:56}}})}),(0,n.jsx)(P.xI,{control:B,name:"terms",render:e=>{var t;let{field:r,fieldState:l}=e;
1return(0,n.jsx)($.S,{c:"gray.7",checked:r.value,error:null==(t=l.error)?void 0:t.message,id:"register-terms",label:(0,n.jsxs)(n.Fragment,{children:[s("termsAgreement")," ",(0,n.jsx)(K.N,{component:ev(),href:"/general-terms-and-conditions",target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"underline",textUnderlineOffset:"0.25rem",fontSize:"1rem"},children:s("termsAndConditions")})]}),styles:{label:{fontSize:"1rem"}},mt:"24px",onChange:e=>r.onChange(e.currentTarget.checked)})}}),(0,n.jsx)(P.xI,{control:B,name:"newsletter",render:e=>{let{field:t}=e;return(0,n.jsx)($.S,{c:"gray.7",checked:t.value,label:s("newsletter"),mt:"16px",styles:{label:{fontSize:"1rem"}},onChange:e=>t.onChange(e.currentTarget.checked)})}}),(0,n.jsx)(O.A,{ref:v,error:w,onSuccess:y,onError:j,onExpire:C}),(0,n.jsx)(g.Text,{c:"red",mt:"md",children:D||" "}),(0,n.jsx)(Y.Button,{type:"submit",bg:"brandBlue.8",c:"white",fw:700,fz:"1.25rem",mt:{base:"2rem",md:"3rem"},mb:"xl",radius:8,size:"lg",w:{base:"100%",md:"auto"},children:F?s("loading"):s("signUp")})]})}let ek=function(e){let{switchForm:t}=e,r=(0,M.c3)("user.auth.register");return(0,n.jsx)(b.Y,{h:{base:"100%",md:"100vh"},justify:"center",w:{base:"90%",md:"60%"},style:{overflowY:"auto",overflowX:"hidden"},children:(0,n.jsxs)(B.t,{maw:{base:"100%",md:"556px"},pt:{base:"0",md:"5rem"},w:{base:"100%",md:"80%"},children:[(0,n.jsx)(g.Text,{fw:700,fz:{base:"2rem",md:"xl"},lh:{base:"0.8",md:"1"},mb:"md",ta:"left",children:r("title")}),(0,n.jsxs)(g.Text,{c:"dimmed",fz:"md",lh:"1.2",mb:"2.5rem",ta:"left",children:[r("subtitle")," ",(0,n.jsx)(K.N,{c:"brandBlue.8",onClick:t,style:{textDecoration:"underline",textUnderlineOffset:"0.25rem"},children:r("logIn")})]}),(0,n.jsx)(eS,{redirectToLogin:t})]})})};var eE=r(78477),eF=r(59063),eA=r(43543);let eD=193/34,e_=e=>{let{locale:t="en",height:r,width:l,...i}=e,a=null!=r?r:34,s=null!=l?l:Math.round(a*eD);return(0,n.jsx)(eF.Image,{...i,alt:"Bulgaria Air Logo",width:s,height:a,component:eA.default,decoding:"async",src:"/media/logo/bg-air-dark-".concat(t,".svg")})};var eT=r(5805);let ez={facebook:(0,n.jsx)(y.A,{size:20}),instagram:(0,n.jsx)(j.A,{size:20}),linkedin:(0,n.jsx)(C.A,{size:20}),x:(0,n.jsx)(S.A,{size:20}),youtube:(0,n.jsx)(k.A,{size:20})};function eY(e){var t,r,a,s,o,y;let{data:j}=e,{hideModal:C,showModal:S,isOpen:k}=(0,l.useContext)(c.P),{isAuthenticated:T,user:z}=(0,D.A)(),Y=(0,i.usePathname)(),I=(0,i.useRouter)(),N=(0,E.Ym)(),B=(0,l.useMemo)(()=>Y.includes("/forgot-password"),[Y]),M=(0,l.useMemo)(()=>Y.includes("/reset-password"),[Y]),P=(0,l.useMemo)(()=>Y.includes("/sign"),[Y]),R=(0,l.useMemo)(()=>Y.includes("/register"),[Y]),L=(0,F.U)("(max-width: 768px)"),O=(0,A.A)(),[U,W]=(0,l.useState)(!0),G=(0,l.useMemo)(()=>B?q:M?H:!U||R?ek:ef,[B,M,R,U]);return((0,l.useEffect)(()=>{(B||M||R)&&S(),P&&(T?(0,_.fu)(z)?S():C():S()),R?W(!1):W(!0)},[B,M,P,R,T,z,S,C]),j)?(0,n.jsx)(u.a,{fullScreen:!0,onClose:C,opened:k,padding:0,withCloseButton:!1,children:(0,n.jsxs)(m.Flex,{align:"center",direction:{base:"column",md:"row"},justify:"flex-start",w:"100%",children:[!O&&(0,n.jsx)(h.s,{onClick:()=>{C()},pos:"absolute",right:L?(0,p.D)(15):(0,p.D)(40),size:"lg",top:(0,p.D)(16)}),(0,n.jsxs)(x.Box,{bgsz:"cover",h:"100vh",pos:"relative",style:{backgroundImage:"url(".concat((0,eT.R9)(null==j?void 0:j.backgroundImage,3840),")"),display:"flex",flexDirection:"column",justifyContent:"space-between"},top:0,visibleFrom:"md",w:"40%",children:[(0,n.jsx)(x.Box,{pl:{md:40,lg:72},pr:{md:40,lg:50},children:(0,n.jsx)(e_,{onClick:O?void 0:C,locale:N,w:"auto",h:75,style:{cursor:"pointer",mx:"0 !important"},mt:"sm"})}),(0,n.jsx)(x.Box,{pl:{md:40,lg:72},pr:{md:40,lg:50},children:(0,n.jsxs)(x.Box,{c:"#fff",children:[(0,n.jsx)(g.Text,{fw:700,lh:1.1,size:"3rem",children:null!=(o=null==j?void 0:j.mainHeading)?o:""}),(0,n.jsx)(g.Text,{mt:"md",size:"md",children:null!=(y=null==j?void 0:j.subHeading)?y:""})]})}),!O&&(0,n.jsx)(f.Container,{px:"md",size:"lg",style:{paddingBottom:(0,p.D)(20),zIndex:2},children:(0,n.jsxs)(b.Y,{gap:"xs",justify:"center",children:[null==j||null==(t=j.footerLinks)?void 0:t.map((e,t)=>{var r,i;return(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)(d.N_,{href:e.url,onClick:()=>{C()},style:{textDecoration:"none"},children:(0,n.jsx)(g.Text,{c:"gray.3",size:"sm",style:{cursor:"pointer"},children:e.label})}),t<(null!=(i=null==j||null==(r=j.footerLinks)?void 0:r.length)?i:0)-1&&(0,n.jsx)(g.Text,{c:"gray.3",size:"sm",children:"|"})]},e.label)}),null==(r=j.socialLinks)?void 0:r.map(e=>(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)(g.Text,{c:"gray.3",size:"sm",children:"|"}),(0,n.jsx)(v.M,{color:"gray.3",component:"a",href:e.url,rel:"noopener noreferrer",target:"_blank",size:"lg",variant:"subtle",children:ez[e.platform]})]},e.platform))]})})]}),(0,n.jsx)(f.Container,{hiddenFrom:"md",pb:"10px",size:"lg",children:(0,n.jsx)(eE.g,{locale:N,onClick:O?void 0:C,w:"auto",h:75,style:{cursor:"pointer"}})}),(0,n.jsx)(w.c,{hiddenFrom:"md",py:"xl",w:"100%"}),(0,n.jsx)(G,{switchForm:()=>{P||R?U?I.push("/user/register"):I.push("/user/sign"):W(e=>!e)}}),!O&&(0,n.jsx)(f.Container,{hiddenFrom:"md",mt:"xl",px:"md",size:"lg",children:(0,n.jsxs)(b.Y,{gap:"md",justify:"center",children:[null==j||null==(a=j.footerLinks)?void 0:a.map((e,t)=>{var r,i;return(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)(d.N_,{href:e.url,onClick:()=>{C()},style:{textDecoration:"none"},children:(0,n.jsx)(g.Text,{c:"gray.11",size:"sm",style:{cursor:"pointer"},children:e.label})}),t<(null!=(i=null==j||null==(r=j.footerLinks)?void 0:r.length)?i:0)-1&&(0,n.jsx)(g.Text,{c:"gray.11",size:"sm",children:"|"})]},e.label)}),null==(s=j.socialLinks)?void 0:s.map(e=>(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)(g.Text,{c:L?"gray.11":"gray.3",size:"sm",children:"|"}),(0,n.jsx)(v.M,{c:L?"gray.11":"gray.3",component:"a",href:e.url,rel:"noopener noreferrer",target:"_blank",size:"lg",variant:"subtle",children:ez[e.platform]})]},e.platform))]})})]})}):null}function eI(e){let{data:t}=e,[r,a]=(0,l.useState)(!1),s=(0,i.usePathname)(),d=s.includes("/user/sign")||s.includes("/user/register")||s.includes("/user/forgot-password")||s.includes("/user/reset-password");return((0,l.useEffect)(()=>{a(!0)},[]),r)?(0,n.jsx)(eY,{data:t}):d?(0,n.jsx)(o,{}):null}},10845:(e,t,r)=>{"use strict";r.d(t,{default:()=>p});
1var n=r(39586),l=r(56181),i=r(97844),a=r(33087),s=r(72643),o=r(96142),d=r(55338),c=r(16388),u=r(2410);let m=e=>{let{item:t,styles:r}=e,a=(0,n.jsx)(l.Text,{c:r.textColor,fw:700,fz:"var(--mantine-fontSizes-sm)",lh:"var(--mantine-lineHeights-sm)",children:t.text});return t.url?(0,n.jsx)(i.N,{component:"a",href:t.url,style:{color:r.textColor,textDecoration:"none"},target:t.newTab?"_blank":"_self",rel:t.newTab?"noopener noreferrer":void 0,children:a}):a},h=e=>{var t;let{item:r}=e,l=(0,a.xd)(),h=null!=(t=r.variant)?t:"warning",p=(0,u.useMemo)(()=>((e,t)=>{var r,n,l,i,a;let s={info:{bg:"#B6E7FF",borderColor:"#B6E7FF",iconColor:"#1E40AF",textColor:"#1E40AF"},warning:{bg:"#FFF4E5",borderColor:"#FFF4E5",iconColor:"#663C00",textColor:"#A1400B"},danger:{bg:"#FEE2E2",borderColor:"#FEE2E2",iconColor:"#991B1B",textColor:"#991B1B"}}[e],o=null!=(r=t.colors[e])?r:[];return{bg:null!=(n=o[0])?n:s.bg,borderColor:null!=(l=o[0])?l:s.borderColor,iconColor:null!=(i=o[1])?i:s.iconColor,textColor:null!=(a=o[2])?a:s.textColor}})(h,l),[h,l]),x=p.textColor,[g,f]=(0,u.useState)(!0),b=(0,u.useRef)(null),v=(0,u.useRef)(null),w=(0,u.useRef)(null),[y,j]=(0,u.useState)(!1),[C,S]=(0,u.useState)(2),[k,E]=(0,u.useState)(12),[F,A]=(0,u.useState)([]),D=(0,u.useRef)(0),_=()=>{var e,t,r,n,l;let i=null!=(n=null==(e=b.current)?void 0:e.offsetWidth)?n:0,a=null!=(l=null==(t=v.current)?void 0:t.offsetWidth)?l:0;if(!i||!a)return;j(a>i);let s=a+32;null==(r=w.current)||r.style.setProperty("--marquee-distance","".concat(s,"px")),S(Math.max(2,Math.ceil((i+s)/s)+1)),E(Number(Math.max(6,s/60).toFixed(2)))};return((0,u.useEffect)(()=>{_();let e=()=>_();window.addEventListener("resize",e);let t=b.current,r=v.current,n=new ResizeObserver(()=>_());return t&&n.observe(t),r&&n.observe(r),()=>{n.disconnect(),window.removeEventListener("resize",e)}},[r.text,r.url]),(0,u.useEffect)(()=>{let e=Math.max(0,C-1),t=[];for(let n=0;n<e;n+=1){let e=D.current;t.push("".concat(r.id,"-dup-").concat(e)),D.current+=1}A(t)},[C,r.id]),g)?(0,n.jsxs)(s.Flex,{direction:"row",align:"center",justify:"space-between",py:"sm",gap:"1rem",px:{base:"md",sm:"lg"},style:{backgroundColor:p.bg,borderBottom:"1px solid ".concat(p.borderColor),borderTop:"1px solid ".concat(p.borderColor),position:"relative",overflow:"hidden"},children:[(0,n.jsxs)(s.Flex,{direction:"row",gap:"1rem",align:"center",style:{flex:1,minWidth:0},children:["warning"===h||"danger"===h?(0,n.jsx)(o.A,{color:x,size:23,style:{flexShrink:0},"aria-hidden":"true"}):(0,n.jsx)(d.A,{color:x,size:23,style:{flexShrink:0},"aria-hidden":"true"}),(0,n.jsx)("div",{ref:b,className:"marquee",style:{flex:1,overflow:"hidden",minWidth:0},children:(0,n.jsxs)("div",{ref:w,className:"marquee__track",style:{display:"inline-flex",gap:"".concat(32,"px"),whiteSpace:"nowrap",willChange:"transform",animation:y?"marquee ".concat(k,"s linear infinite"):"none"},children:[(0,n.jsx)("div",{ref:v,className:"marquee__item",children:(0,n.jsx)(m,{item:r,styles:p})}),y?F.map(e=>(0,n.jsx)("div",{className:"marquee__item","aria-hidden":"true",children:(0,n.jsx)(m,{item:r,styles:p})},e)):null]})})]}),"info"===h?(0,n.jsx)(i.N,{onClick:()=>f(!1),style:{color:x,borderRadius:4,marginTop:"5px"},"aria-label":"Dismiss announcement",children:(0,n.jsx)(c.A,{size:16})}):null,(0,n.jsx)("style",{children:"\n                @keyframes marquee {\n                    0% { transform: translate3d(0, 0, 0); }\n                    100% { transform: translate3d(calc(-1 * var(--marquee-distance, 0px)), 0, 0); }\n                }\n                .marquee:hover .marquee__track {\n                    animation-play-state: paused;\n                }\n                .marquee__item > div > * {\n                    display: inline !important;\n                }\n                .marquee__item > div > p {\n                    display: inline !important;\n                    margin: 0 !important;\n                }\n                @media (prefers-reduced-motion: reduce) {\n                    .marquee__track {\n                        animation: none !important;\n                        transform: none !important;\n                    }\n                }\n            "})]}):null},p=e=>{let{items:t=[]}=e;return t.length?(0,n.jsx)(n.Fragment,{children:t.map(e=>(0,n.jsx)(h,{item:e},e.id))}):null}},12373:()=>{},13501:(e,t,r)=>{"use strict";r.d(t,{e:()=>i});var n=r(73671),l=r(85409);let i=(e,t)=>{if(!e||"string"!=typeof e)return"";t&&""!==t&&(t=encodeURIComponent(t));let r="https://media.air.bg";if(r&&(e.startsWith("/api/media/file/")||e.startsWith("/media/cms/"))){let n=e.split("/").pop(),l="".concat(r,"/media/cms/").concat(encodeURIComponent(n||""));return t?"".concat(l,"?").concat(t):l}if(e.startsWith("http://")||e.startsWith("https://")){let r=e.replace(/ /g,"%20");return t?"".concat(r,"?").concat(t):r}let i=n.A?(0,l.y)():(0,l._)();
1return t?"".concat(i).concat(e,"?").concat(t):"".concat(i).concat(e)}},19709:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(2410),l=r(9150);function i(){let e=(0,n.useRef)(null),t=(0,l.c3)("common"),[r,i]=(0,n.useState)(null),[a,s]=(0,n.useState)(null),o=(0,n.useCallback)(e=>{i(e),s(null)},[]),d=(0,n.useCallback)(()=>{i(null),s(t("captchaFailed"))},[t]),c=(0,n.useCallback)(()=>{i(null),s(t("captchaExpired"))},[t]),u=(0,n.useCallback)(()=>{var t;null==(t=e.current)||t.reset(),i(null),s(null)},[]),m=(0,n.useCallback)(()=>{var n,l;let i=null!=(l=null==(n=e.current)?void 0:n.getToken())?l:r;return i||(s(t("captchaRequired")),null)},[r,t]);return{widgetRef:e,turnstileToken:r,turnstileError:a,onSuccess:o,onError:d,onExpire:c,resetTurnstile:u,validateTurnstile:m}}},24359:(e,t,r)=>{"use strict";r.d(t,{M:()=>l});var n=r(19454);let l=(0,n.createServerReference)("7fe155354d7f4326b34e16777127c4cc64fe8c87ec",n.callServer,void 0,n.findSourceMapURL,"searchFlightsWithoutLoginServerAction")},34148:(e,t,r)=>{"use strict";r.d(t,{default:()=>B});var n=r(39586),l=r(21886),i=r(38895),a=r(56181),s=r(54529),o=r(35996),d=r(19792),c=r(1905);function u(){let e=(0,s.Ym)(),t=(0,o.useSelectedLayoutSegments)().join("/")||"",r="en"===e,u=(0,c.U)("(max-width: 768px)");return(0,n.jsxs)(i.Button,{"aria-label":r?"Switch language to Bulgarian":"Switch language to English",color:"dark",component:l.N_,fw:700,href:"/".concat(t),lh:"normal",locale:r?"bg":"en",lts:"0.04px",p:"0 0.2rem",variant:"subtle",bdrs:"2rem",style:{display:"flex",alignItems:"center",flexDirection:"row"},children:[(0,n.jsx)("span",{"aria-hidden":"true",children:(0,n.jsx)(d.A,{code:r?"BG":"GB-UKM",size:"m"})}),(0,n.jsx)(a.Text,{c:"gray.11",fw:"700",ml:"xs",size:"md",children:r?u?"Bulgarian":"BG":u?"English":"EN"})]})}var m=r(18277),h=r(91236),p=r(51218),x=r(72643),g=r(68076),f=r(25140),b=r(97844),v=r(82075),w=r(81358),y=r(41949),j=r(90231),C=r(78856),S=r(59063),k=r(2333),E=r(38554),F=r(19715),A=r(20531),D=r(99859),_=r(16388),T=r(9150),z=r(2410),Y=r(78477),I=r(5805);function N(){let e=(0,o.usePathname)();return(0,z.useEffect)(()=>{window.scrollTo({top:0,behavior:"instant"})},[e]),null}function B(e){var t,r;let{data:d}=e,B=(0,s.Ym)(),M=(0,o.usePathname)(),[P,R]=(0,z.useState)(!1),[L,O]=(0,z.useState)(null),[U,W]=(0,z.useState)(null),[q,H]=(0,z.useState)(!1),G=(0,c.U)("(max-width: 768px)"),V=(0,c.U)("(min-width: 769px) and (max-width: 1023px)"),K=(0,c.U)("(min-width: 1024px) and (max-width: 1230px)"),$=(0,c.U)("(min-width: 1236px) and (max-width: 1330px)"),X=(0,c.U)("(min-width: 1024px)"),J=(0,T.c3)("Header"),Z=(0,T.c3)("common"),Q=(0,l.rd)(),{isOpen:ee,hideModal:et,showModal:er}=(0,z.useContext)(p.P),{isAuthenticated:en,signOut:el,user:ei}=(0,m.A)(),ea=function(){let[e,t]=(0,z.useState)("up"),r=(0,z.useRef)(0);return(0,z.useEffect)(()=>{let e=()=>{let e=window.scrollY;e>r.current?t("down"):t("up"),r.current=e};return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]),e}();(0,z.useEffect)(()=>{en&&(0,h.fu)(ei)&&!M.includes("/user/sign")&&Q.push("/user/sign?completeProfile=1")},[en,ei,M,Q]);let es=(0,z.useMemo)(()=>(null==d?void 0:d.navItems)||[],[null==d?void 0:d.navItems]),eo=(0,z.useMemo)(()=>{var e,t,r,s;if(!L||0===es.length)return null;let o=es.find(e=>e.id===L);if(!o||!(null==(e=o.subItems)?void 0:e.subnav))return null;let d=null==(t=o.subItems)?void 0:t["nav-image"],c="string"==typeof d?null:d,u=(null==c?void 0:c.url)?(0,I.R9)(c,(0,I.s_)(600)):null;return(0,n.jsxs)(x.Flex,{gap:32,mt:"1rem",children:[(0,n.jsx)(g.Box,{style:{flex:1},children:(0,n.jsx)(x.Flex,{gap:48,children:o.subItems.subnav.map(e=>{var t;return(0,n.jsxs)(g.Box,{children:[(0,n.jsx)(a.Text,{c:"gray.11",fw:600,mb:16,children:e.title}),(0,n.jsxs)(f.Stack,{gap:"1rem",children:[null==(t=e.links)?void 0:t.map(e=>e.isExternal?(0,n.jsx)(b.N,{component:"a",href:e.link,rel:"noopener noreferrer",target:"_blank",children:(0,n.jsx)(a.Text,{c:"gray.7",fw:400,className:"header-dropdown-content-link",style:{lineHeight:"1.4",transition:"color 0.2s ease"},children:e.label})},e.id):(0,n.jsx)(b.N,{component:l.N_,href:e.link,children:(0,n.jsx)(a.Text,{c:"gray.7",className:"header-dropdown-content-link",fw:400,style:{lineHeight:"1.4",transition:"color 0.2s ease"},children:e.label})},e.id)),e.seeMoreLabel&&e.seeMoreLink&&(0,n.jsx)(g.Box,{mt:8,children:e.seeMoreIsExternal?(0,n.jsx)(i.Button,{component:"a",href:e.seeMoreLink,rel:"noopener noreferrer",target:"_blank",c:"gray.11",fw:400,size:"md",variant:"subtle",rightSection:(0,n.jsx)(g.Box,{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--mantine-color-gray-3)",borderRadius:"50%",padding:"4px"},children:(0,n.jsx)(A.A,{size:20,color:"#23292E"})}),styles:{root:{padding:"0",height:"auto"},label:{lineHeight:"1.4"},section:{backgroundColor:"var(--mantine-color-white, #FFFFFF)",borderRadius:"50%","&:hover":{backgroundColor:"var(--mantine-color-white, #FFFFFF)",borderRadius:"50%"}}},children:e.seeMoreLabel}):(0,n.jsx)(i.Button,{component:l.N_,href:e.seeMoreLink,c:"gray.11",fw:400,size:"md",variant:"subtle",rightSection:(0,n.jsx)(g.Box,{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--mantine-color-gray-3)",borderRadius:"50%",padding:"4px"},children:(0,n.jsx)(A.A,{size:20,color:"#23292E"})}),styles:{root:{padding:"0",height:"auto"},label:{lineHeight:"1.4"},section:{backgroundColor:"var(--mantine-color-white, #FFFFFF)",borderRadius:"50%","&:hover":{backgroundColor:"var(--mantine-color-white, #FFFFFF)",borderRadius:"50%"}}},children:e.seeMoreLabel})})]})]},e.id)})})}),u&&(0,n.jsxs)(g.Box,{h:"24rem",mb:16,p:"1.5rem",style:{backgroundImage:"url(".concat(u,")"),backgroundPosition:"center",backgroundSize:"cover",borderRadius:"8px"},w:"45%",children:[(0,n.jsx)(a.Text,{c:"gray.1",fw:700,lh:"26px",mb:12,size:"18px",style:{color:"#FFFFFF"},children:null==(r=o.subItems)?void 0:r["nav-image-title"]}),(0,n.jsx)(a.Text,{c:"gray.1",fw:400,lh:"20px",lts:"0.25px",size:"16px",style:{color:"#FFFFFF"},w:"50%",children:null==(s=o.subItems)?void 0:s["nav-image-description"]})]})]})},[L,es]);if(!d)return null;let ed=()=>R(!1),{appSection:ec}=d,eu=es.map(e=>{var t,r,n,l,i;if((null==(t=e.subItems)?void 0:t.subnav)&&e.subItems.subnav.length>0){let t=null==(n=e.subItems)||null==(r=n.subnav)?void 0:r.flatMap(e=>e.links),a=null==t?void 0:t.slice(0,5);return{description:null==a?void 0:a.map(e=>null==e?void 0:e.label).join(", "),id:e.id,subnavs:(null==(i=e.subItems)||null==(l=i.subnav)?void 0:l.map(e=>{var t;let r=(null==(t=e.links)?void 0:t.map(e=>({href:e.link,isExternal:e.isExternal,label:e.label})))||[];return{title:e.title,links:r,seeMore:e.seeMoreLabel&&e.seeMoreLink?{href:e.seeMoreLink,isExternal:e.seeMoreIsExternal||!1,label:e.seeMoreLabel}:null}}))||[],title:e.label,type:"accordion"}}return{href:e.link,id:e.id,isExternal:e.isExternal,title:e.label,type:"link"}});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(N,{}),(0,n.jsxs)("header",{onMouseLeave:()=>{O(null)},style:{background:"#fff",borderBottom:"1px solid #ECEFF7",padding:"0.4rem 0",position:"up"===ea?"sticky":"relative",top:0,zIndex:11},children:[(0,n.jsx)(v.Container,{mx:{base:"md",sm:"auto"},my:0,onClick:()=>O(null),px:V||K||$?"1.5rem":0,children:(0,n.jsxs)(x.Flex,{align:"center",h:{base:76,sm:80},justify:"space-between",children:[(0,n.jsx)(w.Y,{align:"center",gap:8,children:(0,n.jsx)(l.N_,{href:"/",children:(0,n.jsx)(Y.g,{locale:B,height:G?74:75})})}
1),(0,n.jsx)(w.Y,{component:"nav",gap:K?16:32,visibleFrom:"md",style:{flexWrap:"nowrap",flex:1,justifyContent:"center",minWidth:0},children:es.map(e=>{var t,r;let i=L===e.id,a=!!(null==(r=e.subItems)||null==(t=r.subnav)?void 0:t.length);return(0,n.jsx)(g.Box,{pos:"relative",children:e.isExternal?(0,n.jsx)(b.N,{c:i?"blue.6":"gray.10",component:"a",fw:700,href:e.link,lh:"normal",lts:"0.25px",onMouseEnter:()=>{a&&!q?O(e.id):O(null)},rel:"noopener noreferrer",style:{borderBottom:i?"2px solid #228BE6":"none",paddingBottom:"4px",whiteSpace:"nowrap",fontSize:"1rem"},target:"_blank",children:e.label}):(0,n.jsx)(b.N,{c:i?"blue.6":"gray.10",component:l.N_,fw:700,href:e.link,lh:"normal",lts:"0.25px",onMouseEnter:()=>{a&&!q?O(e.id):O(null)},style:{borderBottom:i?"2px solid #228BE6":"none",paddingBottom:"4px",whiteSpace:"nowrap",fontSize:"1rem"},children:e.label})},e.id)})}),(0,n.jsx)(w.Y,{align:"center",gap:24,children:(0,n.jsxs)(x.Flex,{visibleFrom:"md",gap:16,children:[(0,n.jsx)(u,{}),en?(0,n.jsxs)(y.W,{position:"bottom-start",trigger:"click-hover",width:200,opened:q,onOpen:()=>{H(!0),O(null)},onClose:()=>H(!1),disabled:!!L,children:[(0,n.jsx)(y.W.Target,{children:(0,n.jsx)(b.N,{children:(0,n.jsx)(D.A,{size:24})})}),(0,n.jsxs)(y.W.Dropdown,{style:{zIndex:2e3},children:[(0,n.jsxs)(y.W.Item,{disabled:!0,styles:{item:{opacity:1,cursor:"default",color:"rgb(17, 24, 39)"}},children:[J("hello"),", ",null==ei?void 0:ei.firstName," ",null==ei?void 0:ei.lastName]}),(0,n.jsx)(y.W.Item,{onClick:()=>Q.push("/user/profile"),children:J("profile")}),(0,n.jsx)(y.W.Item,{onClick:el,children:J("logout")})]})]}):(0,n.jsxs)(i.Button,{color:"dark",fw:700,lh:"normal",lts:"0.04px",onClick:er,p:"0 0.2rem",radius:"xl",variant:"subtle",children:[(0,n.jsx)(D.A,{size:24}),(0,n.jsx)(a.Text,{c:"gray.11",fw:"700",ml:"xs",size:"md",children:Z("login")})]})]})}),(0,n.jsxs)(x.Flex,{hiddenFrom:"md",gap:16,justify:"center",align:"center",children:[en?(0,n.jsxs)(y.W,{position:"bottom-start",trigger:"click-hover",width:200,opened:q,onOpen:()=>{H(!0),O(null)},onClose:()=>H(!1),disabled:!!L,children:[(0,n.jsx)(y.W.Target,{children:(0,n.jsx)(b.N,{h:24,children:(0,n.jsx)(D.A,{size:24})})}),(0,n.jsxs)(y.W.Dropdown,{children:[(0,n.jsxs)(y.W.Item,{disabled:!0,styles:{item:{opacity:1,cursor:"default",color:"rgb(17, 24, 39)"}},children:[J("hello"),", ",null==ei?void 0:ei.firstName," ",null==ei?void 0:ei.lastName]}),(0,n.jsx)(y.W.Item,{onClick:()=>Q.push("/user/profile"),children:J("profile")}),(0,n.jsx)(y.W.Item,{onClick:el,children:J("logout")})]})]}):(0,n.jsx)(i.Button,{color:"dark",fw:700,lh:"normal",lts:"0.04px",onClick:er,radius:"xl",p:"0 0.2rem",variant:"subtle",children:(0,n.jsx)(D.A,{size:24,onClick:er})}),(0,n.jsx)(j.w,{hiddenFrom:"md",onClick:()=>R(!P),opened:P,size:"md"})]})]})}),L&&(0,n.jsxs)(g.Box,{bg:"white",left:0,onClick:()=>O(null),pos:"absolute",style:{borderTop:"1px solid #ECEFF7",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",width:"100%",zIndex:1e3},top:"100%",children:[(0,n.jsx)(v.Container,{pt:24,px:X?"1.5rem":0,children:eo}),(0,n.jsx)(g.Box,{my:32}),(0,n.jsx)(C.c,{my:16}),(0,n.jsx)(v.Container,{pb:24,px:X?"1.5rem":0,children:(0,n.jsxs)(x.Flex,{align:"center",justify:"space-between",children:[(0,n.jsx)(a.Text,{c:"gray.11",fw:700,children:null==ec?void 0:ec.description}),(0,n.jsx)(w.Y,{gap:12,children:null==ec||null==(t=ec.appButtons)?void 0:t.map(e=>{let t=null==e?void 0:e.icon,r="string"==typeof t?null:null==t?void 0:t.url;return(0,n.jsx)(b.N,{component:"a",href:e.url,rel:"noopener noreferrer",target:"_blank",children:r?(0,n.jsx)(S.Image,{alt:"Download on ".concat(e.store),h:32,src:r,w:"app-store"===e.store?96:108}):null},e.id)})})]})})]})]}),(0,n.jsxs)(k.a,{fullScreen:!0,h:"100%",hiddenFrom:"md",onClose:ed,opened:P,styles:{body:{padding:0},content:{background:"#fff"}},withCloseButton:!1,children:[(0,n.jsx)(g.Box,{children:(0,n.jsx)(v.Container,{mx:{base:"md",sm:"auto"},my:0,px:G?"1rem":V?"1.5rem":0,children:(0,n.jsxs)(x.Flex,{align:"center",h:80,justify:"space-between",children:[(0,n.jsx)(w.Y,{align:"center",gap:8,children:(0,n.jsx)(Y.g,{onClick:()=>{et(),Q.push("/")},locale:B,height:G?74:75})}),(0,n.jsx)(E.M,{c:"gray.11",onClick:ed,size:"xl",variant:"subtle",style:{cursor:"pointer"},children:(0,n.jsx)(_.A,{size:28,stroke:2})})]})})}),(0,n.jsx)(v.Container,{mx:{base:"md",sm:"auto"},mb:0,mt:"1.5rem",pt:0,px:G?"1rem":V?"1.5rem":0,children:(0,n.jsxs)(f.Stack,{gap:0,h:"fit-content",children:[(0,n.jsxs)(g.Box,{mih:"100%",children:[eu.map(e=>{var t;return"link"===e.type?e.isExternal?(0,n.jsx)(b.N,{component:"a",href:e.href,rel:"noopener noreferrer",style:{borderBottom:"1px solid var(--mantine-color-gray-3)",display:"block",padding:"16px 0",textAlign:"left",width:"100%"},target:"_blank",children:(0,n.jsx)(a.Text,{c:"gray.10",fw:700,size:"lg",w:"100%",children:e.title})},e.id):(0,n.jsx)(b.N,{component:l.N_,href:e.href,style:{borderBottom:"1px solid var(--mantine-color-gray-3)",display:"block",padding:"0",textAlign:"left",width:"100%"},onClick:()=>R(!1),children:(0,n.jsx)(a.Text,{c:"gray.10",fw:700,size:"lg",w:"100%",children:e.title})},e.id):(0,n.jsx)(F.n,{onChange:e=>W(e),styles:{chevron:{color:"#666",transition:"transform 0.2s ease"},control:{"&:hover":{background:"transparent"},borderBottom:"1px solid var(--mantine-color-gray-3)",borderRadius:"0",padding:"0"},item:{background:"transparent",border:"none"},panel:{padding:"16px 0 0 0"}},value:U,variant:"contained",children:(0,n.jsxs)(F.n.Item,{value:e.id,children:[(0,n.jsx)(F.n.Control,{children:(0,n.jsx)(a.Text,{c:"black",fw:600,size:"lg",style:{display:"block",textAlign:"left"},children:e.title})}),(0,n.jsx)(F.n.Panel,{children:(0,n.jsx)(f.Stack,{gap:24,children:null==(t=e.subnavs)?void 0:t.map((e,t)=>{var r;return(0,n.jsxs)(g.Box,{children:[e.title&&(0,n.jsx)(a.Text,{c:"gray.11",fw:600,mb:12,size:"sm",children:e.title}),(0,n.jsxs)(f.Stack,{gap:8,children:[null==(r=e.links)?void 0:r.map((e,r)=>{let i={component:(null==e?void 0:e.isExternal)?"a":l.N_,href:null==e?void 0:e.href,style:{alignItems:"center",color:"#666",display:"flex",fontSize:"16px",gap:"12px",padding:"8px 0"},...(null==e?void 0:e.isExternal)&&{rel:"noopener noreferrer",target:"_blank"}};return(0,n.jsx)(b.N,{...i,onClick:()=>R(!1),children:(0,n.jsx)(a.Text,{c:"gray.6",fw:400,size:"sm",children:null==e?void 0:e.label})},"".concat(t,"-").concat(r))}),e.seeMore&&(0,n.jsx)(g.Box,{mt:4,children:e.seeMore.isExternal?(0,n.jsx)(i.Button,{component:"a",href:e.seeMore.href,rel:"noopener noreferrer",target:"_blank",c:"gray.11",fw:400,size:"sm",variant:"subtle",rightSection:(0,n.jsx)(g.Box,{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--mantine-color-gray-3)",borderRadius:"50%",padding:"4px"},children:(0,n.jsx)(A.A,{size:20,color:"#23292E"})}),styles:{root:{padding:"8px 0",height:"auto"},section:{backgroundColor:"var(--mantine-color-white, #FFFFFF)",borderRadius:"50%","&:hover":{backgroundColor:"var(--mantine-color-white, #FFFFFF)",borderRadius:"50%"}}},onClick:()=>R(!1),children:e.seeMore.label}):(0,n.jsx)(i.Button,{component:l.N_,href:e.seeMore.href,c:"gray.11",fw:400,size:"sm",variant:"subtle",rightSection:(0,n.jsx)(g.Box,{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--mantine-color-gray-3)",borderRadius:"50%",padding:"4px"},children:(0,n.jsx)(A.A,{size:20,color:"#23292E"})}),styles:{root:{padding:"8px 0",height:"auto"},section:{backgroundColor:"var(--mantine-color-white, #FFFFFF)",borderRadius:"50%","&:hover":{backgroundColor:"var(--mantine-color-white, #FFFFFF)",borderRadius:"50%"}}},onClick:()=>R(!1),children:e.seeMore.label})})]})]},t)})})})]})},e.id)}),(0,n.jsx)(g.Box,{style:{paddingTop:"16px",marginTop:"16px"},children:(0,n.jsx)(x.Flex,{justify:"start",align:"center",children:(0,n.jsx)(u,{})})})]}),ec&&(0,n.jsxs)(g.Box,{mt:"2.5rem",mx:"auto",ta:"center",w:"100%",children:[(0,n.jsx)(a.Text,{c:"gray.11",fw:600,mb:24,size:"sm",children:ec.description}),(0,n.jsx)(w.Y,{gap:16,justify:"center",children:null==(r=ec.appButtons)?void 0:r.map(e=>{let t=null==e?void 0:e.icon,r="string"==typeof t?null:null==t?void 0:t.url;return(0,n.jsx)(b.N,{component:"a",href:e.url,rel:"noopener noreferrer",target:"_blank",children:r?(0,n.jsx)(S.Image,{alt:"Download on ".concat(e.store),h:40,src:r,w:"app-store"===e.store?120:135}):null},e.id)})})]})]})})]})]})}},39013:(e,t,r)=>{"use strict";r.d(t,{k:()=>l});var n=r(19454);let l=(0,n.createServerReference)("7f9a5a15211e34da60d1b400d4a58906b987c47e11",n.callServer,void 0,n.findSourceMapURL,"searchFlightsWithLoginServerAction")},39796:(e,t,r)=>{"use strict";r.d(t,{_:()=>l});var n=r(19454);let l=(0,n.createServerReference)("7f980ae088967993ff38c779490202e1c5480b2623",n.callServer,void 0,n.findSourceMapURL,"manageBookingServerAction")},45054:e=>{e.exports={wrapper:"AuthPageLoading_wrapper__KkR8L",spinner:"AuthPageLoading_spinner__Q3m5C","auth-loader-spin":"AuthPageLoading_auth-loader-spin__NJwDU"}},47929:()=>{},51218:(e,t,r)=>{"use strict";r.d(t,{P:()=>s,default:()=>o});var n=r(39586),l=r(18277),i=r(2410),a=r(35996);let s=(0,i.createContext)({hideModal:()=>{},isOpen:!1,showModal:()=>{},toggleModal:()=>{}}),o=function(e){let{children:t}=e,{isAuthenticated:r}=(0,l.A)(),[o,d]=(0,i.useState)(!1),[c,u]=(0,i.useState)(!1),m=(0,a.useRouter)(),h=(0,a.usePathname)();(0,i.useEffect)(()=>{r&&d(!1)},[r]);let p=(0,i.useCallback)(()=>{h.includes("/user/")?(u(!0),m.push("/")):d(!1)},[h,m]);(0,i.useEffect)(()=>{c&&(u(!1),d(!1))},[h]);let x=(0,i.useCallback)(()=>d(!0),[]),g=(0,i.useCallback)(()=>d(!o),[o]),f=(0,i.useMemo)(()=>({hideModal:p,isOpen:o,showModal:x,toggleModal:g}),[p,o,x,g]);return(0,n.jsx)(s.Provider,{value:f,children:t})}},53093:(e,t,r)=>{"use strict";r.d(t,{OE:()=>l,Yk:()=>n,az:()=>i});var n=function(e){return e.ONE_WAY="one-way",e.ROUND_TRIP="round-trip",e.MULTI_CITY="multi-city",e}({}),l=function(e){return e.BOOKING="booking",e.E_TICKET="eticket",e}({}),i=function(e){return e.ADULT="ADT",e.YOUNG="B15",e.YOUTH="STU",e.CHILD="CHD",e.INFANT="INF",e}({})},53700:(e,t,r)=>{"use strict";r.d(t,{default:()=>_});var n=r(39586),l=r(33087),i=r(68076),a=r(25140),s=r(56181),o=r(81358),d=r(38895),c=r(2333),u=r(9150),m=r(2410);let h={thumb:{backgroundColor:"var(--mantine-color-gray-4)",border:"none",width:"16px",height:"16px",boxShadow:"none"},track:{cursor:"pointer",backgroundColor:"transparent",border:"1px solid var(--mantine-color-gray-4)",minWidth:"48px",height:"24px",borderRadius:"12px"}},p={header:{display:"none"},body:{maxHeight:"min(90dvh, 48rem)",overflow:"hidden",padding:0},content:{maxHeight:"min(90dvh, 48rem)",overflow:"hidden"}},x={WebkitOverflowScrolling:"touch",maxHeight:"min(60dvh, 32rem)",overflowX:"hidden",overflowY:"auto",overscrollBehavior:"contain"},g={root:{paddingTop:0,paddingBottom:0,height:"auto",minHeight:0,fontSize:"0.75rem","&:hover":{backgroundColor:"transparent",color:"var(--mantine-color-gray-7)"}},section:{marginLeft:4}};var f=r(40787),b=r(51828),v=r(16388),w=r(813);let y="cookie-consent-dialog-title";function j(e){let{modalTitle:t,modalDescription:r,cookies:c,optionalPreferences:p,setOptionalPreferences:j,onClose:C,onSave:S}=e,k=(0,l.xd)(),E=(0,u.c3)("cookieConsent"),[F,A]=(0,m.useState)({}),D=(0,m.useCallback)(e=>{A(t=>({...t,[e]:!t[e]}))},[]),_=(0,m.useCallback)((e,t)=>{var r;return!!t||null!=(r=p[e])&&r},[p]),T=(0,m.useCallback)((e,t,r)=>{t||j(t=>({...t,[e]:r}))},[j]);return(0,n.jsxs)(a.Stack,{gap:0,children:[(0,n.jsxs)(o.Y,{justify:"space-between",px:"xl",py:"md",style:{borderBottom:"1px solid ".concat(k.colors.gray[2])},wrap:"nowrap",children:[(0,n.jsxs)(a.Stack,{gap:"md",style:{flex:1,minWidth:0},children:[(0,n.jsx)(s.Text,{component:"h2",fw:700,fz:"h5",id:y,children:t}
1),r?(0,n.jsx)(s.Text,{c:"gray.7",id:"".concat(y,"-description"),size:"sm",children:r}):null]}),(0,n.jsx)(d.Button,{"aria-label":E("closeSettings"),c:"gray.6",onClick:C,px:"sm",size:"md",variant:"subtle",styles:{root:{flexShrink:0,minWidth:"2.75rem"}},children:(0,n.jsx)(v.A,{size:24,stroke:1.5})})]}),(0,n.jsx)(i.Box,{style:x,children:(0,n.jsx)(a.Stack,{gap:"lg",px:"xl",py:"lg",role:"list",children:c.map(e=>{let t=!!F[e.rowKey];return(0,n.jsxs)(o.Y,{align:"flex-start","aria-labelledby":"".concat(e.rowKey,"-label"),gap:"md",justify:"space-between",role:"listitem",wrap:"nowrap",children:[(0,n.jsxs)(a.Stack,{gap:"xs",style:{flex:1,minWidth:0},children:[(0,n.jsxs)(o.Y,{align:"center",gap:"xs",justify:"space-between",wrap:"wrap",children:[(0,n.jsx)(s.Text,{component:"span",fw:700,id:"".concat(e.rowKey,"-label"),size:"sm",style:{color:"var(--mantine-color-gray-11)"},children:e.title}),(0,n.jsx)(d.Button,{"aria-controls":"".concat(e.rowKey,"-details"),"aria-expanded":t,onClick:()=>D(e.rowKey),rightSection:(0,n.jsx)(w.A,{"aria-hidden":!0,size:14,stroke:1.5,style:{display:"block",transition:"transform 200ms ease",transform:t?"rotate(180deg)":"rotate(0deg)"}}),size:"xs",styles:g,variant:"subtle",children:t?E("hideDetails"):E("showDetails")})]}),(0,n.jsx)(f.S,{in:t,children:(0,n.jsx)(s.Text,{c:"gray.7",id:"".concat(e.rowKey,"-details"),size:"sm",lh:1.55,children:e.description})})]}),(0,n.jsx)(b.d,{"aria-label":e.isRequired?E("switchRequired",{title:e.title}):E("switchAllow",{title:e.title}),checked:_(e.name,e.isRequired),color:"brandBlue.8",disabled:e.isRequired,onChange:t=>T(e.name,e.isRequired,t.currentTarget.checked),size:"md",styles:{root:{flexShrink:0,marginTop:2},...h}})]}
1,e.rowKey)})})}),(0,n.jsx)(i.Box,{bg:"gray.1",px:"xl",py:"md",style:{borderTop:"1px solid ".concat(k.colors.gray[2])},children:(0,n.jsx)(o.Y,{justify:"flex-end",children:(0,n.jsx)(d.Button,{onClick:S,size:"md",children:E("savePreferences")})})})]})}let C="ba_cookie_consent",S=/^[a-zA-Z0-9_-]+$/;function k(e){var t;if("undefined"==typeof document)return null;let r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=document.cookie.match(new RegExp("(?:^|; )".concat(r,"=([^;]*)")));return null!=(t=null==n?void 0:n[1])?t:null}function E(e){return e.length>0&&e!==C&&S.test(e)}function F(e){return Object.fromEntries(e.map(e=>[e,!1]))}function A(e,t){return Object.fromEntries(e.map(e=>[e,t]))}var D=r(4662);function _(e){let{bannerTitle:t,bannerDescription:r,modalTitle:h,modalDescription:x,cookies:g}=e,f=(0,l.xd)(),b=(0,u.c3)("cookieConsent"),{isReady:v,isConsentRecorded:w,settingsOpen:S,openSettings:_,closeSettings:T,optionalPreferences:z,setOptionalPreferences:Y,rejectAllOptional:I,acceptAllOptional:N,saveCurrentPreferences:B}=function(e){let t=(0,m.useMemo)(()=>e.filter(e=>!e.isRequired).map(e=>e.name),[e]),r=(0,m.useMemo)(()=>e.map(e=>e.name),[e]),[n,l]=(0,m.useState)(!1),[i,a]=(0,m.useState)(!1),[s,o]=(0,m.useState)(!1),[d,c]=(0,m.useState)(()=>F(t));(0,m.useEffect)(()=>{let e=function(e){let t=k(C);if(!t)return null;if("1"===t||"true"===t){let t={};for(let r of e){if(!E(r))continue;let e=k(r);t[r]="1"===e}return t}return null}(r);e?(c(function(e,t){let r=F(t);for(let n of t)Object.hasOwn(e,n)&&(r[n]=!!e[n]);return r}(e,t)),a(!0)):(c(F(t)),a(!1)),l(!0)},[r,t]);let u=(0,m.useCallback)(()=>{c(A(t,!0)),o(!0)},[t]),h=(0,m.useCallback)(()=>o(!1),[]),p=(0,m.useCallback)(t=>{!function(e){if("undefined"==typeof document)return;let t=function(){let e="https:"===window.location.protocol?"; Secure":"";return"Path=/; Max-Age=".concat(31536e3,"; SameSite=Lax").concat(e)}();for(let[r,n]of(document.cookie="".concat(C,"=1; ").concat(t),Object.entries(e)))E(r)&&(document.cookie="".concat(r,"=").concat(n?"1":"0","; ").concat(t))}(function(e,t){let r={...e};for(let e of t)e.isRequired&&(r[e.name]=!0);return r}(t,e)),c(t),a(!0),o(!1)},[e]),x=(0,m.useCallback)(()=>{p(A(t,!1))},[t,p]),g=(0,m.useCallback)(()=>{p(A(t,!0))},[t,p]),f=(0,m.useCallback)(()=>{p(d)},[d,p]);return{isReady:n,isConsentRecorded:i,settingsOpen:s,openSettings:u,closeSettings:h,optionalPreferences:d,setOptionalPreferences:c,rejectAllOptional:x,acceptAllOptional:g,saveCurrentPreferences:f}}(g);(0,m.useEffect)(()=>{(0,D.yK)(!!(null==z?void 0:z.analytics))},[null==z?void 0:z.analytics]);let M=(0,m.useCallback)(()=>{B()},[B]);return!v||w?null:(0,n.jsxs)(n.Fragment,{children:[S?null:(0,n.jsx)(i.Box,{component:"aside","aria-label":t,bg:"white",bd:"1px solid ".concat(f.colors.gray[2]),bottom:"clamp(1rem, 3vw, 2rem)",left:"50%",p:"clamp(1rem, 3vw, 1.75rem) clamp(1rem, 4vw, 2rem)",pos:"fixed",style:{borderRadius:f.radius.md,boxShadow:f.shadows.sm,transform:"translateX(-50%)",width:"90%",maxWidth:"75rem",zIndex:150,maxHeight:"calc(100dvh - clamp(1rem, 3vw, 2rem) * 2)",overflowY:"auto",overscrollBehavior:"contain"},children:(0,n.jsxs)(a.Stack,{gap:"md",children:[(0,n.jsx)(s.Text,{component:"h2",fw:700,fz:"h5",lh:1.3,children:t}),(0,n.jsx)(s.Text,{c:"gray.7",size:"xs",children:r}),(0,n.jsxs)(o.Y,{gap:"sm",justify:"flex-end",wrap:"wrap",children:[(0,n.jsx)(d.Button,{onClick:_,size:"md",variant:"default",children:b("settings")}),(0,n.jsx)(d.Button,{onClick:I,size:"md",variant:"default",children:b("reject")}),(0,n.jsx)(d.Button,{onClick:N,size:"md",children:b("accept")})]})]})}),(0,n.jsx)(c.a,{"aria-describedby":x?"".concat(y,"-description"):void 0,"aria-labelledby":y,centered:!0,onClose:T,opened:S,padding:0,radius:"md",size:"lg",styles:p,withCloseButton:!1,children:(0,n.jsx)(j,{cookies:g,modalDescription:x,modalTitle:h,onClose:T,onSave:M,optionalPreferences:z,setOptionalPreferences:Y})})]})}},54084:()=>{},55496:(e,t,r)=>{Promise.resolve().then(r.bind(r,60719)),Promise.resolve().then(r.t.bind(r,17120,23)),Promise.resolve().then(r.t.bind(r,54279,23)),Promise.resolve().then(r.t.bind(r,75854,23)),Promise.resolve().then(r.bind(r,98234)),Promise.resolve().then(r.t.bind(r,87402,23)),Promise.resolve().then(r.t.bind(r,43930,23)),Promise.resolve().then(r.t.bind(r,33026,23)),Promise.resolve().then(r.t.bind(r,53853,23)),Promise.resolve().then(r.bind(r,83701)),Promise.resolve().then(r.bind(r,9285)),Promise.resolve().then(r.bind(r,79656)),Promise.resolve().then(r.bind(r,53700)),Promise.resolve().then(r.bind(r,1876)),Promise.resolve().then(r.bind(r,89137)),Promise.resolve().then(r.bind(r,34148)),Promise.resolve().then(r.bind(r,10845)),Promise.resolve().then(r.bind(r,51218)),Promise.resolve().then(r.bind(r,4084)),Promise.resolve().then(r.bind(r,78908)),Promise.resolve().then(r.bind(r,7831)),Promise.resolve().then(r.t.bind(r,54084,23)),Promise.resolve().then(r.t.bind(r,12373,23))},72804:(e,t,r)=>{"use strict";r.d(t,{I:()=>l});var n=r(19454);let l=(0,n.createServerReference)("7f773750dab030b28cea0504eef9644ecf26d294ea",n.callServer,void 0,n.findSourceMapURL,"onlineCheckInServerAction")},73671:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=!!window.document&&!!window.document.createElement},74907:(e,t,r)=>{"use strict";r.d(t,{s:()=>a,w:()=>i});let n=new TextEncoder,l=new TextDecoder;function i(e){return btoa(Array.from(n.encode(e),e=>String.fromCharCode(e)).join(""))}function a(e){if(!e)return e;try{var t;return l.decode((t=atob(e),Uint8Array.from(t,e=>e.charCodeAt(0))))}catch(t){return e}}},77229:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(39586),l=r(2410),i=r(12951),a=r(54529),s=r(56181);let o=(0,l.forwardRef)((e,t)=>{let{error:r,onSuccess:o,onError:d,onExpire:c}=e,u=(0,a.Ym)(),m=(0,l.useRef)(null),[h,p]=(0,l.useState)(null),x="0x4AAAAAACosdCVp4aWnWC9-";(0,l.useImperativeHandle)(t,()=>({reset:()=>{var e;null==(e=m.current)||e.reset(),p(null)},getToken:()=>h}));let g=(0,l.useCallback)(e=>{p(e),null==o||o(e)},[o]),f=(0,l.useCallback)(()=>{p(null),setTimeout(()=>{var e;return null==(e=m.current)?void 0:e.reset()},1e3),null==d||d()},[d]),b=(0,l.useCallback)(()=>{var e;p(null),null==(e=m.current)||e.reset(),null==c||c()},[c]);return x?(0,n.jsxs)("div",{children:[(0,n.jsx)(i.Xs,{ref:m,siteKey:x,options:{language:"bg"===u?"bg":"en",size:"invisible",retry:"auto",refreshExpired:"auto",refreshTimeout:"auto"},onSuccess:g,onError:f,onExpire:b}),r&&(0,n.jsx)(s.Text,{c:"red",size:"sm",mt:4,children:r})]}):null});o.displayName="TurnstileWidget";let d=o},78477:(e,t,r)=>{"use strict";r.d(t,{g:()=>s});var n=r(39586),l=r(59063),i=r(43543);r(2410);let a=193/34,s=e=>{let{locale:t="en",height:r,width:s,...o}=e,d=null!=r?r:34,c=null!=s?s:Math.round(d*a);return(0,n.jsx)(l.Image,{...o,alt:"Bulgaria Air Logo",width:c,height:d,component:i.default,decoding:"async",src:"/media/logo/bg-air-light-".concat(t,".svg"),style:{objectFit:"unset"}})}},79656:(e,t,r)=>{"use strict";r.d(t,{BuzzeasyWidget:()=>G});var n=r(2410),l=r(9150),i=r(4084),a=r(51218),s=r(19454);let o=(0,s.createServerReference)("7f0bf5b8eeae9af84b953891cef91c46e2d0c5c3aa",s.callServer,void 0,s.findSourceMapURL,"generateChatToken");var d=r(24359),c=r(39013),u=r(39796),m=r(72804),h=r(53093),p=r(4662);let x=/^[A-Za-z]{3}$/,g=/^\d{4}-\d{2}-\d{2}$/,f=/^[A-Za-z0-9]{6}$/,b=/^\d{13}$/,v=/^[A-Za-z]{1,60}$/;function w(e){if(!g.test(e))return!1;let t=new Date("".concat(e,"T00:00:00"));if(Number.isNaN(t.getTime()))return!1;let r=new Date;return r.setHours(0,0,0,0),t.getTime()>=r.getTime()}function y(e){let t=Number(e);return Number.isInteger(t)&&t>0?t:0}function j(e,t){var r,n,l,i,a,s;let o=null!=(i=null==(r=e.searchParams.get("origin".concat(t)))?void 0:r.trim().toUpperCase())?i:"",d=null!=(a=null==(n=e.searchParams.get("destination".concat(t)))?void 0:n.trim().toUpperCase())?a:"",c=null!=(s=null==(l=e.searchParams.get("departureDate".concat(t)))?void 0:l.trim())?s:"";return x.test(o)&&x.test(d)&&o!==d&&w(c)?{originCode:o,destinationCode:d,departureDate:c}:null}function C(e,t){let r=new URLSearchParams;
1return Object.entries(t).forEach(e=>{let[t,n]=e;void 0!==n&&r.append(t,n)}),r.size?"".concat(e,"?").concat(r.toString()):e}function S(e,t){let r=document.createElement("form");r.method="POST",r.action=e,r.target="_self",Object.entries(t).forEach(e=>{let[t,n]=e,l=document.createElement("input");l.type="hidden",l.name=t,l.value="object"==typeof n?JSON.stringify(n):String(n),r.appendChild(l)}),document.body.appendChild(r),r.submit()}async function k(e,t,r,n,l){var i,a,s,o,u;let m={firstFlight:{originCode:e.firstFlight.originCode,destinationCode:e.firstFlight.destinationCode,departureDate:e.firstFlight.departureDate,returnDate:null!=(o=e.firstFlight.returnDate)?o:null},secondFlight:e.secondFlight,tripType:e.tripType,passengers:e.passengers,youthDiscount:e.passengers[h.az.YOUTH]>0};if((0,p.Sd)({event:"search_flights",source:"chatbot_widget",trip_type:m.tripType,origin_code:m.firstFlight.originCode,destination_code:m.firstFlight.destinationCode,departure_date:m.firstFlight.departureDate,return_date:null!=(u=m.firstFlight.returnDate)?u:void 0,second_origin_code:null==(i=m.secondFlight)?void 0:i.originCode,second_destination_code:null==(a=m.secondFlight)?void 0:a.destinationCode,second_departure_date:null==(s=m.secondFlight)?void 0:s.departureDate,passengers_adt:m.passengers[h.az.ADULT],passengers_yth:m.passengers[h.az.YOUNG],passengers_chd:m.passengers[h.az.CHILD],passengers_inf:m.passengers[h.az.INFANT],passengers_stu:m.passengers[h.az.YOUTH],passengers_total:Object.values(m.passengers).reduce((e,t)=>e+t,0),youth_discount:m.youthDiscount,auth_state:r?"authenticated":"guest",...l}),!r||!n){let e=await (0,d.M)(m,t);(0,p.Sd)({event:"booking_redirect",provider:"amadeus",source:"chatbot_widget",redirect_url:e,redirect_type:(null==e?void 0:e.startsWith("http"))?"external":"internal",...l}),e&&(window.location.href=e);return}let{url:x,body:g,params:f}=await (0,c.k)(m,t,n),b=C(x,f);(0,p.Sd)({event:"booking_redirect",provider:"amadeus",source:"chatbot_widget",redirect_url:b,redirect_type:"external",...l}),S(b,{lightLogin:g})}async function E(e,t,r,n){let l={page_path:(0,p.Cl)(window.location.pathname),locale:t};if("bookFlight"===e.flow)return void await k(e,t,r,n,l);if("manageBooking"===e.flow){(0,p.Sd)({event:"manage_booking_search",source:"chatbot_widget",...l});let{url:r,body:n,params:i}=await (0,u._)({bookingReference:e.bookingReference,lastName:e.lastName},t),a=C(r,i);(0,p.Sd)({event:"manage_booking_redirect",provider:"amadeus",source:"chatbot_widget",redirect_url:a,redirect_type:"external",...l}),S(a,n);return}(0,p.Sd)({event:"checkin_search",source:"chatbot_widget",reference_type:(0,p.v4)(e.checkInType),...l});let{url:i,body:a,params:s}=await (0,m.I)(e.checkInType===h.OE.BOOKING?{type:h.OE.BOOKING,flightReference:e.flightReference,lastName:e.lastName}:{type:h.OE.E_TICKET,flightReference:e.flightReference,lastName:e.lastName},t),o=C(i,s);(0,p.Sd)({event:"checkin_redirect",provider:"amadeus",source:"chatbot_widget",reference_type:(0,p.v4)(e.checkInType),redirect_url:o,redirect_type:"external",...l}),S(o,a)}let F="[class*='InputBox'] textarea, [class*='InputBox'] input",A="[class*='SendButton']",D="[class*='SuggestedActions'] button, [class*='SuggestedAction__Item']",_="".concat(A,", ").concat(D),T="".concat(F,", ").concat(A),z="".concat(T,", ").concat(D),Y="[data-direction='inbound']",I="bz-locked",N=null,B=null;function M(e,t,r){e.querySelectorAll(t).forEach(e=>{e.disabled=r})}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T;e.classList.remove(I),M(e,t,!1),null==N||N.disconnect(),N=null,B&&(clearTimeout(B),B=null)}function R(e){if(null!==N)return;e.classList.add(I),M(e,z,!0);let t=new MutationObserver(t=>{for(let r of t)for(let t of r.addedNodes)if(t instanceof HTMLElement&&(t.matches(Y)||t.querySelector(Y)))return void P(e);M(e,z,!0)});t.observe(e,{childList:!0,subtree:!0}),N=t,B=setTimeout(()=>P(e,z),2e4)}let L={locale:"en",email:null,ivrTreeUrl:""},O={en:"EN",bg:"BG"},U="buzzeasy-webchat";function W(){return document.getElementById(U)}async function q(e){if(!e)return null;try{let t=await fetch(e,{cache:"no-store"});if(!t.ok)return null;let r=await t.json();return{messageText:"string"==typeof(null==r?void 0:r.text)?r.text:void 0,suggestedActions:Array.isArray(null==r?void 0:r.choices)?r.choices.map(e=>null==e?void 0:e.title).filter(e=>"string"==typeof e):[]}}catch(e){return null}}function H(){let e=Array.from(document.querySelectorAll("script[src]")).filter(e=>e.src.includes("webchatwidget.min.js"));if(e.length>
11&&e.slice(1).forEach(e=>e.remove()),window.buzzeasyWebChat||e.length>0)return;let t=document.createElement("script");t.src="https://cdn.geomant.cloud/buzzeasy/webchatwidget.min.js",t.defer=!0,document.body.appendChild(t)}function G(e){let{locale:t,webchatUrl:r,ivrTreeUrl:s}=e,{user:d,isAuthenticated:c}=(0,n.useContext)(i.c),{isOpen:u}=(0,n.useContext)(a.P),m=(0,l.c3)("chatWidget"),p=(0,n.useRef)(!1),x=(0,n.useRef)(null),g=(0,n.useRef)(null);function C(){let e=W();e&&P(e),p.current=!1;let t=/(buzzeasy|geomant|webchatwidget|webchat)/i;Object.keys(localStorage).forEach(e=>{t.test(e)&&localStorage.removeItem(e)}),Object.keys(sessionStorage).forEach(e=>{t.test(e)&&sessionStorage.removeItem(e)}),Array.from(document.querySelectorAll("script[src]")).filter(e=>e.src.includes("webchatwidget.min.js")).forEach(e=>e.remove());let r=W();r&&(r.innerHTML=""),document.querySelectorAll('[class*="bzchat__"]').forEach(e=>e.remove()),delete window.buzzeasyWebChat,H()}return L.locale=t,L.email=(null==d?void 0:d.email)||null,L.ivrTreeUrl=s,(0,n.useEffect)(()=>{if(!W()){let e=document.createElement("div");e.id=U,e.setAttribute("data-webchat-url",r),document.body.appendChild(e)}Object.getOwnPropertyDescriptor(window,"getDataForBuzzeasy")||Object.defineProperty(window,"getDataForBuzzeasy",{value:async()=>{let e=await o();return e?{workflowData:{authStatus:"jwt_present",jwt:e,language:L.locale},customerData:{email:L.email||null}}:{workflowData:{authStatus:"anonymous",language:L.locale},customerData:{}}},writable:!1,configurable:!1}),H(),window.buzzeasyWebChat&&(p.current=!0);let e=async()=>{var e,r,n,l,i,a;p.current=!0,null==(e=window.buzzeasyWebChat)||e.setWidgetLanguage(O[t]||"EN");let s=null!=(i=W())?i:document.body,o=await q(L.ivrTreeUrl);null==(r=window.buzzeasyWebChat)||r.sendProactiveMessage({type:"InviteMessage",messageText:(null==o?void 0:o.messageText)||m("inviteMessage"),suggestedActions:null!=(a=null==o?void 0:o.suggestedActions)?a:[]}),null==(n=x.current)||n.disconnect();let d=new MutationObserver(()=>{let e=document.querySelector('[class*="Header__Title-bzchat"]'),t=document.querySelector('[aria-label="Contact name"]');e&&t&&(e.textContent=m("botName"),e.setAttribute("title",m("botName")),t.textContent=m("botSubtitle"),d.disconnect(),x.current=null)});d.observe(s,{childList:!0,subtree:!0}),x.current=d,null==(l=g.current)||l.disconnect();let c=new MutationObserver(()=>{let e=document.querySelector('[class*="HeaderContainer__Link-bzchat"]');e&&!e.href.includes("/".concat(L.locale,"/"))&&(e.href=e.href.replace(/\/(en|bg)\//,"/".concat(L.locale,"/")))});c.observe(s,{childList:!0,subtree:!0}),g.current=c};return window.addEventListener("buzzeasyWebChat-integrationLoaded",e),()=>{var t,r;window.removeEventListener("buzzeasyWebChat-integrationLoaded",e),null==(t=x.current)||t.disconnect(),null==(r=g.current)||r.disconnect()}},[]),(0,n.useEffect)(()=>{p.current&&C()},[t]),(0,n.useEffect)(()=>{p.current&&C()},[null==d?void 0:d.email]),(0,n.useEffect)(()=>{let e=W();e&&(e.style.display=u?"none":"")},[u]),(0,n.useEffect)(()=>{let e=e=>{var r,n;let l;if(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let i=null==(n=e.target)||null==(r=n.closest)?void 0:r.call(n,"a");if(!i||!i.href||!i.closest('#buzzeasy-webchat, [class*="bzchat"]')||i.hasAttribute("download"))return;try{l=new URL(i.href,window.location.origin)}catch(e){return}if(l.origin!==window.location.origin)return;let a=function(e){switch(e.searchParams.get("flow")){case"bookFlight":return function(e){var t;let r=j(e,"");if(!r)return null;let n={[h.az.ADULT]:y(e.searchParams.get("adt")),[h.az.CHILD]:y(e.searchParams.get("chd")),[h.az.INFANT]:y(e.searchParams.get("inf")),[h.az.YOUTH]:y(e.searchParams.get("stu")),[h.az.YOUNG]:y(e.searchParams.get("b15"))};if(!Object.values(n).some(e=>e>0))return null;let l=e.searchParams.get("tripType");if(l===h.Yk.MULTI_CITY){let t=j(e,"2");return t?{flow:"bookFlight",tripType:h.Yk.MULTI_CITY,firstFlight:r,secondFlight:t,passengers:n}:null}let i=(null==(t=e.searchParams.get("returnDate"))?void 0:t.trim())||void 0;return l===h.Yk.ROUND_TRIP||!l&&i?i&&w(i)?{flow:"bookFlight",tripType:h.Yk.ROUND_TRIP,firstFlight:{...r,returnDate:i},passengers:n}:null:{flow:"bookFlight",tripType:h.Yk.ONE_WAY,firstFlight:r,passengers:n}}(e);case"manageBooking":return function(e){var t,r,n,l;let i=null!=(n=null==(t=e.searchParams.get("lastName"))?void 0:t.trim())?n:"";if(!v.test(i))return null;let a=null!=(l=null==(r=e.searchParams.get("bookingReference"))?void 0:r.trim())?l:"";return f.test(a)?{flow:"manageBooking",bookingReference:a,lastName:i}:null}(e);case"onlineCheckIn":return function(e){var t,r,n,l;let i=null!=(n=null==(t=e.searchParams.get("lastName"))?void 0:t.trim())?n:"";if(!v.test(i))return null;let a=e.searchParams.get("checkInType"),s=null!=(l=null==(r=e.searchParams.get("flightReference"))?void 0:r.trim())?l:"";return a===h.OE.BOOKING&&f.test(s)?{flow:"onlineCheckIn",checkInType:h.OE.BOOKING,flightReference:s,lastName:i}:a===h.OE.E_TICKET&&b.test(s)?{flow:"onlineCheckIn",checkInType:h.OE.E_TICKET,flightReference:s,lastName:i}:null}(e);default:return null}}(l);a&&(e.preventDefault(),E(a,t,c,d).catch(e=>{console.error("Direct Amadeus redirect failed:",e)}))};return document.addEventListener("click",e,{capture:!0}),()=>document.removeEventListener("click",e,{capture:!0})},[t,c,d]),(0,n.useEffect)(()=>{let e=W();return e?function(e){let t=t=>{let r=t.target;if(!r||!e.contains(r))return;let n=()=>{var t;return!!(null==(t=e.querySelector(F))?void 0:t.value.trim())};
1if(null!==N){(r.closest(_)||r.closest(F))&&(t.preventDefault(),t.stopImmediatePropagation());return}if("keydown"===t.type){if("Enter"!==t.key||t.shiftKey||!r.closest(F)||!n())return;R(e);return}let l=r.closest(_);l&&(l.matches(D)||n())&&R(e)};return document.addEventListener("click",t,{capture:!0}),document.addEventListener("keydown",t,{capture:!0}),()=>{document.removeEventListener("click",t,{capture:!0}),document.removeEventListener("keydown",t,{capture:!0}),P(e)}}(e):void 0},[]),null}},80332:(e,t,r)=>{"use strict";r.d(t,{J:()=>l,r:()=>i});var n=r(59290);let l=e=>({gender:n.string().refine(e=>"Male"===e||"Female"===e,{message:e("required")}),firstName:n.string().trim().min(1,e("required")).regex(/^[A-Za-z]+$/,e("latinOnly")),lastName:n.string().trim().min(1,e("required")).regex(/^[A-Za-z]+$/,e("latinOnly")),birthDate:n.string().trim().min(1,e("required")),nationality:n.string().trim().min(1,e("required")),phoneCode:n.string().trim().min(1,e("required")),phoneNumber:n.string().trim().min(1,e("required")).regex(/^\+?[1-9]\d{7,14}$/,e("invalidPhoneNumber"))}),i=e=>n.object(l(e))},83701:(e,t,r)=>{"use strict";r.d(t,{AdminBar:()=>c});var n=r(39586),l=r(35996),i=r(40924),a=r(2410);r(47929);var s=r(85409);let o={pages:{plural:"Pages",singular:"Page"},posts:{plural:"Posts",singular:"Post"},projects:{plural:"Projects",singular:"Project"}},d=()=>(0,n.jsx)("span",{children:"Dashboard"}),c=e=>{var t,r;let{adminBarProps:c}=e||{},u=(0,l.useSelectedLayoutSegments)(),[m,h]=(0,a.useState)(!1),p=o[null==u?void 0:u[1]]?u[1]:"pages",x=(0,l.useRouter)(),g=a.useCallback(e=>{h(!!(null==e?void 0:e.id))},[]);return(0,n.jsx)("div",{children:(0,n.jsx)("div",{children:(0,n.jsx)(i.J,{...c,classNames:{controls:"font-medium text-white",logo:"text-white",user:"text-white"},cmsURL:(0,s.y)(),collectionSlug:p,collectionLabels:{plural:(null==(t=o[p])?void 0:t.plural)||"Pages",singular:(null==(r=o[p])?void 0:r.singular)||"Page"},logo:(0,n.jsx)(d,{}),onAuthChange:g,onPreviewExit:()=>{fetch("/next/exit-preview").then(()=>{x.push("/"),x.refresh()})},style:{backgroundColor:"transparent",padding:0,position:"relative",zIndex:"unset"}})})})}},83844:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r(39586),l=r(82872),i=r(33062),a=r(72643),s=r(35747),o=r(813),d=r(60046),c=r(10928),u=r(9150),m=r(2410),h=r(19792),p=r(70145);let x=(0,d.X)().filter(e=>"XK"!==e).map(e=>({code:e,label:"+".concat((0,c.K)(e)),value:e}));function g(e){var t;let{field:r,fieldState:d,id:c}=e,g=(0,u.c3)("user.auth.register"),f=(0,u.c3)("common"),b=(0,l.B)(),v=x.find(e=>e.value===r.value),[w,y]=(0,m.useState)((null==v?void 0:v.label)||"");(0,m.useEffect)(()=>{if(r.value){let e=x.find(e=>e.value===r.value);y((null==e?void 0:e.label)||"")}},[null==v?void 0:v.label]);let j=(0,m.useMemo)(()=>x.filter(e=>e.label.toLowerCase().includes(w.toLowerCase())||e.value.toLowerCase().includes(w.toLowerCase())),[w]);return(0,n.jsxs)(i.G,{onOptionSubmit:e=>{r.onChange(e);let t=x.find(t=>t.value===e);y((null==t?void 0:t.label)||""),b.closeDropdown()},store:b,withinPortal:!1,children:[(0,n.jsx)(i.G.Target,{children:(0,n.jsx)(a.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(s.O,{autoComplete:"off",error:null==(t=d.error)?void 0:t.message,id:"".concat(c,"-phone-code"),leftSection:v&&(0,n.jsx)(h.A,{code:null==v?void 0:v.code.toUpperCase(),size:"m"}),withAsterisk:!1,label:(0,n.jsx)(p.Y,{text:g("phoneCode")}),onBlur:()=>{b.closeDropdown();let e=x.find(e=>e.value===r.value);w!==(null==e?void 0:e.label)&&y((null==e?void 0:e.label)||"")},onChange:e=>{y(e.currentTarget.value),b.openDropdown()},onClick:()=>b.openDropdown(),radius:"sm",required:!0,rightSection:(0,n.jsx)(o.A,{onClick:()=>b.openDropdown(),size:16}),rightSectionWidth:16,size:"md",value:w,styles:{input:{lineHeight:"1.5rem",fontWeight:400,fontSize:"1rem",height:"3.5rem"}}})})}),(0,n.jsx)(i.G.Dropdown,{mah:200,style:{overflowY:"scroll"},children:(0,n.jsx)(i.G.Options,{children:j.length>0?j.map(e=>(0,n.jsx)(i.G.Option,{value:e.value,children:(0,n.jsxs)(a.Flex,{align:"center",gap:"xs",children:[(0,n.jsx)(h.A,{code:e.code.toUpperCase(),size:"m"}),e.label]})},e.code)):(0,n.jsx)(i.G.Empty,{children:f("nothingFound")})})})]})}},85109:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(39586),l=r(82872),i=r(33062),a=r(72643),s=r(35747),o=r(60046),d=r(54529),c=r(9150),u=r(2410),m=r(70145);function h(e){var t;let{field:r,fieldState:h,id:p,label:x}=e,g=(0,d.Ym)(),f=(0,c.c3)("common"),b=(0,u.useMemo)(()=>new Intl.DisplayNames([g],{type:"region"}),[g]),v=(0,u.useMemo)(()=>(0,o.X)().map(e=>({code:e,label:b.of(e)||e,value:e})).sort((e,t)=>
1"BG"===e.code?-1:"BG"===t.code?1:e.label.localeCompare(t.label,g)),[b,g]),w=(0,l.B)(),y=v.find(e=>e.value===r.value),[j,C]=(0,u.useState)((null==y?void 0:y.label)||""),[S,k]=(0,u.useState)(""),[E,F]=(0,u.useState)(!1);(0,u.useEffect)(()=>{C((null==y?void 0:y.label)||"")},[null==y?void 0:y.label]);let A=E&&S?v.filter(e=>e.label.toLowerCase().includes(S.toLowerCase())):v;return(0,n.jsxs)(i.G,{store:w,withinPortal:!1,onOptionSubmit:e=>{r.onChange(e);let t=v.find(t=>t.value===e);C((null==t?void 0:t.label)||""),k(""),F(!1),w.closeDropdown()},children:[(0,n.jsx)(i.G.Target,{children:(0,n.jsx)(a.Flex,{w:"100%",pos:"relative",direction:"column",children:(0,n.jsx)(s.O,{id:"".concat(p,"-nationality"),autoComplete:"off",withAsterisk:!1,label:(0,n.jsx)(m.Y,{text:x}),error:null==(t=h.error)?void 0:t.message,value:E?S:j,required:!0,size:"md",radius:"sm",h:"100%",style:{minHeight:40},styles:{input:{height:56,cursor:"pointer"}},rightSection:(0,n.jsx)(i.G.Chevron,{}),rightSectionPointerEvents:"none",onClick:()=>{F(!1),w.openDropdown()},onChange:e=>{k(e.currentTarget.value),F(!0),w.openDropdown()},onBlur:()=>{F(!1),k(""),w.closeDropdown()}})})}),(0,n.jsx)(i.G.Dropdown,{mah:200,style:{overflowY:"auto"},children:(0,n.jsx)(i.G.Options,{children:A.length>0?A.map(e=>(0,n.jsx)(i.G.Option,{value:e.value,children:e.label},e.code)):(0,n.jsx)(i.G.Empty,{children:f("nothingFound")})})})]})}},85409:(e,t,r)=>{"use strict";r.d(t,{_:()=>i,y:()=>a});var n=r(73671),l=r(34952);let i=()=>{let e="https://air.bg";if(!e&&l.env.VERCEL_PROJECT_PRODUCTION_URL)return"https://".concat(l.env.VERCEL_PROJECT_PRODUCTION_URL);if(!e){let t=l.env.PORT||"3000";e="http://localhost:".concat(t)}return e},a=()=>{let e="https://air.bg";if(e)return e;if(l.env.VERCEL_PROJECT_PRODUCTION_URL)return"https://".concat(l.env.VERCEL_PROJECT_PRODUCTION_URL);if(n.A){let{protocol:e,hostname:t,port:r}=window.location;return"".concat(e,"//").concat(t).concat(r?":".concat(r):"")}let t=l.env.PORT||"3000";return"http://localhost:".concat(t)}},89137:(e,t,r)=>{"use strict";r.d(t,{PageViewTracker:()=>a});var n=r(2410),l=r(35996),i=r(4662);function a(){let e=(0,l.usePathname)(),t=(0,l.useSearchParams)(),r=(0,n.useRef)("");return(0,n.useEffect)(()=>{let n=(0,i.Cl)(null!=e?e:"/"),l=t.toString(),a="".concat(window.location.origin).concat(n).concat(l?"?".concat(l):"");(0,i.Sd)({event:"page_view",page_path:n,page_location:a,page_title:"undefined"!=typeof document?document.title:"",page_referrer:r.current||document.referrer||""}),r.current=a},[e,t]),null}},91236:(e,t,r)=>{"use strict";r.d(t,{eO:()=>i,fu:()=>a});let n=["gender","firstName","lastName","birthDate","nationality","phoneCode","phoneNumber"],l=e=>"string"==typeof e&&e.trim().length>0,i=e=>{if(!e)return[...n];let t=[];return"Male"!==e.gender&&"Female"!==e.gender&&t.push("gender"),l(e.firstName)||t.push("firstName"),l(e.lastName)||t.push("lastName"),(e=>e instanceof Date?!Number.isNaN(e.getTime()):l(e))(e.birthDate)||t.push("birthDate"),l(e.nationality)||t.push("nationality"),l(e.phoneCode)||t.push("phoneCode"),l(e.phoneNumber)||t.push("phoneNumber"),t},a=e=>i(e).length>0},92585:(e,t,r)=>{"use strict";r.d(t,{$Z:()=>a,L6:()=>u,No:()=>s});var n=r(71861),l=r.n(n);let i=e=>{let[t,r,n]=e.substring(0,10).split("-").map(Number);return!t||!r||!n||isNaN(t)||isNaN(r)||isNaN(n)?null:{y:t,m:r,d:n}},a=e=>{if(!e)return null;if(e instanceof Date)return e;let t=i(e);return t?new Date(t.y,t.m-1,t.d):null},s=e=>{if(!e)return"";let t=i(e);if(!t)return"";let r=String(t.d).padStart(2,"0"),n=String(t.m).padStart(2,"0");return"".concat(r,".").concat(n,".").concat(t.y)},o=["DD.MM.YYYY","DD.MM.YY","D.M.YYYY","D.M.YY","DD/MM/YYYY","DD/MM/YY","D/M/YYYY","D/M/YY"],d=["DD/MM/YYYY","DD/MM/YY","D/M/YYYY","D/M/YY","DD.MM.YYYY","DD.MM.YY","D.M.YYYY","D.M.YY"],c=(e,t,r)=>{let n=e.getTime();return n>=t.getTime()&&n<=r.getTime()},u=(e,t)=>{let{locale:r,minDate:n,maxDate:i}=t;if(!e||"string"!=typeof e)return null;let a=e.trim();if(!a)return null;if(/^\d+$/.test(a)){if(8===a.length){let e=parseInt(a.substring(0,2),10),t=parseInt(a.substring(2,4),10),r=parseInt(a.substring(4,8),10);if(e>=1&&e<=31&&t>=1&&t<=12){let l=new Date(r,t-1,e);if(!isNaN(l.getTime())&&c(l,n,i))return l}}else if(6===a.length){let e=parseInt(a.substring(0,2),10),t=parseInt(a.substring(2,4),10),r=parseInt(a.substring(4,6),10);if(e>=1&&e<=31&&t>=1&&t<=12){let l=new Date(r<50?2e3+r:1900+r,t-1,e);if(!isNaN(l.getTime())&&c(l,n,i))return l}}}let s=a.match(/^(\d{1,2})[./-](\d{1,2})[./-](\d{2,4})$/);if(s){let[,e,t,r]=s,l=parseInt(e,10),a=parseInt(t,10),o=parseInt(r,10);if(2===r.length&&(o=o<50?2e3+o:1900+o),l>=1&&l<=31&&a>=1&&a<=12&&o>=1900&&o<=2100){let e=new Date(o,a-1,l);if(!isNaN(e.getTime())&&c(e,n,i))return e}}for(let e of"bg"===r?o:d){let t=l()(a,e,!0);if(t.isValid()){let e=t.toDate();if(c(e,n,i))return e}}return null}}},e=>{e.O(0,[5043,5325,8337,9618,5569,3242,4529,8990,4376,8920,5502,7950,3543,1785,1464,1233,7959,8114,8742,5654,2666,682,7358],()=>e(e.s=55496)),_N_E=e.O()}]);

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.