PageSourceSearch

https://book.andoliving.com/_next/static/chunks/pages/guests/booking/[token]-825c0a2f73cfb4b8.js

js andoliving.com collected 2026-10-04 13:32:10 UTC 257,590 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[392],{49474:function(o,u,d){"use strict";d.d(u,{Z:function(){return compareAsc}});var m=d(19013),p=d(13882);function compareAsc(o,u){(0,p.Z)(2,arguments);var d=(0,m.default)(o),g=(0,m.default)(u),h=d.getTime()-g.getTime();return h<0?-1:h>0?1:h}},91857:function(o,u,d){"use strict";d.r(u),d.d(u,{default:function(){return differenceInCalendarYears}});var m=d(19013),p=d(13882);function differenceInCalendarYears(o,u){(0,p.Z)(2,arguments);var d=(0,m.default)(o),g=(0,m.default)(u);return d.getFullYear()-g.getFullYear()}},96843:function(o,u,d){"use strict";d.r(u),d.d(u,{default:function(){return isEqual}});var m=d(19013),p=d(13882);function isEqual(o,u){(0,p.Z)(2,arguments);var d=(0,m.default)(o),g=(0,m.default)(u);return d.getTime()===g.getTime()}},603:function(o,u,d){(window.__NEXT_P=window.__NEXT_P||[]).push(["/guests/booking/[token]",function(){return d(85685)}])},9460:function(o,u){"use strict";u.Z={src:"/_next/static/media/secure-payment.69f06bc2.svg",height:35,width:35,blurWidth:0,blurHeight:0}},92507:function(o,u){"use strict";u.Z={src:"/_next/static/media/stripe.2f205c76.png",height:690,width:2400,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAMAAABSSm3fAAAAFVBMVEVDRlxtb4FGSmBSVmk4PFRBRFp6fIy6xbttAAAAB3RSTlP3+PL0y8vy0MsTogAAAAlwSFlzAAALEwAACxMBAJqcGAAAABZJREFUeJxjYGFgYmBmY2RlADMYGVkBAWIAJvpiAx4AAAAASUVORK5CYII=",blurWidth:8,blurHeight:2}},68850:function(o,u,d){"use strict";d.d(u,{K:function(){return InfoPeek}});var m=d(85893),p=d(86419),g=d(66192),h=d(53182),b=d(59886),y=d(28477),x=d(82729),v=d(85444);function _templateObject(){let o=(0,x._)(["\n  position: ",";\n  display: inline-block;\n\n  .defaultIcon {\n    svg {\n      fill: ",";\n    }\n  }\n\n  button {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    cursor: default;\n  }\n\n  @media "," {\n    button {\n      cursor: pointer;\n    }\n  }\n"]);return _templateObject=function(){return o},o}function _templateObject1(){let o=(0,x._)(["\n  border-radius: ",";\n  background-color: ",";\n  color: ",";\n  box-shadow: ",";\n  user-select: none;\n  animation-duration: 100ms;\n  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);\n  will-change: transform, opacity;\n  z-index: 1000;\n  padding: ",";\n\n  p {\n    color: inherit;\n  }\n\n  &[data-state='delayed-open'][data-side='top'] {\n    animation-name: slideDownAndFade;\n  }\n  &[data-state='delayed-open'][data-side='right'] {\n    animation-name: slideLeftAndFade;\n  }\n  &[data-state='delayed-open'][data-side='bottom'] {\n    animation-name: slideUpAndFade;\n  }\n  &[data-state='delayed-open'][data-side='left'] {\n    animation-name: slideRightAndFade;\n  }\n\n  @keyframes slideUpAndFade {\n    from {\n      opacity: 0;\n      transform: translateY(2px);\n    }\n    to {\n      opacity: 1;\n      transform: translateY(0);\n    }\n  }\n\n  @keyframes slideRightAndFade {\n    from {\n      opacity: 0;\n      transform: translateX(-2px);\n    }\n    to {\n      opacity: 1;\n      transform: translateX(0);\n    }\n  }\n\n  @keyframes slideDownAndFade {\n    from {\n      opacity: 0;\n      transform: translateY(-2px);\n    }\n    to {\n      opacity: 1;\n      transform: translateY(0);\n    }\n  }\n\n  @keyframes slideLeftAndFade {\n    from {\n      opacity: 0;\n      transform: translateX(2px);\n    }\n    to {\n      opacity: 1;\n      transform: translateX(0);\n    }\n  }\n"]);return _templateObject1=function(){return o},o}function _templateObject2(){let o=(0,x._)(["\n  font-weight: 300;\n  font-family: ",";\n  font-size: ",";\n  color: ",";\n  padding: 0;\n  margin: 0;\n\n  @media (max-width: 1024px) {\n    font-size: ",";\n  }\n\n  @media "," {\n    font-size: 1.1rem;\n  }\n"]);return _templateObject2=function(){return o},o}function _templateObject3(){let o=(0,x._)(["\n  z-index: 1000;\n  padding: ",";\n  text-align: left;\n  border-radius: ",";\n  background-color: ",";\n  box-shadow: ",";\n\n  p {\n    color: inherit;\n  }\n\n  @media "," {\n    width: 90vw;\n    max-width: 90vw;\n  }\n"]);
1return _templateObject3=function(){return o},o}let _=v.ZP.div.withConfig({componentId:"sc-aa83bb6e-0"})(_templateObject(),o=>{let{position:u}=o;return u},o=>{let{theme:u}=o;return u.colors.black},h.Hb.tablet),j=(0,v.ZP)(g.VY).withConfig({componentId:"sc-aa83bb6e-1"})(_templateObject1(),o=>{let{theme:u}=o;return u.radii.medium},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.colors.black},o=>{let{theme:u}=o;return u.shadows.boxShadow},o=>{let{theme:u,$contentSize:d}=o;return"large"===d?u.spacing.large:u.spacing.middle}),w=v.ZP.div.withConfig({componentId:"sc-aa83bb6e-2"})(_templateObject2(),o=>{let{theme:u}=o;return u.fonts.poppins},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.colors.text},o=>{let{theme:u}=o;return u.fontSizes.small},h.Hb.mobile),O=(0,v.ZP)(p.VY).withConfig({componentId:"sc-aa83bb6e-3"})(_templateObject3(),o=>{let{theme:u,$contentSize:d}=o;return"large"===d?u.spacing.medium:u.spacing.small},o=>{let{theme:u}=o;return u.radii.medium},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.shadows.boxShadow},h.Hb.mobile),InfoPeek=o=>{let{trigger:u,defaultIconSize:d=20,contentSize:x="small",position:v="relative",side:C,align:I,content:S,customStyles:k}=o,P=(0,y.Z)(h.Hb.tablet);return(0,m.jsx)(_,{position:v,children:P?(0,m.jsxs)(p.fC,{children:[(0,m.jsx)(p.xz,{children:u||(0,m.jsx)(b.P.InfoFilled,{className:"defaultIcon",size:d})}),(0,m.jsx)(p.h_,{children:(0,m.jsx)(O,{$contentSize:x,style:k,side:C,align:I,collisionPadding:8,children:(0,m.jsx)(w,{children:S})})})]}):(0,m.jsx)(g.zt,{delayDuration:100,children:(0,m.jsxs)(g.fC,{children:[(0,m.jsx)(g.xz,{children:u||(0,m.jsx)(b.P.InfoFilled,{className:"defaultIcon",size:d})}),(0,m.jsx)(g.h_,{children:(0,m.jsx)(j,{$contentSize:x,style:k,side:C,sideOffset:5,align:I,collisionPadding:8,children:(0,m.jsx)(w,{children:S})})})]})})})}},98704:function(o,u,d){"use strict";d.d(u,{K:function(){return m.K}});var m=d(68850)},27631:function(o,u,d){"use strict";d.d(u,{B:function(){return ErrorMessage}});var m=d(85893),p=d(82729),g=d(85444);function _templateObject(){let o=(0,p._)(["\n  color: ",";\n  font-weight: ",";\n  font-size: ",";\n  margin-left: ",";\n  margin-bottom: ",";\n  text-align: left;\n"]);return _templateObject=function(){return o},o}let h=g.ZP.span.withConfig({componentId:"sc-c17ecf2f-0"})(_templateObject(),o=>{let{theme:u}=o;return u.colors.danger},o=>{let{theme:u}=o;return u.weights.medium},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.spacing.small}),ErrorMessage=o=>{let{className:u,message:d}=o;return(0,m.jsx)(h,{"data-testid":"error-message",className:u,title:d,children:d})}},85572:function(o,u,d){"use strict";d.d(u,{P:function(){return F}});var m=d(85893),p=d(67294),g=d(79648),h=d(91773),b=d(37303),y=d(53182);let x={control:(o,u)=>({...o,borderRadius:y.TV.radii.xxx_large,background:y.TV.colors.background2,color:y.TV.colors.grey,border:"2px solid transparent",fontSize:y.TV.fontSizes.small,cursor:u.isDisabled?"not-allowed":"default",height:"40px",borderColor:u.isFocused?y.TV.colors.primary:"transparent",boxShadow:"none",":hover":{borderColor:y.TV.colors.primary},":focus":{borderColor:y.TV.colors.primary}}),indicatorSeparator:o=>({...o,display:"none"}),dropdownIndicator:o=>({...o,color:y.TV.colors.text}),menu:o=>({...o,borderRadius:y.TV.radii.x_large,boxShadow:"0px 1px 6px ".concat(y.TV.shadows.color),backgroundColor:y.TV.colors.white,padding:y.TV.spacing.small,marginLeft:"1px",marginRight:"1px",width:"99%",zIndex:101}),menuPortal:o=>({...o,zIndex:1e3,pointerEvents:"auto"}),option:(o,u)=>{let{isDisabled:d,isFocused:m}=u;return{...o,color:d?y.TV.colors.grey2:y.TV.colors.grey,fontSize:y.TV.fontSizes.small,backgroundColor:m?void 0:"transparent",padding:"".concat(y.TV.spacing.x_small," ").concat(y.TV.spacing.large),margin:"".concat(y.TV.spacing.xxx_small," 0"),userSelect:"none",cursor:d?"not-allowed":"pointer",borderRadius:y.TV.radii.large,textAlign:"left",display:"flex",alignItems:"center",position:"relative"}},valueContainer:o=>({...o,justifyContent:"start"}),placeholder:o=>({...o,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})},getFloatingSelectStyles=o=>({control:(o,u)=>{let{isDisabled:d}=u;return{...o,borderRadius:y.TV.radii.medium,background:y.TV.colors.white,color:y.TV.colors.text,border:"1px solid ".concat(y.TV.colors.grey3),fontSize:y.TV.fontSizes.small,height:"48px",boxShadow:"none",cursor:d?"not-allowed":"default",":hover":{borderColor:y.TV.colors.primary},":focus":{borderColor:y.TV.colors.primary}}},indicatorSeparator:o=>({...o,display:"none"}),dropdownIndicator:o=>({...o,color:y.TV.colors.grey3}),menu:o=>({...o,borderRadius:y.TV.radii.x_large,boxShadow:"0px 1px 6px ".concat(y.TV.shadows.color),backgroundColor:y.TV.colors.white,padding:y.TV.spacing.small,marginLeft:"1px",marginRight:"1px",width:"99%",zIndex:101}),menuPortal:o=>({...o,zIndex:1e3,pointerEvents:"auto"}),option:(u,d)=>{let{isDisabled:m,isFocused:p}=d;return{...u,color:m?y.TV.colors.grey2:y.TV.colors.text,fontSize:y.TV.fontSizes.small,backgroundColor:p?void 0:"transparent",padding:o?y.TV.spacing.x_small:"".concat(y.TV.spacing.x_small," ").concat(y.TV.spacing.large),margin:"".concat(y.TV.spacing.xxx_small," 0"),userSelect:"none",cursor:m?"not-allowed":"pointer",borderRadius:y.TV.radii.large,textAlign:"left",display:"flex",alignItems:"center",position:"relative"}}
1,valueContainer:o=>({...o,justifyContent:"start",position:"static"}),singleValue:o=>({...o,color:y.TV.colors.text}),placeholder:(o,u)=>({...o,display:u.isFocused||u.selectProps.inputValue?"none":"block"})});var v=d(82729),_=d(85444),j=d(27631),w=d(59886),O=d(45177);function _templateObject(){let o=(0,v._)(["\n          & > div > div {\n            border-color: "," !important;\n\n            &:hover {\n              border-color: "," !important;\n            }\n          }\n        "]);return _templateObject=function(){return o},o}function _templateObject1(){let o=(0,v._)(["\n          > div > div > div > div {\n            font-style: italic;\n          }\n\n          > div > div:nth-of-type(2) > div {\n            div:hover,\n            div:active,\n            div:focus,\n            div:focus-within {\n              background-color: ",";\n            }\n          }\n        "]);return _templateObject1=function(){return o},o}function _templateObject2(){let o=(0,v._)(["\n          > div > div:nth-of-type(2) {\n            border-radius: 0;\n\n            > div {\n              div {\n                font-size: ",";\n              }\n\n              div:hover,\n              div:active,\n              div:focus,\n              div:focus-within {\n                border-radius: 0;\n                background-color: ",";\n              }\n            }\n          }\n\n          > div > div:nth-of-type(1) {\n            border-radius: 0;\n            height: 48px;\n            background: ",";\n            border: 1px solid ",";\n            font-size: ",";\n          }\n        "]);return _templateObject2=function(){return o},o}function _templateObject3(){let o=(0,v._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  margin-bottom: ",";\n\n  > div > div > div > div {\n    font-style: normal;\n  }\n\n  > div > div:nth-of-type(2) > div {\n    div:hover,\n    div:active,\n    div:focus,\n    div:focus-within {\n      background-color: ",";\n    }\n  }\n\n  > div > div:hover,\n  > div > div:focus {\n    border-color: ",";\n  }\n\n  ",";\n\n  &:hover,\n  &:focus {\n    label {\n      color: ",";\n    }\n  }\n\n  &.disabled {\n    cursor: not-allowed;\n\n    label {\n      color: ",";\n    }\n  }\n\n  ",";\n\n  ",";\n"]);return _templateObject3=function(){return o},o}function _templateObject4(){let o=(0,v._)(["\n          :after {\n            content: '*';\n            color: ",";\n          }\n        "]);return _templateObject4=function(){return o},o}function _templateObject5(){let o=(0,v._)(["\n  display: block;\n  color: ",";\n  font-size: ",";\n  font-weight: ",";\n  margin-bottom: ",";\n  padding-left: ",";\n\n  ",";\n"]);return _templateObject5=function(){return o},o}function _templateObject6(){let o=(0,v._)(["\n  position: absolute;\n  left: ",";\n  top: ",";\n  color: ",";\n"]);return _templateObject6=function(){return o},o}function _templateObject7(){let o=(0,v._)(["\n  margin-top: ",";\n"]);return _templateObject7=function(){return o},o}function _templateObject8(){let o=(0,v._)(["\n          :after {\n            content: '*';\n            color: ",";\n          }\n        "]);return _templateObject8=function(){return o},o}function _templateObject9(){let o=(0,v._)(["\n          color: ",";\n        "]);return _templateObject9=function(){return o},o}function _templateObject10(){let o=(0,v._)(["\n  left: 10px;\n  pointer-events: none;\n  position: absolute;\n  transition: 0.2s ease all;\n  -moz-transition: 0.2s ease all;\n  -webkit-transition: 0.2s ease all;\n  z-index: 1;\n  left: 10px;\n  top: ",";\n  font-size: ",";\n  padding: ",";\n  background: ",";\n  color: ",";\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  max-width: 90%;\n\n  ",";\n\n  ",";\n"]);return _templateObject10=function(){return o},o}let C="rgba(208, 174, 121, 0.5)",I=_.ZP.div.withConfig({componentId:"sc-9daee328-0"})(_templateObject3(),o=>{let{theme:u}=o;return u.spacing.middle},"rgba(79, 176, 175, 0.5)",o=>{let{theme:u}=o;return u.colors.primary},o=>{let{error:u,theme:d}=o;
1return u?(0,_.iv)(_templateObject(),d.colors.danger,d.colors.danger):null},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.grey3},o=>{let{theme:u}=o;return u.currentCompany===O.O3.andoliving?(0,_.iv)(_templateObject1(),C):null},o=>{let{theme:u}=o;return u.currentCompany===O.O3.ferienhaus?(0,_.iv)(_templateObject2(),o=>{let{theme:u}=o;return u.fontSizes.middle},C,u.colors.white,u.colors.grey3,o=>{let{theme:u}=o;return u.fontSizes.middle}):null}),S=_.ZP.label.withConfig({componentId:"sc-9daee328-1"})(_templateObject5(),o=>{let{theme:u}=o;return u.colors.text},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.currentCompany===O.O3.lovelystay?u.weights.semiBold:u.weights.regular},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{isRequired:u}=o;return u?(0,_.iv)(_templateObject4(),o=>{let{theme:u}=o;return u.colors.danger}):null}),k=(0,_.ZP)(w.P.Check).withConfig({componentId:"sc-9daee328-2"})(_templateObject6(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.colors.primary}),P=(0,_.ZP)(j.B).withConfig({componentId:"sc-9daee328-3"})(_templateObject7(),o=>{let{theme:u}=o;return u.spacing.small}),D=_.ZP.label.withConfig({componentId:"sc-9daee328-4"})(_templateObject10(),o=>{let{isFloating:u}=o;return u?"-5px":"35%"},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return"0px ".concat(u.spacing.x_small)},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.colors.grey3},o=>{let{isRequired:u,theme:d}=o;return u?(0,_.iv)(_templateObject8(),d.colors.danger):null},o=>{let{error:u,theme:d}=o;return u?(0,_.iv)(_templateObject9(),d.colors.danger):null}),F=(0,p.forwardRef)((o,u)=>{let{id:d,name:p,classNamePrefix:y,items:v,label:_,style:j,value:w,defaultValue:O,placeholder:C,isRequired:F,hasError:N,errorMessage:T,onChange:M,isSearchable:z=!1,maxMenuHeight:E,classNames:R,hideCheck:G,menuPortalTarget:B,variant:A="default",containerClassName:Z,isDisabled:U,errorClassName:V,menuPlacement:L,menuPosition:H,styles:q}=o,{t:Q}=(0,b.$G)(),W="default"===A?x:getFloatingSelectStyles(G),$={...W};Object.entries(q||{}).forEach(o=>{let[u,d]=o,m=W[u];$[u]=(o,u)=>({...m?m(o,u):o,...d(o,u)})});let NoOptionsMessage=o=>(0,m.jsx)(g.c.NoOptionsMessage,{...o,children:(0,m.jsx)("span",{children:Q("common:noOption")})}),CustomOption=o=>{let{children:u,...d}=o;return(0,m.jsxs)(g.c.Option,{...d,children:[d.isSelected&&!G&&(0,m.jsx)(k,{}),u]})};return(0,m.jsxs)(I,{error:!!T||N,style:j,className:"".concat(Z," ").concat(U?"disabled":""),children:[_&&"default"===A&&(0,m.jsx)(S,{htmlFor:d,isRequired:F,children:_}),(0,m.jsx)(h.ZP,{ref:u,name:p,classNamePrefix:y,instanceId:d,inputId:d,options:v,value:w,placeholder:"default"!==A&&("floating"!==A||_)?"":C,isSearchable:z,styles:$,menuPortalTarget:B,menuPosition:H,components:"floating"===A?{NoOptionsMessage,Option:CustomOption,Control:o=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(D,{isRequired:F,isFloating:o.isFocused||o.hasValue,error:!!T,htmlFor:d,children:_}),(0,m.jsx)(g.c.Control,{...o})]})}:{NoOptionsMessage,Option:CustomOption},onChange:(o,u)=>{"object"==typeof o&&null!==o&&M(o,u)},maxMenuHeight:E,menuPlacement:L||"auto",defaultValue:O?null==v?void 0:v.find(o=>o.label===O||o.value===O):"",classNames:R,isDisabled:U}),T?(0,m.jsx)(P,{className:V,message:T}):null]})});F.displayName="Select"},72667:function(o,u,d){"use strict";d.d(u,{K:function(){return O}});var m=d(85893),p=d(67294),g=d(82729),h=d(85444),b=d(27631),y=d(45177);function _templateObject(){let o=(0,g._)(["\n          border: 1px solid ",";\n          &:hover,\n          &:focus,\n          &:active {\n            border: 1px solid ",";\n          }\n        "]);return _templateObject=function(){return o},o}function _templateObject1(){let o=(0,g._)(["\n          border-radius: 0;\n          background: ",";\n          border: 1px solid ",";\n          font-size: ",";\n\n          &:hover,\n          &:focus,\n          &:active {\n            border-color: ",";\n          }\n        "]);
1return _templateObject1=function(){return o},o}function _templateObject2(){let o=(0,g._)(["\n  width: 100%;\n  min-height: 140px;\n  background: ",";\n  border: 1px solid\n    ",";\n  resize: none;\n  padding: ",";\n  border-radius: ",";\n  color: ",";\n  margin-bottom: ",";\n  font-size: ",";\n\n  &:hover,\n  &:focus,\n  &:active {\n    border: 1px solid ",";\n\n    &::placeholder {\n      color: ",";\n    }\n  }\n\n  ",";\n\n  ",";\n\n  &:disabled {\n    cursor: not-allowed;\n    border-color: ",";\n    color: ",";\n\n    &::placeholder {\n      color: ",";\n    }\n  }\n"]);return _templateObject2=function(){return o},o}function _templateObject3(){let o=(0,g._)(["\n          :after {\n            content: '*';\n            color: ",";\n          }\n        "]);return _templateObject3=function(){return o},o}function _templateObject4(){let o=(0,g._)(["\n  width: 100%;\n  display: block;\n  text-align: left;\n  color: ",";\n  font-size: ",";\n  font-weight: ",";\n  margin: ",";\n\n  ",";\n"]);return _templateObject4=function(){return o},o}function _templateObject5(){let o=(0,g._)(["\n  display: block;\n"]);return _templateObject5=function(){return o},o}function _templateObject6(){let o=(0,g._)(["\n  white-space: pre-line;\n  margin: ",";\n  font-size: ",";\n"]);return _templateObject6=function(){return o},o}function _templateObject7(){let o=(0,g._)(["\n  width: 100%;\n"]);return _templateObject7=function(){return o},o}let x=h.ZP.textarea.withConfig({componentId:"sc-35f624f3-0"})(_templateObject2(),o=>{let{theme:u,backgroundColor:d}=o;return null!=d?d:u.colors.white},o=>{let{theme:u,variant:d}=o;return"floating"===d?u.colors.grey3:"transparent"},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u,variant:d}=o;return"floating"===d?u.radii.medium:u.radii.x_large},o=>{let{theme:u}=o;return u.colors.text},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u,variant:d}=o;return"floating"===d?u.colors.primary:u.colors.grey3},o=>{let{error:u,theme:d}=o;return u?(0,h.iv)(_templateObject(),d.colors.danger,d.colors.danger):null},o=>{let{theme:u}=o;return u.currentCompany===y.O3.ferienhaus?(0,h.iv)(_templateObject1(),u.colors.white,u.colors.grey3,o=>{let{theme:u}=o;return u.fontSizes.middle},u.colors.grey3):null},o=>{let{theme:u}=o;return u.colors.grey3},o=>{let{theme:u}=o;return u.colors.grey3},o=>{let{theme:u}=o;return u.colors.grey3}),v=h.ZP.label.withConfig({componentId:"sc-35f624f3-1"})(_templateObject4(),o=>{let{theme:u}=o;return u.colors.text},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.currentCompany===y.O3.lovelystay?u.weights.semiBold:u.weights.regular},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{isRequired:u}=o;return u?(0,h.iv)(_templateObject3(),o=>{let{theme:u}=o;return u.colors.danger}):null}),_=(0,h.ZP)(b.B).withConfig({componentId:"sc-35f624f3-2"})(_templateObject5()),j=h.ZP.div.withConfig({componentId:"sc-35f624f3-3"})(_templateObject6(),o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.fontSizes.small}),w=h.ZP.div.withConfig({componentId:"sc-35f624f3-4"})(_templateObject7()),O=(0,p.forwardRef)((o,u)=>{let{label:d,subtitle:p,name:g,errorMessage:h,isRequired:b,variant:y="default",...O}=o;return(0,m.jsxs)(w,{children:[d&&(0,m.jsx)(v,{htmlFor:g,isRequired:b,children:d}),p&&(0,m.jsx)(j,{children:p}),(0,m.jsx)(x,{ref:u,id:g,name:g,error:!!h,variant:y,...O}),h&&(0,m.jsx)(_,{message:h})]})});O.displayName="TextArea"},73776:function(o,u,d){"use strict";d.d(u,{$Q:function(){return CardPaymentForm},sA:function(){return x},a_:function(){return y},TT:function(){return buildCheckoutIntentRequest},O2:function(){return buildGuestPaymentCustomer},Qe:function(){return buildGuestPaymentDescription},BS:function(){return checkoutBindScope},LT:function(){return clearPreparedBind},h:function(){return eurosToCents},OO:function(){return guestBindScope},Rb:function(){return readPreparedBind},kl:function(){return requiresFuturePaymentFromCancelationPolicy},GX:function(){return toStripeElementsLocale},vW:function(){return useStripeIntent},PD:function(){return writePreparedBind}});var m=d(37303),p=d(48303);let failedResponse=o=>{var u,d,p,g,h;let b=null!==(d=null==o?void 0:null===(u=o.response)||void 0===u?void 0:u.data)&&void 0!==d?d:{};return{...b,outcome:"failed",error:null!==(h=null!==(g=null!==(p=b.error)&&void 0!==p?p:null==o?void 0:o.message)&&void 0!==g?g:null===m.ag||void 0===m.ag?void 0:m.ag.t("common:stripeMe
1ssages.paymentFailed"))&&void 0!==h?h:"Payment failed"}},createIntent=async o=>{try{let{data:u}=await p.Z.post("/bookings/website/payments/intents",o);return u}catch(o){return failedResponse(o)}};var g=d(85893),h=d(31596);let CardPaymentForm=o=>{let{formId:u,formRef:d,onSubmit:m,className:p,billingDefaults:b,hideWallets:y=!1,children:x}=o;return(0,g.jsxs)("form",{id:u,className:p,onSubmit:m,ref:d,children:[(0,g.jsx)(h.Hn,{options:{layout:"tabs",wallets:{link:"never",...y?{applePay:"never",googlePay:"never"}:{}},...b?{defaultValues:{billingDetails:b}}:{}}}),x]})};var b=d(67294);let getBillingDefaultsFromIntentRequest=o=>{let{customerName:u,email:d}=o;if(u||d)return{...u?{name:u}:{},...d?{email:d}:{}}},buildConfirmParams=(o,u,d)=>{let m=getBillingDefaultsFromIntentRequest(o);return{return_url:u,..."payment"===d&&o.email?{receipt_email:o.email}:{},...m?{payment_method_data:{billing_details:m}}:{}}},t=(o,u)=>{var d;return String(null!==(d=null===m.ag||void 0===m.ag?void 0:m.ag.t("common:stripeMessages.".concat(o),u))&&void 0!==d?d:o)},isSuccessfulPaymentIntentStatus=o=>"requires_capture"===o||"succeeded"===o||"processing"===o,paymentIntentFailureMessage=o=>"requires_action"===o?t("authenticationRequired"):o?t("paymentCouldNotCompleteWithStatus",{status:o}):t("paymentCouldNotComplete"),useStripeIntent=()=>{let o=(0,h.MD)(),u=(0,h.lq)(),[d,m]=(0,b.useState)(!1),p=(0,b.useCallback)(async d=>{let{intentRequest:p,returnUrl:g}=d;if(!o||!u)return{success:!1,error:t("stripeNotInitialized"),response:{}};m(!0);try{let{error:d}=await u.submit();if(d)return{success:!1,error:d.message,response:{}};let m=await createIntent(p);if("failed"===m.outcome||"requiresPaymentMethod"===m.outcome)return{success:!1,error:m.error,response:m};if("prepared"!==m.outcome)return{success:!1,error:t("unexpectedIntentResponse"),response:m};let h=m.setupIntentClientSecret,b=m.paymentIntentClientSecret,y=null!=g?g:window.location.href;if(h){let{error:d,setupIntent:g}=await o.confirmSetup({elements:u,clientSecret:h,confirmParams:buildConfirmParams(p,y,"setup"),redirect:"if_required"});if(d)return{success:!1,error:d.message,response:m};if((null==g?void 0:g.status)==="succeeded")return{success:!0,setupIntentId:g.id,response:m};return{success:!1,error:(null==g?void 0:g.status)==="requires_action"?t("authenticationRequired"):paymentIntentFailureMessage(null==g?void 0:g.status),response:m}}if(b){let{error:d,paymentIntent:g}=await o.confirmPayment({elements:u,clientSecret:b,confirmParams:buildConfirmParams(p,y,"payment"),redirect:"if_required"});if(d)return{success:!1,error:d.message,response:m};if(isSuccessfulPaymentIntentStatus(null==g?void 0:g.status))return{success:!0,paymentIntentId:null==g?void 0:g.id,response:m};return{success:!1,error:paymentIntentFailureMessage(null==g?void 0:g.status),response:m}}return{success:!1,error:t("missingClientSecret"),response:m}}catch(u){let o=u instanceof Error?u.message:t("paymentFailed");return{success:!1,error:o,response:{}}}finally{m(!1)}},[o,u]);return{submitPayment:p,isProcessing:d}},eurosToCents=o=>Math.round(100*o),roundEuros=o=>eurosToCents(o)/100,requiresFuturePaymentFromCancelationPolicy=o=>{var u,d;let m=null!==(u=null==o?void 0:o.upfrontPaymentPercentage)&&void 0!==u?u:1,p=null===(d=null==o?void 0:o.requiresImmediatePayment)||void 0===d||d;return!p||m<1},buildCheckoutIntentRequest=o=>{var u,d;let{propertyGroupId:m,totalAmount:p,cancelationPolicy:g,customerName:h,email:b}=o,y=null!==(u=null==g?void 0:g.upfrontPaymentPercentage)&&void 0!==u?u:1,x=null===(d=null==g?void 0:g.requiresImmediatePayment)||void 0===d||d,v=y<1,_=requiresFuturePaymentFromCancelationPolicy(g),j=roundEuros(p*y);return{propertyGroupId:m,amount:j,description:"LovelyStay Direct Booking",customerName:h,email:b,currency:"EUR",requiresImmediatePayment:x,upfrontPaymentPercentage:y,needsUpfrontPartialPayment:v,requiresFuturePayment:_}},y=["card"],x=["card"],buildGuestPaymentDescription=o=>{let{bookingId:u,checkIn:d,checkOut:m}=o;return"Guest payment for booking #".concat(u," from ").concat(d," to ").concat(m)},buildGuestPaymentCustomer=o=>{var u,d;let m=null===(u=o.fullName)||void 0===u?void 0:u.trim(),p=null===(d=o.email)||void 0===d?void 0:d.trim();return{...m?{customerName:m}:{},...p?{email:p}:{}}},v=new Set(["en","pt","es","fr","de","it","nl"]),toStripeElementsLocale=o=>{var u;let d=(null===(u=(null!=o?o:"en").split("-")[0])||void 0===u?void 0:u.toLowerCase())||"en";return v.has(d)?d:"en"},storageKey=o=>"".concat("website:stripe-bind:").concat(o),checkoutBindScope=o=>{let{propertyGroupId:u,checkIn:d,checkOut:m}=o;return"checkout:".concat(u,":").concat(d,":").concat(m)},guestBindScope=o=>{let{guestToken:u,bookingUnitId:d}=o;return"guest:".concat(u,":").concat(null!=d?d:"multi")},readPreparedBind=o=>
1{if("undefined"==typeof sessionStorage)return null;try{let u=sessionStorage.getItem(storageKey(o));if(!u)return null;return JSON.parse(u)}catch(o){return null}},writePreparedBind=(o,u)=>{"undefined"!=typeof sessionStorage&&sessionStorage.setItem(storageKey(o),JSON.stringify(u))},clearPreparedBind=o=>{"undefined"!=typeof sessionStorage&&sessionStorage.removeItem(storageKey(o))}},85685:function(o,u,d){"use strict";d.r(u),d.d(u,{__N_SSP:function(){return rI},default:function(){return rS}});var m,p,g=d(85893),h=d(67294),b=d(37303),y=d(2962),x=d(9008),v=d.n(x),_=d(11163),j=d(76248),w=d(59647),O=d(287),C=d(59886),I=d(13719),S=d(48773),k=d(60832),P=d(82729),D=d(85444);function _templateObject(){let o=(0,P._)(["\n  display: flex;\n  margin: ",";\n\n  > div > svg {\n    margin-right: ",";\n    color: ",";\n  }\n\n  h2 {\n    margin-bottom: ",";\n  }\n"]);return _templateObject=function(){return o},o}function _templateObject1(){let o=(0,P._)([""]);return _templateObject1=function(){return o},o}let F=D.ZP.div.withConfig({componentId:"sc-d9772f7b-0"})(_templateObject(),o=>{let{theme:u}=o;return"".concat(u.spacing.medium," 0 ").concat(u.spacing.medium," ").concat(u.spacing.x_small)},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.spacing.medium}),N=(0,D.ZP)(F).withConfig({componentId:"sc-d9772f7b-1"})(_templateObject1()),T=["office","idealista","flatio","apartool"],Cancellation=()=>{let{t:o,i18n:u}=(0,b.$G)(),{bookingSource:d,bookingChargedAllowedDate:m}=(0,S.J)(o=>{var u,d,m;return{bookingSource:null===(u=o.bookingInfo)||void 0===u?void 0:u.source,bookingChargedAllowedDate:null===(m=o.bookingInfo)||void 0===m?void 0:null===(d=m.bookerPaymentDetails)||void 0===d?void 0:d.chargeAllowedDate}},j.X),[p,y]=(0,h.useState)("");(0,h.useEffect)(()=>{if(m){let o=new Date(m),d=new Date(o.toISOString().slice(0,-1));y((0,I.p6)(d,"dd MMMM yyyy",u.language))}},[m,u.language]);let x=T.includes(d);return(0,g.jsx)(k.W,{width:"100%",margin:"0",children:x?(0,g.jsxs)(F,{children:[(0,g.jsx)("div",{children:(0,g.jsx)(C.P.CalendarX,{size:22})}),(0,g.jsxs)("div",{children:[(0,g.jsx)(O.D,{children:o("guest:contact.cancellationPolicy")}),(0,g.jsx)(w.x,{children:o("guest:contact.freeCancellationDescription",{date:p})})]})]}):(0,g.jsxs)(N,{children:[(0,g.jsx)("div",{children:(0,g.jsx)(C.P.CalendarX,{size:22})}),(0,g.jsxs)("div",{children:[(0,g.jsx)(O.D,{children:o("guest:contact.cancellationPolicy")}),(0,g.jsx)(w.x,{children:o("guest:contact.cancellationExternalSourcesDescription")})]})]})})};var M=d(25675),z=d.n(M),E={src:"/_next/static/media/andoliving-secure-payment.d6e30686.svg",height:35,width:35,blurWidth:0,blurHeight:0},R=d(9460),G=d(92507),B=d(51195),A=d(18403),Z=d(53182);function styles_templateObject(){let o=(0,P._)([""]);return styles_templateObject=function(){return o},o}function styles_templateObject1(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  column-gap: ",";\n  justify-content: space-between;\n\n  > div {\n    display: flex;\n    align-items: center;\n\n    img {\n      margin-right: ",";\n    }\n  }\n\n  @media "," {\n    > img {\n      height: 25px;\n      width: 98px;\n    }\n  }\n"]);return styles_templateObject1=function(){return o},o}function _templateObject2(){let o=(0,P._)(["\n  display: flex;\n  justify-content: left;\n  column-gap: ",";\n  margin-bottom: ",";\n  width: 100%;\n\n  > div {\n    width: 50%;\n    margin-left: ",";\n  }\n\n  ul {\n    margin-left: ",";\n  }\n\n  ul > li {\n    color: ",";\n    margin-top: ",";\n  }\n\n  li::marker {\n    color: ",";\n  }\n\n  @media "," {\n    display: block;\n  }\n"]);return _templateObject2=function(){return o},o}let U=D.ZP.div.withConfig({componentId:"sc-8811d71c-0"})(styles_templateObject()),V=D.ZP.div.withConfig({componentId:"sc-8811d71c-1"})(styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.middle},Z.Hb.mobile),L=D.ZP.div.withConfig({componentId:"sc-8811d71c-2"})(_templateObject2(),o=>{let{theme:u}=o;return u.spacing.x_large},o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.spacing.x_large},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.colors.grey},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.colors.primary},Z.Hb.mobile),SecurePayment=()=>{let{t:o}=(0,b.$G)(),{isAndoLiving:u}=(0,B.M)(),d=A.D.slice(0,2),m=A.D.slice(2);return(0,g.jsx)(k.W,{width:"100%",margin:"0",children:(0,g.jsxs)(U,{children:[(0,g.jsxs)(V,{children:[(0,g.jsxs)("div",{children:[(0,g.jsx)(z(),{src:u?E:R.Z,alt:o("common:benefits.safeAndSecurePayment"),width:28}),(0,g.jsx)(O.D,{children:o("common:benefits.safeAndSecurePayment")})]}),(0,g.jsx)(z(),{src:G.Z,width:140,alt:o("common:benefits.poweredByStripe")})]}),(0,g.jsxs)(L,{children:[(0,g.jsx)("div",{children:(0,g.jsx)("ul",{children:d.map(u=>(0,g.jsx)("li",{children:(0,g.jsx)(w.x,{children:o(u)})},u))})}),(0,g.jsx)("div",{children:(0,g.jsx)("ul",{children:m.map(u=>(0,g.jsx)("li",{children:(0,g.jsx)(w.x,{children:o(u)})},u))})})]})]})})};
1function additional_info_styles_templateObject(){let o=(0,P._)(["\n  display: grid;\n  width: 100%;\n  grid-template-columns: 1fr 1fr;\n  gap: ",";\n  padding: ",";\n\n  @media "," {\n    grid-template-columns: 1fr;\n  }\n\n  @media "," {\n    padding: 0;\n  }\n"]);return additional_info_styles_templateObject=function(){return o},o}let H=D.ZP.div.withConfig({componentId:"sc-7b19a31e-0"})(additional_info_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return"0 ".concat(u.spacing.large," 0 115px")},Z.Hb.x_desktop,Z.Hb.tablet),AdditionalInfo=()=>{let o=(0,S.J)(o=>{var u;return null===(u=o.bookingInfo)||void 0===u?void 0:u.source});return(0,g.jsxs)(H,{children:["owner"!==o&&(0,g.jsx)(Cancellation,{}),(0,g.jsx)(SecurePayment,{})]})};var q=d(15329),Q=d(67803),W=d(23855),$=d(65665),K=d(92744);function BookingDetails_styles_templateObject(){let o=(0,P._)(["\n  height: auto;\n  width: 100%;\n  border-radius: ",";\n"]);return BookingDetails_styles_templateObject=function(){return o},o}function BookingDetails_styles_templateObject1(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  row-gap: ",";\n\n  h2 {\n    margin-top: ",";\n  }\n"]);return BookingDetails_styles_templateObject1=function(){return o},o}function styles_templateObject2(){let o=(0,P._)(["\n  display: flex;\n  align-items: flex-start;\n  column-gap: ",";\n\n  svg {\n    margin-top: ",";\n    ",";\n  }\n\n  div {\n    display: flex;\n    flex-direction: column;\n  }\n"]);return styles_templateObject2=function(){return o},o}let J=D.ZP.img.withConfig({componentId:"sc-520d2acf-0"})(BookingDetails_styles_templateObject(),o=>{let{theme:u}=o;return u.radii.middle}),X=D.ZP.div.withConfig({componentId:"sc-520d2acf-1"})(BookingDetails_styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.medium}),Y=D.ZP.div.withConfig({componentId:"sc-520d2acf-2"})(styles_templateObject2(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.xx_small},(0,K.Pe)("secondary","secondary")),BookingDetails=()=>{var o,u;let{t:d,i18n:m}=(0,b.$G)(),p=(0,S.J)(o=>o.bookingInfo),{aptTitle:h,aptMunicipality:y,aptNeighbourhood:x,aptStreetName:v,buildingName:_,photos:j,checkIn:P,checkOut:D}=p,F=(0,I.p6)(P?(0,W.default)(P):new Date,"EE, dd MMM yyyy",null!==(o=null==m?void 0:m.language)&&void 0!==o?o:"en"),N=(0,I.p6)(D?(0,W.default)(D):new Date,"EE, dd MMM yyyy",null!==(u=null==m?void 0:m.language)&&void 0!==u?u:"en"),T=(0,Q.Z)((0,W.default)(null!=D?D:""),(0,W.default)(null!=P?P:""));return(0,g.jsxs)(k.W,{width:"calc(100% - 24px)",margin:"0",children:[(0,g.jsx)(J,{src:j[0]}),(0,g.jsxs)(X,{children:[(0,g.jsx)(O.D,{children:h}),(0,g.jsxs)(Y,{children:[(0,g.jsx)(C.P.LocationPinFilled,{}),(0,g.jsxs)("div",{children:[(0,g.jsx)($.Q,{children:d("guest:bookingInfo.address")}),(0,g.jsxs)(w.x,{children:[y,x?", ".concat(x):""," |"," ",v]})]})]}),_&&(0,g.jsxs)(Y,{children:[(0,g.jsx)(C.P.Building,{}),(0,g.jsxs)("div",{children:[(0,g.jsx)($.Q,{children:d("guest:bookingInfo.building")}),(0,g.jsx)(w.x,{children:_})]})]}),(0,g.jsxs)(Y,{children:[(0,g.jsx)(C.P.CalendarCheck,{}),(0,g.jsxs)("div",{children:[(0,g.jsx)($.Q,{children:d("guest:bookingInfo.checkIn")}),(0,g.jsx)(w.x,{children:F})]})]}),(0,g.jsxs)(Y,{children:[(0,g.jsx)(C.P.CalendarCheck,{}),(0,g.jsxs)("div",{children:[(0,g.jsx)($.Q,{children:d("guest:bookingInfo.checkOut")}),(0,g.jsx)(w.x,{children:N})]})]}),(0,g.jsxs)(Y,{children:[(0,g.jsx)(C.P.CalendarAlt,{}),(0,g.jsxs)("div",{children:[(0,g.jsx)($.Q,{children:d("guest:bookingInfo.total")}),(0,g.jsx)(w.x,{children:d("guest:bookingInfo.totalNights",{nights:T})})]})]})]})]})};var ee=d(41664),et=d.n(ee),en=d(42298),er=d(65289),ei=d(72742),eo=d(42699),ea=d(12274),el=d(98704);function PaymentItem_styles_templateObject(){let o=(0,P._)(["\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  width: 100%;\n  padding: 0;\n  margin: 0;\n"]);return PaymentItem_styles_templateObject=function(){return o},o}let es=D.ZP.div.withConfig({componentId:"sc-a756a5c3-0"}
1)(PaymentItem_styles_templateObject()),ec={maxWidth:"300px"},PaymentItem=o=>{let{description:u,showInfoPeek:d,amount:m,variant:p="summary",className:h}=o,{t:y}=(0,b.$G)();return(0,g.jsxs)(es,{className:h,children:[(0,g.jsxs)($.Q,{children:[u,d&&(0,g.jsx)(el.K,{customStyles:ec,side:"details"===p?"right":"bottom",position:"details"===p?"absolute":"relative",content:y("common:cityTaxDisclaimer")})]}),(0,g.jsx)($.Q,{children:m})]})},PaymentTextItem=o=>{let{description:u,className:d}=o;return(0,g.jsx)(es,{className:d,children:(0,g.jsx)(w.x,{children:u})})};var eu=d(80691),ed=d(1112),em=d(17801);let calculatedPricePerNight=(o,u)=>o/u,calculateDueDate=o=>{let u=(0,W.default)(o.chargeAllowedDate),d=(0,W.default)(o.cityTaxChargeAllowedDate);if((0,ea.default)(u)&&(0,ea.default)(d))return(0,eo.default)(u,d)?u:d},createUnitPayments=(o,u,d)=>[{description:d("guest:payment.pricePerNight",{count:u}),label:d("guest:payment.accommodation"),amount:(0,eu.WW)(calculatedPricePerNight(o.bookerPaymentDetails.accommodation,u)),paidOnExternalSource:o.bookerPaymentDetails.accommodationPaidOnExternalSource},{description:d("guest:payment.cityTax"),amount:(0,eu.WW)(o.cityTaxChargedToGuest),paidOnExternalSource:o.bookerPaymentDetails.cityTaxPaidOnExternalSource,hide:o.cityTaxChargedToGuest<=0,showInfoPeek:!0},{description:d("guest:payment.cleaningFee"),amount:(0,eu.WW)(o.cleaningFee),paidOnExternalSource:o.bookerPaymentDetails.cleaningPaidOnExternalSource,hide:o.cleaningFee<=0}],fullPaidOnExternalSource=(o,u,d)=>{let m=createUnitPayments(o,u,d).filter(o=>o.paidOnExternalSource).length;return 3===m||2===m&&o.bookerPaymentDetails.cityTaxPaidOnExternalSource&&o.cityTaxChargedToGuest<=0},renderPaymentDiscrimination=o=>{let{bookingInfo:u,nights:d,t:m,variant:p="summary"}=o,{bookingUnits:h,isMultiRoomBooking:b}=u;if(!b||fullPaidOnExternalSource(u,d,m)){let o=[],h=[];return createUnitPayments(u,d,m).forEach((u,d)=>{u.paidOnExternalSource?o.push(u.label||u.description):u.hide||h.push((0,g.jsx)(PaymentItem,{variant:p,...u},"".concat(d)))}),(0,g.jsxs)(ei.Ro,{children:[h,o.length>0&&(0,g.jsx)(PaymentTextItem,{description:fullPaidOnExternalSource(u,d,m)?m("guest:payment.fullBooking",{source:ed.Y[u.source]}):m("guest:payment.paidBySource",{fees:o.join(m("guest:payment.and")),source:ed.Y[u.source]})})]})}return(0,g.jsx)(ei.Ro,{children:null==h?void 0:h.map((o,h)=>{let b=createUnitPayments(o,d,m),{title:y,subtitle:x}=(0,em.yh)(o,m,{isMultiRoomBooking:!0,bookingAddress:u.aptAddress}),v=[];return b.forEach((o,u)=>{o.paidOnExternalSource||o.hide||v.push((0,g.jsx)(PaymentItem,{variant:p,...o},"room-".concat(h,"-").concat(u)))}),(0,g.jsxs)(ei.kG,{children:[(0,g.jsxs)(ei.po,{children:[(0,g.jsx)(ei.qP,{children:y}),x&&(0,g.jsx)(ei.tF,{children:x})]}),v]},h)})})};function Payment_styles_templateObject(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n\n  h5 {\n    font-size: ",";\n    font-family: ",";\n    font-weight: ",";\n    margin-bottom: ",";\n  }\n\n  hr {\n    margin: "," 0;\n    background-color: ",";\n    height: 1px;\n    border: none;\n  }\n"]);return Payment_styles_templateObject=function(){return o},o}function Payment_styles_templateObject1(){let o=(0,P._)(["\n  display: flex;\n  justify-content: space-between;\n\n  .uppercase {\n    text-transform: uppercase;\n  }\n\n  .amount {\n    color: ",";\n    font-weight: ",";\n  }\n\n  .withInfo {\n    display: flex;\n    align-items: center;\n    column-gap: ",";\n  }\n"]);return Payment_styles_templateObject1=function(){return o},o}function Payment_styles_templateObject2(){let o=(0,P._)(["\n  > p:first-child {\n    text-decoration: underline;\n  }\n\n  &:hover {\n    cursor: pointer;\n  }\n"]);return Payment_styles_templateObject2=function(){return o},o}function _templateObject3(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  justify-content: flex-end;\n  margin-top: ",";\n\n  a {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    height: 50px;\n    padding: ",";\n    border-radius: ",";\n    border: 1px solid ",";\n    background-color: ",";\n\n    p {\n      color: ",";\n    }\n\n    &:hover {\n      background-color: ",";\n\n      p {\n        color: ",";\n      }\n    }\n  }\n"]);
1return _templateObject3=function(){return o},o}let ep=D.ZP.div.withConfig({componentId:"sc-e64e973-0"})(Payment_styles_templateObject(),o=>{let{theme:u}=o;return u.fontSizes.medium},o=>{let{theme:u}=o;return u.fonts.poppins},o=>{let{theme:u}=o;return u.weights.medium},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.colors.grey2}),eg=D.ZP.div.withConfig({componentId:"sc-e64e973-1"})(Payment_styles_templateObject1(),o=>{let{theme:u}=o;return u.colors.danger},o=>{let{theme:u}=o;return u.weights.semiBold},o=>{let{theme:u}=o;return u.spacing.x_small});(0,D.ZP)(eg).withConfig({componentId:"sc-e64e973-2"})(Payment_styles_templateObject2());let ef=D.ZP.div.withConfig({componentId:"sc-e64e973-3"})(_templateObject3(),o=>{let{theme:u}=o;return u.spacing.x_large},o=>{let{theme:u}=o;return"".concat(u.spacing.small," ").concat(u.spacing.large)},o=>{let{theme:u}=o;return u.radii.medium},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.white}),Payment=()=>{let{t:o}=(0,b.$G)(),{bookingInfo:u,paymentStatus:d}=(0,S.J)(o=>({bookingInfo:o.bookingInfo,paymentStatus:o.status.payment}),j.X),{chargedAmount:m,nights:p,bookerPaymentDetails:h,actualProcessingAmount:y,actualDueAmountToPay:x,totalBookingAmount:v}=u,_=calculateDueDate(h),O="incomplete"===h.paymentStatus;return(0,g.jsx)(k.W,{width:"calc(100% - 24px)",margin:"0px",children:(0,g.jsxs)(ep,{children:[(0,g.jsx)(er.N,{sectionTitle:o("guest:payment.priceDetails"),sectionStatus:d,hideDetail:!0}),renderPaymentDiscrimination({bookingInfo:u,nights:p,t:o,variant:"summary"}),(0,g.jsxs)(ei.Ro,{className:"totals",children:[(0,g.jsxs)(eg,{children:[(0,g.jsx)($.Q,{className:"uppercase",children:o("guest:payment.finalPrice")}),(0,g.jsx)($.Q,{children:(0,eu.WW)(v)})]}),!!m&&!fullPaidOnExternalSource(u,p,o)&&(0,g.jsxs)(eg,{children:[(0,g.jsx)($.Q,{className:"uppercase",children:o("guest:payment.amountPaid")}
1),(0,g.jsx)($.Q,{children:(0,eu.WW)(Number(m))})]}),y>0&&"processing"===d&&(0,g.jsxs)(eg,{children:[(0,g.jsx)($.Q,{className:"uppercase",children:o("guest:payment.processingAmount")}),(0,g.jsx)($.Q,{children:(0,eu.WW)(y)})]}),O&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("hr",{}),(0,g.jsxs)(eg,{children:[(0,g.jsx)($.Q,{className:"uppercase amount",children:o("guest:payment.amountLeft",{date:(0,en.default)(_||new Date,"dd/MM/yyyy")})}),(0,g.jsx)($.Q,{className:"amount",children:(0,eu.WW)(x)})]}),(0,g.jsx)(ef,{children:(0,g.jsx)(et(),{href:"#payment",children:(0,g.jsx)(w.x,{children:o("guest:payment.pay")})})})]})]})]})})};function booking_summary_styles_templateObject(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  row-gap: ",";\n\n  @media (max-width: 1032px) {\n    display: none;\n  }\n\n  .skeletonContainer {\n    flex: 1;\n    margin-top: ",";\n    width: ",";\n  }\n\n  .skeleton {\n    height: 100%;\n    border-radius: ",";\n    line-height: unset;\n\n    @media "," {\n    }\n  }\n"]);return booking_summary_styles_templateObject=function(){return o},o}let eh=D.ZP.div.withConfig({componentId:"sc-8ba17374-0"})(booking_summary_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return"calc(100% - ".concat(u.spacing.large,")")},o=>{let{theme:u}=o;return u.radii.medium},Z.Hb.tablet),BookingSummary=o=>{let{isPageLoading:u}=o,d=(0,S.J)(o=>o.bookingInfo);return(0,g.jsx)(eh,{children:u?(0,g.jsx)(q.O,{containerClassName:"skeletonContainer",className:"skeleton"}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(BookingDetails,{}),"owner"!==d.source&&"short_term"===d.bookingRentalType&&(0,g.jsx)(Payment,{})]})})};var eb=d(79597),ey=d(18500),ex=d(28477),ev=d(87536),e_=d(56312);function Label_styles_templateObject(){let o=(0,P._)(["\n  font-family: ",";\n  font-size: ",";\n  font-weight: ",";\n  color: ",";\n  display: flex;\n  padding: 0;\n  margin: 0;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n\n  @media (max-width: 1024px) {\n    font-size: ",";\n  }\n\n  @media "," {\n    font-size: 1.1rem;\n  }\n"]);return Label_styles_templateObject=function(){return o},o}let ej=D.ZP.label.withConfig({componentId:"sc-2573c768-0"})(Label_styles_templateObject(),o=>{let{theme:u}=o;return u.fonts.poppins},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.weights.medium},o=>{let{theme:u}=o;return u.colors.text},o=>{let{theme:u}=o;return u.fontSizes.small},Z.Hb.mobile),Label=o=>{let{className:u="",title:d,...m}=o;return(0,g.jsx)(ej,{className:u,title:d,...m})};var ew=d(27631),eO=d(83425),eC=d(81002),eI=d(85572),eS=d(72667),ek=d(54555),eP=d(76498),eD=d(85945),eF=d(48228),eN=d(77930),eT=d(13009),eM=d(3465);let useUpdateBookingInfoMutation=o=>{let u=(0,eD.NL)(),d=(0,S.J)(o=>o.bookingInfo);return(0,eF.D)({mutationFn:o=>(0,eM.w5)(o),onSuccess:(m,p)=>{u.setQueryData(["booking-info",p.guestToken],d),(0,eN.c0)({message:o("guest:contact.submitMessage"),type:"success"})},onError:()=>(0,eT.U)()})};var ez=d(12854),eE=d(96219),eR=d(80258);function privacy_policy_styles_templateObject(){let o=(0,P._)(["\n  z-index: 100;\n  background-color: rgba(0, 0, 0, 0.4);\n  position: fixed;\n  inset: 0;\n  animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);\n\n  @keyframes overlayShow {\n    from {\n      opacity: 0;\n    }\n    to {\n      opacity: 1;\n    }\n  }\n"]);return privacy_policy_styles_templateObject=function(){return o},o}function privacy_policy_styles_templateObject1(){let o=(0,P._)(["\n  background-color: ",";\n  border-radius: ",";\n  box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px,\n    hsl(206 22% 7% / 20%) 0px 10px 20px -15px;\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  width: 90vw;\n  max-width: 700px;\n  height: 85vh;\n  padding: ",";\n  animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);\n  z-index: 1000;\n\n  @keyframes contentShow {\n    from {\n      opacity: 0;\n      transform: translate(-50%, -48%) scale(0.96);\n    }\n    to {\n      opacity: 1;\n      transform: translate(-50%, -50%) scale(1);\n    }\n  }\n\n  &:focus {\n    outline: none;\n  }\n\n  div {\n    height: 100%;\n    overflow-y: auto;\n  }\n\n  h2 {\n    font-size: ",";\n    margin-bottom: ",";\n    margin-top: ",";\n    text-transform: uppercase;\n    text-decoration: underline;\n  }\n\n  p,\n  li {\n    font-size: ",";\n    margin: 0 0 ",";\n  }\n\n  li {\n    margin-left: ",";\n  }\n\n  a {\n    color: ",";\n    text-decoration: none;\n  }\n"]);
1return privacy_policy_styles_templateObject1=function(){return o},o}function privacy_policy_styles_templateObject2(){let o=(0,P._)(["\n  cursor: pointer;\n  color: ",";\n  display: inline-block;\n"]);return privacy_policy_styles_templateObject2=function(){return o},o}function styles_templateObject3(){let o=(0,P._)(["\n  font-family: inherit;\n  border-radius: 100%;\n  height: 25px;\n  width: 25px;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  position: absolute;\n  top: 10px;\n  right: 10px;\n  transition: ",";\n  color: ",";\n\n  svg {\n    &:hover {\n      color: ",";\n    }\n  }\n"]);return styles_templateObject3=function(){return o},o}let eG=(0,D.ZP)(ez.aV).withConfig({componentId:"sc-c7ccdcfc-0"})(privacy_policy_styles_templateObject()),eB=(0,D.ZP)(ez.VY).withConfig({componentId:"sc-c7ccdcfc-1"})(privacy_policy_styles_templateObject1(),o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.radii.middle},o=>{let{theme:u}=o;return u.spacing.x_large},o=>{let{theme:u}=o;return u.fontSizes.medium},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.colors.primary}),eA=D.ZP.span.withConfig({componentId:"sc-c7ccdcfc-2"})(privacy_policy_styles_templateObject2(),o=>{let{theme:u}=o;return u.colors.primary}),eZ=D.ZP.button.withConfig({componentId:"sc-c7ccdcfc-3"})(styles_templateObject3(),o=>{let{theme:u}=o;return u.transitions.regular},o=>{let{theme:u}=o;return u.colors.secondary},o=>{let{theme:u}=o;return u.colors.primary}),PrivacyPolicy=()=>{let{t:o}=(0,b.$G)();return(0,g.jsx)(eR.V,{trigger:(0,g.jsx)(eA,{children:o("guest:contact.privacyPolicy")}),overlay:(0,g.jsx)(eG,{}),content:(0,g.jsxs)(eB,{children:[(0,g.jsxs)(eE.T,{children:[(0,g.jsx)(ez.$N,{children:o("guest:contact.privacyPolicy")}),(0,g.jsx)(ez.Be,{children:(0,g.jsx)(b.cC,{i18nKey:"guest:contact.privacyPolicyDescription",components:{p:(0,g.jsx)("p",{}),h2:(0,g.jsx)("h2",{}),br:(0,g.jsx)("br",{}),li:(0,g.jsx)("li",{}),ul:(0,g.jsx)("ul",{})}})})]}),(0,g.jsx)("div",{children:(0,g.jsx)(b.cC,{i18nKey:"guest:contact.privacyPolicyDescription",components:{p:(0,g.jsx)("p",{}),h2:(0,g.jsx)("h2",{}),br:(0,g.jsx)("br",{}),li:(0,g.jsx)("li",{}),ul:(0,g.jsx)("ul",{})}})}),(0,g.jsx)(ez.GG,{asChild:!0,children:(0,g.jsx)(eZ,{children:(0,g.jsx)(C.P.Close,{size:20})})})]})})};var eU=d(1604),eV=d(55839);let eL=eU.z.object({secondaryEmail:eU.z.union([eU.z.string().email().nullish(),eU.z.literal("")]),transportationMethod:eU.z.string().optional(),flight:eU.z.string().optional(),phoneCountryId:eU.z.string().min(1),phoneCode:eU.z.string(),normalizedNationalPhoneNumber:eU.z.string().min(1),checkInHour:eU.z.string(),checkOutHour:eU.z.string(),bookerComment:eU.z.string().optional(),agreesPrivacyPolicy:eU.z.boolean().refine(o=>!0===o),allowsMarketingEmails:eU.z.boolean().optional(),requestInvoice:eU.z.boolean().optional(),issueInvoiceToEndConsumer:eU.z.boolean().optional()}).superRefine((o,u)=>{let{phoneCountryId:d,normalizedNationalPhoneNumber:m}=o;(0,eV.B)(m,d)||u.addIssue({code:"custom",message:"common:messages.invalidPhone",path:["normalizedNationalPhoneNumber"]})}),eH=eU.z.object({contactForm:eL});var eq=d(27049);function contact_details_styles_templateObject(){let o=(0,P._)(["\n  width: 47%;\n  display: flex;\n  flex-direction: column;\n  row-gap: ",";\n  margin-bottom: ",";\n\n  p,\n  h4 {\n    height: fit-content;\n  }\n\n  @media "," {\n    width: 100%;\n  }\n\n  @media "," {\n    width: 47%;\n  }\n\n  @media "," {\n    width: 100%;\n  }\n"]);return contact_details_styles_templateObject=function(){return o},o}function contact_details_styles_templateObject1(){let o=(0,P._)(["\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n  column-gap: ",";\n\n  fieldset {\n    display: flex;\n    flex-wrap: wrap;\n    justify-content: space-between;\n    column-gap: ",";\n    border: none;\n  }\n\n  .error {\n    position: absolute;\n    bottom: -14px;\n  }
1\n\n  .description {\n    margin-bottom: ",";\n  }\n\n  .textAreaTitle {\n    margin-bottom: ",";\n  }\n\n  .option {\n    display: inline-block;\n    width: 100%;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n  }\n\n  .inputContainer {\n    margin-bottom: 0;\n  }\n\n  textarea,\n  input,\n  .singleValue,\n  .option {\n    font-family: ",";\n    font-size: ",";\n\n    @media (max-width: 1024px) {\n      font-size: ",";\n    }\n\n    @media "," {\n      font-size: 16px;\n    }\n  }\n"]);return contact_details_styles_templateObject1=function(){return o},o}function contact_details_styles_templateObject2(){let o=(0,P._)(["\n  align-self: flex-end;\n  height: 50px;\n  width: 140px;\n  border-radius: ",";\n\n  p {\n    color: ",";\n  }\n\n  @media (max-width: 500px) {\n    width: 100%;\n  }\n"]);return contact_details_styles_templateObject2=function(){return o},o}function contact_details_styles_templateObject3(){let o=(0,P._)(["\n  margin-top: ",";\n  display: inline-flex;\n  width: fit-content;\n  align-self: flex-start;\n  align-items: center;\n  gap: ",";\n  padding: "," 0;\n  background: transparent;\n  border: none;\n  cursor: pointer;\n  text-align: left;\n  font-family: inherit;\n  color: inherit;\n\n  .iconChip {\n    flex-shrink: 0;\n    width: 40px;\n    height: 40px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    border-radius: ",";\n    background-color: ",";\n    color: ",";\n    transition: ",";\n  }\n\n  .body {\n    display: flex;\n    flex-direction: column;\n    gap: ",";\n  }\n\n  .title,\n  .subtitle {\n    transition: ",";\n  }\n\n  .title {\n    font-weight: ",";\n    font-size: ",";\n  }\n\n  .subtitle {\n    margin: 0;\n    color: ",";\n    font-size: ",";\n  }\n\n  &:hover .title,\n  &:hover .subtitle,\n  &:focus-visible .title,\n  &:focus-visible .subtitle {\n    color: ",";\n  }\n\n  &:hover .iconChip,\n  &:focus-visible .iconChip {\n    background-color: ",";\n    color: ",";\n  }\n\n  &:focus-visible {\n    outline: 2px solid ",";\n    outline-offset: 2px;\n    border-radius: ",";\n  }\n"]);return contact_details_styles_templateObject3=function(){return o},o}function _templateObject4(){let o=(0,P._)(["\n  color: ",";\n  margin-bottom: ",";\n\n  .multiroom {\n    font-weight: ",";\n    margin-top: ",";\n  }\n"]);return _templateObject4=function(){return o},o}let eQ=D.ZP.div.withConfig({componentId:"sc-e9cf8dc9-0"})(contact_details_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.x_small},o=>{let{theme:u}=o;return u.spacing.middle},Z.Hb.x_desktop,Z.Hb.desktop,Z.Hb.tablet),eW=D.ZP.form.withConfig({componentId:"sc-e9cf8dc9-1"})(contact_details_styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.fonts.poppins},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.fontSizes.small},Z.Hb.mobile),e$=(0,D.ZP)(eq.z).withConfig({componentId:"sc-e9cf8dc9-2"})(contact_details_styles_templateObject2(),o=>{let{theme:u}=o;return u.radii.medium},o=>{let{theme:u}=o;return u.colors.white}),eK=D.ZP.button.withConfig({componentId:"sc-e9cf8dc9-3"})(contact_details_styles_templateObject3(),o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.radii.middle},o=>{let{theme:u}=o;return u.colors.tertiary},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.transitions.regular},o=>{let{theme:u}=o;return u.spacing.xx_small},o=>{let{theme:u}=o;return u.transitions.regular},o=>{let{theme:u}=o;return u.weights.semiBold},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.colors.grey},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.radii.middle}),eJ=D.ZP.span.withConfig({componentId:"sc-e9cf8dc9-4"}
1)(_templateObject4(),"#A0A0A0",o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.weights.semiBold},o=>{let{theme:u}=o;return u.spacing.middle});var eX=d(46069);function contact_form_styles_templateObject(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  gap: ",";\n\n  @media "," {\n    flex-direction: column;\n  }\n\n  @media "," {\n    flex-direction: row;\n  }\n\n  @media "," {\n    flex-direction: column;\n\n    h4,\n    p {\n      width: 100%;\n    }\n  }\n"]);return contact_form_styles_templateObject=function(){return o},o}function contact_form_styles_templateObject1(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  row-gap: ",";\n  margin-top: ",";\n"]);return contact_form_styles_templateObject1=function(){return o},o}function contact_form_styles_templateObject2(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  row-gap: ",";\n\n  .error {\n    margin-left: 30px;\n  }\n"]);return contact_form_styles_templateObject2=function(){return o},o}function contact_form_styles_templateObject3(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  margin-left: ",";\n  column-gap: ",";\n  font-size: ",";\n"]);return contact_form_styles_templateObject3=function(){return o},o}function styles_templateObject4(){let o=(0,P._)(["\n  background-color: ",";\n  min-width: 16px;\n  min-height: 16px;\n  width: 16px;\n  height: 16px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border-radius: ",";\n  border: 1px solid ",";\n\n  &[data-state='checked'] {\n    background-color: ",";\n    border-color: ",";\n  }\n\n  &:hover {\n    border-color: ",";\n  }\n"]);return styles_templateObject4=function(){return o},o}function _templateObject5(){let o=(0,P._)(["\n  svg {\n    color: ",";\n  }\n\n  &[data-state='checked'] {\n    margin-top: ",";\n  }\n"]);return _templateObject5=function(){return o},o}let eY=D.ZP.div.withConfig({componentId:"sc-c698d406-0"})(contact_form_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.medium},Z.Hb.x_desktop,Z.Hb.desktop,Z.Hb.tablet),e0=D.ZP.div.withConfig({componentId:"sc-c698d406-1"})(contact_form_styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.medium}),e1=D.ZP.div.withConfig({componentId:"sc-c698d406-2"})(contact_form_styles_templateObject2(),o=>{let{theme:u}=o;return u.spacing.x_small}),e2=D.ZP.div.withConfig({componentId:"sc-c698d406-3"})(contact_form_styles_templateObject3(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.fontSizes.small}),e3=(0,D.ZP)(eX.fC).withConfig({componentId:"sc-c698d406-4"})(styles_templateObject4(),o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.radii.small},o=>{let{theme:u}=o;return u.colors.grey2},o=>{let{theme:u}=o;return u.colors.black},o=>{let{theme:u}=o;return u.colors.black},o=>{let{theme:u}=o;return u.colors.black}),e4=(0,D.ZP)(eX.z$).withConfig({componentId:"sc-c698d406-5"})(_templateObject5(),o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.spacing.x_small});ek.ki.PT.id;let ContactForm=o=>{var u,d,m,p,y,x,v;let{onDisabledSubmit:_,onLoading:O}=o,{t:I}=(0,b.$G)(),{bookingInfo:k,setBookingInfo:P}=(0,S.J)(o=>({bookingInfo:o.bookingInfo,setBookingInfo:o.setBookingInfo}),j.X),{mutate:D,isSuccess:F,isError:N,isLoading:T}=useUpdateBookingInfoMutation(I),[M,z]=(0,h.useState)(!1),E=(0,ey.X)(),{handleSubmit:R,control:G,setValue:B,reset:A,register:Z,formState:{errors:U,dirtyFields:V,isDirty:L,isSubmitting:H,isSubmitSuccessful:q}}=(0,ev.cI)({resolver:(0,e_.F)(eH)}),{aptCheckInStart:Q,aptCheckInEnd:W,aptCheckOutHour:K}=k,J=(0,eP.RS)(null!==(p=null==Q?void 0:Q.substring(0,5))&&void 0!==p?p:"15:00",null!==(y=null==W?void 0:W.substring(0,5))&&void 0!==y?y:"21:00"),X=(0,eP.eY)(null!==(x=null==K?void 0:K.substring(0,5))&&void 0!==x?x:"11:00"),Y=J.map(o=>({value:o,label:o})),ee=X.map(o=>({value:o,label:o}));(0,h.useEffect)(()=>{z(!L||q),N&&z(!1)},[L,N,q]),(0,h.useEffect)(()=>{B("contactForm",{phoneCountryId:k.phoneCountryId||"",phoneCode:k.phoneCode||"",normalizedNationalPhoneNumber:k.normalizedNationalPhoneNumber||"",secondaryEmail:k.secondaryEmail||"",checkInHour:(0,eP.Om)(k.checkInHour||""),checkOutHour:(0,eP.Om)(k.checkOutHour||""),agreesPrivacyPolicy:k.agreesPrivacyPolicy||!1,allowsMarketingEmails:k.allowsMarketingEmails,requestInvoice:k.requestInvoice,issueInvoiceToEndConsumer:k.issueInvoiceToEndConsumer})},[k]),(0,h.useEffect)(()=>
1{_(M)},[M,_]),(0,h.useEffect)(()=>{O(H||T),F&&O(!1)},[H,T,O,F]),(0,h.useEffect)(()=>{F&&(eb.f.GuestContactDetailsSubmitted(E),A())},[F,I,A]);let et=[{label:I("guest:contact.plane"),value:"plane"},{label:I("guest:contact.car"),value:"car"},{label:I("guest:contact.train"),value:"train"}],onSubmit=async()=>{let{address:o,nationalityCountryId:u,zipCode:d,...m}=k,p={...o&&{address:o},...u&&{nationalityCountryId:u},...d&&{zipCode:d}};D({...m,...p,phoneNumber:"+".concat(k.phoneCode).concat(k.normalizedNationalPhoneNumber)})};return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(eW,{id:"contact-details-form",onSubmit:R(onSubmit),children:[(0,g.jsx)($.Q,{children:I("guest:contact.contactDetailSubtitle")}),(0,g.jsx)(w.x,{className:"description",children:I("guest:contact.contactDetailDescription")}),(0,g.jsxs)(eQ,{children:[(0,g.jsx)(Label,{htmlFor:"contact-form-email",children:I("guest:contact.email")}),(0,g.jsx)(ev.Qr,{control:G,name:"contactForm.secondaryEmail",rules:{required:!1},render:o=>{var u,d,m,p,h;let{field:{onChange:b,ref:y}}=o;return(0,g.jsx)(eO.I,{ref:y,type:"text",name:"contactForm.secondaryEmail",id:"contact-form-email",variant:"floating",className:"inputContainer",placeholder:I("guest:contact.email"),errorMessage:(null===(u=U.contactForm)||void 0===u?void 0:u.secondaryEmail)&&I("guest:contact.emailInvalid"),isValid:!(null===(d=U.contactForm)||void 0===d?void 0:d.secondaryEmail),showValidationIcon:(null===(m=V.contactForm)||void 0===m?void 0:m.secondaryEmail)||!!(null===(p=U.contactForm)||void 0===p?void 0:p.secondaryEmail),defaultValue:null!==(h=null==k?void 0:k.secondaryEmail)&&void 0!==h?h:"",rightIcon:(0,g.jsx)(C.P.MailOutline,{}),onChange:o=>{b(o.target.value),P({secondaryEmail:o.target.value})}})}}),(0,g.jsx)(Label,{children:I("guest:contact.phoneNumber")}),(0,g.jsx)(eC.B,{isRequired:!0,variant:"floating",className:"inputContainer",errorMessage:(null===(u=U.contactForm)||void 0===u?void 0:u.phoneCode)||!k.normalizedNationalPhoneNumber?I("common:messages.requiredField"):I(null!==(v=null===(m=U.contactForm)||void 0===m?void 0:null===(d=m.n
1ormalizedNationalPhoneNumber)||void 0===d?void 0:d.message)&&void 0!==v?v:""),phoneCountryId:k.phoneCountryId,phoneNumberValue:k.normalizedNationalPhoneNumber,countryCodeProps:Z("contactForm.phoneCode"),handleChange:o=>{let{normalizedNationalPhoneNumber:u,countryCode:d,phoneCountryId:m}=o;B("contactForm.normalizedNationalPhoneNumber",u,eC.I),B("contactForm.phoneCode",d,eC.I),B("contactForm.phoneCountryId",m),P({phoneCode:d,normalizedNationalPhoneNumber:u,phoneCountryId:m})},countryCodeClassnames:{singleValue:()=>"singleValue",option:()=>"option"},...Z("contactForm.normalizedNationalPhoneNumber")})]}),(0,g.jsxs)(eQ,{children:[(0,g.jsx)(Label,{children:I("guest:contact.transportationMethod")}),(0,g.jsxs)(eY,{children:[(0,g.jsx)(ev.Qr,{control:G,name:"contactForm.transportationMethod",render:o=>{let{field:{onChange:u,ref:d}}=o;return(0,g.jsx)(eI.P,{ref:d,variant:"floating",style:{height:"60px"},id:"transportationMethod",containerClassName:"inputContainer",items:et,placeholder:I("guest:contact.transportationMethod"),classNames:{singleValue:()=>"singleValue",option:()=>"option",placeholder:()=>"singleValue"},value:et.find(o=>{let{value:u}=o;return u===k.transportationMethod}),onChange:o=>{u(o.value),P({transportationMethod:o.value})}})}}),"plane"===k.transportationMethod&&(0,g.jsx)(ev.Qr,{control:G,name:"contactForm.flight",render:o=>{let{field:{onChange:u,ref:d}}=o;return(0,g.jsx)(eO.I,{ref:d,type:"text",name:"contactForm.flight",variant:"floating",className:"inputContainer",placeholder:I("guest:contact.flightNumber"),rightIcon:(0,g.jsx)(C.P.Plane,{}),defaultValue:k.flight,onChange:o=>{u(o.target.value),P({flight:o.target.value})}})}})]}),(0,g.jsx)(Label,{children:I("guest:contact.arrivalTime")}),(0,g.jsxs)(eY,{children:[(0,g.jsx)(ev.Qr,{control:G,name:"contactForm.checkInHour",render:o=>{let{field:{onChange:u,ref:d}}=o;return(0,g.jsx)(eI.P,{ref:d,variant:"floating",id:"checkInHour",placeholder:I("guest:contact.checkIn"),containerClassName:"inputContainer",items:Y,classNames:{singleValue:()=>"singleValue",option:()=>"option",placeholder:()=>"singleValue"},value:Y.find(o=>{let{value:u}=o;return u===(0,eP.Om)(k.checkInHour||"")}),onChange:o=>{u(o.value),P({checkInHour:o.value})}})}}),(0,g.jsx)(ev.Qr,{control:G,name:"contactForm.checkOutHour",render:o=>{let{field:{onChange:u,ref:d}}=o;return(0,g.jsx)(eI.P,{ref:d,variant:"floating",id:"checkOutHour",placeholder:I("guest:contact.checkOut"),containerClassName:"inputContainer",value:ee.find(o=>{let{value:u}=o;return u===(0,eP.Om)(k.checkOutHour||"")}),items:ee,classNames:{singleValue:()=>"singleValue",option:()=>"option",placeholder:()=>"singleValue"},onChange:o=>{u(o.value),P({checkOutHour:o.value})}})}})]})]}),(0,g.jsx)(ev.Qr,{control:G,name:"contactForm.bookerComment",render:o=>{let{field:{onChange:u,ref:d}}=o;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Label,{className:"textAreaTitle",children:I("guest:contact.additionalInformation")}),(0,g.jsx)(eS.K,{ref:d,name:"contactForm.bookerComment",variant:"floating",placeholder:I("guest:contact.additionalInformation"),maxLength:400,onChange:o=>{u(o.target.value),P({bookerComment:o.target.value})},defaultValue:k.bookerComment})]})}})]}),(0,g.jsxs)(e0,{children:[(0,g.jsx)(ev.Qr,{control:G,name:"contactForm.allowsMarketingEmails",render:o=>{let{field:{onChange:u,ref:d}}=o;return(0,g.jsxs)(e2,{children:[(0,g.jsx)(e3,{ref:d,name:"contactForm.allowsMarketingEmails",checked:k.allowsMarketingEmails,onCheckedChange:o=>{u(o),P({allowsMarketingEmails:o})},children:(0,g.jsx)(e4,{children:(0,g.jsx)(C.P.Check,{})})}),(0,g.jsx)(w.x,{children:I("guest:contact.requestNewsletter")})]})}}),(0,g.jsx)(ev.Qr,{control:G,name:"contactForm.agreesPrivacyPolicy",render:o=>{var u;let{field:{onChange:d,ref:m}}=o;return(0,g.jsxs)(e1,{children:[(0,g.jsxs)(e2,{children:[(0,g.jsx)(e3,{ref:m,name:"contactForm.agreesPrivacyPolicy",checked:k.agreesPrivacyPolicy,onCheckedChange:o=>{d(o),P({agreesPrivacyPolicy:o})},children:(0,g.jsx)(e4,{children:(0,g.jsx)(C.P.Check,{})})}),(0,g.jsx)(w.x,{children:(0,g.jsx)(b.cC,{i18nKey:"guest:contact.privacyPolicyAgree",components:{privacyPolicy:(0,g.jsx)(PrivacyPolicy,{})}})})]}),(null===(u=U.contactForm)||void 0===u?void 0:u.agreesPrivacyPolicy)&&U.contactForm.agreesPrivacyPolicy.message&&(0,g.jsx)(ew.B,{className:"error",message:I("guest:contact.privacyPolicyRequired")})]})}})]})]})},ContactDetails=o=>{let{isPageLoading:u}=o,{t:d}=(0,b.$G)(),m=(0,D.Fg)(),p=(0,ex.Z)("(max-width: 1032px)"),[y,x]=(0,h.useState)(!1),[v,_]=(0,h.useState)(!1),O
1=(0,ey.X)(),{reservationStatus:I,bookingInfo:P,setInvoiceFormOpenRequested:F}=(0,S.J)(o=>({reservationStatus:o.status.reservation,bookingInfo:o.bookingInfo,setInvoiceFormOpenRequested:o.setInvoiceFormOpenRequested}),j.X),N="complete"===I&&P.phoneCountryId?"complete":"incomplete";return(0,g.jsx)(k.W,{id:"contact-details",width:p?"calc(100% - 140px)":"calc(100% - 115px)",margin:"0 0 0 115px",children:u?(0,g.jsx)(q.O,{containerClassName:"skeletonContainer",className:"skeleton"}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(er.N,{sectionTitle:d("guest:contact.title"),sectionStatus:N}),(0,g.jsx)(ContactForm,{onDisabledSubmit:o=>{_(o)},onLoading:o=>{x(o)}}),(0,g.jsx)("br",{}),(0,g.jsx)(e$,{type:"submit","data-testid":"contact-form-submit",variant:"secondary",text:(0,g.jsx)(w.x,{children:d("guest:contact.submit")}),form:"contact-details-form",loaderColor:m.colors.white,isLoading:y,disabled:v}),(0,g.jsxs)(eK,{type:"button",onClick:()=>{var o;eb.f.GuestPageCtaClicked({...O,cta:"manage_invoice_details",placement:"contact_details_callout"}),F(!0),null===(o=document.getElementById("invoices"))||void 0===o||o.scrollIntoView({behavior:"smooth",block:"start"})},children:[(0,g.jsx)("span",{className:"iconChip","aria-hidden":"true",children:(0,g.jsx)(C.P.Receipt,{size:20})}),(0,g.jsxs)("span",{className:"body",children:[(0,g.jsx)("span",{className:"title",children:d("guest:contact.invoiceCalloutTitle")}),(0,g.jsx)(w.x,{className:"subtitle",children:d("guest:contact.invoiceCalloutLink")})]})]})]})})};var e5=d(36208),e6=d(5826),e8=d(60543),e7=d(22920),e9=d(39374),te=d(42651);function Drawer_styles_templateObject(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  position: fixed;\n  top: 0;\n  right: ",";\n  height: 100%;\n  width: 50%;\n  background-color: ",";\n  box-shadow: ",";\n  transition: right 0.3s ease;\n  z-index: 1000;\n\n  @media (max-width: 1100px) {\n    width: 75%;\n  }\n\n  @media "," {\n    width: 100%;\n  }\n"]);return Drawer_styles_templateObject=function(){return o},o}function Drawer_styles_templateObject1(){let o=(0,P._)(["\n  display: ",";\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.5);\n  z-index: 999;\n"]);return Drawer_styles_templateObject1=function(){return o},o}function Drawer_styles_templateObject2(){let o=(0,P._)(["\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: ",";\n  margin-top: ",";\n"]);return Drawer_styles_templateObject2=function(){return o},o}function Drawer_styles_templateObject3(){let o=(0,P._)(["\n  padding: ",";\n  flex-grow: 1;\n  overflow-y: auto;\n"]);return Drawer_styles_templateObject3=function(){return o},o}function Drawer_styles_templateObject4(){let o=(0,P._)(["\n  display: flex;\n  justify-content: space-between;\n  padding: ",";\n  margin-bottom: ",";\n  gap: 30px;\n\n  @media "," {\n    flex-direction: column;\n  }\n"]);return Drawer_styles_templateObject4=function(){return o},o}function styles_templateObject5(){let o=(0,P._)(["\n  background: none;\n  border: none;\n  font-size: 24px;\n  cursor: pointer;\n"]);return styles_templateObject5=function(){return o},o}function _templateObject6(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n"]);return _templateObject6=function(){return o},o}function _templateObject7(){let o=(0,P._)(["\n  display: flex;\n  column-gap: ",";\n\n  @media "," {\n    justify-content: end;\n  }\n\n  @media "," {\n    justify-content: space-between;\n  }\n"]);return _templateObject7=function(){return o},o}function _templateObject8(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n  min-width: 140px;\n  color: ",";\n  font-weight: ",";\n  border: none;\n  padding: ",";\n  cursor: pointer;\n  border-radius: ",";\n  background-color: ",";\n  height: 48px;\n  transition: all 0.3s ease-in-out;\n\n  p {\n    color: ",";\n  }\n\n  &:hover {\n    opacity: 0.5;\n  }\n\n  @media "," {\n    min-width: 120px;\n    height: 38px;\n  }\n"]);return _templateObject8=function(){return o},o}
1function _templateObject9(){let o=(0,P._)(["\n  background-color: transparent;\n  outline: 1px solid ",";\n  border-color: ",";\n  color: ",";\n  transition: all 0.3s ease-in-out;\n\n  p {\n    ",";\n  }\n\n  &:hover {\n    outline-width: 2px;\n    opacity: 1;\n  }\n"]);return _templateObject9=function(){return o},o}let tt=D.ZP.div.withConfig({componentId:"sc-dcb45b19-0"})(Drawer_styles_templateObject(),o=>{let{isOpen:u}=o;return u?"0":"-100%"},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.shadows.boxShadow},Z.Hb.tablet),tn=D.ZP.div.withConfig({componentId:"sc-dcb45b19-1"})(Drawer_styles_templateObject1(),o=>{let{isOpen:u}=o;return u?"block":"none"}),tr=D.ZP.div.withConfig({componentId:"sc-dcb45b19-2"})(Drawer_styles_templateObject2(),o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.spacing.middle}),ti=D.ZP.div.withConfig({componentId:"sc-dcb45b19-3"})(Drawer_styles_templateObject3(),o=>{let{theme:u}=o;return" 0 ".concat(u.spacing.large," ").concat(u.spacing.large)}),to=D.ZP.div.withConfig({componentId:"sc-dcb45b19-4"})(Drawer_styles_templateObject4(),o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.spacing.medium},Z.Hb.tablet),ta=D.ZP.button.withConfig({componentId:"sc-dcb45b19-5"})(styles_templateObject5()),tl=D.ZP.div.withConfig({componentId:"sc-dcb45b19-6"})(_templateObject6()),ts=D.ZP.div.withConfig({componentId:"sc-dcb45b19-7"})(_templateObject7(),o=>{let{theme:u}=o;return u.spacing.medium},Z.Hb.tablet,Z.Hb.mobile),tc=D.ZP.button.withConfig({componentId:"sc-dcb45b19-8"})(_templateObject8(),o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.weights.medium},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.radii.medium},o=>{let{theme:u}=o;return u.colors.secondary},o=>{let{theme:u}=o;return u.colors.white},Z.Hb.tablet),tu=(0,D.ZP)(tc).withConfig({componentId:"sc-dcb45b19-9"})(_templateObject9(),o=>{let{theme:u}=o;return u.colors.secondary},o=>{let{theme:u}=o;return u.colors.secondary},o=>{let{theme:u}=o;return u.colors.black},(0,K.Pe)("primary","black")),Drawer=o=>{let{isOpen:u,headerContent:d,additionalFooterContent:m,content:p,showLoadingScreen:h=!1,showHeader:b=!0,showFooter:y=!0,isConfirmButtonDisabled:x=!1,leftBtnText:v,rightBtnText:_,onClose:j,onConfirm:O,onCancel:I}=o;return(0,g.jsxs)(te.h,{children:[(0,g.jsx)(tn,{isOpen:u,onClick:j}),(0,g.jsxs)(tt,{isOpen:u,children:[b&&(0,g.jsxs)(tr,{children:[d||(0,g.jsx)(g.Fragment,{children:"\xa0"}),(0,g.jsx)(ta,{onClick:j,children:(0,g.jsx)(C.P.Close,{})})]}),(0,g.jsx)(ti,{children:p}),!h&&y&&(0,g.jsxs)(to,{children:[(0,g.jsx)(tl,{children:m}),(0,g.jsxs)(ts,{children:[(0,g.jsx)(tu,{onClick:I,children:(0,g.jsx)(w.x,{children:v})}),(0,g.jsx)(tc,{"data-testid":"drawer-confirm-btn",disabled:x,onClick:O,children:(0,g.jsx)(w.x,{children:_})})]})]})]})]})},useAddGuestMutation=()=>{let o=(0,eD.NL)();return(0,eF.D)({mutationFn:o=>(0,eM.hw)(o),onError:()=>(0,eT.U)(),onSettled:()=>{o.invalidateQueries({queryKey:["booking-info"]}),o.invalidateQueries({queryKey:["guests"]})}})},useUpdateGuestMutation=()=>{let o=(0,eD.NL)();return(0,eF.D)({mutationFn:o=>(0,eM.sF)(o),onError:o=>(0,eT.U)(o.response.data.data),onSettled:()=>{o.invalidateQueries({queryKey:["booking-info"]}),o.invalidateQueries({queryKey:["guests"]})}})};var td=d(73960),tm=d(85682),tp=d(79362);function LoadingScreen_styles_templateObject(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  flex: 1;\n  height: 100%;\n  width: 100%;\n"]);return LoadingScreen_styles_templateObject=function(){return o},o}let tg=D.ZP.div.withConfig({componentId:"sc-d1370309-0"})(LoadingScreen_styles_templateObject()),LoadingScreen=()=>{let{t:o}=(0,b.$G)("guest");return(0,g.jsxs)(tg,{children:[(0,g.jsx)(z(),{alt:o("common:loading"),src:"".concat(tp.Mx,"/gif/loading.gif"),width:150,height:75}),(0,g.jsx)($.Q,{children:o("guestForm.editMode.savingDetails")}),(0,g.jsx)(w.x,{children:o("guestForm.editMode.savingDescription")})]})};function e(o,u){var d=Object.keys(o);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(o);u&&(m=m.filter(function(u){return Object.getOwnPropertyDescriptor(o,u).enumerable})),d.push.apply(d,m)}return d}function t(o){for(var u=1;u<arguments.length;u++){var d=null!=arguments[u]?arguments[u]:{};
1u%2?e(Object(d),!0).forEach(function(u){n(o,u,d[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(d)):e(Object(d)).forEach(function(u){Object.defineProperty(o,u,Object.getOwnPropertyDescriptor(d,u))})}return o}function n(o,u,d){var m;return(u="symbol"==typeof(m=function(o,u){if("object"!=typeof o||!o)return o;var d=o[Symbol.toPrimitive];if(void 0!==d){var m=d.call(o,u||"default");if("object"!=typeof m)return m;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===u?String:Number)(o)}(u,"string"))?m:m+"")in o?Object.defineProperty(o,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):o[u]=d,o}function a(){return(a=Object.assign?Object.assign.bind():function(o){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(o[m]=d[m])}return o}).apply(this,arguments)}function c(o,u){(null==u||u>o.length)&&(u=o.length);for(var d=0,m=Array(u);d<u;d++)m[d]=o[d];return m}function i(o,u){var d="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!d){if(Array.isArray(o)||(d=function(o,u){if(o){if("string"==typeof o)return c(o,u);var d=Object.prototype.toString.call(o).slice(8,-1);return"Object"===d&&o.constructor&&(d=o.constructor.name),"Map"===d||"Set"===d?Array.from(o):"Arguments"===d||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?c(o,u):void 0}}(o))||u){d&&(o=d);var m=0,a=function(){};return{s:a,n:function(){return m>=o.length?{done:!0}:{done:!1,value:o[m++]}},e:function(o){throw o},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p,g=!0,h=!1;return{s:function(){d=d.call(o)},n:function(){var o=d.next();return g=o.done,o},e:function(o){h=!0,p=o},f:function(){try{g||null==d.return||d.return()}finally{if(h)throw p}}}}function l(o,u){var d,m=u.replacementChars,p=u.replacement,g=u.separate,h=m,b="",y=i(o);try{for(y.s();!(d=y.n()).done;){var x,v=d.value,_=!Object.prototype.hasOwnProperty.call(p,v)&&(null===(x=p[h[0]])||void 0===x?void 0:x.test(v));(g&&v===h[0]||_)&&(h=h.slice(1),b+=v)}}catch(o){y.e(o)}finally{y.f()}return b}function s(o){return o.length>0?n({},o,/./):{}}function helpers_CA92ST8_f(o,u){for(var d=u.start,m=void 0===d?0:d,p=u.end,g=u.mask,h=u.replacement,b=u.separate,y=o.slice(m,p),x=g.slice(m,p),v="",_=0;_<x.length;_++){var j=Object.prototype.hasOwnProperty.call(h,x[_]);j&&void 0!==y[_]&&y[_]!==x[_]?v+=y[_]:j&&b&&(v+=x[_])}return v}function helpers_CA92ST8_b(o){for(var u=o.mask,d=o.replacement,m=arguments.length>1&&void 0!==arguments[1]&&arguments[1],p="string"==typeof d?s(d):d,g=["[","]","\\","/","^","$",".","|","?","*","+","(",")","{","}"],h="",b=0;b<u.length;b++){var y=Object.prototype.hasOwnProperty.call(p,u[b]),x=m?"(?!".concat(u[b],")"):"";0===b&&(h+="^"),h+=y?"".concat(x,"(").concat(p[u[b]].toString().slice(1,-1),")"):g.includes(u[b])?"\\".concat(u[b]):u[b],b===u.length-1&&(h+="$")}return h}function helpers_D3WySQMf_e(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(o){}return(helpers_D3WySQMf_e=function(){return!!o})()}function helpers_D3WySQMf_n(o){return(helpers_D3WySQMf_n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}function helpers_D3WySQMf_c(o){return(helpers_D3WySQMf_c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function helpers_D3WySQMf_i(o,u){return(helpers_D3WySQMf_i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o})(o,u)}function f(o){var u="function"==typeof Map?new Map:void 0;return(f=function(o){if(null===o||!function(o){try{return -1!==Function.toString.call(o).indexOf("[native code]")}catch(u){return"function"==typeof o}}(o))return o;if("function"!=typeof o)throw TypeError("Super expression must either be null or a function");if(void 0!==u){if(u.has(o))return u.get(o);u.set(o,r)}function r(){return function(o,u,d){if(helpers_D3WySQMf_e())return Reflect.construct.apply(null,arguments);var m=[null];m.push.apply(m,u);var p=new(o.bind.apply(o,m));return d&&helpers_D3WySQMf_i(p,d.prototype),p}(o,arguments,helpers_D3WySQMf_c(this).constructor)}return r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),helpers_D3WySQMf_i(r,o)})(o)}var tf=d(73935),th=function(o){function n(o,u){var d,m,p;return function(o,u){if(!(o instanceof u))throw TypeError("Cannot call a class as a function")}(this,n),(m=n,p=[o],m=helpers_D3WySQMf_c(m),d=function(o,u){if(u&&("object"==typeof u||"function"==typeof u))return u;if(void 0!==u)throw TypeError("Derived constructors may only return object or undefined");
1return function(o){if(void 0===o)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(o)}(this,helpers_D3WySQMf_e()?Reflect.construct(m,p||[],helpers_D3WySQMf_c(this).constructor):m.apply(this,p))).name="SyntheticChangeError",d.cause=u,d}return function(o,u){if("function"!=typeof u&&null!==u)throw TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&helpers_D3WySQMf_i(o,u)}(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n}(f(Error));function setInputAttributes_e(o,u){var d=u.value,m=u.selectionStart,p=u.selectionEnd;void 0!==d&&(o.value=d),void 0!==m&&void 0!==p&&o.setSelectionRange(m,p)}var tb=["text","email","tel","search","url"],ty=["component","mask","replacement","showMask","separate","track","modify","onMask"],tx=(0,h.forwardRef)(function(o,u){var d,m=o.component,p=o.mask,g=o.replacement,b=o.showMask,y=o.separate,x=o.track,v=o.modify,_=o.onMask,j=function(o,u){if(null==o)return{};var d,m,p=function(o,u){if(null==o)return{};var d,m,p={},g=Object.keys(o);for(m=0;m<g.length;m++)d=g[m],u.indexOf(d)>=0||(p[d]=o[d]);return p}(o,u);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(o);for(m=0;m<g.length;m++)d=g[m],u.indexOf(d)>=0||Object.prototype.propertyIsEnumerable.call(o,d)&&(p[d]=o[d])}return p}(o,ty),w=(d=function(){var o,u,d,m,p,g,b,y,x,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_=v.mask,j=void 0===_?"":_,w=v.replacement,O=void 0===w?{}:w,C=v.showMask,I=void 0!==C&&C,S=v.separate,k=void 0!==S&&S,P=v.track,D=v.modify,F=v.onMask,N="string"==typeof O?s(O):O,T=(0,h.useRef)(null);return u=(o={init:function(o){var u=o.controlled,d=o.initialValue;d=u||d?d:I?j:"";var m={mask:j,replacement:N,showMask:I,separate:k};return T.current={value:d,props:m,fallbackProps:m},{value:d}},tracking:function(o){var u,d,m,p,g,h,b=o.inputType,y=o.previousValue,x=o.addedValue,v=o.changeStart,_=o.changeEnd;if(null===T.current)throw new th("The state has not been initialized.");T.current.value!==y?T.current.props=T.current.fallbackProps:T.current.fallbackProps=T.current.props;var w=helpers_CA92ST8_f(y,{end:v,mask:T.current.props.mask,replacement:T.current.props.replacement,separate:T.current.props.separate}),O=RegExp("[^".concat(Object.keys(T.current.props.replacement).join(""),"]"),"g"),C=T.current.props.mask.replace(O,"");w&&(w=l(w,{replacementChars:C,replacement:T.current.props.replacement,separate:T.current.props.separate}));var S=null==P?void 0:P(t(t({},"insert"===b?{inputType:b,data:x}:{inputType:b,data:null}),{},{value:y,selectionStart:v,selectionEnd:_}));if(!1===S)throw new th("Custom trekking stop.");if(null===S?x="":!0!==S&&void 0!==S&&(x=S),x&&(x=l(x,{replacementChars:C.slice(w.length),replacement:T.current.props.replacement,separate:!1})),"insert"===b&&""===x)throw new th("The character does not match the key value of the `replacement` object.");var F=helpers_CA92ST8_f(y,{start:_,mask:T.current.props.mask,replacement:T.current.props.replacement,separate:T.current.props.separate});if(T.current.props.separate){var M=T.current.props.mask.slice(v,_).replace(O,""),z=M.length-x.length;z<0?F=F.slice(-z):z>0&&(F=M.slice(-z)+F)}F&&(F=l(F,{replacementChars:C.slice(w.length+x.length),replacement:T.current.props.replacement,separate:T.current.props.separate}));var E=w+x+F,R=null!==(h=null==D?void 0:D(E))&&void 0!==h?h:{},G=R.mask,B=void 0===G?j:G,A=R.replacement,Z=void 0===A?N:A,U=R.showMask,V=void 0===U?I:U,L=R.separate,H=void 0===L?k:L;"string"==typeof Z&&(Z=s(Z));var q=(g=function(o,u){for(var d=u.mask,m=u.replacement,p=[],g=0;g<d.length;g++){var h,b=null!==(h=o[g])&&void 0!==h?h:d[g],y=Object.prototype.hasOwnProperty.call(m,b)?"replacement":void 0!==o[g]&&o[g]!==d[g]?"input":"mask";p.push({type:y,value:b,index:g})}return p}(p=function(o,u){var d,m=u.mask,p=u.replacement,g=u.showMask,h=0,b="",y=i(m);try{for(y.s();!(d=y.n()).done;){var x=d.value;if(!g&&void 0===o[h])break;Object.prototype.hasOwnProperty.call(p,x)&&void 0!==o[h]?b+=o[h++]:b+=x}}
1catch(o){y.e(o)}finally{y.f()}return b}(E,{mask:d=(u={mask:B,replacement:Z,showMask:V}).mask,replacement:m=u.replacement,showMask:u.showMask}),{mask:d,replacement:m}),{value:p,input:E,parts:g,pattern:helpers_CA92ST8_b({mask:d,replacement:m}),isValid:RegExp(helpers_CA92ST8_b({mask:d,replacement:m},!0)).test(p)}),Q=function(o){var u,d,m,p=o.inputType,g=o.value,h=o.addedValue,b=o.beforeChangeValue,y=o.parts,x=o.replacement,v=o.separate,_=y.filter(function(o){var u=o.type;return"input"===u||v&&"replacement"===u}),j=null===(u=_[b.length+h.length-1])||void 0===u?void 0:u.index,w=null===(d=_[b.length-1])||void 0===d?void 0:d.index,O=null===(m=_[b.length+h.length])||void 0===m?void 0:m.index;if("insert"===p){if(void 0!==j)return j+1;if(void 0!==O)return O;if(void 0!==w)return w+1}if("deleteForward"===p){if(void 0!==O)return O;if(void 0!==w)return w+1}if("deleteBackward"===p){if(void 0!==w)return w+1;if(void 0!==O)return O}var C=g.split("").findIndex(function(o){return Object.prototype.hasOwnProperty.call(x,o)});return -1!==C?C:g.length}({inputType:b,value:q.value,addedValue:x,beforeChangeValue:w,parts:q.parts,replacement:Z,separate:H});return T.current.value=q.value,T.current.props={mask:B,replacement:Z,showMask:V,separate:H},{value:q.value,selectionStart:Q,selectionEnd:Q,__detail:q}},eventType:"input-mask",eventHandler:F}).init,d=o.tracking,m=o.eventType,p=o.eventHandler,g=(0,h.useRef)({timeoutId:-1,fallbackTimeoutId:-1,cachedTimeoutId:-1,start:0,end:0}),b=(0,h.useRef)(!0),y=(0,h.useRef)(null),(x=(0,h.useRef)({init:u,tracking:d,eventType:m,eventHandler:p})).current.init=u,x.current.tracking=d,x.current.eventType=m,x.current.eventHandler=p,(0,h.useMemo)(function(){var o,u,d,m,p;return o=x.current.init,d=(u={onFocus:function(){g.current.timeoutId=window.setTimeout(function e(){var o,u,d,m;b.current?(g.current.start=null!==(o=null===(u=y.current)||void 0===u?void 0:u.selectionStart)&&void 0!==o?o:0,g.current.end=null!==(d=null===(m=y.current)||void 0===m?void 0:m.selectionEnd)&&void 0!==d?d:0,g.current.timeoutId=window.setTimeout(e)):g.current.fallbackTimeoutId=window.setTimeout(e)})},onBlur:function(){window.clearTimeout(g.current.timeoutId),window.clearTimeout(g.current.fallbackTimeoutId),g.current.timeoutId=-1,g.current.fallbackTimeoutId=-1,g.current.cachedTimeoutId=-1},onInput:function(o){var u=y.current;if(null!==u)try{if(g.current.cachedTimeoutId===g.current.timeoutId)throw new th("The input selection has not been updated.");g.current.cachedTimeoutId=g.current.timeoutId;var d=u.value,m=u.selectionStart,p=u.selectionEnd;if(null===m||null===p)throw new th("The selection attributes have not been initialized.");var h,v,_,j,w,O,C=null!==(h=null===(v=u._valueTracker)||void 0===v||null===(_=v.getValue)||void 0===_?void 0:_.call(v))&&void 0!==h?h:"";if(void 0===o.inputType&&(g.current.start=0,g.current.end=C.length),m>g.current.start?O="insert":m<=g.current.start&&m<g.current.end?O="deleteBackward":m===g.current.end&&d.length<C.length&&(O="deleteForward"),void 0===O||("deleteBackward"===O||"deleteForward"===O)&&d.length>C.length)throw new th("Input type detection error.");var I="",S="",k=g.current.start,P=g.current.end;if("insert"===O)I=d.slice(g.current.start,m);else{var D=C.length-d.length;k=m,P=m+D,S=C.slice(k,P)}var F=x.current.tracking({inputType:O,previousValue:C,value:d,addedValue:I,deletedValue:S,changeStart:k,changeEnd:P,selectionStart:m,selectionEnd:p});setInputAttributes_e(u,{value:F.value,selectionStart:F.selectionStart,selectionEnd:F.selectionEnd});var N=x.current.eventType,T=x.current.eventHandler;if("string"==typeof N&&T){var M=u.value,z=u.selectionStart,E=u.selectionEnd;b.current=!1,requestAnimationFrame(function(){setInputAttributes_e(u,{value:M,selectionStart:null!=z?z:M.length,selectionEnd:null!=E?E:M.length});var o=new CustomEvent(N,{bubbles:!0,cancelable:!1,composed:!0,detail:F.__detail});u.dispatchEvent(o),tf.unstable_batchedUpdates?(0,tf.unstable_batchedUpdates)(T,o):T(o),b.current=!0})}null===(j=u._valueTracker)||void 0===j||null===(w=j.setValue)||void 0===w||w.call(j,C),g.current.start=F.selectionStart,g.current.end=F.selectionEnd}catch(d){var R,G,B,A,Z,U,V,L,H,q,Q,W=d.name,$=d.cause;if(setInputAttributes_e(u,{value:null!==(R=null!==(G=null==$||null===(B=$.__attributes)||void 0===B?void 0:B.value)&&void 0!==G?G:null===(A=u._valueTracker)||void 0===A||null===(Z=A.getValue)||void 0===Z?void 0:Z.call(A))&&void 0!==R?R:"",selectionStart:null!==(U=null==$||null===(V=$.__attributes)||void 0===V?void 0:V.selectionStart)&&void 0!==U?U:g.current.start,selectionEnd:null!==(L=null==$||null===(H=$.__attributes)||void 0===H?void 0:H.selectionEnd)&&void 0!==L?L:g.current.end}),void 0!==(null==$||null===(q=$.__attributes)||void 0===q?void 0:q.selectionStart)&&(g.current.start=$.__attributes.selectionStart),void 0!==(null==$||null===(Q=$.__attributes)||void 0===Q?void 0:Q.selectionEnd)&&(g.current.end=$.__attributes.selectionEnd),o.preventDefault(),o.stopPropagation(),"SyntheticChangeError"!==W)throw d}}}).onFocus,m=u.onBlur,p=u.onInput,new Proxy(y,{set:function(u,g,h){if("current"!==g)return!1;var b=null!==h&&tb.includes(h.type);if(h!==y.current&&(null!==y.current&&(y.current.removeEventListener("focus",d),y.current.removeEventListener("blur",m),y.current.removeEventListener("input",p)),null!==h&&b)){var x,v=null!==(x=h._wrapperState)&&void 0!==x?x:{},_=v.controlled,j=v.initialValue,w=o({controlled:void 0!==_&&_,initialValue:h.value||(void 0===j?"":j)});setInputAttributes_e(h,{value:w.value}),document.activeElement===h&&d(),h.addEventListener("focus",d),h.addEventListener("blur",m),h.addEventListener("input",p)}return u[g]=h,!0}})},[])}({mask:p,replacement:g,showMask:b,separate:y,track:x,modify:v,onMask:_}),(0,h.useCallback)(function(o){d.current=o,"function"==typeof u?u(o):"object"===helpers_D3WySQMf_n(u)&&null!==u&&(u.current=o)},[d,u]));return m?h.createElement(m,a({ref:w},j)):h.createElement("input",a({ref:w},j))}),tv=d(89583),t_=d(66653),tj=d(69274);
1function GuestTable_styles_templateObject(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n\n  fieldset {\n    border: none;\n    width: 100%;\n  }\n"]);return GuestTable_styles_templateObject=function(){return o},o}function GuestTable_styles_templateObject1(){let o=(0,P._)(["\n  width: 100%;\n  border-collapse: collapse;\n"]);return GuestTable_styles_templateObject1=function(){return o},o}function GuestTable_styles_templateObject2(){let o=(0,P._)(["\n  background-color: ",";\n  height: 50px;\n  border-top: 1px solid ",";\n  border-bottom: 1px solid ",";\n\n  th {\n    text-align: left;\n    padding: ",";\n    color: ",";\n  }\n"]);return GuestTable_styles_templateObject2=function(){return o},o}function GuestTable_styles_templateObject3(){let o=(0,P._)(["\n  border-bottom: 1px solid ",";\n\n  background-color: ",";\n  transition: background-color 0.3s ease-in-out;\n\n  td {\n    padding: ",";\n    color: ",";\n    vertical-align: top;\n\n    .statusIncomplete {\n      display: flex;\n    }\n\n    @media (max-width: 1220px) {\n      vertical-align: middle;\n      width: 100%;\n\n      &.actions {\n        width: 110px;\n        padding: "," 0;\n        display: flex;\n        justify-content: end;\n        align-items: center;\n      }\n    }\n  }\n"]);return GuestTable_styles_templateObject3=function(){return o},o}function GuestTable_styles_templateObject4(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  row-gap: ",";\n\n  div {\n    font-size: ",";\n  }\n\n  .item {\n    width: 100%;\n    display: flex;\n    flex-direction: column;\n\n    &.guestName {\n      min-width: 200px;\n    }\n\n    .birthdate {\n      color: #aaaaaa;\n    }\n\n    h3 {\n      margin-bottom: ",";\n      position: relative;\n      color: ",";\n\n      // main guest star\n      div {\n        left: -24px;\n        top: 2px;\n\n        @media (max-width: 1220px) {\n          left: -34px;\n        }\n      }\n    }\n  }\n\n  .double-item {\n    position: relative;\n    width: 100%;\n    display: flex;\n    flex-direction: row;\n    align-items: center;\n    justify-content: space-between;\n  }\n\n  // aligning the status icon and the edit icon\n  @media (max-width: 1220px) {\n    align-items: flex-start;\n\n    > div {\n      display: flex;\n      flex-direction: row;\n\n      > div {\n        margin-top: 0;\n      }\n\n      svg {\n        margin-top: -",";\n        margin-left: ",";\n      }\n    }\n\n    // align the edit button with the Status text\n    & > div:last-child {\n      margin-left: -10px;\n    }\n  }\n\n  .inputContainer {\n    position: relative;\n\n    .error {\n      position: absolute;\n      bottom: -",";\n    }\n  }\n\n  .select {\n    position: relative;\n\n    .error {\n      position: absolute;\n      bottom: -28px;\n    }\n  }\n"]);return GuestTable_styles_templateObject4=function(){return o},o}function GuestTable_styles_templateObject5(){let o=(0,P._)(["\n  display: flex;\n  justify-content: center;\n  column-gap: ",";\n\n  button {\n    width: ",";\n    height: ",";\n    border-radius: 50%;\n\n    &:hover {\n      ",";\n    }\n\n    &:disabled {\n      cursor: not-allowed;\n\n      svg {\n        cursor: not-allowed;\n        color: ",";\n      }\n    }\n  }\n"]);return GuestTable_styles_templateObject5=function(){return o},o}function styles_templateObject6(){let o=(0,P._)(["\n  color: ",";\n  width: 18px;\n  height: 18px;\n"]);return styles_templateObject6=function(){return o},o}function styles_templateObject7(){let o=(0,P._)(["\n  color: ",";\n  width: 18px;\n  height: 18px;\n"]);return styles_templateObject7=function(){return o},o}function styles_templateObject8(){let o=(0,P._)(["\n  color: ",";\n  width: 18px;\n  height: 18px;\n  cursor: pointer;\n"]);return styles_templateObject8=function(){return o},o}function styles_templateObject9(){let o=(0,P._)(["\n  ",";\n"]);return styles_templateObject9=function(){return o},o}function _templateObject10(){let o=(0,P._)(["\n            border-color: ",";\n          "]);return _templateObject10=function(){return o},o}
1function _templateObject11(){let o=(0,P._)(["\n  input {\n    border-radius: ",";\n    border: 1px solid ",";\n    background-color: ",";\n    font-size: ",";\n    font-family: ",";\n\n    ",";\n\n    /* Hide the arrows default style from input type number */\n    /* Chrome, Safari, Edge, Opera */\n    &::-webkit-outer-spin-button,\n    &::-webkit-inner-spin-button {\n      -webkit-appearance: none;\n      margin: 0;\n    }\n\n    /* Firefox */\n    &[type='number'] {\n      -moz-appearance: textfield;\n      appearance: textfield;\n    }\n\n    @media (max-width: 1024px) {\n      font-size: ",";\n    }\n\n    @media "," {\n      font-size: 16px;\n    }\n  }\n"]);return _templateObject11=function(){return o},o}function _templateObject12(){let o=(0,P._)(["\n  margin-bottom: ",";\n  border: 1px solid ",";\n  border-radius: ",";\n  padding: 0 ",";\n"]);return _templateObject12=function(){return o},o}function _templateObject13(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  gap: ",";\n  margin: 0 ",";\n  padding: ",";\n  background-color: ",";\n"]);return _templateObject13=function(){return o},o}function _templateObject14(){let o=(0,P._)(["\n  font-weight: ",";\n  font-size: ",";\n  text-transform: uppercase;\n"]);return _templateObject14=function(){return o},o}let tw="#f1f1f1",tO=D.ZP.div.withConfig({componentId:"sc-be12ab29-0"})(GuestTable_styles_templateObject()),tC=D.ZP.table.withConfig({componentId:"sc-be12ab29-1"})(GuestTable_styles_templateObject1()),tI=D.ZP.tr.withConfig({componentId:"sc-be12ab29-2"})(GuestTable_styles_templateObject2(),o=>{let{theme:u}=o;return u.colors.background2},tw,tw,o=>{let{theme:u}=o;return"".concat(u.spacing.middle," ").concat(u.spacing.large)},o=>{let{theme:u}=o;return u.colors.text}),tS=D.ZP.tr.withConfig({componentId:"sc-be12ab29-3"})(GuestTable_styles_templateObject3(),tw,o=>{let{isUpdateSuccess:u,theme:d}=o;return u?"#3373710d":d.colors.white},o=>{let{theme:u}=o;return"".concat(u.spacing.middle," ").concat(u.spacing.large)},o=>{let{theme:u}=o;return u.colors.text},o=>{let{theme:u}=o;return u.spacing.middle}),tk=D.ZP.div.withConfig({componentId:"sc-be12ab29-4"})(GuestTable_styles_templateObject4(),o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.colors.black},o=>{let{theme:u}=o;return u.spacing.xx_small},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.spacing.medium}),tP=D.ZP.div.withConfig({componentId:"sc-be12ab29-5"})(GuestTable_styles_templateObject5(),o=>{let{theme:u}=o;return u.spacing.x_small},o=>{let{theme:u}=o;return u.spacing.x_large},o=>{let{theme:u}=o;return u.spacing.x_large},(0,K.c2)("#F4F1EC","#2d747114"),o=>{let{theme:u}=o;return u.colors.grey3}),tD=(0,D.ZP)(t_.KJd).withConfig({componentId:"sc-be12ab29-6"})(styles_templateObject6(),o=>{let{theme:u}=o;return u.colors.primary}),tF=(0,D.ZP)(tj.Sbn).withConfig({componentId:"sc-be12ab29-7"})(styles_templateObject7(),o=>{let{theme:u}=o;return u.colors.warning}),iconStyle=o=>(0,D.iv)(styles_templateObject8(),o),tN=(0,D.ZP)(tv.ffH).withConfig({componentId:"sc-be12ab29-8"})(styles_templateObject9(),o=>{let{theme:u}=o;return iconStyle(u.colors.primary)}),tT=(0,D.ZP)(eO.I).withConfig({componentId:"sc-be12ab29-9"})(_templateObject11(),o=>{let{theme:u}=o;return u.radii.middle},o=>{let{theme:u}=o;return u.colors.grey3},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.fonts.poppins},o=>{let{hasError:u,theme:d}=o;return u?(0,D.iv)(_templateObject10(),d.colors.danger):null},o=>{let{theme:u}=o;return u.fontSizes.small},Z.Hb.mobile),tM=D.ZP.div.withConfig({componentId:"sc-be12ab29-10"})(_templateObject12(),o=>{let{theme:u}=o;return u.spacing.large},tw,o=>{let{theme:u}=o;return u.radii.middle},o=>{let{theme:u}=o;return"".concat(u.spacing.medium," ").concat(u.spacing.medium)}),tz=D.ZP.div.withConfig({componentId:"sc-be12ab29-11"})(_templateObject13(),o=>{let{theme:u}=o;return u.spacing.xx_small},o=>{let{theme:u}=o;return"-".concat(u.spacing.medium," ").concat(u.spacing.medium)},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.colors.tertiary}),tE=D.ZP.span.withConfig({componentId:"sc-be12ab29-12"}
1)(_templateObject14(),o=>{let{theme:u}=o;return u.weights.semiBold},o=>{let{theme:u}=o;return u.fontSizes.middle});function Form_styles_templateObject(){let o=(0,P._)(["\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  grid-template-rows: repeat(4, 1fr);\n  grid-column-gap: ",";\n  grid-row-gap: 10px;\n\n  label {\n    margin-bottom: ",";\n  }\n\n  .select {\n    position: relative;\n  }\n\n  .error {\n    position: absolute;\n    bottom: -16px;\n    left: -12px;\n    margin: 0;\n    left: 0;\n    top: 50px;\n    font-size: 11px;\n\n    @media "," {\n      font-size: 10px;\n    }\n  }\n\n  .error-select {\n    position: absolute;\n    bottom: -26px;\n    left: -12px;\n    font-size: 11px;\n  }\n\n  @media "," {\n    display: grid;\n    grid-template-columns: repeat(4, 1fr);\n    grid-template-rows: repeat(7, 1fr);\n    grid-row-gap: ",";\n\n    .name {\n      grid-area: 1 / 1 / 2 / 5;\n    }\n    .surname {\n      grid-area: 2 / 1 / 3 / 3;\n    }\n    .birth {\n      grid-area: 2 / 3 / 3 / 5;\n    }\n    .idType {\n      grid-area: 3 / 1 / 4 / 3;\n    }\n    .idNumber {\n      grid-area: 3 / 3 / 4 / 5;\n    }\n    .idIssuer {\n      grid-area: 4 / 1 / 5 / 3;\n    }\n    .nationality {\n      grid-area: 4 / 3 / 5 / 5;\n    }\n    .residency {\n      grid-area: 5 / 1 / 6 / 5;\n    }\n    .email {\n      grid-area: 6 / 1 / 7 / 5;\n    }\n\n    .entryDate {\n      grid-area: 7 / 1 / 7 / 3;\n\n      &.mainGuest {\n        grid-area: 6 / 1 / 6 / 3;\n      }\n    }\n    .exitDate {\n      grid-area: 7 / 3 / 7 / 5;\n\n      &.mainGuest {\n        grid-area: 6 / 3 / 6 / 5;\n      }\n    }\n  }\n\n  .option {\n    display: inline-block;\n    width: 100%;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n  }\n\n  .singleValue,\n  .option {\n    font-family: ",";\n    font-size: ",";\n\n    @media (max-width: 1024px) {\n      font-size: ",";\n    }\n\n    @media "," {\n      font-size: 16px;\n    }\n  }\n\n  .error {\n    line-height: 10px;\n  }\n"]);return Form_styles_templateObject=function(){return o},o}let tR=D.ZP.form.withConfig({componentId:"sc-94187cde-0"})(Form_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.small},Z.Hb.tablet,Z.Hb.tablet,o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.fonts.poppins},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.fontSizes.small},Z.Hb.mobile),Form=o=>{var u;let{handleSubmit:d,onSubmit:m,unSubmittedValues:p,documentTypesList:h,defaultValues:y,getUnSubmittedValues:x,errors:v,control:_,isMainGuest:j,showInfoPeek:w=!0}=o,{t:O,i18n:C}=(0,b.$G)("guest"),S=null!==(u=C.language)&&void 0!==u?u:"en",k=(0,I.IQ)(S);return(0,g.jsxs)(tR,{onSubmit:d(m),children:[(0,g.jsxs)("div",{className:"name",children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.name")}),(0,g.jsx)(ev.Qr,{control:_,name:"name",render:o=>{var u,d;let{field:m}=o;return(0,g.jsx)(tT,{...m,type:"text",hasError:!!(null===(u=v.name)||void 0===u?void 0:u.message),errorMessage:(null===(d=v.name)||void 0===d?void 0:d.message)&&O("guestForm.table.messages.requiredField"),isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"surname",children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.surname")}),(0,g.jsx)(ev.Qr,{control:_,name:"surname",render:o=>{var u,d;let{field:m}=o;return(0,g.jsx)(tT,{...m,type:"text",hasError:!!(null===(u=v.surname)||void 0===u?void 0:u.message),errorMessage:(null===(d=v.surname)||void 0===d?void 0:d.message)&&O("guestForm.table.messages.requiredField"),isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"nationality",children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.nationality")}),(0,g.jsx)(ev.Qr,{control:_,name:"nationalityCountryIdRef",render:o=>{var u;let{field:{onChange:d,ref:m}}=o;return(0,g.jsx)(eI.P,{ref:m,id:"nationalityCountryIdRef",name:"nationalityCountryIdRef",variant:"floating",items:(0,ek.f8)(S),value:(0,ek.f8)(S).find(o=>o.value===(null==p?void 0:p.nationalityCountryIdRef)),defaultValue:y.nationalityCountryIdRef,containerClassName:"select",classNames:{singleValue:()=>"singleValue",option:()=>"option",placeholder:()=>"singleValue"},errorClassName:"error-select",onChange:o=>{d(o.value),x()},errorMessage:(null===(u=v.nationalityCountryIdRef)||void 0===u?void 0:u.message)&&O("guestForm.table.messages.requiredField"),menuPortalTarget:document.body,isSearchable:!0})}})]}),(0,g.jsxs)("div",{className:"idNumber",children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.idNumber")}
1),(0,g.jsx)(ev.Qr,{control:_,name:"idDocumentNumber",render:o=>{var u,d,m;let{field:p}=o;return(0,g.jsx)(tT,{...p,type:"text",hasError:!!(null===(u=v.idDocumentNumber)||void 0===u?void 0:u.message),errorMessage:(null===(d=v.idDocumentNumber)||void 0===d?void 0:d.type)==="too_small"?O("guestForm.table.messages.requiredField"):null===(m=v.idDocumentNumber)||void 0===m?void 0:m.message,isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"idType",children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.idType")}),(0,g.jsx)(ev.Qr,{control:_,name:"idDocumentType",render:o=>{var u;let{field:{onChange:d,ref:m}}=o;return(0,g.jsx)(eI.P,{ref:m,id:"idDocumentType",name:"idDocumentType",variant:"floating",items:h,value:h.find(o=>o.value===(null==p?void 0:p.idDocumentType)),defaultValue:y.idDocumentType,containerClassName:"select",onChange:o=>{d(o.value),x()},classNames:{singleValue:()=>"singleValue",option:()=>"option",placeholder:()=>"singleValue"},errorClassName:"error-select",errorMessage:(null===(u=v.idDocumentType)||void 0===u?void 0:u.message)&&O("guestForm.table.messages.requiredField"),menuPortalTarget:document.body})}})]}),(0,g.jsxs)("div",{className:"idIssuer",children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.idIssuer")}),(0,g.jsx)(ev.Qr,{control:_,name:"idDocumentIssuerCountryIdRef",render:o=>{var u;let{field:{onChange:d,ref:m}}=o;return(0,g.jsx)(eI.P,{ref:m,id:"idDocumentIssuerCountryIdRef",name:"idDocumentIssuerCountryIdRef",variant:"floating",items:(0,ek.f8)(S),value:(0,ek.f8)(S).find(o=>o.value===(null==p?void 0:p.idDocumentIssuerCountryIdRef)),defaultValue:y.idDocumentIssuerCountryIdRef,containerClassName:"select",errorClassName:"error-select",classNames:{singleValue:()=>"singleValue",option:()=>"option",placeholder:()=>"singleValue"},isSearchable:!0,onChange:o=>{d(o.value),x()},errorMessage:(null===(u=v.idDocumentIssuerCountryIdRef)||void 0===u?void 0:u.message)&&O("guestForm.table.messages.requiredField"),menuPortalTarget:document.body})}})]}),(0,g.jsxs)("div",{className:"birth",children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.birth")}),(0,g.jsx)(ev.Qr,{control:_,name:"dateOfBirth",render:o=>{var u,d;let{field:m}=o;return(0,g.jsx)(tx,{...m,component:tT,type:"text",className:"inputContainer",placeholder:O("guestForm.table.fields.datePlaceholder"),mask:O("guestForm.table.fields.datePlaceholder"),replacement:k,hasError:!!(null===(u=v.dateOfBirth)||void 0===u?void 0:u.message),errorMessage:null===(d=v.dateOfBirth)||void 0===d?void 0:d.message})}})]}),(0,g.jsxs)("div",{className:"residency",children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.residency")}),(0,g.jsx)(ev.Qr,{control:_,name:"addressCountryIdRef",render:o=>{var u;let{field:{onChange:d,ref:m}}=o;return(0,g.jsx)(eI.P,{ref:m,id:"addressCountryIdRef",name:"addressCountryIdRef",variant:"floating",items:(0,ek.f8)(S),containerClassName:"select",classNames:{singleValue:()=>"singleValue",option:()=>"option",placeholder:()=>"singleValue"},errorClassName:"error-select",value:(0,ek.f8)(S).find(o=>o.value===(null==p?void 0:p.addressCountryIdRef)),defaultValue:y.addressCountryIdRef,onChange:o=>{d(o.value),x()},errorMessage:(null===(u=v.addressCountryIdRef)||void 0===u?void 0:u.message)&&O("guestForm.table.messages.requiredField"),isSearchable:!0,menuPortalTarget:document.body})}})]}),!j&&(0,g.jsxs)("div",{className:"email",children:[(0,g.jsxs)("div",{style:{display:"flex"},children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.email")}),w?(0,g.jsx)(el.K,{side:"bottom",contentSize:"large",content:O("guestForm.editMode.agreeReceiveEmails")}):null]}),(0,g.jsx)(ev.Qr,{control:_,name:"email",render:o=>{var u;let{field:d}=o;return(0,g.jsx)(tT,{...d,type:"email",errorMessage:(null===(u=v.email)||void 0===u?void 0:u.message)&&O("contact.emailInvalid"),onChange:o=>{d.onChange(o.target.value),x()}})}})]}),(0,g.jsxs)("div",{className:"entryDate ".concat(j?"mainGuest":""),children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.entryDate")}),(0,g.jsx)(ev.Qr,{control:_,name:"entryDate",render:o=>{var u,d;let{field:m}=o;return(0,g.jsx)(tx,{...m,component:tT,type:"text",className:"inputContainer",placeholder:O("guestForm.table.fields.datePlaceholder"),mask:O("guestForm.table.fields.datePlaceholder"),replacement:k,hasError:!!(null===(u=v.entryDate)||void 0===u?void 0:u.message),errorMessage:null===(d=v.entryDate)||void 0===d?void 0:d.message,isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"exitDate ".concat(j?"mainGuest":""),children:[(0,g.jsx)(Label,{children:O("guestForm.table.fields.exitDate")}
1),(0,g.jsx)(ev.Qr,{control:_,name:"exitDate",render:o=>{var u,d;let{field:m}=o;return(0,g.jsx)(tx,{...m,component:tT,type:"text",className:"inputContainer",placeholder:O("guestForm.table.fields.datePlaceholder"),mask:O("guestForm.table.fields.datePlaceholder"),replacement:k,hasError:!!(null===(u=v.exitDate)||void 0===u?void 0:u.message),errorMessage:null===(d=v.exitDate)||void 0===d?void 0:d.message,isRequired:!0})}})]})]})};var tG=d(70197),tB=d(19013),tA=d(13882),tZ=d(91857),tU=d(49474),tV=d(313),tL=d(96843);let tH=["TEST","TESTE","NONE","NULL","NUL","FAKE","TEMP","PASS","XXXX","AAAA","DUMMY","SAMPLE","UNKNOWN","ASDF","QWERTY","NA","NAN","SEM","NAOSEI","NAOTEM","SEMDOC","SEMDOCUMENTO","DESCONHECIDO","INVALIDO","DOCUMENTO","PASSAPORTE","BILHETE"],tq=/^[A-Z0-9]{3,16}$/i,isDigitCode=o=>o>=48&&o<=57,isUpperLetterCode=o=>o>=65&&o<=90,sameCharClass=(o,u)=>isDigitCode(o)&&isDigitCode(u)||isUpperLetterCode(o)&&isUpperLetterCode(u),isAllDigits=o=>/^[0-9]+$/.test(o),isAllUpperLetters=o=>/^[A-Z]+$/.test(o),hasConstantStep=(o,u)=>{for(let d=1;d<o.length;d+=1)if(o.charCodeAt(d)-o.charCodeAt(d-1)!==u)return!1;return!0},longestConsecutiveRun=o=>{let u=o.length>0?1:0,d=1,m=0;for(let p=1;p<o.length;p+=1){let g=o.charCodeAt(p-1),h=o.charCodeAt(p),b=h-g,y=sameCharClass(g,h)&&(1===b||-1===b);y&&(1===d||b===m)?(d+=1,m=b):y?(d=2,m=b):(d=1,m=0),d>u&&(u=d)}return u},isSequentialNumericDocument=o=>!!o&&o.length>=2&&isAllDigits(o)&&(hasConstantStep(o,1)||hasConstantStep(o,-1)),isAlphabeticalSequenceDocument=o=>{let u=o.toUpperCase();return isAllUpperLetters(u)&&u.length>=5&&(hasConstantStep(u,1)||hasConstantStep(u,-1))},isSequentialDocument=o=>!!o&&(isSequentialNumericDocument(o)||isAlphabeticalSequenceDocument(o)||isAllDigits(o)&&longestConsecutiveRun(o)>=7),isRepeatedBlockDocument=o=>{if(!o||o.length<4)return!1;let u=o.toUpperCase(),d=(u+u).indexOf(u,1);return d>0&&d<u.length&&u.length%d==0},isPlaceholderDocument=function(o){let u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!o)return!1;let d=o.trim().toUpperCase();return tH.includes(d)||u.some(o=>o.trim().toUpperCase()===d)},hasValidDocumentNumberFormat=o=>tq.test(o),isAllIdenticalCharacters=o=>!!o&&/^(.)\1*$/.test(o),tQ=/^[0-9]{9}[A-Z]{2}[0-9]$/,looksLikePortugueseCcNumber=o=>!!o&&tQ.test(o.toUpperCase()),hasValidPortugueseCcCheckDigit=o=>{let u=o.toUpperCase(),d=0,m=!1;for(let o=u.length-1;o>=0;o-=1){let p=u.charCodeAt(o),g=isDigitCode(p)?p-48:p-55;if(g<0||g>35)return!1;m&&(g*=2)>9&&(g-=9),d+=g,m=!m}return d%10==0},hasInvalidDocumentCheckDigit=o=>looksLikePortugueseCcNumber(o)&&!hasValidPortugueseCcCheckDigit(o),tW=ek.ki.PT.id,commonValidations=o=>{let{data:u,ctx:d,checkIn:m,checkOut:p,isMainGuest:g=!0,getErrorMessage:h,dateOfBirthValidation:b}=o,{dateOfBirth:y,entryDate:x,exitDate:v,nationalityCountryIdRef:_,addressCountryIdRef:j,idDocumentIssuerCountryIdRef:w,idDocumentNumber:O}=u;O&&(hasValidDocumentNumberFormat(O)?(isAllIdenticalCharacters(O)||isSequentialDocument(O)||isRepeatedBlockDocument(O)||isPlaceholderDocument(O)||hasInvalidDocumentCheckDigit(O))&&d.addIssue({code:"custom",path:["idDocumentNumber"],message:h("guest:guestForm.table.messages.invalidDocumentNumber")}):d.addIssue({code:"custom",path:["idDocumentNumber"],message:h("guest:guestForm.table.messages.invalidDocumentNumberFormat")}));let C=(0,tG.default)(m,"dd-MM-yyyy",new Date),I=(0,tG.default)(p,"dd-MM-yyyy",new Date),S=(0,tG.default)(m,"dd/MM/yyyy",new Date),k=(0,tG.default)(p,"dd/MM/yyyy",new Date);if(_!==tW){if(w||d.addIssue({code:"custom",message:"common:messages.requiredField",path:["idDocumentIssuerCountryIdRef"]}),j||d.addIssue({code:"custom",message:"common:messages.requiredField",path:["addressCountryIdRef"]}),y||d.addIssue({code:"custom",path:["dateOfBirth"],message:h("guest:guestForm.table.messages.requiredField")}),y){let o=b(y,g,m);!0!==o&&d.addIssue({code:"custom",path:["dateOfBirth"],message:o})}if(x||d.addIssue({code:"custom",path:["entryDate"],message:h("guest:guestForm.table.messages.requiredField")}),v||d.addIssue({code:"custom",path:["exitDate"],message:h("guest:guestForm.table.messages.requiredField")}
1),x){let o=(0,tG.default)(x,"dd-MM-yyyy",new Date),u=(0,tG.default)(x,"dd/MM/yyyy",new Date),m=(0,ea.default)(o)&&!(0,tV.default)(o,C)&&((0,tV.default)(o,I)||(0,tL.default)(o,I))||(0,ea.default)(u)&&!(0,tV.default)(u,S)&&((0,tV.default)(u,k)||(0,tL.default)(u,k));m||d.addIssue({code:"custom",path:["entryDate"],message:h("guest:guestForm.table.messages.invalidEntryExitDate")})}if(v){let o=(0,tG.default)(v,"dd-MM-yyyy",new Date),u=(0,tG.default)(v,"dd/MM/yyyy",new Date),m=(0,ea.default)(o)&&!(0,tV.default)(o,C)&&((0,tV.default)(o,I)||(0,tL.default)(o,I))||(0,ea.default)(u)&&!(0,tV.default)(u,S)&&((0,tV.default)(u,k)||(0,tL.default)(u,k));m||d.addIssue({code:"custom",path:["exitDate"],message:h("guest:guestForm.table.messages.invalidEntryExitDate")})}if(x&&v){let o=(0,tG.default)(x,"dd-MM-yyyy",new Date),u=(0,tG.default)(v,"dd-MM-yyyy",new Date),m=(0,tG.default)(x,"dd/MM/yyyy",new Date),p=(0,tG.default)(v,"dd/MM/yyyy",new Date),g=(0,ea.default)(o)&&(0,ea.default)(u)&&((0,tV.default)(o,u)||(0,tL.default)(o,u))||(0,ea.default)(m)&&(0,ea.default)(p)&&((0,tV.default)(m,p)||(0,tL.default)(m,p));g||(d.addIssue({code:"custom",path:["entryDate"],message:h("guest:guestForm.table.messages.invalidEntryExitDate")}),d.addIssue({code:"custom",path:["exitDate"],message:h("guest:guestForm.table.messages.invalidEntryExitDate")}))}}};ek.ki.PT.id;let getErrorMessage=o=>null===b.ag||void 0===b.ag?void 0:b.ag.t(o),dateValidation=o=>{let u=(0,tG.default)(o,"dd-MM-yyyy",new Date),d=(0,tG.default)(o,"dd/MM/yyyy",new Date),m=(0,ea.default)(u)&&(0,en.default)(u,"dd-MM-yyyy")===o||(0,ea.default)(d)&&(0,en.default)(d,"dd/MM/yyyy")===o;return m},dateOfBirthValidation=(o,u,d)=>{let m=(0,tG.default)(o,"dd/MM/yyyy",new Date);if(!dateValidation(o))return getErrorMessage("guest:guestForm.table.messages.invalidDates");if(function(o){return(0,tA.Z)(1,arguments),(0,tB.default)(o).getTime()>Date.now()}(m))return getErrorMessage("guest:guestForm.table.messages.invalidDateBirth");if(u){let o=(0,tG.default)(d,"dd/MM/yyyy",new Date);if(!(0,ea.default)(o))return getErrorMessage("guest:guestForm.table.messages.invalidDates");let u=function(o,u){(0,tA.Z)(2,arguments);var d=(0,tB.default)(o),m=(0,tB.default)(u),p=(0,tU.Z)(d,m),g=Math.abs((0,tZ.default)(d,m));d.setFullYear(1584),m.setFullYear(1584);var h=(0,tU.Z)(d,m)===-p,b=p*(g-Number(h));return 0===b?0:b}(o,m);if(u<18)return getErrorMessage("guest:guestForm.table.messages.invalidGuestBirthdate")}return!0},t$=eU.z.object({name:eU.z.string().min(2),surname:eU.z.string().min(2),dateOfBirth:eU.z.string().optional(),idDocumentNumber:eU.z.string().min(1),idDocumentType:eU.z.string().min(1),idDocumentIssuerCountryIdRef:eU.z.string().optional(),nationalityCountryIdRef:eU.z.string().min(1),addressCountryIdRef:eU.z.string().optional(),entryDate:eU.z.string().optional(),exitDate:eU.z.string().optional(),email:eU.z.string().optional().refine(o=>""===o||eU.z.string().email().safeParse(o).success),allowsMarketingEmails:eU.z.boolean()}),createGuestEditFormSchema=(o,u,d)=>t$.superRefine((m,p)=>{commonValidations({data:m,ctx:p,checkIn:o,checkOut:u,isMainGuest:d,getErrorMessage,dateOfBirthValidation})});function GuestEditDrawer_styles_templateObject(){let o=(0,P._)(["\n  margin-bottom: ",";\n"]);return GuestEditDrawer_styles_templateObject=function(){return o},o}function GuestEditDrawer_styles_templateObject1(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  font-size: ",";\n  font-weight: ",";\n\n  a {\n    color: ",";\n    font-family: inherit;\n    font-size: inherit;\n  }\n\n  .disclaimer {\n    color: ",";\n    font-size: ",";\n  }\n\n  div > p > button {\n    font-size: ",";\n\n    @media (max-width: 1024px) {\n      font-size: ",";\n    }\n\n    @media "," {\n      font-size: 1.1rem;\n    }\n  }\n"]);return GuestEditDrawer_styles_templateObject1=function(){return o},o}let tK=D.ZP.div.withConfig({componentId:"sc-3c2556c6-0"})(GuestEditDrawer_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.x_large});D.ZP.div.withConfig({componentId:"sc-3c2556c6-1"})(GuestEditDrawer_styles_templateObject1(),o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.weights.medium},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.danger},o=>{let{theme:u}=o;return u.fontSizes.x_small},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.fontSizes.small},Z.Hb.mobile);let GuestEditDrawer=o=>{var u,d,m,p,y;let{isEditModeOn:x,onClose:v,guest:_,guests:O,countriesList:C,documentTypesList:I}=o,{t:S}=(0,b.$G)("guest"),k=(0,ey.X)(),P=(0,td.e)(o=>o.setIsUpdateSuccess),{mutate:D,isError:F,isSuccess:N}=useAddGuestMutation(),{mutate:T,isError:M,isSuccess:z}=useUpdateGuestMutation(),{mainGuest:E,checkIn:R,checkOut:G,bookingInfo:B}=(0,td.J)(o=>({mainGuest:o.mainGuest,checkIn:o.bookingInfo.checkIn,checkOut:o.bookingInfo.checkOut,bookingInfo:o.bookingInfo}
1),j.X),A={name:_.name||"",dateOfBirth:_.dateOfBirth,idDocumentNumber:_.idDocumentNumber||"",surname:_.surname||"",idDocumentType:_.idDocumentType&&(null===(u=I.find(o=>o.value===_.idDocumentType))||void 0===u?void 0:u.value)||"",idDocumentIssuerCountryIdRef:_.addressCountryIdRef?(null===(d=C.find(o=>o.value===_.idDocumentIssuerCountryIdRef))||void 0===d?void 0:d.value)||"":void 0,nationalityCountryIdRef:_.nationalityCountryIdRef&&(null===(m=C.find(o=>o.value===_.nationalityCountryIdRef))||void 0===m?void 0:m.value)||"",addressCountryIdRef:_.addressCountryIdRef?(null===(p=C.find(o=>o.value===_.addressCountryIdRef))||void 0===p?void 0:p.value)||"":void 0,entryDate:_.entryDate||"",exitDate:_.exitDate||"",email:_.secondaryEmail||"",allowsMarketingEmails:null===(y=_.allowsMarketingEmails)||void 0===y||y},Z=createGuestEditFormSchema(A.entryDate||(0,en.default)((0,W.default)(R),"dd/MM/yyyy"),A.exitDate||(0,en.default)((0,W.default)(G),"dd/MM/yyyy"),_.isMainGuest),{control:U,handleSubmit:V,formState:{errors:L},reset:H,getValues:q,setError:Q,setValue:K,watch:J}=(0,ev.cI)({resolver:(0,e_.F)(Z),defaultValues:A}),[X,Y]=(0,h.useState)(!1),[ee,et]=(0,h.useState)(A),er=ek.ki.PT.id,ei=J("nationalityCountryIdRef"),eo=!_.guestToken;(0,h.useEffect)(()=>{eo&&ei===er&&!q("addressCountryIdRef")&&(K("addressCountryIdRef",er),et(o=>({...o,addressCountryIdRef:er})))},[ei,er,K,q,eo]),(0,h.useEffect)(()=>{x&&(H(A),et(A))},[_,H,x]);let onCancel=()=>{H(A),et(A),v()},getUnSubmittedValues=()=>{let o=q();et(o)},onSubmit=async o=>{var u,d;let m=_.bookingIdRef||(null==E?void 0:E.bookingIdRef)||B.bookingIdRef||"",p=_.bookingUnitId||(null==E?void 0:E.bookingUnitId)||(null===(d=B.bookingUnits)||void 0===d?void 0:null===(u=d[0])||void 0===u?void 0:u.bookingUnitId)||"",g={..._,...o,allowsMarketingEmails:!!o.email,bookingId:m,bookingIdRef:m,bookingUnitId:p};if(O.filter(o=>{let{guestId:u}=o;return u!==_.guestId}).some(o=>{let{idDocumentNumber:u,idDocumentType:d}=o;return u===g.idDocumentNumber&&d===g.idDocumentType})){Q("idDocumentNumber",{type:"custom",message:S("guest:guestForm.table.messages.duplicateDocumentNumber")});return}if(!_.guestToken)return D((0,tm.Rf)(g,E.guestToken)),Y(!0);T((0,tm.jS)(g)),Y(!0)};return(0,h.useEffect)(()=>{let o=null;return F||M?getUnSubmittedValues():(X&&(o=setTimeout(()=>{Y(!1),v()},3e3)),()=>{o&&clearTimeout(o)})},[F,M,X,v]),(0,h.useEffect)(()=>{if(N||z){var o;eb.f.GuestDetailsUpdated({...k,guest_action:N?"add":"update",is_main_guest:!!_.isMainGuest}),P(_.guestId,null!==(o=ee.name)&&void 0!==o?o:""),H(A)}},[N,z]),(0,g.jsx)(Drawer,{isOpen:x,onClose:onCancel,onCancel:onCancel,onConfirm:()=>{getUnSubmittedValues(),V(onSubmit)()},showLoadingScreen:X,leftBtnText:S("guestForm.editMode.cancel"),rightBtnText:S("guestForm.editMode.save"),content:X?(0,g.jsx)(LoadingScreen,{}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(tK,{children:[(0,g.jsx)($.Q,{children:S("guestForm.editMode.title")}),(0,g.jsx)(w.x,{children:S("guestForm.editMode.description")})]}),(0,g.jsx)(Form,{handleSubmit:V,onSubmit:onSubmit,documentTypesList:I,defaultValues:A,unSubmittedValues:ee,getUnSubmittedValues:getUnSubmittedValues,errors:L,control:U,isMainGuest:_.isMainGuest})]})})},byteToMB=o=>o/1024/1024,getBase64=async o=>new Promise((u,d)=>{if(o){let m=new FileReader;m.readAsDataURL(o),m.onload=()=>{u(m.result)},m.onerror=d}}),getBase64SizeInMb=o=>{let u=3*Math.ceil(o.size/4),d=byteToMB(u);return Number(d.toFixed(3))},extractBase64ImageType=o=>o?o.substring(5,o.indexOf(";base64")):void 0,extractBase64Image=o=>null==o?void 0:o.split(",")[1];var tJ={src:"/_next/static/media/document.f90d7d4b.png"},tX={src:"/_next/static/media/passport.666e943c.png"},tY={src:"/_next/static/media/selfie-photo.5441eea4.png"},t0={src:"/_next/static/media/selfie.7586cd2f.svg"};function HelpTopicsDrawer_styles_templateObject(){let o=(0,P._)(["\n  max-width: 485px;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  margin: 0 auto;\n"]);return HelpTopicsDrawer_styles_templateObject=function(){return o},o}function HelpTopicsDrawer_styles_templateObject1(){let o=(0,P._)(["\n  font-size: ",";\n  font-weight: ",";\n  margin-bottom: ",";\n\n  @media "," {\n    font-size: ",";\n  }\n"]);
1return HelpTopicsDrawer_styles_templateObject1=function(){return o},o}function HelpTopicsDrawer_styles_templateObject2(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  column-gap: ",";\n"]);return HelpTopicsDrawer_styles_templateObject2=function(){return o},o}function HelpTopicsDrawer_styles_templateObject3(){let o=(0,P._)(["\n  width: 172px;\n  height: 95px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 20px ",";\n  border-radius: ",";\n  background-color: #f3f7f7;\n  margin: "," 0;\n\n  @media "," {\n    width: 111px;\n    height: 64px;\n    padding: ",";\n    border-radius: ",";\n  }\n"]);return HelpTopicsDrawer_styles_templateObject3=function(){return o},o}function HelpTopicsDrawer_styles_templateObject4(){let o=(0,P._)(["\n  width: 70px;\n  height: auto;\n\n  @media "," {\n    width: 36px;\n  }\n"]);return HelpTopicsDrawer_styles_templateObject4=function(){return o},o}function HelpTopicsDrawer_styles_templateObject5(){let o=(0,P._)(["\n  width: 100%;\n  font-size: ",";\n  font-weight: ",";\n  border-radius: ",";\n\n  @media "," {\n    font-size: ",";\n    border-radius: ",";\n  }\n"]);return HelpTopicsDrawer_styles_templateObject5=function(){return o},o}function HelpTopicsDrawer_styles_templateObject6(){let o=(0,P._)(["\n  width: ",";\n  margin-bottom: ",";\n\n  @media "," {\n    width: ",";\n  }\n"]);return HelpTopicsDrawer_styles_templateObject6=function(){return o},o}function HelpTopicsDrawer_styles_templateObject7(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  align-items: flex-start;\n\n  svg {\n    color: #2d7471;\n    flex-shrink: 0;\n  }\n\n  b {\n    font-weight: ",";\n  }\n\n  p {\n    margin: 0 0\n      ",";\n  }\n\n  @media "," {\n    font-size: 1.1rem;\n  }\n"]);return HelpTopicsDrawer_styles_templateObject7=function(){return o},o}let t1=D.ZP.div.withConfig({componentId:"sc-3ed78ddb-0"})(HelpTopicsDrawer_styles_templateObject()),t2=D.ZP.h3.withConfig({componentId:"sc-3ed78ddb-1"})(HelpTopicsDrawer_styles_templateObject1(),o=>{let{theme:u}=o;return u.fontSizes.x_large},o=>{let{theme:u}=o;return u.weights.bold},o=>{let{theme:u}=o;return u.spacing.x_large},Z.Hb.mobile,o=>{let{theme:u}=o;return u.fontSizes.medium}),t3=D.ZP.div.withConfig({componentId:"sc-3ed78ddb-2"})(HelpTopicsDrawer_styles_templateObject2(),o=>{let{theme:u}=o;return u.spacing.small}),t4=D.ZP.div.withConfig({componentId:"sc-3ed78ddb-3"})(HelpTopicsDrawer_styles_templateObject3(),o=>{let{theme:u}=o;return u.spacing.xx_large},o=>{let{theme:u}=o;return"".concat(u.radii.x_large," 0 0 ").concat(u.radii.x_large)},o=>{let{theme:u}=o;return u.spacing.x_large},Z.Hb.mobile,o=>{let{theme:u}=o;return"".concat(u.spacing.medium," ").concat(u.spacing.large)},o=>{let{theme:u}=o;return"".concat(u.radii.medium," 0 0 ").concat(u.radii.medium)}),t5=D.ZP.img.withConfig({componentId:"sc-3ed78ddb-4"})(HelpTopicsDrawer_styles_templateObject4(),Z.Hb.mobile),t6=(0,D.ZP)(t4).withConfig({componentId:"sc-3ed78ddb-5"})(HelpTopicsDrawer_styles_templateObject5(),o=>{let{theme:u}=o;return u.fontSizes.large},o=>{let{theme:u}=o;return u.weights.semiBold},o=>{let{theme:u}=o;return"0 ".concat(u.radii.x_large," ").concat(u.radii.x_large," 0")},Z.Hb.mobile,o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return"0 ".concat(u.radii.medium," ").concat(u.radii.medium," 0")}),t8=D.ZP.img.withConfig({componentId:"sc-3ed78ddb-6"})(HelpTopicsDrawer_styles_templateObject6(),o=>{let{currentTopic:u}=o;return"document"===u?"200px":"106px"},o=>{let{theme:u}=o;return u.spacing.x_large},Z.Hb.mobile,o=>{let{currentTopic:u}=o;return"document"===u?"194px":"102px"}),t7=D.ZP.div.withConfig({componentId:"sc-3ed78ddb-7"})(HelpTopicsDrawer_styles_templateObject7(),o=>{let{theme:u}=o;return u.weights.medium},o=>{let{theme:u}=o;return"".concat(u.spacing.large," ").concat(u.spacing.small)},Z.Hb.mobile),t9=["fullVisibility","clearAndLegible","goodLighting"],ne=["faceVisible","selfieGoodLighting","selfiePosition"],HelpTopicsDrawer=o=>{let{isOpen:u,onClose:d,currentTopic:m}=o,{t:p}=(0,b.$G)(),h="document"===m,y=h?t9:ne,IdDocuments=()=>(0,g.jsxs)(t3,{children:[(0,g.jsx)(t4,{children:(0,g.jsx)(t5,{src:h?tJ.src:t0.src})}),(0,g.jsx)(t6,{children:p("guest:guestForm.editMode.superhog.".concat(h?"passportOrNationalId":"idPhotoOrSelfie"))})]});return(0,g.jsx)(Drawer,{isOpen:u,onClose:d,content:(0,g.jsx)(()=>
1(0,g.jsxs)(t1,{children:[(0,g.jsx)(t2,{children:p("guest:guestForm.editMode.superhog.".concat(h?"idPhotoGuideline":"selfieGuideline"))}),(0,g.jsx)($.Q,{children:p("guest:guestForm.editMode.superhog.".concat(h?"guidelineInstructionsDocument":"guidelineInstructionsSelfie"))}),(0,g.jsx)(IdDocuments,{}),(0,g.jsx)(t8,{currentTopic:m,src:h?tX.src:tY.src}),y.map(o=>(0,g.jsxs)(t7,{children:[(0,g.jsx)(C.P.CheckCircle,{size:24}),(0,g.jsx)(b.cC,{i18nKey:"guest:guestForm.editMode.superhog.".concat(o),components:{b:(0,g.jsx)("b",{}),p:(0,g.jsx)(w.x,{})}})]},o))]}),{}),showFooter:!1})},nt=eU.z.object({name:eU.z.string().min(1),surname:eU.z.string().min(1),email:eU.z.string().email().min(1),dateOfBirth:eU.z.string().min(1),address:eU.z.string().min(1),zipCode:eU.z.string().min(1),town:eU.z.string().min(1),county:eU.z.string().min(1),phoneCountryId:eU.z.string().min(1),phoneCode:eU.z.string().min(1),phoneType:eU.z.string().min(1),normalizedNationalPhoneNumber:eU.z.string().min(1),addressCountryIdRef:eU.z.string().min(1),nationalityCountryIdRef:eU.z.string().min(1),entryDate:eU.z.string().refine(dateValidation,{message:getErrorMessage("guest:guestForm.table.messages.invalidDates")}),exitDate:eU.z.string().refine(dateValidation,{message:getErrorMessage("guest:guestForm.table.messages.invalidDates")}),idDocumentIssuerCountryIdRef:eU.z.string().min(1),idDocumentNumber:eU.z.string().min(1),idDocumentType:eU.z.string().min(1)}),createGuestSuperhogEditFormSchema=(o,u)=>nt.superRefine((d,m)=>{let{normalizedNationalPhoneNumber:p,phoneCountryId:g}=d;(0,eV.B)(p,g)||m.addIssue({code:"custom",message:"common:messages.invalidPhone",path:["normalizedNationalPhoneNumber"]}),commonValidations({data:d,ctx:m,checkIn:o,checkOut:u,getErrorMessage:getErrorMessage,dateOfBirthValidation:dateOfBirthValidation})});function Step1_styles_templateObject(){let o=(0,P._)(["\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  grid-template-rows: repeat(6, 1fr);\n  grid-column-gap: ",";\n  grid-row-gap: ",";\n\n  label {\n    margin-bottom: ",";\n  }\n\n  .select {\n    position: relative;\n  }\n\n  .error {\n    position: absolute;\n    bottom: -16px;\n    left: -12px;\n\n    margin: 0;\n    left: 0;\n    top: 50px;\n    font-size: 11px;\n    line-height: 10px;\n\n    @media "," {\n      font-size: 10px;\n    }\n  }\n\n  .error-select {\n    position: absolute;\n    bottom: -26px;\n    left: -12px;\n    font-size: 11px;\n  }\n\n  @media "," {\n    display: grid;\n    grid-template-columns: repeat(4, 1fr);\n    grid-template-rows: repeat(11, 1fr);\n    grid-column-gap: ",";\n\n    .name {\n      grid-area: 1 / 1 / 2 / 5;\n    }\n    .surname {\n      grid-area: 2 / 1 / 3 / 3;\n    }\n    .birth {\n      grid-area: 2 / 3 / 3 / 5;\n    }\n    .idType {\n      grid-area: 3 / 1 / 4 / 3;\n    }\n    .idNumber {\n      grid-area: 3 / 3 / 4 / 5;\n    }\n    .idIssuer {\n      grid-area: 4 / 1 / 5 / 3;\n    }\n    .nationality {\n      grid-area: 4 / 3 / 5 / 5;\n    }\n    .residency {\n      grid-area: 5 / 1 / 6 / 5;\n    }\n    .entryDate {\n      grid-area: 6 / 1 / 7 / 3;\n    }\n    .exitDate {\n      grid-area: 6 / 3 / 7 / 5;\n    }\n    .phoneType {\n      grid-area: 7 / 1 / 8 / 3;\n    }\n    .phoneNumber {\n      grid-area: 7 / 3 / 8 / 5;\n    }\n    .email {\n      grid-area: 8 / 1 / 9 / 5;\n    }\n    .address {\n      grid-area: 9 / 1 / 10 / 5;\n    }\n    .postcode {\n      grid-area: 10 / 1 / 11 / 3;\n    }\n    .town {\n      grid-area: 10 / 3 / 11 / 5;\n    }\n    .county {\n      grid-area: 11 / 1 / 12 / 5;\n    }\n  }\n\n  @media "," {\n    grid-template-rows: repeat(12, 1fr);\n\n    .phoneType {\n      grid-area: 7 / 1 / 8 / 5;\n    }\n    .phoneNumber {\n      grid-area: 8 / 1 / 8 / 5;\n    }\n    .email {\n      grid-area: 9 / 1 / 9 / 5;\n    }\n    .address {\n      grid-area: 10 / 1 / 10 / 5;\n    }\n    .postcode {\n      grid-area: 11 / 1 / 11 / 3;\n    }\n    .town {\n      grid-area: 11 / 3 / 11 / 5;\n    }\n    .county {\n      grid-area: 12 / 1 / 12 / 5;\n    }\n  }\n\n  .option {\n    display: inline-block;\n    width: 100%;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n  }\n\n  input,\n  .singleValue,\n  .option {\n    font-size: ",";\n    font-family: ",";\n\n    @media (max-width: 1024px) {\n      font-size: ",";\n    }\n\n    @media "," {\n      font-size: 16px;\n    }\n  }\n"]);
1return Step1_styles_templateObject=function(){return o},o}let nn=D.ZP.form.withConfig({componentId:"sc-d68192a8-0"})(Step1_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.small},Z.Hb.tablet,Z.Hb.tablet,o=>{let{theme:u}=o;return u.spacing.medium},Z.Hb.mobile,o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.fonts.poppins},o=>{let{theme:u}=o;return u.fontSizes.small},Z.Hb.mobile),Step1=o=>{var u,d,m;let{handleSubmit:p,onSubmit:h,unSubmittedValues:y,documentTypesList:x,defaultValues:v,getUnSubmittedValues:_,errors:j,control:w,handlePhoneNumberChange:O,register:C}=o,{t:S,i18n:k}=(0,b.$G)("guest"),P=(0,tm.BH)(),D=null!==(d=k.language)&&void 0!==d?d:"en",F=(0,I.IQ)(D);return(0,g.jsxs)(nn,{onSubmit:p(h),children:[(0,g.jsxs)("div",{className:"name",children:[(0,g.jsx)(Label,{children:S("guestForm.table.fields.name")}),(0,g.jsx)(ev.Qr,{control:w,name:"name",render:o=>{var u;let{field:d}=o;return(0,g.jsx)(tT,{...d,type:"text",errorMessage:(null===(u=j.name)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"surname",children:[(0,g.jsx)(Label,{children:S("guestForm.table.fields.surname")}),(0,g.jsx)(ev.Qr,{control:w,name:"surname",render:o=>{var u;let{field:d}=o;return(0,g.jsx)(tT,{...d,type:"text",errorMessage:(null===(u=j.surname)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"birth",children:[(0,g.jsx)(Label,{children:S("guestForm.table.fields.birth")}),(0,g.jsx)(ev.Qr,{control:w,name:"dateOfBirth",render:o=>{var u,d;let{field:m}=o;return(0,g.jsx)(tx,{...m,component:tT,type:"text",className:"inputContainer",placeholder:S("guestForm.table.fields.datePlaceholder"),mask:S("guestForm.table.fields.datePlaceholder"),replacement:F,hasError:!!(null===(u=j.dateOfBirth)||void 0===u?void 0:u.message),errorMessage:null===(d=j.dateOfBirth)||void 0===d?void 0:d.message,isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"idNumber",children:[(0,g.jsx)(Label,{children:S("guestForm.table.fields.idNumber")}),(0,g.jsx)(ev.Qr,{control:w,name:"idDocumentNumber",render:o=>{var u,d,m;let{field:p}=o;return(0,g.jsx)(tT,{...p,type:"text",hasError:!!(null===(u=j.idDocumentNumber)||void 0===u?void 0:u.message),errorMessage:(null===(d=j.idDocumentNumber)||void 0===d?void 0:d.type)==="too_small"?S("guestForm.table.messages.requiredField"):null===(m=j.idDocumentNumber)||void 0===m?void 0:m.message,isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"idType",children:[(0,g.jsx)(Label,{children:S("guestForm.table.fields.idType")}),(0,g.jsx)(ev.Qr,{control:w,name:"idDocumentType",render:o=>{var u;let{field:{onChange:d,ref:m}}=o;return(0,g.jsx)(eI.P,{ref:m,id:"idDocumentType",name:"idDocumentType",variant:"floating",items:x,value:x.find(o=>o.value===(null==y?void 0:y.idDocumentType)),defaultValue:v.idDocumentType,containerClassName:"select",onChange:o=>{d(o.value),_()},errorClassName:"error-select",classNames:{singleValue:()=>"singleValue",option:()=>"option"},errorMessage:(null===(u=j.idDocumentType)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),menuPortalTarget:document.body})}})]}),(0,g.jsxs)("div",{className:"idIssuer",children:[(0,g.jsx)(Label,{children:S("guestForm.table.fields.idIssuer")}),(0,g.jsx)(ev.Qr,{control:w,name:"idDocumentIssuerCountryIdRef",render:o=>{var u;let{field:{onChange:d,ref:m}}=o;return(0,g.jsx)(eI.P,{ref:m,id:"idDocumentIssuerCountryIdRef",name:"idDocumentIssuerCountryIdRef",variant:"floating",items:(0,ek.f8)(D),value:(0,ek.f8)(D).find(o=>o.value===(null==y?void 0:y.idDocumentIssuerCountryIdRef)),defaultValue:v.idDocumentIssuerCountryIdRef,containerClassName:"select",errorClassName:"error-select",classNames:{singleValue:()=>"singleValue",option:()=>"option"},isSearchable:!0,onChange:o=>{d(o.value),_()},errorMessage:(null===(u=j.idDocumentIssuerCountryIdRef)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),menuPortalTarget:document.body})}})]}),(0,g.jsxs)("div",{className:"nationality",children:[(0,g.jsx)(Label,{children:S("guestForm.table.fields.nationality")}),(0,g.jsx)(ev.Qr,{control:w,name:"nationalityCountryIdRef",render:
1o=>{var u;let{field:{onChange:d,ref:m}}=o;return(0,g.jsx)(eI.P,{ref:m,id:"nationalityCountryIdRef",name:"nationalityCountryIdRef",variant:"floating",items:(0,ek.f8)(D),value:(0,ek.f8)(D).find(o=>o.value===(null==y?void 0:y.nationalityCountryIdRef)),defaultValue:v.nationalityCountryIdRef,containerClassName:"select",errorClassName:"error-select",classNames:{singleValue:()=>"singleValue",option:()=>"option"},onChange:o=>{d(o.value),_()},errorMessage:(null===(u=j.nationalityCountryIdRef)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),isSearchable:!0,menuPortalTarget:document.body})}})]}),(0,g.jsxs)("div",{className:"residency",children:[(0,g.jsx)(Label,{children:S("guestForm.table.fields.residency")}),(0,g.jsx)(ev.Qr,{control:w,name:"addressCountryIdRef",render:o=>{var u;let{field:{onChange:d,ref:m}}=o;return(0,g.jsx)(eI.P,{ref:m,id:"addressCountryIdRef",name:"addressCountryIdRef",variant:"floating",items:(0,ek.f8)(D),containerClassName:"select",errorClassName:"error-select",classNames:{singleValue:()=>"singleValue",option:()=>"option"},value:(0,ek.f8)(D).find(o=>o.value===(null==y?void 0:y.addressCountryIdRef)),defaultValue:v.addressCountryIdRef,onChange:o=>{d(o.value),_()},errorMessage:(null===(u=j.addressCountryIdRef)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),isSearchable:!0,menuPortalTarget:document.body})}})]}),(0,g.jsxs)("div",{className:"entryDate",children:[(0,g.jsx)(Label,{children:S("guestForm.table.fields.entryDate")}),(0,g.jsx)(ev.Qr,{control:w,name:"entryDate",render:o=>{var u;let{field:d}=o;return(0,g.jsx)(tx,{...d,component:tT,type:"text",className:"inputContainer",placeholder:S("guestForm.table.fields.datePlaceholder"),mask:S("guestForm.table.fields.datePlaceholder"),replacement:F,errorMessage:null===(u=j.entryDate)||void 0===u?void 0:u.message,isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"exitDate",children:[(0,g.jsx)(Label,{children:S("guestForm.table.fields.exitDate")}),(0,g.jsx)(ev.Qr,{control:w,name:"exitDate",render:o=>{var u;let{field:d}=o;return(0,g.jsx)(tx,{...d,component:tT,type:"text",className:"inputContainer",placeholder:S("guestForm.table.fields.datePlaceholder"),mask:S("guestForm.table.fields.datePlaceholder"),replacement:F,errorMessage:null===(u=j.exitDate)||void 0===u?void 0:u.message,isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"phoneType",children:[(0,g.jsx)(Label,{children:S("superhog.form.phoneType")}),(0,g.jsx)(ev.Qr,{control:w,name:"phoneType",render:o=>{var u;let{field:{onChange:d,ref:m}}=o;return(0,g.jsx)(eI.P,{ref:m,id:"phoneType",name:"phoneType",variant:"floating",items:P,value:P.find(o=>o.value===(null==y?void 0:y.phoneType)),defaultValue:v.phoneType,containerClassName:"select",errorClassName:"error-select",classNames:{singleValue:()=>"singleValue",option:()=>"option"},hideCheck:!0,errorMessage:(null===(u=j.phoneType)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),onChange:o=>{d(o.value),_()},menuPortalTarget:document.body})}})]}),(0,g.jsxs)("div",{className:"phoneNumber",children:[(0,g.jsx)(Label,{children:S("superhog.form.phoneNumber")}),(0,g.jsx)(eC.B,{variant:"floating",errorMessage:j.phoneCode?S("guestForm.table.messages.requiredField"):S(null!==(m=null===(u=j.normalizedNationalPhoneNumber)||void 0===u?void 0:u.message)&&void 0!==m?m:""),phoneCountryId:y.phoneCountryId,phoneNumberValue:y.normalizedNationalPhoneNumber,countryCodeProps:C("normalizedNationalPhoneNumber"),countryCodeClassnames:{singleValue:()=>"singleValue",option:()=>"option"},handleChange:O,isRequired:!0,...C("normalizedNationalPhoneNumber")})]}),(0,g.jsxs)("div",{className:"email",children:[(0,g.jsx)(Label,{children:S("guest:superhog.form.email")}),(0,g.jsx)(ev.Qr,{control:w,name:"email",render:o=>{var u;let{field:d}=o;return(0,g.jsx)(tT,{...d,type:"email",errorMessage:(null===(u=j.email)||void 0===u?void 0:u.message)&&S("contact.emailInvalid"),isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"address",children:[(0,g.jsx)(Label,{children:S("superhog.form.address")}
1),(0,g.jsx)(ev.Qr,{control:w,name:"address",render:o=>{var u;let{field:d}=o;return(0,g.jsx)(tT,{...d,type:"text",errorMessage:(null===(u=j.address)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"postcode",children:[(0,g.jsx)(Label,{children:S("superhog.form.postcode")}),(0,g.jsx)(ev.Qr,{control:w,name:"zipCode",render:o=>{var u;let{field:d}=o;return(0,g.jsx)(tT,{...d,type:"text",errorMessage:(null===(u=j.zipCode)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"town",children:[(0,g.jsx)(Label,{children:S("superhog.form.town")}),(0,g.jsx)(ev.Qr,{control:w,name:"town",render:o=>{var u;let{field:d}=o;return(0,g.jsx)(tT,{...d,type:"text",errorMessage:(null===(u=j.town)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),isRequired:!0})}})]}),(0,g.jsxs)("div",{className:"county",children:[(0,g.jsx)(Label,{children:S("superhog.form.county")}),(0,g.jsx)(ev.Qr,{control:w,name:"county",render:o=>{var u;let{field:d}=o;return(0,g.jsx)(tT,{...d,type:"text",errorMessage:(null===(u=j.county)||void 0===u?void 0:u.message)&&S("guestForm.table.messages.requiredField"),isRequired:!0})}})]})]})};function DragContainer_styles_templateObject(){let o=(0,P._)(["\n  border: 1px dashed ",";\n  border-radius: ",";\n  background-color: ",";\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: ",";\n  row-gap: ",";\n  margin-bottom: ",";\n  width: 600px;\n  max-width: 100%;\n  height: 230px;\n\n  svg {\n    color: ",";\n  }\n\n  @media "," {\n    width: 100%;\n  }\n\n  &:hover {\n    background-color: ",";\n  }\n\n  &.dragging {\n    border-width: 2px;\n    background-color: ",";\n  }\n"]);return DragContainer_styles_templateObject=function(){return o},o}let nr="#2d747108",ni=D.ZP.div.withConfig({componentId:"sc-6ed7485-0"})(DragContainer_styles_templateObject(),o=>{let{theme:u}=o;return u.colors.grey3},o=>{let{theme:u}=o;return u.radii.xx_large},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.colors.primary},Z.Hb.tablet,nr,nr),no=[".png",".jpeg",".jpg"],DragContainer=o=>{let{setImageSrc:u,setFileName:d,children:m,onMouseEnter:p,onMouseLeave:y}=o,{t:x}=(0,b.$G)(),[v,_]=(0,h.useState)(!1),handleDrop=async o=>{o.preventDefault(),o.stopPropagation();let{files:m}=o.dataTransfer,p=m[0];if(1<m.length){(0,eN.c0)({message:x("guest:superhog.fileQuantityWarning"),type:"error"});return}if(!no.some(o=>null==p?void 0:p.name.toLowerCase().endsWith(o.toLowerCase()))){(0,eN.c0)({message:x("guest:superhog.fileFormatWarning",{formats:no.join(", ")}),type:"error"});return}let g=getBase64SizeInMb(p);if(g>1.5){(0,eN.c0)({message:x("guest:superhog.photoSizeLimit",{limit:1.5}),type:"error"});return}let h=await getBase64(p);u(h),d(p.name)};return(0,g.jsx)(ni,{onDrop:handleDrop,onDragEnter:o=>{o.preventDefault(),o.stopPropagation(),_(!0)},onDragLeave:o=>{o.preventDefault(),o.stopPropagation(),_(!1)},onDragOver:o=>{o.preventDefault(),o.stopPropagation(),o.dataTransfer.dropEffect="copy",_(!0)},onMouseEnter:p,onMouseLeave:y,className:v?"dragging":"",children:m})};function FileUploadButton_styles_templateObject(){let o=(0,P._)(["\n  background-color: transparent;\n  border: 1px solid ",";\n  color: ",";\n  border-radius: ",";\n  font-size: ",";\n  opacity: 1;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  min-height: 35px;\n  font-size: ",";\n  padding: ",";\n  cursor: pointer;\n  text-align: center;\n\n  &:hover {\n    opacity: 1;\n    background-color: ",";\n\n    p {\n      color: ",";\n    }\n  }\n"]);return FileUploadButton_styles_templateObject=function(){return o},o}let na=D.ZP.label.withConfig({componentId:"sc-4b9eed8c-0"})(FileUploadButton_styles_templateObject(),o=>{let{theme:u}=o;return u.colors.black},o=>{let{theme:u}=o;return u.colors.black},o=>{let{theme:u}=o;return u.radii.xx_large},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return"".concat(u.spacing.small," ").concat(u.spacing.large)},o=>{let{theme:u}=o;return u.colors.black},o=>{let{theme:u}=o;return u.colors.white}),FileUploadButton=o=>{let{setFileBase64:u,setFileName:d,fileBrowserBtnId:m=""}=o,{t:p}=(0,b.$G)(),onChangeImage=async o=>{var m;let g=Array.from((null===(m=o.target)||void 0===m?void 0:m.files)||[]),h=g[0],b=await getBase64(h),y=getBase64SizeInMb(h);y>1.5?(0,eN.c0)({message:p("guest:superhog.photoSizeLimit",{limit:1.5}),type:"error"}):(u(b),d(h.name))};return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("input",{id:m||"actual-btn",type:"file",accept:"image/*",onChange:onChangeImage,hidden:!0}),(0,g.jsx)(na,{htmlFor:m||"actual-btn",children:(0,g.jsx)(w.x,{children:p("guest:superhog.form.browseFile")})})]})};var nl=d(64970),ns=d.n(nl);
1function CameraField_styles_templateObject(){let o=(0,P._)(["\n  background-color: ",";\n  border-radius: ",";\n  box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px,\n    hsl(206 22% 7% / 20%) 0px 10px 20px -15px;\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  width: 90vw;\n  max-width: 600px;\n  max-height: 95vh;\n  z-index: 1000;\n"]);return CameraField_styles_templateObject=function(){return o},o}function CameraField_styles_templateObject1(){let o=(0,P._)(["\n  width: 100%;\n  height: 60px;\n  background-color: ",";\n  color: ",";\n  font-size: ",";\n  font-weight: ",";\n  display: flex;\n  justify-content: center;\n  align-items: center;\n"]);return CameraField_styles_templateObject1=function(){return o},o}function CameraField_styles_templateObject2(){let o=(0,P._)(["\n          background: "," 0% 0% no-repeat padding-box;\n\n          p,\n          h4 {\n            color: ",";\n          }\n        "]);return CameraField_styles_templateObject2=function(){return o},o}function CameraField_styles_templateObject3(){let o=(0,P._)(["\n          button {\n            border-color: ",";\n\n            svg {\n              color: ",";\n            }\n          }\n        "]);return CameraField_styles_templateObject3=function(){return o},o}function CameraField_styles_templateObject4(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  align-items: center;\n  flex-direction: column;\n  background: "," 0% 0% no-repeat padding-box;\n  padding: ",";\n\n  h4 {\n    font-size: ",";\n    margin-bottom: ",";\n  }\n\n  p {\n    font-size: ",";\n    margin-bottom: ",";\n    max-width: 350px;\n    text-align: center;\n  }\n\n  video {\n    max-width: 80vw;\n    border: 1px dashed ",";\n  }\n\n  img {\n    max-width: 80vw;\n    height: auto;\n    max-height: 50vh;\n  }\n\n  p,\n  h4 {\n    color: ",";\n  }\n\n  ",";\n"]);return CameraField_styles_templateObject4=function(){return o},o}function CameraField_styles_templateObject5(){let o=(0,P._)(["\n  margin-top: ",";\n  padding: ",";\n  border-radius: 50%;\n  width: 48px;\n  height: 48px;\n  border: 1px solid ",";\n"]);return CameraField_styles_templateObject5=function(){return o},o}function CameraField_styles_templateObject6(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: ",";\n  column-gap: ",";\n  margin-top: ",";\n\n  button {\n    min-height: 35px;\n    font-size: ",";\n    padding: ",";\n    border: 1px solid ",";\n\n    &.redo {\n      color: ",";\n    }\n  }\n"]);return CameraField_styles_templateObject6=function(){return o},o}function CameraField_styles_templateObject7(){let o=(0,P._)(["\n  pointer-events: none;\n"]);return CameraField_styles_templateObject7=function(){return o},o}let nc="#2b2c2e",nu=(0,D.ZP)(ez.VY).withConfig({componentId:"sc-f5a4cc92-0"})(CameraField_styles_templateObject(),o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.radii.small}),nd=D.ZP.div.withConfig({componentId:"sc-f5a4cc92-1"})(CameraField_styles_templateObject1(),nc,o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.weights.medium}),nm=D.ZP.div.withConfig({componentId:"sc-f5a4cc92-2"})(CameraField_styles_templateObject4(),nc,o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.colors.white},o=>{let{imgSrc:u,theme:d}=o;return u?(0,D.iv)(CameraField_styles_templateObject2(),d.colors.white,nc):(0,D.iv)(CameraField_styles_templateObject3(),d.colors.white,d.colors.white)}),np=D.ZP.button.withConfig({componentId:"sc-f5a4cc92-3"})(CameraField_styles_templateObject5(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.small},nc),ng=D.ZP.div.withConfig({componentId:"sc-f5a4cc92-4"})(CameraField_styles_templateObject6(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return"".concat(u.spacing.small," ").concat(u.spacing.large)},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.primary}),nf=(0,D.ZP)(z()).withConfig({componentId:"sc-f5a4cc92-5"}
1)(CameraField_styles_templateObject7()),CameraField=o=>{let{trigger:u,imgSrc:d,setImgSrc:m,title:p,subtitle:y,description:x}=o,{t:v}=(0,b.$G)(),_=(0,h.useRef)(null);return(0,g.jsx)(eR.V,{trigger:u,content:(0,g.jsxs)(nu,{children:[(0,g.jsx)(nd,{children:p}),(0,g.jsxs)(eE.T,{children:[(0,g.jsx)(ez.$N,{children:p}),(0,g.jsx)(ez.Be,{children:x})]}),(0,g.jsxs)(nm,{imgSrc:d,children:[y&&(0,g.jsx)("h4",{children:y}),x&&(0,g.jsx)("p",{children:x}),d?(0,g.jsx)(nf,{width:500,height:375,src:d,alt:"webcam"}):(0,g.jsx)(ns(),{audio:!1,mirrored:!0,screenshotFormat:"image/jpeg",width:500,ref:_,videoConstraints:{width:500}}),d?(0,g.jsxs)(ng,{children:[(0,g.jsx)(eq.z,{className:"redo",variant:"outlined",text:v("common:redo"),onClick:()=>m(null)}),(0,g.jsx)(ez.GG,{asChild:!0,children:(0,g.jsx)(eq.z,{variant:"secondary",text:v("common:confirm")})})]}):(0,g.jsx)(np,{onClick:()=>{var o;let u=null===(o=_.current)||void 0===o?void 0:o.getScreenshot();m(u||null)},children:(0,g.jsx)(C.P.Camera,{size:24})})]})]})})};function Upload_styles_templateObject(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  width: 100%;\n"]);return Upload_styles_templateObject=function(){return o},o}function Upload_styles_templateObject1(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  column-gap: ",";\n\n  button {\n    min-height: 35px;\n    padding: ",";\n\n    &:hover {\n      opacity: 1;\n      background-color: ",";\n\n      p {\n        color: ",";\n      }\n    }\n  }\n"]);return Upload_styles_templateObject1=function(){return o},o}function Upload_styles_templateObject2(){let o=(0,P._)(["\n  font-size: ",";\n  display: flex;\n  align-items: center;\n  gap: ",";\n  margin-bottom: ",";\n\n  .close {\n    cursor: pointer;\n\n    &:hover {\n      opacity: 0.7;\n    }\n  }\n"]);return Upload_styles_templateObject2=function(){return o},o}function Upload_styles_templateObject3(){let o=(0,P._)(["\n  width: 50px;\n  height: 50px;\n  background-image: ",";\n  background-size: contain;\n  background-position-x: center;\n  background-position-y: center;\n  background-repeat: no-repeat;\n"]);return Upload_styles_templateObject3=function(){return o},o}let nh=D.ZP.div.withConfig({componentId:"sc-e6c580cf-0"})(Upload_styles_templateObject()),nb=D.ZP.div.withConfig({componentId:"sc-e6c580cf-1"})(Upload_styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return"".concat(u.spacing.small," ").concat(u.spacing.large)},o=>{let{theme:u}=o;return u.colors.black},o=>{let{theme:u}=o;return u.colors.white}),ny=D.ZP.p.withConfig({componentId:"sc-e6c580cf-2"})(Upload_styles_templateObject2(),o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.small}),nx=D.ZP.div.withConfig({componentId:"sc-e6c580cf-3"})(Upload_styles_templateObject3(),o=>{let{src:u}=o;return"url(".concat(u,")")}),Upload=o=>{let{fileName:u,image:d,onSetFilename:m,onSetImage:p,error:y,icon:x,title:v,fileBrowserBtnId:_}=o,{t:j}=(0,b.$G)(),[I,S]=(0,h.useState)(x);return(0,g.jsxs)(nh,{children:[(0,g.jsxs)(DragContainer,{setImageSrc:p,setFileName:m,onMouseEnter:()=>{S("".concat(x,"-hover"))},onMouseLeave:()=>{S(x)},children:[(0,g.jsx)(nx,{src:"".concat(tp.Mx,"/imgs/guests/").concat(I,".png")}),(0,g.jsx)(w.x,{children:v}),(0,g.jsx)(w.x,{children:j("guest:superhog.form.or")}),(0,g.jsxs)(nb,{children:[(0,g.jsx)(FileUploadButton,{setFileBase64:p,setFileName:m,fileBrowserBtnId:_}),(0,g.jsx)(CameraField,{imgSrc:d,setImgSrc:o=>{p(o),m(o?j("guest:superhog.photoTaken"):null)},title:j("guest:superhog.steps.uploadSelfie"),subtitle:j("guest:superhog.captureSelfie"),description:j("guest:superhog.captureSelfieDescription"),trigger:(0,g.jsx)(eq.z,{variant:"outlined",text:(0,g.jsx)(w.x,{children:j("guest:superhog.form.takePicture")})})})]})]}),u&&(0,g.jsxs)(ny,{children:[(0,g.jsx)(C.P.File,{size:20}),(0,g.jsx)(O.D,{children:u}),(0,g.jsx)(C.P.CloseFilled,{size:16,className:"close",onClick:()=>{p(null),m(null)}})]}),y&&(0,g.jsx)(ew.B,{message:y})]})};
1function Step2_styles_templateObject(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  align-items: center;\n  margin: "," 0;\n"]);return Step2_styles_templateObject=function(){return o},o}function Step2_styles_templateObject1(){let o=(0,P._)(["\n  display: flex;\n\n  > h3:last-of-type {\n    margin-left: ",";\n    color: ",";\n    text-decoration: underline;\n    cursor: pointer;\n    transition: ",";\n\n    &:hover {\n      opacity: 0.8;\n    }\n  }\n"]);return Step2_styles_templateObject1=function(){return o},o}function Step2_styles_templateObject2(){let o=(0,P._)(["\n  width: 35px;\n  height: 35px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  text-align: center;\n  background-color: ",";\n  border-radius: 100%;\n  color: ",";\n  font-size: ",";\n  font-weight: ",";\n  margin-right: ",";\n"]);return Step2_styles_templateObject2=function(){return o},o}let nv=D.ZP.div.withConfig({componentId:"sc-8c774610-0"})(Step2_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.medium}),n_=D.ZP.div.withConfig({componentId:"sc-8c774610-1"})(Step2_styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.x_small},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.transitions.regular}),nj=D.ZP.div.withConfig({componentId:"sc-8c774610-2"})(Step2_styles_templateObject2(),o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.weights.medium},o=>{let{theme:u}=o;return u.spacing.medium}),Step2=o=>{let{errorId:u,errorSelfie:d,setErrorId:m,setErrorSelfie:p,setCurrentHelpTopic:h}=o,{t:y}=(0,b.$G)(),{mainGuest:x,setMainGuest:v}=(0,S.J)(o=>({mainGuest:o.mainGuest,setMainGuest:o.setMainGuest}),j.X);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(nv,{children:[(0,g.jsx)(nj,{children:"1"}),(0,g.jsxs)(n_,{children:[(0,g.jsx)($.Q,{children:y("guest:guestForm.editMode.superhog.uploadYourId")}),(0,g.jsx)($.Q,{onClick:()=>h({currentTopic:"document",isOpen:!0}),children:y("guest:guestForm.editMode.superhog.instructions")})]})]}),(0,g.jsx)(Upload,{icon:"upload_icon",title:y("guest:superhog.form.dragID"),fileName:x.governmentIdFilename,image:x.governmentIdBase64,onSetImage:o=>{v({governmentIdBase64:null!=o?o:void 0}),o&&m("")},onSetFilename:o=>{v({governmentIdFilename:null!=o?o:void 0})},error:u,fileBrowserBtnId:"id-upload"}),(0,g.jsxs)(nv,{children:[(0,g.jsx)(nj,{children:"2"}),(0,g.jsxs)(n_,{children:[(0,g.jsx)($.Q,{children:y("guest:guestForm.editMode.superhog.uploadYourSelfie")}),(0,g.jsx)($.Q,{onClick:()=>h({currentTopic:"selfie",isOpen:!0}),children:y("guest:guestForm.editMode.superhog.instructions")})]})]}),(0,g.jsx)(Upload,{icon:"photo_icon",title:y("guest:superhog.form.dragSelfie"),fileName:x.selfieFilename,image:x.selfieBase64,onSetImage:o=>{v({selfieBase64:null!=o?o:void 0}),o&&p("")},onSetFilename:o=>{v({selfieFilename:null!=o?o:void 0})},error:d,fileBrowserBtnId:"selfie-upload"})]})};function GuestSuperhogEditDrawer_styles_templateObject(){let o=(0,P._)(["\n  width: 120px;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: space-between;\n  margin: 0 auto;\n"]);return GuestSuperhogEditDrawer_styles_templateObject=function(){return o},o}function GuestSuperhogEditDrawer_styles_templateObject1(){let o=(0,P._)(["\n  width: 14px;\n  height: 14px;\n  border: 1px solid ",";\n  border-radius: 100%;\n\n  background-color: ",";\n"]);return GuestSuperhogEditDrawer_styles_templateObject1=function(){return o},o}function GuestSuperhogEditDrawer_styles_templateObject2(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  border-radius: ",";\n  border: 1px solid #ebebeb;\n  background-color: #fafafa;\n  padding: ",";\n  margin: ",";\n\n  > div {\n    img {\n      margin-bottom: ",";\n    }\n  }\n\n  @media "," {\n    flex-direction: column;\n    align-items: flex-start;\n    gap: ",";\n\n    > div {\n      width: 100%;\n    }\n  }\n"]);return GuestSuperhogEditDrawer_styles_templateObject2=function(){return o},o}
1function GuestSuperhogEditDrawer_styles_templateObject3(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  font-size: ",";\n  font-weight: ",";\n\n  a {\n    color: ",";\n    font-family: inherit;\n    font-size: inherit;\n  }\n\n  .disclaimer {\n    color: ",";\n    margin-top: ",";\n  }\n"]);return GuestSuperhogEditDrawer_styles_templateObject3=function(){return o},o}function GuestSuperhogEditDrawer_styles_templateObject4(){let o=(0,P._)(["\n  background-color: ",";\n  min-width: 18px;\n  min-height: 18px;\n  width: 18px;\n  height: 18px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border-radius: ",";\n  border: 1px solid\n    ",";\n  margin-right: ",";\n\n  &[data-state='checked'] {\n    background-color: ",";\n  }\n\n  &:hover {\n    border-color: ",";\n  }\n"]);return GuestSuperhogEditDrawer_styles_templateObject4=function(){return o},o}function GuestSuperhogEditDrawer_styles_templateObject5(){let o=(0,P._)(["\n  color: ",";\n"]);return GuestSuperhogEditDrawer_styles_templateObject5=function(){return o},o}let nw=D.ZP.div.withConfig({componentId:"sc-6ddccef9-0"})(GuestSuperhogEditDrawer_styles_templateObject()),nO=D.ZP.div.withConfig({componentId:"sc-6ddccef9-1"})(GuestSuperhogEditDrawer_styles_templateObject1(),o=>{let{theme:u}=o;return u.colors.black},o=>{let{theme:u,isActive:d}=o;return d?u.colors.black:u.colors.white}),nC=D.ZP.div.withConfig({componentId:"sc-6ddccef9-2"})(GuestSuperhogEditDrawer_styles_templateObject2(),o=>{let{theme:u}=o;return u.radii.medium},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return"".concat(u.spacing.large," 0  ").concat(u.spacing.x_large," 0")},o=>{let{theme:u}=o;return u.spacing.small},Z.Hb.tablet,o=>{let{theme:u}=o;return u.spacing.medium}),nI=D.ZP.div.withConfig({componentId:"sc-6ddccef9-3"})(GuestSuperhogEditDrawer_styles_templateObject3(),o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.weights.medium},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.danger},o=>{let{theme:u}=o;return u.spacing.x_small}),nS=(0,D.ZP)(eX.fC).withConfig({componentId:"sc-6ddccef9-4"})(GuestSuperhogEditDrawer_styles_templateObject4(),o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.radii.small},o=>{let{theme:u,$isError:d}=o;return d?u.colors.danger:u.colors.grey2},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.colors.black},o=>{let{theme:u}=o;return u.colors.primary}),nk=(0,D.ZP)(eX.z$).withConfig({componentId:"sc-6ddccef9-5"})(GuestSuperhogEditDrawer_styles_templateObject5(),o=>{let{theme:u}=o;return u.colors.white}),nP=[{step:1,active:!0},{step:2,active:!1},{step:3,active:!1}],nD=[{step:1,active:!1},{step:2,active:!0},{step:3,active:!1}],nF=[{step:1,active:!1},{step:2,active:!1},{step:3,active:!0}],formaDateString=o=>{if(!o)return"";let u=/^\d{2}\/\d{2}\/\d{4}$/.test(o);return u?(0,en.default)((0,tG.default)(o,"dd/MM/yyyy",new Date),"yyyy-MM-dd"):o};(m=p||(p={}))[m.Form=1]="Form",m[m.UploadImages=2]="UploadImages",m[m.Submit=3]="Submit";let GuestSuperhogEditDrawer=o=>{var u,d,m,p,y;let{isEditModeOn:x,onClose:v,guest:_,guests:O,documentTypesList:I,countriesList:S}=o,{t:k}=(0,b.$G)("guest"),P=(0,ey.X)(),D=(0,h.useRef)(!1),F=(0,td.e)(o=>o.setIsUpdateSuccess),{mutate:N,isError:T,isSuccess:M}=useUpdateGuestMutation(),{mainGuest:E,checkIn:R,checkOut:G,setMainGuest:B,setSuperhogData:A}=(0,td.J)(o=>({mainGuest:o.mainGuest,checkIn:o.bookingInfo.checkIn,checkOut:o.bookingInfo.checkOut,setMainGuest:o.setMainGuest,setSuperhogData:o.setSuperhogData}),j.X),Z=(0,tm.BH)(),U={name:_.name||"",dateOfBirth:_.dateOfBirth||"",idDocumentNumber:_.idDocumentNumber||"",surname:_.surname||"",idDocumentType:_.idDocumentType&&(null===(u=I.find(o=>o.value===_.idDocumentType))||void 0===u?void 0:u.value)||"",idDocumentIssuerCountryIdRef:_.addressCountryIdRef&&(null===(d=S.find(o=>o.value===_.idDocumentIssuerCountryIdRef))||void 0===d?void 0:d.value)||"",nationalityCountryIdRef:_.nationalityCountryIdRef&&(null===(m=S.find(o=>o.value===_.nationalityCountryIdRef))||void 0===m?void 0:m.value)||"",addressCountryIdRef:_.addressCountryIdRef&&(null===(p=S.find(o=>o.value===_.addressCountryIdRef))||void 0===p?void 0:p.value)||"",phoneType:_.phoneType&&(null===(y=Z.find(o=>o.value===String(null==_?void 0:_.phoneType)))||void 0===y?void 0:y.value)||"",entryDate:_.entryDate||"",exitDate:_.exitDate||"",county:_.county||"",town:_.city||"",email:_.secondaryEmail||"",address:_.address||"",zipCode:_.zipCode||"",phoneCode:_.phoneCode||"",phoneCountryId:E.phoneCountryId||"",normalizedNationalPhoneNumber:E.normalizedNationalPhoneNumber||""},V=createGuestSuperhogEditFormSchema(U.entryDate||(0,en.default)((0,W.default)(R),"dd/MM/yyyy"),U.exitDate||(0,en.default)((0,W.default)(G),"dd/MM/yyyy")),{register:L,control:H,handleSubmit:q,formState:{errors:Q},reset:K,getValues:J,setValue:X,setError:Y}=(0,ev.cI)({resolver:(0,e_.F)(V),defaultValues:U}),ee="truvi"===E.aptGuestVerificationType,[et,er]=(0,h.useState)(nP),[ei,eo]=(0,h.useState)(U),[ea,el]=(0,h.useState)(!0),[es,ec]=(0,h.useState)({currentTopic:null,isOpen:!1}),[eu,ed]=(0,h.useState)(!1),[em,ep]=(0,h.useState)(""),[eg,ef]=(0,h.useState)(""),eh=et.find(o=>o.active),ex=(0,h.useCallback)((o,u,d)=>{X("normalizedNationalPhoneNumber",o),X("phoneCode",u),X("phoneCountryId",d)},[X]),ej=(0,h.useCallback)(()=>{let o=J();eo(o)},[J]),isGuestDocumentDuplicated=(o,u)=>O.filter(o=>{let{guestId:u}=o;return u!==_.guestId}).some(d=>{let{idDocumentNumber:m,idDocumentType:p}=d;return m===o&&p===u}),ew=(0,h.useMemo)(()=>o=>{let{normalizedNationalPhoneNumber:u,countryCode:d,phoneCountryId:m}=o;ex(u,d,m)},[ex]),onCancel=()=>{K(U),eo(U),v()},handleStepUpload=()=>{D.current||(D.current=!0,eb.f.IdentityVerificationStarted(P)),ee?handleSubmitStep():er(nD)},handleSubmitStepWithData=async o=>{var u,d,m,p,g,h;if(isGuestDocumentDuplicated(o.idDocumentNumber,o.idDocumentType)){Y("idDocumentNumber",{type:"custom",message:k("guest:guestForm.table.messages.duplicateDocumentNumber")});return}if(!ee&&(o.governmentIdBase64||ep(k("guest:superhog.documentRequired")),o.selfieBase64||ef(k("guest:superhog.selfieRequired")),!o.governmentIdBase64||!o.selfieBase64))return;if(!ea){ed(!0);return}let b={...o,governmentIdBase64:null!==(u=o.governmentIdBase64)&&void 0!==u?u:void 0,selfieBase64:null!==(d=o.selfieBase64)&&void 0!==d?d:void 0,addressLine1:o.address,...ee?{}:{selfieContentType:extractBase64ImageType(o.selfieBase64),selfieBase64:extractBase64Image(o.selfieBase64)||void 0,governmentIdContentType:extractBase64ImageType(o.governmentIdBase64),governmentIdBase64:extractBase64Image(o.governmentIdBase64)||void 0},telephoneNumber:"+".concat(o.phoneCode).concat(o.normalizedNationalPhoneNumber),telep
1honeType:o.phoneType,phoneNumber:"+".concat(o.phoneCode).concat(o.normalizedNationalPhoneNumber),telephoneCode:o.phoneCode,postcode:o.zipCode,termsAccepted:ea,dateOfBirth:formaDateString(o.dateOfBirth),entryDate:formaDateString(o.entryDate),exitDate:formaDateString(o.exitDate),addressCountryIdRef:o.addressCountryIdRef,idDocumentIssuerCountryIdRef:o.idDocumentIssuerCountryIdRef,idDocumentNumber:o.idDocumentNumber,idDocumentType:o.idDocumentType,nationalityCountryIdRef:o.nationalityCountryIdRef};A(o.bookingIdRef,{selfieBase64:null!==(m=o.selfieBase64)&&void 0!==m?m:void 0,selfieFilename:null!==(p=o.selfieFilename)&&void 0!==p?p:void 0,governmentIdBase64:null!==(g=o.governmentIdBase64)&&void 0!==g?g:void 0,governmentIdFilename:null!==(h=o.governmentIdFilename)&&void 0!==h?h:void 0}),N(b,{onSuccess:()=>{eb.f.IdentityVerificationSubmitted(P),er(nP),v()}}),er(nF)},handleSubmitStep=async()=>handleSubmitStepWithData(E),onSubmit=o=>{if(isGuestDocumentDuplicated(o.idDocumentNumber,o.idDocumentType)){Y("idDocumentNumber",{type:"custom",message:k("guest:guestForm.table.messages.duplicateDocumentNumber")});return}ej();let u={...E,...o,phoneNumber:"".concat(o.phoneCode).concat(o.normalizedNationalPhoneNumber),phoneType:Number(o.phoneType)};B(u),ee?handleSubmitStepWithData(u):handleStepUpload()};return(0,h.useEffect)(()=>{if((null==eh?void 0:eh.step)===3&&T)return er(nP),ej()},[eh,T]),(0,h.useEffect)(()=>{eu&&ea&&ed(!1)},[eu,ea]),(0,h.useEffect)(()=>{if(M){var o;F(_.guestId,null!==(o=ei.name)&&void 0!==o?o:"")}},[M]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Drawer,{isOpen:x,onClose:onCancel,onCancel:(null==eh?void 0:eh.step)===1?onCancel:()=>{er(nP)},onConfirm:()=>{if(2===eh.step)return handleSubmitStep();ej(),q(onSubmit)()},headerContent:ee?null:(0,g.jsx)(()=>(0,g.jsx)(nw,{children:et.map(o=>{let{step:u,active:d}=o;return(0,g.jsx)(nO,{isActive:d},u)})}),{}),additionalFooterContent:(0,g.jsx)(()=>(0,g.jsxs)(nI,{children:[(0,g.jsx)(nS,{"data-testid":"termsAndCondition",id:"termsAndCondition",checked:ea,$isError:eu,onCheckedChange:o=>el(!!o),children:(0,g.jsx)(nk,{children:(0,g.jsx)(C.P.Check,{size:16})})}),(0,g.jsxs)("div",{children:[(0,g.jsx)(b.cC,{i18nKey:"guest:guestForm.editMode.superhog.termsAndConditions",components:{p:(0,g.jsx)(w.x,{}),text:(0,g.jsx)("a",{href:"https://superhog.com/privacy-policy/",target:"_blank"})}}),eu&&(0,g.jsx)(w.x,{dataTestId:"disclaimer",className:"disclaimer",children:k("guestForm.editMode.superhog.termsAndConditionsDisclaimer")})]})]}),{}),showLoadingScreen:(null==eh?void 0:eh.step)===3,isConfirmButtonDisabled:(null==eh?void 0:eh.step)===2&&(0,tm.US)(_),showHeader:!0,content:(0,g.jsxs)(g.Fragment,{children:[(null==eh?void 0:eh.step)!==3&&(0,g.jsx)(()=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{children:[(0,g.jsx)($.Q,{children:k("guestForm.editMode.superhog.title")}),(0,g.jsx)(w.x,{children:k("guestForm.editMode.description")})]}),(0,g.jsx)(nC,{children:(0,g.jsxs)("div",{children:[(0,g.jsx)(z(),{src:"".concat(tp.Mx,"/logos/truvi-logo.png"),width:60,height:22,alt:"superhog"}),(0,g.jsx)(w.x,{children:k("guestForm.editMode.superhog.description")})]})})]}),{}),(null==eh?void 0:eh.step)===1&&(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(Step1,{handleSubmit:q,onSubmit:onSubmit,documentTypesList:I,defaultValues:U,unSubmittedValues:ei,getUnSubmittedValues:ej,errors:Q,control:H,handlePhoneNumberChange:ew,register:L})}),(null==eh?void 0:eh.step)===2&&(0,g.jsx)(Step2,{errorId:em,setErrorId:ep,errorSelfie:eg,setErrorSelfie:ef,setCurrentHelpTopic:ec}),(null==eh?void 0:eh.step)===3&&(0,g.jsx)(LoadingScreen,{})]}),leftBtnText:eh&&1===eh.step?k("guestForm.editMode.cancel"):k("guestForm.editMode.previous"),rightBtnText:eh&&2!==eh.step&&!ee?k("guestForm.editMode.next"):k("guestForm.editMode.submit")}),(0,g.jsx)(HelpTopicsDrawer,{isOpen:es.isOpen,onClose:()=>ec({currentTopic:null,isOpen:!1}),currentTopic:es.currentTopic})]})},DesktopTable=o=>{let{guest:u,isGuestNotFilled:d,countries:m,RenderActions:p,bookingInfo:h}=o,{t:y}=(0,b.$G)("guest"),x=(0,D.Fg)(),{isUpdateSuccess:v,guestId:_,guestName:O}=(0,td.e)(o=>({isUpdateSuccess:o.isUpdateSuccess,guestId:o.guestId,guestName:o.guestName}),j.X),I=u.isMainGuest,S=!d(u)&&(0,tm.fk)(u)&&(0,tm.US)(u)&&(0,tm.SF)(h),k=I?S:!d(u),P=(u.name===O||u.guestId===_)&&v;return(0,g.jsxs)(tS,{isUpdateSuccess:P,children:[(0,g.jsx)("td",{className:"name",children:(0,g.jsx)(tk,{children:(0,g.jsxs)("div",{className:"item",children:[(0,g.jsxs)($.Q,{children:[u.isMainGuest?(0,g.jsx)(()=>(0,g.jsx)(el.K,{position:"absolute",side:"right",trigger:(0,g.jsx)(C.P.Star,{color:"#1F3A96"}),content:y("guestForm.table.fields.mainGuest"),customStyles:{backgroundColor:"#1F3A96",fontWeight:x.weights.medium,color:x.colors.white}}),{}):null,y("guestForm.table.fields.name")]}),(0,g.jsx)(w.x,{children:u.name})]})})}),(0,g.jsx)("td",{className:"surname",children:(0,g.jsx)(tk,{children:(0,g.jsxs)("div",{className:"item",children:[(0,g.jsx)($.Q,{children:y("guestForm.table.fields.surname")}),(0,g.jsx)(w.x,{children:u.surname})]})})}),(0,g.jsx)("td",{className:"dates",children:(0,g.jsx)(tk,{children:(0,g.jsxs)("div",{className:"item",children:[(0,g.jsx)($.Q,{children:y("guestForm.table.fields.birth")}),(0,g.jsx)(w.x,{children:u.dateOfBirth})]})})}),(0,g.jsx)("td",{className:"country",children:(0,g.jsx)(tk,{children:(0,g.jsxs)("div",{className:"item",children:[(0,g.jsx)($.Q,{children:y("guestForm.table.fields.nationality")}),(0,g.jsx)(w.x,{children:u.nationalityCountryIdRef?m[u.nationalityCountryIdRef]:"-"})]})})}),(0,g.jsx)("td",{className:"status",children:(0,g.jsx)(tk,{children:(0,g.jsxs)("div",{className:"double-item",children:[k?(0,g.jsx)(tD,{"data-testid":"complete"}):(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(el.K,{side:"bottom",trigger:(0,g.jsx)(tF,{"data-testid":"incomplete"}),content:(0,g.jsx)("div",{children:!I||d(u)?y("guest:guestForm.table.messages.guestIncomplete"):(0,tm.A9)(u)?y("guest:guestForm.table.messages.superhogUnderReview"):(0,tm.fk)(u)?!I||(0,tm.US)(u)&&(0,tm.SF)(h)?void 0:y("guest:guestForm.table.messages.superhogUnapproved"):y("guest:guestForm.table.messages.superhogIncomplete")}
1)})}),(0,g.jsx)(p,{guest:u})]})})})]},u.guestId)},TabletTable=o=>{let{guest:u,isGuestNotFilled:d,RenderActions:m,bookingInfo:p}=o,{t:h}=(0,b.$G)("guest"),y=(0,D.Fg)(),{isUpdateSuccess:x,guestId:v,guestName:_}=(0,td.e)(o=>({isUpdateSuccess:o.isUpdateSuccess,guestId:o.guestId,guestName:o.guestName}),j.X),O=u.isMainGuest,I=!d(u)&&(0,tm.fk)(u)&&(0,tm.US)(u)&&(0,tm.SF)(p),S=O?I:!d(u),k=(u.name===_||u.guestId===v)&&x;return(0,g.jsxs)(tS,{isUpdateSuccess:k,children:[(0,g.jsx)("td",{children:(0,g.jsx)(tk,{children:(0,g.jsxs)("div",{className:"item",children:[(0,g.jsxs)("div",{style:{position:"relative"},children:[(0,g.jsxs)($.Q,{children:[u.isMainGuest?(0,g.jsx)(()=>(0,g.jsx)(el.K,{position:"absolute",side:"right",trigger:(0,g.jsx)(C.P.Star,{color:"#1F3A96"}),content:h("guestForm.table.fields.mainGuest"),customStyles:{backgroundColor:"#1F3A96",fontWeight:y.weights.medium,color:y.colors.white,left:"10px"}}),{}):null,h("guestForm.table.fields.name")]}),(0,g.jsx)(w.x,{children:u.name?"".concat(u.name," ").concat(u.surname):"-"})]}),(0,g.jsx)(w.x,{className:"birthdate",children:u.dateOfBirth})]})})}),(0,g.jsx)("td",{className:"actions",children:(0,g.jsxs)(tk,{children:[(0,g.jsxs)("div",{children:[(0,g.jsxs)($.Q,{children:[h("common:status"),": "]}),S?(0,g.jsx)(tD,{}):(0,g.jsx)(el.K,{side:"bottom",trigger:(0,g.jsx)(tF,{}),content:(0,g.jsx)("div",{children:!O||d(u)?h("guest:guestForm.table.messages.guestIncomplete"):(0,tm.A9)(u)?h("guest:guestForm.table.messages.superhogUnderReview"):(0,tm.fk)(u)?!O||(0,tm.US)(u)&&(0,tm.SF)(p)?void 0:h("guest:guestForm.table.messages.superhogUnapproved"):h("guest:guestForm.table.messages.superhogIncomplete")}
1)})]}),(0,g.jsx)(m,{guest:u})]})})]},u.guestId)},GuestTable=o=>{var u;let{guests:d,isGuestsLoading:m}=o,{t:p,i18n:y}=(0,b.$G)("guest"),x=null!==(u=y.language)&&void 0!==u?u:"en",v=(0,ex.Z)("(max-width: 1220px)"),{bookingInfo:_,mainGuest:O,setStatus:C}=(0,S.J)(o=>({bookingInfo:o.bookingInfo,mainGuest:o.mainGuest,setStatus:o.setStatus}),j.X),[I,k]=(0,h.useState)({}),[P,D]=(0,h.useState)([]),[F,N]=(0,h.useState)([]),[T,M]=(0,h.useState)([]),[z,E]=(0,h.useState)(!1),[R,G]=(0,h.useState)({});(0,h.useEffect)(()=>{let o={},u=[],d=[];Object.values(ek.ki).forEach(d=>{let{id:m,nameEN:p,namePT:g,nameES:h,nameFR:b}=d,y={en:p,pt:g,es:h,fr:b};o[m]=y[x],u.push({label:y[x],value:m})}),Object.values(e9.u0).forEach(o=>{let{value:u,label:m}=o;d.push({value:u,label:p(m)})}),k(o),D(u),M(d)},[x,p]);let B=[p("guestForm.table.columns.name"),p("guestForm.table.columns.surname"),p("guestForm.table.columns.birthdate"),p("guestForm.table.columns.country"),p("guestForm.table.columns.status")],renderTableHeader=()=>!v&&(0,g.jsx)("thead",{children:(0,g.jsx)(tI,{children:B.map((o,u)=>(0,g.jsx)("th",{children:(0,g.jsx)(w.x,{children:o})},u))})}),onEditGuest=o=>{let{guest:u}=o;e7.Am.dismiss(),E(!0),G(u)},A={isGuestNotFilled:tm.Ge,countries:I,RenderActions:o=>{let{guest:u}=o;return(0,g.jsx)(tP,{children:(0,g.jsx)("button",{"data-testid":"edit",onClick:()=>onEditGuest({guest:u}),children:(0,g.jsx)(tN,{})})})},mainGuest:O,bookingInfo:_};return(0,h.useEffect)(()=>{let o=F.some(o=>o.isPendingGuest),u=(0,tm.PN)(d),m=!(0,tm.fk)(O),p=!(0,tm.US)(O)||!(0,tm.SF)(_);return o||u||m||p?C({bookingDetails:{isPendingGuest:"incomplete"}}):C({bookingDetails:{isPendingGuest:"complete"}})},[F,d,C,O]),(0,h.useEffect)(()=>{var o,u,m,p;if(_.isMultiRoomBooking&&_.bookingUnits){let u=_.bookingUnits.reduce((o,u)=>o+u.actualNumberOfGuests,0);if(null!==(o=null==_?void 0:_.numberOfGuests)&&void 0!==o?o:0<u){let o=[];_.bookingUnits.forEach(u=>{let m=d.filter(o=>o.bookingUnitId===u.bookingUnitId),p=u.actualNumberOfGuests-m.length;if(p>0)for(let d=0;d<p;d++){let m="temp-".concat(u.bookingUnitId,"-").concat(d);o.push((0,tm.FM)(_,u.bookingUnitId,m))}});let u=(0,tm.bA)(d);
1N([...u,...o])}}else if(null!==(u=null==_?void 0:_.numberOfGuests)&&void 0!==u?u:0<_.actualNumberOfGuests){let o=_.actualNumberOfGuests-d.length,u=[],g=null===(p=_.bookingUnits)||void 0===p?void 0:null===(m=p[0])||void 0===m?void 0:m.bookingUnitId;for(let d=0;d<o;d++)u.push((0,tm.FM)(_,g));let h=(0,tm.bA)(d);N([...h,...u])}},[_,d,O.isBookingSuperhog]),(0,h.useEffect)(()=>{z?document.body.style.overflowY="hidden":document.body.style.overflowY="scroll"},[z]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{children:(0,g.jsx)(tO,{children:(0,g.jsx)("fieldset",{disabled:m,children:_.isMultiRoomBooking&&_.bookingUnits?_.bookingUnits.map(o=>{let u=F.filter(u=>u.bookingUnitId===o.bookingUnitId),{title:d,subtitle:m}=(0,em.yh)(o,p,{isMultiRoomBooking:!0,bookingAddress:_.aptAddress});return(0,g.jsxs)(tM,{children:[(0,g.jsxs)(tz,{children:[(0,g.jsx)(tE,{children:d}),m&&(0,g.jsx)(ei.tF,{children:m})]}),(0,g.jsxs)(tC,{cellPadding:"0",cellSpacing:"0",children:[renderTableHeader(),(0,g.jsx)("tbody",{children:u.map((u,d)=>v?(0,g.jsx)(TabletTable,{guest:u,...A},"".concat(o.bookingUnitId,"-").concat(d)):(0,g.jsx)(DesktopTable,{guest:u,...A},"".concat(o.bookingUnitId,"-").concat(d)))})]})]},o.bookingUnitId)}):(0,g.jsxs)(tC,{cellPadding:"0",cellSpacing:"0",children:[renderTableHeader(),(0,g.jsx)("tbody",{children:F.map((o,u)=>v?(0,g.jsx)(TabletTable,{guest:o,...A},u):(0,g.jsx)(DesktopTable,{guest:o,...A},u))})]})})})}),z?R.isMainGuest&&O.isBookingSuperhog?(0,g.jsx)(GuestSuperhogEditDrawer,{isEditModeOn:z,onClose:()=>E(!1),guest:R,countriesList:P,documentTypesList:T,guests:d}):(0,g.jsx)(GuestEditDrawer,{isEditModeOn:z,onClose:()=>E(!1),guest:R,countriesList:P,documentTypesList:T,guests:d}):null]})};function GuestList_styles_templateObject(){let o=(0,P._)(["\n  .description {\n    margin-top: ",";\n    width: 70%;\n\n    @media "," {\n      width: 100%;\n    }\n  }\n"]);return GuestList_styles_templateObject=function(){return o},o}function GuestList_styles_templateObject1(){let o=(0,P._)(["\n  position: relative;\n  width: 100%;\n  display: flex;\n  align-items: flex-start;\n  justify-content: space-between;\n  margin-bottom: ",";\n"]);return GuestList_styles_templateObject1=function(){return o},o}function GuestList_styles_templateObject2(){let o=(0,P._)(["\n  display: flex;\n  justify-content: space-between;\n"]);return GuestList_styles_templateObject2=function(){return o},o}function GuestList_styles_templateObject3(){let o=(0,P._)(["\n  width: 18px;\n  height: 18px;\n  color: ",";\n"]);return GuestList_styles_templateObject3=function(){return o},o}function GuestList_styles_templateObject4(){let o=(0,P._)(["\n  width: 18px;\n  height: 18px;\n  color: ",";\n"]);return GuestList_styles_templateObject4=function(){return o},o}let nN=(0,D.ZP)(k.W).withConfig({componentId:"sc-3f753441-0"})(GuestList_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.x_small},Z.Hb.tablet),nT=D.ZP.div.withConfig({componentId:"sc-3f753441-1"})(GuestList_styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.medium}),nM=D.ZP.div.withConfig({componentId:"sc-3f753441-2"})(GuestList_styles_templateObject2()),nz=(0,D.ZP)(t_.KJd).withConfig({componentId:"sc-3f753441-3"})(GuestList_styles_templateObject3(),o=>{let{theme:u}=o;return u.colors.primary});(0,D.ZP)(tj.Sbn).withConfig({componentId:"sc-3f753441-4"})(GuestList_styles_templateObject4(),o=>{let{theme:u}=o;return u.colors.warning});let GuestList=o=>{let{isGuestsLoading:u}=o,{t:d}=(0,b.$G)(),{guests:m,mainGuest:p,bookingInfo:h,guestStatus:y}=(0,S.J)(o=>({guests:o.guests,mainGuest:o.mainGuest,bookingInfo:o.bookingInfo,guestStatus:o.status.bookingDetails.isPendingGuest}),j.X),calculateTotalGuests=()=>h.isMultiRoomBooking&&h.bookingUnits?h.bookingUnits.reduce((o,u)=>o+u.actualNumberOfGuests,0):h.actualNumberOfGuests;return(0,g.jsxs)(nN,{id:"guest-form",width:"calc(100% - 140px)",margin:"0 0 0 115px",children:[(0,g.jsx)(er.N,{sectionTitle:d("guest:guestForm.title"),sectionStatus:y,statusExtraInfo:"complete"===y?(0,g.jsx)(nz,{}):(0,g.jsx)(el.K,{trigger:(0,g.jsx)(e8.M,{status:y,completeIcon:(0,g.jsx)(nz,{}),incompleteIcon:(0,g.jsx)(e5.MN,{className:"Incomplete"===p.guestVerificationStatus?"underReview":""}),processingIcon:(0,g.jsx)(e5.MN,{className:"Incomplete"===p.guestVerificationStatus||"processing"===y?"underReview":""})}),content:(0,tm.PN)(m)||!p.isBookingSuperhog?d("guest:guestForm.table.messages.guestFormIncomplete"):(0,tm.fk)(p)?(0,tm.A9)(p)?d("guest:guestForm.table.messages.superhogUnderReview"):(0,tm.US)(p)?void 0:d("guest:guestForm.table.messages.superhogUnapproved"):d("guest:guestForm.table.messages.superhogIncomplete"),side:"bottom"}),showInfoPeek:!0}),(0,g.jsx)($.Q,{children:d("guest:guestForm.table.title")}),(0,g.jsxs)(nT,{children:[(0,g.jsx)(w.x,{className:"description",children:d("guest:guestForm.description")}),(0,g.jsx)(e6.z,{minWidth:Z.J7.tablet,children:(0,g.jsx)(w.x,{children:d("guest:guestForm.guestsTotal",{number:m.length,total:calculateTotalGuests()})})})]}),(0,g.jsx)(e6.z,{maxWidth:"767px",children:(0,g.jsxs)(nM,{children:[(0,g.jsx)($.Q,{children:d("guest:guestForm.table.subtitle")}),(0,g.jsx)(w.x,{children:d("guest:guestForm.guestsTotal",{number:m.length,total:calculateTotalGuests()})})]})}),(0,g.jsx)(GuestTable,{guests:m,isGuestsLoading:u})]})},useUpdateInvoiceDetailsMutation=o=>{let u=(0,eD.NL)(),d=(0,S.J)(o=>o.bookingInfo),m=(0,S.J)(o=>o.setInvoiceRefreshRequestedAt);return(0,eF.D)({mutationFn:o=>(0,eM.w5)(o),onSuccess:(p,g)=>{u.setQueryData(["booking-info",g.guestToken],d),m(Date.now()),(0,eN.c0)({message:o("guest:invoices.refreshScheduled"),type:"info",position:"top-right"})},onError:(d,m)=>{var p,g,h,b;let y=(null==d?void 0:null===(p=d.response)||void 0===p?void 0:p.status)===409&&(null==d?void 0:null===(b=d.response)||void 0===b?void 0:null===(h=b.data)||void 0===h?void 0:null===(g=h.data)||void 0===g?void 0:g.code)==="FISCAL_DATA_LOCKED";if(y){(0,eT.U)(o("guest:invoices.fiscalDataLockedError")),u.invali
1dateQueries({queryKey:["booking-invoices",m.guestToken]});return}(0,eT.U)()}})};var nE=d(17e3);let useBookingInvoicesQuery=function(o,u){let d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,nE.a)({queryKey:["booking-invoices",o],queryFn:()=>(0,eM.Zf)(o),enabled:u,refetchOnWindowFocus:!1,refetchInterval:d})};function invoice_form_styles_templateObject(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  margin-top: ",";\n\n  fieldset {\n    width: 100%;\n    display: flex;\n    flex-direction: column;\n    border: none;\n  }\n\n  .formTitle {\n    margin-bottom: ",";\n  }\n\n  .fieldHint {\n    font-size: ",";\n    color: ",";\n    margin: "," 0\n      ",";\n  }\n\n  .readOnlyValue {\n    margin: "," 0\n      ",";\n    font-weight: 500;\n  }\n"]);return invoice_form_styles_templateObject=function(){return o},o}function invoice_form_styles_templateObject1(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  gap: ",";\n  margin-bottom: ",";\n\n  .needInvoiceQuestion {\n    font-weight: 600;\n    font-size: ",";\n  }\n"]);return invoice_form_styles_templateObject1=function(){return o},o}function invoice_form_styles_templateObject2(){let o=(0,P._)(["\n  position: relative;\n  width: 48px;\n  height: 24px;\n  border-radius: ",";\n  background-color: ",";\n  cursor: pointer;\n  transition: ",";\n"]);return invoice_form_styles_templateObject2=function(){return o},o}function invoice_form_styles_templateObject3(){let o=(0,P._)(["\n  position: absolute;\n  top: ",";\n  left: ",";\n  width: 20px;\n  height: 20px;\n  border-radius: 50%;\n  background-color: ",";\n  transition: ",";\n  box-shadow: ",";\n"]);return invoice_form_styles_templateObject3=function(){return o},o}let nR=D.ZP.div.withConfig({componentId:"sc-112c1ec-0"})(invoice_form_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.fontSizes.x_small},o=>{let{theme:u}=o;return u.colors.grey},o=>{let{theme:u}=o;return u.spacing.xx_small},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.xx_small},o=>{let{theme:u}=o;return u.spacing.middle});D.ZP.div.withConfig({componentId:"sc-112c1ec-1"})(invoice_form_styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.fontSizes.middle});let nG=D.ZP.div.withConfig({componentId:"sc-112c1ec-2"})(invoice_form_styles_templateObject2(),o=>{let{theme:u}=o;return u.radii.medium},o=>{let{isActive:u,theme:d}=o;return u?d.colors.primary:d.colors.grey2},o=>{let{theme:u}=o;return u.transitions.regular}),nB=D.ZP.div.withConfig({componentId:"sc-112c1ec-3"})(invoice_form_styles_templateObject3(),o=>{let{theme:u}=o;return u.spacing.xx_small},o=>{let{isActive:u,theme:d}=o;return u?"26px":d.spacing.xx_small},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.transitions.regular},o=>{let{theme:u}=o;return u.shadows.boxShadow}),InvoiceForm=o=>{var u;let{control:d,errors:m={},dirtyFields:p={},vatRequired:y=!1,readOnly:x=!1,recipient:v}=o,{t:_,i18n:j}=(0,b.$G)(),O=null!==(u=j.language)&&void 0!==u?u:"en",I=(0,S.J)(o=>o.setBookingInfo),{countriesList:k,countries:P}=(0,h.useMemo)(()=>{let o=[],u={};return Object.values(ek.ki).forEach(d=>{let{id:m,nameEN:p,namePT:g,nameES:h,nameFR:b}=d,y={en:p,pt:g,es:h,fr:b}[O];u[m]=y,o.push({label:y,value:m})}),{countriesList:o,countries:u}},[O]);return x?(0,g.jsx)(nR,{children:(0,g.jsxs)(eW,{children:[(0,g.jsxs)(eQ,{children:[(0,g.jsx)(Label,{children:_("guest:contact.name")}),(0,g.jsx)(w.x,{className:"readOnlyValue",children:(null==v?void 0:v.fullName)||"—"}),(0,g.jsx)(Label,{children:_("guest:contact.email")}),(0,g.jsx)(w.x,{className:"readOnlyValue",children:(null==v?void 0:v.email)||"—"}),(0,g.jsx)(Label,{children:_("guest:contact.vatNumber")}),(0,g.jsx)(w.x,{className:"readOnlyValue",children:(null==v?void 0:v.vatNumber)||"—"})]}),(0,g.jsxs)(eQ,{children:[(0,g.jsx)(Label,{children:_("guest:contact.country")}),(0,g.jsx)(w.x,{className:"readOnlyValue",children:(null==v?void 0:v.countryName)||"—"}),(0,g.jsx)(Label,{children:_("guest:contact.address")}),(0,g.jsx)(w.x,{className:"readOnlyValue",children:(null==v?void 0:v.address)||"—"}),(0,g.jsx)(Label,{children:_("guest:contact.zipCode")}),(0,g.jsx)(w.x,{className:"readOnlyValue",children:(null==v?void 0:v.zipCode)||"—"})]})]})}):(0,g.jsx)(nR,{children:(0,g.jsxs)(eW,{children:[(0,g.jsxs)(eQ,{children:[(0,g.jsx)(Label,{children:_("guest:contact.name")}),(0,g.jsx)(ev.Qr,{control:d,name:"invoiceForm.fullName",render:
1o=>{var u,d,h,b;let{field:{onChange:x,ref:v,value:j}}=o;return(0,g.jsx)(eO.I,{ref:v,type:"text",name:"invoiceForm.fullName",variant:"floating",placeholder:_("guest:contact.name"),className:"inputContainer",isRequired:y,isValid:y||!(null===(u=m.invoiceForm)||void 0===u?void 0:u.fullName),errorMessage:(null===(d=m.invoiceForm)||void 0===d?void 0:d.fullName)&&_("guest:contact.requiredField"),showValidationIcon:(null===(h=p.invoiceForm)||void 0===h?void 0:h.fullName)||!!(null===(b=m.invoiceForm)||void 0===b?void 0:b.fullName),rightIcon:(0,g.jsx)(C.P.User,{}),value:null!=j?j:"",onChange:o=>{x(o.target.value),I({fullName:o.target.value})}})}}),(0,g.jsx)(Label,{children:_("guest:contact.email")}),(0,g.jsx)(ev.Qr,{control:d,name:"invoiceForm.secondaryEmail",render:o=>{var u,d,h,b;let{field:{onChange:y,ref:x,value:v}}=o;return(0,g.jsx)(eO.I,{type:"text",ref:x,variant:"floating",placeholder:_("guest:contact.email"),className:"inputContainer",errorMessage:(null===(u=m.invoiceForm)||void 0===u?void 0:u.secondaryEmail)&&_("guest:contact.emailInvalid"),isValid:!(null===(d=m.invoiceForm)||void 0===d?void 0:d.secondaryEmail),showValidationIcon:(null===(h=p.invoiceForm)||void 0===h?void 0:h.secondaryEmail)||!!(null===(b=m.invoiceForm)||void 0===b?void 0:b.secondaryEmail),rightIcon:(0,g.jsx)(C.P.MailOutline,{}),value:null!=v?v:"",onChange:o=>{y(o.target.value),I({secondaryEmail:o.target.value})}})}}),(0,g.jsx)(w.x,{className:"fieldHint",children:_("guest:contact.invoiceEmailHint")}),(0,g.jsx)(Label,{children:_("guest:contact.vatNumber")}),(0,g.jsx)(ev.Qr,{control:d,name:"invoiceForm.vatNumber",render:o=>{var u,d,h,b;let{field:{onChange:x,ref:v,value:j}}=o;return(0,g.jsx)(eO.I,{ref:v,type:"text",variant:"floating",name:"invoiceForm.vatNumber",placeholder:_("guest:contact.vatNumber"),isRequired:y,className:"inputContainer",errorMessage:(null===(u=m.invoiceForm)||void 0===u?void 0:u.vatNumber)&&_("guest:contact.requiredField"),isValid:!(null===(d=m.invoiceForm)||void 0===d?void 0:d.vatNumber),showValidationIcon:(null===(h=p.invoiceForm)||void 0===h?void 0:h.vatNumber)||!!(null===(b=m.invoiceForm)||void 0===b?void 0:b.vatNumber),value:null!=j?j:"",onChange:o=>{x(o.target.value),I({vatNumber:o.target.value})}})}})]}),(0,g.jsxs)(eQ,{children:[(0,g.jsx)(Label,{children:_("guest:contact.country")}),(0,g.jsx)(ev.Qr,{control:d,name:"invoiceForm.nationalityCountryId",render:o=>{var u,d;let{field:{onChange:p,ref:h,value:b}}=o;return(0,g.jsx)(eI.P,{ref:h,id:"nationalityCountryId",name:"nationalityCountryId",variant:"floating",items:k,placeholder:_("guest:contact.country"),value:b?{value:b,label:null!==(d=P[b])&&void 0!==d?d:""}:void 0,style:{marginBottom:"12px"},containerClassName:"select inputContainer",errorClassName:"error-select",errorMessage:(null===(u=m.invoiceForm)||void 0===u?void 0:u.nationalityCountryId)&&_("guest:contact.requiredField"),classNames:{singleValue:()=>"singleValue",option:()=>"option",placeholder:()=>"singleValue"},isSearchable:!0,onChange:o=>{p(o.value),I({nationalityCountryId:o.value})}})}}),(0,g.jsx)(Label,{children:_("guest:contact.address")}),(0,g.jsx)(ev.Qr,{control:d,name:"invoiceForm.address",render:o=>{let{field:{onChange:u,ref:d,value:m}}=o;return(0,g.jsx)(eO.I,{ref:d,type:"text",variant:"floating",name:"invoiceForm.address",className:"inputContainer",placeholder:_("guest:contact.address"),rightIcon:(0,g.jsx)(C.P.LocationPin,{}),value:null!=m?m:"",onChange:o=>{u(o.target.value),I({address:o.target.value})}})}}),(0,g.jsx)(Label,{children:_("guest:contact.zipCode")}),(0,g.jsx)(ev.Qr,{control:d,name:"invoiceForm.zipCode",render:o=>{let{field:{onChange:u,ref:d,value:m}}=o;return(0,g.jsx)(eO.I,{ref:d,type:"text",name:"invoiceForm.zipCode",variant:"floating",className:"inputContainer",placeholder:_("guest:contact.zipCode"),value:null!=m?m:"",onChange:o=>{u(o.target.value),I({zipCode:o.target.value})}})}})]}),(0,g.jsx)(eJ,{children:(0,g.jsx)(w.x,{children:_("guest:contact.vatDisclaimer")})})]})})},createInvoiceDetailsFormSchema=o=>eU.z.object({invoiceForm:eU.z.object({fullName:eU.z.string().min(1),secondaryEmail:eU.z.union([eU.z.string().email(),eU.z.string().min(1)]),vatNumber:o?eU.z.string().min(1):eU.z.string().optional(),nationalityCountryId:eU.z.string().min(1),address:eU.z.string().optional(),zipCode:eU.z.string().optional()})});
1function invoices_styles_templateObject(){let o=(0,P._)(["\n  margin-top: ",";\n  margin-bottom: ",";\n"]);return invoices_styles_templateObject=function(){return o},o}function invoices_styles_templateObject1(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n"]);return invoices_styles_templateObject1=function(){return o},o}function invoices_styles_templateObject2(){let o=(0,P._)(["\n  align-self: flex-end;\n  height: 50px;\n  min-width: 140px;\n  margin-top: ",";\n  border-radius: ",";\n\n  p {\n    color: ",";\n  }\n\n  @media (max-width: 500px) {\n    width: 100%;\n  }\n"]);return invoices_styles_templateObject2=function(){return o},o}function invoices_styles_templateObject3(){let o=(0,P._)(["\n  border-left: 4px solid ",";\n  background-color: ",";\n  border-radius: ",";\n  padding: ",";\n  margin: "," 0;\n\n  p {\n    margin: 0;\n  }\n"]);return invoices_styles_templateObject3=function(){return o},o}function invoices_styles_templateObject4(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  gap: ",";\n  margin-top: ",";\n\n  .needInvoiceQuestion {\n    font-weight: ",";\n    font-size: ",";\n  }\n\n  .toggleSwitch {\n    border: none;\n    padding: 0;\n\n    &:focus-visible {\n      outline: 2px solid ",";\n      outline-offset: 2px;\n    }\n\n    &:disabled {\n      cursor: default;\n      opacity: 0.6;\n    }\n  }\n"]);return invoices_styles_templateObject4=function(){return o},o}function invoices_styles_templateObject5(){let o=(0,P._)(["\n  display: flex;\n  gap: ",";\n  margin: "," 0\n    ",";\n\n  .icon {\n    flex-shrink: 0;\n    margin-top: ",";\n    color: ",";\n  }\n\n  p {\n    margin: 0;\n    color: ",";\n  }\n"]);return invoices_styles_templateObject5=function(){return o},o}function invoices_styles_templateObject6(){let o=(0,P._)(["\n          justify-content: space-between;\n          width: 100%;\n          padding: "," ",";\n          border: 1px solid ",";\n          border-radius: ",";\n          background-color: ",";\n          color: ",";\n          font-weight: ",";\n          font-size: ",";\n          text-align: left;\n\n          &:hover,\n          &:focus-visible {\n            background-color: ",";\n            border-color: ",";\n          }\n        "]);return invoices_styles_templateObject6=function(){return o},o}function invoices_styles_templateObject7(){let o=(0,P._)(["\n          align-self: flex-start;\n          margin-top: ",";\n          padding: "," 0;\n          border: none;\n          background: transparent;\n          color: ",";\n          font-weight: ",";\n          font-size: ",";\n\n          &:hover {\n            text-decoration: underline;\n          }\n        "]);return invoices_styles_templateObject7=function(){return o},o}function invoices_styles_templateObject8(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  gap: ",";\n  font-family: inherit;\n  cursor: pointer;\n  transition: ",";\n\n  &:focus-visible {\n    outline: 2px solid ",";\n    outline-offset: 2px;\n  }\n\n  &:disabled {\n    cursor: default;\n  }\n\n  .chevron {\n    flex-shrink: 0;\n    color: ",";\n    transition: transform 200ms ease-in-out;\n    transform: rotate(","deg);\n  }\n\n  ","\n"]);return invoices_styles_templateObject8=function(){return o},o}function invoices_styles_templateObject9(){let o=(0,P._)(["\n  margin-top: ",";\n  display: flex;\n  flex-direction: column;\n  gap: ",";\n"]);return invoices_styles_templateObject9=function(){return o},o}function styles_templateObject10(){let o=(0,P._)(["\n  display: flex;\n  gap: ",";\n  margin: "," 0\n    ",";\n\n  .icon {\n    flex-shrink: 0;\n    margin-top: ",";\n    color: ",";\n  }\n\n  .body {\n    display: flex;\n    flex-direction: column;\n    gap: ",";\n  }\n\n  p {\n    margin: 0;\n    color: ",";\n  }\n"]);return styles_templateObject10=function(){return o},o}function styles_templateObject11(){let o=(0,P._)(["\n  display: flex;\n  align-items: flex-start;\n  gap: ",";\n  border-left: 4px solid ",";\n  background-color: ",";\n  border-radius: ",";\n  padding: ",";\n  margin: "," 0;\n"]);
1return styles_templateObject11=function(){return o},o}function styles_templateObject12(){let o=(0,P._)(["\n  list-style: none;\n  margin: "," 0 0;\n  padding: 0;\n  display: flex;\n  flex-direction: column;\n  gap: ",";\n"]);return styles_templateObject12=function(){return o},o}function styles_templateObject13(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: ",";\n  border-radius: ",";\n  background-color: ",";\n  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06),\n    0 6px 16px rgba(0, 0, 0, 0.05);\n  padding: ","\n    ",";\n\n  @media "," {\n    flex-direction: column;\n    align-items: flex-start;\n    padding: ",";\n  }\n"]);return styles_templateObject13=function(){return o},o}function styles_templateObject14(){let o=(0,P._)(["\n  // Grow so the badge + link pair right-aligns consistently across rows,\n  // keeping the status badges vertically aligned regardless of the title width.\n  flex: 1;\n  display: flex;\n  align-items: center;\n  gap: ",";\n  min-width: 0;\n"]);return styles_templateObject14=function(){return o},o}function _templateObject15(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  gap: ",";\n\n  @media "," {\n    width: 100%;\n    justify-content: flex-end;\n    gap: ",";\n  }\n"]);return _templateObject15=function(){return o},o}function _templateObject16(){let o=(0,P._)(["\n  flex-shrink: 0;\n  width: 40px;\n  height: 40px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border-radius: ",";\n  background-color: ",";\n  color: ",";\n"]);return _templateObject16=function(){return o},o}function _templateObject17(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  gap: ",";\n  min-width: 0;\n\n  p {\n    margin: 0;\n  }\n"]);return _templateObject17=function(){return o},o}function _templateObject18(){let o=(0,P._)(["\n          color: ",";\n          background-color: rgba(231, 173, 103, 0.12);\n          border: 1px solid ",";\n          padding: 4px 11px;\n        "]);return _templateObject18=function(){return o},o}function _templateObject19(){let o=(0,P._)(["\n          color: ",";\n          background-color: ",";\n          padding: 5px 12px;\n        "]);return _templateObject19=function(){return o},o}function _templateObject20(){let o=(0,P._)(["\n  display: inline-flex;\n  align-items: center;\n  gap: ",";\n  font-size: ",";\n  font-weight: ",";\n  letter-spacing: 0.2px;\n  line-height: 1;\n  border-radius: ",";\n  white-space: nowrap;\n\n  ","\n\n  button {\n    color: inherit;\n    cursor: help;\n    line-height: 0;\n  }\n"]);return _templateObject20=function(){return o},o}function _templateObject21(){let o=(0,P._)(["\n  color: ",";\n  font-size: ",";\n  font-weight: ",";\n  text-decoration: none;\n  white-space: nowrap;\n\n  &:hover {\n    text-decoration: underline;\n  }\n"]);return _templateObject21=function(){return o},o}let nA=(0,D.ZP)($.Q).withConfig({componentId:"sc-be8a2717-0"})(invoices_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.spacing.small}),nZ=D.ZP.form.withConfig({componentId:"sc-be8a2717-1"})(invoices_styles_templateObject1()),nU=(0,D.ZP)(eq.z).withConfig({componentId:"sc-be8a2717-2"})(invoices_styles_templateObject2(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.radii.medium},o=>{let{theme:u}=o;return u.colors.white}),nV=D.ZP.div.withConfig({componentId:"sc-be8a2717-3"})(invoices_styles_templateObject3(),o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.tertiary},o=>{let{theme:u}=o;return u.radii.middle},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.spacing.small}),nL=D.ZP.div.withConfig({componentId:"sc-be8a2717-4"})(invoices_styles_templateObject4(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.weights.semiBold},o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.colors.primary}),nH=D.ZP.div.withConfig({componentId:"sc-be8a2717-5"}
1)(invoices_styles_templateObject5(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.xx_small},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.grey}),nq=D.ZP.button.withConfig({componentId:"sc-be8a2717-6"})(invoices_styles_templateObject8(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.transitions.regular},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{$isOpen:u}=o;return u?180:0},o=>{let{$variant:u="card",theme:d}=o;return"card"===u?(0,D.iv)(invoices_styles_templateObject6(),d.spacing.middle,d.spacing.medium,d.colors.grey2,d.radii.medium,d.colors.white,d.colors.text,d.weights.semiBold,d.fontSizes.middle,d.colors.background2,d.colors.primary):(0,D.iv)(invoices_styles_templateObject7(),d.spacing.medium,d.spacing.small,d.colors.primary,d.weights.medium,d.fontSizes.middle)}),nQ=D.ZP.div.withConfig({componentId:"sc-be8a2717-7"})(invoices_styles_templateObject9(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.small}),nW=D.ZP.div.withConfig({componentId:"sc-be8a2717-8"})(styles_templateObject10(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.xx_small},o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.spacing.x_small},o=>{let{theme:u}=o;return u.colors.grey}),n$=D.ZP.div.withConfig({componentId:"sc-be8a2717-9"})(styles_templateObject11(),o=>{let{theme:u}=o;return u.spacing.x_small},o=>{let{theme:u}=o;return u.colors.warning},o=>{let{theme:u}=o;return u.colors.background2},o=>{let{theme:u}=o;return u.radii.middle},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.spacing.small}),nK=D.ZP.ul.withConfig({componentId:"sc-be8a2717-10"})(styles_templateObject12(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.small}),nJ=D.ZP.li.withConfig({componentId:"sc-be8a2717-11"})(styles_templateObject13(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.radii.medium},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.large},Z.Hb.tablet,o=>{let{theme:u}=o;return u.spacing.medium}),nX=D.ZP.div.withConfig({componentId:"sc-be8a2717-12"})(styles_templateObject14(),o=>{let{theme:u}=o;return u.spacing.medium}),nY=D.ZP.div.withConfig({componentId:"sc-be8a2717-13"})(_templateObject15(),o=>{let{theme:u}=o;return u.spacing.medium},Z.Hb.tablet,o=>{let{theme:u}=o;return u.spacing.medium}),n0=D.ZP.div.withConfig({componentId:"sc-be8a2717-14"})(_templateObject16(),o=>{let{theme:u}=o;return u.radii.middle},o=>{let{theme:u}=o;return u.colors.tertiary},o=>{let{theme:u}=o;return u.colors.primary}),n1=D.ZP.div.withConfig({componentId:"sc-be8a2717-15"})(_templateObject17(),o=>{let{theme:u}=o;return u.spacing.xx_small}),n2=D.ZP.div.withConfig({componentId:"sc-be8a2717-16"})(_templateObject20(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.weights.semiBold},o=>{let{theme:u}=o;return u.radii.xx_large},o=>{let{theme:u,isProforma:d}=o;return d?(0,D.iv)(_templateObject18(),u.colors.warning,u.colors.warning):(0,D.iv)(_templateObject19(),u.colors.white,u.colors.success)}),n3=D.ZP.a.withConfig({componentId:"sc-be8a2717-17"})(_templateObject21(),o=>{let{theme:u}=o;return u.colors.primary},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.weights.semiBold}),n4={maxWidth:"280px"},n5=ek.ki.PT.id,Invoices=o=>{var u,d,m,p,y;let{guestToken:x}=o,{t:v}=(0,b.$G)(),_=(0,D.Fg)(),O=(0,ey.X)(),{bookingInfo:I,setBookingInfo:P}=(0,S.J)(o=>({bookingInfo:o.bookingInfo,setBookingInfo:o.setBookingInfo}),j.X),F=(0,S.J)(o=>o.invoiceRefreshRequestedAt),N=(0,S.J)(o=>o.setInvoiceRefreshRequestedAt),T=(0,S.J)(o=>o.invoiceFormOpenRequested),M=(0,S.J)(o=>o.setInvoiceFormOpenRequested),z=null!==F&&Date.now()-F<3e5,[E,R]=(0,h.useState)(null),{data:G,isLoading:B}=useBookingInvoicesQuery(x,!!x,!!z&&3e4),A=(0,h.useMemo)(()=>
1{let o=(I.totalBookingAmount||0)>1e3,u=I.nationalityCountryId===n5||I.phoneCountryId===n5;return o&&u},[I.totalBookingAmount,I.nationalityCountryId,I.phoneCountryId]),[Z,U]=(0,h.useState)(!1),V=Z||A;(0,h.useEffect)(()=>{T&&(U(!0),M(!1))},[T,M]);let{mutate:L,isLoading:H}=useUpdateInvoiceDetailsMutation(v),Q=(0,h.useMemo)(()=>createInvoiceDetailsFormSchema(A),[A]),{control:W,handleSubmit:K,setValue:J,formState:{errors:X,dirtyFields:Y}}=(0,ev.cI)({resolver:(0,e_.F)(Q)}),ee=null==G?void 0:G.recipient,et=(0,h.useRef)(!1);(0,h.useEffect)(()=>{if(et.current||!ee)return;let o={};if(!I.fullName&&ee.fullName&&(o.fullName=ee.fullName),!I.vatNumber&&ee.vatNumber&&(o.vatNumber=ee.vatNumber),!I.address&&ee.address&&(o.address=ee.address),!I.zipCode&&ee.zipCode&&(o.zipCode=ee.zipCode),!I.secondaryEmail&&ee.email&&(o.secondaryEmail=ee.email),!I.nationalityCountryId){let u=(o=>{if(!o)return;let u=Object.values(ek.ki).find(u=>u.nameEN===o||u.namePT===o||u.nameES===o||u.nameFR===o);return null==u?void 0:u.id})(ee.countryName);u&&(o.nationalityCountryId=u)}et.current=!0,Object.keys(o).length>0&&P(o)},[ee,I,P]),(0,h.useEffect)(()=>{J("invoiceForm",{fullName:I.fullName||"",secondaryEmail:I.secondaryEmail||"",nationalityCountryId:I.nationalityCountryId||"",address:I.address||"",zipCode:I.zipCode||"",vatNumber:I.vatNumber||""})},[I]),(0,h.useEffect)(()=>{A&&P({issueInvoiceToEndConsumer:!1})},[A]);let en=null!==E&&!!ee&&(ee.fullName||"")===E.fullName&&(ee.vatNumber||"")===E.vatNumber&&(ee.address||"")===E.address&&(ee.zipCode||"")===E.zipCode&&(ee.email||"")===E.email;if((0,h.useEffect)(()=>{z&&en&&(N(null),R(null))},[z,en,N]),B)return(0,g.jsx)(k.W,{id:"invoices",width:"calc(100% - 140px)",margin:"0 0 0 115px",children:(0,g.jsx)(q.O,{containerClassName:"skeletonContainer",className:"skeleton"})});let ei=null!==(u=null==G?void 0:G.invoices)&&void 0!==u?u:[],eo=ei.length>0,ea=null!==(d=null==G?void 0:G.fiscalDataLocked)&&void 0!==d?d:ei.some(o=>!o.isProforma),es=eo?ea?"final":"draft":"none",ec=(null!==(m=null==G?void 0:G.distinctFromCount)&&void 0!==m?m:0)>1,eu=null!==(p=null==G?void 0:G.brand)&&void 0!==p?p:"",ed=null!==(y=null==G?void 0:G.ownerName)&&void 0!==y?y:"",handleInvoiceOpened=o=>{eb.f.InvoiceOpened({...O,invoice_status:o.isProforma?"proforma":"final",invoice_type:o.invoiceType,issued_by:o.issuedByOwner?"owner":"brand"})},handleDetailsFormToggle=o=>{V||eb.f.GuestPageCtaClicked({...O,cta:o,placement:"billing_hub"}),U(o=>!o)},em="none"===es?v("guest:invoices.needInvoiceTitle"):v("guest:invoices.invoicesTitle"),ep=(0,g.jsxs)(nZ,{onSubmit:K(o=>{let u=o.invoiceForm,d={fullName:u.fullName||void 0,secondaryEmail:u.secondaryEmail||void 0,vatNumber:u.vatNumber||void 0,nationalityCountryId:u.nationalityCountryId||void 0,address:u.address||void 0,zipCode:u.zipCode||void 0};R({fullName:u.fullName||"",vatNumber:u.vatNumber||"",address:u.address||"",zipCode:u.zipCode||"",email:u.secondaryEmail||""}),L({...I,...d,issueInvoiceToEndConsumer:!1},{onSuccess:()=>{eb.f.InvoiceDetailsSubmitted({...O,billing_state:"draft"===es?"draft":"none"})}})}),children:[(0,g.jsx)(InvoiceForm,{control:W,errors:X,dirtyFields:Y,vatRequired:A}),(0,g.jsx)(nU,{type:"submit",variant:"secondary",text:(0,g.jsx)(w.x,{children:v("guest:invoices.saveDetails")}),loaderColor:_.colors.white,isLoading:H})]}),invoiceTypeLabel=o=>v("guest:invoices.type.".concat(o.invoiceType)),renderTypeIcon=o=>"cleaning"===o?(0,g.jsx)(C.P.Broom,{size:20}):"accommodation"===o?(0,g.jsx)(C.P.Hotel,{size:20}):(0,g.jsx)(C.P.Receipt,{size:20}),eg=eo&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(nW,{children:[(0,g.jsx)(C.P.Info,{className:"icon",size:18}),(0,g.jsxs)("div",{className:"body",children:[ec?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)($.Q,{variant:"semibold",children:v("guest:invoices.operatedBy",{brand:eu,ownerName:ed})}),(0,g.jsx)(w.x,{children:v("guest:invoices.multipleEntitiesExplanation")})]}):(0,g.jsx)(w.x,{children:v("guest:invoices.singleEntityExplanation",{brand:eu})}),(0,g.jsx)(w.x,{children:v("guest:invoices.proformaNote")})]})]}),(0,g.jsx)(nK,{children:ei.map(o=>(0,g.jsxs)(nJ,{children:[(0,g.jsxs)(nX,{children:[(0,g.jsx)(n0,{"aria-hidden":"true",children:renderTypeIcon(o.invoiceType)}),(0,g.jsxs)(n1,{children:[(0,g.jsx)($.Q,{variant:"semibold",children:invoiceTypeLabel(o)}),(0,g.jsx)(w.x,{children:o.issuedByOwner?v("guest:invoices.issuedByOwner",{legalName:o.fromLegalName}):v("guest:invoices.issuedByBrand",{legalName:o.fromLegalName,brand:eu})})]})]}),(0,g.jsxs)(nY,{children:[(0,g.jsxs)(n2,{isProforma:o.isProforma,children:[o.isProforma?v("guest:invoices.proforma"):v("guest:invoices.final"),o.isProforma&&(0,g.jsx)(el.K,{trigger:(0,g.jsx)(C.P.Info,{size:14}),customStyles:n4,content:v("guest:invoices.proformaTooltip")})]}),o.permalink&&(0,g.jsx)(n3,{href:o.permalink,target:"_blank",rel:"noopener noreferrer",onClick:()=>handleInvoiceOpened(o),children:v("guest:invoices.viewDownload")})]})]},o.invoiceId))})]});return(0,g.jsxs)(k.W,{id:"invoices",width:"calc(100% - 140px)",margin:"0 0 0 115px",children:[(0,g.jsx)(er.N,{sectionTitle:em}),I.isMultiRoomBooking&&(0,g.jsx)(nV,{children:(0,g.jsx)(w.x,{children:v("guest:contact.invoicePerApartment")})}),(null==G?void 0:G.accommodationByOwner)&&(0,g.jsx)(nV,{children:(0,g.jsx)(w.x,{children:v("guest:invoices.accommodationByOwnerNotice")})}),z&&(0,g.jsx)(n$,{children:(0,g.jsx)(w.x,{children:v("guest:invoices.updating")})}),"none"===es&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(nH,{children:[(0,g.jsx)(C.P.Info,{className:"icon",size:18}),(0,g.jsx)(w.x,{children:v("guest:invoices.autoGenNote")})]}),(0,g.jsxs)(nL,{children:[(0,g.jsx)(nG,{as:"button",type:"button",className:"toggleSwitch",isActive:V,role:"switch","aria-checked":V,"aria-label":v("guest:contact.needInvoiceQuestion"),"aria-controls":"invoice-details-panel",disabled:A,onClick:()=>handleDetailsFormToggle("request_invoice"),children:(0,g.jsx)(nB,{isActive:V})}),(0,g.jsx)(Label,{className:"needInvoiceQuestion",children:v("guest:contact.needInvoiceQuestion")})]}),V&&(0,g.jsx)(nQ,{id:"invoice-details-panel",children:ep})]}),"draft"===es&&(0,g.jsxs)(g.Fragment,{children:[eg,(0,g.jsxs)(nq,{type:"button",$isOpen:V,$variant:"link","aria-expanded":V,"aria-controls":"invoice-details-panel",disabled:A,onClick:()=>handleDetailsFormToggle("edit_invoice_details"),children:[v("guest:invoices.editDetailsLabel"),(0,g.jsx)(C.P.ArrowDown,{className:"chevron",size:18})]}),V&&(0,g.jsxs)(nQ,{id:"invoice-details-panel",children:[(0,g.jsx)(nV,{children:(0,g.jsx)(w.x,{children:v("guest:invoices.editDraftNote")})}),ep]})]}),"final"===es&&(0,g.jsxs)(g.Fragment,{children:[eg,(0,g.jsx)(nA,{variant:"semibold",children:v("guest:invoices.detailsOnInvoiceTitle")}),(0,g.jsx)(n$,{children:(0,g.jsx)(w.x,{children:v("guest:invoices.finalLocked")})}),(0,g.jsx)(InvoiceForm,{readOnly:!0,recipient:null==G?void 0:G.recipient})]})]})};var n6=d(73776),n8=d(31596),n7=d(2859),n9=d(93973),re=d(28285),rt=d(84718);
1function SuccessMessage_styles_templateObject(){let o=(0,P._)(["\n  position: relative;\n  height: 100%;\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  margin-top: ",";\n"]);return SuccessMessage_styles_templateObject=function(){return o},o}function SuccessMessage_styles_templateObject1(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  margin-bottom: ",";\n\n  h1 {\n    margin: ",";\n    text-align: center;\n    font-size: ",";\n  }\n\n  h2 {\n    text-align: center;\n    font-size: ",";\n    font-weight: ",";\n    max-width: 90%;\n    width: 350px;\n    color: ",";\n    border: none !important;\n  }\n"]);return SuccessMessage_styles_templateObject1=function(){return o},o}let rn=D.ZP.div.withConfig({componentId:"sc-e226d14b-0"})(SuccessMessage_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.large}),rr=D.ZP.div.withConfig({componentId:"sc-e226d14b-1"})(SuccessMessage_styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.xx_large},o=>{let{theme:u}=o;return u.spacing.middle},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.weights.regular},o=>{let{theme:u}=o;return u.colors.grey2}),SuccessMessage=o=>{let{isSuccess:u}=o,{t:d}=(0,b.$G)();return(0,g.jsxs)(rn,{children:[u?(0,g.jsx)(z(),{alt:d("common:success"),src:"".concat(tp.Mx,"/imgs/guests/check.png"),width:55,height:50}):(0,g.jsx)(rt.T,{color:Z.TV.colors.grey2,size:42}),(0,g.jsx)(rr,{children:u?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h1",{children:d("guest:processing.success")}),(0,g.jsx)("h2",{children:d("guest:processing.successDescription")})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h1",{children:d("guest:processing.title")}),(0,g.jsx)("h2",{children:d("guest:processing.subtitle")})]})})]})};var ri=d(27199),ro=d(69070);function CreditCardForm_styles_templateObject(){let o=(0,P._)(["\n  width: 50%;\n  min-height: 321px;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n\n  @media "," {\n    width: 100%;\n  }\n"]);return CreditCardForm_styles_templateObject=function(){return o},o}function CreditCardForm_styles_templateObject1(){let o=(0,P._)(["\n  margin-bottom: ",";\n"]);return CreditCardForm_styles_templateObject1=function(){return o},o}function CreditCardForm_styles_templateObject2(){let o=(0,P._)(["\n  min-width: 50%;\n"]);return CreditCardForm_styles_templateObject2=function(){return o},o}function CreditCardForm_styles_templateObject3(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  row-gap: ",";\n"]);return CreditCardForm_styles_templateObject3=function(){return o},o}function CreditCardForm_styles_templateObject4(){let o=(0,P._)(["\n  display: flex;\n  min-width: 80%;\n\n  @media "," {\n    flex-direction: column;\n  }\n"]);return CreditCardForm_styles_templateObject4=function(){return o},o}function CreditCardForm_styles_templateObject5(){let o=(0,P._)(["\n  display: flex;\n  align-self: end;\n  height: 50px;\n  width: 200px;\n  margin-top: ",";\n  border-radius: ",";\n\n  p {\n    color: ",";\n  }
1\n\n  @media "," {\n    align-self: center;\n  }\n\n  @media (max-width: 500px) {\n    width: 100%;\n  }\n"]);return CreditCardForm_styles_templateObject5=function(){return o},o}let ra=D.ZP.div.withConfig({componentId:"sc-a8da7f1a-0"})(CreditCardForm_styles_templateObject(),Z.Hb.x_desktop);(0,D.ZP)(w.x).withConfig({componentId:"sc-a8da7f1a-1"})(CreditCardForm_styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.large}),D.ZP.div.withConfig({componentId:"sc-a8da7f1a-2"})(CreditCardForm_styles_templateObject2()),D.ZP.div.withConfig({componentId:"sc-a8da7f1a-3"})(CreditCardForm_styles_templateObject3(),o=>{let{theme:u}=o;return u.spacing.small}),D.ZP.div.withConfig({componentId:"sc-a8da7f1a-4"})(CreditCardForm_styles_templateObject4(),Z.Hb.tablet);let rl=(0,D.ZP)(eq.z).withConfig({componentId:"sc-a8da7f1a-5"})(CreditCardForm_styles_templateObject5(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.radii.medium},o=>{let{theme:u}=o;return u.colors.white},Z.Hb.tablet),CreditCardForm=o=>{let{aptId:u,propertyGroupId:d,totalToCharge:m,bookingId:p,checkIn:y,checkOut:x}=o,{t:v}=(0,b.$G)(),_=(0,eD.NL)(),O=(0,h.useRef)(null),{setFormReference:C}=(0,ro.V)(),{submitPayment:I}=(0,n6.vW)(),k=(0,ey.X)(),{mutateAsync:P,isSuccess:D,isError:F,isLoading:N}=(0,ri.b)(),{bookingInfo:T,payments:M}=(0,S.J)(o=>({bookingInfo:o.bookingInfo,payments:o.payments}),j.X),[z,E]=(0,h.useState)(!1),[R,G]=(0,h.useState)(!1),{customerName:B,email:A}=(0,n6.O2)(T),U=(0,h.useCallback)(async o=>{var u;if(!T.guestToken||!T.bookingUnits)throw Error("Missing booking context");await P({guestToken:T.guestToken,bookingUnitId:null!==(u=T.bookingUnits[0].bookingUnitId)&&void 0!==u?u:"",payload:o,isMultiRoom:T.isMultiRoomBooking})},[T.bookingUnits,T.guestToken,T.isMultiRoomBooking,P]),handlePaymentSubmit=async o=>{var g,h;if(o.preventDefault(),z||N)return;if(E(!0),!u&&!d){E(!1),(0,eT.U)();return}if(!A){E(!1),(0,eT.U)(v("common:stripeMessages.missingBookerEmail"));return}let b=T.guestToken?(0,n6.OO)({guestToken:T.guestToken,bookingUnitId:null===(h=T.bookingUnits)||void 0===h?void 0:null===(g=h[0])||void 0===g?void 0:g.bookingUnitId}):null;try{let o=b?(0,n6.Rb)(b):null,g=null==o?void 0:o.paymentIntentId,h=null==o?void 0:o.setupIntentId;if(!g&&!h){let o=await I({intentRequest:{...u&&{aptId:u},...d&&{propertyGroupId:d},amount:m,description:(0,n6.Qe)({bookingId:p,checkIn:y,checkOut:x}),currency:"EUR",customerName:B,email:A}});if(!o.success){(0,eT.U)(o.error);return}if(!o.paymentIntentId&&!o.setupIntentId){(0,eT.U)();return}g=o.paymentIntentId,h=o.setupIntentId,b&&(0,n6.PD)(b,{paymentIntentId:g,setupIntentId:h})}await U({cardHolder:null!=B?B:"",email:A,paymentDetail:M.paymentDetail,paymentIntentId:g,setupIntentId:h}),b&&(0,n6.LT)(b)}catch(o){o instanceof Error&&"Missing booking context"===o.message&&(0,eT.U)()}finally{E(!1)}},handlePaymentSuccess=async()=>{eb.f.GuestPaymentCompleted({...k,value:M.totalToCharge,currency:"EUR",charge_type:"remainder"}),setTimeout(()=>{_.resetQueries({queryKey:["booking-info"]}),_.resetQueries({queryKey:["booking-payments"]}),G(!1)},5e3)};return(0,h.useEffect)(()=>{C(O)},[O,C]),(0,h.useEffect)(()=>{D&&handlePaymentSuccess()},[D]),(0,h.useEffect)(()=>{G(D||N)},[D,N]),(0,h.useEffect)(()=>{F&&G(!1)},[F]),(0,g.jsx)(ra,{children:R?(0,g.jsx)(SuccessMessage,{isSuccess:D}):(0,g.jsx)(n6.$Q,{formId:"stripe-form",formRef:O,onSubmit:handlePaymentSubmit,billingDefaults:{...B?{name:B}:{},...A?{email:A}:{}},children:(0,g.jsx)(rl,{type:"submit",variant:"secondary",form:"stripe-form",text:(0,g.jsx)(w.x,{children:v("guest:payment.submit")}),isLoading:z,loaderColor:Z.TV.colors.white})})})},CreditCardDetails=()=>{var o,u,d,m,p;let{i18n:y}=(0,b.$G)(),{bookingInfo:x,payments:v}=(0,S.J)(o=>({bookingInfo:o.bookingInfo,payments:o.payments}),j.X),_=x.isMultiRoomBooking,w=null!==(d=null===(u=x.bookingUnits)||void 0===u?void 0:null===(o=u[0])||void 0===o?void 0:o.bookingUnitId)&&void 0!==d?d:"",{data:O,isLoading:C}=(0,re.v)(x.propertyGroupId||""),{isLoading:I}=(0,n9.I)({guestToken:null!==(m=x.guestToken)&&void 0!==m?m:"",bookingUnitId:w,isMultiRoom:_,enabled:!!w&&!!x.guestToken}),k=(0,n6.h)(null!==(p=v.totalToCharge)&&void 0!==p?p:0),P=(0,h.useMemo)(()=>O?(0,n7.J)(O):null,[O]),D=(0,h.useMemo)(()=>({mode:"payment",amount:k,currency:"eur",locale:(0,n6.GX)(y.language),captureMethod:"manual",setupFutureUsage:"off_session",paymentMethodTypes:[...n6.a_]}
1),[k,y.language]);return C||I?(0,g.jsx)(q.O,{containerClassName:"skeletonContainer",className:"skeleton"}):O&&P&&x.propertyGroupId&&!(k<=0)?(0,g.jsx)(n8.eK,{stripe:P,options:D,children:(0,g.jsx)(CreditCardForm,{aptId:_?void 0:v.aptId,propertyGroupId:_?x.propertyGroupId:void 0,totalToCharge:v.totalToCharge,bookingId:v.bookingId,checkIn:v.checkIn,checkOut:v.checkOut})},O):null};function PaymentDetails_styles_templateObject(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  display: grid;\n  grid-template-columns: 1fr;\n  grid-template-rows: 1fr;\n  width: ",";\n  column-gap: ",";\n\n  @media "," {\n    grid-template-columns: 1fr;\n    width: 100%;\n  }\n"]);return PaymentDetails_styles_templateObject=function(){return o},o}function PaymentDetails_styles_templateObject1(){let o=(0,P._)(["\n  min-width: 350px;\n\n  @media "," {\n    min-width: 100%;\n  }\n"]);return PaymentDetails_styles_templateObject1=function(){return o},o}function PaymentDetails_styles_templateObject2(){let o=(0,P._)(["\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n\n  h3 > div {\n    margin-left: ",";\n  }\n"]);return PaymentDetails_styles_templateObject2=function(){return o},o}function PaymentDetails_styles_templateObject3(){let o=(0,P._)(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  background-color: #fef1f1;\n  height: 70px;\n  margin: ",";\n  padding: ",";\n\n  h3 {\n    text-transform: uppercase;\n  }\n\n  @media "," {\n    margin: ",";\n    padding: ",";\n\n    border-bottom-left-radius: ",";\n    border-bottom-right-radius: ",";\n  }\n\n  @media (max-width: 575px) {\n    height: 40px;\n    border-radius: 0;\n    margin: ",";\n  }\n"]);return PaymentDetails_styles_templateObject3=function(){return o},o}function PaymentDetails_styles_templateObject4(){let o=(0,P._)(["\n  background-color: #fffaef;\n  margin-top: ",";\n  border-bottom-left-radius: 0;\n  border-bottom-right-radius: 0;\n\n  @media "," {\n    border-bottom-left-radius: ",";\n    border-bottom-right-radius: ",";\n  }\n"]);return PaymentDetails_styles_templateObject4=function(){return o},o}let rs=D.ZP.div.withConfig({componentId:"sc-5c504d8f-0"})(PaymentDetails_styles_templateObject(),o=>{let{width:u}=o;return u},o=>{let{theme:u}=o;return u.spacing.large},Z.Hb.x_desktop),rc=D.ZP.div.withConfig({componentId:"sc-5c504d8f-1"})(PaymentDetails_styles_templateObject1(),Z.Hb.tablet),ru=D.ZP.div.withConfig({componentId:"sc-5c504d8f-2"})(PaymentDetails_styles_templateObject2(),o=>{let{theme:u}=o;return u.spacing.xx_small}),rd=D.ZP.div.withConfig({componentId:"sc-5c504d8f-3"})(PaymentDetails_styles_templateObject3(),o=>{let{theme:u}=o;return"".concat(u.spacing.medium," 0 0 -").concat(u.spacing.large)},o=>{let{theme:u}=o;return"0 ".concat(u.spacing.medium," 0 ").concat(u.spacing.large)},Z.Hb.x_desktop,o=>{let{theme:u}=o;return"".concat(u.spacing.small," -").concat(u.spacing.large," 0")},o=>{let{theme:u}=o;return"0 40px 0 ".concat(u.spacing.large)},o=>{let{theme:u,showCreditCard:d}=o;return d?0:u.radii.medium},o=>{let{theme:u,showCreditCard:d}=o;return d?0:u.radii.medium},o=>{let{theme:u}=o;return"".concat(u.spacing.small," -").concat(u.spacing.large," 0")}),rm=(0,D.ZP)(rd).withConfig({componentId:"sc-5c504d8f-4"})(PaymentDetails_styles_templateObject4(),o=>{let{theme:u}=o;return u.spacing.large},Z.Hb.x_desktop,o=>{let{theme:u,isLast:d,showCreditCard:m}=o;return d&&!m?u.radii.medium:0},o=>{let{theme:u,isLast:d,showCreditCard:m}=o;return d&&!m?u.radii.medium:0}),PaymentDetails=()=>{let{t:o}=(0,b.$G)("guest"),u=(0,S.J)(o=>o.bookingInfo),{nights:d,bookerPaymentDetails:m,totalBookingAmount:p,chargedAmount:h,actualProcessingAmount:y,actualDueAmountToPay:x}=u,v=calculateDueDate(m),_=[{description:o("payment.finalPrice").toUpperCase(),amount:(0,eu.WW)(p)},{description:o("payment.amountPaid").toUpperCase(),amount:(0,eu.WW)(Number(h)),hide:fullPaidOnExternalSource(u,d,o)}],j="incomplete"===m.paymentStatus;return(0,g.jsx)(rs,{width:"50%",children:(0,g.jsxs)(rc,{children:[(0,g.jsxs)(ei.Ro,{children:[renderPaymentDiscrimination({bookingInfo:u,nights:d,t:o,variant:"details"}),_.filter(o=>!o.hide).map((o,u)=>(0,g.jsxs)(ru,{children:[(0,g.jsx)($.Q,{children:o.description}),(0,g.jsx)($.Q,{children:o.amount})]},u))]}),y>0&&(0,g.jsxs)(rm,{isLast:!j,showCreditCard:"incomplete"===m.paymentStatus,children:[(0,g.jsx)($.Q,{children:o("payment.processingAmou
1nt")}),(0,g.jsx)($.Q,{dataTestId:"processingAmount",children:(0,eu.WW)(y)})]}),j&&(0,g.jsxs)(rd,{showCreditCard:"incomplete"===m.paymentStatus,children:[(0,g.jsx)($.Q,{children:o("payment.amountLeft",{date:(0,en.default)(v||new Date,"dd/MM/yyyy")})}),(0,g.jsx)($.Q,{dataTestId:"amountLeftToPay",children:(0,eu.WW)(x)})]})]})})};function payment_styles_templateObject(){let o=(0,P._)(["\n  display: flex;\n  align-items: flex-start;\n  gap: ",";\n\n  @media "," {\n    flex-direction: column;\n  }\n"]);return payment_styles_templateObject=function(){return o},o}let rp=D.ZP.div.withConfig({componentId:"sc-2e141bac-0"})(payment_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.xx_large},Z.Hb.x_desktop),Payment_Payment=()=>{let{t:o}=(0,b.$G)(),u=(0,ex.Z)(Z.Hb.tablet),d=(0,ex.Z)(Z.Hb.x_desktop),{paymentStatus:m,bookingInfo:p}=(0,S.J)(o=>({paymentStatus:o.status.payment,bookingInfo:o.bookingInfo}),j.X),h="incomplete"===p.bookerPaymentDetails.paymentStatus,y=h||p.actualProcessingAmount>0,x=d&&y&&!h?"".concat(Z.TV.spacing.large," ").concat(Z.TV.spacing.large," 0"):Z.TV.spacing.large;return(0,g.jsxs)(k.W,{"data-section":!0,id:"payment",width:u?"100%":"calc(100% - 140px)",padding:x,margin:"0 0 0 115px",children:[(0,g.jsx)(er.N,{sectionTitle:o("guest:payment.title"),sectionStatus:m}),(0,g.jsxs)(rp,{children:[(0,g.jsx)(PaymentDetails,{}),h?(0,g.jsx)(CreditCardDetails,{}):null]})]})};var rg=d(4183);function Steps_styles_templateObject(){let o=(0,P._)(["\n  top: 0;\n  left: 0;\n  z-index: 8;\n  position: fixed;\n  width: 100%;\n  height: 80px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: ",";\n  padding-left: 145px;\n  box-shadow: ",";\n  background: ",";\n  opacity: 0;\n  transform: translateY(1px);\n  transition: opacity 0.5s ease-out, transform 0.5s ease-out;\n\n  &.visible {\n    opacity: 1;\n    transform: translateY(0);\n  }\n\n  @media "," {\n    padding: ",";\n  }\n\n  @media "," {\n    padding: ",";\n  }\n"]);return Steps_styles_templateObject=function(){return o},o}function Steps_styles_templateObject1(){let o=(0,P._)(["\n  display: grid;\n  grid-template-columns: 1fr 0.5fr 1fr 0.5fr 1fr;\n  justify-items: center;\n  align-items: center;\n  width: 100%;\n  max-width: 1440px;\n\n  .step {\n    position: relative;\n    cursor: pointer;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    text-align: center;\n    transition: opacity 0.15s ease;\n  }\n\n  .step:hover {\n    opacity: 0.75;\n  }\n\n  .selected {\n    h3 {\n      font-weight: ",";\n    }\n  }\n\n  @media "," {\n    max-width: 95vw;\n\n    h3 {\n      font-size: ",";\n    }\n  }\n"]);return Steps_styles_templateObject1=function(){return o},o}function Steps_styles_templateObject2(){let o=(0,P._)(["\n  width: 24px;\n  height: 24px;\n  border-radius: 50%;\n  background-color: ",";\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-bottom: ",";\n\n  &.complete {\n    background-color: ",";\n  }\n\n  &.incomplete,\n  &.processing {\n    background-color: ",";\n  }\n\n  svg {\n    color: ",";\n  }\n"]);return Steps_styles_templateObject2=function(){return o},o}function Steps_styles_templateObject3(){let o=(0,P._)(["\n  height: 2px;\n  width: calc(100% - 40px);\n  background-color: ",";\n  margin-top: ",";\n\n  &.complete {\n    background-color: ",";\n  }\n\n  &.incomplete,\n  &.processing {\n    background-color: ",";\n  }\n\n  @media "," {\n    left: 32px;\n    width: calc(100% - ",");\n  }\n"]);return Steps_styles_templateObject3=function(){return o},o}let rf="#e5e5e5",rh="#FCC968",rb=D.ZP.div.withConfig({componentId:"sc-b8bd4d74-0"})(Steps_styles_templateObject(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.shadows.boxShadow},o=>{let{theme:u}=o;return u.colors.white},Z.Hb.tablet,o=>{let{theme:u}=o;return u.spacing.medium},Z.Hb.mobile,o=>{let{theme:u}=o;return"".concat(u.spacing.small," ").concat(u.spacing.middle)}),ry=D.ZP.div.withConfig({componentId:"sc-b8bd4d74-1"})(Steps_styles_templateObject1(),o=>{let{theme:u}=o;return u.weights.bold},Z.Hb.tablet,o=>{let{theme:u}=o;return u.fontSizes.x_small}),rx=D.ZP.div.withConfig({componentId:"sc-b8bd4d74-2"}
1)(Steps_styles_templateObject2(),rf,o=>{let{theme:u}=o;return u.spacing.x_small},o=>{let{theme:u}=o;return u.colors.success},rh,o=>{let{theme:u}=o;return u.colors.white}),rv=D.ZP.div.withConfig({componentId:"sc-b8bd4d74-3"})(Steps_styles_templateObject3(),rf,o=>{let{theme:u}=o;return u.spacing.xx_small},o=>{let{theme:u}=o;return u.colors.success},rh,Z.Hb.tablet,o=>{let{theme:u}=o;return u.spacing.large}),Steps=o=>{let{showSuperhog:u}=o,{t:d}=(0,b.$G)(),{activeSection:m}=(0,rg.o)(),[p,y]=(0,h.useState)(!1),{paymentStatus:x,reservationStatus:v,isPendingGuest:_,mainGuest:w}=(0,S.J)(o=>({paymentStatus:o.status.payment,reservationStatus:o.status.reservation,isPendingGuest:o.status.bookingDetails.isPendingGuest,mainGuest:o.mainGuest}),j.X);(0,h.useEffect)(()=>{let handleScroll=()=>{window.scrollY>10?y(!0):y(!1)};return window.addEventListener("scroll",handleScroll),()=>{window.removeEventListener("scroll",handleScroll)}},[]);let O=(0,tm.fk)(w)||(0,tm.US)(w)?"complete":"incomplete",I=[{key:"contact-details",name:d("guest:steps.contactDetails"),status:v},{key:"guest-form",name:d("guest:steps.guestForm"),status:u?O:_},{key:"payment",name:d("guest:steps.payment"),status:x}],handleStepClick=o=>{let u=document.getElementById(o);u&&u.scrollIntoView({behavior:"smooth"})};return(0,g.jsx)(rb,{className:p?"visible":"",children:(0,g.jsx)(ry,{steps:I.length,children:I.map((o,u)=>(0,g.jsxs)(h.Fragment,{children:[(0,g.jsxs)("div",{className:"step ".concat(m===o.key||""===m&&"contact-details"===o.key?"selected":""," ").concat(o.status),onClick:()=>handleStepClick(o.key),children:[(0,g.jsxs)(rx,{className:"status ".concat(o.status),children:["complete"===o.status&&(0,g.jsx)(C.P.Check,{}),("incomplete"===o.status||"processing"===o.status)&&(0,g.jsx)(C.P.Exclamation,{})]}),(0,g.jsx)($.Q,{children:o.name})]}),u!==I.length-1&&(0,g.jsx)(rv,{className:o.status})]},u))})})};var r_=d(290),rj=d(86094),rw=d(55354);function booking_styles_templateObject(){let o=(0,P._)(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  padding-bottom: ",";\n  row-gap: ",";\n\n  @media "," {\n    width: 100%;\n  }\n\n  @media "," {\n    padding-bottom: ",";\n  }\n\n  // this was added to prevent the zoom on the field.\n  // ios will zoom-in if the text size is smaller than 16px.\n  input {\n    @media "," {\n      font-size: 16px;\n    }\n  }\n"]);return booking_styles_templateObject=function(){return o},o}function booking_styles_templateObject1(){let o=(0,P._)(["\n  display: grid;\n  grid-template-columns: 1fr 420px;\n  gap: ",";\n  margin-top: ",";\n\n  @media (max-width: 1032px) {\n    grid-template-columns: 1fr;\n  }\n"]);return booking_styles_templateObject1=function(){return o},o}let rO=D.ZP.div.withConfig({componentId:"sc-ebc273e3-0"})(booking_styles_templateObject(),o=>{let{theme:u}=o;return"calc(".concat(u.spacing.xxx_large," * 2 + ").concat(u.spacing.x_large,")")},o=>{let{theme:u}=o;return u.spacing.medium},Z.Hb.tablet,Z.Hb.mobile,o=>{let{theme:u}=o;return"calc(100px + ".concat(u.spacing.xxx_large,")")},Z.Hb.mobile),rC=D.ZP.div.withConfig({componentId:"sc-ebc273e3-1"})(booking_styles_templateObject1(),o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.spacing.medium}),Booking=()=>{var o;let{asPath:u,query:d}=(0,_.useRouter)(),{t:m}=(0,b.$G)(),p=null!==(o=d.token)&&void 0!==o?o:"",[x,w]=(0,h.useState)(""),{mainGuest:O,bookingInfo:C}=(0,S.J)(o=>({mainGuest:o.mainGuest,bookingInfo:o.bookingInfo}),j.X),{isGuestDataLoading:I}=(0,rj.Z)();(0,h.useEffect)(()=>{let o=u.split("#")[1];w(o)},[u]),(0,h.useEffect)(()=>{if("superhog-section"===x){let o=document.getElementById(x);null==o||o.scrollIntoView({behavior:"smooth",block:"start"})}},[x]);let k=C.source!==ed.X.owner&&C.bookingRentalType===rw.m.shortTerm;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(y.PB,{noindex:!0,nofollow:!0}),(0,g.jsx)(v(),{children:(0,g.jsx)("title",{children:m("guest:booking")})}),(0,g.jsx)(Steps,{showSuperhog:O.isBookingSuperhog}),(0,g.jsxs)(rO,{children:[(0,g.jsxs)(rC,{children:[(0,g.jsx)(ContactDetails,{isPageLoading:I}),(0,g.jsx)(BookingSummary,{isPageLoading:I})]}),(0,g.jsx)(GuestList,{isGuestsLoading:I}),k&&(0,g.jsx)(Payment_Payment,{}),(0,g.jsx)(Invoices,{guestToken:p}),(0,g.jsx)(AdditionalInfo,{})]})]})};var rI=!0,rS=Booking;Booking.getLayout=o=>(0,g.jsx)(r_.A,{children:o})},4183:function(o,u,d){"use strict";d.d(u,{o:function(){return useSelectMenuOnScroll}});var m=d(67294);let useSelectMenuOnScroll=()=>{let[o,u]=(0,m.useState)(""),d=(0,m.useRef)(null),handleScroll=()=>{var o;let m=window.innerHeight/1.5-100;null===(o=d.current)||void 0===o||o.forEach(o=>{let d=o.getBoundingClientRect().height/2,p=o.getBoundingClientRect().y+d;p-m<d&&u(o.id)})};return(0,m.useEffect)(()=>(d.current=document.querySelectorAll("[data-section]"),window.addEventListener("scroll",handleScroll),()=>{window.removeEventListener("scroll",handleScroll)}),[]),{activeSection:o,setActiveSection:u}}},17801:function(o,u,d){"use strict";d.d(u,{Pu:function(){return getMainCardAddress},yh:function(){return getUnitLabel},zY:function(){return getMainCardTitle}}
1);let clean=o=>{var u;return null!==(u=null==o?void 0:o.trim())&&void 0!==u?u:""},getBuildingAddress=o=>{let{aptAddress:u,aptStreetName:d,aptStreetNumber:m}=o,p=clean(d),g=clean(m);return p?[p,g].filter(Boolean).join(", "):clean(u)},getMainCardAddress=o=>{let{isMultiRoomBooking:u,...d}=o;return u?getBuildingAddress(d):clean(d.aptAddress)},getMainCardTitle=o=>{let{isMultiRoomBooking:u,aptTitle:d,buildingName:m}=o;return u&&clean(m)?clean(m):clean(d)},getOwnUnitAddress=(o,u)=>{let d=clean(null==o?void 0:o.aptAddress);return d===clean(u)?"":d},getUnitLabel=function(o,u){let{isMultiRoomBooking:d=!1,bookingAddress:m}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},p=clean(null==o?void 0:o.aptTitle);if(!d){let u=clean(null==o?void 0:o.aptAddress);return p?{title:p,subtitle:u}:{title:u,subtitle:""}}let g=getOwnUnitAddress(o,m),h=clean(null==o?void 0:o.aptFlatNumber);if(!h)return g?{title:g,subtitle:p}:{title:p,subtitle:""};let b=Number(null==o?void 0:o.floorNumber);return{title:Number.isFinite(b)&&0!==b?u("guest:bookingInformation.unitWithFloor",{number:h,floor:b}):u("guest:bookingInformation.unitNumber",{number:h}),subtitle:p||g}}},60832:function(o,u,d){"use strict";d.d(u,{W:function(){return Container}});var m=d(85893),p=d(82729),g=d(85444),h=d(53182);function _templateObject(){let o=(0,p._)(["\n  display: flex;\n  flex-direction: column;\n  width: ",";\n  height: ",";\n  border-radius: ",";\n  background-color: ",";\n  padding: ",";\n  margin: ",";\n\n  @media "," {\n    width: 100%;\n    margin: 0;\n    border-radius: 0;\n    padding: ",";\n  }\n\n  .skeletonContainer {\n    flex: 1;\n    margin: -",";\n  }\n\n  .skeleton {\n    height: 400px;\n    border-radius: ",";\n    line-height: unset;\n\n    @media "," {\n      height: 280px;\n      border-radius: 0;\n    }\n  }\n"]);return _templateObject=function(){return o},o}let b=g.ZP.div.withConfig({componentId:"sc-39ae233c-0"})(_templateObject(),o=>{let{width:u}=o;return u},o=>{let{height:u}=o;return u},o=>{let{theme:u}=o;return u.radii.medium},o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u,padding:d}=o;return d||u.spacing.large},o=>{let{margin:u,theme:d}=o;return u||"".concat(d.spacing.medium," ").concat(d.spacing.medium," 0 115px")},h.Hb.tablet,o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.spacing.x_large},o=>{let{theme:u}=o;return u.radii.medium},h.Hb.tablet),Container=o=>{let{width:u="initial",height:d="initial",children:p,id:g,className:h,margin:y,padding:x}=o;return(0,m.jsx)(b,{"data-section":!0,id:g,width:u,height:d,className:h,margin:y,padding:x,children:p})}},65289:function(o,u,d){"use strict";d.d(u,{N:function(){return SectionTitle}});var m=d(85893),p=d(37303),g=d(53182),h=d(65665),b=d(59647),y=d(287),x=d(98704),v=d(28477),_=d(60543),j=d(36208);let SectionTitle=o=>{let{sectionTitle:u,sectionStatus:d,statusExtraInfo:w,hideDetail:O=!1,titleSize:C="normal",showInfoPeek:I=!1}=o,{t:S}=(0,p.$G)(),k=(0,v.Z)(g.Hb.mobile),P=(0,m.jsx)(_.M,{status:d,completeIcon:(0,m.jsx)(j.A1,{}),incompleteIcon:(0,m.jsx)(j.MN,{}),processingIcon:(0,m.jsx)(j.MN,{className:"underReview"})});return(0,m.jsxs)(j.h4,{className:C,children:[!O&&(0,m.jsx)("span",{className:"detail"}),(0,m.jsxs)(j.c7,{children:[(0,m.jsx)(y.D,{children:u}),I?(0,m.jsx)(x.K,{side:k?"bottom":"right",contentSize:"large",content:(0,m.jsx)(()=>(0,m.jsxs)(j.Oo,{children:[(0,m.jsx)(h.Q,{children:S("guest:guestForm.sefForm")}),(0,m.jsx)(b.x,{children:S("guest:guestForm.sefDescription")})]}),{})}):null]}),d&&(0,m.jsx)(j.gn,{sectionStatus:d,children:(0,m.jsxs)("div",{children:[(0,m.jsx)(b.x,{children:S("guest:bookingStatus.status")}),w||P]})})]})}},36208:function(o,u,d){"use strict";d.d(u,{A1:function(){return w},MN:function(){return j},Oo:function(){return O},c7:function(){return v},gn:function(){return _},h4:function(){return x}});var m=d(82729),p=d(66653),g=d(69274),h=d(86419),b=d(85444),y=d(92744);function _templateObject(){let o=(0,m._)(["\n  position: relative;\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-bottom: ",";\n\n  .detail {\n    position: absolute;\n    left: -24px;\n    width: 16px;\n    height: 18px;\n    background-color: ",";\n    ",";\n    border-radius: ",";\n  }\n"]);
1return _templateObject=function(){return o},o}function _templateObject1(){let o=(0,m._)(["\n  display: flex;\n  align-items: center;\n  column-gap: ",";\n"]);return _templateObject1=function(){return o},o}function _templateObject2(){let o=(0,m._)(["\n  div {\n    display: flex;\n\n    p {\n      margin-right: ",";\n    }\n  }\n"]);return _templateObject2=function(){return o},o}function _templateObject3(){let o=(0,m._)(["\n  border: 0.5px solid #e5e5e5;\n  background-color: ",";\n  padding: ",";\n  text-align: left;\n  border-radius: ",";\n  z-index: 2;\n"]);return _templateObject3=function(){return o},o}function _templateObject4(){let o=(0,m._)(["\n  color: ",";\n  width: 18px;\n  height: 18px;\n\n  &.underReview {\n    color: ",";\n  }\n"]);return _templateObject4=function(){return o},o}function _templateObject5(){let o=(0,m._)(["\n  width: 18px;\n  height: 18px;\n  color: ",";\n"]);return _templateObject5=function(){return o},o}function _templateObject6(){let o=(0,m._)(["\n  width: 18px;\n  height: 18px;\n  color: ",";\n"]);return _templateObject6=function(){return o},o}function _templateObject7(){let o=(0,m._)(["\n  max-width: 300px;\n"]);return _templateObject7=function(){return o},o}let x=b.ZP.div.withConfig({componentId:"sc-eb947064-0"})(_templateObject(),o=>{let{theme:u}=o;return u.spacing.large},o=>{let{theme:u}=o;return u.colors.primary},(0,y.c2)(y.oe,"#283537"),o=>{let{theme:u}=o;return"0px ".concat(u.radii.medium," ").concat(u.radii.medium," 0")}),v=b.ZP.div.withConfig({componentId:"sc-eb947064-1"})(_templateObject1(),o=>{let{theme:u}=o;return u.spacing.x_small}),_=b.ZP.div.withConfig({componentId:"sc-eb947064-2"})(_templateObject2(),o=>{let{theme:u}=o;return u.spacing.small});(0,b.ZP)(h.VY).withConfig({componentId:"sc-eb947064-3"})(_templateObject3(),o=>{let{theme:u}=o;return u.colors.white},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.radii.small});let j=(0,b.ZP)(g.Sbn).withConfig({componentId:"sc-eb947064-4"})(_templateObject4(),o=>{let{theme:u}=o;return u.colors.warning},o=>{let{theme:u}=o;return u.colors.warning}),w=(0,b.ZP)(p.KJd).withConfig({componentId:"sc-eb947064-5"})(_templateObject5(),o=>{let{theme:u}=o;return u.colors.primary});(0,b.ZP)(g.Sbn).withConfig({componentId:"sc-eb947064-6"})(_templateObject6(),o=>{let{theme:u}=o;return u.colors.warning});let O=b.ZP.div.withConfig({componentId:"sc-eb947064-7"})(_templateObject7())},72742:function(o,u,d){"use strict";d.d(u,{Ro:function(){return g},kG:function(){return h},po:function(){return b},qP:function(){return y},tF:function(){return x}});var m=d(82729),p=d(85444);function _templateObject(){let o=(0,m._)(["\n  display: flex;\n  flex-direction: column;\n  row-gap: ",";\n\n  &.totals {\n    margin-top: ",";\n  }\n"]);return _templateObject=function(){return o},o}function _templateObject1(){let o=(0,m._)(["\n  display: flex;\n  flex-direction: column;\n  gap: ",";\n  margin-bottom: ",";\n  padding-bottom: ",";\n  border-bottom: 1px solid ",";\n"]);return _templateObject1=function(){return o},o}function _templateObject2(){let o=(0,m._)(["\n  display: flex;\n  flex-direction: column;\n  gap: ",";\n  margin-bottom: ",";\n"]);return _templateObject2=function(){return o},o}function _templateObject3(){let o=(0,m._)(["\n  font-size: ",";\n  font-weight: ",";\n  color: ",";\n  text-transform: uppercase;\n"]);return _templateObject3=function(){return o},o}function _templateObject4(){let o=(0,m._)(["\n  font-family: ",";\n  font-size: ",";\n  font-weight: ",";\n  color: ",";\n  line-height: 1.4;\n  text-transform: none;\n"]);return _templateObject4=function(){return o},o}let g=p.ZP.div.withConfig({componentId:"sc-233b2926-0"})(_templateObject(),o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.middle}),h=p.ZP.div.withConfig({componentId:"sc-233b2926-1"})(_templateObject1(),o=>{let{theme:u}=o;return u.spacing.x_small},o=>{let{theme:u}=o;return u.spacing.small},o=>{let{theme:u}=o;return u.spacing.medium},o=>{let{theme:u}=o;return u.colors.grey2}),b=p.ZP.div.withConfig({componentId:"sc-233b2926-2"})(_templateObject2(),o=>{let{theme:u}=o;return u.spacing.xx_small},o=>{let{theme:u}=o;return u.spacing.x_small}),y=p.ZP.h6.withConfig({componentId:"sc-233b2926-3"}
1)(_templateObject3(),o=>{let{theme:u}=o;return u.fontSizes.middle},o=>{let{theme:u}=o;return u.weights.semiBold},o=>{let{theme:u}=o;return u.colors.text}),x=p.ZP.span.withConfig({componentId:"sc-233b2926-4"})(_templateObject4(),o=>{let{theme:u}=o;return u.fonts.poppins},o=>{let{theme:u}=o;return u.fontSizes.small},o=>{let{theme:u}=o;return u.weights.regular},o=>{let{theme:u}=o;return u.colors.grey})},13072:function(o,u,d){"use strict";d.d(u,{Bk:function(){return getPropertyGroupAvailabilityAndPrices},V9:function(){return fetchPropertyAvailability},Xx:function(){return fetchNearbyDates},es:function(){return fetchNearbySearchDates},gb:function(){return fetchStripePublishableKeyByPropertyGroup},jT:function(){return getPropertyTypeCalendarByMonth},jl:function(){return getPropertyGroupCalendarByMonth},tS:function(){return fetchPropertiesAvailable}});var m=d(29422),p=d(8432),g=d(13719),h=d(89206),b=d(34487),y=d(48303),x=d(13009);let v={propertyGroups:[],totalItems:0},_={checkInAvailable:!1,checkOutAvailable:!1,minimumStay:0},getDefaultPropertyAvailabilityResponse=o=>({propertyGroupId:o,totalPrice:"0",averagePricePerNight:"0",totalMaxOccupancy:0,title:"",address:"",municipality:"",neighbourhoodOverview:"",coordLatitude:"0",coordLongitude:"0",photos:[],seoData:[],propertyTypes:[],availablePropertyTypes:{},coverPhoto:""}),getDefaultAvailabilityResponse=(o,u)=>{let d=(0,g.Oe)(o,u);return Object.fromEntries(d.map(o=>[o,_]))},fetchPropertiesAvailable=async o=>{var u;let{queryParams:d,currentPage:m=0}=o;if(!d)return v;let g=(0,p.rT)(d,m),b="";b=(null==d?void 0:null===(u=d.dates)||void 0===u?void 0:u.checkIn)?"/website/availability/search".concat(g):"/website/propertyGroup/list".concat(g);try{let{data:o}=await y.Z.get(b);return o}catch(o){return(0,h.S)({error:o,endpoint:b}),v}},fetchPropertyAvailability=async o=>{let{propertyGroupId:u,queryParams:d}=o,m=d?(0,p.BF)(d):"visibleOnWebsite=true",g="/website/availability/propertyGroup/".concat(u,"?").concat(m);try{let{data:o}=await y.Z.get(g);return{...getDefaultPropertyAvailabilityResponse(u),...o}}catch(o){throw(0,h.S)({error:o,endpoint:g}),o}},fetchNearbyDates=async o=>{let{propertyGroupId:u,queryParams:d}=o,m=(0,p.BF)(d),g="/website/availability/propertyGroup/".concat(u,"/nearbyDates?").concat(m);try{var b;let{data:o}=await y.Z.get(g);return{nearbyDates:null!==(b=null==o?void 0:o.nearbyDates)&&void 0!==b?b:[],minimumStay:null==o?void 0:o.minimumStay}}catch(o){return(0,h.S)({error:o,endpoint:g}),{nearbyDates:[]}}},fetchNearbySearchDates=async o=>{let{queryParams:u}=o;if(!u)return[];let d=(0,p.rT)({...u,skipRentalTypeFilter:!1},0),m="/website/availability/nearbyDates".concat(d);try{var g;let{data:o}=await y.Z.get(m);return null!==(g=null==o?void 0:o.nearbyDates)&&void 0!==g?g:[]}catch(o){return(0,h.S)({error:o,endpoint:m}),[]}},getPropertyGroupCalendarByMonth=async(o,u,d)=>{let b=(0,g.p6)(new Date(u),"yyyy-MM"),x=(0,g.p6)((0,m.Z)(new Date(u),{months:1}),"yyyy-MM"),v=(0,p.BF)(d),_="/website/availability/propertyGroup/".concat(o,"/calendar?fromMonth=").concat(b,"&toMonth=").concat(x,"&").concat(v);try{let{data:o}=await y.Z.get(_),u=getDefaultAvailabilityResponse(b,x);return{...u,...o}}catch(o){throw(0,h.S)({error:o,endpoint:_}),o}},getPropertyTypeCalendarByMonth=async(o,u,d)=>{let b=(0,g.p6)(new Date(u),"yyyy-MM"),x=(0,g.p6)((0,m.Z)(new Date(u),{months:1}),"yyyy-MM"),v=(0,p.BF)(d),_="/website/availability/propertyType/".concat(o,"/calendar?fromMonth=").concat(b,"&toMonth=").concat(x,"&").concat(v);try{let{data:o}=await y.Z.get(_),u=getDefaultAvailabilityResponse(b,x);return{...u,...o}}catch(o){throw(0,h.S)({error:o,endpoint:_}),o}},fetchStripePublishableKeyByPropertyGroup=async o=>{let u="/website/propertyGroup/".concat(o,"/stripePublishableKey");try{if(o){let{data:o}=await y.Z.get(u);return null==o?void 0:o.stripePublishableKey}return null}catch(o){throw(0,h.S)({error:o,endpoint:u}),(0,x.U)(),o}},getPropertyGroupAvailabilityAndPrices=async o=>{let{propertyGroupId:u,bookingRooms:d,dates:m,discountCode:p}=o,g=d.map(o=>{let{propertyTypeName:u,...d}=o;return d}),x={propertyTypes:g,dates:{checkIn:m.checkIn,checkOut:m.checkOut}};p&&(x.discountCode=p);let v=(0,b.Y$)(x),_="/website/availability/propertyGroup/".concat(u,"/quote?").concat(v,"&visibleOnWebsite=true");try{let{data:o}=await y.Z.get(_);return o}catch(o){throw(0,h.S)({error:o,endpoint:_}),o}}},27199:function(o,u,d){"use strict";d.d(u,{b:function(){return useChargeBookingMutation}});var m=d(48228),p=d(3465);let useChargeBookingMutation=()=>(0,m.D)({mutationFn:o=>{let{guestToken:u,bookingUnitId:d,payload:m,isMultiRoom:g}=o;return(0,p.rv)(u,d,m,g)}})},28285:function(o,u,d){"use strict";d.d(u,{v:function(){return usePropertyGroupStripePublishableKey}});var m=d(17e3),p=d(13072);let usePropertyGroupStripePublishableKey=o=>(0,m.a)({queryKey:["publishableKey",o],queryFn:()=>(0,p.gb)(o),keepPreviousData:!1,retry:!1,refetchOnWindowFocus:!1})},69070:function(o,u,d){"use strict";d.d(u,{V:function(){return g}});var m=d(52464),p=d(13009);let g=(0,m.F)()((o,u)=>({formReference:null,setFormReference:u=>o({formReference:u}),triggerSubmit:()=>{try{var o;let{formReference:d}=u();if(!d)return;null===(o=d.current)||void 0===o||o.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))}catch(o){(0,p.U)()}}}))},73960:function(o,u,d){"use strict";d.d(u,{J:function(){return m.J},e:function(){return g}});var m=d(48773),p=d(52464);let g=(0,p.F)(o=>({guestId:"",guestName:"",isUpdateSuccess:!1,setIsUpdateSuccess:(u,d)=>{o({isUpdateSuccess:!0,guestId:u,guestName:d}),setTimeout(()=>{o({isUpdateSuccess:!1})},6e3)}}))},18403:function(o,u,d){"use strict";d.d(u,{WR:function(){return mapBenefitsWithCompanyTheme},D:function(){return y}});var m={src:"/_next/static/media/best-price.6e23227f.svg",height:35,width:35,blurWidth:0,blurHeight:0},p={src:"/_next/static/media/cancellation.fa59cb98.svg",height:35,width:35,blurWidth:0,blurHeight:0},g={src:"/_next/static/media/hotline.75c7276e.svg",height:35,width:35,blurWidth:0,blurHeight:0},h=d(45177);let priceSummaryBenefits=function(){let o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],u=!(arguments.length>1)||void 0===arguments[1]||arguments[1],d=[{type:"bestPrice",title:"common:benefits.bestPrice",description:"common:benefits.bestPriceDescription",icon:m},{type:"hotline",title:"common:benefits.hotline",description:"common:benefits.hotlineDescription",icon:g}];return u&&d.splice(1,0,{type:"freeCancelation",title:"common:benefits.freeCancellation",description:o?"common:benefits.freeCancellationWithDates":"common:benefits.freeCancellationWithoutDates",icon:p}),d},b={[h.O3.ferienhaus]:{bestPrice:{src:"/_next/static/media/best-price.93260760.svg",height:35,width:35,blurWidth:0,blurHeight:0},freeCancelation:{src:"/_next/static/media/cancellation.c4353077.svg",height:35,width:35,blurWidth:0,blurHeight:0},hotline:{src:"/_next/static/media/hotline.565220c0.svg",height:35,width:35,blurWidth:0,blurHeight:0}},[h.O3.andoliving]:{bestPrice:{src:"/_next/static/media/best-price.e1593e7e.svg",height:35,width:35,blurWidth:0,blurHeight:0},freeCancelation:{src:"/_next/static/media/cancellation.14326bda.svg",height:35,width:35,blurWidth:0,blurHeight:0},hotline:{src:"/_next/static/media/hotline.d172698d.svg",height:35,width:35,blurWidth:0,blurHeight:0}}},mapBenefitsWithCompanyTheme=o=>{let{withDates:u=!1,currentCompany:d,allowCancelation:m=!0}=o,p=b[d]||{};return priceSummaryBenefits(u,m).map(o=>({...o,icon:p[o.type]||o.icon}))},y=["common:benefits.topTierSecurity","common:benefits.globalAccessibility","common:benefits.effortlessCheckout","common:benefits.reliableService"]},76498:function(o,u,d){"use strict";d.d(u,{Om:function(){return formatDisplayedHour},RS:function(){return filterCheckInHours},eY:function(){return filterCheckOutHours},yZ:function(){return p}});let m=["15:00","15:15","15:30","15:45","16:00","16:15","16:30","16:45","17:00","17:15","17:30","17:45","18:00","18:15","18:30","18:45","19:00","19:15","19:30","19:45","20:00","20:15","20:30","20:45","21:00","21:15","21:30","21:45","22:00","22:15","22:30","22:45","23:00"],p=m.map(o=>({value:o,label:o})),g=["00:00","00:15","00:30","00:45","01:00","01:15","01:30","01:45","02:00","02:15","02:30","02:45","03:00","03:15","03:30","03:45","04:00","04:15","04:30","04:45","05:00","05:15","05:30","05:45","06:00","06:15","06:30","06:45","07:00","07:15","07:30","07:45","08:00","08:15","08:30","08:45","09:00","09:15","09:30","09:45","10:00","10:15","10:30","10:45","11:00"];g.map(o=>({value:o,label:o}));let formatDisplayedHour=o=>8===o.length?o.slice(0,-3):o,filterCheckInHours=(o,u)=>m.filter(d=>d>=o&&d<=u),filterCheckOutHours=o=>g.filter(u=>u<=o)},34487:function(o,u,d){"use strict";d.d(u,{DX:function(){return restructureQueryParams},Y$:function(){return serializeQuery},fz:function(){return p},no:function(){return m}});let m=3e5,p=6e5,serializeQuery=(o,u)=>{let d=Object.keys(o).map((d,m)=>{let p=o[d];return(o.constructor===Array?d="".concat(u,"[").concat(m,"]"):o.constructor===Object&&(d=u?"".concat(u,"[").concat(d,"]"):d),"object"==typeof p)?serializeQuery(p,d):"".concat(d,"=").concat(encodeURIComponent(p))});
1return[].concat.apply([],d).filter(Boolean).join("&")},restructureQueryParams=o=>{let u={};Object.keys(o).forEach(d=>{let m=o[d];if(m&&"false"!==m&&"0"!==m){if(d.includes("[")&&d.includes("]")){let o=d.split(/[\[\]]+/).filter(Boolean),p=u;for(let u=0;u<o.length-1;u++){let d=o[u],m=o[u+1],g=!isNaN(Number(m));p[d]||(p[d]=g?[]:{}),p=p[d]}let g=o[o.length-1];isNaN(Number(g))?p[g]=m:p[Number(g)]=m}else u[d]=m}});let convertSpareArrays=o=>{if(Array.isArray(o))return o.filter(o=>void 0!==o).map(convertSpareArrays);if(o&&"object"==typeof o){let u={};Object.keys(o).forEach(d=>{u[d]=convertSpareArrays(o[d])});let d=Object.keys(u),m=d.length>0&&d.every(o=>!isNaN(Number(o)));if(m){let o=[];return d.forEach(d=>{o[Number(d)]=u[d]}),o.filter(o=>void 0!==o)}return u}return o};return convertSpareArrays(u)}},60543:function(o,u,d){"use strict";d.d(u,{M:function(){return StatusIconHandler}});var m=d(60737);let StatusIconHandler=o=>{let{status:u,completeIcon:d,incompleteIcon:p,processingIcon:g}=o;return u===m.m.complete?d:u===m.m.incomplete?p:u===m.R.processing?g:d}},64970:function(o,u,d){var m;o.exports=(m=d(67294),function(o){var u={};function __nested_webpack_require_620__(d){if(u[d])return u[d].exports;var m=u[d]={i:d,l:!1,exports:{}};return o[d].call(m.exports,m,m.exports,__nested_webpack_require_620__),m.l=!0,m.exports}return __nested_webpack_require_620__.m=o,__nested_webpack_require_620__.c=u,__nested_webpack_require_620__.d=function(o,u,d){__nested_webpack_require_620__.o(o,u)||Object.defineProperty(o,u,{enumerable:!0,get:d})},__nested_webpack_require_620__.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},__nested_webpack_require_620__.t=function(o,u){if(1&u&&(o=__nested_webpack_require_620__(o)),8&u||4&u&&"object"==typeof o&&o&&o.__esModule)return o;var d=Object.create(null);if(__nested_webpack_require_620__.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:o}),2&u&&"string"!=typeof o)for(var m in o)__nested_webpack_require_620__.d(d,m,(function(u){return o[u]}).bind(null,m));return d},__nested_webpack_require_620__.n=function(o){var u=o&&o.__esModule?function(){return o.default}:function(){return o};return __nested_webpack_require_620__.d(u,"a",u),u},__nested_webpack_require_620__.o=function(o,u){return Object.prototype.hasOwnProperty.call(o,u)},__nested_webpack_require_620__.p="",__nested_webpack_require_620__(__nested_webpack_require_620__.s="./src/react-webcam.tsx")}({
1"./src/react-webcam.tsx":function(o,u,d){"use strict";d.r(u);var m,p=d(/*! react */"react"),g=(m=function(o,u){return(m=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(o,u){o.__proto__=u}||function(o,u){for(var d in u)u.hasOwnProperty(d)&&(o[d]=u[d])})(o,u)},function(o,u){function __(){this.constructor=o}m(o,u),o.prototype=null===u?Object.create(u):(__.prototype=u.prototype,new __)}),__assign=function(){return(__assign=Object.assign||function(o){for(var u,d=1,m=arguments.length;d<m;d++)for(var p in u=arguments[d])Object.prototype.hasOwnProperty.call(u,p)&&(o[p]=u[p]);return o}).apply(this,arguments)},__rest=function(o,u){var d={};for(var m in o)Object.prototype.hasOwnProperty.call(o,m)&&0>u.indexOf(m)&&(d[m]=o[m]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols)for(var p=0,m=Object.getOwnPropertySymbols(o);p<m.length;p++)0>u.indexOf(m[p])&&Object.prototype.propertyIsEnumerable.call(o,m[p])&&(d[m[p]]=o[m[p]]);return d};function hasGetUserMedia(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}"undefined"!=typeof window&&(void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(o){var u=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return u?new Promise(function(d,m){u.call(navigator,o,d,m)}):Promise.reject(Error("getUserMedia is not implemented in this browser"))}));var h=function(o){function Webcam(u){var d=o.call(this,u)||this;return d.canvas=null,d.ctx=null,d.requestUserMediaId=0,d.unmounted=!1,d.state={hasUserMedia:!1},d}return g(Webcam,o),Webcam.prototype.componentDidMount=function(){var o=this.state,u=this.props;if(this.unmounted=!1,!hasGetUserMedia()){u.onUserMediaError("getUserMedia not supported");return}o.hasUserMedia||this.requestUserMedia(),u.children&&"function"!=typeof u.children&&console.warn("children must be a function")},Webcam.prototype.componentDidUpdate=function(o){var u=this.props;if(!hasGetUserMedia()){u.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(o.audioConstraints)!==JSON.stringify(u.audioConstraints),m=JSON.stringify(o.videoConstraints)!==JSON.stringify(u.videoConstraints),p=o.minScreenshotWidth!==u.minScreenshotWidth,g=o.minScreenshotHeight!==u.minScreenshotHeight;(m||p||g)&&(this.canvas=null,this.ctx=null),(d||m)&&(this.stopAndCleanup(),this.requestUserMedia())},Webcam.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},Webcam.stopMediaStream=function(o){o&&(o.getVideoTracks&&o.getAudioTracks?(o.getVideoTracks().map(function(u){o.removeTrack(u),u.stop()}),o.getAudioTracks().map(function(u){o.removeTrack(u),u.stop()})):o.stop())},Webcam.prototype.stopAndCleanup=function(){var o=this.state;o.hasUserMedia&&(Webcam.stopMediaStream(this.stream),o.src&&window.URL.revokeObjectURL(o.src))},Webcam.prototype.getScreenshot=function(o){var u=this.state,d=this.props;if(!u.hasUserMedia)return null;var m=this.getCanvas(o);return m&&m.toDataURL(d.screenshotFormat,d.screenshotQuality)},Webcam.prototype.getCanvas=function(o){var u=this.state,d=this.props;if(!this.video||!u.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var m=this.video.videoWidth,p=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var g=m/p;p=(m=d.minScreenshotWidth||this.video.clientWidth)/g,d.minScreenshotHeight&&p<d.minScreenshotHeight&&(m=(p=d.minScreenshotHeight)*g)}this.canvas=document.createElement("canvas"),this.canvas.width=(null==o?void 0:o.width)||m,this.canvas.height=(null==o?void 0:o.height)||p,this.ctx=this.canvas.getContext("2d")}var h=this.ctx,b=this.canvas;return h&&b&&(b.width=(null==o?void 0:o.width)||b.width,b.height=(null==o?void 0:o.height)||b.height,d.mirrored&&(h.translate(b.width,0),h.scale(-1,1)),h.imageSmoothingEnabled=d.imageSmoothing,h.drawImage(this.video,0,0,(null==o?void 0:o.width)||b.width,(null==o?void 0:o.height)||b.height),d.mirrored&&(h.scale(-1,1),h.translate(-b.width,0))),b},Webcam.prototype.requestUserMedia=function(){var o=this,u=this.props,sourceSelected=function(d,m){var p={video:void 0===m||m};u.audio&&(p.audio=void 0===d||d),o.requestUserMediaId++;var g=o.requestUserMediaId;navigator.mediaDevices.getUserMedia(p).then(function(u){o.unmounted||g!==o.requestUserMediaId?Webcam.stopMediaStream(u):o.handleUserMedia(null,u)}).catch(function(u){o.handleUserMedia(u)})};if("mediaDevices"in navigator)sourceSelected(u.audioConstraints,u.videoConstraints);else{var optionalSource_1=function(o){return{optional:[{sourceId:o}]}},constraintToSourceId_1=function(o){var u=o.deviceId;return"string"==typeof u?u:Array.isArray(u)&&u.length>0?u[0]:"object"==typeof u&&u.ideal?u.ideal:null};MediaStreamTrack.getSources(function(o){var d=null,m=null;o.forEach(function(o){"audio"===o.kind?d=o.id:"video"===o.kind&&(m=o.id)});var p=constraintToSourceId_1(u.audioConstraints);p&&(d=p);var g=constraintToSourceId_1(u.videoConstraints);g&&(m=g),sourceSelected(optionalSource_1(d),optionalSource_1(m))})}},Webcam.prototype.handleUserMedia=function(o,u){var d=this.props;if(o||!u){this.setState({hasUserMedia:!1}),d.onUserMediaError(o);return}this.stream=u;try{this.video&&(this.video.srcObject=u),this.setState({hasUserMedia:!0})}catch(o){this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(u)})}d.onUserMedia(u)},Webcam.prototype.render=function(){var o=this,u=this.state,d=this.props,m=d.audio,g=(d.forceScreenshotSourceSize,d.disablePictureInPicture),h=(d.onUserMedia,d.onUserMediaError,d.screenshotFormat,d.screenshotQuality,d.minScreenshotWidth,d.minScreenshotHeight,d.audioConstraints,d.videoConstraints,d.imageSmoothing,d.mirrored),b=d.style,y=void 0===b?{}:b,x=d.children,v=__rest(d,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),_=h?__assign(__assign({},y),{transform:(y.transform||"")+" scaleX(-1)"}):y,j={getScreenshot:this.getScreenshot.bind(this)};return p.createElement(p.Fragment,null,p.createElement("video",__assign({autoPlay:!0,disablePictureInPicture:g,src:u.src,muted:!m,playsInl
1ine:!0,ref:function(u){o.video=u},style:_},v)),x&&x(j))},Webcam.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},Webcam}(p.Component);u.default=h}
1,react:function(o,u){o.exports=m}}).default)},46069:function(o,u,d){"use strict";d.d(u,{fC:function(){return F},z$:function(){return N}});var m=d(67294),p=d(28771),g=d(25360),h=d(36206),b=d(77342),y=d(57898),x=d(7546),v=d(29115),_=d(75320),j=d(85893),w="Checkbox",[O,C]=(0,g.b)(w),[I,S]=O(w),k=m.forwardRef((o,u)=>{let{__scopeCheckbox:d,name:g,checked:y,defaultChecked:x,required:v,disabled:w,value:O="on",onCheckedChange:C,form:S,...k}=o,[P,D]=m.useState(null),F=(0,p.e)(u,o=>D(o)),N=m.useRef(!1),T=!P||S||!!P.closest("form"),[M=!1,z]=(0,b.T)({prop:y,defaultProp:x,onChange:C}),E=m.useRef(M);return m.useEffect(()=>{let o=P?.form;if(o){let reset=()=>z(E.current);return o.addEventListener("reset",reset),()=>o.removeEventListener("reset",reset)}},[P,z]),(0,j.jsxs)(I,{scope:d,state:M,disabled:w,children:[(0,j.jsx)(_.WV.button,{type:"button",role:"checkbox","aria-checked":isIndeterminate(M)?"mixed":M,"aria-required":v,"data-state":getState(M),"data-disabled":w?"":void 0,disabled:w,value:O,...k,ref:F,onKeyDown:(0,h.M)(o.onKeyDown,o=>{"Enter"===o.key&&o.preventDefault()}),onClick:(0,h.M)(o.onClick,o=>{z(o=>!!isIndeterminate(o)||!o),T&&(N.current=o.isPropagationStopped(),N.current||o.stopPropagation())})}),T&&(0,j.jsx)(BubbleInput,{control:P,bubbles:!N.current,name:g,value:O,checked:M,required:v,disabled:w,form:S,style:{transform:"translateX(-100%)"},defaultChecked:!isIndeterminate(x)&&x})]})});k.displayName=w;var P="CheckboxIndicator",D=m.forwardRef((o,u)=>{let{__scopeCheckbox:d,forceMount:m,...p}=o,g=S(P,d);return(0,j.jsx)(v.z,{present:m||isIndeterminate(g.state)||!0===g.state,children:(0,j.jsx)(_.WV.span,{"data-state":getState(g.state),"data-disabled":g.disabled?"":void 0,...p,ref:u,style:{pointerEvents:"none",...o.style}})})});D.displayName=P;var BubbleInput=o=>{let{control:u,checked:d,bubbles:p=!0,defaultChecked:g,...h}=o,b=m.useRef(null),v=(0,y.D)(d),_=(0,x.t)(u);m.useEffect(()=>{let o=b.current,u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked"),g=m.set;if(v!==d&&g){let u=new Event("click",{bubbles:p});o.indeterminate=isIndeterminate(d),g.call(o,!isIndeterminate(d)&&d),o.dispatchEvent(u)}},[v,d,p]);let w=m.useRef(!isIndeterminate(d)&&d);return(0,j.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:g??w.current,...h,tabIndex:-1,ref:b,style:{...o.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function isIndeterminate(o){return"indeterminate"===o}function getState(o){return isIndeterminate(o)?"indeterminate":o?"checked":"unchecked"}var F=k,N=D},57898:function(o,u,d){"use strict";d.d(u,{D:function(){return usePrevious}});var m=d(67294);function usePrevious(o){let u=m.useRef({value:o,previous:o});return m.useMemo(()=>(u.current.value!==o&&(u.current.previous=u.current.value,u.current.value=o),u.current.previous),[o])}}},function(o){o.O(0,[4980,7627,8907,4774,1228,2013,1778,5937,5445,260,3874,4617,955,9866,8941,1057,3609,4090,9401,7237,6556,1827,3777,9483,8434,5860,1773,760,2376,8949,1933,7476,1616,9268,4555,8432,6813,3956,9774,2888,179],function(){return o(o.s=603)}),_N_E=o.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.