!function(e){function t(t){for(var o,i,n=t[0],a=t[1],r=0,c=[];r>>((3&t)<<3)&255;return i}}},function(e,t){for(var o=[],s=0;s<256;++s)o[s]=(s+256).toString(16).substr(1);e.exports=function(e,t){var s=t||0,i=o;return[i[e[s++]],i[e[s++]],i[e[s++]],i[e[s++]],"-",i[e[s++]],i[e[s++]],"-",i[e[s++]],i[e[s++]],"-",i[e[s++]],i[e[s++]],"-",i[e[s++]],i[e[s++]],i[e[s++]],i[e[s++]],i[e[s++]],i[e[s++]]].join("")}},function(e,t,o){"use strict";!function(){const e=document.body,t=e.querySelector(".js-header"),o=t.querySelector(".js-header-overlay"),s=e.querySelector(".js-navigation"),i=window.innerWidth<600,n=window.innerWidth>=600&&window.innerWidth<960,a=document.querySelector(".js-navigation-open"),r=document.querySelector(".js-navigation-back"),l=document.querySelector(".js-navigation-page"),c=document.querySelector(".js-navigation-close"),d=[...document.querySelectorAll(".destination-menu-title")],u=document.querySelector(".js-menu"),p=[...u.querySelectorAll(".js-menu-item")],h=[...u.querySelectorAll('.js-submenu[data-level="1"]')],m=[];function b(){const e=u.querySelector(".js-submenu.is-opened"),t=[...u.querySelectorAll(".js-submenu-item.is-opened")],o=[...u.querySelectorAll(".js-submenu-item.is-opened-bydefault")];e&&e.classList.remove("is-opened"),t.forEach(e=>{e.matches(".is-opened-bydefault")||e.classList.remove("is-opened")}),s.style.overflowY="scroll",o.forEach(e=>{e.matches(".is-opened")||e.classList.add("is-opened")}),r.classList.add("hidden"),l.classList.add("hidden")}h.forEach(e=>{const t={name:e.getAttribute("data-name"),isInited:!1,layout:e.getAttribute("data-layout"),isDefineViewPort:!1};m.push(t)}),a.addEventListener("click",t=>{s.classList.remove("hidden"),e.classList.add("fixed"),o.classList.add("show")}),c.addEventListener("click",t=>{b(),s.classList.add("hidden"),e.classList.remove("fixed"),o.classList.remove("show")}),o.addEventListener("mouseenter",s=>{e.classList.remove("fixed"),t.classList.remove("nav-open"),o.classList.remove("show"),p.forEach(e=>e.classList.remove("is-active")),h.forEach(e=>e.classList.remove("is-opened"))}),u.addEventListener("click",a=>{if(a.target.matches(".js-menu-item-button")||a.target.closest(".js-menu-item-button")){const c=a.target.closest(".js-menu-item").querySelector(".js-submenu"),u=a.target.closest(".js-menu-item");if(i||n){const e=a.target.closest(".js-menu-item-button").querySelector("span").innerText;r.classList.remove("hidden"),l.classList.remove("hidden"),l.innerText=e;const t=d.filter(t=>t.innerText===e)[0].getAttribute("href");l.setAttribute("href",t),c.classList.add("is-opened"),s.scrollTop=0,s.style.overflowY="hidden"}else if(u.matches(".is-active"))u.classList.remove("is-active"),c.classList.remove("is-opened"),o.classList.remove("show"),t.classList.remove("nav-open"),e.classList.remove("fixed");else{o.classList.add("show"),t.classList.add("nav-open"),e.classList.add("fixed"),h.forEach(e=>e.classList.remove("is-opened")),p.forEach(e=>e.classList.remove("is-active")),c.classList.add("is-opened"),u.classList.add("is-active");const s=m.find(e=>e.name==c.getAttribute("data-name"));s.submenu=c,s.menuItem=u,s.layout?function(e){if(e.isInited)return;e.isInited=!0,"hotels"==e.layout&&function(e){(function(e){const t=[...e.submenu.children].filter(e=>e.matches(".js-submenu-item")),o=document.createElement("li"),s=document.createElement("li");o.classList.add("submenu__tab-buttons"),s.classList.add("submenu__tab-content"),e.buttons=[],e.content=[],e.submenus=[],t.forEach(t=>{const i=[...t.children].find(e=>e.matches(".js-submenu-item-button")),n=[...t.children].find(e=>e.matches(".js-submenu")),a=[...n.querySelectorAll(".js-submenu")];e.buttons.push(i),e.content.push(n),e.submenus.push(a),o.appendChild(i),s.appendChild(n),t.remove()}),e.submenu.appendChild(o),e.submenu.appendChild(s)})(e),function(e){e.buttons[0].classList.add("is-active"),e.content[0].classList.add("is-active"),window.innerWidth>=960&&(e.submenus.forEach(e=>e.forEach(e=>e.removeAttribute("class"))),e.submenus.forEach(e=>e.forEach(e=>e.classList.add("columns-active"))));e.buttons.forEach((t,o)=>{t.addEventListener("click",s=>{if(t.matches(".is-active"))return;e.buttons.forEach(e=>e.classList.remove("is-active")),e.content.forEach(e=>e.classList.remove("is-active")),e.submenus.forEach(e=>e.forEach(e=>e.classList.remove("is-active"))),t.classList.add("is-active");e.content.find((e,t)=>o==t).classList.add("is-active");e.submenus.find((e,t)=>o==t).forEach(e=>e.classList.add("is-active"))})})}(e)}(e);"travelMoney"==e.layout&&function(e){const t=[...e.submenu.querySelectorAll(".is-travel-money-item")],o=document.createElement("li");o.classList.add("submenu__item"),o.classList.add("travel-money-container");const s=document.createElement("ul");s.classList.add("travel-money-container__items-list"),t.forEach(e=>{e.classList.remove("submenu__item"),e.classList.add("travel-money-container__item"),e.querySelector("a").classList.remove("submenu__link"),e.querySelector("a").classList.add("travel-money-container__link"),e.querySelector("span").classList.remove("submenu__name"),e.querySelector("span").classList.add("travel-money-container__name"),s.appendChild(e)}),o.appendChild(s),e.submenu.appendChild(o)}(e)}(s):function(e){if(e.isInited)return;if(e.isInited=!0,1==e.submenu.getAttribute("data-level")){const t=[...e.submenu.children];e.columnsNodeList=t.filter(e=>e.matches("[data-column]")),e.columnsNodeList.length&&(e.sortedColumns=function(e){const t=[];return e.forEach(e=>{const o=e.getAttribute("data-column");if(t.length){const s=t.find(e=>e.index==o&&e);s?s.nodeList.push(e):t.push({index:o,nodeList:[e]})}else t.push({index:o,nodeList:[e]})}),t.sort((e,t)=>e.index-t.index)}(e.columnsNodeList),function(e,t){e.forEach(e=>{e.container=document.createElement("li"),e.container.classList.add("submenu__column-container"),e.container.classList.add("js-column-container"),e.container.setAttribute("data-column",e.index),e.nodeList.forEach(t=>e.container.appendChild(t)),e.linksCount=e.container.querySelectorAll(".js-submenu-link:not(.hide-link), .js-submenu-item-button:not(.hide-title)").length;const o=[...e.container.querySelectorAll(".js-submenu-link:not(.hide-link), .js-submenu-item-button:not(.hide-title)")];e.container.innerHTML="";const s=Math.ceil(e.linksCount/15);e.container.classList.add("internal-column--"+s),e.internalColumns=[];for(let t=1;t<=s;t++){const o=document.createElement("div");o.classList.add("submenu__inner-column"),o.classList.add("js-inner-column"),o.setAttribute("data-internal-column",t),e.internalColumns.push(o)}o.forEach(t=>{if(t.closest("[data-column]")&&t.closest("[data-column]").parentNode){const o=t.closest("[data-column]").getAttribute("data-column");e.internalColumns.find(e=>e.getAttribute("data-internal-column")==o).appendChild(t)}else if(t.closest("[data-column]")&&1==e.internalColumns.length||!t.closest("[data-column]").parentNode){const o=1;e.internalColumns.find(e=>e.getAttribute("data-internal-column")==o).appendChild(t)}else if(t.closest("[data-column]")){const o=t.closest("[data-column]").getAttribute("data-column");e.internalColumns.find(e=>e.getAttribute("data-internal-column")==o).appendChild(t)}}),e.internalColumns.forEach(t=>e.container.appendChild(t)),t.appendChild(e.container)})}(e.sortedColumns,e.submenu))}const t=e.submenu.querySelector(".js-see-all-link");t&&e.submenu.appendChild(t)}(s),function(e){if(e.isDefineViewPort)return;if(e.isDefineViewPort=!0,function(e){const t=e.submenu.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.right<=(window.innerWidth||document.documentElement.clientWidth)&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)}(e))return;e.submenu.classList.add("is-scrollable")}(s)}}if((a.target.matches(".js-submenu-item-button")||a.target.closest(".js-submenu-item-button"))&&(i||n)){const e=a.target.closest(".js-submenu-item");e.matches(".is-dropdown")&&(e.classList.toggle("is-opened"),e.matches(".is-opened")&&i&&e.scrollIntoView({behavior:"smooth"}))}}),r.addEventListener("click",e=>{b()});const g=new Map,f=document.querySelectorAll(".submenu__item.js-submenu-item");function x(e){const t=e.target.nextElementSibling;let o=null;t&&(o=t.dataset.level),e.target.matches('a[aria-haspopup="true"]')&&(window.innerWidth<1280&&e.preventDefault(),function(e){if(e)for(const[t,o]of g)e<=o.level&&w(t,o.type);else for(const[e,t]of g)w(e,t.type)}(o),t.classList.remove("hidden"),e.target.setAttribute("aria-expanded","true"),t.setAttribute("aria-hidden","false"),g.set(e.target,{type:"link",level:o}),g.set(t,{type:"submenu",level:o}))}function w(e,t){"link"===t?e.setAttribute("aria-expanded","false"):"submenu"===t&&(e.classList.add("hidden"),e.setAttribute("aria-hidden","true"))}f&&f.forEach(e=>e.addEventListener("click",x)),a&&a.addEventListener("click",x)}()},function(e,t,o){"use strict";!function(){const e=document.querySelector(".js-lng-component"),t=e.querySelector(".js-lng-toggle"),o=e.querySelector(".js-lng-container"),s=e.querySelectorAll(".js-tct-location-item"),i=e.querySelector(".is-active-language-item"),n=[...e.querySelectorAll(".js-tct-language-container")];e&&t.addEventListener("click",e=>{o.classList.toggle("opened")}),document.addEventListener("click",t=>{e.contains(t.target)||o.classList.remove("opened")}),s.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault();const t=e.currentTarget;let o=t.getAttribute("data-location");const a=n.find(e=>e.getAttribute("data-location")===o);a.contains(i)||(s.forEach(e=>{e.classList.remove("is-active-location-item"),e.classList.remove("is-current-location-item")}),n.forEach(e=>e.classList.remove("is-active-language-container")),t.classList.add("is-active-location-item"),a.classList.add("is-active-language-container"),"uk"==o?(o="",window.location.href=window.location.origin+"/"+o):"nl"==o?window.location.href=window.location.origin+"/"+o:"be"==o&&(o="nl-be",a.querySelector(".tct-language-switcher-list").childElementCount<2&&(window.location.href=window.location.origin+"/"+o)))})})}()},function(e,t){function o(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}o.keys=function(){return[]},o.resolve=o,e.exports=o,o.id=8},function(e,t,o){"use strict";const s=!1,i=!0,n=!1,a=!0,r=!0,l=!0,c=!0,d=!0,u=!0,p=!0,h=!0,m=!0,b=!0,g=!0,f=!0,x=!1,w=!0,v=!0,y=!0,k=!0,z=!0,_=!0,D=!0,E=!0,S=!0,$=!0,C=!0,A=!0,F=!0,L=!0,R=!0,j=!0,P=!0,I=!0,T=!0,O=!0,V=!0,U=!0,H=!0,q=!0,N=!0,M=!0,B=!0,W=!0,Y=!1,J=!1,X=!1,G=!1,K=!1,Z=!1,Q=!1,ee=!1,te=!1,oe=!0,se=!1,ie=!0,ne=!1,ae=!0,re=!0,le=!0,ce=!1,de=!0,ue=!0,pe=!1,he=!1,me=!1,be=!0,ge={};let fe,xe,we,ve,ye=0,ke=!1,ze=!1,_e=!1,De=!1,Ee=null,Se=0,$e=!1;const Ce="undefined"!=typeof window?window:{},Ae=(ce&&Ce.CSS,Ce.document||{head:{}}),Fe=(Ce.HTMLElement,{$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,o,s)=>e.addEventListener(t,o,s),rel:(e,t,o,s)=>e.removeEventListener(t,o,s),ce:(e,t)=>new CustomEvent(e,t)}),Le=!ne||!S||(()=>(Ae.head.attachShadow+"").indexOf("[native")>-1)(),Re=(()=>{let e=!1;try{Ae.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch(e){}return e})(),je=!!de&&(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),Pe=(e,t,o,s)=>{m&&o&&(x&&(o=s?o.filter(([e])=>32&e):o.filter(([e])=>!(32&e))),o.map(([o,s,i])=>{const n=w?Te(e,o):e,a=Ie(t,i),r=Oe(o);Fe.ael(n,s,a,r),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>Fe.rel(n,s,a,r))}))},Ie=(e,t)=>o=>{try{ee?256&e.$flags$?e.$lazyInstance$[t](o):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,o]):e.$hostElement$[t](o)}catch(e){Zt(e)}},Te=(e,t)=>g&&4&t?Ae:b&&8&t?Ce:f&&16&t?Ae.body:x&&32&t?e.parentElement:e,Oe=e=>Re?{passive:0!=(1&e),capture:0!=(2&e)}:0!=(2&e),Ve="http://www.w3.org/1999/xlink",Ue=(e,t="")=>{if(te&&performance.mark){const o=`st:${e}:${t}:${ye++}`;return performance.mark(o),()=>performance.measure(`[Stencil] ${e}() <${t}>`,o)}return()=>{}},He=new WeakMap,qe=(e,t,o)=>{let s=io.get(e);je&&o?(s=s||new CSSStyleSheet,s.replace(t)):s=t,io.set(e,s)},Ne=(e,t,o,s)=>{let i=Be(t,o),n=io.get(i);if(!be)return i;if(e=11===e.nodeType?e:Ae,n)if("string"==typeof n){e=e.head||e;let o,a=He.get(e);if(a||He.set(e,a=new Set),!a.has(i)){if(Z&&e.host&&(o=e.querySelector(`[sty-id="${i}"]`)))o.innerHTML=n;else{if(ce&&Fe.$cssShim$){o=Fe.$cssShim$.createHostStyle(s,i,n,!!(10&t.$flags$));const e=o["s-sc"];e&&(i=e,a=null)}else o=Ae.createElement("style"),o.innerHTML=n;(K||Y)&&o.setAttribute("sty-id",i),e.insertBefore(o,e.querySelector("link"))}a&&a.add(i)}}else de&&!e.adoptedStyleSheets.includes(n)&&(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return i},Me=e=>{const t=e.$cmpMeta$,o=e.$hostElement$,s=t.$flags$,i=Ue("attachStyles",t.$tagName$),n=Ne(S&&Le&&o.shadowRoot?o.shadowRoot:o.getRootNode(),t,e.$modeName$,o);(S||E)&&C&&10&s&&(o["s-sc"]=n,o.classList.add(n+"-h"),E&&2&s&&o.classList.add(n+"-s")),i()},Be=(e,t)=>"sc-"+(k&&t&&32&e.$flags$?e.$tagName$+"-"+t:e.$tagName$),We=e=>no.map(t=>t(e)).find(e=>!!e),Ye={},Je=e=>"object"===(e=typeof e)||"function"===e,Xe=(e,t,...o)=>{let s=null,i=null,n=null,a=!1,r=!1,l=[];const c=t=>{for(let o=0;oe[t]).join(" "))}if(X&&l.some(Ze)&&eo("The must be the single root component. Make sure:\n- You are NOT using hostData() and in the same component.\n- is used once, and it's the single root component of the render() function."),T&&"function"==typeof e)return e(null===t?{}:t,l,Qe);const d=Ge(e,null);return d.$attrs$=t,l.length>0&&(d.$children$=l),O&&(d.$key$=i),oe&&(d.$name$=n),d},Ge=(e,t)=>{const o={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return j&&(o.$attrs$=null),O&&(o.$key$=null),oe&&(o.$name$=null),o},Ke={},Ze=e=>e&&e.$tag$===Ke,Qe={forEach:(e,t)=>e.map(et).forEach(t),map:(e,t)=>e.map(et).map(t).map(tt)},et=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),tt=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),Xe(e.vtag,t,...e.vchildren||[])}const t=Ge(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},ot=e=>{const t=Object.keys(e),o=t.indexOf("type"),s=t.indexOf("min"),i=t.indexOf("max"),n=t.indexOf("min"),a=t.indexOf("value");-1!==a&&(a should be set after "min", "max", "type" and "step"')},st=(e,t,o,s,i,n)=>{if(o!==s){let a=Kt(e,t),r=t.toLowerCase();if(I&&"class"===t){const t=e.classList,i=nt(o),n=nt(s);t.remove(...i.filter(e=>e&&!n.includes(e))),t.add(...n.filter(e=>e&&!i.includes(e)))}else if(N&&"style"===t){if(R)for(const t in o)s&&null!=s[t]||(!K&&t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in s)o&&s[t]===o[t]||(!K&&t.includes("-")?e.style.setProperty(t,s[t]):e.style[t]=s[t])}else if(O&&"key"===t);else if(U&&"ref"===t)s&&s(e);else if(!V||(ee?a:e.__lookupSetter__(t))||"o"!==t[0]||"n"!==t[1]){if(H){const l=Je(s);if((a||l&&null!==s)&&!i)try{if(e.tagName.includes("-"))e[t]=s;else{let i=null==s?"":s;"list"===t?a=!1:null!=o&&e[t]==i||(e[t]=i)}}catch(e){}let c=!1;P&&r!==(r=r.replace(/^xlink\:?/,""))&&(t=r,c=!0),null==s||!1===s?!1===s&&""!==e.getAttribute(t)||(P&&c?e.removeAttributeNS(Ve,t):e.removeAttribute(t)):(!a||4&n||i)&&!l&&(s=!0===s?"":s,P&&c?e.setAttributeNS(Ve,t,s):e.setAttribute(t,s))}}else t="-"===t[2]?t.slice(3):Kt(Ce,r)?r.slice(2):r[2]+t.slice(3),o&&Fe.rel(e,t,o,!1),s&&Fe.ael(e,t,s,!1)}},it=/\s/,nt=e=>e?e.split(it):[],at=(e,t,o,s)=>{const i=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,n=e&&e.$attrs$||Ye,a=t.$attrs$||Ye;if(R)for(s in n)s in a||st(i,s,n[s],void 0,o,t.$flags$);for(s in a)st(i,s,n[s],a[s],o,t.$flags$)},rt=(e,t,o,s)=>{let i,n,a,r=t.$children$[o],l=0;if(oe&&!ke&&(_e=!0,"slot"===r.$tag$&&(fe&&s.classList.add(fe+"-s"),r.$flags$|=r.$children$?2:1)),X&&r.$elm$&&eo(`The JSX ${null!==r.$text$?`"${r.$text$}" text`:`"${r.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`),M&&null!==r.$text$)i=r.$elm$=Ae.createTextNode(r.$text$);else if(oe&&1&r.$flags$)i=r.$elm$=J||K?yt(r):Ae.createTextNode("");else{if(L&&!De&&(De="svg"===r.$tag$),i=r.$elm$=L?Ae.createElementNS(De?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",oe&&2&r.$flags$?"slot-fb":r.$tag$):Ae.createElement(oe&&2&r.$flags$?"slot-fb":r.$tag$),L&&De&&"foreignObject"===r.$tag$&&(De=!1),j&&at(null,r,De),(S||E)&&null!=fe&&i["s-si"]!==fe&&i.classList.add(i["s-si"]=fe),r.$children$)for(l=0;l{Fe.$flags$|=1;const o=e.childNodes;for(let e=o.length-1;e>=0;e--){const s=o[e];s["s-hn"]!==we&&s["s-ol"]&&(ht(s).insertBefore(s,pt(s)),s["s-ol"].remove(),s["s-ol"]=void 0,_e=!0),t&<(s,t)}Fe.$flags$&=-2},ct=(e,t,o,s,i,n)=>{let a,r=oe&&e["s-cr"]&&e["s-cr"].parentNode||e;for(S&&r.shadowRoot&&r.tagName===we&&(r=r.shadowRoot);i<=n;++i)s[i]&&(a=rt(null,o,i,e),a&&(s[i].$elm$=a,r.insertBefore(a,oe?pt(t):t)))},dt=(e,t,o,s,i)=>{for(;t<=o;++t)(s=e[t])&&(i=s.$elm$,wt(s),oe&&(ze=!0,i["s-ol"]?i["s-ol"].remove():lt(i,!0)),i.remove())},ut=(e,t)=>e.$tag$===t.$tag$&&(oe&&"slot"===e.$tag$?e.$name$===t.$name$:!O||e.$key$===t.$key$),pt=e=>e&&e["s-ol"]||e,ht=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,mt=(e,t)=>{const o=t.$elm$=e.$elm$,s=e.$children$,i=t.$children$,n=t.$tag$,a=t.$text$;let r;M&&null!==a?M&&oe&&(r=o["s-cr"])?r.parentNode.textContent=a:M&&e.$text$!==a&&(o.data=a):(L&&(De="svg"===n||"foreignObject"!==n&&De),(j||D)&&($&&"slot"===n||at(e,t,De)),R&&null!==s&&null!==i?((e,t,o,s)=>{let i,n,a=0,r=0,l=0,c=0,d=t.length-1,u=t[0],p=t[d],h=s.length-1,m=s[0],b=s[h];for(;a<=d&&r<=h;)if(null==u)u=t[++a];else if(null==p)p=t[--d];else if(null==m)m=s[++r];else if(null==b)b=s[--h];else if(ut(u,m))mt(u,m),u=t[++a],m=s[++r];else if(ut(p,b))mt(p,b),p=t[--d],b=s[--h];else if(ut(u,b))!oe||"slot"!==u.$tag$&&"slot"!==b.$tag$||lt(u.$elm$.parentNode,!1),mt(u,b),e.insertBefore(u.$elm$,p.$elm$.nextSibling),u=t[++a],b=s[--h];else if(ut(p,m))!oe||"slot"!==u.$tag$&&"slot"!==b.$tag$||lt(p.$elm$.parentNode,!1),mt(p,m),e.insertBefore(p.$elm$,u.$elm$),p=t[--d],m=s[++r];else{if(l=-1,O)for(c=a;c<=d;++c)if(t[c]&&null!==t[c].$key$&&t[c].$key$===m.$key$){l=c;break}O&&l>=0?(n=t[l],n.$tag$!==m.$tag$?i=rt(t&&t[r],o,l,e):(mt(n,m),t[l]=void 0,i=n.$elm$),m=s[++r]):(i=rt(t&&t[r],o,r,e),m=s[++r]),i&&(oe?ht(u.$elm$).insertBefore(i,pt(u.$elm$)):u.$elm$.parentNode.insertBefore(i,u.$elm$))}a>d?ct(e,null==s[h+1]?null:s[h+1].$elm$,o,s,r,h):R&&r>h&&dt(t,a,d)})(o,s,t,i):null!==i?(R&&M&&null!==e.$text$&&(o.textContent=""),ct(o,null,t,i,0,i.length-1)):R&&null!==s&&dt(s,0,s.length-1),L&&De&&"svg"===n&&(De=!1))},bt=e=>{let t,o,s,i,n,a,r=e.childNodes;for(o=0,s=r.length;o{let t,o,s,i,n,a,r=0,l=e.childNodes,c=l.length;for(;r=0;a--)o=s[a],o["s-cn"]||o["s-nr"]||o["s-hn"]===t["s-hn"]||(xt(o,i)?(n=gt.find(e=>e.$nodeToRelocate$===o),ze=!0,o["s-sn"]=o["s-sn"]||i,n?n.$slotRefNode$=t:gt.push({$slotRefNode$:t,$nodeToRelocate$:o}),o["s-sr"]&>.map(e=>{xt(e.$nodeToRelocate$,o["s-sn"])&&(n=gt.find(e=>e.$nodeToRelocate$===o),n&&!e.$slotRefNode$&&(e.$slotRefNode$=n.$slotRefNode$))})):gt.some(e=>e.$nodeToRelocate$===o)||gt.push({$nodeToRelocate$:o}));1===t.nodeType&&ft(t)}},xt=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,wt=e=>{U&&(e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(wt))},vt=(e,t)=>{const o=e.$hostElement$,s=e.$cmpMeta$,i=e.$vnode$||Ge(null,null),n=Ze(t)?t:Xe(null,null,t);if(we=o.tagName,X&&Array.isArray(t)&&t.some(Ze))throw new Error(`The must be the single root component.\nLooks like the render() function of "${we.toLowerCase()}" is returning an array that contains the .\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n {content}\n );\n}\n `);if(D&&s.$attrsToReflect$&&(n.$attrs$=n.$attrs$||{},s.$attrsToReflect$.map(([e,t])=>n.$attrs$[t]=o[e])),n.$tag$=null,n.$flags$|=4,e.$vnode$=n,n.$elm$=i.$elm$=S&&o.shadowRoot||o,(E||S)&&(fe=o["s-sc"]),oe&&(xe=o["s-cr"],ke=Le&&0!=(1&s.$flags$),ze=!1),mt(i,n),oe){if(Fe.$flags$|=1,_e){let e,t,o,s,i,a;ft(n.$elm$);let r=0;for(;rAe.createComment(` (host=${we.toLowerCase()})`),kt=e=>Ae.createComment("org-location for "+(e.localName?`<${e.localName}> (host=${e["s-hn"]})`:`[${e.textContent}]`)),zt=(e,t,o)=>{const s=(e=>ee?Xt(e).$hostElement$:e)(e);return{emit:e=>(X&&!s.isConnected&&to(`The "${t}" event was emitted, but the dispatcher node is no longer connected to the dom.`),_t(s,t,{bubbles:!!(4&o),composed:!!(2&o),cancelable:!!(1&o),detail:e}))}},_t=(e,t,o)=>{const s=Fe.ce(t,o);return e.dispatchEvent(s),s},Dt=(e,t)=>{he&&t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise(t=>e.$onRenderResolve$=t))},Et=(e,t)=>{if(W&&R&&(e.$flags$|=16),he&&4&e.$flags$)return void(e.$flags$|=512);Dt(e,e.$ancestorComponent$);const o=()=>St(e,t);return W?bo(o):o()},St=(e,t)=>{const o=e.$hostElement$,s=Ue("scheduleUpdate",e.$cmpMeta$.$tagName$),i=ee?e.$lazyInstance$:o;let n;return t?(ee&&m&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map(([e,t])=>Lt(i,e,t)),e.$queuedListeners$=null)),jt(o,"componentWillLoad"),l&&(n=Lt(i,"componentWillLoad"))):(jt(o,"componentWillUpdate"),c&&(n=Lt(i,"componentWillUpdate"))),jt(o,"componentWillRender"),d&&(n=Rt(n,()=>Lt(i,"componentWillRender"))),s(),Rt(n,()=>$t(e,i,t))},$t=async(e,t,o)=>{const s=e.$hostElement$,i=Ue("update",e.$cmpMeta$.$tagName$),n=s["s-rc"];F&&o&&Me(e);const a=Ue("render",e.$cmpMeta$.$tagName$);if(X&&(e.$flags$|=1024),K?await Ct(e,t,s):Ct(e,t,s),ce&&Fe.$cssShim$&&Fe.$cssShim$.updateHost(s),X&&(e.$renderCount$++,e.$flags$&=-1025),K)try{It(s),o&&(1&e.$cmpMeta$.$flags$?s["s-en"]="":2&e.$cmpMeta$.$flags$&&(s["s-en"]="c"))}catch(e){Zt(e,s)}if(he&&n&&(n.map(e=>e()),s["s-rc"]=void 0),a(),i(),he){const t=s["s-p"],o=()=>At(e);0===t.length?o():(Promise.all(t).then(o),e.$flags$|=4,t.length=0)}else At(e)},Ct=(e,t,o)=>{const i=!!s,n=!!ee,a=!!W,r=!!R;try{if(Ee=t,t=(i||t.render)&&t.render(),r&&a&&(e.$flags$&=-17),(r||n)&&(e.$flags$|=2),h||D)if(q||D){if(K)return Promise.resolve(t).then(t=>vt(e,t));vt(e,t)}else o.textContent=t}catch(t){Zt(t,e.$hostElement$)}return Ee=null,null},At=e=>{const t=e.$cmpMeta$.$tagName$,o=e.$hostElement$,s=Ue("postUpdate",t),n=ee?e.$lazyInstance$:o,l=e.$ancestorComponent$;r&&(X&&(e.$flags$|=1024),Lt(n,"componentDidRender"),X&&(e.$flags$&=-1025)),jt(o,"componentDidRender"),64&e.$flags$?(a&&(X&&(e.$flags$|=1024),Lt(n,"componentDidUpdate"),X&&(e.$flags$&=-1025)),jt(o,"componentDidUpdate"),s()):(e.$flags$|=64,he&&C&&Pt(o),i&&(X&&(e.$flags$|=2048),Lt(n,"componentDidLoad"),X&&(e.$flags$&=-2049)),jt(o,"componentDidLoad"),s(),he&&(e.$onReadyResolve$(o),l||Ft(t))),Y&&o["s-hmr-load"]&&o["s-hmr-load"](),y&&ee&&e.$onInstanceResolve$(o),he&&(e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),512&e.$flags$&&mo(()=>Et(e,!1)),e.$flags$&=-517)},Ft=e=>{C&&Pt(Ae.documentElement),me&&(Fe.$flags$|=2),mo(()=>_t(Ce,"appload",{detail:{namespace:"app"}})),te&&performance.measure&&performance.measure(`[Stencil] app initial load (by ${e})`,"st:app:start")},Lt=(e,t,o)=>{if(e&&e[t])try{return e[t](o)}catch(e){Zt(e)}},Rt=(e,t)=>e&&e.then?e.then(t):t(),jt=(e,t)=>{Q&&_t(e,"stencil_"+t,{bubbles:!0,composed:!0,detail:{namespace:"app"}})},Pt=e=>ie?e.classList.add("hydrated"):se?e.setAttribute("hydrated",""):void 0,It=e=>{const t=e.children;if(null!=t)for(let e=0,o=t.length;e{let r,l,c,d;if(1===n.nodeType){for(r=n.getAttribute("c-id"),r&&(l=r.split("."),l[0]!==a&&"0"!==l[0]||(c={$flags$:0,$hostId$:l[0],$nodeId$:l[1],$depth$:l[2],$index$:l[3],$tag$:n.tagName.toLowerCase(),$elm$:n,$attrs$:null,$children$:null,$key$:null,$name$:null,$text$:null},t.push(c),n.removeAttribute("c-id"),e.$children$||(e.$children$=[]),e.$children$[c.$index$]=c,e=c,s&&"0"===c.$depth$&&(s[c.$index$]=c.$elm$))),d=n.childNodes.length-1;d>=0;d--)Tt(e,t,o,s,i,n.childNodes[d],a);if(n.shadowRoot)for(d=n.shadowRoot.childNodes.length-1;d>=0;d--)Tt(e,t,o,s,i,n.shadowRoot.childNodes[d],a)}else if(8===n.nodeType)l=n.nodeValue.split("."),l[1]!==a&&"0"!==l[1]||(r=l[0],c={$flags$:0,$hostId$:l[1],$nodeId$:l[2],$depth$:l[3],$index$:l[4],$elm$:n,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},"t"===r?(c.$elm$=n.nextSibling,c.$elm$&&3===c.$elm$.nodeType&&(c.$text$=c.$elm$.textContent,t.push(c),n.remove(),e.$children$||(e.$children$=[]),e.$children$[c.$index$]=c,s&&"0"===c.$depth$&&(s[c.$index$]=c.$elm$))):c.$hostId$===a&&("s"===r?(c.$tag$="slot",l[5]?n["s-sn"]=c.$name$=l[5]:n["s-sn"]="",n["s-sr"]=!0,S&&s&&(c.$elm$=Ae.createElement(c.$tag$),c.$name$&&c.$elm$.setAttribute("name",c.$name$),n.parentNode.insertBefore(c.$elm$,n),n.remove(),"0"===c.$depth$&&(s[c.$index$]=c.$elm$)),o.push(c),e.$children$||(e.$children$=[]),e.$children$[c.$index$]=c):"r"===r&&(S&&s?n.remove():oe&&(i["s-cr"]=n,n["s-cn"]=!0))));else if(e&&"style"===e.$tag$){const t=Ge(null,n.textContent);t.$elm$=n,t.$index$="0",e.$children$=[t]}},Ot=(e,t)=>{if(1===e.nodeType){let o=0;for(;o{const i=Xt(e),n=ee?i.$hostElement$:e,a=i.$instanceValues$.get(t),r=i.$flags$,l=ee?i.$lazyInstance$:n;var c,d;if(c=o,d=s.$members$[t][0],o=null==c||Je(c)?c:ae&&4&d?"false"!==c&&(""===c||!!c):re&&2&d?parseFloat(c):le&&1&d?String(c):c,!(ee&&8&r&&void 0!==a||o===a)&&(i.$instanceValues$.set(t,o),X&&(1024&i.$flags$?to(`The state/prop "${t}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,"\nElement",n,"\nNew value",o,"\nOld value",a):2048&i.$flags$&&to(`The state/prop "${t}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,"\nElement",n,"\nNew value",o,"\nOld value",a)),!ee||l)){if(B&&s.$watchers$&&128&r){const e=s.$watchers$[t];e&&e.map(e=>{try{l[e](o,a,t)}catch(e){Zt(e,n)}})}if(R&&2==(18&r)){if(ue&&l.componentShouldUpdate&&!1===l.componentShouldUpdate(o,a,t))return;Et(i,!1)}}},Ut=(e,t,o)=>{if(v&&t.$members$){B&&e.watchers&&(t.$watchers$=e.watchers);const s=Object.entries(t.$members$),i=e.prototype;if(s.map(([e,[s]])=>{(_||A)&&(31&s||(!ee||2&o)&&32&s)?Object.defineProperty(i,e,{get(){return t=e,Xt(this).$instanceValues$.get(t);var t},set(i){if(X){const i=Xt(this);0==(1&o)&&0==(8&i.$flags$)&&0!=(31&s)&&0==(1024&s)&&to(`@Prop() "${e}" on <${t.$tagName$}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`)}Vt(this,e,i,t)},configurable:!0,enumerable:!0}):ee&&y&&1&o&&64&s&&Object.defineProperty(i,e,{value(...t){const o=Xt(this);return o.$onInstancePromise$.then(()=>o.$lazyInstance$[e](...t))}})}),z&&(!ee||1&o)){const o=new Map;i.attributeChangedCallback=function(e,t,s){Fe.jmp(()=>{const t=o.get(e);this.hasOwnProperty(t)&&(s=this[t],delete this[t]),this[t]=(null!==s||"boolean"!=typeof this[t])&&s})},e.observedAttributes=s.filter(([e,t])=>15&t[0]).map(([e,s])=>{const i=s[1]||e;return o.set(i,e),D&&512&s[0]&&t.$attrsToReflect$.push([e,i]),i})}}return e},Ht=async(e,t,s,i,n)=>{if((ee||K||F)&&0==(32&t.$flags$)){if(ee||Z){if(t.$flags$|=32,(n=so(s,t,i)).then){const e=(a=`st:load:${s.$tagName$}:${t.$modeName$}`,r=`[Stencil] Load module for <${s.$tagName$}>`,te&&performance.mark?(0===performance.getEntriesByName(a).length&&performance.mark(a),()=>{0===performance.getEntriesByName(r).length&&performance.measure(r,a)}):()=>{});n=await n,e()}if((X||J)&&!n)throw new Error(`Constructor for "${s.$tagName$}#${t.$modeName$}" was not found`);v&&!n.isProxied&&(B&&(s.$watchers$=n.watchers),Ut(n,s,2),n.isProxied=!0);const e=Ue("createInstance",s.$tagName$);v&&(t.$flags$|=8);try{new n(t)}catch(e){Zt(e)}v&&(t.$flags$&=-9),B&&(t.$flags$|=128),e(),qt(t.$lazyInstance$)}else n=e.constructor,t.$flags$|=32,customElements.whenDefined(s.$tagName$).then(()=>t.$flags$|=128);if(F&&n.style){let i=n.style;k&&"string"!=typeof i&&(i=i[t.$modeName$=We(e)],K&&t.$modeName$&&e.setAttribute("s-mode",t.$modeName$));const a=Be(s,t.$modeName$);if(!io.has(a)){const e=Ue("registerStyles",s.$tagName$);!K&&S&&ne&&8&s.$flags$&&(i=await o.e(30).then(o.bind(null,100)).then(e=>e.scopeCss(i,a,!1))),qe(a,i,!!(1&s.$flags$)),e()}}}var a,r;const l=t.$ancestorComponent$,c=()=>Et(t,!0);he&&l&&l["s-rc"]?l["s-rc"].push(c):c()},qt=e=>{ee&&u&&Lt(e,"connectedCallback")},Nt=e=>{if(0==(1&Fe.$flags$)){const t=Xt(e),o=t.$cmpMeta$,s=Ue("connectedCallback",o.$tagName$);if(x&&Pe(e,t,o.$listeners$,!0),1&t.$flags$)Pe(e,t,o.$listeners$,!1),qt(t.$lazyInstance$);else{let s;if(t.$flags$|=1,Z&&(s=e.getAttribute("s-id"),s)){if(S&&Le&&1&o.$flags$){const t=k?Ne(e.shadowRoot,o,e.getAttribute("s-mode")):Ne(e.shadowRoot,o);e.classList.remove(t+"-h",t+"-s")}((e,t,o,s)=>{const i=Ue("hydrateClient",t),n=e.shadowRoot,a=[],r=S&&n?[]:null,l=s.$vnode$=Ge(t,null);Fe.$orgLocNodes$||Ot(Ae.body,Fe.$orgLocNodes$=new Map),e["s-id"]=o,e.removeAttribute("s-id"),Tt(l,a,[],r,e,e,o),a.map(e=>{const o=e.$hostId$+"."+e.$nodeId$,s=Fe.$orgLocNodes$.get(o),i=e.$elm$;s&&Le&&""===s["s-en"]&&s.parentNode.insertBefore(i,s.nextSibling),n||(i["s-hn"]=t,s&&(i["s-ol"]=s,i["s-ol"]["s-nr"]=i)),Fe.$orgLocNodes$.delete(o)}),S&&n&&r.map(e=>{e&&n.appendChild(e)}),i()})(e,o.$tagName$,s,t)}if(oe&&!s&&(K||($||S)&&12&o.$flags$)&&Mt(e),he){let o=e;for(;o=o.parentNode||o.host;)if(Z&&1===o.nodeType&&o.hasAttribute("s-id")&&o["s-p"]||o["s-p"]){Dt(t,t.$ancestorComponent$=o);break}}_&&!K&&o.$members$&&Object.entries(o.$members$).map(([t,[o]])=>{if(31&o&&e.hasOwnProperty(t)){const o=e[t];delete e[t],e[t]=o}}),pe?mo(()=>Ht(e,t,o)):Ht(e,t,o)}s()}},Mt=e=>{const t=e["s-cr"]=Ae.createComment(J?`content-ref (host=${e.localName})`:"");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},Bt=e=>{if(0==(1&Fe.$flags$)){const t=Xt(e),o=ee?t.$lazyInstance$:e;m&&t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0),ce&&Fe.$cssShim$&&Fe.$cssShim$.removeHost(e),ee&&p&&Lt(o,"disconnectedCallback"),n&&Lt(o,"componentDidUnload")}},Wt=(e,t)=>{const o={$flags$:t[0],$tagName$:t[1]};v&&(o.$members$=t[2]),m&&(o.$listeners$=t[3]),B&&(o.$watchers$=e.$watchers$),D&&(o.$attrsToReflect$=[]),S&&!Le&&1&o.$flags$&&(o.$flags$|=8);const s=e.prototype.connectedCallback,i=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){Gt(this,o)},connectedCallback(){Nt(this),u&&s&&s.call(this)},disconnectedCallback(){Bt(this),p&&i&&i.call(this)}}),e.is=o.$tagName$,Ut(e,o,3)},Yt=(e,t)=>t,Jt=new WeakMap,Xt=e=>Jt.get(e),Gt=(e,t)=>{const o={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return X&&(o.$renderCount$=0),y&&ee&&(o.$onInstancePromise$=new Promise(e=>o.$onInstanceResolve$=e)),he&&(o.$onReadyPromise$=new Promise(e=>o.$onReadyResolve$=e),e["s-p"]=[],e["s-rc"]=[]),Pe(e,o,t.$listeners$,!1),Jt.set(e,o)},Kt=(e,t)=>t in e,Zt=(e,t)=>(ve||console.error)(e,t),Qt=G?["STENCIL:"]:["%cstencil","color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"],eo=(...e)=>console.error(...Qt,...e),to=(...e)=>console.warn(...Qt,...e),oo=new Map,so=(e,t,s)=>{const i=e.$tagName$.replace(/-/g,"_"),n=e.$lazyBundleId$;if(X&&"string"!=typeof n)return void eo(`Trying to lazily load component <${e.$tagName$}> with style mode "${t.$modeName$}", but it does not exist.`);const a=!Y&&oo.get(n);return a?a[i]:o(8)(`./${n}.entry.js${Y&&s?"?s-hmr="+s:""}`).then(e=>(Y||oo.set(n,e),e[i]),Zt)},io=new Map,no=[],ao=[],ro=[],lo=[],co=(e,t)=>o=>{e.push(o),$e||($e=!0,t&&4&Fe.$flags$?mo(ho):Fe.raf(ho))},uo=e=>{for(let t=0;t{let o=0,s=0;for(;o{if(me&&Se++,uo(ao),me){const e=2==(6&Fe.$flags$)?performance.now()+14*Math.ceil(.1*Se):1/0;po(ro,e),po(lo,e),ro.length>0&&(lo.push(...ro),ro.length=0),($e=ao.length+ro.length+lo.length>0)?Fe.raf(ho):Se=0}else uo(ro),($e=ao.length>0)&&Fe.raf(ho)},mo=e=>{return Promise.resolve(t).then(e);var t},bo=co(ro,!0),go="https://login.thomascook.io/signin/oauth2/v2.0/authorize?client_id=f9853451-cee7-40aa-9449-90fe70ce75e2&scope=openid&response_type=code&response_mode=query&redirect_uri=https://stgh5.thomascook.com/tcuk-h5/en-US/loginBack&code_challenge=_r67lcj4MoDNBAkhxS7ke_YKhKCBAiM0SgzNCagbCxo&code_challenge_method=S256&state=QjJDXzFBX1NJR05VUA%3D%3D",fo="https://login.thomascook.io/reset/oauth2/v2.0/authorize?client_id=f9853451-cee7-40aa-9449-90fe70ce75e2&scope=openid&response_type=code&response_mode=query&redirect_uri=https://stgh5.thomascook.com/tcuk-h5/en-US/loginBack&code_challenge=_r67lcj4MoDNBAkhxS7ke_YKhKCBAiM0SgzNCagbCxo&code_challenge_method=S256&state=QjJDXzFBX1JFU0VU%3D%3D",xo="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700;900&display=swap",wo="The verification has failed, please try again.",vo={google:{link:"google",disabled:!0},facebook:{link:"facebook",disabled:!0},twitter:{link:"twitter",disabled:!0}},yo={name:"name",username:"userName",firstName:"firstName",lastName:"lastName",email:"email",birthdate:"dateOfBirth",marketing:"receiveMarketingMail",privacyPolicy:"consent.privacyPolicy",termsConditions:"consent.termsConditions"},ko=Array.from(Array(31),(e,t)=>t+1).map(e=>({title:e,value:e})),zo=["January","February","March","April","May","June","July","August","September","October","November","December"].map((e,t)=>({title:e,value:t})),_o=Array.from(Array((new Date).getFullYear()-1950+1),(e,t)=>1950+t).map(e=>({title:e,value:e})).reverse(),Do={uk:{market:"UK",locale:"en-GB",xpToken:"xp-token-uk",apiLink:"/tc/api/ssapi",userBookingLink:"/my-account/booking",userActivationLink:"/my-account/user/activate",userAuthenticatedLink:"/my-account/user/authenticated",myAccountLink:"/my-account",termsLink:"https://www.thomascook.com/legal/terms-and-conditions",policyLink:"https://www.thomascook.com/privacy-policy",termsLinkApp:"http://h5.thomascook.com/tcuk-h5/en-US/iframe?url=https%3A%2F%2Fh5.thomascook.com%2Fpolicy%2FTerms_en.html&titleSign=set.terms",policyLinkApp:"http://h5.thomascook.com/tcuk-h5/en-US/iframe?url=https%3A%2F%2Fh5.thomascook.com%2Fpolicy%2FPrivacy_Policy_en.html&titleSign=set.privacyPolicy",communityLinkApp:"http://h5.thomascook.com/tcuk-h5/en-US/iframe?url=https%3A%2F%2Fh5.thomascook.com%2Fpolicy%2FCommunity_en.html&titleSign=set.community",resetPasswordLink:"",snAppRedirectLink:""},nl:{market:"NL",locale:"nl-NL",xpToken:"xp-token-nl",apiLink:"/eu/tc/api/ssapi",userBookingLink:"/nl/mijn-account/boeking",userActivationLink:"/nl/mijn-account/gebruiker/activeer",userAuthenticatedLink:"/nl/mijn-account/gebruiker/authenticated",myAccountLink:"/nl/mijn-account",termsLink:"https://www.thomascook.com/nl/voorwaarden/website",policyLink:"https://www.thomascook.com/nl/privacy",termsLinkApp:"http://h5.thomascook.com/tcuk-h5/en-US/iframe?url=https%3A%2F%2Fh5.thomascook.com%2Fpolicy%2FTerms_en.html&titleSign=set.terms",policyLinkApp:"http://h5.thomascook.com/tcuk-h5/en-US/iframe?url=https%3A%2F%2Fh5.thomascook.com%2Fpolicy%2FPrivacy_Policy_en.html&titleSign=set.privacyPolicy",communityLinkApp:"http://h5.thomascook.com/tcuk-h5/en-US/iframe?url=https%3A%2F%2Fh5.thomascook.com%2Fpolicy%2FCommunity_en.html&titleSign=set.community",resetPasswordLink:"",snAppRedirectLink:""},be:{market:"BE",locale:"nl-BE",xpToken:"xp-token-be",apiLink:"/eu/tc/api/ssapi",userBookingLink:"/nl/mijn-account/boeking",userActivationLink:"/nl/mijn-account/gebruiker/activeer",userAuthenticatedLink:"/nl/mijn-account/gebruiker/authenticated",myAccountLink:"/nl/mijn-account",termsLink:"https://www.thomascook.com/nl/voorwaarden/website",policyLink:"https://www.thomascook.com/nl/privacy",termsLinkApp:"http://h5.thomascook.com/tcuk-h5/en-US/iframe?url=https%3A%2F%2Fh5.thomascook.com%2Fpolicy%2FTerms_en.html&titleSign=set.terms",policyLinkApp:"http://h5.thomascook.com/tcuk-h5/en-US/iframe?url=https%3A%2F%2Fh5.thomascook.com%2Fpolicy%2FPrivacy_Policy_en.html&titleSign=set.privacyPolicy",communityLinkApp:"http://h5.thomascook.com/tcuk-h5/en-US/iframe?url=https%3A%2F%2Fh5.thomascook.com%2Fpolicy%2FCommunity_en.html&titleSign=set.community",resetPasswordLink:"",snAppRedirectLink:""}};var Eo,So,$o;Do["nl-be"]=Do.nl,function(e){e.tcPortalSignUp="tcPortalSignUp",e.tcPortalSignIn="tcPortalSignIn",e.tcPortalResetPassword="tcPortalResetPassword",e.tcAppSignUp="tcAppSignUp",e.tcAppSocialSignUp="tcAppSocialSignUp",e.tcAppSignIn="tcAppSignIn",e.tcAppResetPassword="tcAppResetPassword"}(Eo||(Eo={})),function(e){e.signUpMainNoVercode="signUpMainNoVercode",e.signUpMainWithVercode="signUpMainWithVercode",e.signUpMain="signUpMain",e.signUpVercode="signUpVercode",e.signUpWrongCode="signUpWrongCode",e.signIn="signIn",e.resetPasswordEmail="resetPasswordEmail",e.resetPasswordVercode="resetPasswordVercode",e.resetPasswordConfirmation="resetPasswordConfirmation",e.signUpMobileDobAndEmail="signUpMobileDobAndEmail",e.signUpMobilePasswordAndNames="signUpMobilePasswordAndNames",e.welcomePage="welcomePage",e.tcAppBirthdate="tcAppBirthdate",e.tcAppEmail="tcAppEmail",e.tcAppVercode="tcAppVercode",e.tcAppWrongCode="tcAppWrongCode",e.tcAppNewPassword="tcAppNewPassword",e.tcAppName="tcAppName",e.tcAppUsername="tcAppUsername",e.tcAppChangePassword="tcAppChangePassword"}(So||(So={})),function(e){e.signUpSendCodeResponse="azure_SignUpSendCodeResponse",e.signUpVerCodeResponse="azure_SignUpVerCodeResponse",e.signUpConfirmResponse="azure_SignUpConfirmResponse",e.signInConfirmResponse="azure_SignInConfirmResponse",e.resetPasswordSendCodeResponse="azure_ResetPasswordSendCodeResponse",e.resetPasswordVerCodeResponse="azure_ResetPasswordVerCodeResponse",e.resetPasswordConfirmResponse="azure_ResetPasswordConfirmResponse"}($o||($o={}));const Co={VERIFICATION_REQUEST:"SendCode",VALIDATION_REQUEST:"VerifyCode"},Ao={signUp:{SendCode:$o.signUpSendCodeResponse,VerifyCode:$o.signUpVerCodeResponse,SelfAsserted:$o.signUpConfirmResponse},signIn:{SelfAsserted:$o.signInConfirmResponse},resetPassword:{SendCode:$o.resetPasswordSendCodeResponse,VerifyCode:$o.resetPasswordVerCodeResponse,SelfAsserted:$o.resetPasswordConfirmResponse}},Fo=e=>{const t=RegExp(e+"[^;]+").exec(document.cookie);return decodeURIComponent(t?t.toString().replace(/^[^=]+./,""):"")},Lo=e=>{const t=document.getElementById("api");if(null==t)return null;let o;switch(e){case Eo.tcPortalSignUp:null!=t.querySelector("#email")&&null!=t.querySelector("#surname")?o=So.signUpMainWithVercode:null!=t.querySelector("#email")&&null!=t.querySelector("#vercode")&&(o=So.signUpVercode);break;case Eo.tcPortalResetPassword:null!=t.querySelector("#email")?o=So.resetPasswordEmail:null!=t.querySelector("#newPassword")&&null!=window.location.href.match("password")&&(o=So.resetPasswordConfirmation)}return o},Ro=e=>{const t=document.getElementById("api");if(null==t)return null;let o;switch(e){case Eo.tcAppSignUp:null!=t.querySelector("#email")&&null!=t.querySelector("#dateOfBirth")&&null==t.querySelector("#newPassword")?o=So.tcAppBirthdate:null!=t.querySelector("#newPassword")&&(o=So.tcAppNewPassword);break;case Eo.tcAppSocialSignUp:o=So.tcAppBirthdate;break;case Eo.tcAppResetPassword:null!=t.querySelector("#email")&&null==t.querySelector("#newPassword")?o=So.tcAppEmail:null!=t.querySelector("#newPassword")&&(o=So.tcAppNewPassword)}return o},jo=e=>{let t;switch(e){case Eo.tcPortalSignUp:case Eo.tcAppSignUp:o((function(e){if(null==document.getElementById("api"))return;const o=200!==e.status?{message:e.message}:null,s=new CustomEvent(Ao.signUp[t],{detail:{status:e.status,error:o}});console.log("SignUpProxyCallback",e),document.dispatchEvent(s)}));break;case Eo.tcPortalSignIn:case Eo.tcAppSignIn:o((function(e){if(null==document.getElementById("api"))return;const o=200!==e.status?{message:e.message}:null,s=new CustomEvent(Ao.signIn[t],{detail:{status:e.status,error:o}});console.log("SignInProxyCallback",e),document.dispatchEvent(s)}));break;case Eo.tcPortalResetPassword:case Eo.tcAppResetPassword:o((function(e){if(null==document.getElementById("api"))return;const o=200!==e.status?{message:e.message}:null,s=new CustomEvent(Ao.resetPassword[t],{detail:{status:e.status,error:o}});console.log("ResetPasswordProxyCallback",e),document.dispatchEvent(s)}))}function o(e){const o=window.XMLHttpRequest.prototype.open;window.XMLHttpRequest.prototype.open=function(e,s){var i;const n="(SendCode|VerifyCode|SelfAsserted)";return t=null===(i=s.match(new RegExp(n,"g")))||void 0===i?void 0:i.reverse()[0],o.apply(this,[].slice.call(arguments))};const s=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(){const o=new URLSearchParams(arguments[0]);o.has("request_type")&&(t=Co[o.get("request_type")]||t);const i=this,n=window.setInterval(()=>{if(4!=i.readyState)return;clearInterval(n);let t=JSON.parse(i.responseText);"function"==typeof e&&e(t)},1);return s.apply(this,[].slice.call(arguments))}}},Po=e=>{let t=document.querySelector(`link[href='${e}']`);t||(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.head.appendChild(t))},Io=(e,t={})=>{let o=window.location.pathname.split("/")[1];if(!e[o]){o=new URLSearchParams(window.location.search).get("ui_locales")}e[o]||(o="uk");const s=e[o];return s.resetPasswordLink=`${t.maResetPassLink}&redirect_uri=${encodeURIComponent(window.location.origin+s.userAuthenticatedLink)}`,Object.assign(Object.assign({},s),{domainEnv:t.domainEnv})};const To=class{constructor(){this._defaultConfigJson={uk:"/assets/sso/config.uk.json",nl:"/assets/sso/config.nl.json",be:"/assets/sso/config.be.json"},this._currentMarket=Io(Do,{}),this.loadConfig()}static get Instance(){return this._instance||(this._instance=new this)}get currentMarket(){return this._currentMarket}async loadConfig(){let e;const t=this._currentMarket.market.toLowerCase();try{const o=t+"ConfigUrl",s=await fetch((window.configUrls?window.configUrls[o]:"")||ge[o]||this._defaultConfigJson[t]);e=await s.json()}catch(e){console.log(e)}this._currentMarket=Io(Do,e)}}.Instance;class Oo{constructor(){this._tokenQueryName="id_token";const e=this.getTokenFromQueries()||this.getTokenFromHash();e&&(this.setToken(e),this.clearIdTokenFromUrl())}static get Instance(){return this._instance||(this._instance=new this)}get getTokenCookieName(){var e;return null===(e=To.currentMarket)||void 0===e?void 0:e.xpToken}get getToken(){return Fo(this.getTokenCookieName)||null}setToken(e=""){var t;try{let o=(new Date).toUTCString();if(e){const t=this.parseJwt(e);o=new Date(1e3*t.exp).toUTCString()}((e,t,o=null,s=!1)=>{const i=new Date,n=s?0:new Date(i.setFullYear(i.getFullYear()+1));document.cookie=`${e}=${t}; expires=${(null==o?void 0:o.expires)||n}; path=${(null==o?void 0:o.path)||"/"}; ${(null==o?void 0:o.domain)?"domain="+(null==o?void 0:o.domain):""}`})(null===(t=To.currentMarket)||void 0===t?void 0:t.xpToken,e,{expires:o,path:"/",domain:window.location.hostname})}catch(e){console.log(e)}}getTokenFromQueries(){const e=new URLSearchParams(window.location.search);return null==e?void 0:e.get(this._tokenQueryName)}getTokenFromHash(){var e;const t=new URL(window.location.href.replace(/#/g,"?"));return null===(e=null==t?void 0:t.searchParams)||void 0===e?void 0:e.get(this._tokenQueryName)}parseJwt(e){const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(window.atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(o)}clearIdTokenFromString(e){if(!e)return"";const t=new URLSearchParams(e);return null==t||t.delete(this._tokenQueryName),t.toString()}clearIdTokenFromUrl(){var e,t;let o=this.clearIdTokenFromString(window.location.search);o&&(o="?"+o);let s=this.clearIdTokenFromString(window.location.hash.slice(1));s&&(s="#"+s);let i=null===(t=null===(e=window.location.href)||void 0===e?void 0:e.split("?")[0])||void 0===t?void 0:t.split("#")[0];i=`${window.location.origin}${window.location.pathname}${o}${s}`,window.history.pushState("object",document.title,i)}}class Vo{constructor(){this._tokenService=Oo.Instance}static get Instance(){return this._instance||(this._instance=new this)}createBasicHeaders(){const e={"Content-Type":"application/json;charset=utf-8",Accept:"application/json;charset=utf-8","x-session-id":Fo("tct.session_id")};return new Headers(e)}createPostRequest(e=null,t={}){return Object.assign({method:"POST",body:e?JSON.stringify(Object.assign(Object.assign({},e),this.getLocaleAndMarket())):null,headers:this.createBasicHeaders()},t)}withQuery(e,t){return e+"?"+new URLSearchParams(t)}getLocaleAndMarket(){var e,t;return{market:null===(e=To.currentMarket)||void 0===e?void 0:e.market,locale:null===(t=To.currentMarket)||void 0===t?void 0:t.locale}}createGetRequest(e={}){return Object.assign({method:"GET",headers:this.createBasicHeaders()},e)}async signUpSendCode(e){var t;let o;try{return o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"http://SEND_VERCODE_URL",this.createPostRequest(e)),o.json()}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async signUpResendCode(e){var t;let o;try{return o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"http://RESEND_VERCODE_URL",this.createPostRequest(e)),o.json()}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async signUpVerifyEmail(e){var t;let o;try{return o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"http://VERIFY_EMAIL_URL",this.createPostRequest(e)),o.json()}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async signUpConfirm(e){var t;let o;try{o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"/myaccount/1.60/register?autoSignIn=true",this.createPostRequest(e));const s=await o.json();return this.hasError(o,s)?{error:s,status:null==o?void 0:o.status}:{data:s,status:null==o?void 0:o.status}}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async signInConfirm(e){var t;let o,s;try{const i={username:e.email.value,password:e.password.value,remember:e.remember.value};o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"/myaccount/1.60/signIn",this.createPostRequest(i));const n=await o.json();return this.hasError(o,n)?(s={error:n,status:500},this.dispatchEvent("tctSignInFinishedEvent",s),s):(s={data:n,status:null==o?void 0:o.status},this.dispatchEvent("tctSignInFinishedEvent",s),s)}catch(e){return console.log(e),s={error:{},status:null==o?void 0:o.status},this.dispatchEvent("tctSignInFinishedEvent",s),s}}async resetPasswordSendCode(e){var t;let o;try{return o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"http://SEND_VERCODE_URL",this.createPostRequest(e)),o.json()}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async resetPasswordResendCode(e){var t;let o;try{return o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"http://RESEND_VERCODE_URL",this.createPostRequest(e)),o.json()}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async resetPasswordVerifyEmail(e){var t;let o;try{return o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"http://VERIFY_EMAIL_URL",this.createPostRequest(e)),o.json()}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async resetPasswordEmailConfirm(e){var t;let o;try{return o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"http://RESET_PASSWORD",this.createPostRequest(e)),o.json()}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async resetPasswordConfirm(e){var t;let o;try{return o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"http://RESET_PASSWORD",this.createPostRequest(e)),o.json()}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async signOut(){var e;let t;try{if(t=await fetch((null===(e=To.currentMarket)||void 0===e?void 0:e.apiLink)+"/myaccount/1.60/signOut",this.createGetRequest()),this.hasError(t)){return{error:await t.json(),status:null==t?void 0:t.status}}const o={data:await t.json(),status:null==t?void 0:t.status};return this._tokenService.setToken(),this.dispatchEvent("tctSignOutFinishedEvent",o),null===window||void 0===window||window.location.reload(),o}catch(e){return console.log(e),{error:{},status:null==t?void 0:t.status}}}async getWishlists(){var e;let t;try{t=await fetch((null===(e=To.currentMarket)||void 0===e?void 0:e.apiLink)+"/myaccount/1.60/getWishlists",this.createGetRequest());const o=await t.json();return this.hasError(t,o)?{error:o,status:null==t?void 0:t.status}:{data:o,status:null==t?void 0:t.status}}catch(e){return console.log(e),{error:{},status:null==t?void 0:t.status}}}async getProfile(){var e;let t;try{t=await fetch(this.withQuery((null===(e=To.currentMarket)||void 0===e?void 0:e.apiLink)+"/myaccount/1.60/me",Object.assign({},this.getLocaleAndMarket())),this.createGetRequest());const o=await t.json();return this.hasError(t,o)?{error:o,status:null==t?void 0:t.status}:{data:o,status:null==t?void 0:t.status}}catch(e){return console.log(e),{error:{},status:null==t?void 0:t.status}}}async setProfile(e){var t;let o;try{return o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"/myaccount/1.60/setProfile",this.createPostRequest(e)),{data:e=await o.json(),status:null==o?void 0:o.status}}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async setProfileTcApp(e,t){var o;let s;try{const i={dateOfBirth:e.birthdate.value,email:e.email.value,username:e.username.value,name:e.name.value,consent:{privacyPolicy:e.privacyPolicy.value,termsConditions:e.termsConditions.value},receiveMarketingMail:e.marketing.value},n=this._tokenService.getToken;s=await fetch(this.withQuery((null===(o=To.currentMarket)||void 0===o?void 0:o.apiLink)+"/myaccount/1.60/setProfile",Object.assign({id_token:n},t)),this.createPostRequest(i));const a=await s.json();return this.hasError(s,a)?{error:a,status:null==s?void 0:s.status}:{data:a,status:null==s?void 0:s.status}}catch(e){return console.log(e),{error:{},status:null==s?void 0:s.status}}}async validateAccount(e){var t;let o;try{o=await fetch(this.withQuery((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"/myaccount/1.60/validate",Object.assign(Object.assign({},this.getLocaleAndMarket()),e)),this.createGetRequest());const s=await o.json();return this.hasError(o,s)?{error:s,status:null==o?void 0:o.status}:{data:s,status:null==o?void 0:o.status}}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}async resendActivation(e){var t;let o;try{o=await fetch((null===(t=To.currentMarket)||void 0===t?void 0:t.apiLink)+"/myaccount/1.60/resendActivation",this.createPostRequest(e));const s=await o.json();return this.hasError(o,s)?{error:s,status:null==o?void 0:o.status}:{data:s,status:null==o?void 0:o.status}}catch(e){return console.log(e),{error:{},status:null==o?void 0:o.status}}}hasError(e,t=null){return 200!==(null==e?void 0:e.status)||e.code||200===(null==e?void 0:e.status)&&((null==t?void 0:t.errorMessage)||(null==t?void 0:t.subcode)||(null==t?void 0:t.subCode))}dispatchEvent(e,t={}){const o=new CustomEvent(e,{detail:t});document?document.dispatchEvent(o):dispatchEvent(o)}}function Uo(e){return"function"==typeof e}let Ho=!1;const qo={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else Ho&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Ho=e},get useDeprecatedSynchronousErrorHandling(){return Ho}};function No(e){setTimeout(()=>{throw e},0)}const Mo={closed:!0,next(e){},error(e){if(qo.useDeprecatedSynchronousErrorHandling)throw e;No(e)},complete(){}},Bo=Array.isArray||(e=>e&&"number"==typeof e.length);function Wo(e){return null!==e&&"object"==typeof e}const Yo=(()=>{function e(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((e,t)=>`${t+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e})();class Jo{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:o,_unsubscribe:s,_subscriptions:i}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof Jo)t.remove(this);else if(null!==t)for(let e=0;ee.concat(t instanceof Yo?t.errors:t),[])}Jo.EMPTY=function(e){return e.closed=!0,e}(new Jo);const Go="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class Ko extends Jo{constructor(e,t,o){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Mo;break;case 1:if(!e){this.destination=Mo;break}if("object"==typeof e){e instanceof Ko?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new Zo(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new Zo(this,e,t,o)}}[Go](){return this}static create(e,t,o){const s=new Ko(e,t,o);return s.syncErrorThrowable=!1,s}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class Zo extends Ko{constructor(e,t,o,s){let i;super(),this._parentSubscriber=e;let n=this;Uo(t)?i=t:t&&(i=t.next,o=t.error,s=t.complete,t!==Mo&&(n=Object.create(t),Uo(n.unsubscribe)&&this.add(n.unsubscribe.bind(n)),n.unsubscribe=this.unsubscribe.bind(this))),this._context=n,this._next=i,this._error=o,this._complete=s}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;qo.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:o}=qo;if(this._error)o&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)o?(t.syncErrorValue=e,t.syncErrorThrown=!0):No(e),this.unsubscribe();else{if(this.unsubscribe(),o)throw e;No(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);qo.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),qo.useDeprecatedSynchronousErrorHandling)throw e;No(e)}}__tryOrSetError(e,t,o){if(!qo.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,o)}catch(t){return qo.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(No(t),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const Qo="function"==typeof Symbol&&Symbol.observable||"@@observable";function es(e){return e}class ts{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const t=new ts;return t.source=this,t.operator=e,t}subscribe(e,t,o){const{operator:s}=this,i=function(e,t,o){if(e){if(e instanceof Ko)return e;if(e[Go])return e[Go]()}return e||t||o?new Ko(e,t,o):new Ko(Mo)}(e,t,o);if(s?i.add(s.call(i,this.source)):i.add(this.source||qo.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),qo.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i}_trySubscribe(e){try{return this._subscribe(e)}catch(t){qo.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),!function(e){for(;e;){const{closed:t,destination:o,isStopped:s}=e;if(t||s)return!1;e=o&&o instanceof Ko?o:null}return!0}(e)?console.warn(t):e.error(t)}}forEach(e,t){return new(t=os(t))((t,o)=>{let s;s=this.subscribe(t=>{try{e(t)}catch(e){o(e),s&&s.unsubscribe()}},o,t)})}_subscribe(e){const{source:t}=this;return t&&t.subscribe(e)}[Qo](){return this}pipe(...e){return 0===e.length?this:(0===(t=e).length?es:1===t.length?t[0]:function(e){return t.reduce((e,t)=>t(e),e)})(this);var t}toPromise(e){return new(e=os(e))((e,t)=>{let o;this.subscribe(e=>o=e,e=>t(e),()=>e(o))})}}function os(e){if(e||(e=Promise),!e)throw new Error("no Promise impl found");return e}ts.create=e=>new ts(e);const ss=(()=>{function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e})();class is extends Jo{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const o=t.indexOf(this.subscriber);-1!==o&&t.splice(o,1)}}class ns extends Ko{constructor(e){super(e),this.destination=e}}class as extends ts{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[Go](){return new ns(this)}lift(e){const t=new rs(this,this);return t.operator=e,t}next(e){if(this.closed)throw new ss;if(!this.isStopped){const{observers:t}=this,o=t.length,s=t.slice();for(let t=0;tnew rs(e,t);class rs extends as{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):Jo.EMPTY}}class ls extends as{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new ss;return this._value}next(e){super.next(this._value=e)}}class cs{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new ds(e,this.project,this.thisArg))}}class ds extends Ko{constructor(e,t,o){super(e),this.project=t,this.count=0,this.thisArg=o||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)}}const us="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";const ps=e=>{if(e&&"function"==typeof e[Qo])return a=e,e=>{const t=a[Qo]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if((n=e)&&"number"==typeof n.length&&"function"!=typeof n)return i=e,e=>{for(let t=0,o=i.length;t(o.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,No),e);if(e&&"function"==typeof e[us])return t=e,e=>{const o=t[us]();for(;;){let t;try{t=o.next()}catch(t){return e.error(t),e}if(t.done){e.complete();break}if(e.next(t.value),e.closed)break}return"function"==typeof o.return&&e.add(()=>{o.return&&o.return()}),e};{const t=Wo(e)?"an invalid object":`'${e}'`;throw new TypeError(`You provided ${t} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var t,o,s,i,n,a};class hs extends Ko{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class ms extends Ko{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function bs(e,t,o,s){return Uo(o)&&(s=o,o=void 0),s?bs(e,t,o).pipe((i=e=>Bo(e)?s(...e):s(e),function(e){if("function"!=typeof i)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return e.lift(new cs(i,n))})):new ts(s=>{!function e(t,o,s,i,n){let a;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(t)){const e=t;t.addEventListener(o,s,n),a=()=>e.removeEventListener(o,s,n)}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(t)){const e=t;t.on(o,s),a=()=>e.off(o,s)}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(t)){const e=t;t.addListener(o,s),a=()=>e.removeListener(o,s)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let a=0,r=t.length;a1?s.next(Array.prototype.slice.call(arguments)):s.next(e)}),s,o)});var i,n}function gs(e){return t=>t.lift(new fs(e))}class fs{constructor(e){this.notifier=e}call(e,t){const o=new xs(e),s=function(e,t){if(t.closed)return;if(e instanceof ts)return e.subscribe(t);let o;try{o=ps(e)(t)}catch(e){t.error(e)}return o}(this.notifier,new hs(o));return s&&!o.seenValue?(o.add(s),t.subscribe(o)):o}}class xs extends ms{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}const ws={data:{}},vs=Object.assign(Object.assign({},ws),{hasBackdrop:!1});var ys;!function(e){e[e.Handset=599.98]="Handset",e[e.Web=960]="Web",e[e.Large=1280]="Large"}(ys||(ys={}));class ks{static get Instance(){return this._instance||(this._instance=new this)}get isMobile(){return window.innerWidth<=ys.Handset}get isTablet(){return window.innerWidth>=ys.Handset&&window.innerWidth=ys.Web}fixHtml(e=!1){document.querySelector("html").style.overflow=e?"hidden":"unset"}}class zs{constructor(){this._userProfile=null,this._userProfile$=new ls(null),this._apiClientService=Vo.Instance}static get Instance(){return this._instance||(this._instance=new this)}get userProfile$(){return this._userProfile$}get userProfile(){return this._userProfile}set userProfile(e){this._userProfile=e}async getUserProfile(){const e=await this._apiClientService.getProfile();200===e.status&&(this.userProfile=e.data,this.userProfile$.next(this.userProfile))}}class _s extends class{constructor(){this._tokenService=Oo.Instance,this._authToken$=new ls(this.authToken),this._authFlow$=new as,this._unsubscribe$=new as,bs(document,"tctSignInFinishedEvent").pipe(gs(this._unsubscribe$)).subscribe(e=>{this._authToken$.next(this.authToken),this._authDialog&&200===e.detail.status&&(this.finalizeAuth(),this.closeAuthDialog(!0))}),bs(document,"tctChangeFlow").pipe(gs(this._unsubscribe$)).subscribe(e=>{"signUp"===e.detail?this.openRegisterForm():"signIn"===e.detail?this.openLoginForm():"welcome"===e.detail?this.openWelcome():"signupSuccess"===e.detail?this.openAuthSuccess():this.closeAuthDialog()})}get authToken$(){return this._authToken$}get authToken(){return this._tokenService.getToken}get authFlow$(){return this._authFlow$}get authFlow(){return this._authFlow}set authFlow(e){this._authFlow=e,this._authFlow$.next(this._authFlow)}get authDialog(){return this._authDialog}set authDialog(e){this._authDialog=e}get unsubOnRemove(){return this._unsubscribe$}prepareDialogConfig(e,t){return Object.assign(Object.assign(Object.assign({},t),e),{position:(null==e?void 0:e.position)||((null==e?void 0:e.relativeToElement)?this.calcPositionRelativeToElement(null==e?void 0:e.relativeToElement):{}),data:Object.assign(Object.assign({},(null==e?void 0:e.data)||{}),{flow:this.authFlow,flow$:this.authFlow$,isRelativePosition:!!(null==e?void 0:e.relativeToElement)})})}openNavigationMenu(e=null){if(this.authDialog&&"navigationMenu"===this.authFlow)return;this.authFlow="navigationMenu";const t=this.prepareDialogConfig(e,vs);this._authDialog=this.openAuthDialog(this.authFlow,t)}openLoginSmallForm(e=null){if(this.authDialog&&"signInSmall"===this.authFlow)return;this.authFlow="signInSmall";const t=this.prepareDialogConfig(e,vs);this._authDialog=this.openAuthDialog(this.authFlow,t)}openLoginForm(e=null){if(this.authDialog&&"signInSmall"!==this.authFlow&&"navigationMenu"!==this.authFlow)return void(this.authFlow="signIn");this.authFlow="signIn";const t=this.prepareDialogConfig(e,ws);this._authDialog=this.openAuthDialog(this.authFlow,t)}openRegisterForm(e=null){if(this.authDialog&&"signInSmall"!==this.authFlow&&"navigationMenu"!==this.authFlow)return void(this.authFlow="signUp");this.authFlow="signUp";const t=this.prepareDialogConfig(e,ws);this._authDialog=this.openAuthDialog(this.authFlow,t)}openWelcome(e=null){if(this.authDialog&&"signInSmall"!==this.authFlow&&"navigationMenu"!==this.authFlow)return void(this.authFlow="welcome");this.authFlow="welcome";const t=this.prepareDialogConfig(e,ws);this._authDialog=this.openAuthDialog(this.authFlow,t)}openAuthSuccess(e=null){if(this.authDialog&&"signInSmall"!==this.authFlow&&"navigationMenu"!==this.authFlow)return void(this.authFlow="signupSuccess");this.authFlow="signupSuccess";const t=this.prepareDialogConfig(e,ws);this._authDialog=this.openAuthDialog(this.authFlow,t)}}{constructor(){super(),this._deviceService=ks.Instance,this._userService=zs.Instance,this.authToken&&this._userService.getUserProfile()}static get Instance(){return this._instance||(this._instance=new this)}get userProfile$(){return this._userService.userProfile$}get userProfile(){return this._userService.userProfile}createLoggedInIterator(e,t=this.openLoginForm.bind(this)){this._loggedInIterator=this.doSomethingOnLogIn(e,t),this._loggedInIterator.next()}clearLoggedInIterator(){this._loggedInIterator=null}closeAuthDialog(){var e;null===(e=this.authDialog)||void 0===e||e.close(),this.authDialog=void 0,this._deviceService.fixHtml(!1)}drawDialog(e,t=0){setTimeout(()=>{document.body.appendChild(e)},t)}*doSomethingOnLogIn(e,t){if(this.authToken)return yield e(),void this.clearLoggedInIterator();yield t(),yield e()}openAuthDialog(e,t){const o=!!this.authDialog;o&&this.closeAuthDialog();const s=document.createElement("tc-my-account-auth-dialog");return s.flow=e,s.config=t,"signInSmall"!==e&&"navigationMenu"!==e&&(s.classList.add("fixed"),this._deviceService.fixHtml(!0)),this.drawDialog(s,o?100:0),s}finalizeAuth(){if(this.userProfile$.next("blablabla"),this._loggedInIterator)return this._loggedInIterator.next(),this.clearLoggedInIterator(),void this._userService.getUserProfile();const e=new URLSearchParams(window.location.search);if(e.get("returnUrl"))try{const t=new URL(e.get("returnUrl"));window.location.href=t.origin===window.location.origin?t.pathname:window.location.href.split("?")[0]}catch(t){window.location.href=e.get("returnUrl")}else window.location.reload()}calcPositionRelativeToElement(e){const t=null==e?void 0:e.getBoundingClientRect();return{right:document.body.clientWidth-t.right+"px",top:document.querySelector("html").scrollTop+t.bottom+8+"px"}}}window&&(window.ssoApi={SsoIntegrationService:_s,ApiClientService:Vo});class Ds{constructor(){this.MAX_BIRTH_YEAR=1930}static get Instance(){return this._instance||(this._instance=new this)}isTooOld(e){return new Date(e).getFullYear()o.getTime()}isValidDate(e,t,o){var s=new Date(e,t,o);return s.getFullYear()==e&&s.getMonth()==t&&s.getDate()==o}prepareDob(e,t,o){if(!this.isValidDate(o,t,e))return{isValid:!1,message:"Invalid Date"};const s=new Date(Date.UTC(o,t,e,0,0,0,0));let i="",n=!0;return this.isOfAge(s,18)?([e,t,o].some(e=>!e)||this.isTooOld(s))&&(i="The year is invalid. Please check and try again",n=!1):(n=!1,i="You must be over 18 years old"),{isValid:n,message:i,date:s}}}let Es=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.updateBirthdate=zt(this,"updateBirthdate",7),this.isCalendarShown=!1,this.date={value:"",errors:[],isValid:!0,inputAttributes:{disabled:!1,placeholder:"DD.MM.YYYY"}},this.showCalendar=e=>()=>{this.isCalendarShown=e},this.setDateHandler=e=>()=>{this.showCalendar(!1)();const t=e.detail,{isValid:o,message:s,date:i}=this._birthdateService.prepareDob(t.day,t.month,t.year),n=s?[s]:[];this.date.value=null==i?void 0:i.toISOString(),this.updateBirthdate.emit(Object.assign(Object.assign({},this.control),{value:null==i?void 0:i.toISOString(),isValid:o,errors:n}))},this.TestFieldWrapper=()=>Xe("sso-text-field",{value:this.date.value,inputAttributes:this.date.inputAttributes,onClick:this.showCalendar(!0)}),this._birthdateService=new Ds}render(){var e;return Xe(Ke,null,Xe("div",{class:"sso-birthdate-cnt"},Xe(this.TestFieldWrapper,null)),Xe("sso-form-error",{errors:null===(e=this.control)||void 0===e?void 0:e.errors}),this.isCalendarShown?Xe("div",{class:"sso-overflow"},Xe("sso-date-picker",{onSetCalendarDate:this.setDateHandler})):null)}static get style(){return"sso-birthdate-calendar-container{display:block;min-height:80px}sso-birthdate-calendar-container .sso-birthdate-cnt{display:flex}sso-birthdate-calendar-container .sso-birthdate-cnt sso-dropdown-field{margin-right:20px;width:40%}sso-birthdate-calendar-container .sso-birthdate-cnt sso-dropdown-field:first-child{width:20%}sso-birthdate-calendar-container .sso-birthdate-cnt sso-dropdown-field:last-child{margin-right:0;width:30%}sso-birthdate-calendar-container .sso-overflow{background-color:rgba(0, 0, 0, 0.8);position:fixed;transition:2s all;top:0;left:0;display:flex;flex-direction:column;justify-content:flex-end;width:100%;height:100%;z-index:1000}"}};let Ss=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.updateBirthdate=zt(this,"updateBirthdate",7),this.birthdateForm={day:{name:"day",value:"",errors:[],isValid:!0,selectOptions:[{title:"Day",value:"Day"},...ko],inputAttributes:{disabled:!1}},month:{name:"month",value:"",errors:[],isValid:!0,selectOptions:[{title:"Month",value:"Month"},...zo],inputAttributes:{disabled:!1}},year:{name:"year",value:"",errors:[],isValid:!0,selectOptions:[{title:"Year",value:"Year"},..._o],inputAttributes:{disabled:!1}}},this.changeSelectHandler=e=>{var t,o,s;const i=e.target;this.birthdateForm[i.name].value=i.value;const{isValid:n,message:a,date:r}=this._birthdateService.prepareDob(null===(t=this.birthdateForm.day)||void 0===t?void 0:t.value,null===(o=this.birthdateForm.month)||void 0===o?void 0:o.value,null===(s=this.birthdateForm.year)||void 0===s?void 0:s.value),l=Object.keys(this.birthdateForm).every(e=>+this.birthdateForm[e].value)?[a]:[];this.updateBirthdate.emit(Object.assign(Object.assign({},this.control),{value:null==r?void 0:r.toISOString(),isValid:n,errors:l}))},this._birthdateService=new Ds}render(){var e;return Xe(Ke,null,Xe("div",{class:"sso-birthdate-cnt"},Xe("sso-dropdown-field",{value:this.birthdateForm.day.value,name:this.birthdateForm.day.name,options:this.birthdateForm.day.selectOptions,isValid:!0,inputAttributes:this.birthdateForm.day.inputAttributes,onChange:this.changeSelectHandler}),Xe("sso-dropdown-field",{value:this.birthdateForm.month.value,name:this.birthdateForm.month.name,options:this.birthdateForm.month.selectOptions,isValid:!0,inputAttributes:this.birthdateForm.month.inputAttributes,onChange:this.changeSelectHandler}),Xe("sso-dropdown-field",{value:this.birthdateForm.year.value,name:this.birthdateForm.year.name,options:this.birthdateForm.year.selectOptions,isValid:!0,inputAttributes:this.birthdateForm.year.inputAttributes,onChange:this.changeSelectHandler})),Xe("sso-form-error",{errors:null===(e=this.control)||void 0===e?void 0:e.errors}))}static get style(){return"sso-birthdate-selection-container{display:block;min-height:80px}sso-birthdate-selection-container .sso-birthdate-cnt{display:flex}sso-birthdate-selection-container .sso-birthdate-cnt sso-dropdown-field{margin-right:20px;width:40%}sso-birthdate-selection-container .sso-birthdate-cnt sso-dropdown-field:first-child{width:20%}sso-birthdate-selection-container .sso-birthdate-cnt sso-dropdown-field:last-child{margin-right:0;width:30%}"}};let $s=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.type="button"}render(){return Xe("button",{class:"sso-button sso-button--filled "+(this.loading?"sso-button--loading":""),type:this.type,disabled:this.disabled},this.loading?Xe("div",null,"Loading..."):this.text)}static get style(){return"sso-button-container .sso-button{position:relative;display:block;width:100%;border-radius:30px;padding:13px 15px;height:auto;font:13px/16px Helvetica;text-align:center;box-sizing:border-box;cursor:pointer;color:#fff;font-weight:600}sso-button-container .sso-button--filled{background:#d74113;color:#ffffff;font-weight:600;border:0;letter-spacing:0.8px}sso-button-container .sso-button--stroked{color:#d74113;background:#ffffff;outline:1px solid #d74113}sso-button-container .sso-button--small-text{text-transform:none}sso-button-container .sso-button--big-text{text-transform:uppercase}sso-button-container .sso-button:hover:not([disabled]),sso-button-container .sso-button:active:not([disabled]){opacity:0.8}sso-button-container .sso-button[disabled]{color:#555555;background-color:#cacaca}"}};let Cs=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.setCalendarDate=zt(this,"setCalendarDate",7),this._placeholdersMap={day:"DD",month:"MM",year:"YYYY"},this._itemListsMap={day:ko,month:zo,year:_o},this.currentCalendarFlow="day",this.selectedDate={day:-1,month:-1,year:-1},this.setItemValueHandler=e=>{this.selectedDate=Object.assign(Object.assign({},this.selectedDate),{[this.currentCalendarFlow]:e.target.dataset.value||+this.selectedDate[this.currentCalendarFlow]}),this.setActiveItem(e.target)},this.setCalendarFlowHandler=e=>{this.currentCalendarFlow=e,setTimeout(()=>{this.setActiveItem(null,String(this.selectedDate[this.currentCalendarFlow]))},0)},this.nextItemHandler=()=>{switch(this.currentCalendarFlow){case"day":this.setCalendarFlowHandler("month");break;case"month":this.setCalendarFlowHandler("year");break;case"year":this.setCalendarFlowHandler("year"),this.selectedDate.day&&this.selectedDate.month&&this.selectedDate.year&&this.setCalendarDate.emit(this.selectedDate)}},this.DrawCalendarItems=()=>{const e=this._itemListsMap[this.currentCalendarFlow];return Xe("ul",{class:"sso-birthdate-calendar__body "+("sso-birthdate-calendar__body--"+this.currentCalendarFlow)},e.map(e=>Xe("li",{class:"sso-birthdate-calendar__date-wrapper"},Xe("span",{class:"sso-birthdate-calendar__date",onClick:this.setItemValueHandler,"data-value":e.value},e.title))))},this.HeaderLiItem=e=>Xe("li",{class:"sso-birthdate-calendar__header-date-cnt",onClick:(e=>()=>this.setCalendarFlowHandler(e))(e.flow)},e.value>0?e.value:this._placeholdersMap[e.flow])}setActiveItem(e,t=""){Array.from(this._element.getElementsByClassName("sso-birthdate-calendar__date")||[]).forEach(e=>{t&&e.dataset.value===t?e.classList.add("active"):e.classList.remove("active")}),e&&e.classList.add("active")}render(){return Xe(Ke,null,Xe("div",{class:"sso-birthdate-calendar"},Xe("ul",{class:"sso-birthdate-calendar__header"},Xe(this.HeaderLiItem,{flow:"day",value:this.selectedDate.day}),Xe(this.HeaderLiItem,{flow:"month",value:+this.selectedDate.month+1}),Xe(this.HeaderLiItem,{flow:"year",value:this.selectedDate.year})),Xe(this.DrawCalendarItems,null),Xe("div",{class:"sso-birthdate-calendar__footer"},Xe("div",{class:"sso-button sso-button--filled",onClick:this.nextItemHandler},"Next"))))}get _element(){return this}static get style(){return'sso-date-picker{display:block}sso-date-picker .sso-birthdate-calendar{display:flex;flex-direction:column;border-radius:20px 20px 0 0;border:1px solid #cccccc;background-color:#ffffff}sso-date-picker .sso-birthdate-calendar__header{position:relative;display:flex;justify-content:center;padding:10px 0;width:100%}sso-date-picker .sso-birthdate-calendar__header-date-cnt{padding:10px 30px;border-right:1px solid #cccccc;font-weight:bold}sso-date-picker .sso-birthdate-calendar__header-date-cnt:last-child{border:none}sso-date-picker .sso-birthdate-calendar__header:after{content:"";position:absolute;width:100%;bottom:1px;border-bottom:1px solid #cccccc}sso-date-picker .sso-birthdate-calendar__footer{display:flex;justify-content:center}sso-date-picker .sso-birthdate-calendar__date-wrapper{min-width:14%;display:flex;justify-content:center}sso-date-picker .sso-birthdate-calendar__date{text-align:center;justify-content:center;align-items:center;display:flex;border-radius:50%;cursor:pointer}sso-date-picker .sso-birthdate-calendar__date:focus,sso-date-picker .sso-birthdate-calendar__date.active{background-color:#BF3E18;color:#ffffff}sso-date-picker .sso-birthdate-calendar__body{display:flex;flex-wrap:wrap;padding:20px 10px 10px;max-height:300px;overflow:auto;margin-bottom:20px}sso-date-picker .sso-birthdate-calendar__body--year .birthdate-calendar__date{border-radius:10px;padding:10px}sso-date-picker .sso-birthdate-calendar__body--day .birthdate-calendar__date{width:35px;height:35px}sso-date-picker .sso-birthdate-calendar__body--day .birthdate-calendar__date-wrapper,sso-date-picker .sso-birthdate-calendar__body--year .birthdate-calendar__date-wrapper{min-width:14%}sso-date-picker .sso-birthdate-calendar__body--month .birthdate-calendar__date-wrapper{min-width:33%}sso-date-picker .sso-birthdate-calendar__body--month .birthdate-calendar__date{border-radius:10px;padding:10px}sso-date-picker .sso-birthdate-calendar .sso-button{max-width:90%;margin-bottom:30px}'}};let As=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.fieldType="text",this.tcApp=!1,this.DrawControl=()=>{var e,t,o,s,i,n,a,r,l,c,d;switch(this.fieldType){case"text":return Xe("sso-text-field",{value:null===(e=this.control)||void 0===e?void 0:e.value,label:null===(t=this.control)||void 0===t?void 0:t.label,name:null===(o=this.control)||void 0===o?void 0:o.name,type:null===(s=this.control)||void 0===s?void 0:s.type,isValid:null===(i=this.control)||void 0===i?void 0:i.isValid,class:`${null===(n=this.control)||void 0===n?void 0:n.name} ${this.tcApp?"sso-for-app-field":""}`,inputAttributes:null===(a=this.control)||void 0===a?void 0:a.inputAttributes});case"dropdown":return Xe("sso-dropdown-field",{value:null===(r=this.control)||void 0===r?void 0:r.value,name:null===(l=this.control)||void 0===l?void 0:l.name,options:null===(c=this.control)||void 0===c?void 0:c.selectOptions,isValid:!0,inputAttributes:null===(d=this.control)||void 0===d?void 0:d.inputAttributes})}}}render(){var e;return Xe(Ke,null,Xe(this.DrawControl,null),Xe("sso-form-error",{errors:null===(e=this.control)||void 0===e?void 0:e.errors}))}static get style(){return"sso-default-field-container{display:block;min-height:75px}sso-default-field-container.sso-for-app-field{min-height:80px}sso-default-field-container.sso-code-field-container input{text-align:center}"}};let Fs=class extends HTMLElement{constructor(){super(),this.__registerHost()}render(){var e;return Xe(Ke,null,Xe("label",{class:"sso-label "+((null===(e=this.inputAttributes)||void 0===e?void 0:e.disabled)?"disabled":"")},this.label?Xe("span",{class:"sso-text "+(this.isValid?null:"sso-error")},this.label):null,Xe("sso-form-select",{value:this.value,name:this.name,options:this.options,fieldAttributes:this.inputAttributes})))}static get style(){return"sso-dropdown-field{position:relative;display:block;cursor:pointer}sso-dropdown-field label.sso-label{display:flex;border-bottom:1px solid #CACACA;font-size:14px;font-weight:400;line-height:14px;justify-content:center;width:100%}sso-dropdown-field label.sso-label.disabled{opacity:0.5}sso-dropdown-field span.sso-text{display:block;font-size:14px;font-weight:600;line-height:22px;color:#7B7B7B;margin-right:11px}sso-dropdown-field span.sso-text.sso-error{color:#970202}sso-dropdown-field sso-form-input{flex:1}sso-dropdown-field select{width:100%;padding:15px 0;color:#7B7B7B;border:none;outline:none;font-size:14px;font-weight:400;line-height:14px;text-align:center;appearance:none;cursor:pointer;background:transparent}"}};let Ls=class extends HTMLElement{constructor(){super(),this.__registerHost()}render(){return Xe("label",{class:"sso-label"},Xe("input",Object.assign({},this.inputAttributes,{name:this.name,type:this.type,"data-checked":this.value?"true":"false",checked:this.value})),this.isHtml?Xe("span",{class:"sso-text-square "+(this.isValid?"":"sso-error"),innerHTML:this.label}):Xe("span",{class:"sso-text-square "+(this.isValid?"":"sso-error")},Xe("span",null,this.label)))}static get style(){return'sso-form-checkbox{display:block;position:relative}sso-form-checkbox label.sso-label{font-size:16px;font-weight:400;line-height:22px;min-height:22px;color:#262626;display:flex;align-items:center;cursor:pointer}sso-form-checkbox span.sso-text{padding-left:20px;background:url("/assets/images/sso/empty-checked.svg") no-repeat 0 0;background-size:contain}sso-form-checkbox span.sso-text.sso-error{color:#970202}sso-form-checkbox span.sso-text.sso-error a{color:inherit}sso-form-checkbox span.sso-text a{color:#262626}sso-form-checkbox input{display:none}sso-form-checkbox input:after{display:none}sso-form-checkbox input[data-checked=true]+span.sso-text{background:url("/assets/images/sso/checked.svg") no-repeat 0 0;background-size:contain}sso-form-checkbox span.sso-text-square{display:flex;align-items:center}sso-form-checkbox span.sso-text-square::before{content:"";display:block;position:relative;height:15px;width:15px;background:transparent;border:1px solid #959595;border-radius:4px;margin-right:12px;box-sizing:content-box}sso-form-checkbox span.sso-text-square::after{content:"";display:none;position:absolute;height:11px;width:11px;background:#59a498;border-radius:4px;left:3px;box-sizing:content-box}sso-form-checkbox span.sso-text-square.sso-error{color:#970202}sso-form-checkbox span.sso-text-square.sso-error a{color:inherit}sso-form-checkbox span.sso-text-square.sso-error::before{border-color:#970202}sso-form-checkbox span.sso-text-square.sso-error::after{background:#970202}sso-form-checkbox span.sso-text-square>span{flex:1}sso-form-checkbox input[data-checked=true]+span.sso-text-square::after{display:block}sso-form-checkbox input[data-checked=true]+span.sso-text-square::before{border-color:#59a498}'}};let Rs=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.errors=[]}render(){var e;return Xe(Ke,null,null===(e=this.errors)||void 0===e?void 0:e.map(e=>Xe("div",{class:"sso-error"},e)))}static get style(){return'sso-form-error{display:block;width:100%}sso-form-error .sso-error{font-size:12px;font-weight:400;line-height:140%;margin-top:4px;padding-left:20px;color:#970202;background:url("/assets/images/sso/error.svg") no-repeat 0 50%;background-size:14px}'}};let js=class extends HTMLElement{constructor(){super(),this.__registerHost()}render(){return Xe("input",Object.assign({},this.inputAttributes,{name:this.name,type:this.type,value:this.value}))}static get style(){return"sso-form-input{display:flex;align-items:center}"}};let Ps=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.options=[]}render(){return Xe("select",Object.assign({},this.fieldAttributes,{name:this.name}),this.options.map(e=>Xe("option",{value:e.value,selected:this.value===e.value},e.title)))}static get style(){return"sso-form-select{display:flex;align-items:center;width:100%}"}};const Is={"en-GB":{"text.hello":"Hello","text.noData":"No data","text.welcome":"Welcome!","text.logIn":"Log in","text.createAnAccount":"Create an account","text.dontHaveAccount":"Don't have an account yet?","text.loginThomasCook":"Log in to Thomas Cook!","text.signUpThomasCook":"Sign up to Thomas Cook!","text.forgotPassword":"Forgot password","text.wrongCode":"Please change your email and press Get Code again","text.pleaseCheckEmail":"Please check your email inbox and insert your code here below","text.contactOurCentre":"Contact our customer centre","text.contactPhone":"xxxxxxxxx","text.problemResetPassword":"Problem with password reseting?","text.problemSignUp":"Problem signing up?","text.doYouHaveAccount":"Already have an account?","text.nowYouCan":"Now you can","text.youShouldAggreeWithTerms":"You should agree with Terms and conditions and Privacy Policy","text.passwordValidatorsTitle":"Your password must have:","text.whenYouBirthdate":"When's your birthday?","text.yourBirthdateNotPublic":"Your birthday won't be shown publicly.","text.enterEmail":"Enter your email","text.createUsername":"Create username","text.socialHandle":"This is your social handle.","text.introduceYourself":"Introduce yourself","text.howDoYouWantToBeCalled":"How do you want to be called in app.","text.alreadyEntered":"You've already entered through this social network. Please wait, you will be redirected.","text.orContinueWith":"or continue with","text.accountSuccefullyCreated":"Account successfully created!","text.successfullSignUpMessagePart1":"Please click the activation link we sent to your email","text.successfullSignUpMessagePart2":"to finish registration process.","text.successfullSignUpMessageVersion2Part1":"We sent an email to ","text.successfullSignUpMessageVersion2Part2":"To finish the registration process open the email and follow the instructions when prompted.","text.returnTo":"Return to","text.or":"Or","text.infoList.titleSignUp":"Create an account to access your holiday, tickets and payments, all in one place","text.infoList.titleSignIn":"Log in to your account to access your holiday, where you can:","text.infoList.titleWithAccountYouCan":"With an Account you can:","text.infoList.titleWithAccountYouCanConfirmationPage":"As soon as your booking is confirmed, you can use your account to:","text.infoList.viewDocuments":"View all of your documentation","text.infoList.makePayments":"Make payments towards your holiday","text.infoList.createFavourites":"Create and share your favourite holidays","text.infoList.tellAbout":"Tell us about any amendments or cancellations","text.infoList.bookInsuranceAndTransfers":"Book travel insurance or transfer and keep all your documents in one place","links.forgotPassword":"Forgot your password?","links.signUp":"Create an account","links.signIn":"Log in","links.myAccount":"My account","buttons.logIn":"Log in","buttons.signUp":"Sign up","buttons.getCode":"Get code","buttons.next":"Next","buttons.resendCode":"Resend code","buttons.createAccount":"Create account","buttons.createNewAccount":"Create a new account","buttons.authIconText":"Login / Sign up","buttons.myAccount":"My Account","buttons.done":"Done","form.labels.name":"Name","form.labels.firstName":"First name","form.labels.lastName":"Last name","form.labels.email":"Email","form.labels.password":"Password","form.labels.rememberMe":"Remember me","form.labels.verCode":"Verification code","form.labels.confirmPassword":"Confirm password","form.labels.termsAndPolicies":'I agree with terms and conditions and privacy policy',"form.labels.terms":'Terms and conditions',"form.labels.policy":'Privacy Policy',"form.showPassword":"Show","form.hidePassword":"Hide","menu.manageBooking":"Manage booking","menu.contactUs":"Contact us","menu.wishlist":"Wishlist","menu.signIn":"Log in","menu.signUp":"Sign up","menu.dashboard":"Your account","menu.myBooking":"Your bookings","menu.managePayment":"Make a holiday payment","menu.documents":"Your holiday document & tickets","menu.myWishlist":"Your Wishlist","menu.logout":"Log out","errors.AD_ERROR_WRONG_CODE":"The verification has failed, please try again.","errors.AD_ERROR_EXPIRED_CODE":"The code has expired.","errors.AD_ERROR_USERNAME_ALREADY_EXISTS":"A user with the specified ID already exists. Please choose a different one.","errors.AD_ERROR_EMAIL_ALREADY_EXISTS":"An account with this email address already exists.","errors.AD_ERROR_NO_ACCOUNT":"We can't seem to find your account","errors.AD_ERROR_WRONG_PASSWORD":"Your password is incorrect","errors.AD_ERROR_RESET_PASSWORD_NO_ACCOUNT":"An account could not be found for the provided user ID.","errors.ERROR_MESSAGE_WRONG_TOKEN":"The auth token is empty or invalid. Please, try login with Social Network again.","errors.ERROR_MESSAGE_DEFAULT":"The error has occurred","errors.USERNAME_EXISTS":"Username is already registered","errors.WRONG_CREDENTIALS":"Wrong email or password","errors.EMAIL_EXISTS":"This email address is already being used","errors.ERROR_USER_WITH_SUCH_EMAIL_EXISTED":"User with such email already exists","validators.8to16":"8 to 16 characters","validators.smallBigNumberAndSpecial":"Small letters, big letters, numbers, and special characters","validators.2to30":"2 to 30 characters","validators.startsWithLetterOrDigit":"Must starts with letter or digit","validators.lettersDigitsDefisSpacesUnderscoresDots":"Can use only letters, digits, defis, spaces, underscores, and dots","validators.lettersDigitsDefisUnderscores":"Can use only letters, digits, defis, and underscores","validators.validEmail":"Must be a valid email address","validators.fillVerCode":"You must fill that field with code","validators.confirmPolicy":"You must confirm Privacy Policy","validators.confirmTerms":"You must confirm Terms & Conditions","validators.notEmpty":"Must not be empty","validators.required":"Required field","validators.passwordMissmatch":"Passwords mismatch","validators.passwordFullRule":"8 to 16 characters, small letters, big letters, numbers, and special characters"},"nl-BE":{"text.hello":"Hey","text.noData":"Geen gegevens","text.welcome":"Welkom!","text.logIn":"Log in","text.createAnAccount":"Maak een account","text.dontHaveAccount":"Heb je nog geen account?","text.loginThomasCook":"Log in bij Thomas Cook!","text.signUpThomasCook":"Registreer bij Thomas Cook!","text.forgotPassword":"Wachtwoord vergeten","text.wrongCode":"Verander je e-mail and klik op 'Krijg code'","text.pleaseCheckEmail":"Check je inbox en voer de code hieronder in","text.contactOurCentre":"Neem contact op","text.contactPhone":"xxxxxxxxx","text.problemResetPassword":"Problemen met het resetten van je wachtwoord?","text.problemSignUp":"Problemen met registreren?","text.doYouHaveAccount":"Heb je al een account?","text.nowYouCan":"Nu kun je","text.youShouldAggreeWithTerms":"Je moet akkoord gaan met de algemene voorwaarden en privacybeleid","text.passwordValidatorsTitle":"Je wachtwoord moet bestaan uit:","text.whenYouBirthdate":"Wanneer is je verjaardag?","text.yourBirthdateNotPublic":"Je verjaardag wordt niet openbaar getoond.","text.enterEmail":"Vul je e-mail in","text.createUsername":"Maak een gebruikersnaam aan","text.socialHandle":"Dit is je gebruikersnaam.","text.introduceYourself":"Stel jezelf voor","text.howDoYouWantToBeCalled":"Hoe zullen we je noemen in de app?","text.alreadyEntered":"Je bent al ingelogd via social media. Even geduld, we sturen je door!","text.orContinueWith":"of ga door met","text.accountSuccefullyCreated":"Account is succesvol aangemaakt!","text.successfullSignUpMessagePart1":"Klik op de link die we je zojuist hebben gemaild","text.successfullSignUpMessagePart2":"om de registratie af te ronden.","text.successfullSignUpMessageVersion2Part1":"We hebben een e-mail gestuurd naar ","text.successfullSignUpMessageVersion2Part2":"Om het registratieproces te voltooien, open je de e-mail en volg je de instructies wanneer daarom wordt gevraagd.","text.returnTo":"Terug naar","text.or":"Or","text.infoList.titleSignUp":"Maak een account aan om toegang te krijgen tot jouw vakanties, tickets en betalingen, allemaal op één plek.","text.infoList.titleSignIn":"Log in om toegang te krijgen tot jouw account, waar je:","text.infoList.titleWithAccountYouCan":"Met een account kan je:","text.infoList.titleWithAccountYouCanConfirmationPage":"Met een account kan je:","text.infoList.viewDocuments":"Al jouw documentatie te bekijken","text.infoList.makePayments":"Doe betalingen voor jouw vakantie","text.infoList.createFavourites":"Creëer en deel jouw favoriete vakanties","text.infoList.tellAbout":"Vertel ons over eventuele wijzigingen of annuleringen","text.infoList.bookInsuranceAndTransfers":"Boek een transfer en bewaar al jouw documentatie op één plek","links.forgotPassword":"Wachtwoord vergeten?","links.signUp":"Maak een account aan","links.signIn":"Log in","links.myAccount":"Mijn account","buttons.logIn":"Inloggen","buttons.signUp":"Registreer","buttons.getCode":"Krijg code","buttons.next":"Volgende","buttons.resendCode":"Stuur code opnieuw","buttons.createAccount":"Account aanmaken","buttons.createNewAccount":"Maak een nieuw account aan","buttons.authIconText":"Inloggen / Account aanmaken","buttons.myAccount":"Mijn Account","buttons.done":"Klaar","form.labels.name":"Naam","form.labels.firstName":"Voornaam","form.labels.lastName":"Achternaam","form.labels.email":"Email","form.labels.password":"Wachtwoord","form.labels.rememberMe":"Onthoud mij","form.labels.verCode":"Verificatiecode","form.labels.confirmPassword":"Bevestig wachtwoord","form.labels.termsAndPolicies":'Ik ga akkoord met de algemene voorwaarden en het privacybeleid',"form.labels.terms":'Algemene voorwaarden',"form.labels.policy":'Privacybeleid',"form.showPassword":"Laat zien","form.hidePassword":"Verberg","menu.manageBooking":"Beheer boeking","menu.contactUs":"Neem contact op","menu.wishlist":"Favorieten","menu.signIn":"Log in","menu.signUp":"Registreer","menu.dashboard":"Jouw account","menu.myBooking":"Jouw boekingen","menu.managePayment":"Doe een betaling","menu.documents":"Jouw reisdocumenten & tickets","menu.myWishlist":"Jouw wensenlijst","menu.logout":"Uitloggen","errors.AD_ERROR_WRONG_CODE":"De verificatie is mislukt, probeer het opnieuw.","errors.AD_ERROR_EXPIRED_CODE":"De code is vervallen.","errors.AD_ERROR_USERNAME_ALREADY_EXISTS":"Er bestaat al een gebruiker met deze gegevens. Kies een ande.","errors.AD_ERROR_EMAIL_ALREADY_EXISTS":"Er bestaat al een account met dit emailadres.","errors.AD_ERROR_NO_ACCOUNT":"We kunnen je account niet vinden","errors.AD_ERROR_WRONG_PASSWORD":"Je wachtwoord is onjuist","errors.AD_ERROR_RESET_PASSWORD_NO_ACCOUNT":"Er kon geen account worden gevonden met deze gebruikersgegevens.","errors.ERROR_MESSAGE_WRONG_TOKEN":"De autorisatie is ongeldig of leeg. Probeer het opnieuw.","errors.ERROR_MESSAGE_DEFAULT":"Oeps, er is iets fout gegaan","errors.USERNAME_EXISTS":"Deze gebruikersnaam bestaat al","errors.WRONG_CREDENTIALS":"Verkeerde email of wachtwoord","errors.EMAIL_EXISTS":"Dit emailadres is al in gebruik","errors.ERROR_USER_WITH_SUCH_EMAIL_EXISTED":"Er bestaat al een gebruiker met dit emailadres","validators.8to16":"8 tot 16 karakters","validators.smallBigNumberAndSpecial":"Kleine letters, hoofdletters, cijfers en speciale tekens","validators.2to30":"2 tot 30 karakters","validators.startsWithLetterOrDigit":"Het moet beginnen met een letter of cijfer","validators.lettersDigitsDefisSpacesUnderscoresDots":"Je kunt alleen letters, cijfers, spaties, underscores en punt gebruiken","validators.lettersDigitsDefisUnderscores":"Je kunt alleen letters, cijfers, spaties en underscores gebruiken","validators.validEmail":"Dit moet een geldig emailadres zijn","validators.fillVerCode":"Je moet hier de code invullen","validators.confirmPolicy":"Je moet akkoord gaan met het privacybeleid","validators.confirmTerms":"Je moet akkoord gaan met de algemene voorwaarden","validators.notEmpty":"Dit mag niet leeg zijn","validators.required":"Vereist veld","validators.passwordMissmatch":"De wachtwoorden zijn niet gelijk","validators.passwordFullRule":"8 tot 16 karakters, het moet beginnen met een letter of cijfer"},"nl-NL":{"text.hello":"Hey","text.noData":"Geen gegevens","text.welcome":"Welkom!","text.logIn":"Log in","text.createAnAccount":"Maak een account","text.dontHaveAccount":"Heb je nog geen account?","text.loginThomasCook":"Log in bij Thomas Cook!","text.signUpThomasCook":"Registreer bij Thomas Cook!","text.forgotPassword":"Wachtwoord vergeten","text.wrongCode":"Verander je e-mail and klik op 'Krijg code'","text.pleaseCheckEmail":"Check je inbox en voer de code hieronder in","text.contactOurCentre":"Neem contact op","text.contactPhone":"xxxxxxxxx","text.problemResetPassword":"Problemen met het resetten van je wachtwoord?","text.problemSignUp":"Problemen met registreren?","text.doYouHaveAccount":"Heb je al een account?","text.nowYouCan":"Nu kun je","text.youShouldAggreeWithTerms":"Je moet akkoord gaan met de algemene voorwaarden en privacybeleid","text.passwordValidatorsTitle":"Je wachtwoord moet bestaan uit:","text.whenYouBirthdate":"Wanneer is je verjaardag?","text.yourBirthdateNotPublic":"Je verjaardag wordt niet openbaar getoond.","text.enterEmail":"Vul je e-mail in","text.createUsername":"Maak een gebruikersnaam aan","text.socialHandle":"Dit is je gebruikersnaam.","text.introduceYourself":"Stel jezelf voor","text.howDoYouWantToBeCalled":"Hoe zullen we je noemen in de app?","text.alreadyEntered":"Je bent al ingelogd via social media. Even geduld, we sturen je door!","text.orContinueWith":"of ga door met","text.accountSuccefullyCreated":"Account is succesvol aangemaakt!","text.successfullSignUpMessagePart1":"Klik op de link die we je zojuist hebben gemaild","text.successfullSignUpMessagePart2":"om de registratie af te ronden.","text.successfullSignUpMessageVersion2Part1":"We hebben een e-mail gestuurd naar ","text.successfullSignUpMessageVersion2Part2":"Om het registratieproces te voltooien, open je de e-mail en volg je de instructies wanneer daarom wordt gevraagd.","text.returnTo":"Terug naar","text.or":"Or","text.infoList.titleSignUp":"Maak een account aan om toegang te krijgen tot jouw vakanties, tickets en betalingen, allemaal op één plek.","text.infoList.titleSignIn":"Log in om toegang te krijgen tot jouw account, waar je:","text.infoList.titleWithAccountYouCan":"Met een account kan je:","text.infoList.titleWithAccountYouCanConfirmationPage":"Met een account kan je:","text.infoList.viewDocuments":"Al jouw documentatie te bekijken","text.infoList.makePayments":"Doe betalingen voor jouw vakantie","text.infoList.createFavourites":"Creëer en deel jouw favoriete vakanties","text.infoList.tellAbout":"Vertel ons over eventuele wijzigingen of annuleringen","text.infoList.bookInsuranceAndTransfers":"Boek een transfer en bewaar al jouw documentatie op één plek","links.forgotPassword":"Wachtwoord vergeten?","links.signUp":"Maak een account aan","links.signIn":"Log in","links.myAccount":"Mijn account","buttons.logIn":"Inloggen","buttons.signUp":"Registreer","buttons.getCode":"Krijg code","buttons.next":"Volgende","buttons.resendCode":"Stuur code opnieuw","buttons.createAccount":"Account aanmaken","buttons.createNewAccount":"Maak een nieuw account aan","buttons.authIconText":"Inloggen / Account aanmaken","buttons.myAccount":"Mijn Account","buttons.done":"Klaar","form.labels.name":"Naam","form.labels.firstName":"Voornaam","form.labels.lastName":"Achternaam","form.labels.email":"Email","form.labels.password":"Wachtwoord","form.labels.rememberMe":"Onthoud mij","form.labels.verCode":"Verificatiecode","form.labels.confirmPassword":"Bevestig wachtwoord","form.labels.termsAndPolicies":'Ik ga akkoord met de algemene voorwaarden en het privacybeleid',"form.labels.terms":'Algemene voorwaarden',"form.labels.policy":'Privacybeleid',"form.showPassword":"Laat zien","form.hidePassword":"Verberg","menu.manageBooking":"Beheer boeking","menu.contactUs":"Neem contact op","menu.wishlist":"Favorieten","menu.signIn":"Log in","menu.signUp":"Registreer","menu.dashboard":"Jouw account","menu.myBooking":"Jouw boekingen","menu.managePayment":"Doe een betaling","menu.documents":"Jouw reisdocumenten & tickets","menu.myWishlist":"Jouw wensenlijst","menu.logout":"Uitloggen","errors.AD_ERROR_WRONG_CODE":"De verificatie is mislukt, probeer het opnieuw.","errors.AD_ERROR_EXPIRED_CODE":"De code is vervallen.","errors.AD_ERROR_USERNAME_ALREADY_EXISTS":"Er bestaat al een gebruiker met deze gegevens. Kies een ande.","errors.AD_ERROR_EMAIL_ALREADY_EXISTS":"Er bestaat al een account met dit emailadres.","errors.AD_ERROR_NO_ACCOUNT":"We kunnen je account niet vinden","errors.AD_ERROR_WRONG_PASSWORD":"Je wachtwoord is onjuist","errors.AD_ERROR_RESET_PASSWORD_NO_ACCOUNT":"Er kon geen account worden gevonden met deze gebruikersgegevens.","errors.ERROR_MESSAGE_WRONG_TOKEN":"De autorisatie is ongeldig of leeg. Probeer het opnieuw.","errors.ERROR_MESSAGE_DEFAULT":"Oeps, er is iets fout gegaan","errors.USERNAME_EXISTS":"Deze gebruikersnaam bestaat al","errors.WRONG_CREDENTIALS":"Verkeerde email of wachtwoord","errors.EMAIL_EXISTS":"Dit emailadres is al in gebruik","errors.ERROR_USER_WITH_SUCH_EMAIL_EXISTED":"Er bestaat al een gebruiker met dit emailadres","validators.8to16":"8 tot 16 karakters","validators.smallBigNumberAndSpecial":"Kleine letters, hoofdletters, cijfers en speciale tekens","validators.2to30":"2 tot 30 karakters","validators.startsWithLetterOrDigit":"Het moet beginnen met een letter of cijfer","validators.lettersDigitsDefisSpacesUnderscoresDots":"Je kunt alleen letters, cijfers, spaties, underscores en punt gebruiken","validators.lettersDigitsDefisUnderscores":"Je kunt alleen letters, cijfers, spaties en underscores gebruiken","validators.validEmail":"Dit moet een geldig emailadres zijn","validators.fillVerCode":"Je moet hier de code invullen","validators.confirmPolicy":"Je moet akkoord gaan met het privacybeleid","validators.confirmTerms":"Je moet akkoord gaan met de algemene voorwaarden","validators.notEmpty":"Dit mag niet leeg zijn","validators.required":"Vereist veld","validators.passwordMissmatch":"De wachtwoorden zijn niet gelijk","validators.passwordFullRule":"8 tot 16 karakters, het moet beginnen met een letter of cijfer"}};class Ts{constructor(){var e;this.defaultLocale=null===(e=To.currentMarket)||void 0===e?void 0:e.locale}static get Instance(){return this._instance||(this._instance=new this)}get currentLocale(){return this._currentLocale||this.defaultLocale}set currentLocale(e){e&&(this._currentLocale=e)}get currentLanguage(){return this.currentLocale.split("-")[0]}}class Os{constructor(){this._localeService=Ts.Instance}static get Instance(){return this._instance||(this._instance=new this)}getTranslations(e){this._translations=Is[e]||Is[this._localeService.defaultLocale]}instant(e,t=null){var o;this._translations||this.getTranslations(this._localeService.currentLocale);let s=null===(o=this._translations)||void 0===o?void 0:o[e];if(!s)return e;if(!t)return s;for(const e of Object.keys(t))s=s.replace(new RegExp(`{${e}}`),t[e]);return s}}const Vs=Os.Instance.instant.bind(Os.Instance);let Us=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.intergrated=!1}render(){return Xe(Ke,{class:this.intergrated?"sso-info-list--integrated":""},Xe("div",{class:"info-list__title"},this.infoTitle),Xe("ul",{class:"info-list__list"},Xe("li",{class:"info-list__list-item"},Vs("text.infoList.viewDocuments")),Xe("li",{class:"info-list__list-item"},Vs("text.infoList.makePayments")),Xe("li",{class:"info-list__list-item"},Vs("text.infoList.tellAbout")),Xe("li",{class:"info-list__list-item"},Vs("text.infoList.bookInsuranceAndTransfers"))))}static get style(){return'sso-info-list{display:block;position:relative;padding:0 16px 24px 0;background-color:#fff;border-radius:16px}sso-info-list.sso-info-list--integrated{background-color:transparent}sso-info-list.sso-info-list--integrated .info-list__list-item{font-size:16px;line-height:22px;font-weight:700}@media (min-width: 960px){sso-info-list{padding:16px 36px 24px;margin:0 16px}}sso-info-list .info-list__title{font-size:18px;font-weight:700;line-height:20px}sso-info-list .info-list__list{margin-top:8px}sso-info-list .info-list__list-item{background:url("/assets/images/sso/check-circle.svg") no-repeat 0 20%;background-size:24px;margin:0;padding:0;padding-left:36px;margin-top:16px;font-size:14px;font-weight:400;line-height:20px}'}};let Hs=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.eyeIcon=!0,this.tcApp=!1,this.showError=!1,this.showPassword=!1,this.showPasswordToggle=()=>{this.showPassword=!this.showPassword}}render(){var e,t,o,s,i,n,a,r;return Xe(Ke,null,Xe("div",{class:"sso-password-cnt"},Xe("sso-text-field",{label:null===(e=this.control)||void 0===e?void 0:e.label,name:null===(t=this.control)||void 0===t?void 0:t.name,value:null===(o=this.control)||void 0===o?void 0:o.value,type:this.showPassword?"text":null===(s=this.control)||void 0===s?void 0:s.type,isValid:null===(i=this.control)||void 0===i?void 0:i.isValid,inputAttributes:null===(n=this.control)||void 0===n?void 0:n.inputAttributes,class:`${null===(a=this.control)||void 0===a?void 0:a.name} ${this.tcApp?"sso-for-app-field":""}`}),Xe("div",{class:`sso-show-password-btn ${this.showPassword?"sso-show-password-btn--active":""} ${this.eyeIcon?"sso-show-password-btn--icon":""}`,onClick:this.showPasswordToggle},this.eyeIcon?"":this.showPassword?Vs("form.hidePassword"):Vs("form.showPassword"))),this.showError?Xe("sso-form-error",{errors:null===(r=this.control)||void 0===r?void 0:r.errors}):null)}static get style(){return'sso-password-field-container{display:block;position:relative;min-height:75px}sso-password-field-container .sso-password-cnt{position:relative}sso-password-field-container .sso-show-password-btn{font-size:12px;font-weight:400;line-height:24px;display:flex;align-items:center;position:absolute;bottom:5px;right:0;height:26px;cursor:pointer;color:#757575;background-color:#fff}sso-password-field-container .sso-show-password-btn--active{font-weight:600}sso-password-field-container .sso-show-password-btn--icon{width:24px;background:url("/assets/images/sso/eye_show.svg") no-repeat 0 50% transparent}sso-password-field-container .sso-show-password-btn--icon.sso-show-password-btn--active{background:url("/assets/images/sso/eye_hide.svg") no-repeat 0 50% transparent}'}};let qs=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.validators=[]}render(){var e,t,o,s;return Xe(Ke,null,Xe("div",{class:"sso-validators-cnt"},Xe("div",{class:"sso-validators-title"},Vs("text.passwordValidatorsTitle")),Xe("div",{class:"sso-validator "+((null===(e=this.validators[0])||void 0===e?void 0:e.valid)?"is-valid":"")},Xe("span",null,Vs(null===(t=this.validators[0])||void 0===t?void 0:t.validatorLabel))),Xe("div",{class:"sso-validator "+((null===(o=this.validators[1])||void 0===o?void 0:o.valid)?"is-valid":"")},Xe("span",null,Vs(null===(s=this.validators[1])||void 0===s?void 0:s.validatorLabel)))))}static get style(){return'sso-password-validators-container{display:block;position:relative}sso-password-validators-container.always-visible .sso-validators-cnt{position:relative;background-color:#ffffff;padding:10px 0 30px;transform:translate(0);opacity:1;z-index:auto}sso-password-validators-container.show-password-rules .sso-validators-cnt{opacity:1;z-index:0;transform:translate(0, 36px)}sso-password-validators-container .sso-validators-title{font-size:10px;font-weight:600;line-height:10px;margin-bottom:10px;color:#333333}sso-password-validators-container .sso-validators-cnt{position:absolute;background-color:#f9f9f9;padding:8px 11px;border-radius:0 0 12px 12px;transform:translate(0, 0);transition:0.2s all;opacity:0;z-index:-1;width:100%}sso-password-validators-container .sso-validator{font-size:12px;font-weight:400;line-height:15px;color:#757575;display:flex;align-items:center;padding-left:20px;margin-bottom:6px;background:url("/assets/images/sso/empty-checked.svg") no-repeat 0 0;background-size:15px}sso-password-validators-container .sso-validator:last-child{margin-bottom:0}sso-password-validators-container .sso-validator.is-valid{background:url("/assets/images/sso/checked.svg") no-repeat 0 0;background-size:15px}sso-password-validators-container .sso-validators--error{color:#970202}'}};let Ns=class extends HTMLElement{constructor(){super(),this.__registerHost()}render(){return Xe(Ke,null,Xe("sso-form-checkbox",{value:this.formData.termsConditions.value,label:this.formData.termsConditions.label,type:this.formData.termsConditions.type,name:this.formData.termsConditions.name,isValid:this.formData.termsConditions.isValid,isHtml:!0}),Xe("sso-form-checkbox",{value:this.formData.privacyPolicy.value,label:this.formData.privacyPolicy.label,type:this.formData.privacyPolicy.type,name:this.formData.privacyPolicy.name,isValid:this.formData.privacyPolicy.isValid,isHtml:!0}),Xe("sso-form-checkbox",{value:this.formData.marketing.value,label:this.formData.marketing.label,type:this.formData.marketing.type,name:this.formData.marketing.name,isValid:this.formData.marketing.isValid}))}static get style(){return"sso-policies-container-app{display:block}"}};let Ms=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.showPoliciesTooltip=!1,this.triggerPolicies=!1}render(){return Xe("div",{class:"sso-checkboxes-wrapper"},Xe("sso-form-checkbox",{value:this.formData.termsAndPolicies.value,label:this.formData.termsAndPolicies.label,type:this.formData.termsAndPolicies.type,name:this.formData.termsAndPolicies.name,isValid:this.formData.termsAndPolicies.isValid,isHtml:!0}))}static get style(){return"sso-policies-container-portal{display:block}sso-policies-container-portal .sso-checkboxes-wrapper{display:block;margin-bottom:28px}sso-policies-container-portal .sso-checkboxes-wrapper sso-form-checkbox{margin-bottom:4px}sso-policies-container-portal .sso-checkboxes-wrapper sso-form-checkbox:last-of-type{margin-bottom:0}sso-policies-container-portal .sso-checkboxes-wrapper .sso-tooltip-wrapper{position:relative}"}};let Bs=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.resendCode=zt(this,"resendCode",7),this.resendCodeHandler=()=>{this.isDisabled||this.resendCode.emit()}}render(){return Xe("div",{class:"sso-resend-code-cnt"},Xe("a",{onClick:this.resendCodeHandler,class:"sso-resend-code-link "+(this.isDisabled?"sso-resend-code--disabled":"")},Vs("buttons.resendCode")))}static get style(){return"sso-resend-code-button{display:block;position:relative}sso-resend-code-button .sso-resend-code-cnt{margin-top:16px}sso-resend-code-button .sso-resend-code-link{font-size:16px;font-weight:400;line-height:22px;cursor:pointer;text-decoration:underline}sso-resend-code-button .sso-resend-code--disabled{color:#757575;text-decoration:none;cursor:default}"}};let Ws=class extends HTMLElement{constructor(){super(),this.__registerHost()}render(){return Xe("div",{class:"sso-sk-page sso-skeleton"},Xe("div",{class:"sso-sk-page__body"},Xe("div",{class:"sso-sk-page__description"},Xe("span",{class:"sso-sk-page__title sso-skeleton-box",style:{width:"55%"}}),Xe("span",{class:"sso-sk-page__subtitle sso-skeleton-box",style:{width:"55%"}})),Xe("p",null,Xe("span",{class:"sso-sk-page__field sso-skeleton-box",style:{width:"100%"}}),Xe("span",{class:"sso-sk-page__button sso-skeleton-box",style:{width:"100%"}}))))}static get style(){return'sso-skeleton-container-app .sso-skeleton{display:flex}sso-skeleton-container-app .sso-skeleton-box{display:inline-block;height:1em;position:relative;overflow:hidden;background-color:#DDDBDD}sso-skeleton-container-app .sso-skeleton-box::after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translateX(-100%);background-image:linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0));animation:shimmer 2s infinite;content:""}@keyframes shimmer{100%{transform:translateX(100%)}}sso-skeleton-container-app .sso-sk-page__body{flex-grow:1}sso-skeleton-container-app .sso-sk-page__title{font-size:2em;font-weight:400;line-height:24px;margin-bottom:13px}sso-skeleton-container-app .sso-sk-page__subtitle{font-size:1em;font-weight:400;line-height:20px}sso-skeleton-container-app .sso-sk-page__description{margin-bottom:25px}sso-skeleton-container-app .sso-sk-page__field{min-height:50px}sso-skeleton-container-app .sso-sk-page__button{min-height:40px;margin-top:25px;font-size:1.25em;font-weight:400;padding:13px}'}};let Ys=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.disabled=!1}render(){return Xe(Ke,{class:`${this.snName} ${this.disabled?"disabled":""}`})}static get style(){return'sso-sn-button{width:44px;height:44px;border-radius:50%;cursor:pointer}sso-sn-button.google{background:url("/assets/images/sso/sn-google.svg") no-repeat 0 0}sso-sn-button.facebook{background:url("/assets/images/sso/sn-facebook.svg") no-repeat 0 0}sso-sn-button.twitter{background:url("/assets/images/sso/sn-twitter.svg") no-repeat 0 0}sso-sn-button.disabled{opacity:0.2;cursor:default}'}};let Js=class extends HTMLElement{constructor(){super(),this.__registerHost()}render(){var e;return Xe(Ke,null,Xe("label",{class:"sso-label "+((null===(e=this.inputAttributes)||void 0===e?void 0:e.disabled)?"disabled":"")},Xe("input",Object.assign({},this.inputAttributes,{name:this.name,type:this.type,value:this.value})),this.label?Xe("span",{class:`sso-text ${this.isValid?"":"sso-error"} ${this.value?"is-value":""}`},this.label):null))}static get style(){return"sso-text-field{position:relative;display:block;width:100%}sso-text-field label.sso-label{font-size:16px;font-weight:400;line-height:16px;display:flex;padding:15px 0;align-items:center;border-bottom:1px solid #959595}sso-text-field label.sso-label.disabled{opacity:0.5}sso-text-field span.sso-text{display:block;font-size:16px;font-weight:700;line-height:22px;color:#262626;margin-right:11px;z-index:1}sso-text-field span.sso-text.sso-error{color:#970202}sso-text-field span.sso-text.is-value{transform:translate(0, -50%) scale(0.8);transform-origin:0;font-weight:400}sso-text-field input{flex:1;position:absolute;width:100%;bottom:5px;background-color:transparent}sso-text-field input:focus+span.sso-text{transform:translate(0, -50%) scale(0.8);transform-origin:0;font-weight:400}sso-text-field input{font-size:16px;font-weight:400;line-height:24px;width:100%;color:#262626;border:none;outline:none;padding:0}sso-text-field input:-internal-autofill-selected{background-color:#e8f0fe !important;color:#7B7B7B !important;font-size:16px !important;transform:scale(1)}sso-text-field.vercode input{letter-spacing:12px}sso-text-field.vercode input::-webkit-outer-spin-button,sso-text-field.vercode input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}sso-text-field.vercode input[type=number]{-moz-appearance:textfield}sso-text-field.sso-for-app-field label.sso-label{padding:16px 0}"}};let Xs=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.position="top",this.message="",this.show=!1,this.autoHide=!0,this.shouldShow=!1,this.hideOnClick=()=>{this.shouldShow=!1,clearTimeout(this._showTooltipTimeout)}}setShowHandler(e){this.shouldShow=e,clearTimeout(this._showTooltipTimeout),e&&this.autoHide&&(this._showTooltipTimeout=window.setTimeout(()=>{this.shouldShow=!1},5e3))}render(){return this.shouldShow&&""!==this.message?Xe("div",{class:`sso-tooltip-cnt sso-tooltip-cnt--${this.position} sso-tooltip-cnt--show`},Xe("div",{class:"sso-tooltip-close-btn",onClick:this.hideOnClick}),this.message):null}static get watchers(){return{show:["setShowHandler"]}}static get style(){return'sso-tooltip .sso-tooltip-cnt{position:absolute;background-color:#fff;box-shadow:0 0 5px #999999;font-size:12px;font-weight:400;line-height:15px;color:#970202;width:100%;text-transform:none;left:0;transform:translate(0, -50%);padding:10px;transition:all 1s;opacity:0;overflow:hidden;z-index:1}sso-tooltip .sso-tooltip-cnt--show{opacity:1;overflow:auto}sso-tooltip .sso-tooltip-cnt--show.sso-tooltip-cnt--top{bottom:80%}sso-tooltip .sso-tooltip-cnt--show.sso-tooltip-cnt--bottom{top:50px}sso-tooltip .sso-tooltip-cnt--top{bottom:25%}sso-tooltip .sso-tooltip-cnt--bottom{top:20px}sso-tooltip .sso-tooltip-cnt--hide{display:none}sso-tooltip .sso-tooltip-close-btn{position:absolute;top:7px;right:7px;width:12px;height:12px;background:url("/assets/images/sso/cross.png") no-repeat transparent 50% 50%;background-size:contain;cursor:pointer}'}};const Gs="^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[\\.@&#$%^*\\-_+=[\\]{}|\\:'\"<>,?\\/`~();!]))[A-Za-z\\d\\.@&#$%^*\\-_+=[\\]{}|\\:'\"<>,?\\/`~();!]+$",Ks=["^[a-zA-Z0-9]","^[\\.a-zA-Z0-9_\\s\\-]+$","^[a-zA-Z0-9]{1}[\\.a-zA-Z0-9_\\s\\-]{1,29}$"],Zs=["^[a-zA-Z0-9]","^[\\.a-zA-Z0-9_]+$","^[a-zA-Z0-9]{1}[\\.a-zA-Z0-9_]{1,29}$"],Qs="^[a-zA-Z0-9!#$%&'+^_`{}~-]+(?:\\.[a-zA-Z0-9!#$%&'+^_`{}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",ei=["^[a-zA-Z0-9]","^[a-zA-Z0-9]+[a-zA-Z0-9_-]*$"],ti={password:[{immediateErrors:["validators.passwordFullRule"],handler:e=>(null==e?void 0:e.length)>=8&&(null==e?void 0:e.length)<=16&&!!(null==e?void 0:e.match(new RegExp(Gs)))}],firstName:[{immediateErrors:["validators.2to30"],handler:e=>(null==e?void 0:e.length)>=2&&(null==e?void 0:e.length)<=30},{immediateErrors:["validators.startsWithLetterOrDigit"],handler:e=>!e||!!(null==e?void 0:e.match(new RegExp(Ks[0])))},{immediateErrors:["validators.lettersDigitsDefisSpacesUnderscoresDots"],handler:e=>!e||!!(null==e?void 0:e.match(new RegExp(Ks[1])))}],name:[{immediateErrors:["validators.2to30"],handler:e=>(null==e?void 0:e.length)>=2&&(null==e?void 0:e.length)<=30},{immediateErrors:["validators.startsWithLetterOrDigit"],handler:e=>!e||!!(null==e?void 0:e.match(new RegExp(Ks[0])))},{immediateErrors:["validators.lettersDigitsDefisSpacesUnderscoresDots"],handler:e=>!e||!!e.match(new RegExp(Ks[1]))}],username:[{immediateErrors:["validators.2to30"],handler:e=>(null==e?void 0:e.length)>=2&&(null==e?void 0:e.length)<=30},{immediateErrors:["validators.startsWithLetterOrDigit"],handler:e=>!e||!!(null==e?void 0:e.match(new RegExp(ei[0])))},{immediateErrors:["validators.lettersDigitsDefisUnderscores"],handler:e=>!e||!!(null==e?void 0:e.match(new RegExp(ei[1])))}],lastName:[{immediateErrors:["validators.2to30"],handler:e=>(null==e?void 0:e.length)>=2&&(null==e?void 0:e.length)<=30},{immediateErrors:["validators.startsWithLetterOrDigit"],handler:e=>!e||!!(null==e?void 0:e.match(new RegExp(Zs[0])))},{immediateErrors:["validators.lettersDigitsDefisSpacesUnderscoresDots"],handler:e=>!e||!!(null==e?void 0:e.match(new RegExp(Zs[1])))}],email:[{immediateErrors:["validators.validEmail"],handler:e=>!!e&&!!(null==e?void 0:e.match(new RegExp(Qs)))}],vercode:[{immediateErrors:["validators.fillVerCode"],handler:e=>!!e}],termsAndPolicies:[{immediateErrors:[],handler:e=>!!e}],privacyPolicy:[{immediateErrors:["validators.confirmPolicy"],handler:e=>!!e}],termsConditions:[{immediateErrors:["validators.confirmTerms"],handler:e=>!!e}],birthdate:[{immediateErrors:["validators.notEmpty"],handler:e=>!!e}]},oi=Object.assign(Object.assign({},ti),{password:[{validatorLabel:"validators.8to16",immediateErrors:[],handler:e=>e.length>=8&&e.length<=16},{validatorLabel:"validators.smallBigNumberAndSpecial",immediateErrors:[],handler:e=>!!e.match(new RegExp(Gs))}]}),si=Object.assign({},oi),ii={password:[{immediateErrors:["validators.required"],handler:e=>!!e}],email:[{immediateErrors:["validators.required"],handler:e=>!!e}]},ni={email:ti.email,password:[{immediateErrors:["validators.8to16"],handler:e=>e.length>=8&&e.length<=16},{immediateErrors:["validators.smallBigNumberAndSpecial"],handler:e=>!!e.match(new RegExp(Gs))}],passwordConfirm:[{immediateErrors:["validators.passwordMissmatch"],compareTo:"password",handler:(e,t)=>e===t}]};const ai=class{constructor(){var e,t;this._formFields=(e=To.currentMarket,{email:{name:"email",type:"email",label:(t=Vs)("form.labels.email"),value:"",errors:[],isValid:!0,inputAttributes:{autocomplete:"username"}},password:{name:"password",type:"password",label:t("form.labels.password"),value:"",errors:[],isValid:!0,inputAttributes:{autocomplete:"current-password"}},passwordNew:{name:"password",type:"password",label:t("form.labels.password"),value:"",errors:[],isValid:!0,inputAttributes:{autocomplete:"new-password"}},firstName:{name:"firstName",type:"text",label:t("form.labels.firstName"),value:"",errors:[],isValid:!0,inputAttributes:{}},lastName:{name:"lastName",type:"text",label:t("form.labels.lastName"),value:"",errors:[],isValid:!0,inputAttributes:{}},termsAndPolicies:{name:"termsAndPolicies",type:"checkbox",label:t("form.labels.termsAndPolicies",{terms:e.termsLink,policy:e.policyLink}),value:!1,errors:[],isValid:!0,inputAttributes:{}},termsConditions:{name:"termsConditions",type:"checkbox",label:t("form.labels.terms",{link:e.termsLink}),value:!1,errors:[],isValid:!0,inputAttributes:{}},privacyPolicy:{name:"privacyPolicy",type:"checkbox",label:t("form.labels.policy",{link:e.policyLink}),value:!1,errors:[],isValid:!0,inputAttributes:{}},remember:{name:"remember",type:"checkbox",label:t("form.labels.rememberMe"),value:!1,errors:[],isValid:!0,inputAttributes:{}},vercode:{name:"vercode",type:"number",label:t("form.labels.verCode"),value:"",errors:[],isValid:!0,inputAttributes:{inputmode:"decimal"}},passwordConfirm:{name:"passwordConfirm",type:"password",label:t("form.labels.confirmPassword"),value:"",errors:[],isValid:!0,inputAttributes:{}},birthdate:{name:"birthdate",value:"",errors:[],isValid:!0,inputAttributes:{}},emailTcApp:{name:"email",type:"text",value:"",errors:[],isValid:!0,inputAttributes:{placeholder:"Email"}},vercodeTcApp:{name:"vercode",type:"number",value:"",errors:[],isValid:!0,inputAttributes:{inputmode:"decimal"}},passwordTcApp:{name:"password",type:"password",value:"",errors:[],isValid:!0,inputAttributes:{placeholder:"Create password"}},name:{name:"name",type:"text",value:"",errors:[],isValid:!0,inputAttributes:{disabled:!1,placeholder:"Nickname"}},username:{name:"username",type:"text",value:"",errors:[],isValid:!0,inputAttributes:{disabled:!1,placeholder:"Username"}},termsConditionsTcApp:{name:"termsConditions",type:"checkbox",label:`I have read and accept the terms and conditions and community guidelines`,value:!1,errors:[],isValid:!0,inputAttributes:{}},privacyPolicyTcApp:{name:"privacyPolicy",type:"checkbox",label:`I concent to the storage and handling of my data by this app in the accordance to the Privacy Policy`,value:!1,errors:[],isValid:!0,inputAttributes:{}},marketing:{name:"marketing",type:"checkbox",label:"I would like to receive the latest deals from Thomas Cook, information on our new products and services, and more. You’re able to unsubscribe at any time.",value:!1,errors:[],isValid:!0,inputAttributes:{}},emailTcAppSignIn:{name:"email",type:"text",value:"",errors:[],isValid:!0,inputAttributes:{placeholder:"Email or username"}},passwordTcAppSignIn:{name:"password",type:"password",value:"",errors:[],isValid:!0,inputAttributes:{placeholder:"Password"}},passwordReset:{name:"password",type:"password",value:"",errors:[],isValid:!0,inputAttributes:{placeholder:"Reset password"}}})}static get Instance(){return this._instance||(this._instance=new this)}get formFields(){return this._formFields}}.Instance.formFields;class ri{constructor(e){this.validateForm=(e,t)=>{let o=!0;const s={};for(const o of t)e[o].isValid=!0,s[o]=this.checkErrors(e,e[o].name,e[o].value);const i=Object.assign({},Object.keys(e).reduce((t,o)=>(t[o]=Object.assign(Object.assign({},e[o]),{errors:s[o]}),t),{}));return Object.keys(i).some(e=>t.includes(e)&&!i[e].isValid)&&(o=!1),{formData:i,isValid:o}},this._fieldsValidators=e}inputChangeHandler(e,t,o){t[e.name].isValid=!0;const{inputValue:s,errors:i}=this.validateField(t,e,o.includes(e.name));return Object.assign(Object.assign({},t),{[e.name]:Object.assign(Object.assign({},t[e.name]),{value:s,errors:i})})}updateFormField(e,t,o){t[e.name].isValid=!0;const{inputValue:s,errors:i}=this.validateField(t,e,o.includes(e.name));return Object.assign(Object.assign({},t),{[e.name]:Object.assign(Object.assign({},t[e.name]),{value:s,errors:i})})}validateField(e,t,o){let s;switch(t.type){case"checkbox":s=t.checked;break;default:s=t.value}let i=[];return o&&(i=this.checkErrors(e,t.name,s)),{inputValue:s,errors:i}}checkErrors(e,t,o){var s;return(null===(s=this._fieldsValidators[t])||void 0===s?void 0:s.reduce((s,i)=>{if(!e[t].isValid)return s;return(i.compareTo?i.handler(o,e[i.compareTo].value):i.handler(o))||(e[t].isValid=!1,s=s.concat(i.immediateErrors.map(e=>Vs(e))||[])),s},[]))||[]}mapAccountDataOnFormFields(e,t){var o;const s=Object.assign({},e);return null===(o=Object.keys(e))||void 0===o||o.forEach(e=>{const o=((e,t)=>{const o=t.split(".");if(1===o.length)return e[t];let s=e;for(const e of o)s=s[e];return s})(null==t?void 0:t.data,yo[e]);s[e].value=o}),s}initFormData(e){return e.reduce((e,t)=>(e[ai[t].name]=this.initFormDataField(ai[t]),e),{})}initFormDataField(e){return Object.assign(Object.assign({},e),{errors:[...e.errors],inputAttributes:Object.assign({},e.inputAttributes)})}}const li=e=>{var t,o;return"We can't seem to find your account"===(null===(t=e.error)||void 0===t?void 0:t.message)||1===(null===(o=e.error)||void 0===o?void 0:o.code)},ci=e=>{var t;return"Your password is incorrect"===(null===(t=e.error)||void 0===t?void 0:t.message)},di=e=>{var t;return"The code has expired."===(null===(t=e.error)||void 0===t?void 0:t.message)},ui=e=>{var t,o,s,i,n;return"An account with this email address already exists."===(null===(t=e.error)||void 0===t?void 0:t.message)||(null===(s=null===(o=e.error)||void 0===o?void 0:o.message)||void 0===s?void 0:s.includes("userPrincipalName"))||"EMAIL_EXISTS"===(null===(i=e.error)||void 0===i?void 0:i.subcode)||"EMAIL_EXISTS"===(null===(n=e.error)||void 0===n?void 0:n.subCode)},pi=e=>{var t,o,s;return"A user with the specified ID already exists. Please choose a different one."===(null===(t=e.error)||void 0===t?void 0:t.message)||"USERNAME_EXISTS"===(null===(o=e.error)||void 0===o?void 0:o.subcode)||"USERNAME_EXISTS"===(null===(s=e.error)||void 0===s?void 0:s.subCode)},hi=e=>{var t;return e.error&&!(e=>{var t;return(null===(t=e.error)||void 0===t?void 0:t.message)===wo})(e)&&!di(e)&&!ui(e)&&!pi(e)||e.error&&(null===(t=e.error)||void 0===t?void 0:t.code)>1},mi=e=>{var t;return"An account could not be found for the provided user ID."===(null===(t=e.error)||void 0===t?void 0:t.message)},bi=e=>{if(null==e?void 0:e.includes("userPrincipalName"))return Vs("errors.ERROR_USER_WITH_SUCH_EMAIL_EXISTED");if(null==e?void 0:e.includes("login attempt failed"))return Vs("errors.WRONG_CREDENTIALS");const t=Vs("errors."+e);return t==="errors."+e?e||Vs("errors.ERROR_MESSAGE_DEFAULT"):t},gi=e=>{var t,o;let s;switch(e.formFlow){case So.tcAppEmail:s=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},"Enter your email")),(null===(t=e.globalError)||void 0===t?void 0:t.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.email,tcApp:!0,onInput:e.onInputChange,class:"sso-for-app-field"}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},"Request verification code"));break;case So.tcAppVercode:s=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},"Enter 6-digit code"),Xe("div",{class:"sso-page-subtitle"},"Verification code has been sent to your inbox. Please copy it to the input box below.")),(null===(o=e.globalError)||void 0===o?void 0:o.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.vercode,tcApp:!0,onInput:e.onInputChange,class:"sso-for-app-field sso-code-field-container"}),Xe("div",{class:"sso-resend-code "+(e.formData.vercode.isValid?"sso-resend-code--initial":""),onClick:e.onResendCode},"Resend code"),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},"Verify code"));break;case So.tcAppNewPassword:s=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},"Reset password")),Xe("sso-password-field-container",{control:e.formData.password,onInput:e.onInputChange,tcApp:!0,eyeIcon:!0}),Xe("sso-password-validators-container",{validators:e.passwordFieldViewValidators,onInput:e.onInputChange,class:"always-visible"}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},"Log in"))}return s};let fi=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.resetPasswordResponseEvent=zt(this,"resetPasswordResponseEvent",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._fieldsPerFlow={[So.tcAppEmail]:["email"],[So.tcAppVercode]:["vercode"],[So.tcAppWrongCode]:["email","vercode"],[So.tcAppNewPassword]:["password"]},this.submitFormFailed=!1,this.passwordFieldViewValidators=[],this.submitted=!1,this.submitDisabled=!0,this.resendDisabled=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{var t;const o=e.target;this.submitted=!1,this.submitFormFailed=!1,this.formData=this._ssoFormService.updateFormField(o,this.formData,this._fieldsPerFlow[this.formFlow]),o.name===this.formData.password.name&&(this.passwordFieldViewValidators=(null===(t=ni[o.name])||void 0===t?void 0:t.reduce((e,t)=>(e.push(t.handler(o.value)),e),[]))||[]);const s=Object.keys(this.formData).every(e=>this.formData[e].isValid);this.submitDisabled=!s},this.resendCodeHandler=async()=>{this.submitDisabled=!0,this.resendDisabled=!0,this.globalError="",this.submitted=!1,await this._apiClientService.resetPasswordResendCode(),this.submitDisabled=!1,this.resendDisabled=!1,this.formData.vercode=Object.assign(Object.assign({},this.formData.vercode),{value:"",errors:[],isValid:!0})},this.submitFormHandler=async e=>{e.preventDefault(),this.submitFormFailed=!1;const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._fieldsPerFlow[this.formFlow]);if(this.formData=t,this.submitFormFailed=!o,this.submitFormFailed)return!1;switch(this.submitted=!0,this.globalError="",this.submitDisabled=!0,this.resendDisabled=!0,this.formFlow){case So.tcAppEmail:try{const e=await this._apiClientService.resetPasswordSendCode(this.formData);this.resetPasswordSendCodeResponseHandler(e)}catch(e){console.log(e)}break;case So.tcAppVercode:try{const e=await this._apiClientService.resetPasswordVerifyEmail(this.formData);this.resetPasswordVerCodeResponseHandler(e)}catch(e){console.log(e)}break;case So.tcAppNewPassword:try{const e=await this._apiClientService.resetPasswordConfirm(this.formData);this.resetPasswordConfirmResponseHandler(e)}catch(e){console.log(e)}}},this._apiClientService=Vo.Instance,this._ssoFormService=new ri(ni),this.formFlow=So.tcAppEmail}componentWillLoad(){Po(xo),this.formData=this._ssoFormService.initFormData(["emailTcApp","vercodeTcApp","passwordReset"])}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}resetPasswordSendCodeResponseHandler(e){var t;switch(this.submitDisabled=!1,this.resendDisabled=!1,+e.status){case 200:return this.submitted=!1,void(this.formFlow=So.tcAppVercode);default:return void(this.globalError=bi(null===(t=e.error)||void 0===t?void 0:t.message))}}resetPasswordVerCodeResponseHandler(e){var t;switch(+e.status){case 200:return this.submitted=!1,void(this.formFlow=So.tcAppNewPassword);default:this.submitDisabled=!1,this.resendDisabled=!1;const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);return hi(e)?void(this.globalError=o):void(this.formData=Object.assign(Object.assign({},this.formData),{vercode:Object.assign(Object.assign({},this.formData.vercode),{isValid:!1,errors:[o]})}))}}resetPasswordConfirmResponseHandler(e){var t;switch(this.resetPasswordResponseEvent.emit(e),+e.status){case 200:return this.submitted=!1,void(this.submitDisabled=!1);default:const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);return mi(e)?(this.formData=Object.assign(Object.assign({},this.formData),{email:Object.assign(Object.assign({},this.formData.email),{isValid:!1,errors:[o]}),vercode:Object.assign(Object.assign({},this.formData.vercode),{value:""})}),void(this.formFlow=So.tcAppEmail)):void(this.globalError=o)}}render(){return Xe(Ke,null,Xe("div",{class:"sso-wrapper-app"},Xe("form",{onSubmit:this.submitFormHandler},Xe(gi,{formData:this.formData,globalError:this.globalError,formFlow:this.formFlow,submitDisabled:this.submitDisabled,passwordFieldViewValidators:this.passwordFieldViewValidators,onResendCode:this.resendCodeHandler,onInputChange:this.inputChangeHandler}))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-mobile-app-reset-password,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;padding:90px 15px 0;flex-direction:column;overflow:hidden;letter-spacing:0.01rem}tc-mobile-app-reset-password a.sso-link,:host a.sso-link{color:#262626}tc-mobile-app-reset-password .sso-wrapper-app,:host .sso-wrapper-app{position:relative;transition:all 0.2s linear;opacity:1}tc-mobile-app-reset-password .sso-wrapper-app--show,:host .sso-wrapper-app--show{opacity:1}tc-mobile-app-reset-password .sso-button,:host .sso-button{position:relative;display:block;width:100%;border-radius:30px;padding:14px 16px;height:auto;font:14px/16px Helvetica;text-align:center;box-sizing:border-box;cursor:pointer;color:#fff;font-weight:600}tc-mobile-app-reset-password .sso-button--filled,:host .sso-button--filled{background:#d74113;color:#ffffff;font-weight:600;border:0;letter-spacing:0.8px}tc-mobile-app-reset-password .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-mobile-app-reset-password .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-mobile-app-reset-password .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-mobile-app-reset-password .sso-button:hover:not([disabled]),tc-mobile-app-reset-password .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-mobile-app-reset-password .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-mobile-app-reset-password .sso-page-description,:host .sso-page-description{margin-bottom:25px}tc-mobile-app-reset-password .sso-page-title,:host .sso-page-title{font-size:18px;font-weight:900;line-height:24px;margin-bottom:13px}tc-mobile-app-reset-password .sso-page-subtitle,:host .sso-page-subtitle{font-size:12px;font-weight:400;line-height:12px;color:#999999}tc-mobile-app-reset-password .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin-bottom:25px;line-height:24px;line-height:140%}tc-mobile-app-reset-password .sso-close-button,:host .sso-close-button{position:absolute;font-size:35px;font-weight:100;line-height:0;right:15px;top:25px;background:transparent;color:#7B7B7B;cursor:pointer}tc-mobile-app-reset-password .sso-resend-code,:host .sso-resend-code{font-size:12px;font-weight:400;line-height:14px;color:#d74113;margin-bottom:30px;cursor:pointer}tc-mobile-app-reset-password .sso-resend-code--initial,:host .sso-resend-code--initial{margin-top:-16px}tc-mobile-app-reset-password h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:20px}tc-mobile-app-reset-password .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-mobile-app-reset-password .sso-link:hover,:host .sso-link:hover{text-decoration:none}tc-mobile-app-reset-password button.sso-button[type=submit],:host button.sso-button[type=submit]{margin-top:15px}'}};class xi{static get Instance(){return this._instance||(this._instance=new this)}signInConfirm(e){this.getOneElementByIdList(["password"]).value=e.password.value;this.getOneElementByIdList(["email"]).value=e.email.value,this.getOneElementByIdList(["next"]).click()}signUpSendCode(e){this.getOneElementByIdList(["email"]).value=e.email.value,this.getOneElementByIdList(["emailVerificationControl_but_send_code"]).click()}signUpResendCode(){this.getOneElementByIdList(["emailVerificationControl_but_send_new_code"]).click()}signUpVerifyEmail(e){const t=this.getOneElementByIdList(["emailVerificationCode"]);t.disabled=!1,t.value=e.vercode.value,this.getOneElementByIdList(["emailVerificationControl_but_verify_code"]).click()}signUpConfirm(e){this.getOneElementByIdList(["newPassword"]).value=e.password.value;this.getOneElementByIdList(["reenterPassword"]).value=e.password.value;this.getOneElementByIdList(["givenName"]).value=e.firstName.value;this.getOneElementByIdList(["surname"]).value=e.lastName.value,this.getOneElementByIdList(["continue"]).click()}resetPasswordSendCode(e){this.getOneElementByIdList(["email"]).value=e.email.value,this.getOneElementByIdList(["emailVerificationControl_but_send_code","email_ver_but_send","emailVerificationControlForResetPassword_but_send_code"]).click()}resetPasswordResendCode(){this.getOneElementByIdList(["emailVerificationControl_but_send_new_code","emailVerificationControlForResetPassword_but_send_new_code"]).click()}resetPasswordVerifyEmail(e){const t=this.getOneElementByIdList(["emailVerificationCode","email_ver_input","VerificationCode"]);t.disabled=!1,t.value=e.vercode.value,this.getOneElementByIdList(["emailVerificationControl_but_verify_code","email_ver_but_verify","emailVerificationControlForResetPassword_but_verify_code"]).click()}resetPasswordEmailConfirm(){this.getOneElementByIdList(["continue"]).click()}resetPasswordConfirm(e){this.getOneElementByIdList(["newPassword"]).value=e.password.value;const t=this.getOneElementByIdList(["reenterPassword"]);t&&(t.value=e.passwordConfirm.value),this.getOneElementByIdList(["continue"]).click()}getOneElementByIdList(e){let t;for(const o of e)if(t=document.getElementById(o),t)break;return t}}let wi=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.resetPasswordResponseEvent=zt(this,"resetPasswordResponseEvent",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._fieldsPerFlow={[So.tcAppEmail]:["email"],[So.tcAppVercode]:["vercode"],[So.tcAppWrongCode]:["email","vercode"],[So.tcAppNewPassword]:["password"]},this._templateFlowType=Eo.tcAppResetPassword,this.submitFormFailed=!1,this.passwordFieldViewValidators=[],this.submitted=!1,this.submitDisabled=!0,this.resendDisabled=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{var t;const o=e.target;this.submitted=!1,this.submitFormFailed=!1,this.formData=this._ssoFormService.updateFormField(o,this.formData,this._fieldsPerFlow[this.formFlow]),o.name===this.formData.password.name&&(this.passwordFieldViewValidators=(null===(t=ni[o.name])||void 0===t?void 0:t.reduce((e,t)=>(e.push(t.handler(o.value)),e),[]))||[]);const s=Object.keys(this.formData).every(e=>this.formData[e].isValid);this.submitDisabled=!s},this.resendCodeHandler=()=>{this.submitDisabled=!0,this.resendDisabled=!0,this.globalError="",this.submitted=!1,this._apiClientService.resetPasswordResendCode(),this.formData.vercode=Object.assign(Object.assign({},this.formData.vercode),{value:"",errors:[],isValid:!0})},this.submitFormHandler=async e=>{e.preventDefault(),this.submitFormFailed=!1;const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._fieldsPerFlow[this.formFlow]);if(this.formData=t,this.submitFormFailed=!o,this.submitFormFailed)return!1;switch(this.submitted=!0,this.globalError="",this.submitDisabled=!0,this.resendDisabled=!0,this.formFlow){case So.tcAppEmail:try{await this._apiClientService.resetPasswordSendCode(this.formData)}catch(e){console.log(e)}break;case So.tcAppVercode:try{await this._apiClientService.resetPasswordVerifyEmail(this.formData)}catch(e){console.log(e)}break;case So.tcAppNewPassword:try{await this._apiClientService.resetPasswordConfirm(this.formData)}catch(e){console.log(e)}}},this._templateFlowType=Eo.tcAppResetPassword,this._apiClientService=xi.Instance,this._ssoFormService=new ri(ni),this.formFlow=Ro(this._templateFlowType)}componentWillLoad(){jo(this._templateFlowType),this.formData=this._ssoFormService.initFormData(["emailTcApp","vercodeTcApp","passwordReset"])}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}signUpSendCodeAzureHandler(e){this.resetPasswordSendCodeResponseHandler(e.detail)}signUpVerCodeAzureResponseHandler(e){this.resetPasswordVerCodeResponseHandler(e.detail)}signUpConfirmAzureResponseHandler(e){this.resetPasswordConfirmResponseHandler(e.detail)}resetPasswordSendCodeResponseHandler(e){var t;switch(this.submitDisabled=!1,this.resendDisabled=!1,+e.status){case 200:return this.submitted=!1,void(this.formFlow=So.tcAppVercode);default:return void(this.globalError=bi(null===(t=e.error)||void 0===t?void 0:t.message))}}resetPasswordVerCodeResponseHandler(e){var t;switch(+e.status){case 200:this.submitted=!1;try{this._apiClientService.resetPasswordEmailConfirm()}catch(e){console.log(e)}return;default:this.submitDisabled=!1,this.resendDisabled=!1;const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);return hi(e)?void(this.globalError=o):void(this.formData=Object.assign(Object.assign({},this.formData),{vercode:Object.assign(Object.assign({},this.formData.vercode),{isValid:!1,errors:[o]})}))}}resetPasswordConfirmResponseHandler(e){var t;switch(this.resetPasswordResponseEvent.emit(e),+e.status){case 200:return void(this.submitted=!1);default:const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);return mi(e)?(this.formData=Object.assign(Object.assign({},this.formData),{email:Object.assign(Object.assign({},this.formData.email),{isValid:!1,errors:[o]}),vercode:Object.assign(Object.assign({},this.formData.vercode),{value:""})}),void(this.formFlow=So.tcAppEmail)):void(this.globalError=o)}}render(){return Xe(Ke,null,Xe("div",{class:"sso-wrapper-app"},Xe("form",{onSubmit:this.submitFormHandler},Xe(gi,{formData:this.formData,globalError:this.globalError,formFlow:this.formFlow,submitDisabled:this.submitDisabled,passwordFieldViewValidators:this.passwordFieldViewValidators,onResendCode:this.resendCodeHandler,onInputChange:this.inputChangeHandler}))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-mobile-app-reset-password-azure,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;padding:90px 15px 0;flex-direction:column;overflow:hidden;letter-spacing:0.01rem}tc-mobile-app-reset-password-azure a.sso-link,:host a.sso-link{color:#262626}tc-mobile-app-reset-password-azure .sso-wrapper-app,:host .sso-wrapper-app{position:relative;transition:all 0.2s linear;opacity:1}tc-mobile-app-reset-password-azure .sso-wrapper-app--show,:host .sso-wrapper-app--show{opacity:1}tc-mobile-app-reset-password-azure .sso-button,:host .sso-button{position:relative;display:block;width:100%;border-radius:30px;padding:14px 16px;height:auto;font:14px/16px Helvetica;text-align:center;box-sizing:border-box;cursor:pointer;color:#fff;font-weight:600}tc-mobile-app-reset-password-azure .sso-button--filled,:host .sso-button--filled{background:#d74113;color:#ffffff;font-weight:600;border:0;letter-spacing:0.8px}tc-mobile-app-reset-password-azure .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-mobile-app-reset-password-azure .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-mobile-app-reset-password-azure .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-mobile-app-reset-password-azure .sso-button:hover:not([disabled]),tc-mobile-app-reset-password-azure .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-mobile-app-reset-password-azure .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-mobile-app-reset-password-azure .sso-page-description,:host .sso-page-description{margin-bottom:25px}tc-mobile-app-reset-password-azure .sso-page-title,:host .sso-page-title{font-size:18px;font-weight:900;line-height:24px;margin-bottom:13px}tc-mobile-app-reset-password-azure .sso-page-subtitle,:host .sso-page-subtitle{font-size:12px;font-weight:400;line-height:12px;color:#999999}tc-mobile-app-reset-password-azure .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin-bottom:25px;line-height:24px;line-height:140%}tc-mobile-app-reset-password-azure .sso-close-button,:host .sso-close-button{position:absolute;font-size:35px;font-weight:100;line-height:0;right:15px;top:25px;background:transparent;color:#7B7B7B;cursor:pointer}tc-mobile-app-reset-password-azure .sso-resend-code,:host .sso-resend-code{font-size:12px;font-weight:400;line-height:14px;color:#d74113;margin-bottom:30px;cursor:pointer}tc-mobile-app-reset-password-azure .sso-resend-code--initial,:host .sso-resend-code--initial{margin-top:-16px}tc-mobile-app-reset-password-azure h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:20px}tc-mobile-app-reset-password-azure .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-mobile-app-reset-password-azure .sso-link:hover,:host .sso-link:hover{text-decoration:none}tc-mobile-app-reset-password-azure button.sso-button[type=submit],:host button.sso-button[type=submit]{margin-top:15px}'}};const vi=e=>{var t;return Xe(Yt,null,(null===(t=e.globalError)||void 0===t?void 0:t.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.email,tcApp:!0,onInput:e.onInputChange}),Xe("sso-password-field-container",{control:e.formData.password,onInput:e.onInputChange,tcApp:!0,eyeIcon:!0}),Xe("div",{class:"sso-reset-password-cnt"},Xe("a",{href:e.resetPasswordLink,class:"sso-reset-password-link sso-link"},"Forgot password?")),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},"Log in"))};let yi=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._formFieldsToValidate=["email","password"],this._resetPasswordLink=fo,this._formFlow=So.signIn,this.submitted=!1,this.submitDisabled=!0,this.globalError="",this.formData={},this.inputChangeHandler=e=>{this.submitted=!1,this.formData=this._ssoFormService.inputChangeHandler(e.target,this.formData,this._formFieldsToValidate);const t=Object.keys(this.formData).every(e=>this.formData[e].isValid);this.submitDisabled=!t},this.submitFormHandler=async e=>{e.preventDefault();const{formData:t}=this._ssoFormService.validateForm(this.formData,this._formFieldsToValidate);this.formData=t,this.submitted=!0,this.globalError="",this.submitDisabled=!0;try{const e=await this._apiClientService.signInConfirm(this.formData);this.signInResponseHandler(e)}catch(e){console.log(e)}},this._apiClientService=Vo.Instance,this._ssoFormService=new ri(ii)}componentWillLoad(){Po(xo),this.formData=this._ssoFormService.initFormData(["emailTcAppSignIn","passwordTcAppSignIn"])}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}signInResponseHandler(e){var t;switch(+e.status){case 200:this.submitted=!1,this.submitDisabled=!1;break;default:this.submitDisabled=!1;const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);if(li(e)){this.formData.email=Object.assign(Object.assign({},this.formData.email),{isValid:!0,errors:[o]});break}if(ci(e)){this.formData.password=Object.assign(Object.assign({},this.formData.password),{isValid:!1,errors:[o]});break}this.globalError=o}}render(){return Xe(Ke,null,Xe("div",{class:"sso-wrapper-app"},Xe("form",{onSubmit:this.submitFormHandler},Xe(vi,{formData:this.formData,globalError:this.globalError,formFlow:this._formFlow,submitDisabled:this.submitDisabled,resetPasswordLink:this._resetPasswordLink,onInputChange:this.inputChangeHandler}))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-mobile-app-sign-in,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;padding:90px 15px 0;flex-direction:column;overflow:hidden;letter-spacing:0.01rem}tc-mobile-app-sign-in a.sso-link,:host a.sso-link{color:#262626}tc-mobile-app-sign-in .sso-wrapper-app,:host .sso-wrapper-app{position:relative;transition:all 0.2s linear;opacity:1}tc-mobile-app-sign-in .sso-wrapper-app--show,:host .sso-wrapper-app--show{opacity:1}tc-mobile-app-sign-in .sso-button,:host .sso-button{position:relative;display:block;width:100%;border-radius:30px;padding:14px 16px;height:auto;font:14px/16px Helvetica;text-align:center;box-sizing:border-box;cursor:pointer;color:#fff;font-weight:600}tc-mobile-app-sign-in .sso-button--filled,:host .sso-button--filled{background:#d74113;color:#ffffff;font-weight:600;border:0;letter-spacing:0.8px}tc-mobile-app-sign-in .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-mobile-app-sign-in .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-mobile-app-sign-in .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-mobile-app-sign-in .sso-button:hover:not([disabled]),tc-mobile-app-sign-in .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-mobile-app-sign-in .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-mobile-app-sign-in .sso-page-description,:host .sso-page-description{margin-bottom:25px}tc-mobile-app-sign-in .sso-page-title,:host .sso-page-title{font-size:18px;font-weight:900;line-height:24px;margin-bottom:13px}tc-mobile-app-sign-in .sso-page-subtitle,:host .sso-page-subtitle{font-size:12px;font-weight:400;line-height:12px;color:#999999}tc-mobile-app-sign-in .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin-bottom:25px;line-height:24px;line-height:140%}tc-mobile-app-sign-in .sso-close-button,:host .sso-close-button{position:absolute;font-size:35px;font-weight:100;line-height:0;right:15px;top:25px;background:transparent;color:#7B7B7B;cursor:pointer}tc-mobile-app-sign-in .sso-resend-code,:host .sso-resend-code{font-size:12px;font-weight:400;line-height:14px;color:#d74113;margin-bottom:30px;cursor:pointer}tc-mobile-app-sign-in .sso-resend-code--initial,:host .sso-resend-code--initial{margin-top:-16px}tc-mobile-app-sign-in .sso-form,:host .sso-form{top:50%;transform:translate(0, -50%)}tc-mobile-app-sign-in h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:20px}tc-mobile-app-sign-in .sso-reset-password-cnt,:host .sso-reset-password-cnt{margin:15px 0 25px}tc-mobile-app-sign-in .sso-reset-password-link,:host .sso-reset-password-link{font-size:14px;font-weight:600;line-height:22px;cursor:pointer;text-decoration:underline}tc-mobile-app-sign-in .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-mobile-app-sign-in .sso-link:hover,:host .sso-link:hover{text-decoration:none}'}};let ki=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._formFieldsToValidate=["email","password"],this._templateFlowType=Eo.tcAppSignIn,this._formFlow=So.signIn,this.submitted=!1,this.submitDisabled=!0,this.globalError="",this.formData={},this.inputChangeHandler=e=>{this.submitted=!1,this.formData=this._ssoFormService.inputChangeHandler(e.target,this.formData,this._formFieldsToValidate);const t=Object.keys(this.formData).every(e=>this.formData[e].isValid);this.submitDisabled=!t},this.submitFormHandler=async e=>{e.preventDefault();const{formData:t}=this._ssoFormService.validateForm(this.formData,this._formFieldsToValidate);this.formData=t,this.submitted=!0,this.globalError="",this.submitDisabled=!0;try{await this._apiClientService.signInConfirm(this.formData)}catch(e){console.log(e)}},this._apiClientService=xi.Instance,this._ssoFormService=new ri(ii),this._resetPasswordLink=fo}componentWillLoad(){jo(this._templateFlowType),this.formData=this._ssoFormService.initFormData(["emailTcAppSignIn","passwordTcAppSignIn"])}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}signInAzureResponseHandler(e){this.signInResponseHandler(e.detail)}signInResponseHandler(e){var t;switch(+e.status){case 200:this.submitted=!1,this.submitDisabled=!1;break;default:this.submitDisabled=!1;const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);if(li(e)){this.formData.email=Object.assign(Object.assign({},this.formData.email),{isValid:!1,errors:[o]});break}if(ci(e)){this.formData.password=Object.assign(Object.assign({},this.formData.password),{isValid:!1,errors:[o]});break}this.globalError=o}}render(){return Xe(Ke,null,Xe("div",{class:"sso-wrapper-app"},Xe("form",{onSubmit:this.submitFormHandler},Xe(vi,{formData:this.formData,globalError:this.globalError,formFlow:this._formFlow,submitDisabled:this.submitDisabled,resetPasswordLink:this._resetPasswordLink,onInputChange:this.inputChangeHandler}))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-mobile-app-sign-in-azure,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;padding:90px 15px 0;flex-direction:column;overflow:hidden;letter-spacing:0.01rem}tc-mobile-app-sign-in-azure a.sso-link,:host a.sso-link{color:#262626}tc-mobile-app-sign-in-azure .sso-wrapper-app,:host .sso-wrapper-app{position:relative;transition:all 0.2s linear;opacity:1}tc-mobile-app-sign-in-azure .sso-wrapper-app--show,:host .sso-wrapper-app--show{opacity:1}tc-mobile-app-sign-in-azure .sso-button,:host .sso-button{position:relative;display:block;width:100%;border-radius:30px;padding:14px 16px;height:auto;font:14px/16px Helvetica;text-align:center;box-sizing:border-box;cursor:pointer;color:#fff;font-weight:600}tc-mobile-app-sign-in-azure .sso-button--filled,:host .sso-button--filled{background:#d74113;color:#ffffff;font-weight:600;border:0;letter-spacing:0.8px}tc-mobile-app-sign-in-azure .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-mobile-app-sign-in-azure .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-mobile-app-sign-in-azure .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-mobile-app-sign-in-azure .sso-button:hover:not([disabled]),tc-mobile-app-sign-in-azure .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-mobile-app-sign-in-azure .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-mobile-app-sign-in-azure .sso-page-description,:host .sso-page-description{margin-bottom:25px}tc-mobile-app-sign-in-azure .sso-page-title,:host .sso-page-title{font-size:18px;font-weight:900;line-height:24px;margin-bottom:13px}tc-mobile-app-sign-in-azure .sso-page-subtitle,:host .sso-page-subtitle{font-size:12px;font-weight:400;line-height:12px;color:#999999}tc-mobile-app-sign-in-azure .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin-bottom:25px;line-height:24px;line-height:140%}tc-mobile-app-sign-in-azure .sso-close-button,:host .sso-close-button{position:absolute;font-size:35px;font-weight:100;line-height:0;right:15px;top:25px;background:transparent;color:#7B7B7B;cursor:pointer}tc-mobile-app-sign-in-azure .sso-resend-code,:host .sso-resend-code{font-size:12px;font-weight:400;line-height:14px;color:#d74113;margin-bottom:30px;cursor:pointer}tc-mobile-app-sign-in-azure .sso-resend-code--initial,:host .sso-resend-code--initial{margin-top:-16px}tc-mobile-app-sign-in-azure .sso-form,:host .sso-form{top:50%;transform:translate(0, -50%)}tc-mobile-app-sign-in-azure h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:20px}tc-mobile-app-sign-in-azure .sso-reset-password-cnt,:host .sso-reset-password-cnt{margin:15px 0 25px}tc-mobile-app-sign-in-azure .sso-reset-password-link,:host .sso-reset-password-link{font-size:14px;font-weight:600;line-height:22px;cursor:pointer;text-decoration:underline}tc-mobile-app-sign-in-azure .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-mobile-app-sign-in-azure .sso-link:hover,:host .sso-link:hover{text-decoration:none}'}};const zi=e=>{var t,o,s,i,n;let a;switch(e.formFlow){case So.tcAppBirthdate:a=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},"When's your birthday?"),Xe("div",{class:"sso-page-subtitle"},"Your birthday won't be shown publicly.")),Xe("sso-birthdate-selection-container",{control:e.formData.birthdate,onUpdateBirthdate:e.onSelectBirthdate}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},"Next"));break;case So.tcAppEmail:a=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},"Enter your email")),(null===(t=e.globalError)||void 0===t?void 0:t.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.email,tcApp:!0,onInput:e.onInputChange,class:"sso-for-app-field"}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},"Request verification code"));break;case So.tcAppVercode:a=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},"Enter 6-digit code"),Xe("div",{class:"sso-page-subtitle"},"Verification code has been sent to your inbox. Please copy it to the input box below.")),(null===(o=e.globalError)||void 0===o?void 0:o.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.vercode,tcApp:!0,onInput:e.onInputChange,class:"sso-for-app-field sso-code-field-container"}),Xe("div",{class:"sso-resend-code "+((null===(s=e.formData.vercode)||void 0===s?void 0:s.isValid)?"sso-resend-code--initial":""),onClick:e.onResendCode},"Resend code"),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},"Verify code"));break;case So.tcAppNewPassword:a=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},"Create password")),Xe("sso-password-field-container",{control:e.formData.password,onInput:e.onInputChange,tcApp:!0,eyeIcon:!0}),Xe("sso-password-validators-container",{validators:e.passwordFieldViewValidators,onInput:e.onInputChange,class:"always-visible"}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},"Next"));break;case So.tcAppUsername:a=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},"Create username"),Xe("div",{class:"sso-page-subtitle"},"You can always change this later.")),(null===(i=e.globalError)||void 0===i?void 0:i.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.username,tcApp:!0,onInput:e.onInputChange,class:"sso-for-app-field"}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},"Next"));break;case So.tcAppName:a=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},"Enter your name")),(null===(n=e.globalError)||void 0===n?void 0:n.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.name,tcApp:!0,onInput:e.onInputChange,class:"sso-for-app-field"}),Xe("div",{class:"sso-checkboxes",onInput:e.onInputChange},Xe("sso-policies-container-app",{formData:e.formData})),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},"Create an account"))}return a};class _i{static get Instance(){return this._instance||(this._instance=new this)}prepareMobileAppSignUpRequest(e){return{dateOfBirth:e.birthdate.value,email:e.email.value,password:e.password.value,name:e.name.value,consent:{privacyPolicy:e.privacyPolicy.value,termsConditions:e.termsConditions.value},receiveMarketingMail:e.marketing.value}}prepareMyAccountSignUpRequest(e,t){var o,s;return{email:e.email.value,password:e.password.value,firstName:e.firstName.value,lastName:e.lastName.value,name:e.firstName.value,consent:{privacyPolicy:(null===(o=e.privacyPolicy)||void 0===o?void 0:o.value)||e.termsAndPolicies.value,termsConditions:(null===(s=e.termsConditions)||void 0===s?void 0:s.value)||e.termsAndPolicies.value},url:this.prepareMyAccountUserActivationLink(t)}}prepareMyAccountUserActivationLink(e){var t,o,s,i;let n=window.location.origin;window.location.origin.includes("localhost")&&(n="https://"+(null===(t=To.currentMarket)||void 0===t?void 0:t.domainEnv));let a=encodeURIComponent(n+window.location.pathname+window.location.search);const r=new URLSearchParams(window.location.search);return r.has("returnUrl")&&(a=r.get("returnUrl")),(window.location.pathname.includes("/book/confirmation")||window.location.pathname.includes("/boeking/confirmation"))&&(a=e?encodeURIComponent(`${n}${null===(o=To.currentMarket)||void 0===o?void 0:o.userBookingLink}/${e}`):encodeURIComponent(`${n}${null===(s=To.currentMarket)||void 0===s?void 0:s.myAccountLink}`)),`${n}${null===(i=To.currentMarket)||void 0===i?void 0:i.userActivationLink}?returnUrl=${a}`}}class Di{constructor(){}pickupSignUpFlow(e){var t,o,s,i,n,a,r;return(null===(t=e.birthdate)||void 0===t?void 0:t.value)?(null===(o=e.email)||void 0===o?void 0:o.value)?(null===(s=e.username)||void 0===s?void 0:s.value)?(null===(i=e.password)||void 0===i?void 0:i.value)?(null===(n=e.name)||void 0===n?void 0:n.value)&&(null===(a=e.privacyPolicy)||void 0===a?void 0:a.value)&&(null===(r=e.termsConditions)||void 0===r?void 0:r.value)?null:So.tcAppName:So.tcAppNewPassword:So.tcAppUsername:So.tcAppEmail:So.tcAppBirthdate}nextFlow(e){return this.pickupSignUpFlow(e)}}let Ei=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctSignUpFinishedEvent=zt(this,"tctSignUpFinishedEvent",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._fieldsPerFlow={[So.tcAppBirthdate]:["birthdate"],[So.tcAppEmail]:["email"],[So.tcAppVercode]:["vercode"],[So.tcAppWrongCode]:["email","vercode"],[So.tcAppNewPassword]:["password"],[So.tcAppUsername]:["username"],[So.tcAppName]:["name","termsConditions","privacyPolicy"]},this.wrapperVisibilityClass="sso-wrapper-app--show",this.submitFormFailed=!1,this.passwordFieldViewValidators=[],this.submitted=!1,this.submitDisabled=!0,this.resendDisabled=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{const t=e.target;this.submitted=!1,this.submitFormFailed=!1,this.formData=this._ssoFormService.updateFormField(t,this.formData,this._fieldsPerFlow[this.formFlow]),t.name===this.formData.password.name&&this.setupPasswordFieldValidators(t.name,t.value);const o=Object.keys(this.formData).every(e=>this.formData[e].isValid);this.submitDisabled=!o},this.selectBirthdateHandler=e=>{this.formData=Object.assign(Object.assign({},this.formData),{birthdate:e.detail});const t=Object.keys(this.formData).every(e=>this.formData[e].isValid);this.submitDisabled=!t},this.submitFormHandler=async e=>{e.preventDefault(),this.submitFormFailed=!1;const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._fieldsPerFlow[this.formFlow]);if(this.formData=t,this.submitFormFailed=!o,this.submitFormFailed)return!1;switch(this.submitted=!0,this.globalError="",this.submitDisabled=!0,this.resendDisabled=!0,this.formFlow){case So.tcAppBirthdate:this.formFlow=So.tcAppEmail;break;case So.tcAppNewPassword:this.formFlow=So.tcAppName;break;case So.tcAppUsername:try{let e=await this._apiClientService.validateAccount({username:this.formData.username.value});this.signUpResponseHandler(e)}catch(e){console.log(e)}break;case So.tcAppEmail:try{const e=await this._apiClientService.validateAccount({email:this.formData.email.value});this.signUpResponseHandler(e)}catch(e){console.log(e)}break;case So.tcAppName:try{const e=this._processDataService.prepareMobileAppSignUpRequest(this.formData),t=await this._apiClientService.signUpConfirm(e);this.signUpResponseHandler(t)}catch(e){console.log(e)}}},this.formFlow=So.tcAppBirthdate,this._apiClientService=Vo.Instance,this._processDataService=_i.Instance,this._ssoFormService=new ri(si),this._signUpService=new Di}componentWillLoad(){Po(xo),this.formData=this._ssoFormService.initFormData(["birthdate","emailTcApp","passwordTcApp","name","username","termsConditionsTcApp","privacyPolicyTcApp","marketing"]),this.setupPasswordFieldValidators(this.formData.password.name)}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}setupPasswordFieldValidators(e,t=null){var o;this.passwordFieldViewValidators=(null===(o=si[e])||void 0===o?void 0:o.reduce((e,o)=>(e.push({valid:t?o.handler(t):null,validatorLabel:o.validatorLabel}),e),[]))||[]}setSpecificFieldError(e,t){this.formData=Object.assign(Object.assign({},this.formData),{[e]:Object.assign(Object.assign({},this.formData[e]),{isValid:!1,errors:[bi(t)]})})}signUpResponseHandler(e){var t,o,s,i,n;if(this.submitted=!1,hi(e))return void(this.globalError=bi(null===(t=e.error)||void 0===t?void 0:t.message));if(ui(e))return this.setSpecificFieldError("email",(null===(o=e.error)||void 0===o?void 0:o.subcode)||(null===(s=e.error)||void 0===s?void 0:s.subCode)),void(this.formFlow=So.tcAppEmail);if(pi(e))return this.setSpecificFieldError("username",(null===(i=e.error)||void 0===i?void 0:i.subcode)||(null===(n=e.error)||void 0===n?void 0:n.subCode)),void(this.formFlow=So.tcAppUsername);const a=this._signUpService.nextFlow(this.formData);a?this.formFlow=a:this.tctSignUpFinishedEvent.emit(e)}render(){return Xe(Ke,null,Xe("div",{class:"sso-wrapper-app "+this.wrapperVisibilityClass},Xe("form",{onSubmit:this.submitFormHandler},Xe(zi,{formData:this.formData,globalError:this.globalError,formFlow:this.formFlow,submitDisabled:this.submitDisabled,passwordFieldViewValidators:this.passwordFieldViewValidators,onInputChange:this.inputChangeHandler,onSelectBirthdate:this.selectBirthdateHandler}))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-mobile-app-sign-up,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;padding:90px 15px 0;flex-direction:column;overflow:hidden;letter-spacing:0.01rem}tc-mobile-app-sign-up a.sso-link,:host a.sso-link{color:#262626}tc-mobile-app-sign-up .sso-wrapper-app,:host .sso-wrapper-app{position:relative;transition:all 0.2s linear;opacity:1}tc-mobile-app-sign-up .sso-wrapper-app--show,:host .sso-wrapper-app--show{opacity:1}tc-mobile-app-sign-up .sso-button,:host .sso-button{position:relative;display:block;width:100%;border-radius:30px;padding:14px 16px;height:auto;font:14px/16px Helvetica;text-align:center;box-sizing:border-box;cursor:pointer;color:#fff;font-weight:600}tc-mobile-app-sign-up .sso-button--filled,:host .sso-button--filled{background:#d74113;color:#ffffff;font-weight:600;border:0;letter-spacing:0.8px}tc-mobile-app-sign-up .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-mobile-app-sign-up .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-mobile-app-sign-up .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-mobile-app-sign-up .sso-button:hover:not([disabled]),tc-mobile-app-sign-up .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-mobile-app-sign-up .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-mobile-app-sign-up .sso-page-description,:host .sso-page-description{margin-bottom:25px}tc-mobile-app-sign-up .sso-page-title,:host .sso-page-title{font-size:18px;font-weight:900;line-height:24px;margin-bottom:13px}tc-mobile-app-sign-up .sso-page-subtitle,:host .sso-page-subtitle{font-size:12px;font-weight:400;line-height:12px;color:#999999}tc-mobile-app-sign-up .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin-bottom:25px;line-height:24px;line-height:140%}tc-mobile-app-sign-up .sso-close-button,:host .sso-close-button{position:absolute;font-size:35px;font-weight:100;line-height:0;right:15px;top:25px;background:transparent;color:#7B7B7B;cursor:pointer}tc-mobile-app-sign-up .sso-resend-code,:host .sso-resend-code{font-size:12px;font-weight:400;line-height:14px;color:#d74113;margin-bottom:30px;cursor:pointer}tc-mobile-app-sign-up .sso-resend-code--initial,:host .sso-resend-code--initial{margin-top:-16px}tc-mobile-app-sign-up button.sso-button[type=submit],:host button.sso-button[type=submit]{margin-top:15px}tc-mobile-app-sign-up .sso-checkboxes,:host .sso-checkboxes{margin-bottom:30px}tc-mobile-app-sign-up .sso-checkboxes sso-form-checkbox,:host .sso-checkboxes sso-form-checkbox{margin-bottom:16px}tc-mobile-app-sign-up .sso-checkboxes sso-form-checkbox:last-child,:host .sso-checkboxes sso-form-checkbox:last-child{margin-bottom:0}'}};let Si=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctSignUpFinishedEvent=zt(this,"tctSignUpFinishedEvent",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._fieldsPerFlow={[So.tcAppBirthdate]:["birthdate"],[So.tcAppEmail]:["email"],[So.tcAppVercode]:["vercode"],[So.tcAppWrongCode]:["email","vercode"],[So.tcAppNewPassword]:["password"],[So.tcAppUsername]:["username","termsConditions","privacyPolicy"],[So.tcAppName]:["name"]},this._templateFlowType=null,this.wrapperVisibilityClass="sso-wrapper-app--show",this.submitFormFailed=!1,this.passwordFieldViewValidators=[],this.submitted=!1,this.submitDisabled=!0,this.resendDisabled=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{const t=e.target;this.submitted=!1,this.submitFormFailed=!1,this.formData=this._ssoFormService.updateFormField(t,this.formData,this._fieldsPerFlow[this.formFlow]),t.name===this.formData.password.name&&this.setupPasswordFieldValidators(t.name,t.value);const o=Object.keys(this.formData).every(e=>this.formData[e].isValid);this.submitDisabled=!o},this.selectBirthdateHandler=e=>{this.formData=Object.assign(Object.assign({},this.formData),{birthdate:e.detail});const t=Object.keys(this.formData).every(e=>this.formData[e].isValid);this.submitDisabled=!t},this.resendCodeHandler=()=>{this.submitDisabled=!0,this.resendDisabled=!0,this.globalError="",this.submitted=!1,this._apiClientService.signUpResendCode(),this.formData.vercode=Object.assign(Object.assign({},this.formData.vercode),{value:"",errors:[],isValid:!0})},this.submitFormHandler=async e=>{e.preventDefault(),this.submitFormFailed=!1;const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._fieldsPerFlow[this.formFlow]);if(this.formData=t,this.submitFormFailed=!o,this.submitFormFailed)return!1;switch(this.submitted=!0,this.globalError="",this.submitDisabled=!0,this.resendDisabled=!0,this.formFlow){case So.tcAppBirthdate:this.formFlow=So.tcAppEmail;break;case So.tcAppNewPassword:this.formFlow=So.tcAppName;break;case So.tcAppName:this.formFlow=So.tcAppUsername;break;case So.tcAppEmail:try{await this._apiClientService.signUpSendCode(this.formData)}catch(e){console.log(e)}break;case So.tcAppVercode:try{await this._apiClientService.signUpVerifyEmail(this.formData)}catch(e){console.log(e)}break;case So.tcAppUsername:try{await this._apiClientService.signUpConfirm(this.formData)}catch(e){console.log(e)}}},this._templateFlowType=Eo.tcAppSignUp,this._apiClientService=xi.Instance,this._ssoFormService=new ri(oi),this.formFlow=this._templateFlowType?Ro(this._templateFlowType):So.tcAppBirthdate}componentWillLoad(){jo(this._templateFlowType),this.formData=this._ssoFormService.initFormData(["birthdate","emailTcApp","vercodeTcApp","passwordTcApp","name","username","termsConditionsTcApp","privacyPolicyTcApp","marketing"]),this.setupPasswordFieldValidators(this.formData.password.name)}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}setupPasswordFieldValidators(e,t=null){var o;this.passwordFieldViewValidators=(null===(o=oi[e])||void 0===o?void 0:o.reduce((e,o)=>(e.push({valid:t?o.handler(t):null,validatorLabel:o.validatorLabel}),e),[]))||[]}signUpSendCodeAzureHandler(e){this.signUpSendCodeResponseHandler(e.detail)}signUpVerCodeAzureResponseHandler(e){this.signUpVerCodeResponseHandler(e.detail)}signUpConfirmAzureResponseHandler(e){this.signUpConfirmResponseHandler(e.detail)}setSpecificFieldError(e,t){this.formData=Object.assign(Object.assign({},this.formData),{[e]:Object.assign(Object.assign({},this.formData[e]),{isValid:!1,errors:[bi(t)]})})}signUpSendCodeResponseHandler(e){var t;switch(this.submitDisabled=!1,this.resendDisabled=!1,+e.status){case 200:return this.submitted=!1,void(this.formFlow=So.tcAppVercode);default:return void(this.globalError=bi(null===(t=e.error)||void 0===t?void 0:t.message))}}signUpVerCodeResponseHandler(e){var t,o;switch(+e.status){case 200:return this.submitted=!1,void this._apiClientService.signUpConfirm(this.formData);default:return this.submitDisabled=!1,this.resendDisabled=!1,hi(e)?void(this.globalError=bi(null===(t=e.error)||void 0===t?void 0:t.message)):void this.setSpecificFieldError("vercode",null===(o=e.error)||void 0===o?void 0:o.message)}}signUpConfirmResponseHandler(e){var t,o,s;switch(this.tctSignUpFinishedEvent.emit(e),+e.status){case 200:return void(this.submitted=!1);default:return this.submitDisabled=!1,hi(e)?void(this.globalError=bi(null===(t=e.error)||void 0===t?void 0:t.message)):ui(e)?(this.setSpecificFieldError("email",null===(o=e.error)||void 0===o?void 0:o.message),this.formData=Object.assign(Object.assign({},this.formData),{vercode:Object.assign(Object.assign({},this.formData.vercode),{value:""})}),void(this.formFlow=So.tcAppEmail)):void(pi(e)&&(this.setSpecificFieldError("username",null===(s=e.error)||void 0===s?void 0:s.message),this.formFlow=So.tcAppUsername))}}render(){return Xe(Ke,null,Xe("div",{class:"sso-wrapper-app "+this.wrapperVisibilityClass},Xe("form",{onSubmit:this.submitFormHandler},Xe(zi,{formData:this.formData,globalError:this.globalError,formFlow:this.formFlow,submitDisabled:this.submitDisabled,passwordFieldViewValidators:this.passwordFieldViewValidators,onSelectBirthdate:this.selectBirthdateHandler,onResendCode:this.resendCodeHandler,onInputChange:this.inputChangeHandler}))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-mobile-app-sign-up-azure,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;padding:90px 15px 0;flex-direction:column;overflow:hidden;letter-spacing:0.01rem}tc-mobile-app-sign-up-azure a.sso-link,:host a.sso-link{color:#262626}tc-mobile-app-sign-up-azure .sso-wrapper-app,:host .sso-wrapper-app{position:relative;transition:all 0.2s linear;opacity:1}tc-mobile-app-sign-up-azure .sso-wrapper-app--show,:host .sso-wrapper-app--show{opacity:1}tc-mobile-app-sign-up-azure .sso-button,:host .sso-button{position:relative;display:block;width:100%;border-radius:30px;padding:14px 16px;height:auto;font:14px/16px Helvetica;text-align:center;box-sizing:border-box;cursor:pointer;color:#fff;font-weight:600}tc-mobile-app-sign-up-azure .sso-button--filled,:host .sso-button--filled{background:#d74113;color:#ffffff;font-weight:600;border:0;letter-spacing:0.8px}tc-mobile-app-sign-up-azure .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-mobile-app-sign-up-azure .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-mobile-app-sign-up-azure .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-mobile-app-sign-up-azure .sso-button:hover:not([disabled]),tc-mobile-app-sign-up-azure .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-mobile-app-sign-up-azure .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-mobile-app-sign-up-azure .sso-page-description,:host .sso-page-description{margin-bottom:25px}tc-mobile-app-sign-up-azure .sso-page-title,:host .sso-page-title{font-size:18px;font-weight:900;line-height:24px;margin-bottom:13px}tc-mobile-app-sign-up-azure .sso-page-subtitle,:host .sso-page-subtitle{font-size:12px;font-weight:400;line-height:12px;color:#999999}tc-mobile-app-sign-up-azure .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin-bottom:25px;line-height:24px;line-height:140%}tc-mobile-app-sign-up-azure .sso-close-button,:host .sso-close-button{position:absolute;font-size:35px;font-weight:100;line-height:0;right:15px;top:25px;background:transparent;color:#7B7B7B;cursor:pointer}tc-mobile-app-sign-up-azure .sso-resend-code,:host .sso-resend-code{font-size:12px;font-weight:400;line-height:14px;color:#d74113;margin-bottom:30px;cursor:pointer}tc-mobile-app-sign-up-azure .sso-resend-code--initial,:host .sso-resend-code--initial{margin-top:-16px}tc-mobile-app-sign-up-azure button.sso-button[type=submit],:host button.sso-button[type=submit]{margin-top:15px}tc-mobile-app-sign-up-azure .sso-checkboxes,:host .sso-checkboxes{margin-bottom:30px}tc-mobile-app-sign-up-azure .sso-checkboxes sso-form-checkbox,:host .sso-checkboxes sso-form-checkbox{margin-bottom:16px}tc-mobile-app-sign-up-azure .sso-checkboxes sso-form-checkbox:last-child,:host .sso-checkboxes sso-form-checkbox:last-child{margin-bottom:0}'}};class $i{constructor(){}pickupSocialSignUpFlow(e){var t,o,s,i,n,a,r;return(null===(t=e.birthdate)||void 0===t?void 0:t.value)?(null===(o=e.email)||void 0===o?void 0:o.value)||(null===(s=e.username)||void 0===s?void 0:s.value)?(null===(i=e.username)||void 0===i?void 0:i.value)?(null===(n=e.name)||void 0===n?void 0:n.value)&&(null===(a=e.privacyPolicy)||void 0===a?void 0:a.value)&&(null===(r=e.termsConditions)||void 0===r?void 0:r.value)?null:So.tcAppName:So.tcAppUsername:So.tcAppEmail:So.tcAppBirthdate}nextFlow(e){return this.pickupSocialSignUpFlow(e)}}let Ci=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctSignUpFinishedEvent=zt(this,"tctSignUpFinishedEvent",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._fieldsPerFlow={[So.tcAppBirthdate]:["birthdate"],[So.tcAppEmail]:["email"],[So.tcAppUsername]:["username"],[So.tcAppName]:["name","termsConditions","privacyPolicy"]},this.submitFormFailed=!1,this.passwordFieldViewValidators=[],this.wrapperVisibilityClass="sso-wrapper-app--show",this.flowHasChanged=!0,this.submitted=!1,this.submitDisabled=!0,this.firstLoad=!1,this.alreadyLoggedIn=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{const t=e.target;this.submitted=!1,this.submitFormFailed=!1,this.formData=this._ssoFormService.updateFormField(t,this.formData,this._fieldsPerFlow[this.formFlow]);const o=Object.keys(this.formData).every(e=>this.formData[e].isValid);this.submitDisabled=!o},this.selectBirthdateHandler=e=>{this.formData=Object.assign(Object.assign({},this.formData),{birthdate:e.detail});const t=Object.keys(this.formData).every(e=>this.formData[e].isValid);this.submitDisabled=!t},this.submitFormHandler=async e=>{e.preventDefault(),this.submitFormFailed=!1;const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._fieldsPerFlow[this.formFlow]);if(this.formData=t,this.submitFormFailed=!o,this.submitted=!0,this.submitFormFailed)return!1;this.globalError="",this.submitDisabled=!0;const s=this.formFlow===So.tcAppEmail?"email":this.formFlow===So.tcAppUsername?"username":null;if(s&&!await this.validateAccount(s))return;const i=this._socialSignUpService.nextFlow(this.formData);if(i)this.changeFlowWithFadeInOut(i);else try{const e=await this._apiClientService.setProfileTcApp(this.formData,{autoSignIn:!0});e.error||(this.tctSignUpFinishedEvent.emit(e),this.redirectAfterLoggedIn())}catch(e){console.log(e)}},this.FormUi=e=>{var t;let o;switch(e.formFlow){case So.tcAppBirthdate:o=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},Vs("text.whenYouBirthdate")),Xe("div",{class:"sso-page-subtitle"},Vs("text.yourBirthdateNotPublic"))),Xe("sso-birthdate-selection-container",{control:e.formData.birthdate,onUpdateBirthdate:e.onSelectBirthdate}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},Vs("buttons.next")));break;case So.tcAppEmail:o=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},Vs("text.enterEmail"))),(null===(t=e.globalError)||void 0===t?void 0:t.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.email,tcApp:!0,onInput:e.onInputChange,class:"sso-for-app-field"}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},Vs("buttons.next")));break;case So.tcAppUsername:o=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},Vs("text.createUsername")),Xe("div",{class:"sso-page-subtitle"},Vs("text.socialHandle"))),Xe("sso-default-field-container",{control:e.formData.username,tcApp:!0,onInput:e.onInputChange,class:"sso-for-app-field"}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},Vs("buttons.next")));break;case So.tcAppName:o=Xe(Yt,null,Xe("div",{class:"sso-page-description"},Xe("div",{class:"sso-page-title"},Vs("text.introduceYourself")),Xe("div",{class:"sso-page-subtitle"},Vs("text.howDoYouWantToBeCalled"))),Xe("sso-default-field-container",{control:e.formData.name,tcApp:!0,onInput:e.onInputChange,class:"sso-for-app-field"}),Xe("div",{class:"sso-checkboxes",onInput:e.onInputChange},Xe("sso-policies-container-app",{formData:e.formData})),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},Vs("buttons.createAccount")));break;default:o=Xe(Yt,null,Xe("div",{class:"sso-page-description"},e.alreadyLoggedIn?Xe("div",{class:"sso-page-title center"},Vs("text.alreadyEntered")):Xe("div",{class:"sso-page-title center"},Vs("errors.ERROR_MESSAGE_DEFAULT"))),Xe("div",{class:"sso-global-error"},e.globalError))}return o},this._apiClientService=Vo.Instance,this._tokenService=Oo.Instance,this._ssoFormService=new ri(ti),this._socialSignUpService=new $i,this.formFlow=null}componentWillLoad(){this.firstLoad=!0,Po(xo),this.formData=this._ssoFormService.initFormData(["birthdate","emailTcApp","name","username","termsConditionsTcApp","privacyPolicyTcApp","marketing"])}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}async componentDidLoad(){const e=await this._apiClientService.getProfile();if(this.firstLoad=!1,null==e?void 0:e.error)return void(this.globalError=Vs("errors.ERROR_MESSAGE_WRONG_TOKEN"));this.formData=Object.assign({},this._ssoFormService.mapAccountDataOnFormFields(this.formData,e));const t=this._socialSignUpService.nextFlow(this.formData);if(!e.data.hasOwnProperty("email")||!t)return this.alreadyLoggedIn=!0,this.tctSignUpFinishedEvent.emit(e),void this.redirectAfterLoggedIn();this.formFlow=t}async validateAccount(e){var t,o;const s={[e]:this.formData[e].value},i=await this._apiClientService.validateAccount(s);return!(null==i?void 0:i.error)||(this.setSpecificFieldError(e,(null===(t=i.error)||void 0===t?void 0:t.subcode)||(null===(o=i.error)||void 0===o?void 0:o.subCode)),!1)}setSpecificFieldError(e,t){this.formData=Object.assign(Object.assign({},this.formData),{[e]:Object.assign(Object.assign({},this.formData[e]),{isValid:!1,errors:[bi(t)]})})}changeFlowWithFadeInOut(e){this.wrapperVisibilityClass="",window.setTimeout(()=>{this.formFlow=e,this.wrapperVisibilityClass="sso-wrapper-app--show"},400)}redirectAfterLoggedIn(){var e;window.location.href=`${null===(e=To.currentMarket)||void 0===e?void 0:e.snAppRedirectLink}?id_token=${this._tokenService.getToken}`}render(){return Xe(Ke,null,Xe("div",{class:"sso-wrapper-app "+this.wrapperVisibilityClass},this.firstLoad?Xe("sso-skeleton-container-app",null):Xe("form",{onSubmit:this.submitFormHandler},Xe(this.FormUi,{formData:this.formData,globalError:this.globalError,formFlow:this.formFlow,alreadyLoggedIn:this.alreadyLoggedIn,submitDisabled:this.submitDisabled,onInputChange:this.inputChangeHandler,onSelectBirthdate:this.selectBirthdateHandler}))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-mobile-app-sn-sign-up,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;padding:90px 15px 0;flex-direction:column;overflow:hidden;letter-spacing:0.01rem}tc-mobile-app-sn-sign-up a.sso-link,:host a.sso-link{color:#262626}tc-mobile-app-sn-sign-up .sso-wrapper-app,:host .sso-wrapper-app{position:relative;transition:all 0.2s linear;opacity:1}tc-mobile-app-sn-sign-up .sso-wrapper-app--show,:host .sso-wrapper-app--show{opacity:1}tc-mobile-app-sn-sign-up .sso-button,:host .sso-button{position:relative;display:block;width:100%;border-radius:30px;padding:14px 16px;height:auto;font:14px/16px Helvetica;text-align:center;box-sizing:border-box;cursor:pointer;color:#fff;font-weight:600}tc-mobile-app-sn-sign-up .sso-button--filled,:host .sso-button--filled{background:#d74113;color:#ffffff;font-weight:600;border:0;letter-spacing:0.8px}tc-mobile-app-sn-sign-up .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-mobile-app-sn-sign-up .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-mobile-app-sn-sign-up .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-mobile-app-sn-sign-up .sso-button:hover:not([disabled]),tc-mobile-app-sn-sign-up .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-mobile-app-sn-sign-up .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-mobile-app-sn-sign-up .sso-page-description,:host .sso-page-description{margin-bottom:25px}tc-mobile-app-sn-sign-up .sso-page-title,:host .sso-page-title{font-size:18px;font-weight:900;line-height:24px;margin-bottom:13px}tc-mobile-app-sn-sign-up .sso-page-subtitle,:host .sso-page-subtitle{font-size:12px;font-weight:400;line-height:12px;color:#999999}tc-mobile-app-sn-sign-up .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin-bottom:25px;line-height:24px;line-height:140%}tc-mobile-app-sn-sign-up .sso-close-button,:host .sso-close-button{position:absolute;font-size:35px;font-weight:100;line-height:0;right:15px;top:25px;background:transparent;color:#7B7B7B;cursor:pointer}tc-mobile-app-sn-sign-up .sso-resend-code,:host .sso-resend-code{font-size:12px;font-weight:400;line-height:14px;color:#d74113;margin-bottom:30px;cursor:pointer}tc-mobile-app-sn-sign-up .sso-resend-code--initial,:host .sso-resend-code--initial{margin-top:-16px}tc-mobile-app-sn-sign-up h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:20px}tc-mobile-app-sn-sign-up .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-mobile-app-sn-sign-up .sso-link:hover,:host .sso-link:hover{text-decoration:none}tc-mobile-app-sn-sign-up button.sso-button[type=submit],:host button.sso-button[type=submit]{margin-top:15px}tc-mobile-app-sn-sign-up .sso-checkboxes,:host .sso-checkboxes{margin-bottom:30px}tc-mobile-app-sn-sign-up .sso-checkboxes sso-form-checkbox,:host .sso-checkboxes sso-form-checkbox{margin-bottom:16px}tc-mobile-app-sn-sign-up .sso-checkboxes sso-form-checkbox:last-child,:host .sso-checkboxes sso-form-checkbox:last-child{margin-bottom:0}tc-mobile-app-sn-sign-up .center,:host .center{text-align:center}'}};let Ai=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.sendClose=()=>{this.tctChangeFlow.emit()},this._deviceService=ks.Instance,this._ssoIntegrationService=_s.Instance,this.isDesktop=this._deviceService.isDesktop}changeFlow(e){if(!e.detail)return this.close(),((e=null)=>{const t=new URL(window.location.href);(e||t.searchParams.has("returnUrl"))&&(e?t.searchParams.set("returnUrl",e):t.searchParams.delete("returnUrl"),window.history.replaceState(null,"",t.toString()))})(),void this._ssoIntegrationService.clearLoggedInIterator();this.flow=e.detail}resize(){this.isDesktop=this._deviceService.isDesktop}async close(){var e;null===(e=document.querySelector("tc-my-account-auth-dialog"))||void 0===e||e.remove()}showContent(){var e,t,o;let s={};switch((null===(e=this.config)||void 0===e?void 0:e.relativeToElement)&&this.isDesktop&&(s={position:"absolute",right:null===(t=this.config.position)||void 0===t?void 0:t.right,top:null===(o=this.config.position)||void 0===o?void 0:o.top}),this.flow){case"welcome":return Xe(Yt,null,Xe("div",{class:"tc-auth-dialog-overlay",onClick:this.sendClose}),Xe("div",{class:"tc-auth-dialog-wrapper"},Xe("div",{class:"tc-auth-dialog-wrapper-cnt"},Xe("tc-my-account-welcome",null))));case"signIn":return Xe(Yt,null,Xe("div",{class:"tc-auth-dialog-overlay",onClick:this.sendClose}),Xe("div",{class:"tc-auth-dialog-wrapper"},Xe("div",{class:"tc-auth-dialog-wrapper-cnt"},Xe("tc-my-account-sign-in",null))));case"signInSmall":return Xe(Yt,null,Xe("div",{class:"tc-auth-dialog-wrapper"},Xe("div",{class:"tc-auth-dialog-wrapper-cnt",style:s},Xe("tc-my-account-sign-in-small",null))));case"signupSuccess":return Xe(Yt,null,Xe("div",{class:"tc-auth-dialog-overlay"}),Xe("div",{class:"tc-auth-dialog-wrapper"},Xe("div",{class:"tc-auth-dialog-wrapper-cnt",style:s},Xe("tc-my-account-auth-success",{email:this.config.data.email}))));case"signUp":return Xe(Yt,null,Xe("div",{class:"tc-auth-dialog-overlay",onClick:this.sendClose}),Xe("div",{class:"tc-auth-dialog-wrapper"},Xe("div",{class:"tc-auth-dialog-wrapper-cnt"},Xe("tc-my-account-sign-up",null))));case"navigationMenu":return Xe(Yt,null,Xe("div",{class:"tc-auth-dialog-wrapper"},Xe("div",{class:"tc-auth-dialog-wrapper-cnt",style:s},Xe("tc-my-account-navigation-menu",null))));default:return Xe("div",null,Vs("text.noData"))}}render(){return Xe(Ke,null,this.showContent())}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-auth-dialog,:host{position:absolute;z-index:1001;width:100%;height:100%;top:0;left:0;pointer-events:none}tc-my-account-auth-dialog.fixed,:host.fixed{position:fixed}tc-my-account-auth-dialog .tc-auth-dialog-wrapper,:host .tc-auth-dialog-wrapper{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;top:0;left:0;pointer-events:none}tc-my-account-auth-dialog .tc-auth-dialog-wrapper-cnt,:host .tc-auth-dialog-wrapper-cnt{position:fixed;display:flex;pointer-events:auto;height:100%}@media (min-width: 960px){tc-my-account-auth-dialog .tc-auth-dialog-wrapper-cnt,:host .tc-auth-dialog-wrapper-cnt{position:relative;height:auto}}tc-my-account-auth-dialog .tc-auth-dialog-overlay,:host .tc-auth-dialog-overlay{position:absolute;width:100%;height:100%;top:0;left:0;background:rgba(0, 0, 0, 0.2);pointer-events:auto}'}};let Fi=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this.close=()=>{this.tctChangeFlow.emit(null)}}componentWillRender(){}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}render(){return Xe(Ke,null,Xe("div",{class:"sso-bg-image"}),Xe("div",{class:"sso-wrapper"},Xe("div",{class:"sso-content"},Xe("h1",{class:"sso-title sso-title--successful-action"},Vs("text.accountSuccefullyCreated")),Xe("h3",{class:"sso-subtitle"},Vs("text.successfullSignUpMessageVersion2Part1")," ",Xe("span",{class:"sso-bold-text"},this.email),".",Xe("br",null)," ",Vs("text.successfullSignUpMessageVersion2Part2")),Xe("div",{class:"sso-buttons-cnt"},Xe("button",{class:"sso-button sso-button--filled sso-button--small-text",onClick:this.close},Vs("buttons.done"))))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-auth-success,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;background-color:#ffffff;justify-content:center;align-items:flex-start;overflow:auto;letter-spacing:0.01rem;text-align:center;align-items:center}@media (min-width: 960px){tc-my-account-auth-success,:host{flex-direction:row;justify-content:unset;align-items:unset;width:825px;max-width:100%;min-height:auto;padding:0;border-radius:24px;padding:24px;overflow:hidden;box-shadow:0 0 5px #cccccc}}tc-my-account-auth-success a.sso-link,:host a.sso-link{font-size:inherit;font-weight:inherit;line-height:inherit;color:#262626}tc-my-account-auth-success a.sso-checkbox-link,:host a.sso-checkbox-link{color:#262626;text-decoration:underline}tc-my-account-auth-success a.sso-checkbox-link:hover,:host a.sso-checkbox-link:hover{text-decoration:none}tc-my-account-auth-success a.sso-reset-password-link,:host a.sso-reset-password-link{font-size:16px;font-weight:400;line-height:22px}tc-my-account-auth-success .sso-bg-image,:host .sso-bg-image{background:url("/assets/images/sso/bg_new.png") no-repeat 0 50%;background-size:cover;border-radius:16px;height:100%;display:none}@media (min-width: 960px){tc-my-account-auth-success .sso-bg-image,:host .sso-bg-image{display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:18px}}tc-my-account-auth-success .sso-wrapper,:host .sso-wrapper{position:relative;display:flex;flex-direction:column;padding:64px 16px 24px;border-radius:10px;justify-content:center;max-width:100%;height:100%}@media (min-width: 960px){tc-my-account-auth-success .sso-wrapper,:host .sso-wrapper{padding:32px 0 0 32px;border-radius:0}}tc-my-account-auth-success .sso-content,:host .sso-content{display:flex;flex-direction:column;justify-content:space-between;height:100%}tc-my-account-auth-success .sso-content--already-signed,:host .sso-content--already-signed{justify-content:center;text-align:center}tc-my-account-auth-success .sso-change-flow,:host .sso-change-flow{flex:1;display:flex;align-items:flex-end}tc-my-account-auth-success h1.sso-title,:host h1.sso-title{font-size:24px;font-weight:700;line-height:26px;margin:0;margin-bottom:8px}tc-my-account-auth-success h1.sso-title--successful-action,:host h1.sso-title--successful-action{margin-top:-32px}tc-my-account-auth-success h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:400;line-height:22px;margin:0}tc-my-account-auth-success hr.sso-hr,:host hr.sso-hr{margin:36px 0 27px;height:0;border:0;border-top:1px solid #cacaca}tc-my-account-auth-success .sso-button,:host .sso-button{font-size:18px;font-weight:400;line-height:18px;position:relative;display:block;width:100%;border-radius:30px;padding:10px 16px;height:40px;text-align:center;box-sizing:border-box;cursor:pointer;text-decoration:none}tc-my-account-auth-success .sso-button--small,:host .sso-button--small{display:inline-block;width:auto;height:32px;padding:6px 24px;font-size:16px}tc-my-account-auth-success .sso-button--small:hover,:host .sso-button--small:hover{color:#ffffff}tc-my-account-auth-success .sso-button--filled,:host .sso-button--filled{font-weight:700;background:#d74113;color:#ffffff;border:0;letter-spacing:0.8px}tc-my-account-auth-success .sso-button--filled:hover,:host .sso-button--filled:hover{color:#ffffff}tc-my-account-auth-success .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-my-account-auth-success .sso-button--stroked:hover,:host .sso-button--stroked:hover{color:#ffffff}tc-my-account-auth-success .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-my-account-auth-success .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-my-account-auth-success .sso-button:hover:not([disabled]),tc-my-account-auth-success .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-my-account-auth-success .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-my-account-auth-success .sso-button:hover,:host .sso-button:hover{text-decoration:none}tc-my-account-auth-success .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin:0;font-size:14px;font-weight:400;line-height:140%}tc-my-account-auth-success .sso-flow-change-link,:host .sso-flow-change-link{font-size:16px;font-weight:400;line-height:20px;text-align:center;margin-top:20px;flex:1}@media (min-width: 960px){tc-my-account-auth-success .sso-flow-change-link,:host .sso-flow-change-link{padding-top:24px;margin-top:16px;border-top:1px solid #cacaca}}tc-my-account-auth-success .sso-flow-change-link--bold,:host .sso-flow-change-link--bold{font-weight:bold}tc-my-account-auth-success .sso-close-button,:host .sso-close-button{position:absolute;font-size:45px;line-height:25px;font-weight:100;right:16px;top:40px;background:transparent;color:#262626;cursor:pointer;z-index:1}@media (min-width: 960px){tc-my-account-auth-success .sso-close-button,:host .sso-close-button{right:0;top:0}}tc-my-account-auth-success .sso-flex-column,:host .sso-flex-column{flex:1;display:flex;flex-direction:column;position:relative}tc-my-account-auth-success .sso-flex-column-1,:host .sso-flex-column-1{flex:1}tc-my-account-auth-success .sso-flex-column-2,:host .sso-flex-column-2{flex:2}tc-my-account-auth-success .sso-flex-column-3,:host .sso-flex-column-3{flex:3}tc-my-account-auth-success .desktop-only,:host .desktop-only{display:none}@media (min-width: 960px){tc-my-account-auth-success .desktop-only,:host .desktop-only{display:block}}@media (min-width: 960px){tc-my-account-auth-success,:host{padding-bottom:50px}}tc-my-account-auth-success .sso-bg-image,:host .sso-bg-image{position:absolute;display:block;width:100%;height:100%;top:0;left:0;border-radius:0;background:url("/assets/images/sso/bg.png") no-repeat 0 50%;background-size:cover}@media (min-width: 960px){tc-my-account-auth-success .sso-bg-image,:host .sso-bg-image{display:none}}tc-my-account-auth-success h1.sso-title--successful-action,:host h1.sso-title--successful-action{margin:0}tc-my-account-auth-success .sso-wrapper,:host .sso-wrapper{padding:24px 24px 32px;height:auto;margin:0 16px}@media (min-width: 960px){tc-my-account-auth-success .sso-wrapper,:host .sso-wrapper{width:100%;padding:0}}tc-my-account-auth-success .sso-sn-content,:host .sso-sn-content{display:flex;flex-direction:column;text-align:center;align-items:center}tc-my-account-auth-success h3.sso-subtitle,:host h3.sso-subtitle{margin-top:16px;margin-bottom:24px}tc-my-account-auth-success .sso-buttons-cnt,:host .sso-buttons-cnt{display:flex;justify-content:center}tc-my-account-auth-success .sso-buttons-cnt button.sso-button,:host .sso-buttons-cnt button.sso-button{width:auto;padding:0 35px}'}};const Li={uk:{manageBooking:{title:"menu.manageBooking",link:"/manage-booking"},contactUs:{title:"menu.contactUs",link:"/contact-us"},wishlist:{title:"menu.wishlist",link:"/my-account/wishlist"},signIn:{title:"menu.signIn"},signUp:{title:"menu.signUp"},dashboard:{title:"menu.dashboard",link:"/my-account"},myBooking:{title:"menu.myBooking",link:"/my-account/booking"},managePayment:{title:"menu.managePayment",link:"/my-account/manage-payment"},documents:{title:"menu.documents",link:"/my-account/documents"},myWishlist:{title:"menu.myWishlist",link:"/my-account/wishlist"},logout:{title:"menu.logout"}},nl:{manageBooking:{title:"menu.manageBooking",link:"/nl/beheer-boeking"},contactUs:{title:"menu.contactUs",link:"/nl/contact-ons"},wishlist:{title:"menu.wishlist",link:"/nl/beheer-boeking/wishlist"},signIn:{title:"menu.signIn"},signUp:{title:"menu.signUp"},dashboard:{title:"menu.dashboard",link:"/nl/mijn-account"},myBooking:{title:"menu.myBooking",link:"/nl/mijn-account/boeking"},managePayment:{title:"menu.managePayment",link:"/nl/mijn-account/beheer-betaling"},documents:{title:"menu.documents",link:"/nl/mijn-account/documenten"},myWishlist:{title:"menu.myWishlist",link:"/nl/mijn-account/wishlist"},logout:{title:"menu.logout"}},be:{manageBooking:{title:"menu.manageBooking",link:"/nl/beheer-boeking"},contactUs:{title:"menu.contactUs",link:"/nl/contact-ons"},wishlist:{title:"menu.wishlist",link:"/nl/beheer-boeking/wishlist"},signIn:{title:"menu.signIn"},signUp:{title:"menu.signUp"},dashboard:{title:"menu.dashboard",link:"/nl/mijn-account"},myBooking:{title:"menu.myBooking",link:"/nl/mijn-account/boeking"},managePayment:{title:"menu.managePayment",link:"/nl/mijn-account/beheer-betaling"},documents:{title:"menu.documents",link:"/nl/mijn-account/documenten"},myWishlist:{title:"menu.myWishlist",link:"/nl/mijn-account/wishlist"},logout:{title:"menu.logout"}}};let Ri=class extends HTMLElement{constructor(){var e;super(),this.__registerHost(),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._menuItems=Li[null===(e=To.currentMarket)||void 0===e?void 0:e.market.toLowerCase()],this.globalError="",this.openSignUp=()=>{this.tctChangeFlow.emit("signUp")},this.openSignIn=()=>{this.tctChangeFlow.emit("signIn")},this.logout=async()=>{await this._apiClientService.signOut(),window.location.reload()},this.navigateTo=e=>()=>{window.location.pathname.includes("/my-account")||window.location.pathname.includes("/mijn-account")?(window.history.pushState({},e.title,e.link),setTimeout(()=>{window.location.reload()},0)):window.location.href=e.link},this.navigateOrLogin=e=>()=>{this._ssoIntegrationService.createLoggedInIterator(this.navigateTo(e))},this.close=()=>{this.tctChangeFlow.emit(null)},this.AfterLoginMenu=()=>Xe(Yt,null,["myBooking","dashboard","managePayment","documents","myWishlist"].map(e=>Xe("li",{class:"menu-list-item"},Xe("a",{onClick:this.navigateOrLogin(this._menuItems[e]),"owat-menu-item":!0},Vs(this._menuItems[e].title))))),this.AfterLoginHeader=()=>{var e,t;return Xe(Yt,null,this.isDesktop?Xe("div",{class:"sso-menu-buttons"},Xe("a",{class:"sso-button sso-button--filled sso-button--small",onClick:this.logout,"owat-logout":!0},Vs(this._menuItems.logout.title))):Xe(Yt,null,Xe("h1",{class:"sso-title"},this.userProfile?`${Vs("text.hello")} ${(null===(e=this.userProfile)||void 0===e?void 0:e.firstName)||(null===(t=this.userProfile)||void 0===t?void 0:t.name)}`:""+Vs("text.hello")),Xe("a",{class:"sso-logout-link",onClick:this.logout,"owat-logout":!0},Vs(this._menuItems.logout.title))))},this.BeforeLoginHeader=()=>Xe(Yt,null,Xe("div",{class:"sso-menu-buttons"},Xe("a",{class:"sso-button sso-button--filled sso-button--small",onClick:this.openSignIn,"owat-logout":!0},Vs("buttons.logIn"))),Xe("div",{class:"sso-create-link-cnt"},"Or ",Xe("a",{class:"sso-create-link",onClick:this.openSignUp,"owat-logout":!0},Vs("links.signUp")))),this._ssoIntegrationService=_s.Instance,this._apiClientService=Vo.Instance,this._deviceService=ks.Instance,this.userProfile=this._ssoIntegrationService.userProfile,this._ssoIntegrationService.userProfile$.subscribe(e=>{this.userProfile=e}),this._deviceService.fixHtml(!this._deviceService.isDesktop),this.isDesktop=this._deviceService.isDesktop}resize(){this._deviceService.fixHtml(!this._deviceService.isDesktop),this.isDesktop=this._deviceService.isDesktop}checkForClickOutside(e){this.menuElement.contains(e.target)||this.close()}componentWillLoad(){}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}disconnectedCallback(){}render(){return Xe(Ke,null,Xe("div",{class:"sso-wrapper"},Xe("span",{class:"sso-close-button",onClick:this.close},"×"),Xe("div",{class:"sso-content"},Xe("div",{class:"sso-content-header-cnt"},this._ssoIntegrationService.authToken?Xe(this.AfterLoginHeader,null):Xe(this.BeforeLoginHeader,null)),Xe("div",{class:"sso-content-title"},Vs("links.myAccount")),Xe("ul",{class:"menu-list"},Xe(this.AfterLoginMenu,null)))))}get menuElement(){return this}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-navigation-menu,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;background-size:cover;flex-direction:column;justify-content:center;overflow:hidden;background-color:#fff;padding:0;letter-spacing:0.01rem;min-height:100%}@media (min-width: 960px){tc-my-account-navigation-menu,:host{display:block;position:relative;box-sizing:border-box;font-family:"Source Sans Pro";width:340px;min-height:auto;border-radius:16px;box-shadow:0px 0px 5px #999999;overflow:hidden}}tc-my-account-navigation-menu .sso-wrapper,:host .sso-wrapper{position:relative;display:flex;flex-direction:column;background-color:#ffffff;padding:64px 16px 24px;justify-content:center;height:100%}@media (min-width: 960px){tc-my-account-navigation-menu .sso-wrapper,:host .sso-wrapper{height:100%;padding:24px 16px 24px}}tc-my-account-navigation-menu .sso-content,:host .sso-content{height:100%}tc-my-account-navigation-menu .sso-content-title,:host .sso-content-title{font-size:20px;line-height:25px;font-weight:700}tc-my-account-navigation-menu .sso-change-flow,:host .sso-change-flow{flex:1;display:flex;align-items:flex-end}tc-my-account-navigation-menu h1.sso-title,:host h1.sso-title{font-size:24px;font-weight:700;line-height:26px;margin-bottom:8px;text-align:center}tc-my-account-navigation-menu .sso-close-button,:host .sso-close-button{position:absolute;font-size:45px;line-height:25px;font-weight:100;top:40px;right:16px;background:transparent;color:#262626;cursor:pointer}tc-my-account-navigation-menu .sso-button,:host .sso-button{font-size:18px;font-weight:400;line-height:18px;position:relative;display:block;width:100%;border-radius:30px;padding:10px 16px;height:40px;text-align:center;box-sizing:border-box;cursor:pointer;text-decoration:none}tc-my-account-navigation-menu .sso-button--small,:host .sso-button--small{display:inline-block;width:auto;height:32px;padding:6px 24px;font-size:16px}tc-my-account-navigation-menu .sso-button--small:hover,:host .sso-button--small:hover{color:#ffffff}tc-my-account-navigation-menu .sso-button--filled,:host .sso-button--filled{font-weight:700;background:#d74113;color:#ffffff;border:0;letter-spacing:0.8px}tc-my-account-navigation-menu .sso-button--filled:hover,:host .sso-button--filled:hover{color:#ffffff}tc-my-account-navigation-menu .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-my-account-navigation-menu .sso-button--stroked:hover,:host .sso-button--stroked:hover{color:#ffffff}tc-my-account-navigation-menu .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-my-account-navigation-menu .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-my-account-navigation-menu .sso-button:hover:not([disabled]),tc-my-account-navigation-menu .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-my-account-navigation-menu .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-my-account-navigation-menu .sso-button:hover,:host .sso-button:hover{text-decoration:none}tc-my-account-navigation-menu ul.menu-list,:host ul.menu-list{list-style-type:none;padding:0;margin:0}tc-my-account-navigation-menu ul.menu-list li.menu-list-item,:host ul.menu-list li.menu-list-item{padding-bottom:16px;line-height:22px}tc-my-account-navigation-menu ul.menu-list li.menu-list-item:first-child,:host ul.menu-list li.menu-list-item:first-child{padding-top:16px}tc-my-account-navigation-menu ul.menu-list li.menu-list-item:last-child,:host ul.menu-list li.menu-list-item:last-child{padding-bottom:0}tc-my-account-navigation-menu ul.menu-list li.menu-list-item a,:host ul.menu-list li.menu-list-item a{font-size:16px;font-weight:400;line-height:22px;color:#262626;text-decoration:none;cursor:pointer}tc-my-account-navigation-menu ul.menu-list li.menu-list-item a:hover,:host ul.menu-list li.menu-list-item a:hover{text-decoration:underline}tc-my-account-navigation-menu ul.menu-list li.delimiter,:host ul.menu-list li.delimiter{padding-top:18px;border-top:1px solid #E9E9E9}tc-my-account-navigation-menu .sso-flow-change-link span,:host .sso-flow-change-link span{cursor:pointer}tc-my-account-navigation-menu .sso-create-link,:host .sso-create-link{text-transform:lowercase}tc-my-account-navigation-menu .sso-create-link-cnt,:host .sso-create-link-cnt{font-size:16px;font-weight:400;line-height:24px;margin-top:8px}tc-my-account-navigation-menu .sso-logout-link,tc-my-account-navigation-menu .sso-create-link,:host .sso-logout-link,:host .sso-create-link{text-decoration:underline;cursor:pointer;color:#262626}tc-my-account-navigation-menu .sso-logout-link:hover,tc-my-account-navigation-menu .sso-logout-link:focus,tc-my-account-navigation-menu .sso-create-link:hover,tc-my-account-navigation-menu .sso-create-link:focus,:host .sso-logout-link:hover,:host .sso-logout-link:focus,:host .sso-create-link:hover,:host .sso-create-link:focus{text-decoration:none;color:#262626}tc-my-account-navigation-menu .sso-content-title,:host .sso-content-title{padding-top:16px;margin-top:16px;margin-bottom:8px;border-top:1px solid #e9e9e9}tc-my-account-navigation-menu .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-my-account-navigation-menu .sso-link:hover,:host .sso-link:hover{text-decoration:none}tc-my-account-navigation-menu .sso-close-button,:host .sso-close-button{display:block}@media (min-width: 960px){tc-my-account-navigation-menu .sso-close-button,:host .sso-close-button{display:none}}tc-my-account-navigation-menu .sso-menu-buttons,:host .sso-menu-buttons{text-align:center}tc-my-account-navigation-menu .sso-content-header-cnt,:host .sso-content-header-cnt{text-align:center}'}};let ji=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this.openMenu=()=>{this._ssoIntegrationService.openNavigationMenu({relativeToElement:this.currentElement,data:null})},this._ssoIntegrationService=_s.Instance,this._deviceService=ks.Instance,this.userProfile=this._ssoIntegrationService.userProfile,this.isMobile=this._deviceService.isMobile}resize(){this.isMobile=this._deviceService.isMobile}componentWillLoad(){this._ssoIntegrationService.userProfile$.subscribe(e=>{this.userProfile=e})}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}disconnectedCallback(){}prepareSsoText(){var e,t;const o=this.userProfile?(null===(e=this.userProfile)||void 0===e?void 0:e.firstName)||(null===(t=this.userProfile)||void 0===t?void 0:t.name)||Vs("links.myAccount"):Vs("buttons.myAccount");return this.isMobile?this.userProfile?null==o?void 0:o.toUpperCase().slice(0,1):null:o}render(){const e=this.prepareSsoText(),t=this.userProfile&&this.isMobile;return Xe(Ke,{onClick:this.openMenu,class:""+(this.userProfile?"logged-in":""),title:e},Xe("div",{class:"tc-menu-toggle-icon "+(t?"no-bg":"")},this.isMobile&&e?Xe("div",{class:"tc-menu-toggle-small-name"},e):null),!this.isMobile&&e?Xe("div",{class:"tc-menu-toggle-name"},e):null)}get currentElement(){return this}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-navigation-open,:host{display:flex;cursor:pointer}@media (min-width: 600px){tc-my-account-navigation-open,:host{padding:5px 7px;margin-top:-6px;border:1px solid #262626;border-radius:50px}}tc-my-account-navigation-open.logged-in .tc-menu-toggle-icon,:host.logged-in .tc-menu-toggle-icon{background-color:rgba(1, 167, 148, 0.3);border-radius:50%}tc-my-account-navigation-open .tc-menu-toggle-icon,:host .tc-menu-toggle-icon{width:20px;height:20px;font-size:0;font-weight:400;background:url("/assets/images/sso/login.svg") no-repeat 0 0}tc-my-account-navigation-open .tc-menu-toggle-icon.no-bg,:host .tc-menu-toggle-icon.no-bg{background-image:none;border:1px solid #262626}tc-my-account-navigation-open .tc-menu-toggle-name,:host .tc-menu-toggle-name{display:flex;align-items:center;margin-left:8px;line-height:17px;font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media (min-width: 600px){tc-my-account-navigation-open .tc-menu-toggle-name,:host .tc-menu-toggle-name{line-height:20px;font-size:16px}}tc-my-account-navigation-open .tc-menu-toggle-small-name,:host .tc-menu-toggle-small-name{font-size:14px;display:flex;align-items:center;justify-content:center;height:100%}'}};const Pi=e=>{var t,o,s;let i;switch(e.formFlow){case So.resetPasswordEmail:i=Xe(Yt,null,(null===(t=e.globalError)||void 0===t?void 0:t.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.email,onInput:e.onInputChange}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},Vs("buttons.next")));break;case So.resetPasswordVercode:let n;e.errorNoAccount||(n=Xe(Yt,null,Xe("sso-default-field-container",{control:e.formData.vercode,onInput:e.onInputChange}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},Vs("buttons.next")),Xe("sso-resend-code-button",{isDisabled:e.resendDisabled,onResendCode:e.onResendCode}))),i=Xe(Yt,null,Xe("h3",{class:"sso-subtitle"},Vs("text.pleaseCheckEmail")),(null===(o=e.globalError)||void 0===o?void 0:o.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,n);break;case So.resetPasswordConfirmation:i=Xe(Yt,null,(null===(s=e.globalError)||void 0===s?void 0:s.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-password-field-container",{control:e.formData.password,showError:!0,onInput:e.onInputChange}),Xe("sso-password-field-container",{control:e.formData.passwordConfirm,showError:!0,onInput:e.onInputChange}),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},Vs("buttons.logIn")))}return i};let Ii=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.resetPasswordResponseEvent=zt(this,"resetPasswordResponseEvent",7),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._signUpLink=go,this._fieldsPerFlow={[So.resetPasswordEmail]:["email"],[So.resetPasswordVercode]:["vercode"],[So.resetPasswordConfirmation]:["password","passwordConfirm"]},this.submitted=!1,this.submitDisabled=!1,this.resendDisabled=!1,this.formFlow=So.resetPasswordEmail,this.errorNoAccount=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{const t=e.target;this.submitted=!1,this.formData=this._ssoFormService.inputChangeHandler(t,this.formData,this._fieldsPerFlow[this.formFlow])},this.resendCodeHandler=()=>{this.submitDisabled=!0,this.resendDisabled=!0,this.globalError="",this.submitted=!1,this._apiClientService.resetPasswordResendCode(),this.formData.vercode=Object.assign(Object.assign({},this.formData.vercode),{value:"",errors:[],isValid:!0})},this.submitFormHandler=async e=>{e.preventDefault();const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._fieldsPerFlow[this.formFlow]);if(this.formData=t,this.submitted=!0,!o)return!1;switch(this.globalError="",this.submitDisabled=!0,this.resendDisabled=!0,this.formFlow){case So.resetPasswordEmail:try{const e=await this._apiClientService.resetPasswordSendCode(this.formData);this.resetPasswordSendCodeResponseHandler(e)}catch(e){console.log(e)}break;case So.resetPasswordVercode:try{const e=await this._apiClientService.resetPasswordVerifyEmail(this.formData);this.resetPasswordVerCodeResponseHandler(e)}catch(e){console.log(e)}break;case So.resetPasswordConfirmation:try{const e=await this._apiClientService.resetPasswordConfirm(this.formData);this.resetPasswordConfirmResponseHandler(e)}catch(e){console.log(e)}}},this.close=()=>{this.tctChangeFlow.emit(null)},this._apiClientService=Vo.Instance,this._ssoFormService=new ri(ni),this._deviceService=ks.Instance,this.isDesktop=this._deviceService.isDesktop}resize(){this.isDesktop=this._deviceService.isDesktop}componentWillLoad(){Po(xo),this.formData=this._ssoFormService.initFormData(["email","password","passwordConfirm","vercode"])}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}resetPasswordSendCodeResponseHandler(e){var t;switch(this.submitDisabled=!1,this.resendDisabled=!1,+e.status){case 200:return this.submitted=!1,void(this.formFlow=So.resetPasswordVercode);default:return void(this.globalError=bi(null===(t=e.error)||void 0===t?void 0:t.message))}}resetPasswordVerCodeResponseHandler(e){var t,o,s,i;switch(+(null==e?void 0:e.status)){case 200:this.submitted=!1;try{this._apiClientService.resetPasswordEmailConfirm()}catch(e){console.log(e)}return;default:this.submitDisabled=!1,this.resendDisabled=!1;const n=bi(null===(t=e.error)||void 0===t?void 0:t.message);return"The code has expired."!==(null===(o=e.error)||void 0===o?void 0:o.message)&&(null===(s=e.error)||void 0===s?void 0:s.message)!==wo?void(this.globalError=n):("The code has expired."===(null===(i=e.error)||void 0===i?void 0:i.message)&&(this.submitDisabled=!0),void(this.formData=Object.assign(Object.assign({},this.formData),{vercode:Object.assign(Object.assign({},this.formData.vercode),{isValid:!1,errors:[n]})})))}}resetPasswordConfirmResponseHandler(e){var t,o;switch(this.resetPasswordResponseEvent.emit(e),+(null==e?void 0:e.status)){case 200:return void(this.submitted=!1);default:return"An account could not be found for the provided user ID."===(null===(t=e.error)||void 0===t?void 0:t.message)&&(this.errorNoAccount=!0),void(this.globalError=bi(null===(o=e.error)||void 0===o?void 0:o.message))}}render(){return Xe(Ke,null,this.isDesktop?Xe("div",{class:"sso-flex-column-1"},Xe("div",{class:"sso-bg-image"})):null,Xe("div",{class:"sso-flex-column sso-flex-column-1"},Xe("div",{class:"sso-wrapper"},Xe("span",{class:"sso-close-button",onClick:this.close},"×"),Xe("div",{class:"sso-content"},Xe("h1",{class:"sso-title"},Vs("text.forgotPassword")),Xe("form",{onSubmit:this.submitFormHandler},Xe(Pi,{formFlow:this.formFlow,formData:this.formData,globalError:this.globalError,onInputChange:this.inputChangeHandler,submitDisabled:this.submitDisabled,resendDisabled:this.resendDisabled,errorNoAccount:this.errorNoAccount}))),Xe("div",{class:"sso-change-flow"},Xe("div",{class:"sso-flow-change-link"},Vs("text.dontHaveAccount")," ",Xe("a",{class:"link sso-link",href:this._signUpLink},Vs("links.signUp")))))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-reset-password,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;background-color:#ffffff;justify-content:center;align-items:flex-start;overflow:auto;letter-spacing:0.01rem}@media (min-width: 960px){tc-my-account-reset-password,:host{flex-direction:row;justify-content:unset;align-items:unset;width:825px;max-width:100%;min-height:auto;padding:0;border-radius:24px;padding:24px;overflow:hidden;box-shadow:0 0 5px #cccccc}}tc-my-account-reset-password a.sso-link,:host a.sso-link{font-size:inherit;font-weight:inherit;line-height:inherit;color:#262626}tc-my-account-reset-password a.sso-checkbox-link,:host a.sso-checkbox-link{color:#262626;text-decoration:underline}tc-my-account-reset-password a.sso-checkbox-link:hover,:host a.sso-checkbox-link:hover{text-decoration:none}tc-my-account-reset-password a.sso-reset-password-link,:host a.sso-reset-password-link{font-size:16px;font-weight:400;line-height:22px}tc-my-account-reset-password .sso-bg-image,:host .sso-bg-image{background:url("/assets/images/sso/bg_new.png") no-repeat 0 50%;background-size:cover;border-radius:16px;height:100%;display:none}@media (min-width: 960px){tc-my-account-reset-password .sso-bg-image,:host .sso-bg-image{display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:18px}}tc-my-account-reset-password .sso-wrapper,:host .sso-wrapper{position:relative;display:flex;flex-direction:column;padding:64px 16px 24px;border-radius:10px;justify-content:center;max-width:100%;height:100%}@media (min-width: 960px){tc-my-account-reset-password .sso-wrapper,:host .sso-wrapper{padding:32px 0 0 32px;border-radius:0}}tc-my-account-reset-password .sso-content,:host .sso-content{display:flex;flex-direction:column;justify-content:space-between;height:100%}tc-my-account-reset-password .sso-content--already-signed,:host .sso-content--already-signed{justify-content:center;text-align:center}tc-my-account-reset-password .sso-change-flow,:host .sso-change-flow{flex:1;display:flex;align-items:flex-end}tc-my-account-reset-password h1.sso-title,:host h1.sso-title{font-size:24px;font-weight:700;line-height:26px;margin:0;margin-bottom:8px}tc-my-account-reset-password h1.sso-title--successful-action,:host h1.sso-title--successful-action{margin-top:-32px}tc-my-account-reset-password h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:400;line-height:22px;margin:0}tc-my-account-reset-password hr.sso-hr,:host hr.sso-hr{margin:36px 0 27px;height:0;border:0;border-top:1px solid #cacaca}tc-my-account-reset-password .sso-button,:host .sso-button{font-size:18px;font-weight:400;line-height:18px;position:relative;display:block;width:100%;border-radius:30px;padding:10px 16px;height:40px;text-align:center;box-sizing:border-box;cursor:pointer;text-decoration:none}tc-my-account-reset-password .sso-button--small,:host .sso-button--small{display:inline-block;width:auto;height:32px;padding:6px 24px;font-size:16px}tc-my-account-reset-password .sso-button--small:hover,:host .sso-button--small:hover{color:#ffffff}tc-my-account-reset-password .sso-button--filled,:host .sso-button--filled{font-weight:700;background:#d74113;color:#ffffff;border:0;letter-spacing:0.8px}tc-my-account-reset-password .sso-button--filled:hover,:host .sso-button--filled:hover{color:#ffffff}tc-my-account-reset-password .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-my-account-reset-password .sso-button--stroked:hover,:host .sso-button--stroked:hover{color:#ffffff}tc-my-account-reset-password .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-my-account-reset-password .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-my-account-reset-password .sso-button:hover:not([disabled]),tc-my-account-reset-password .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-my-account-reset-password .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-my-account-reset-password .sso-button:hover,:host .sso-button:hover{text-decoration:none}tc-my-account-reset-password .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin:0;font-size:14px;font-weight:400;line-height:140%}tc-my-account-reset-password .sso-flow-change-link,:host .sso-flow-change-link{font-size:16px;font-weight:400;line-height:20px;text-align:center;margin-top:20px;flex:1}@media (min-width: 960px){tc-my-account-reset-password .sso-flow-change-link,:host .sso-flow-change-link{padding-top:24px;margin-top:16px;border-top:1px solid #cacaca}}tc-my-account-reset-password .sso-flow-change-link--bold,:host .sso-flow-change-link--bold{font-weight:bold}tc-my-account-reset-password .sso-close-button,:host .sso-close-button{position:absolute;font-size:45px;line-height:25px;font-weight:100;right:16px;top:40px;background:transparent;color:#262626;cursor:pointer;z-index:1}@media (min-width: 960px){tc-my-account-reset-password .sso-close-button,:host .sso-close-button{right:0;top:0}}tc-my-account-reset-password .sso-flex-column,:host .sso-flex-column{flex:1;display:flex;flex-direction:column;position:relative}tc-my-account-reset-password .sso-flex-column-1,:host .sso-flex-column-1{flex:1}tc-my-account-reset-password .sso-flex-column-2,:host .sso-flex-column-2{flex:2}tc-my-account-reset-password .sso-flex-column-3,:host .sso-flex-column-3{flex:3}tc-my-account-reset-password .desktop-only,:host .desktop-only{display:none}@media (min-width: 960px){tc-my-account-reset-password .desktop-only,:host .desktop-only{display:block}}tc-my-account-reset-password .sso-checkboxes,:host .sso-checkboxes{margin-top:10px;margin-bottom:35px}tc-my-account-reset-password .sso-checkboxes sso-form-checkbox,:host .sso-checkboxes sso-form-checkbox{margin-bottom:5px}tc-my-account-reset-password .sso-checkboxes sso-form-checkbox:last-child,:host .sso-checkboxes sso-form-checkbox:last-child{margin-bottom:0}tc-my-account-reset-password .sso-resend-code-cnt,:host .sso-resend-code-cnt{margin-top:16px}tc-my-account-reset-password .sso-resend-code-link,:host .sso-resend-code-link{font-size:16px;font-weight:400;line-height:22px;cursor:pointer;text-decoration:underline}tc-my-account-reset-password .sso-resend-code--disabled,:host .sso-resend-code--disabled{color:#757575;text-decoration:none;cursor:default}tc-my-account-reset-password h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:50px}tc-my-account-reset-password button.sso-button,:host button.sso-button{margin-top:15px}tc-my-account-reset-password .sso-global-error,:host .sso-global-error{margin-bottom:40px}tc-my-account-reset-password .sso-contact-text,:host .sso-contact-text{margin:15px 0 30px;color:#757575;font-size:12px;font-weight:400;line-height:15px;text-align:center}tc-my-account-reset-password .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-my-account-reset-password .sso-link:hover,:host .sso-link:hover{text-decoration:none}'}};let Ti=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.resetPasswordResponseEvent=zt(this,"resetPasswordResponseEvent",7),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._fieldsPerFlow={[So.resetPasswordEmail]:["email"],[So.resetPasswordVercode]:["vercode"],[So.resetPasswordConfirmation]:["password","passwordConfirm"]},this._templateFlowType=null,this.submitFormFailed=!1,this.submitted=!1,this.submitDisabled=!1,this.resendDisabled=!1,this.errorNoAccount=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{const t=e.target;this.submitted=!1,this.formData=this._ssoFormService.inputChangeHandler(t,this.formData,this._fieldsPerFlow[this.formFlow])},this.resendCodeHandler=()=>{this.submitDisabled=!0,this.resendDisabled=!0,this.globalError="",this.submitted=!1,this._apiClientService.resetPasswordResendCode(),this.formData.vercode=Object.assign(Object.assign({},this.formData.vercode),{value:"",errors:[],isValid:!0})},this.submitFormHandler=async e=>{e.preventDefault(),this.submitFormFailed=!1;const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._fieldsPerFlow[this.formFlow]);if(this.formData=t,this.submitFormFailed=!o,this.submitFormFailed)return!1;switch(this.submitted=!0,this.globalError="",this.submitDisabled=!0,this.resendDisabled=!0,this.formFlow){case So.resetPasswordEmail:try{await this._apiClientService.resetPasswordSendCode(this.formData)}catch(e){console.log(e)}break;case So.resetPasswordVercode:try{await this._apiClientService.resetPasswordVerifyEmail(this.formData)}catch(e){console.log(e)}break;case So.resetPasswordConfirmation:try{await this._apiClientService.resetPasswordConfirm(this.formData)}catch(e){console.log(e)}}},this.goBack=()=>{var e,t;const o=new URLSearchParams(window.location.search);window.location.href=o.get("state")||`https://${null===(e=To.currentMarket)||void 0===e?void 0:e.domainEnv}${null===(t=To.currentMarket)||void 0===t?void 0:t.myAccountLink}`},this._templateFlowType=Eo.tcPortalResetPassword,this._apiClientService=xi.Instance,this._ssoFormService=new ri(ni),this._deviceService=ks.Instance,this.isDesktop=this._deviceService.isDesktop,this.formFlow=Lo(this._templateFlowType)}resize(){this.isDesktop=this._deviceService.isDesktop}componentWillLoad(){jo(this._templateFlowType),this.formData=this._ssoFormService.initFormData(["email","password","passwordConfirm","vercode"])}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}signUpSendCodeAzureHandler(e){this.resetPasswordSendCodeResponseHandler(e.detail)}signUpVerCodeAzureResponseHandler(e){this.resetPasswordVerCodeResponseHandler(e.detail)}signUpConfirmAzureResponseHandler(e){this.resetPasswordConfirmResponseHandler(e.detail)}resetPasswordSendCodeResponseHandler(e){var t;switch(this.submitDisabled=!1,this.resendDisabled=!1,+e.status){case 200:return this.submitted=!1,void(this.formFlow=So.resetPasswordVercode);default:return void(this.globalError=bi(null===(t=e.error)||void 0===t?void 0:t.message))}}resetPasswordVerCodeResponseHandler(e){var t,o,s,i;switch(+(null==e?void 0:e.status)){case 200:this.submitted=!1;try{this._apiClientService.resetPasswordEmailConfirm()}catch(e){console.log(e)}return;default:this.submitDisabled=!1,this.resendDisabled=!1;const n=bi(null===(t=e.error)||void 0===t?void 0:t.message);return"The code has expired."!==(null===(o=e.error)||void 0===o?void 0:o.message)&&(null===(s=e.error)||void 0===s?void 0:s.message)!==wo?void(this.globalError=n):("The code has expired."===(null===(i=e.error)||void 0===i?void 0:i.message)&&(this.submitDisabled=!0),void(this.formData=Object.assign(Object.assign({},this.formData),{vercode:Object.assign(Object.assign({},this.formData.vercode),{isValid:!1,errors:[n]})})))}}resetPasswordConfirmResponseHandler(e){var t,o;switch(this.resetPasswordResponseEvent.emit(e),+(null==e?void 0:e.status)){case 200:return void(this.submitted=!1);default:return"An account could not be found for the provided user ID."===(null===(t=e.error)||void 0===t?void 0:t.message)&&(this.errorNoAccount=!0),void(this.globalError=bi(null===(o=e.error)||void 0===o?void 0:o.message))}}render(){return Xe(Ke,null,this.isDesktop?Xe("div",{class:"sso-flex-column-1"},Xe("div",{class:"sso-bg-image"})):null,Xe("div",{class:"sso-flex-column sso-flex-column-1"},Xe("div",{class:"sso-wrapper"},Xe("div",{class:"sso-content"},Xe("h1",{class:"sso-title"},Vs("text.forgotPassword")),Xe("h3",{class:"sso-subtitle"},Vs("text.returnTo")," ",Xe("a",{class:"sso-link",onClick:this.goBack},Vs("links.myAccount"))),Xe("form",{onSubmit:this.submitFormHandler},Xe(Pi,{formFlow:this.formFlow,formData:this.formData,globalError:this.globalError,onInputChange:this.inputChangeHandler,onResendCode:this.resendCodeHandler,submitDisabled:this.submitDisabled,resendDisabled:this.resendDisabled,errorNoAccount:this.errorNoAccount}))))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-reset-password-azure,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;background-color:#ffffff;justify-content:center;align-items:flex-start;overflow:auto;letter-spacing:0.01rem}@media (min-width: 960px){tc-my-account-reset-password-azure,:host{flex-direction:row;justify-content:unset;align-items:unset;width:825px;max-width:100%;min-height:auto;padding:0;border-radius:24px;padding:24px;overflow:hidden;box-shadow:0 0 5px #cccccc}}tc-my-account-reset-password-azure a.sso-link,:host a.sso-link{font-size:inherit;font-weight:inherit;line-height:inherit;color:#262626}tc-my-account-reset-password-azure a.sso-checkbox-link,:host a.sso-checkbox-link{color:#262626;text-decoration:underline}tc-my-account-reset-password-azure a.sso-checkbox-link:hover,:host a.sso-checkbox-link:hover{text-decoration:none}tc-my-account-reset-password-azure a.sso-reset-password-link,:host a.sso-reset-password-link{font-size:16px;font-weight:400;line-height:22px}tc-my-account-reset-password-azure .sso-bg-image,:host .sso-bg-image{background:url("/assets/images/sso/bg_new.png") no-repeat 0 50%;background-size:cover;border-radius:16px;height:100%;display:none}@media (min-width: 960px){tc-my-account-reset-password-azure .sso-bg-image,:host .sso-bg-image{display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:18px}}tc-my-account-reset-password-azure .sso-wrapper,:host .sso-wrapper{position:relative;display:flex;flex-direction:column;padding:64px 16px 24px;border-radius:10px;justify-content:center;max-width:100%;height:100%}@media (min-width: 960px){tc-my-account-reset-password-azure .sso-wrapper,:host .sso-wrapper{padding:32px 0 0 32px;border-radius:0}}tc-my-account-reset-password-azure .sso-content,:host .sso-content{display:flex;flex-direction:column;justify-content:space-between;height:100%}tc-my-account-reset-password-azure .sso-content--already-signed,:host .sso-content--already-signed{justify-content:center;text-align:center}tc-my-account-reset-password-azure .sso-change-flow,:host .sso-change-flow{flex:1;display:flex;align-items:flex-end}tc-my-account-reset-password-azure h1.sso-title,:host h1.sso-title{font-size:24px;font-weight:700;line-height:26px;margin:0;margin-bottom:8px}tc-my-account-reset-password-azure h1.sso-title--successful-action,:host h1.sso-title--successful-action{margin-top:-32px}tc-my-account-reset-password-azure h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:400;line-height:22px;margin:0}tc-my-account-reset-password-azure hr.sso-hr,:host hr.sso-hr{margin:36px 0 27px;height:0;border:0;border-top:1px solid #cacaca}tc-my-account-reset-password-azure .sso-button,:host .sso-button{font-size:18px;font-weight:400;line-height:18px;position:relative;display:block;width:100%;border-radius:30px;padding:10px 16px;height:40px;text-align:center;box-sizing:border-box;cursor:pointer;text-decoration:none}tc-my-account-reset-password-azure .sso-button--small,:host .sso-button--small{display:inline-block;width:auto;height:32px;padding:6px 24px;font-size:16px}tc-my-account-reset-password-azure .sso-button--small:hover,:host .sso-button--small:hover{color:#ffffff}tc-my-account-reset-password-azure .sso-button--filled,:host .sso-button--filled{font-weight:700;background:#d74113;color:#ffffff;border:0;letter-spacing:0.8px}tc-my-account-reset-password-azure .sso-button--filled:hover,:host .sso-button--filled:hover{color:#ffffff}tc-my-account-reset-password-azure .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-my-account-reset-password-azure .sso-button--stroked:hover,:host .sso-button--stroked:hover{color:#ffffff}tc-my-account-reset-password-azure .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-my-account-reset-password-azure .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-my-account-reset-password-azure .sso-button:hover:not([disabled]),tc-my-account-reset-password-azure .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-my-account-reset-password-azure .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-my-account-reset-password-azure .sso-button:hover,:host .sso-button:hover{text-decoration:none}tc-my-account-reset-password-azure .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin:0;font-size:14px;font-weight:400;line-height:140%}tc-my-account-reset-password-azure .sso-flow-change-link,:host .sso-flow-change-link{font-size:16px;font-weight:400;line-height:20px;text-align:center;margin-top:20px;flex:1}@media (min-width: 960px){tc-my-account-reset-password-azure .sso-flow-change-link,:host .sso-flow-change-link{padding-top:24px;margin-top:16px;border-top:1px solid #cacaca}}tc-my-account-reset-password-azure .sso-flow-change-link--bold,:host .sso-flow-change-link--bold{font-weight:bold}tc-my-account-reset-password-azure .sso-close-button,:host .sso-close-button{position:absolute;font-size:45px;line-height:25px;font-weight:100;right:16px;top:40px;background:transparent;color:#262626;cursor:pointer;z-index:1}@media (min-width: 960px){tc-my-account-reset-password-azure .sso-close-button,:host .sso-close-button{right:0;top:0}}tc-my-account-reset-password-azure .sso-flex-column,:host .sso-flex-column{flex:1;display:flex;flex-direction:column;position:relative}tc-my-account-reset-password-azure .sso-flex-column-1,:host .sso-flex-column-1{flex:1}tc-my-account-reset-password-azure .sso-flex-column-2,:host .sso-flex-column-2{flex:2}tc-my-account-reset-password-azure .sso-flex-column-3,:host .sso-flex-column-3{flex:3}tc-my-account-reset-password-azure .desktop-only,:host .desktop-only{display:none}@media (min-width: 960px){tc-my-account-reset-password-azure .desktop-only,:host .desktop-only{display:block}}tc-my-account-reset-password-azure .sso-checkboxes,:host .sso-checkboxes{margin-top:10px;margin-bottom:35px}tc-my-account-reset-password-azure .sso-checkboxes sso-form-checkbox,:host .sso-checkboxes sso-form-checkbox{margin-bottom:5px}tc-my-account-reset-password-azure .sso-checkboxes sso-form-checkbox:last-child,:host .sso-checkboxes sso-form-checkbox:last-child{margin-bottom:0}tc-my-account-reset-password-azure .sso-resend-code-link,:host .sso-resend-code-link{font-size:16px;font-weight:400;line-height:22px;cursor:pointer;text-decoration:underline}tc-my-account-reset-password-azure .sso-resend-code--disabled,:host .sso-resend-code--disabled{color:#757575;text-decoration:none;cursor:default}tc-my-account-reset-password-azure h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:30px}tc-my-account-reset-password-azure button.sso-button,:host button.sso-button{margin-top:40px}tc-my-account-reset-password-azure .sso-global-error,:host .sso-global-error{margin-bottom:40px}tc-my-account-reset-password-azure .sso-contact-text,:host .sso-contact-text{margin:15px 0 30px;color:#757575;font-size:12px;font-weight:400;line-height:15px;text-align:center}tc-my-account-reset-password-azure .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-my-account-reset-password-azure .sso-link:hover,:host .sso-link:hover{text-decoration:none}'}};const Oi=e=>{var t,o,s,i,n,a;return Xe(Yt,null,(null===(t=e.globalError)||void 0===t?void 0:t.length)>0?Xe("div",{class:"sso-global-error"},Vs(e.globalError)):null,Xe("sso-default-field-container",{control:e.formData.email,onInput:e.onInputChange}),Xe("sso-password-field-container",{control:e.formData.password,onInput:e.onInputChange,showError:!0}),Xe("div",{class:"sso-checkboxes"},Xe("sso-form-checkbox",{value:null===(o=e.formData.remember)||void 0===o?void 0:o.value,label:Vs(null===(s=e.formData.remember)||void 0===s?void 0:s.label),type:null===(i=e.formData.remember)||void 0===i?void 0:i.type,name:null===(n=e.formData.remember)||void 0===n?void 0:n.name,isValid:null===(a=e.formData.remember)||void 0===a?void 0:a.isValid,onChange:e.onInputChange})),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},Vs("buttons.logIn")),Xe("div",{class:"sso-reset-password-cnt"},Xe("a",{onClick:e.onResetPassword,class:"sso-reset-password-link sso-link"},Vs("links.forgotPassword"))))};class Vi{constructor(){this.document=document,this.window=window}static get Instance(){return this._instance||(this._instance=new this)}get getDataLayer(){if(this.window)return this.window.dataLayer=this.window.dataLayer||[],this.window.dataLayer;console.log("no window object")}pushToDataLayer(e){var t;null===(t=this.getDataLayer)||void 0===t||t.push(e)}}let Ui=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._formFieldsToValidate=["email","password"],this.submitted=!1,this.submitDisabled=!1,this.formFlow=So.signIn,this.globalError="",this.formData={},this.inputChangeHandler=e=>{this.submitted=!1,this.formData=this._ssoFormService.inputChangeHandler(e.target,this.formData,this._formFieldsToValidate)},this.submitFormHandler=async e=>{e.preventDefault();const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._formFieldsToValidate);if(this.formData=t,!o)return!1;this.submitted=!0,this.globalError="",this.submitDisabled=!0;try{const e=await this._apiClientService.signInConfirm(this.formData);this.signInResponseHandler(e)}catch(e){console.log(e)}},this.gotoSignUp=()=>{this.tctChangeFlow.emit("signUp")},this.gotoResetPassword=()=>{var e;window.location.href=`${null===(e=To.currentMarket)||void 0===e?void 0:e.resetPasswordLink}&state=${encodeURIComponent(window.location.href)}`},this.close=()=>{this.tctChangeFlow.emit(null)},this._apiClientService=Vo.Instance,this._ssoFormService=new ri(ii),this._deviceService=ks.Instance,this._domService=Vi.Instance,this.isDesktop=this._deviceService.isDesktop}resize(){this.isDesktop=this._deviceService.isDesktop}componentWillLoad(){this.formData=this._ssoFormService.initFormData(["email","password","remember"])}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}signInResponseHandler(e){var t;switch(+e.status){case 200:this.submitted=!1,this.submitDisabled=!1,this._domService.pushToDataLayer({event:"myAccountLogin",login:{success:!0}});break;default:this.submitDisabled=!1;const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);if(this._domService.pushToDataLayer({event:"myAccountLogin",login:{success:!1,error:o}}),li(e)){this.formData.email=Object.assign(Object.assign({},this.formData.email),{isValid:!1,errors:[o]});break}if(ci(e)){this.formData.password=Object.assign(Object.assign({},this.formData.password),{isValid:!1,errors:[o]});break}this.globalError=o}}render(){return Xe(Ke,null,this.isDesktop?Xe("div",{class:"sso-flex-column-1"},Xe("div",{class:"sso-bg-image"},Xe("sso-info-list",{infoTitle:Vs("text.infoList.titleSignIn")}))):null,Xe("div",{class:"sso-flex-column sso-flex-column-1"},Xe("div",{class:"sso-wrapper"},Xe("span",{class:"sso-close-button",onClick:this.close},"×"),Xe("div",{class:"sso-content"},Xe("h1",{class:"sso-title"},Vs("text.logIn")),Xe("h3",{class:"sso-subtitle"},Vs("text.dontHaveAccount")," ",Xe("a",{class:"sso-link",onClick:this.gotoSignUp},Vs("links.signUp"))),this.isDesktop?null:Xe("sso-info-list",{infoTitle:Vs("text.infoList.titleSignIn")}),Xe("form",{onSubmit:this.submitFormHandler},Xe(Oi,{formData:this.formData,globalError:this.globalError,formFlow:this.formFlow,submitDisabled:this.submitDisabled,onResetPassword:this.gotoResetPassword,onInputChange:this.inputChangeHandler}))))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-sign-in,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;background-color:#ffffff;justify-content:center;align-items:flex-start;overflow:auto;letter-spacing:0.01rem}@media (min-width: 960px){tc-my-account-sign-in,:host{flex-direction:row;justify-content:unset;align-items:unset;width:825px;max-width:100%;min-height:auto;padding:0;border-radius:24px;padding:24px;overflow:hidden;box-shadow:0 0 5px #cccccc}}tc-my-account-sign-in a.sso-link,:host a.sso-link{font-size:inherit;font-weight:inherit;line-height:inherit;color:#262626}tc-my-account-sign-in a.sso-checkbox-link,:host a.sso-checkbox-link{color:#262626;text-decoration:underline}tc-my-account-sign-in a.sso-checkbox-link:hover,:host a.sso-checkbox-link:hover{text-decoration:none}tc-my-account-sign-in a.sso-reset-password-link,:host a.sso-reset-password-link{font-size:16px;font-weight:400;line-height:22px}tc-my-account-sign-in .sso-bg-image,:host .sso-bg-image{background:url("/assets/images/sso/bg_new.png") no-repeat 0 50%;background-size:cover;border-radius:16px;height:100%;display:none}@media (min-width: 960px){tc-my-account-sign-in .sso-bg-image,:host .sso-bg-image{display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:18px}}tc-my-account-sign-in .sso-wrapper,:host .sso-wrapper{position:relative;display:flex;flex-direction:column;padding:64px 16px 24px;border-radius:10px;justify-content:center;max-width:100%;height:100%}@media (min-width: 960px){tc-my-account-sign-in .sso-wrapper,:host .sso-wrapper{padding:32px 0 0 32px;border-radius:0}}tc-my-account-sign-in .sso-content,:host .sso-content{display:flex;flex-direction:column;justify-content:space-between;height:100%}tc-my-account-sign-in .sso-content--already-signed,:host .sso-content--already-signed{justify-content:center;text-align:center}tc-my-account-sign-in .sso-change-flow,:host .sso-change-flow{flex:1;display:flex;align-items:flex-end}tc-my-account-sign-in h1.sso-title,:host h1.sso-title{font-size:24px;font-weight:700;line-height:26px;margin:0;margin-bottom:8px}tc-my-account-sign-in h1.sso-title--successful-action,:host h1.sso-title--successful-action{margin-top:-32px}tc-my-account-sign-in h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:400;line-height:22px;margin:0}tc-my-account-sign-in hr.sso-hr,:host hr.sso-hr{margin:36px 0 27px;height:0;border:0;border-top:1px solid #cacaca}tc-my-account-sign-in .sso-button,:host .sso-button{font-size:18px;font-weight:400;line-height:18px;position:relative;display:block;width:100%;border-radius:30px;padding:10px 16px;height:40px;text-align:center;box-sizing:border-box;cursor:pointer;text-decoration:none}tc-my-account-sign-in .sso-button--small,:host .sso-button--small{display:inline-block;width:auto;height:32px;padding:6px 24px;font-size:16px}tc-my-account-sign-in .sso-button--small:hover,:host .sso-button--small:hover{color:#ffffff}tc-my-account-sign-in .sso-button--filled,:host .sso-button--filled{font-weight:700;background:#d74113;color:#ffffff;border:0;letter-spacing:0.8px}tc-my-account-sign-in .sso-button--filled:hover,:host .sso-button--filled:hover{color:#ffffff}tc-my-account-sign-in .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-my-account-sign-in .sso-button--stroked:hover,:host .sso-button--stroked:hover{color:#ffffff}tc-my-account-sign-in .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-my-account-sign-in .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-my-account-sign-in .sso-button:hover:not([disabled]),tc-my-account-sign-in .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-my-account-sign-in .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-my-account-sign-in .sso-button:hover,:host .sso-button:hover{text-decoration:none}tc-my-account-sign-in .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin:0;font-size:14px;font-weight:400;line-height:140%}tc-my-account-sign-in .sso-flow-change-link,:host .sso-flow-change-link{font-size:16px;font-weight:400;line-height:20px;text-align:center;margin-top:20px;flex:1}@media (min-width: 960px){tc-my-account-sign-in .sso-flow-change-link,:host .sso-flow-change-link{padding-top:24px;margin-top:16px;border-top:1px solid #cacaca}}tc-my-account-sign-in .sso-flow-change-link--bold,:host .sso-flow-change-link--bold{font-weight:bold}tc-my-account-sign-in .sso-close-button,:host .sso-close-button{position:absolute;font-size:45px;line-height:25px;font-weight:100;right:16px;top:40px;background:transparent;color:#262626;cursor:pointer;z-index:1}@media (min-width: 960px){tc-my-account-sign-in .sso-close-button,:host .sso-close-button{right:0;top:0}}tc-my-account-sign-in .sso-flex-column,:host .sso-flex-column{flex:1;display:flex;flex-direction:column;position:relative}tc-my-account-sign-in .sso-flex-column-1,:host .sso-flex-column-1{flex:1}tc-my-account-sign-in .sso-flex-column-2,:host .sso-flex-column-2{flex:2}tc-my-account-sign-in .sso-flex-column-3,:host .sso-flex-column-3{flex:3}tc-my-account-sign-in .desktop-only,:host .desktop-only{display:none}@media (min-width: 960px){tc-my-account-sign-in .desktop-only,:host .desktop-only{display:block}}tc-my-account-sign-in .sso-checkboxes,:host .sso-checkboxes{margin-top:12px;margin-bottom:32px}tc-my-account-sign-in .sso-checkboxes sso-form-checkbox,:host .sso-checkboxes sso-form-checkbox{margin-bottom:5px}tc-my-account-sign-in .sso-checkboxes sso-form-checkbox:last-child,:host .sso-checkboxes sso-form-checkbox:last-child{margin-bottom:0}tc-my-account-sign-in h3.sso-subtitle,:host h3.sso-subtitle{margin-bottom:16px}tc-my-account-sign-in .sso-reset-password-cnt,:host .sso-reset-password-cnt{margin-top:16px}tc-my-account-sign-in .sso-reset-password-link,:host .sso-reset-password-link{font-size:16px;font-weight:400;line-height:22px;cursor:pointer;text-decoration:underline}tc-my-account-sign-in .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-my-account-sign-in .sso-link:hover,:host .sso-link:hover{text-decoration:none}'}};let Hi=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._signUpLink=go,this._formFieldsToValidate=["email","password"],this._templateFlowType=null,this._formFlow=So.signIn,this.submitted=!1,this.submitDisabled=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{this.submitted=!1,this.formData=this._ssoFormService.inputChangeHandler(e.target,this.formData,this._formFieldsToValidate)},this.submitFormHandler=async e=>{e.preventDefault();const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._formFieldsToValidate);if(this.formData=t,!o)return!1;this.submitted=!0,this.globalError="",this.submitDisabled=!0;try{await this._apiClientService.signInConfirm(this.formData)}catch(e){console.log(e)}},this.gotoSignUp=()=>{window.location.href=this._signUpLink},this.gotoResetPassword=()=>{var e;window.location.href=`${null===(e=To.currentMarket)||void 0===e?void 0:e.resetPasswordLink}&state=${encodeURIComponent(window.location.href)}`},this._templateFlowType=Eo.tcPortalSignIn,this._apiClientService=xi.Instance,this._ssoFormService=new ri(ii)}componentWillLoad(){jo(this._templateFlowType),this.formData=this._ssoFormService.initFormData(["email","password","remember"])}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}signInAzureResponseHandler(e){this.signInResponseHandler(e.detail)}signInResponseHandler(e){var t;switch(+e.status){case 200:this.submitted=!1,this.submitDisabled=!1;break;default:this.submitDisabled=!1;const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);if(li(e)){this.formData.email=Object.assign(Object.assign({},this.formData.email),{isValid:!1,errors:[o]});break}if(ci(e)){this.formData.password=Object.assign(Object.assign({},this.formData.password),{isValid:!1,errors:[o]});break}this.globalError=o}}render(){return Xe(Ke,null,Xe("div",{class:"sso-bg-image"}),Xe("div",{class:"sso-wrapper"},Xe("div",{class:"sso-content"},Xe("h1",{class:"sso-title"},Vs("text.welcome")),Xe("h3",{class:"sso-subtitle"},"Log in to Thomas Cook!"),Xe("form",{onSubmit:this.submitFormHandler},Xe(Oi,{formData:this.formData,globalError:this.globalError,formFlow:this._formFlow,submitDisabled:this.submitDisabled,onResetPassword:this.gotoResetPassword,onInputChange:this.inputChangeHandler}))),Xe("div",{class:"sso-change-flow"},Xe("div",{class:"sso-flow-change-link"},Vs("text.dontHaveAccount")," ",Xe("a",{class:"sso-link",onClick:this.gotoSignUp},Vs("links.signUp"))))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-sign-in-azure,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;background-color:#ffffff;justify-content:center;align-items:flex-start;overflow:auto;letter-spacing:0.01rem}@media (min-width: 960px){tc-my-account-sign-in-azure,:host{flex-direction:row;justify-content:unset;align-items:unset;width:825px;max-width:100%;min-height:auto;padding:0;border-radius:24px;padding:24px;overflow:hidden;box-shadow:0 0 5px #cccccc}}tc-my-account-sign-in-azure a.sso-link,:host a.sso-link{font-size:inherit;font-weight:inherit;line-height:inherit;color:#262626}tc-my-account-sign-in-azure a.sso-checkbox-link,:host a.sso-checkbox-link{color:#262626;text-decoration:underline}tc-my-account-sign-in-azure a.sso-checkbox-link:hover,:host a.sso-checkbox-link:hover{text-decoration:none}tc-my-account-sign-in-azure a.sso-reset-password-link,:host a.sso-reset-password-link{font-size:16px;font-weight:400;line-height:22px}tc-my-account-sign-in-azure .sso-bg-image,:host .sso-bg-image{background:url("/assets/images/sso/bg_new.png") no-repeat 0 50%;background-size:cover;border-radius:16px;height:100%;display:none}@media (min-width: 960px){tc-my-account-sign-in-azure .sso-bg-image,:host .sso-bg-image{display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:18px}}tc-my-account-sign-in-azure .sso-wrapper,:host .sso-wrapper{position:relative;display:flex;flex-direction:column;padding:64px 16px 24px;border-radius:10px;justify-content:center;max-width:100%;height:100%}@media (min-width: 960px){tc-my-account-sign-in-azure .sso-wrapper,:host .sso-wrapper{padding:32px 0 0 32px;border-radius:0}}tc-my-account-sign-in-azure .sso-content,:host .sso-content{display:flex;flex-direction:column;justify-content:space-between;height:100%}tc-my-account-sign-in-azure .sso-content--already-signed,:host .sso-content--already-signed{justify-content:center;text-align:center}tc-my-account-sign-in-azure .sso-change-flow,:host .sso-change-flow{flex:1;display:flex;align-items:flex-end}tc-my-account-sign-in-azure h1.sso-title,:host h1.sso-title{font-size:24px;font-weight:700;line-height:26px;margin:0;margin-bottom:8px}tc-my-account-sign-in-azure h1.sso-title--successful-action,:host h1.sso-title--successful-action{margin-top:-32px}tc-my-account-sign-in-azure h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:400;line-height:22px;margin:0}tc-my-account-sign-in-azure hr.sso-hr,:host hr.sso-hr{margin:36px 0 27px;height:0;border:0;border-top:1px solid #cacaca}tc-my-account-sign-in-azure .sso-button,:host .sso-button{font-size:18px;font-weight:400;line-height:18px;position:relative;display:block;width:100%;border-radius:30px;padding:10px 16px;height:40px;text-align:center;box-sizing:border-box;cursor:pointer;text-decoration:none}tc-my-account-sign-in-azure .sso-button--small,:host .sso-button--small{display:inline-block;width:auto;height:32px;padding:6px 24px;font-size:16px}tc-my-account-sign-in-azure .sso-button--small:hover,:host .sso-button--small:hover{color:#ffffff}tc-my-account-sign-in-azure .sso-button--filled,:host .sso-button--filled{font-weight:700;background:#d74113;color:#ffffff;border:0;letter-spacing:0.8px}tc-my-account-sign-in-azure .sso-button--filled:hover,:host .sso-button--filled:hover{color:#ffffff}tc-my-account-sign-in-azure .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-my-account-sign-in-azure .sso-button--stroked:hover,:host .sso-button--stroked:hover{color:#ffffff}tc-my-account-sign-in-azure .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-my-account-sign-in-azure .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-my-account-sign-in-azure .sso-button:hover:not([disabled]),tc-my-account-sign-in-azure .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-my-account-sign-in-azure .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-my-account-sign-in-azure .sso-button:hover,:host .sso-button:hover{text-decoration:none}tc-my-account-sign-in-azure .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin:0;font-size:14px;font-weight:400;line-height:140%}tc-my-account-sign-in-azure .sso-flow-change-link,:host .sso-flow-change-link{font-size:16px;font-weight:400;line-height:20px;text-align:center;margin-top:20px;flex:1}@media (min-width: 960px){tc-my-account-sign-in-azure .sso-flow-change-link,:host .sso-flow-change-link{padding-top:24px;margin-top:16px;border-top:1px solid #cacaca}}tc-my-account-sign-in-azure .sso-flow-change-link--bold,:host .sso-flow-change-link--bold{font-weight:bold}tc-my-account-sign-in-azure .sso-close-button,:host .sso-close-button{position:absolute;font-size:45px;line-height:25px;font-weight:100;right:16px;top:40px;background:transparent;color:#262626;cursor:pointer;z-index:1}@media (min-width: 960px){tc-my-account-sign-in-azure .sso-close-button,:host .sso-close-button{right:0;top:0}}tc-my-account-sign-in-azure .sso-flex-column,:host .sso-flex-column{flex:1;display:flex;flex-direction:column;position:relative}tc-my-account-sign-in-azure .sso-flex-column-1,:host .sso-flex-column-1{flex:1}tc-my-account-sign-in-azure .sso-flex-column-2,:host .sso-flex-column-2{flex:2}tc-my-account-sign-in-azure .sso-flex-column-3,:host .sso-flex-column-3{flex:3}tc-my-account-sign-in-azure .desktop-only,:host .desktop-only{display:none}@media (min-width: 960px){tc-my-account-sign-in-azure .desktop-only,:host .desktop-only{display:block}}tc-my-account-sign-in-azure .sso-checkboxes,:host .sso-checkboxes{margin-top:2px;margin-bottom:35px}tc-my-account-sign-in-azure .sso-checkboxes sso-form-checkbox,:host .sso-checkboxes sso-form-checkbox{margin-bottom:5px}tc-my-account-sign-in-azure .sso-checkboxes sso-form-checkbox:last-child,:host .sso-checkboxes sso-form-checkbox:last-child{margin-bottom:0}tc-my-account-sign-in-azure h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:20px}tc-my-account-sign-in-azure .sso-reset-password-cnt,:host .sso-reset-password-cnt{text-align:center;margin:25px 0}tc-my-account-sign-in-azure .sso-reset-password-link,:host .sso-reset-password-link{font-size:14px;font-weight:600;line-height:22px;cursor:pointer;text-decoration:underline}tc-my-account-sign-in-azure .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-my-account-sign-in-azure .sso-link:hover,:host .sso-link:hover{text-decoration:none}'}};let qi=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._formFieldsToValidate=["email","password"],this._formFlow=So.signIn,this.submitted=!1,this.submitDisabled=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{this.submitted=!1,this.formData=this._ssoFormService.inputChangeHandler(e.target,this.formData,this._formFieldsToValidate)},this.submitFormHandler=async e=>{e.preventDefault();const{formData:t}=this._ssoFormService.validateForm(this.formData,this._formFieldsToValidate);this.formData=t,this.submitted=!0,this.globalError="",this.submitDisabled=!0;try{const e=await this._apiClientService.signInConfirm(this.formData);this.signInResponseHandler(e)}catch(e){console.log(e)}},this.goToSignUp=()=>{this.tctChangeFlow.emit("signUp")},this.goToPasswordReset=()=>{this.tctChangeFlow.emit("passwordReset")},this.close=()=>{this.tctChangeFlow.emit(null)},this._apiClientService=Vo.Instance,this._ssoFormService=new ri(ii)}componentWillLoad(){this.formData=this._ssoFormService.initFormData(["email","password"])}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}signInResponseHandler(e){var t;switch(+e.status){case 200:this.submitted=!1,this.submitDisabled=!1;break;default:this.submitDisabled=!1;const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);if(li(e)){this.formData.email=Object.assign(Object.assign({},this.formData.email),{isValid:!1,errors:[o]});break}if(ci(e)){this.formData.password=Object.assign(Object.assign({},this.formData.password),{isValid:!1,errors:[o]});break}this.globalError=o}}render(){var e;return Xe(Ke,null,Xe("div",{class:"sso-wrapper"},Xe("span",{class:"sso-close-button",onClick:this.close},"×"),Xe("div",{class:"sso-content"},Xe("h1",{class:"sso-title"},Vs("text.welcome")),Xe("h3",{class:"sso-subtitle"},Vs("text.loginThomasCook")),Xe("form",{onSubmit:this.submitFormHandler},(null===(e=this.globalError)||void 0===e?void 0:e.length)>0?Xe("div",{class:"sso-global-error"},this.globalError):null,Xe("sso-default-field-container",{control:this.formData.email,onInput:this.inputChangeHandler}),Xe("sso-password-field-container",{control:this.formData.password,onInput:this.inputChangeHandler}),Xe("button",{class:"sso-button sso-button--filled sso-button--big-text sso-login-button",type:"submit",disabled:this.submitDisabled},Vs("buttons.logIn")))),Xe("div",{class:"sso-change-flow"},Xe("div",{class:"sso-flow-change-link sso-flow-change-link--bold"},Xe("span",{class:"sso-link",onClick:this.goToPasswordReset},Vs("links.forgotPassword"))," | ",Xe("span",{class:"sso-link",onClick:this.goToSignUp},Vs("links.signUp"))))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-sign-in-small,:host{display:block;position:relative;box-sizing:border-box;font-family:"Source Sans Pro";width:340px;border-radius:10px;box-shadow:0px 0px 5px #999999;overflow:hidden;letter-spacing:0.01rem}tc-my-account-sign-in-small a.sso-link,:host a.sso-link{color:#262626}tc-my-account-sign-in-small .sso-wrapper,:host .sso-wrapper{position:relative;display:flex;flex-direction:column;background-color:#ffffff;padding:44px;justify-content:center}tc-my-account-sign-in-small .sso-wrapper h1.sso-title,tc-my-account-sign-in-small .sso-wrapper h3.sso-subtitle,:host .sso-wrapper h1.sso-title,:host .sso-wrapper h3.sso-subtitle{text-align:center}tc-my-account-sign-in-small .sso-change-flow,:host .sso-change-flow{flex:1;display:flex;align-items:flex-end}tc-my-account-sign-in-small h1.sso-title,:host h1.sso-title{font-size:27px;font-weight:600;line-height:32px;margin-bottom:3px}tc-my-account-sign-in-small hr.sso-hr,:host hr.sso-hr{margin:36px 0 28px;height:0;border:0;border-top:1px solid #cacaca}tc-my-account-sign-in-small .sso-button,:host .sso-button{font-size:18px;font-weight:400;line-height:18px;position:relative;display:block;width:100%;border-radius:30px;padding:10px 16px;height:40px;text-align:center;box-sizing:border-box;cursor:pointer;text-decoration:none}tc-my-account-sign-in-small .sso-button--small,:host .sso-button--small{display:inline-block;width:auto;height:32px;padding:6px 24px;font-size:16px}tc-my-account-sign-in-small .sso-button--small:hover,:host .sso-button--small:hover{color:#ffffff}tc-my-account-sign-in-small .sso-button--filled,:host .sso-button--filled{font-weight:700;background:#d74113;color:#ffffff;border:0;letter-spacing:0.8px}tc-my-account-sign-in-small .sso-button--filled:hover,:host .sso-button--filled:hover{color:#ffffff}tc-my-account-sign-in-small .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-my-account-sign-in-small .sso-button--stroked:hover,:host .sso-button--stroked:hover{color:#ffffff}tc-my-account-sign-in-small .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-my-account-sign-in-small .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-my-account-sign-in-small .sso-button:hover:not([disabled]),tc-my-account-sign-in-small .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-my-account-sign-in-small .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-my-account-sign-in-small .sso-button:hover,:host .sso-button:hover{text-decoration:none}tc-my-account-sign-in-small .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin:20px 0 25px;line-height:140%}tc-my-account-sign-in-small .sso-flow-change-link,:host .sso-flow-change-link{font-size:14px;font-weight:400;line-height:24px;text-align:center;margin-top:32px;padding-top:24px;flex:1;border-top:1px solid #cacaca}tc-my-account-sign-in-small .sso-flow-change-link--bold,:host .sso-flow-change-link--bold{font-weight:600}tc-my-account-sign-in-small .sso-close-button,:host .sso-close-button{position:absolute;font-size:35px;font-weight:100;line-height:0;right:15px;top:25px;background:transparent;color:#7B7B7B;cursor:pointer}tc-my-account-sign-in-small h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:32px}tc-my-account-sign-in-small .sso-flow-change-link span,:host .sso-flow-change-link span{cursor:pointer}tc-my-account-sign-in-small .sso-login-button,:host .sso-login-button{margin-top:32px}tc-my-account-sign-in-small .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-my-account-sign-in-small .sso-link:hover,:host .sso-link:hover{text-decoration:none}'}};const Ni=e=>Xe("div",{class:"sso-checkboxes"},Xe("sso-policies-container-portal",{formData:e.formData,triggerPolicies:e.submitFormFailed,onInput:e.onInputChange})),Mi=e=>{var t,o,s,i,n,a;let r,l;switch(e.formFlow){case So.signUpMain:l=e.isVercode?"always-visible":(null===(t=e.formData.password)||void 0===t?void 0:t.isValid)?"":"show-password-rules",r=Xe(Yt,null,Xe("div",{class:e.infoListCmp?"sso-sign-up-form-flex-content":""},Xe("div",{class:""+(e.infoListCmp?"sso-flex-column-2":"")},(null===(o=e.globalError)||void 0===o?void 0:o.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.firstName,onInput:e.onInputChange}),Xe("sso-default-field-container",{control:e.formData.lastName,onInput:e.onInputChange}),Xe("sso-default-field-container",{control:e.formData.email,onInput:e.onInputChange}),Xe("sso-password-field-container",{control:e.formData.password,showError:!0,onInput:e.onInputChange})),e.infoListCmp?Xe("div",{class:"sso-flex-column-3"},Xe(e.infoListCmp,null)):null),e.isVercode?null:Xe(Ni,Object.assign({},e)),Xe("button",{class:"sso-button sso-button--filled",type:"submit",disabled:e.submitDisabled},e.isVercode?Vs("buttons.next"):Vs("buttons.createAccount")));break;case So.signUpMainWithVercode:l=e.isVercode?"always-visible":(null===(s=e.formData.password)||void 0===s?void 0:s.isValid)?"":"show-password-rules",r=Xe(Yt,null,Xe("div",{class:e.infoListCmp?"sso-sign-up-form-flex-content":""},Xe("div",{class:""+(e.infoListCmp?"sso-flex-column-2":"")},Xe("h3",{class:"sso-subtitle"},Vs("text.signUpThomasCook")),(null===(i=e.globalError)||void 0===i?void 0:i.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.firstName,onInput:e.onInputChange}),Xe("sso-default-field-container",{control:e.formData.lastName,onInput:e.onInputChange}),Xe("sso-default-field-container",{control:e.formData.email,onInput:e.onInputChange}),Xe("sso-password-field-container",{control:e.formData.password,onInput:e.onInputChange}),Xe("sso-password-validators-container",{validators:e.passwordFieldViewValidators,onInput:e.onInputChange,class:l,style:{marginTop:"-20px",marginBottom:"-8px"}})),e.infoListCmp?Xe("div",{class:"sso-flex-column-3"},Xe(e.infoListCmp,null)):null),e.isVercode?null:Xe(Ni,Object.assign({},e)),Xe("button",{class:"sso-button sso-button--filled sso-button--big-text",type:"submit",disabled:e.submitDisabled},e.isVercode?Vs("buttons.next"):Vs("buttons.signUp")));break;case So.signUpVercode:r=Xe(Yt,null,Xe("div",{class:e.infoListCmp?"sso-sign-up-form-flex-content":""},Xe("div",{class:""+(e.infoListCmp?"sso-flex-column-2":"")},Xe("h3",{class:"sso-subtitle"},Vs("text.pleaseCheckEmail")),(null===(n=e.globalError)||void 0===n?void 0:n.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.email,onInput:e.onInputChange}),Xe("sso-default-field-container",{control:e.formData.vercode,onInput:e.onInputChange}),e.errorCodeExpaired?null:Xe("div",{class:"sso-button-cnt"},Xe("button",{class:"sso-button sso-button--filled sso-button--big-text",type:"submit",disabled:e.submitDisabled},Vs("buttons.signUp")))),e.infoListCmp?Xe("div",{class:"sso-flex-column-3"},Xe(e.infoListCmp,null)):null),Xe(Ni,Object.assign({},e)),Xe("sso-resend-code-button",{isDisabled:e.resendDisabled,onResendCode:e.onResendCode}),Xe("div",{class:"sso-contact-text"},Vs("text.problemSignUp"),Xe("br",null),Vs("text.contactOurCentre")," ",Vs("text.contactPhone")));break;case So.signUpWrongCode:r=Xe(Yt,null,Xe("div",{class:e.infoListCmp?"sso-sign-up-form-flex-content":""},Xe("div",{class:""+(e.infoListCmp?"sso-flex-column-2":"")},Xe("h3",{class:"sso-subtitle"},Vs("text.wrongCode")),(null===(a=e.globalError)||void 0===a?void 0:a.length)>0?Xe("div",{class:"sso-global-error"},e.globalError):null,Xe("sso-default-field-container",{control:e.formData.email,onInput:e.onInputChange}),Xe("sso-default-field-container",{control:e.formData.vercode,onInput:e.onInputChange})),e.infoListCmp?Xe("div",{class:"sso-flex-column-3"},Xe(e.infoListCmp,null)):null),Xe("button",{class:"sso-button sso-button--filled sso-button--big-text",type:"submit",disabled:e.submitDisabled},Vs("buttons.getCode")))}return r};let Bi=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctSignUpFinishedEvent=zt(this,"tctSignUpFinishedEvent",7),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._fieldsPerFlow={[So.signUpMain]:["firstName","lastName","email","password","termsAndPolicies"]},this._formFlow=So.signUpMain,this.integrated=!1,this.submitted=!1,this.submitDisabled=!1,this.submitFormFailed=!1,this.alreadySignedUp=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{const t=e.target;this.submitted=!1,this.submitFormFailed=!1,this.formData=this._ssoFormService.inputChangeHandler(t,this.formData,this._fieldsPerFlow[this._formFlow])},this.submitFormHandler=async e=>{e.preventDefault(),this.submitFormFailed=!1;const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._fieldsPerFlow[this._formFlow]);if(this.formData=t,this.submitFormFailed=!o,this.submitFormFailed)return!1;switch(this.submitted=!0,this.globalError="",this.submitDisabled=!0,this._formFlow){case So.signUpMain:try{const e=this._processDataService.prepareMyAccountSignUpRequest(this.formData,this.bookingReference),t=await this._apiClientService.signUpConfirm(e);this.signUpConfirmResponseHandler(t)}catch(e){console.log(e)}}},this.goToSignIn=()=>{this.tctChangeFlow.emit("signIn")},this.close=()=>{this.tctChangeFlow.emit(null)},this.InfoListCmp=(e,t=!1)=>()=>Xe("sso-info-list",{infoTitle:e,intergrated:t}),this.RenderDefault=()=>Xe(Ke,null,this.isDesktop?Xe("div",{class:"sso-flex-column-1"},Xe("div",{class:"sso-bg-image"},this.InfoListCmp(Vs("text.infoList.titleSignUp"))())):null,Xe("div",{class:"sso-flex-column sso-flex-column-1 "+(this.alreadySignedUp?"sso-height-100":"")},Xe("div",{class:"sso-wrapper"},Xe("span",{class:"sso-close-button",onClick:this.close},"×"),Xe("div",{class:"sso-content "+(this.alreadySignedUp?"sso-content--already-signed":"")},this.alreadySignedUp?Xe(Yt,null,Xe("h1",{class:"sso-title sso-title--successful-action"},Vs("text.accountSuccefullyCreated")),Xe("h3",{class:"sso-subtitle"},Vs("text.successfullSignUpMessagePart1")," ",Xe("span",{class:"sso-bold-text"},this.formData.email.value)," ",Vs("text.successfullSignUpMessagePart2"))):Xe(Yt,null,Xe("h1",{class:"sso-title"},Vs("text.createAnAccount")),Xe("h3",{class:"sso-subtitle"},Vs("text.doYouHaveAccount")," ",Xe("a",{class:"sso-link",onClick:this.goToSignIn},Vs("links.signIn"))),Xe("form",{onSubmit:this.submitFormHandler,autocomplete:"off",class:"sso-sign-up-form"},Xe(Mi,{formFlow:this._formFlow,formData:this.formData,globalError:this.globalError,onInputChange:this.inputChangeHandler,submitDisabled:this.submitDisabled,submitFormFailed:this.submitFormFailed,isVercode:!1}))))))),this.RenderIntegrated=()=>Xe(Ke,{class:"sso-signup-integrated"},this.alreadySignedUp?Xe("button",{class:"sso-button sso-button--filled sso-login-button",onClick:this.goToSignIn},Vs("buttons.logIn")):Xe(Yt,null,Xe("div",{class:"sso-wrapper sso-wrapper--integrated"},Xe("div",{class:"sso-content sso-content--integrated "+(this.alreadySignedUp?"sso-content--already-signed":"")},Xe(Yt,null,Xe("form",{onSubmit:this.submitFormHandler,autocomplete:"off",class:"sso-sign-up-form"},Xe(Mi,{formFlow:this._formFlow,formData:this.formData,globalError:this.globalError,onInputChange:this.inputChangeHandler,submitDisabled:this.submitDisabled,submitFormFailed:this.submitFormFailed,infoListCmp:this.isDesktop?this.InfoListCmp(Vs("text.infoList.titleWithAccountYouCanConfirmationPage"),!0):null,isVercode:!1}),Xe("h3",{class:"sso-subtitle sso-subtitle--integrated"},Vs("text.doYouHaveAccount")," ",Xe("a",{class:"sso-link",onClick:this.goToSignIn},Vs("links.signIn"))))))))),this._apiClientService=Vo.Instance,this._processDataService=_i.Instance,this._ssoFormService=new ri(ti),this._deviceService=ks.Instance,this._ssoIntegrationService=_s.Instance,this.isDesktop=this._deviceService.isDesktop}resize(){this.isDesktop=this._deviceService.isDesktop}componentWillLoad(){this.formData=this._ssoFormService.initFormData(["firstName","lastName","email","passwordNew","termsAndPolicies"]),this.integrated&&(this.formData.email.value=this.email,this.formData.firstName.value=this.firstName,this.formData.lastName.value=this.lastName)}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}signUpConfirmResponseHandler(e){var t;switch(this.tctSignUpFinishedEvent.emit(e),+e.status){case 200:return this.submitted=!1,this.alreadySignedUp=!0,void(this.integrated&&this._ssoIntegrationService.openAuthSuccess({data:{email:this.formData.email.value}}));default:this.submitDisabled=!1;const o=bi(null===(t=e.error)||void 0===t?void 0:t.subCode);return hi(e)?void(this.globalError=o):void(ui(e)&&(this.formData=Object.assign(Object.assign({},this.formData),{email:Object.assign(Object.assign({},this.formData.email),{isValid:!1,errors:[o],inputAttributes:Object.assign(Object.assign({},this.formData.email.inputAttributes),{disabled:!1})})})))}}render(){return this.integrated?Xe(this.RenderIntegrated,null):Xe(this.RenderDefault,null)}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-sign-up,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;background-color:#ffffff;justify-content:center;align-items:flex-start;overflow:auto;letter-spacing:0.01rem}@media (min-width: 960px){tc-my-account-sign-up,:host{flex-direction:row;justify-content:unset;align-items:unset;width:825px;max-width:100%;min-height:auto;padding:0;border-radius:24px;padding:24px;overflow:hidden;box-shadow:0 0 5px #cccccc}}tc-my-account-sign-up a.sso-link,:host a.sso-link{font-size:inherit;font-weight:inherit;line-height:inherit;color:#262626}tc-my-account-sign-up a.sso-checkbox-link,:host a.sso-checkbox-link{color:#262626;text-decoration:underline}tc-my-account-sign-up a.sso-checkbox-link:hover,:host a.sso-checkbox-link:hover{text-decoration:none}tc-my-account-sign-up a.sso-reset-password-link,:host a.sso-reset-password-link{font-size:16px;font-weight:400;line-height:22px}tc-my-account-sign-up .sso-bg-image,:host .sso-bg-image{background:url("/assets/images/sso/bg_new.png") no-repeat 0 50%;background-size:cover;border-radius:16px;height:100%;display:none}@media (min-width: 960px){tc-my-account-sign-up .sso-bg-image,:host .sso-bg-image{display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:18px}}tc-my-account-sign-up .sso-wrapper,:host .sso-wrapper{position:relative;display:flex;flex-direction:column;padding:64px 16px 24px;border-radius:10px;justify-content:center;max-width:100%;height:100%}@media (min-width: 960px){tc-my-account-sign-up .sso-wrapper,:host .sso-wrapper{padding:32px 0 0 32px;border-radius:0}}tc-my-account-sign-up .sso-content,:host .sso-content{display:flex;flex-direction:column;justify-content:space-between;height:100%}tc-my-account-sign-up .sso-content--already-signed,:host .sso-content--already-signed{justify-content:center;text-align:center}tc-my-account-sign-up .sso-change-flow,:host .sso-change-flow{flex:1;display:flex;align-items:flex-end}tc-my-account-sign-up h1.sso-title,:host h1.sso-title{font-size:24px;font-weight:700;line-height:26px;margin:0;margin-bottom:8px}tc-my-account-sign-up h1.sso-title--successful-action,:host h1.sso-title--successful-action{margin-top:-32px}tc-my-account-sign-up h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:400;line-height:22px;margin:0}tc-my-account-sign-up hr.sso-hr,:host hr.sso-hr{margin:36px 0 27px;height:0;border:0;border-top:1px solid #cacaca}tc-my-account-sign-up .sso-button,:host .sso-button{font-size:18px;font-weight:400;line-height:18px;position:relative;display:block;width:100%;border-radius:30px;padding:10px 16px;height:40px;text-align:center;box-sizing:border-box;cursor:pointer;text-decoration:none}tc-my-account-sign-up .sso-button--small,:host .sso-button--small{display:inline-block;width:auto;height:32px;padding:6px 24px;font-size:16px}tc-my-account-sign-up .sso-button--small:hover,:host .sso-button--small:hover{color:#ffffff}tc-my-account-sign-up .sso-button--filled,:host .sso-button--filled{font-weight:700;background:#d74113;color:#ffffff;border:0;letter-spacing:0.8px}tc-my-account-sign-up .sso-button--filled:hover,:host .sso-button--filled:hover{color:#ffffff}tc-my-account-sign-up .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-my-account-sign-up .sso-button--stroked:hover,:host .sso-button--stroked:hover{color:#ffffff}tc-my-account-sign-up .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-my-account-sign-up .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-my-account-sign-up .sso-button:hover:not([disabled]),tc-my-account-sign-up .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-my-account-sign-up .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-my-account-sign-up .sso-button:hover,:host .sso-button:hover{text-decoration:none}tc-my-account-sign-up .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin:0;font-size:14px;font-weight:400;line-height:140%}tc-my-account-sign-up .sso-flow-change-link,:host .sso-flow-change-link{font-size:16px;font-weight:400;line-height:20px;text-align:center;margin-top:20px;flex:1}@media (min-width: 960px){tc-my-account-sign-up .sso-flow-change-link,:host .sso-flow-change-link{padding-top:24px;margin-top:16px;border-top:1px solid #cacaca}}tc-my-account-sign-up .sso-flow-change-link--bold,:host .sso-flow-change-link--bold{font-weight:bold}tc-my-account-sign-up .sso-close-button,:host .sso-close-button{position:absolute;font-size:45px;line-height:25px;font-weight:100;right:16px;top:40px;background:transparent;color:#262626;cursor:pointer;z-index:1}@media (min-width: 960px){tc-my-account-sign-up .sso-close-button,:host .sso-close-button{right:0;top:0}}tc-my-account-sign-up .sso-flex-column,:host .sso-flex-column{flex:1;display:flex;flex-direction:column;position:relative}tc-my-account-sign-up .sso-flex-column-1,:host .sso-flex-column-1{flex:1}tc-my-account-sign-up .sso-flex-column-2,:host .sso-flex-column-2{flex:2}tc-my-account-sign-up .sso-flex-column-3,:host .sso-flex-column-3{flex:3}tc-my-account-sign-up .desktop-only,:host .desktop-only{display:none}@media (min-width: 960px){tc-my-account-sign-up .desktop-only,:host .desktop-only{display:block}}@media (min-width: 960px){tc-my-account-sign-up,:host{min-height:595px}}tc-my-account-sign-up.sso-signup-integrated,:host.sso-signup-integrated{padding:0;box-shadow:none;border-radius:0;min-height:auto;width:100%;justify-content:unset}@media (min-width: 960px){tc-my-account-sign-up.sso-signup-integrated,:host.sso-signup-integrated{width:100%}}tc-my-account-sign-up.sso-signup-integrated .sso-content,:host.sso-signup-integrated .sso-content{flex-direction:row}tc-my-account-sign-up .sso-signup-separator,:host .sso-signup-separator{border-right:1px solid #D8D8D8;padding-right:24px;margin-right:24px}tc-my-account-sign-up h3.sso-subtitle:not(.sso-subtitle--integrated),:host h3.sso-subtitle:not(.sso-subtitle--integrated){margin-bottom:20px}tc-my-account-sign-up h3.sso-subtitle--integrated,:host h3.sso-subtitle--integrated{margin-top:20px}tc-my-account-sign-up .sso-bold-text,:host .sso-bold-text{font-weight:600}tc-my-account-sign-up .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-my-account-sign-up .sso-link:hover,:host .sso-link:hover{text-decoration:none}tc-my-account-sign-up .sso-contact-text,:host .sso-contact-text{margin:15px 0 30px;color:#757575;font-size:12px;line-height:15px;text-align:center}tc-my-account-sign-up .sso-button-cnt,:host .sso-button-cnt{position:relative}tc-my-account-sign-up sso-password-field-container,:host sso-password-field-container{margin-bottom:8px}tc-my-account-sign-up .sso-height-100,:host .sso-height-100{height:100%}tc-my-account-sign-up .sso-wrapper--integrated,:host .sso-wrapper--integrated{padding:0;display:block;width:100%}tc-my-account-sign-up .sso-content--integrated,:host .sso-content--integrated{display:block}@media (min-width: 960px){tc-my-account-sign-up .sso-content--integrated,:host .sso-content--integrated{display:flex}}tc-my-account-sign-up .sso-content--integrated .sso-checkboxes,:host .sso-content--integrated .sso-checkboxes{margin-top:20px}tc-my-account-sign-up .sso-content--integrated button.sso-button,:host .sso-content--integrated button.sso-button{text-transform:uppercase}tc-my-account-sign-up .sso-list--integrated,:host .sso-list--integrated{padding:0;margin:0;margin-bottom:20px}tc-my-account-sign-up .sso-list--integrated .info-list__title,:host .sso-list--integrated .info-list__title{font-size:16px}@media (min-width: 960px){tc-my-account-sign-up .sso-list--integrated .info-list__title,:host .sso-list--integrated .info-list__title{font-size:18px}}tc-my-account-sign-up .sso-list--integrated .info-list__list-item,:host .sso-list--integrated .info-list__list-item{font-size:16px;line-height:22px}@media (min-width: 960px){tc-my-account-sign-up .sso-list--integrated .info-list__list-item,:host .sso-list--integrated .info-list__list-item{font-size:18px;line-height:25px}}tc-my-account-sign-up .sso-login-button,:host .sso-login-button{max-width:240px}tc-my-account-sign-up .sso-sign-up-form,:host .sso-sign-up-form{width:100%}tc-my-account-sign-up .sso-sign-up-form-flex-content,:host .sso-sign-up-form-flex-content{display:flex;flex-direction:row}'}};let Wi=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctSignUpFinishedEvent=zt(this,"tctSignUpFinishedEvent",7),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._signInLink="https://login.thomascook.io/signin/oauth2/v2.0/authorize?client_id=f9853451-cee7-40aa-9449-90fe70ce75e2&scope=openid&response_type=code&response_mode=query&redirect_uri=https://stgh5.thomascook.com/tcuk-h5/en-US/loginBack&code_challenge=_r67lcj4MoDNBAkhxS7ke_YKhKCBAiM0SgzNCagbCxo&code_challenge_method=S256&state=QjJDXzFBX1NJR05JTg%3D%3D",this._fieldsPerFlow={[So.signUpMainWithVercode]:["firstName","lastName","email","password"],[So.signUpVercode]:["vercode","termsConditions","privacyPolicy"],[So.signUpWrongCode]:["firstName","lastName","email","password"]},this._templateFlowType=null,this.submitted=!1,this.submitDisabled=!1,this.submitFormFailed=!1,this.passwordFieldViewValidators=[],this.alreadyLoggedIn=!1,this.resendDisabled=!1,this.errorCodeExpaired=!1,this.globalError="",this.formData={},this.inputChangeHandler=e=>{const t=e.target;this.submitted=!1,this.submitFormFailed=!1,this.formData=this._ssoFormService.inputChangeHandler(t,this.formData,this._fieldsPerFlow[this.formFlow]),t.name===this.formData.password.name&&this.setupPasswordFieldValidators(t.name,t.value)},this.resendCodeHandler=()=>{this.submitDisabled=!0,this.resendDisabled=!0,this.globalError="",this.errorCodeExpaired=!1,this.submitted=!1,this._apiClientService.signUpResendCode(),this.formData.vercode=Object.assign(Object.assign({},this.formData.vercode),{value:"",errors:[],isValid:!0})},this.submitFormHandler=async e=>{e.preventDefault(),this.submitFormFailed=!1;const{formData:t,isValid:o}=this._ssoFormService.validateForm(this.formData,this._fieldsPerFlow[this.formFlow]);if(this.formData=t,this.submitFormFailed=!o,this.submitFormFailed)return!1;switch(this.submitted=!0,this.submitDisabled=!0,this.errorCodeExpaired=!1,this.resendDisabled=!0,this.globalError="",this.formFlow){case So.signUpMainWithVercode:case So.signUpWrongCode:try{await this._apiClientService.signUpSendCode(this.formData)}catch(e){console.log(e)}break;case So.signUpMainWithVercode:try{const e=this._processDataService.prepareMyAccountSignUpRequest(this.formData);await this._apiClientService.signUpConfirm(e)}catch(e){console.log(e)}break;case So.signUpVercode:try{await this._apiClientService.signUpVerifyEmail(this.formData)}catch(e){console.log(e)}}},this.goToSignIn=()=>{window.location.href=this._signInLink},this._templateFlowType=Eo.tcPortalSignUp,this._apiClientService=xi.Instance,this._ssoFormService=new ri(oi),this._processDataService=_i.Instance,this.formFlow=Lo(this._templateFlowType)}componentWillLoad(){jo(this._templateFlowType),this.formData=this._ssoFormService.initFormData(["firstName","lastName","vercode","email","password","termsConditions","privacyPolicy"]),this.setupPasswordFieldValidators(this.formData.password.name)}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}setupPasswordFieldValidators(e,t=null){var o;this.passwordFieldViewValidators=(null===(o=oi[e])||void 0===o?void 0:o.reduce((e,o)=>(e.push({valid:t?o.handler(t):null,validatorLabel:o.validatorLabel}),e),[]))||[]}signUpSendCodeAzureHandler(e){this.signUpSendCodeResponseHandler(e.detail)}signUpVerCodeAzureResponseHandler(e){this.signUpVerCodeResponseHandler(e.detail)}signUpConfirmAzureResponseHandler(e){this.signUpConfirmResponseHandler(e.detail)}signUpSendCodeResponseHandler(e){var t;switch(this.submitDisabled=!1,this.resendDisabled=!1,+e.status){case 200:return this.submitted=!1,this.formFlow=So.signUpVercode,this.formData.email.inputAttributes=Object.assign(Object.assign({},this.formData.email.inputAttributes),{disabled:!0}),void(this.formData.vercode.inputAttributes=Object.assign(Object.assign({},this.formData.vercode.inputAttributes),{disabled:!1}));default:return void(this.globalError=bi(null===(t=e.error)||void 0===t?void 0:t.message))}}signUpVerCodeResponseHandler(e){var t;switch(+e.status){case 200:return this.submitted=!1,void this._apiClientService.signUpConfirm(this.formData);default:this.submitDisabled=!1,this.resendDisabled=!1;const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);return hi(e)?void(this.globalError=o):(di(e)&&(this.errorCodeExpaired=!0),void(this.formData=Object.assign(Object.assign({},this.formData),{vercode:Object.assign(Object.assign({},this.formData.vercode),{isValid:!1,errors:[o]})})))}}signUpConfirmResponseHandler(e){var t;switch(this.tctSignUpFinishedEvent.emit(e),+e.status){case 200:return this.submitted=!1,void(this.alreadyLoggedIn=!0);default:this.submitDisabled=!1;const o=bi(null===(t=e.error)||void 0===t?void 0:t.message);return hi(e)?void(this.globalError=o):di(e)?void(this.errorCodeExpaired=!0):void(ui(e)&&(this.formData=Object.assign(Object.assign({},this.formData),{email:Object.assign(Object.assign({},this.formData.email),{isValid:!1,errors:[o],inputAttributes:Object.assign(Object.assign({},this.formData.email.inputAttributes),{disabled:!1})}),vercode:Object.assign(Object.assign({},this.formData.vercode),{value:"",inputAttributes:Object.assign(Object.assign({},this.formData.vercode.inputAttributes),{disabled:!0})})}),this.formFlow=So.signUpWrongCode))}}render(){return Xe(Ke,null,Xe("div",{class:"sso-bg-image"}),Xe("div",{class:"sso-wrapper"},Xe("div",{class:"sso-content"},this.alreadyLoggedIn?Xe(Yt,null,Vs("text.nowYouCan")," ",Xe("a",{class:"sso-link",onClick:this.goToSignIn},Vs("links.signIn"))):Xe(Yt,null,Xe("h1",{class:"sso-title"},Vs("text.welcome")),Xe("form",{onSubmit:this.submitFormHandler},Xe(Mi,{formFlow:this.formFlow,formData:this.formData,globalError:this.globalError,passwordFieldViewValidators:this.passwordFieldViewValidators,onInputChange:this.inputChangeHandler,onResendCode:this.resendCodeHandler,submitDisabled:this.submitDisabled,submitFormFailed:this.submitFormFailed,resendDisabled:this.resendDisabled,errorCodeExpaired:this.errorCodeExpaired,isVercode:!0})))),Xe("div",{class:"sso-change-flow"},Xe("div",{class:"sso-flow-change-link"},Vs("text.doYouHaveAccount")," ",Xe("a",{class:"sso-link",onClick:this.goToSignIn},Vs("links.signIn"))))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-sign-up-azure,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;background-color:#ffffff;justify-content:center;align-items:flex-start;overflow:auto;letter-spacing:0.01rem}@media (min-width: 960px){tc-my-account-sign-up-azure,:host{flex-direction:row;justify-content:unset;align-items:unset;width:825px;max-width:100%;min-height:auto;padding:0;border-radius:24px;padding:24px;overflow:hidden;box-shadow:0 0 5px #cccccc}}tc-my-account-sign-up-azure a.sso-link,:host a.sso-link{font-size:inherit;font-weight:inherit;line-height:inherit;color:#262626}tc-my-account-sign-up-azure a.sso-checkbox-link,:host a.sso-checkbox-link{color:#262626;text-decoration:underline}tc-my-account-sign-up-azure a.sso-checkbox-link:hover,:host a.sso-checkbox-link:hover{text-decoration:none}tc-my-account-sign-up-azure a.sso-reset-password-link,:host a.sso-reset-password-link{font-size:16px;font-weight:400;line-height:22px}tc-my-account-sign-up-azure .sso-bg-image,:host .sso-bg-image{background:url("/assets/images/sso/bg_new.png") no-repeat 0 50%;background-size:cover;border-radius:16px;height:100%;display:none}@media (min-width: 960px){tc-my-account-sign-up-azure .sso-bg-image,:host .sso-bg-image{display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:18px}}tc-my-account-sign-up-azure .sso-wrapper,:host .sso-wrapper{position:relative;display:flex;flex-direction:column;padding:64px 16px 24px;border-radius:10px;justify-content:center;max-width:100%;height:100%}@media (min-width: 960px){tc-my-account-sign-up-azure .sso-wrapper,:host .sso-wrapper{padding:32px 0 0 32px;border-radius:0}}tc-my-account-sign-up-azure .sso-content,:host .sso-content{display:flex;flex-direction:column;justify-content:space-between;height:100%}tc-my-account-sign-up-azure .sso-content--already-signed,:host .sso-content--already-signed{justify-content:center;text-align:center}tc-my-account-sign-up-azure .sso-change-flow,:host .sso-change-flow{flex:1;display:flex;align-items:flex-end}tc-my-account-sign-up-azure h1.sso-title,:host h1.sso-title{font-size:24px;font-weight:700;line-height:26px;margin:0;margin-bottom:8px}tc-my-account-sign-up-azure h1.sso-title--successful-action,:host h1.sso-title--successful-action{margin-top:-32px}tc-my-account-sign-up-azure h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:400;line-height:22px;margin:0}tc-my-account-sign-up-azure hr.sso-hr,:host hr.sso-hr{margin:36px 0 27px;height:0;border:0;border-top:1px solid #cacaca}tc-my-account-sign-up-azure .sso-button,:host .sso-button{font-size:18px;font-weight:400;line-height:18px;position:relative;display:block;width:100%;border-radius:30px;padding:10px 16px;height:40px;text-align:center;box-sizing:border-box;cursor:pointer;text-decoration:none}tc-my-account-sign-up-azure .sso-button--small,:host .sso-button--small{display:inline-block;width:auto;height:32px;padding:6px 24px;font-size:16px}tc-my-account-sign-up-azure .sso-button--small:hover,:host .sso-button--small:hover{color:#ffffff}tc-my-account-sign-up-azure .sso-button--filled,:host .sso-button--filled{font-weight:700;background:#d74113;color:#ffffff;border:0;letter-spacing:0.8px}tc-my-account-sign-up-azure .sso-button--filled:hover,:host .sso-button--filled:hover{color:#ffffff}tc-my-account-sign-up-azure .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-my-account-sign-up-azure .sso-button--stroked:hover,:host .sso-button--stroked:hover{color:#ffffff}tc-my-account-sign-up-azure .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-my-account-sign-up-azure .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-my-account-sign-up-azure .sso-button:hover:not([disabled]),tc-my-account-sign-up-azure .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-my-account-sign-up-azure .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-my-account-sign-up-azure .sso-button:hover,:host .sso-button:hover{text-decoration:none}tc-my-account-sign-up-azure .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin:0;font-size:14px;font-weight:400;line-height:140%}tc-my-account-sign-up-azure .sso-flow-change-link,:host .sso-flow-change-link{font-size:16px;font-weight:400;line-height:20px;text-align:center;margin-top:20px;flex:1}@media (min-width: 960px){tc-my-account-sign-up-azure .sso-flow-change-link,:host .sso-flow-change-link{padding-top:24px;margin-top:16px;border-top:1px solid #cacaca}}tc-my-account-sign-up-azure .sso-flow-change-link--bold,:host .sso-flow-change-link--bold{font-weight:bold}tc-my-account-sign-up-azure .sso-close-button,:host .sso-close-button{position:absolute;font-size:45px;line-height:25px;font-weight:100;right:16px;top:40px;background:transparent;color:#262626;cursor:pointer;z-index:1}@media (min-width: 960px){tc-my-account-sign-up-azure .sso-close-button,:host .sso-close-button{right:0;top:0}}tc-my-account-sign-up-azure .sso-flex-column,:host .sso-flex-column{flex:1;display:flex;flex-direction:column;position:relative}tc-my-account-sign-up-azure .sso-flex-column-1,:host .sso-flex-column-1{flex:1}tc-my-account-sign-up-azure .sso-flex-column-2,:host .sso-flex-column-2{flex:2}tc-my-account-sign-up-azure .sso-flex-column-3,:host .sso-flex-column-3{flex:3}tc-my-account-sign-up-azure .desktop-only,:host .desktop-only{display:none}@media (min-width: 960px){tc-my-account-sign-up-azure .desktop-only,:host .desktop-only{display:block}}tc-my-account-sign-up-azure h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:20px}tc-my-account-sign-up-azure .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-my-account-sign-up-azure .sso-link:hover,:host .sso-link:hover{text-decoration:none}tc-my-account-sign-up-azure .sso-resend-code-cnt,:host .sso-resend-code-cnt{text-align:center;margin:25px 0 20px}tc-my-account-sign-up-azure .sso-resend-code-link,:host .sso-resend-code-link{font-size:14px;font-weight:600;line-height:22px;cursor:pointer;text-decoration:underline}tc-my-account-sign-up-azure .sso-resend-code--disabled,:host .sso-resend-code--disabled{color:#757575;text-decoration:none;cursor:default}tc-my-account-sign-up-azure .sso-contact-text,:host .sso-contact-text{margin:15px 0 30px;color:#757575;font-size:12px;font-weight:400;line-height:15px;text-align:center}tc-my-account-sign-up-azure .sso-button-cnt,:host .sso-button-cnt{position:relative}'}};let Yi=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.tctChangeFlow=zt(this,"tctChangeFlow",7),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this.snRedirect=e=>()=>{vo[e].disabled||(window.location.href=vo[e].link)},this.changeFlow=e=>()=>{this.tctChangeFlow.emit(e)},this.close=()=>{this.tctChangeFlow.emit(null)}}componentWillRender(){}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}render(){return Xe(Ke,null,Xe("div",{class:"sso-bg-image"}),Xe("div",{class:"sso-wrapper"},Xe("span",{class:"sso-close-button",onClick:this.close},"×"),Xe("div",{class:"sso-content"},Xe("h1",{class:"sso-title"},Vs("text.welcome")),Xe("h3",{class:"sso-subtitle"},Vs("text.signUpThomasCook")),Xe("div",{class:"sso-buttons-cnt"},Xe("button",{class:"sso-button sso-button--stroked sso-button--small-text",onClick:this.changeFlow("signIn")},Vs("buttons.logIn")),Xe("button",{class:"sso-button sso-button--filled sso-button--small-text",onClick:this.changeFlow("signUp")},Vs("buttons.createNewAccount"))),Xe("div",{class:"sso-sn-content"},Xe("div",{class:"sso-sn-text"},Vs("text.orContinueWith")),Xe("div",{class:"sso-sn-buttons-cnt"},Xe("sso-sn-button",{snName:"facebook",disabled:vo.facebook.disabled,onClick:this.snRedirect("facebook")}))))))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-welcome,:host{box-sizing:border-box;display:flex;font-family:"Source Sans Pro";position:relative;width:100vw;min-height:100vh;background-color:#ffffff;justify-content:center;align-items:flex-start;overflow:auto;letter-spacing:0.01rem}@media (min-width: 960px){tc-my-account-welcome,:host{flex-direction:row;justify-content:unset;align-items:unset;width:825px;max-width:100%;min-height:auto;padding:0;border-radius:24px;padding:24px;overflow:hidden;box-shadow:0 0 5px #cccccc}}tc-my-account-welcome a.sso-link,:host a.sso-link{font-size:inherit;font-weight:inherit;line-height:inherit;color:#262626}tc-my-account-welcome a.sso-checkbox-link,:host a.sso-checkbox-link{color:#262626;text-decoration:underline}tc-my-account-welcome a.sso-checkbox-link:hover,:host a.sso-checkbox-link:hover{text-decoration:none}tc-my-account-welcome a.sso-reset-password-link,:host a.sso-reset-password-link{font-size:16px;font-weight:400;line-height:22px}tc-my-account-welcome .sso-bg-image,:host .sso-bg-image{background:url("/assets/images/sso/bg_new.png") no-repeat 0 50%;background-size:cover;border-radius:16px;height:100%;display:none}@media (min-width: 960px){tc-my-account-welcome .sso-bg-image,:host .sso-bg-image{display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:18px}}tc-my-account-welcome .sso-wrapper,:host .sso-wrapper{position:relative;display:flex;flex-direction:column;padding:64px 16px 24px;border-radius:10px;justify-content:center;max-width:100%;height:100%}@media (min-width: 960px){tc-my-account-welcome .sso-wrapper,:host .sso-wrapper{padding:32px 0 0 32px;border-radius:0}}tc-my-account-welcome .sso-content,:host .sso-content{display:flex;flex-direction:column;justify-content:space-between;height:100%}tc-my-account-welcome .sso-content--already-signed,:host .sso-content--already-signed{justify-content:center;text-align:center}tc-my-account-welcome .sso-change-flow,:host .sso-change-flow{flex:1;display:flex;align-items:flex-end}tc-my-account-welcome h1.sso-title,:host h1.sso-title{font-size:24px;font-weight:700;line-height:26px;margin:0;margin-bottom:8px}tc-my-account-welcome h1.sso-title--successful-action,:host h1.sso-title--successful-action{margin-top:-32px}tc-my-account-welcome h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:400;line-height:22px;margin:0}tc-my-account-welcome hr.sso-hr,:host hr.sso-hr{margin:36px 0 27px;height:0;border:0;border-top:1px solid #cacaca}tc-my-account-welcome .sso-button,:host .sso-button{font-size:18px;font-weight:400;line-height:18px;position:relative;display:block;width:100%;border-radius:30px;padding:10px 16px;height:40px;text-align:center;box-sizing:border-box;cursor:pointer;text-decoration:none}tc-my-account-welcome .sso-button--small,:host .sso-button--small{display:inline-block;width:auto;height:32px;padding:6px 24px;font-size:16px}tc-my-account-welcome .sso-button--small:hover,:host .sso-button--small:hover{color:#ffffff}tc-my-account-welcome .sso-button--filled,:host .sso-button--filled{font-weight:700;background:#d74113;color:#ffffff;border:0;letter-spacing:0.8px}tc-my-account-welcome .sso-button--filled:hover,:host .sso-button--filled:hover{color:#ffffff}tc-my-account-welcome .sso-button--stroked,:host .sso-button--stroked{color:#d74113;background:#ffffff;border:0;outline:1px solid #d74113}tc-my-account-welcome .sso-button--stroked:hover,:host .sso-button--stroked:hover{color:#ffffff}tc-my-account-welcome .sso-button--small-text,:host .sso-button--small-text{text-transform:none}tc-my-account-welcome .sso-button--big-text,:host .sso-button--big-text{text-transform:uppercase}tc-my-account-welcome .sso-button:hover:not([disabled]),tc-my-account-welcome .sso-button:active:not([disabled]),:host .sso-button:hover:not([disabled]),:host .sso-button:active:not([disabled]){opacity:0.8}tc-my-account-welcome .sso-button[disabled],:host .sso-button[disabled]{color:#555555;background-color:#cacaca}tc-my-account-welcome .sso-button:hover,:host .sso-button:hover{text-decoration:none}tc-my-account-welcome .sso-global-error,:host .sso-global-error{text-align:center;color:#970202;margin:0;font-size:14px;font-weight:400;line-height:140%}tc-my-account-welcome .sso-flow-change-link,:host .sso-flow-change-link{font-size:16px;font-weight:400;line-height:20px;text-align:center;margin-top:20px;flex:1}@media (min-width: 960px){tc-my-account-welcome .sso-flow-change-link,:host .sso-flow-change-link{padding-top:24px;margin-top:16px;border-top:1px solid #cacaca}}tc-my-account-welcome .sso-flow-change-link--bold,:host .sso-flow-change-link--bold{font-weight:bold}tc-my-account-welcome .sso-close-button,:host .sso-close-button{position:absolute;font-size:45px;line-height:25px;font-weight:100;right:16px;top:40px;background:transparent;color:#262626;cursor:pointer;z-index:1}@media (min-width: 960px){tc-my-account-welcome .sso-close-button,:host .sso-close-button{right:0;top:0}}tc-my-account-welcome .sso-flex-column,:host .sso-flex-column{flex:1;display:flex;flex-direction:column;position:relative}tc-my-account-welcome .sso-flex-column-1,:host .sso-flex-column-1{flex:1}tc-my-account-welcome .sso-flex-column-2,:host .sso-flex-column-2{flex:2}tc-my-account-welcome .sso-flex-column-3,:host .sso-flex-column-3{flex:3}tc-my-account-welcome .desktop-only,:host .desktop-only{display:none}@media (min-width: 960px){tc-my-account-welcome .desktop-only,:host .desktop-only{display:block}}tc-my-account-welcome .sso-sn-content,:host .sso-sn-content{display:flex;flex-direction:column;text-align:center;align-items:center}tc-my-account-welcome .sso-sn-text,:host .sso-sn-text{font-size:14px;font-weight:400;line-height:22px;margin-bottom:25px}tc-my-account-welcome h3.sso-subtitle,:host h3.sso-subtitle{font-size:16px;font-weight:300;line-height:22px;margin-bottom:20px}tc-my-account-welcome .sso-link,:host .sso-link{text-decoration:underline;cursor:pointer}tc-my-account-welcome .sso-link:hover,:host .sso-link:hover{text-decoration:none}tc-my-account-welcome .sso-sn-buttons-cnt,:host .sso-sn-buttons-cnt{display:flex;justify-content:center;width:190px}tc-my-account-welcome .sso-buttons-cnt,:host .sso-buttons-cnt{margin:16px 0 20px}tc-my-account-welcome .sso-buttons-cnt button.sso-button:first-child,:host .sso-buttons-cnt button.sso-button:first-child{margin-bottom:24px}'}};let Ji=class extends HTMLElement{constructor(){var e;super(),this.__registerHost(),this.componentRenderedEvent=zt(this,"componentRenderedEvent",7),this._menuItems=Li[null===(e=To.currentMarket)||void 0===e?void 0:e.market.toLowerCase()],this._ssoIntegrationService=_s.Instance,this._apiClientService=Vo.Instance}componentWillLoad(){this._ssoIntegrationService.userProfile$.subscribe(async e=>{var t,o,s;if(e){const e=await this._apiClientService.getWishlists();this.wishlists=null===(s=null===(o=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.wishlists)||void 0===o?void 0:o[0])||void 0===s?void 0:s.accommodationOffers}})}componentDidRender(){this.componentRenderedEvent.emit&&this.componentRenderedEvent.emit()}render(){var e;return Xe(Ke,null,Xe("a",{href:this._menuItems.myWishlist.link,title:Vs("menu.myWishlist"),class:"wishlist-heart"},(null===(e=this.wishlists)||void 0===e?void 0:e.length)?Xe("span",{class:"wishlist-not-empty"}):null,Xe("img",{src:"/assets/icons/interface/heart-love-outline.svg",alt:"Wishlist",width:"20",height:"20"})))}static get style(){return'html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;box-sizing:border-box}html,body{height:100%;width:100%;background-color:#ffffff}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}tc-my-account-wishlist-icon,:host{position:relative;display:flex;cursor:pointer;width:20px;height:20px;font-size:0;align-items:center}tc-my-account-wishlist-icon .wishlist-heart,:host .wishlist-heart{position:relative;width:20px;height:20px;display:flex}tc-my-account-wishlist-icon .wishlist-not-empty,:host .wishlist-not-empty{position:absolute;width:9px;height:9px;top:-1px;right:-3px;border-radius:50%;background-color:#D74113}'}};var Xi;"undefined"!=typeof customElements&&[Wt(Es,[0,"sso-birthdate-calendar-container",{control:[16],isCalendarShown:[32],date:[32]}]),Wt(Ss,[0,"sso-birthdate-selection-container",{control:[16],birthdateForm:[32]}]),Wt($s,[0,"sso-button-container",{disabled:[4],loading:[4],type:[1],text:[1]}]),Wt(Cs,[0,"sso-date-picker",{currentCalendarFlow:[32],selectedDate:[32]}]),Wt(As,[0,"sso-default-field-container",{control:[16],fieldType:[1,"field-type"],tcApp:[4,"tc-app"]}]),Wt(Fs,[0,"sso-dropdown-field",{value:[8],label:[1],name:[1],options:[16],isValid:[4,"is-valid"],inputAttributes:[16]}]),Wt(Ls,[0,"sso-form-checkbox",{value:[4],label:[1],name:[1],type:[1],isValid:[4,"is-valid"],isHtml:[4,"is-html"],inputAttributes:[16]}]),Wt(Rs,[0,"sso-form-error",{errors:[16]}]),Wt(js,[0,"sso-form-input",{value:[8],name:[1],type:[1],inputAttributes:[16]}]),Wt(Ps,[0,"sso-form-select",{value:[8],name:[1],options:[16],fieldAttributes:[16]}]),Wt(Us,[0,"sso-info-list",{infoTitle:[1,"info-title"],intergrated:[4]}]),Wt(Hs,[0,"sso-password-field-container",{control:[16],eyeIcon:[4,"eye-icon"],tcApp:[4,"tc-app"],showError:[4,"show-error"],showPassword:[32]}]),Wt(qs,[0,"sso-password-validators-container",{validators:[16]}]),Wt(Ns,[0,"sso-policies-container-app",{formData:[16]}]),Wt(Ms,[0,"sso-policies-container-portal",{formData:[16],triggerPolicies:[4,"trigger-policies"],showPoliciesTooltip:[32]}]),Wt(Bs,[0,"sso-resend-code-button",{isDisabled:[4,"is-disabled"]}]),Wt(Ws,[0,"sso-skeleton-container-app"]),Wt(Ys,[0,"sso-sn-button",{snName:[1,"sn-name"],link:[1],disabled:[4]}]),Wt(Js,[0,"sso-text-field",{value:[8],label:[1],name:[1],type:[1],isValid:[4,"is-valid"],inputAttributes:[16]}]),Wt(Xs,[0,"sso-tooltip",{position:[1],message:[1],show:[4],autoHide:[4,"auto-hide"],shouldShow:[32]}]),Wt(fi,[0,"tc-mobile-app-reset-password",{submitFormFailed:[32],passwordFieldViewValidators:[32],formFlow:[32],submitted:[32],submitDisabled:[32],resendDisabled:[32],globalError:[32],formData:[32]}]),Wt(wi,[0,"tc-mobile-app-reset-password-azure",{submitFormFailed:[32],passwordFieldViewValidators:[32],formFlow:[32],submitted:[32],submitDisabled:[32],resendDisabled:[32],globalError:[32],formData:[32]},[[4,"azure_ResetPasswordSendCodeResponse","signUpSendCodeAzureHandler"],[4,"azure_ResetPasswordVerCodeResponse","signUpVerCodeAzureResponseHandler"],[4,"azure_ResetPasswordConfirmResponse","signUpConfirmAzureResponseHandler"]]]),Wt(yi,[0,"tc-mobile-app-sign-in",{submitted:[32],submitDisabled:[32],globalError:[32],formData:[32]}]),Wt(ki,[0,"tc-mobile-app-sign-in-azure",{submitted:[32],submitDisabled:[32],globalError:[32],formData:[32]},[[4,"azure_SignInConfirmResponse","signInAzureResponseHandler"]]]),Wt(Ei,[0,"tc-mobile-app-sign-up",{wrapperVisibilityClass:[32],submitFormFailed:[32],passwordFieldViewValidators:[32],formFlow:[32],submitted:[32],submitDisabled:[32],resendDisabled:[32],globalError:[32],formData:[32]}]),Wt(Si,[0,"tc-mobile-app-sign-up-azure",{wrapperVisibilityClass:[32],submitFormFailed:[32],passwordFieldViewValidators:[32],formFlow:[32],submitted:[32],submitDisabled:[32],resendDisabled:[32],globalError:[32],formData:[32]},[[4,"azure_SignUpSendCodeResponse","signUpSendCodeAzureHandler"],[4,"azure_SignUpVerCodeResponse","signUpVerCodeAzureResponseHandler"],[4,"azure_SignUpConfirmResponse","signUpConfirmAzureResponseHandler"]]]),Wt(Ci,[0,"tc-mobile-app-sn-sign-up",{submitFormFailed:[32],passwordFieldViewValidators:[32],formFlow:[32],wrapperVisibilityClass:[32],flowHasChanged:[32],submitted:[32],submitDisabled:[32],firstLoad:[32],alreadyLoggedIn:[32],globalError:[32],formData:[32]}]),Wt(Ai,[0,"tc-my-account-auth-dialog",{flow:[1025],config:[16],isDesktop:[32]},[[4,"tctChangeFlow","changeFlow"],[9,"resize","resize"]]]),Wt(Fi,[0,"tc-my-account-auth-success",{email:[1]}]),Wt(Ri,[0,"tc-my-account-navigation-menu",{globalError:[32],userProfile:[32],isDesktop:[32]},[[9,"resize","resize"],[8,"click","checkForClickOutside"]]]),Wt(ji,[0,"tc-my-account-navigation-open",{userProfile:[32],isMobile:[32]},[[9,"resize","resize"]]]),Wt(Ii,[0,"tc-my-account-reset-password",{submitted:[32],submitDisabled:[32],resendDisabled:[32],formFlow:[32],errorNoAccount:[32],globalError:[32],formData:[32],isDesktop:[32]},[[9,"resize","resize"]]]),Wt(Ti,[0,"tc-my-account-reset-password-azure",{submitFormFailed:[32],formFlow:[32],submitted:[32],submitDisabled:[32],resendDisabled:[32],errorNoAccount:[32],globalError:[32],formData:[32],isDesktop:[32]},[[9,"resize","resize"],[4,"azure_ResetPasswordSendCodeResponse","signUpSendCodeAzureHandler"],[4,"azure_ResetPasswordVerCodeResponse","signUpVerCodeAzureResponseHandler"],[4,"azure_ResetPasswordConfirmResponse","signUpConfirmAzureResponseHandler"]]]),Wt(Ui,[0,"tc-my-account-sign-in",{submitted:[32],submitDisabled:[32],formFlow:[32],globalError:[32],formData:[32],isDesktop:[32]},[[9,"resize","resize"]]]),Wt(Hi,[0,"tc-my-account-sign-in-azure",{submitted:[32],submitDisabled:[32],globalError:[32],formData:[32]},[[4,"azure_SignInConfirmResponse","signInAzureResponseHandler"]]]),Wt(qi,[0,"tc-my-account-sign-in-small",{submitted:[32],submitDisabled:[32],globalError:[32],formData:[32]}]),Wt(Bi,[0,"tc-my-account-sign-up",{integrated:[4],firstName:[1,"first-name"],lastName:[1,"last-name"],email:[1],bookingReference:[1,"booking-reference"],submitted:[32],submitDisabled:[32],submitFormFailed:[32],alreadySignedUp:[32],globalError:[32],formData:[32],isDesktop:[32]},[[9,"resize","resize"]]]),Wt(Wi,[0,"tc-my-account-sign-up-azure",{submitted:[32],submitDisabled:[32],submitFormFailed:[32],passwordFieldViewValidators:[32],formFlow:[32],alreadyLoggedIn:[32],resendDisabled:[32],errorCodeExpaired:[32],globalError:[32],formData:[32]},[[4,"azure_SignUpSendCodeResponse","signUpSendCodeAzureHandler"],[4,"azure_SignUpVerCodeResponse","signUpVerCodeAzureResponseHandler"],[4,"azure_SignUpConfirmResponse","signUpConfirmAzureResponseHandler"]]]),Wt(Yi,[0,"tc-my-account-welcome"]),Wt(Ji,[0,"tc-my-account-wishlist-icon",{wishlists:[32]}])].forEach(e=>{customElements.get(e.is)||customElements.define(e.is,e,Xi)})},function(e,t,o){var s=o(15),i=o(16),n=i;n.v1=s,n.v4=i,e.exports=n},function(e,t,o){"use strict";!function(){location.host.split(".").splice(-2).join(".");const e=new Date((new Date).getTime()+63072e6).toGMTString(),t=document.getElementById("tct-alert-close");t&&t.addEventListener("click",(function(){document.cookie="CovidAlert=True;expires="+e+"; path=/",this.parentNode.parentNode.style.display="none",window.ga&&ga("CATTGATC.send","event","Covid-Alert",screen,{nonInteraction:!0})}))}()},,,function(e,t,o){"use strict";var s=o(10);!async function(){let e=document.querySelector("[data-market]").dataset.market,t=document.documentElement.lang,o="",i={};i="uk"==e?{"localhost:8080":"api-stg.thomascook.io","dlite.test.thomascook.io":"api-qa.thomascook.io","dlite.dev.thomascook.io":"api-int.thomascook.io","dlite.int.thomascook.io":"api-stg.thomascook.io","dlite.stg.thomascook.com":"api.thomascook.com","www.thomascook.com":"api.thomascook.com"}:{"localhost:8080":"api-stg.thomascook.io","dlite.test.thomascook.io":"api-eu-qa.thomascook.io","dlite.dev.thomascook.io":"api-eu-int.thomascook.io","dlite.int.thomascook.io":"api-eu-stg.thomascook.io","dlite.stg.thomacook.com":"api-eu.thomascook.com","www.thomascook.com":"api-eu.thomascook.com"};const n={"localhost:8080":"localhost","dlite.test.thomascook.io":".thomascook.io","dlite.dev.thomascook.io":".thomascook.io","dlite.int.thomascook.io":".thomascook.io","dlite.stg.thomascook.com":".thomascook.com","www.thomascook.com":".thomascook.com"};o=function(e){const t=document.cookie.split("; ").find(t=>t.startsWith(e));return t?t.split("=")[1]:null}("tct.session_id"),o||(o=Object(s.v4)(),function(e,t,o,s){const i=new Date,a=o?0:new Date(i.setFullYear(i.getFullYear()+1)),r=s?" secure=true;":"";document.cookie=`${e}=${t}; expires=${a}; path=/; domain=${n[window.location.host]}; ${r};`}("tct.session_id",o,!0,!0));let a,r=`https://${i[window.location.host]}/features?market=${e}&locale=${t}&session=${o}`;if("localhost:8080"!=window.location.host)try{const e=await fetch(r,{credentials:"include"});200==e.status&&(a=await e.json())}catch(e){e instanceof SyntaxError?console.log("There was a SyntaxError",e):console.log("There was an error",e)}a&&function(e){var t;t={event:"tcFeatures",...e},(window.dataLayer||[]).push(t)}(a)}()},function(e,t,o){var s,i,n=o(4),a=o(5),r=0,l=0;e.exports=function(e,t,o){var c=t&&o||0,d=t||[],u=(e=e||{}).node||s,p=void 0!==e.clockseq?e.clockseq:i;if(null==u||null==p){var h=n();null==u&&(u=s=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=i=16383&(h[6]<<8|h[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),b=void 0!==e.nsecs?e.nsecs:l+1,g=m-r+(b-l)/1e4;if(g<0&&void 0===e.clockseq&&(p=p+1&16383),(g<0||m>r)&&void 0===e.nsecs&&(b=0),b>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");r=m,l=b,i=p;var f=(1e4*(268435455&(m+=122192928e5))+b)%4294967296;d[c++]=f>>>24&255,d[c++]=f>>>16&255,d[c++]=f>>>8&255,d[c++]=255&f;var x=m/4294967296*1e4&268435455;d[c++]=x>>>8&255,d[c++]=255&x,d[c++]=x>>>24&15|16,d[c++]=x>>>16&255,d[c++]=p>>>8|128,d[c++]=255&p;for(var w=0;w<6;++w)d[c+w]=u[w];return t||a(d)}},function(e,t,o){var s=o(4),i=o(5);e.exports=function(e,t,o){var n=t&&o||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||s)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var r=0;r<16;++r)t[n+r]=a[r];return t||i(a)}},function(e,t,o){"use strict";!function(){if(!document.querySelectorAll(".js-hotelscards").length&&!document.querySelectorAll(".js-hotelscards-tab-button").length&&!document.querySelectorAll(".js-accom-list-slider").length)return;const e=document.querySelectorAll(".js-hotelscards").length?document.querySelectorAll(".js-hotelscards"):document.querySelectorAll(".js-accom-list-slider"),t=!!document.querySelectorAll(".js-hotelscards").length;e.forEach(e=>{if(t){const t=[...e.querySelectorAll(".js-hotelscards-tab-content")],o=[...e.querySelectorAll(".js-hotelscards-tab-button")];t.forEach((e,t)=>{const o=e.querySelector(".js-hotelscards-description-text"),s=e.querySelector(".js-hotelscrads-description-more"),i=e.querySelector(".js-hotelscrads-description-less");if(o&&!o.classList.contains("show-full")){o.offsetHeight/24>2&&(o.classList.add("hide-text"),s.classList.add("is-active")),s&&(s.addEventListener("click",e=>{o.classList.toggle("hide-text"),s.classList.toggle("is-active"),i.classList.toggle("is-active")}),i.addEventListener("click",e=>{o.classList.toggle("hide-text"),i.classList.toggle("is-active"),s.classList.toggle("is-active")}))}0!==t&&e.classList.remove("is-active")});const s=e.querySelector(".js-drag-and-move-container"),i=e.querySelector(".js-tab-container");if(o.forEach(e=>{e.addEventListener("click",n=>{o.forEach(e=>e.classList.remove("is-active")),t.forEach(e=>e.classList.remove("is-active"));const a=n.target.getAttribute("data-promotionID"),r=t.find(e=>e.getAttribute("data-promotionID")===a);n.target.classList.add("is-active"),r.classList.add("is-active");const l=(i.scrollWidth-e.offsetWidth)/2;s.scrollTo({top:0,left:s.scrollLeft+e.getBoundingClientRect().left-l,behavior:"smooth"})})}),s&&i.offsetWidth{t=!0,o=e.pageX-s.offsetLeft,i=s.scrollLeft},a=t=>{e=!0,o=Math.floor(t.touches[0].pageX)-s.offsetLeft,i=s.scrollLeft},r=e=>{t=!1},l=t=>{e=!1};s.addEventListener("mousemove",e=>{if(e.preventDefault(),!t)return;const n=e.pageX-s.offsetLeft-o;s.scrollLeft=i-n}),s.addEventListener("touchmove",t=>{if(t.preventDefault(),!e)return;const n=Math.floor(t.touches[0].pageX)-s.offsetLeft-o;s.scrollLeft=i-n}),s.addEventListener("mousedown",n,!1),s.addEventListener("mouseup",r,!1),s.addEventListener("mouseleave",r,!1),s.addEventListener("touchstart",a,!1),s.addEventListener("touchend",l,!1),s.addEventListener("touchcancel",l,!1)}}let o=null;o=t?e.querySelectorAll(".js-hotels-slider"):document.querySelectorAll(".js-hotels-slider"),o.length&&o.forEach((e,t)=>{const o=e.querySelector(".js-hotels-slider-inner"),s=[...o.querySelectorAll(".js-hotels-slide")],i=e.querySelector(".js-hotels-prev"),n=e.querySelector(".js-hotels-next");let a=[];function r(e){if("prev"===e){if(i.disabled)return;s[s.indexOf(a[0])-1].scrollIntoView({block:"nearest",behavior:"smooth",inline:"start"})}if("next"===e){if(n.disabled)return;s[s.indexOf(a[a.length-1])+1].scrollIntoView({block:"nearest",behavior:"smooth",inline:"end"})}}s.forEach(e=>{new IntersectionObserver((e,t)=>{e.forEach(e=>{e.target.classList.toggle("is-active-slide",e.isIntersecting)}),a=s.filter(e=>e.classList.contains("is-active-slide")),s[0].classList.contains("is-active-slide")?i.setAttribute("disabled",""):i.removeAttribute("disabled"),s[s.length-1].classList.contains("is-active-slide")?n.setAttribute("disabled",""):n.removeAttribute("disabled")},{root:o,rootMargin:"0px",threshold:.8}).observe(e)}),e.addEventListener("click",e=>{const t=!(!e.target.classList.contains("js-hotels-prev")&&!e.target.closest(".js-hotels-prev")),o=!(!e.target.classList.contains("js-hotels-next")&&!e.target.closest(".js-hotels-next"));t&&r("prev"),o&&r("next")})})})}()},,function(e,t,o){"use strict";o.r(t),t.default=function(){function e(e,t){let o=document.querySelector(`[data-tab-script=${e}]`);if(!o)return;const s=o.dataset.url.split(/[""]/)[1],i=document.createElement("script");document.getElementsByTagName("body")[0].appendChild(i),i.setAttribute("src",s),i.onload=t}function t(e){document.querySelector(e).click()}function o(o,i){o.addEventListener("click",o=>{e("search-bar",()=>{document.getElementById("fake-sb").remove(),s=!0,setTimeout(()=>{t(i);const e=document.querySelector("#flightTab");document.querySelector("#hotelTab").addEventListener("click",()=>{let e=location.href.split("?")[0];window.history.pushState("object",document.title,e);const t=document.querySelectorAll(".tct-seo-accom-card");t[0]&&(t[0].style.display="none"),t[1]&&(t[1].style.display="flex")}),e.addEventListener("click",()=>{let e=location.href.split("?")[0];window.history.pushState("object",document.title,e);const t=document.querySelectorAll(".tct-seo-accom-card");t[1]&&(t[1].style.display="none"),t[0]&&(t[0].style.display="flex")})},500)})})}let s=!1;const i=document.getElementById("load-search-bar"),n=document.getElementById("tc-sb-departure"),a=[...document.querySelectorAll(".tct-btn-accom-price.alternate")],r=document.querySelector("#fakeFlightTab"),l=document.querySelector("#fakeHotelTab");i&&n&&[i,n].forEach(e=>o(e,".sc-sb-bar-departure")),a&&a.map(e=>o(e,".sc-sb-bar-departure")),o(r,".sc-sb-bar-departure"),l&&l.addEventListener("click",()=>{e("search-bar",()=>{document.getElementById("fake-sb").remove(),s=!0,setTimeout(()=>{const e=document.querySelector("#hotelTab > .tab-button");e.click(),setTimeout(()=>{t(".sc-sb-bar-date")},200),e.addEventListener("click",()=>{let e=location.href.split("?")[0];window.history.pushState("object",document.title,e)})},500)})}),window.innerWidth>600&&e("search-bar",()=>{s=!0,document.getElementById("fake-sb").remove()}),window.addEventListener("resize",()=>{window.innerWidth>600&&!s&&(s=!0,e("search-bar"),document.getElementById("fake-sb").remove())})}()},,,,,,function(e,t,o){"use strict";o(17),function(){const e=[...document.querySelectorAll(".tct-seo-accom-section-heading-group")],t=[...document.querySelectorAll(".tct-seo-accom-section-arrow")],o=[...document.querySelectorAll(".tct-seo-accom-additional-info")],s=[...document.querySelectorAll(".tct-seo-accom-tripadvisor-review")],i=[...document.querySelectorAll(".tct-seo-accom-tripadvisor-review-text")],n=document.querySelector(".tct-seo-accom-descriptions"),a=[...document.querySelectorAll(".toggle-link")];let r=window.matchMedia("(max-width: 1200px)"),l=document.querySelector("[data-market]").dataset.market;const c={uk:{more:"Read more",less:"Read less"},nl:{more:"Lees meer",less:"Lees minder"},"nl-be":{more:"Lees meer",less:"Lees minder"},"fr-be":{more:"Lire la suite",less:"Lire moins"}};e&&t&&o&&e.forEach((e,s)=>{e.addEventListener("click",e=>{t[s].classList.toggle("up"),o[s].classList.toggle("show")})}),a&&n&&a.forEach((e,t)=>{r.matches&&n.innerText.length>250&&n.classList.add("collapsed"),n&&n.classList.contains("collapsed")?a[t].textContent=c[l].more:a[t].textContent=c[l].less,e.addEventListener("click",()=>{e.textContent==c[l].more?(n.classList.toggle("collapsed"),e.textContent=c[l].less):(n.scrollIntoView(),n.classList.toggle("collapsed"),e.textContent=c[l].more)})}),i.map((e,t)=>{if(window.innerWidth<960&&e.textContent.length>250){const o=e.textContent;e.textContent=e.textContent.slice(0,250)+"...";const i=document.createElement("span");i.classList.add("toggle-link"),e.after(i),i.textContent=c[l].more,i.addEventListener("click",()=>{i.textContent==c[l].more?(e.textContent=o,i.textContent=c[l].less):(s[t].scrollIntoView(),e.textContent=e.textContent.slice(0,250)+"...",i.textContent=c[l].more)})}});const d=document.querySelector(".ta-review-link"),u=document.querySelector(".section-reviews");d&&u&&d.addEventListener("click",()=>{u.scrollIntoView()});const p=document.querySelector(".tabs-panel-row"),h=[...document.querySelectorAll(".tab-item.tab")],m=[...document.querySelectorAll(".tab-item.tots-tab")],b=[...document.querySelectorAll(".tab-item-link")],g=[...document.querySelectorAll(".tab-item-secondary")],f=[...document.querySelectorAll(".tab-item-link-secondary")];let x=0;function w(e){let t;e.target.hasAttribute("data-target")?(t=e.target.dataset.target.slice(1),k(t,b)):(t=e.target.innerText.split(" ").join("-").toLowerCase(),k(e.target.innerText,b)),y(t,".content-tab")}function v(e){const t=e.target.innerText.split(" ").join("-").toLowerCase();k(e.target.innerText,f),y(t,".content-tab-secondary")}function y(e,t){[...document.querySelectorAll(t)].forEach(t=>{t.id.toLowerCase()===e?t.className.includes("active")||(t.className+=" active"):t.classList.remove("active")})}function k(e,t){t.forEach(o=>{if(o.innerText.toLowerCase()==e||o.innerText==e){o.classList.add("active");const e=t.indexOf(document.querySelector(".tab-item-link.active"));e>x?p.scrollBy(100*e,0):0===e?p.scrollBy(-100,0):p.scrollBy(-100*e,0),x=e}else o.classList.remove("active")})}h&&h.forEach(e=>e.addEventListener("click",e=>{const t=e.target.dataset.target.slice(1),o=document.querySelector("#"+t);w(e),o.scrollIntoView()})),m&&m.forEach(e=>e.addEventListener("click",w)),g&&g.forEach(e=>e.addEventListener("click",v));const z=[...document.querySelectorAll(".controls-container")],_=[...document.querySelectorAll(".tots-cards-list.scrollable-list")];z.forEach((e,t)=>{e.children[0].classList.add("active"),[...e.children].forEach((e,o)=>{e.addEventListener("click",e=>{_[t].scrollTo({top:0,left:720*o,behavior:"smooth"});!function(e,t){t.forEach(t=>{e.target==t?e.target.className.includes("active")||(e.target.className+=" active"):t.classList.remove("active")})}(e,[...document.querySelectorAll(".control-"+(t+1))])})})});let D=document.querySelector("[data-url]").dataset.url;const E=document.querySelector(".copy-element"),S=document.querySelector(".tct-share-link-success");E&&E.addEventListener("click",()=>{navigator.clipboard.writeText("https://thomascook.com"+D),S.style.display="block",setTimeout(()=>{S.style.display="none"},1e3)});const $=document.querySelector("[data-open-modal]"),C=document.querySelector("[data-close-modal]"),A=document.querySelector("[data-modal]"),F=document.querySelector("[data-open-share]"),L=document.querySelector("[data-modal-share]"),R=document.querySelector(".tct-email-field"),j=document.querySelector("[data-close-share]");F&&F.addEventListener("click",()=>{L.showModal(),R.blur(),document.querySelector("body").classList.add("modal-open")}),$&&$.addEventListener("click",()=>{A.showModal(),document.querySelector("body").classList.add("modal-open")}),C&&C.addEventListener("click",()=>{document.querySelector("body").classList.remove("modal-open"),A.close()}),j&&j.addEventListener("click",()=>{document.querySelector("body").classList.remove("modal-open"),L.close()}),A&&A.addEventListener("click",e=>{const t=A.getBoundingClientRect();(e.clientXt.right||e.clientYt.bottom)&&(document.querySelector("body").classList.remove("modal-open"),A.close())}),L&&L.addEventListener("click",e=>{const t=L.getBoundingClientRect();(e.clientXt.right||e.clientYt.bottom)&&(document.querySelector("body").classList.remove("modal-open"),L.close())});const P=document.querySelector(".gallery-next"),I=document.querySelector(".gallery-prev"),T=document.querySelector(".accom-gallery");let O=0;function V(){[...T.children].map(e=>{e.style.opacity=0,e.style.zIndex=0})}P&&P.addEventListener("click",(function(){V(),O=O0?O-1:T.children.length-1,T.children[O].style.zIndex=1,T.children[O].style.opacity=1})),T&&T.addEventListener("touchstart",(function(e){const t=[e.changedTouches[0].clientX,e.changedTouches[0].clientY],o=(new Date).getTime();H=t,U=o})),T&&T.addEventListener("touchend",(function(e){const t=[e.changedTouches[0].clientX,e.changedTouches[0].clientY],o=(new Date).getTime(),s=[t[0]-H[0],t[1]-H[1]];o-U<1e3&&Math.abs(s[0])>30&&Math.abs(s[0])>Math.abs(3*s[1])&&(s[0]<0?(V(),O=O0?O-1:T.children.length-1,T.children[O].style.zIndex=1,T.children[O].style.opacity=1))}));let U,H=[];const q=document.querySelector(".tct-scrollable-panel-row"),N=[...document.querySelectorAll(".tct-scrollable-panel-item")],M=[...document.querySelectorAll(".tct-scrollable-column")];let B,W=0;N&&N.map((e,t)=>e.addEventListener("click",()=>{B>=0&&B!==t&&(N[B].classList.remove("active"),M[B].classList.remove("opened")),B=t,e.classList.add("active"),M[t].classList.add("opened");const o=N.indexOf(document.querySelector(".tct-scrollable-panel-item.active"));o>W?q.scrollBy(50*o,0):0===o?q.scrollBy(-50,0):q.scrollBy(-50*o,0),W=o})),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".accom-gallery-cell img").removeAttribute("loading"),setTimeout(()=>{const e=document.querySelector("#flightTab"),t=document.querySelector("#hotelTab");t&&t.addEventListener("click",()=>{let e=location.href.split("?")[0];window.history.pushState("object",document.title,e)}),e&&e.addEventListener("click",()=>{let e=location.href.split("?")[0];window.history.pushState("object",document.title,e)})},500)}),window.onload=e=>{N[0].click()}}()},,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,o){o(51),e.exports=o(52)},function(e,t,o){"use strict";o.r(t);o(14),o(19),o(6),o(7),o(9),o(25),o(11)},function(e,t,o){}]);