1"use strict";(self.webpackChunkrendezvoushotels=self.webpackChunkrendezvoushotels||[]).push([[5775],{15775:function(e,n,t){t.r(n),t.d(n,{default:function(){return i}});var o=t(67294),a="banner-module--banner--ac355",l="banner-module--modal--5cec0",r=t(38804);function i(e){var n,t,i,s,p,c,m;let{data:d,...u}=e;const{0:b,1:k}=(0,o.useState)({[`banner_modal${u.pk}`]:!1}),{0:v,1:g}=(0,o.useState)(!0),E=(0,o.useRef)(null);(0,o.useEffect)((()=>{if(!v&&"top"===d.options.position){const e=E.current,n=document.getElementById("menu-nav");n&&(n.style.marginTop=`${e.offsetHeight}px`)}return()=>{const e=document.getElementById("menu-nav");e&&e.style.removeProperty("margin-top"),document.body.classList.remove("no-scroll")}}),[v]),(0,o.useEffect)((()=>{if("undefined"==typeof window||d.disabled)return;let e=!1;u.display_on&&(u.display_on.length?(!u.display_on.includes("d")&&window.innerWidth>1023||!u.display_on.includes("t")&&window.innerWidth>768&&window.innerWidth<=1023||!u.display_on.includes("m")&&window.innerWidth<=768)&&(e=!0):e=!0);const n=sessionStorage.getItem(`tfe-banner${u.pk}`);n&&(new Date(n)>new Date?e=!0:sessionStorage.removeItem(`tfe-banner${u.pk}`)),(0,o.startTransition)((()=>g(e)))}),[]);const $=e=>(0,o.startTransition)((()=>{var n;(k({...b,[`banner_modal${u.pk}`]:e}),e)||(g(!0),null!==(n=d.options)&&void 0!==n&&n.displayFrequency&&sessionStorage.setItem(`tfe-banner${u.pk}`,new Date(Date.now()+60*d.options.displayFrequency*60*1e3).toISOString()))})),h=(e,n)=>(e.page_slug||e.external_link||(e.onClick=e=>{e.stopPropagation(),e.preventDefault(),$(n)}),e);return v?null:o.createElement("div",{className:`banner-container${u.pk}`},o.createElement("div",{ref:E,className:`${a} tfe-banner ${null!==(n=u.className)&&void 0!==n?n:""} position-${d.options.position}`},o.createElement("button",{className:"banner-close",onClick:()=>$(!1)},o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("g",{id:"Icon"},o.createElement("path",{id:"Path-2",d:"M2 22L22 2",stroke:"var(--color-black)",strokeWidth:"1.5"}),o.createElement("path",{id:"Path-2_2",d:"M22 22L2 2",stroke:"var(--color-black)",strokeWidth:"1.5"})))),o.createElement("div",{className:"banner-content"},!!d.image&&o.createElement("div",{className:"cover"},o.createElement(r.Ee,d.image)),o.createElement("div",{className:"banner-text"},!!d.title&&o.createElement(r.Dx,d.title),!!d.text&&o.createElement(r.xv,d.text),null===(t=d.links)||void 0===t?void 0:t.map(((e,n)=>o.createElement(r.rU,Object.assign({key:`bannermodal${u.pk}-${n}`,className:"link2"},h(e,!0))))),!!d.button&&o.createElement(r.zx,Object.assign({className:null!==(i=null===(s=d.button.data)||void 0===s?void 0:s.class)&&void 0!==i?i:"btn btn-primary"},d.button,{onClick:()=>d.popup?(0,o.startTransition)((()=>k({...b,[`banner_modal${u.pk}`]:!0}))):null}))," "))),o.createElement("style",null,`\n ${d.options.textColor?`.banner-container${u.pk} p,.banner-container${u.pk} h2,.banner-container${u.pk} h3{color: ${d.options.textColor} !important;}.banner-container${u.pk} .banner-close svg path{stroke: ${d.options.textColor}}`:""}\n ${d.options.linkColor?`.banner-container${u.pk} a{color: ${d.options.linkColor} !important;}`:""}\n ${d.options.backgroundColor?`.${a}{background-color: ${d.options.backgroundColor} !important;}.banner-modal${u.pk}{background-color: ${d.options.backgroundColor} !important;}`:""}\n `),!!d.popup&&o.createElement(r.u_,{className:`${l} banner-modal${u.pk}`,modalId:`bannerModal${u.pk}`,show:b[`banner_modal${u.pk}`],closeIcon:{icon:"close",group:"GLO"},closeWidth:16,closeHeight:16,setShowModal:(e,n)=>$(n)},o.createElement("div",{className:`popup img-${d.options.popup.imagePosition}`},!!d.popup.image&&o.createElement("div",{className:"cover"},o.createElement(r.Ee,d.popup.image)),o.createElement("div",{className:"popup-text"},!!d.popup.title&&o.createElement(r.Dx,d.popup.title),!!d.popup.text&&o.createElement(r.xv,d.popup.text),o.createElement("ul",{className:"popup-links"},null===(p=d.popup.links)||void 0===p?void 0:p.map(((e,n)=>o.createElement("li",{key:`bannermodalpopup${u.pk}-${n}`},o.createElement(r.rU,Object.assign({className:"link2"},h(e,!1)))))),!!d.popup.button&&o.createElement("li",null,o.createElement(r.zx,Object.assign({className:null!==(c=null===(m=d.popup.button.data)||void 0===m?void 0:m.class)&&void 0!==c?c:"primary"},d.popup.button,{onClick:()=>$(!1)}))),o.createElement("li",null,o.createElement("button",{className:"primary",onClick:()=>$(!1)},"Close")))))))}}}]); 2//# sourceMappingURL=5775-85f7ccfb3536936c4646.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.