@influence-society-web/deshotelsetdesiles 4.2.7 → 4.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";(()=>{var V=Object.defineProperty;var J=(s,e,t)=>e in s?V(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var D=(s,e,t)=>(J(s,typeof e!="symbol"?e+"":e,t),t);var l="data",f={startingPriceList:`[${l}=starting-price-list]`,price:`[${l}=price]`,discount:`[${l}=discount]`,discountContainer:`[${l}=discount-container]`,currency:`[${l}=currency]`,beHid:`[${l}-be-hid]`,destination:`[${l}=destination]`,offersList:`[${l}=offers-list]`,offerSlugDetail:`[${l}=offer-slug-detail], [data-offer-slug-detail]`,offerSlugOthersList:`[${l}=offer-slug-others-list], [data-offer-slug-others-list]`,offerSlugOthersList2:`[${l}=offer-slug-others-list2], [data-offer-slug-others-list2]`,offerSlugOthersList3:`[${l}=offer-slug-others-list3], [data-offer-slug-others-list3]`,offerSlugOthersListItem:".offer-others_item",offersMoreWrapper:`[${l}=offers-more-wrapper]`,offerOthersTabsMenu:".offer-others_tabs-menu",offerOthersTabLink:".offer-others_tab-link",offerOthersTabPane:".offer-others_tab-pane",offersListContainer:`[${l}=offers-list-container]`,listItem:`[${l}=list-item]`,image:`[${l}=image]`,name:`[${l}=name]`,description:`[${l}=description]`,hotelName:`[${l}=hotel-name]`,hotelLink:`[${l}=hotel-link]`,hotelStartingPriceContainer:`[${l}=hotel-starting-price-container]`,moreDetails:`[${l}=more-details]`,offersPopup:`[${l}=offers-popup]`,offersPopupClose:`[${l}=close-btn]`,hotelReserveLink:`[${l}=hotel-reserve-link]`,hotelVillaReserveLink:`[${l}=hotel-villa-reserve-link]`,hotelURLS:`[${l}=hotel-urls]`,languageDropdown:`[${l}=language-dropdown]`,selectedLanguage:`[${l}=selected-language]`,loadingSpinner:`[${l}=loading-spinner]`,cmsFilterEmptyState:"[fs-cmsfilter-element=empty]",startingfromItem:s=>`[${l}-be-hid=${s}]`,popupOverlay:"[fs-smartlightbox-element=trigger-close]"};var L={en:"Guadeloupe Islands",fr:"Les \xCEles de Guadeloupe",es:"Las islas de Guadalupe",it:"Le isole della Guadalupa"},R={en:"La Dominique",fr:"La Dominique",es:"Dominica",it:"Dominica"},O={en:"Saint Lucia",fr:"Sainte-Lucie",es:"Santa Luc\xEDa",it:"Santa Lucia"},X={en:"Martinique",fr:"Martinique",es:"Martinica",it:"Martinica"},S={en:"Mauritius",fr:"\xCEle Maurice",es:"Mauricio",it:"Mauritius"},w={en:"Saint Martin",fr:"Saint-Martin",es:"Saint-Martin",it:"Saint Martin"},$={en:"Antigua",fr:"Antigua",es:"Antigua",it:"Antigua"},ee={en:"Anguilla",fr:"Anguilla",es:"Anguila",it:"Anguilla"},M={gpgos12767:{destination:L,slug:"/hotels-et-villas/creole-beach-hotel-spa",codeIPlanet:"FRAN414",cmsId:"67c809b5f63deab8a71cf8e9"},gptro12772:{destination:L,slug:"/hotels-et-villas/le-jardin-malanga",codeIPlanet:"FRAN416",cmsId:"67c809b5f63deab8a71cf90d"},gpsai12770:{destination:L,slug:"/hotels-et-villas/la-toubana-hotel-spa",codeIPlanet:"FRAN411",cmsId:"67c809b5f63deab8a71cf8ef"},gpgos12769:{destination:L,slug:"/hotels-et-villas/mahogany-hotel-residence-spa",codeIPlanet:"FRAN423",cmsId:"67c809b5f63deab8a71cf91f"},gpgua27143:{destination:L,slug:"/hotels-et-villas/langley-resort-fort-royal",codeIPlanet:"GPAN32",cmsId:"67c809b5f63deab8a71cf8f0"},mqros18592:{destination:R,slug:"/hotels-et-villas/jungle-bay-dominica",codeIPlanet:"DMAN1",cmsId:"67c809b5f63deab8a71cf8ed"},dmtib00001:{destination:R,slug:"/hotels-et-villas/secret-bay-dominique",codeIPlanet:"DMAN2",cmsId:"67c809b5f63deab8a71cfefd"},agste21689:{destination:O,slug:"/hotels-et-villas/jade-mountain",codeIPlanet:"AGAN6",cmsId:"67c809b5f63deab8a71cf92a"},zzzzz25376:{destination:O,slug:"/hotels-et-villas/windjammer-landing",codeIPlanet:"LCAN4",cmsId:"67c809b5f63deab8a71cf92b"},lcgro30400:{destination:O,slug:"/hotels-et-villas/cap-maison",codeIPlanet:"LCLC8",cmsId:"67c809b5f63deab8a71cf929"},agste21688:{destination:O,slug:"/hotels-et-villas/anse-chastanet",codeIPlanet:"AGAN5",cmsId:"67c809b5f63deab8a71cf928"},mqsai18593:{destination:X,slug:"/hotels-et-villas/plein-soleil",codeIPlanet:"MQAN16",cmsId:"67c809b5f63deab8a71cf925"},zzzzz25378:{destination:S,slug:"/hotels-et-villas/shanti-maurice",codeIPlanet:"MUAN22",cmsId:"67c809b5f63deab8a71cf933"},zzzzz25377:{destination:S,slug:"/hotels-et-villas/lux-le-morne",codeIPlanet:"MUAN21",cmsId:"67c809b5f63deab8a71cf931"},zzzzz25379:{destination:S,slug:"/hotels-et-villas/constance-belle-mare-plage",codeIPlanet:"MUAN20",cmsId:"67c809b5f63deab8a71cf92f"},mupos25678:{destination:S,slug:"/hotels-et-villas/constance-le-prince-maurice",codeIPlanet:"MUAN24",cmsId:"67c809b5f63deab8a71cf930"},zzzzz25380:{destination:S,slug:"/hotels-et-villas/anahita-the-resort",codeIPlanet:"MUAN19",cmsId:"67c809b5f63deab8a71cf92e"},agstm21687:{destination:w,slug:"/hotels-et-villas/la-samanna",codeIPlanet:"FRAN2350",cmsId:"67c809b5f63deab8a71cf926"},frsai31536:{destination:w,slug:"/hotels-et-villas/le-grand-case-beach-club",codeIPlanet:"FRFRA3",cmsId:"67c809b5f63deab8a71cf927"},ageng20433:{destination:$,slug:"/hotels-et-villas/the-inn-at-english-harbour",codeIPlanet:"AGAN4",cmsId:"67c809b5f63deab8a71cf8ec"},agcro20496:{destination:$,slug:"/hotels-et-villas/blue-waters",codeIPlanet:"AGAN1",cmsId:"67c809b5f63deab8a71cf8eb"},gpang25884:{destination:ee,slug:"/hotels-et-villas/aurora-anguilla-resort-golf-club",codeIPlanet:"GPAN30",cmsId:"67c809b5f63deab8a71cf8ea"}},F={AED:"\u062F.\u0625.",AFN:"Af",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"AR$",AUD:"AU$",AWG:"\u0192",AZN:"\u043C\u0430\u043D",BAM:"KM",BBD:"BBD$",BDT:"\u09F3",BGN:"\u043B\u0432.",BHD:"BD",BIF:"FBu",BMD:"$",BND:"B$",BOB:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"BZ$",CAD:"CA$",CDF:"FC",CHF:"Fr.",CKD:"$",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CUC:"CUC$",CUP:"$MN",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr.",DOP:"RD$",DZD:"DA",EGP:"E\xA3",EHP:"Ptas.",ERN:"Nkf",ETB:"Br",EUR:"\u20AC",FJD:"FJ$",FKP:"FK\xA3",FOK:"kr",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"G$",HKD:"HK$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"Rs.",IQD:"\u062F.\u0639.",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u0441",KHR:"\u17DB",KID:"$",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"CI$",KZT:"\u20B8",LAK:"\u20ADN",LBP:"LL.",LKR:"Rs.",LRD:"L$",LSL:"L",LYD:"LD",MAD:"DH",MDL:"L",MGA:"Ar",MKD:"den",MMK:"Ks",MNT:"\u20AE",MOP:"MOP$",MRU:"UM",MUR:"Rs.",MVR:"MRf",MWK:"MK",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"Rs.",NZD:"NZ$",OMR:"OR",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"Rs.",PLN:"z\u0142",PND:"$",PRB:"\u0440.",PYG:"\u20B2",QAR:"QR",RON:"L",RSD:"din",RUB:"\u20BD",RWF:"FRw",SAR:"SR",SBD:"SI$",SCR:"Rs.",SDG:"\xA3SD",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SLS:"Sl",SOS:"Sh.So.",SRD:"Sr$",SSP:"SS\xA3",STN:"Db",SVC:"\u20A1",SYP:"LS",SZL:"L",THB:"\u0E3F",TJS:"SM",TMT:"m.",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYU:"$U",UZS:"\u0441\u0443\u043C",VED:"Bs.",VES:"Bs.F",VND:"\u20AB",VUV:"VT",WST:"T",XAF:"Fr",XCD:"$",XOF:"\u20A3",XPF:"\u20A3",YER:"YR",ZAR:"R",ZMW:"ZK",ZWB:"",ZWL:"Z$",Abkhazia:"",Artsakh:"\u0564\u0580."},z={it:"it_IT",es:"es_ES",fr:"fr_FR",en:"en_GB"};var G={"/thematiques/sejour-en-famille":"67c809b5f63deab8a71cf936","/en/themes/family-stay":"67c809b5f63deab8a71cf936","/es/temas/estancia-en-familia":"67c809b5f63deab8a71cf936","/it/temi/soggiorno-in-famiglia":"67c809b5f63deab8a71cf936","/thematiques/voyages-de-noces":"67c809b5f63deab8a71cfb33","/en/themes/honeymoons":"67c809b5f63deab8a71cfb33","/es/temas/lunas-de-miel":"67c809b5f63deab8a71cfb33","/it/temi/lune-di-miele":"67c809b5f63deab8a71cfb33","/thematiques/paradis-des-golfeurs":"67c809b5f63deab8a71cfb32","/en/themes/a-golfer-s-paradise":"67c809b5f63deab8a71cfb32","/es/temas/el-paraiso-del-golfista":"67c809b5f63deab8a71cfb32","/it/temi/un-paradiso-per-i-golfisti":"67c809b5f63deab8a71cfb32","/thematiques/all-inclusives":"67c809b5f63deab8a71cf934","/en/themes/all-inclusives":"67c809b5f63deab8a71cf934","/es/temas/todo-incluido":"67c809b5f63deab8a71cf934","/it/temi/tutto-compreso":"67c809b5f63deab8a71cf934","/thematiques/escapade-spa-bien-etre":"67c809b5f63deab8a71cf935","/en/themes/wellness-spa-getaway":"67c809b5f63deab8a71cf935","/es/temas/escapada-spa-bienestar":"67c809b5f63deab8a71cf935","/it/temi/soggiorno-benessere-alle-terme":"67c809b5f63deab8a71cf935","/thematiques/activites-et-loisirs":"67c809b5f63deab8a71cfcb4","/en/themes/leisure-activities":"67c809b5f63deab8a71cfcb4","/es/temas/actividades-y-ocio":"67c809b5f63deab8a71cfcb4","/it/temi/attivita-e-tempo-libero":"67c809b5f63deab8a71cfcb4","/thematiques/plongee-sous-marine":"67c809b5f63deab8a71cf937","/en/themes/scuba-diving":"67c809b5f63deab8a71cf937","/es/temas/submarinismo":"67c809b5f63deab8a71cf937","/it/temi/immersione-subacquea":"67c809b5f63deab8a71cf937","/thematiques/roadtrip":"67c809b5f63deab8a71cfb34","/en/themes/roadtrip":"67c809b5f63deab8a71cfb34","/es/temas/viaje-por-carretera":"67c809b5f63deab8a71cfb34","/it/temi/viaggio-in-auto":"67c809b5f63deab8a71cfb34","/thematiques/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/en/themes/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/es/temas/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/it/temi/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/thematiques/ponts-du-mois-de-mai":"69b7d869ecee16ecb87f202b","/en/themes/ponts-du-mois-de-mai":"69b7d869ecee16ecb87f202b","/es/temas/ponts-du-mes-de-mayo":"69b7d869ecee16ecb87f202b","/it/temi/ponti-del-mese-di-maggio":"69b7d869ecee16ecb87f202b"},I="https://deshotelsetdesiles.ccordier.workers.dev/v2/",k="https://deshotelsetdesiles.i-planet.fr/dhdi-public/searchform.cgi",y="FR",_="1*q1lzz9*_gcl_au*MTMyMzcyMDY5NC4xNzM5Mjg5MzYx*_ga*NTAxMzI1MzMwLjE3MzkyODkzNjE.*_ga_Q0RXHLR7D4*MTczOTI5NzEzNC4zLjAuMTczOTI5NzE3Mi4yMi4wLjA.";var U=async()=>new Promise(s=>{geoip2.country(e=>{s(e.country.iso_code)},()=>{s(y)})});var v=s=>{let e="?";for(let[t,r]of Object.entries(s))r&&(e+=`${t}=${r}&`);return e};var A=class{async getGroupOffersData(e){let t=I+"groupOffers"+v(e),a=await(await fetch(t)).json();return a.error||!a.data?null:a}async getSingleHotelOffersData(e){let t=I+"offers"+v(e),a=await(await fetch(t)).json();return a.error||!a.data?null:a}async getCMSOffers(){let e=I+"cmsOffers",r=await(await fetch(e)).json();return r.items?r:null}async getCountries(){let e=I+"cmsCountries",r=await(await fetch(e)).json();return r.items?r:null}};var B=()=>{let s=x();if(!s){let e=localStorage.getItem("wglang")||"fr";window.Weglot.switchTo(e)}window.Weglot.on("languageChanged",()=>{if(s)window.location.reload();else{let e=window.Weglot.getCurrentLang();localStorage.setItem("wglang",e),window.loadFromServer&&window.loadFromServer()}})},x=()=>window.location.hostname!=="deshotelsetdesiles.webflow.io",K=()=>{let s=E();return z[s]},E=()=>{if(!x())return localStorage.getItem("wglang")||"fr";try{let s=window.Weglot.getCurrentLang();if(s)return s}catch(s){return console.error("Error getting language",s),"fr"}return"fr"},te=()=>!window.location.hostname.includes("webflow.io");function Y(s){if(!te())return`/offers/${s}`;let e=E();return!e||e==="fr"?`/offers/${s}`:`/${e}/offers/${s}`}var j=()=>{let s={};return Object.entries(M).forEach(([e,t])=>{s[t.cmsId]=e}),s},p=(s,e)=>`${s.toLowerCase().trim()}-${e.toLowerCase().trim()}`,W=(s,e,t)=>{let r=E().toUpperCase(),a=M[e].codeIPlanet.toUpperCase(),i=`${k}?Lang=${r}&currency=${s.toUpperCase()}&HotelCode=${a}`,o=q("_ga"),n=_,d=q("_gcl_au");return i+=`&_ga=${o}&_gl=${n}&_gcl_au=${d}`,t&&(i=`${i}&HotelPromo=${t}`),i},q=s=>{let e=document.cookie.match(new RegExp("(^| )"+s+"=([^;]+)"));return e?e[2]:null};var Z=(s,e,t,r)=>{let{quotation:a,rate:{distribution:i}}=e,{pricePerNight:o,currency:n,plainBookLink:d}=a,{accessCode:m}=i||{},g="";m&&m.length>0&&([g]=m),se(s,o,n);let h=s.querySelector(f.hotelReserveLink);h&&h.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),window.open(d,"_blank")});let c=s.querySelector(f.hotelVillaReserveLink);if(c&&c.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),window.open(W(n,t,g),"_blank")}),r){let{fieldData:{"discount-percentage":u}}=r,b=s.querySelector(f.discount);b&&u&&(b.innerHTML=`-${u}%`);let C=s.querySelector(f.discountContainer);C&&!u&&(C.style.display="none")}},se=(s,e,t)=>{let r=s.querySelector(f.price);r&&(r.innerHTML=Math.floor(e).toString());let a=s.querySelector(f.currency);a&&(a.innerHTML=F[t])};var H=class{constructor(e,t){this.listInstance=e;this.itemTemplateElement=t;D(this,"loadingSpinner");D(this,"cmsFilterEmptyState");D(this,"offerLookup",{});D(this,"apiClient",new A);D(this,"countryCode");D(this,"availableCountries",{});D(this,"countryCodeFilter",e=>{let{fieldData:t}=e;return!t["supported-countries"]||t["supported-countries"].length===0?!0:t["supported-countries"].map(a=>this.availableCountries[a]).includes(this.countryCode)});this.cmsFilterEmptyState=document.querySelector(f.cmsFilterEmptyState),this.cmsFilterEmptyState&&this.cmsFilterEmptyState.classList.add("hide-empty-state"),e.clearItems(),B(),this.loadingSpinner=document.querySelector(f.loadingSpinner),this.countryCode=y}async getGroupOffers(e){let{clearItems:t=!0,filter:r}=e||{};t&&this.listInstance.clearItems();let a=await this.apiClient.getCMSOffers();if(!a)return;let i=await this.apiClient.getCountries();if(!i)return;i.items.forEach(b=>{this.availableCountries[b.id]=b.fieldData.title?.trim()}),this.countryCode=await U();let o=a.items.filter(r).filter(this.countryCodeFilter),n=this.generateHotelIds(o),d=this.generateHotelIds(o).join(","),m=n.length===1;m&&(d=[d,d].join(","));let{offerMetaData:g}=this.generateOfferData(o),h=K(),c=await this.apiClient.getGroupOffersData({hids:d,locale:h});if(!c||c.error||!c.data){this.hideSpinnerAndShowFilter();return}m&&(c.data=[c.data[0]]);let u=this.getAllOffers(c,g);this.addHotelToCollection(u),this.hideSpinnerAndShowFilter()}async getGroupCategoryOffers(e,t=!1){let r=a=>{let{isArchived:i,isDraft:o,fieldData:n}=a;return i||o?!1:t?(!n.thematiques||n.thematiques.length===0)&&!n.slug.includes("derniere-minute")&&!n.slug.includes("reservez-tot"):n.category===e};await this.getGroupOffers({filter:r})}async getGroupThemeOffers(e){let t=r=>{let{isArchived:a,isDraft:i,fieldData:o}=r;return a||i||!o.thematiques?!1:o.thematiques.includes(e)};await this.getGroupOffers({filter:t})}async getGroupOtherThemedOffers(e){let t=r=>{let{isArchived:a,isDraft:i,fieldData:o}=r;return a||i||o.slug===e?!1:Array.isArray(o.thematiques)&&o.thematiques.length>0};await this.getGroupOffers({filter:t})}async getGroupSlugOffers(e){let t=r=>{let{isArchived:a,isDraft:i,fieldData:o}=r;return a||i?!1:o.slug===e};await this.getGroupOffers({filter:t})}async getGroupOtherOffers(e,t){let r=a=>{let{isArchived:i,isDraft:o,fieldData:n}=a;return i||o||n.slug===e?!1:t?n.category===t:(!n.thematiques||n.thematiques.length===0)&&!n.slug.includes("derniere-minute")&&!n.slug.includes("reservez-tot")};await this.getGroupOffers({filter:r})}hideSpinnerAndShowFilter(){this.loadingSpinner&&(this.loadingSpinner.style.display="none"),this.cmsFilterEmptyState&&this.cmsFilterEmptyState.classList.remove("hide-empty-state")}generateHotelIds(e){let t=[],r=j();return e.forEach(a=>{let{fieldData:{"hotel-villa":i}}=a;t.push(r[i])}),Array.from(new Set(t))}getAllOffers(e,t){let r=[];return e.data.forEach(a=>{let{prop:{hid:i},rates:o}=a;o.forEach(n=>{let{name:d,title:m}=n.rate;(t.includes(p(i,d))||t.includes(p(i,m)))&&r.push({...a,rates:[n]})})}),r.sort((a,i)=>{let o=this.offerLookup[p(a.prop.hid,a.rates[0].rate.title)]||this.offerLookup[p(a.prop.hid,a.rates[0].rate.name)],n=this.offerLookup[p(i.prop.hid,i.rates[0].rate.title)]||this.offerLookup[p(i.prop.hid,i.rates[0].rate.name)],d=Number(o.fieldData.order)||0,m=Number(n.fieldData.order)||0;return d-m}),r}generateOfferData(e){let t=[];return e.forEach(r=>{let{fieldData:{"hotel-or-property-api-id":a,"offer-api-name":i}}=r,o=p(a,i);t.push(o),this.offerLookup[o]=r}),{offerMetaData:t}}addHotelToCollection(e){for(let{prop:t,rates:r}of e){let a=r.map(i=>this.createItem(t,i,this.itemTemplateElement));this.listInstance.addItems(a)}}createItem(e,t,r){let{rate:a}=t,{hid:i,title:o,property:n}=e,{image:d,title:m,name:g}=a,h=this.offerLookup[p(i||n,m)]||this.offerLookup[p(i||n,g)],c=r.cloneNode(!0),u=M[i||n];if(!u)return c;let{destination:b,slug:C}=u;this.bindOffersMetaData(c,{destination:b,image:d,hotelName:o,title:m,slug:C}),Z(c,t,i,h);let N=this.getOffersCmsSlug(i,n,g);if(N){let T=c.querySelector(f.moreDetails),P=T instanceof HTMLAnchorElement?T:T?.querySelector("a")||T?.closest("a");P&&(P.href=Y(N))}return c.style.display="flex",c}getOffersCmsSlug(e,t,r){return this.offerLookup[p(e||t,r)]?.fieldData.slug}bindOffersMetaData(e,{destination:t,image:r,hotelName:a,title:i,slug:o,description:n}){let d=e.querySelector(f.destination),m=e.querySelector(f.image),g=e.querySelector(f.hotelName),h=e.querySelector(f.name),c=e.querySelector(f.description),u=e.querySelector(f.hotelLink),b=E();d&&(d.textContent=t[b]),m&&(m.src=r?.url),g&&(g.innerHTML=a),h&&(h.innerHTML=i),c&&n&&(c.innerHTML=n),u&&o&&u.addEventListener("click",()=>{window.location.href=o})}};var Q=s=>{let[e]=s.items;if(!e)throw new Error("No items found in the list instance");let t=e.element;return new H(s,t)};window.fsAttributes=window.fsAttributes||[];window.loadFromServer=()=>{window.fsAttributes.push(["cmsload",async s=>{let e=Q(s[0]),t=window.location.pathname;await e.getGroupThemeOffers(G[t])}])};window.loadFromServer();})();
1
+ "use strict";(()=>{var ee=Object.defineProperty;var te=(s,e,t)=>e in s?ee(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var D=(s,e,t)=>(te(s,typeof e!="symbol"?e+"":e,t),t);var l="data",f={startingPriceList:`[${l}=starting-price-list]`,price:`[${l}=price]`,discount:`[${l}=discount]`,discountContainer:`[${l}=discount-container]`,currency:`[${l}=currency]`,beHid:`[${l}-be-hid]`,destination:`[${l}=destination]`,offersList:`[${l}=offers-list]`,offerSlugDetail:`[${l}=offer-slug-detail], [data-offer-slug-detail]`,offerSlugOthersList:`[${l}=offer-slug-others-list], [data-offer-slug-others-list]`,offerSlugOthersList2:`[${l}=offer-slug-others-list2], [data-offer-slug-others-list2]`,offerSlugOthersList3:`[${l}=offer-slug-others-list3], [data-offer-slug-others-list3]`,offerSlugOthersListItem:".offer-others_item",offersMoreWrapper:`[${l}=offers-more-wrapper]`,offerOthersTabsMenu:".offer-others_tabs-menu",offerOthersTabLink:".offer-others_tab-link",offerOthersTabPane:".offer-others_tab-pane",offersListContainer:`[${l}=offers-list-container]`,listItem:`[${l}=list-item]`,image:`[${l}=image]`,name:`[${l}=name]`,description:`[${l}=description]`,hotelName:`[${l}=hotel-name]`,hotelLink:`[${l}=hotel-link]`,hotelStartingPriceContainer:`[${l}=hotel-starting-price-container]`,moreDetails:`[${l}=more-details]`,offersPopup:`[${l}=offers-popup]`,offersPopupClose:`[${l}=close-btn]`,hotelReserveLink:`[${l}=hotel-reserve-link]`,hotelVillaReserveLink:`[${l}=hotel-villa-reserve-link]`,hotelURLS:`[${l}=hotel-urls]`,languageDropdown:`[${l}=language-dropdown]`,selectedLanguage:`[${l}=selected-language]`,loadingSpinner:`[${l}=loading-spinner]`,cmsFilterEmptyState:"[fs-cmsfilter-element=empty]",startingfromItem:s=>`[${l}-be-hid=${s}]`,popupOverlay:"[fs-smartlightbox-element=trigger-close]"};var S={en:"Guadeloupe Islands",fr:"Les \xCEles de Guadeloupe",es:"Las islas de Guadalupe",it:"Le isole della Guadalupa"},R={en:"La Dominique",fr:"La Dominique",es:"Dominica",it:"Dominica"},O={en:"Saint Lucia",fr:"Sainte-Lucie",es:"Santa Luc\xEDa",it:"Santa Lucia"},se={en:"Martinique",fr:"Martinique",es:"Martinica",it:"Martinica"},M={en:"Mauritius",fr:"\xCEle Maurice",es:"Mauricio",it:"Mauritius"},$={en:"Saint Martin",fr:"Saint-Martin",es:"Saint-Martin",it:"Saint Martin"},z={en:"Antigua",fr:"Antigua",es:"Antigua",it:"Antigua"},re={en:"Anguilla",fr:"Anguilla",es:"Anguila",it:"Anguilla"},I={gpgos12767:{destination:S,slug:"/hotels-et-villas/creole-beach-hotel-spa",codeIPlanet:"FRAN414",cmsId:"67c809b5f63deab8a71cf8e9"},gptro12772:{destination:S,slug:"/hotels-et-villas/le-jardin-malanga",codeIPlanet:"FRAN416",cmsId:"67c809b5f63deab8a71cf90d"},gpsai12770:{destination:S,slug:"/hotels-et-villas/la-toubana-hotel-spa",codeIPlanet:"FRAN411",cmsId:"67c809b5f63deab8a71cf8ef"},gpgos12769:{destination:S,slug:"/hotels-et-villas/mahogany-hotel-residence-spa",codeIPlanet:"FRAN423",cmsId:"67c809b5f63deab8a71cf91f"},gpgua27143:{destination:S,slug:"/hotels-et-villas/langley-resort-fort-royal",codeIPlanet:"GPAN32",cmsId:"67c809b5f63deab8a71cf8f0"},mqros18592:{destination:R,slug:"/hotels-et-villas/jungle-bay-dominica",codeIPlanet:"DMAN1",cmsId:"67c809b5f63deab8a71cf8ed"},dmtib00001:{destination:R,slug:"/hotels-et-villas/secret-bay-dominique",codeIPlanet:"DMAN2",cmsId:"67c809b5f63deab8a71cfefd"},agste21689:{destination:O,slug:"/hotels-et-villas/jade-mountain",codeIPlanet:"AGAN6",cmsId:"67c809b5f63deab8a71cf92a"},zzzzz25376:{destination:O,slug:"/hotels-et-villas/windjammer-landing",codeIPlanet:"LCAN4",cmsId:"67c809b5f63deab8a71cf92b"},lcgro30400:{destination:O,slug:"/hotels-et-villas/cap-maison",codeIPlanet:"LCLC8",cmsId:"67c809b5f63deab8a71cf929"},agste21688:{destination:O,slug:"/hotels-et-villas/anse-chastanet",codeIPlanet:"AGAN5",cmsId:"67c809b5f63deab8a71cf928"},mqsai18593:{destination:se,slug:"/hotels-et-villas/plein-soleil",codeIPlanet:"MQAN16",cmsId:"67c809b5f63deab8a71cf925"},zzzzz25378:{destination:M,slug:"/hotels-et-villas/shanti-maurice",codeIPlanet:"MUAN22",cmsId:"67c809b5f63deab8a71cf933"},zzzzz25377:{destination:M,slug:"/hotels-et-villas/lux-le-morne",codeIPlanet:"MUAN21",cmsId:"67c809b5f63deab8a71cf931"},zzzzz25379:{destination:M,slug:"/hotels-et-villas/constance-belle-mare-plage",codeIPlanet:"MUAN20",cmsId:"67c809b5f63deab8a71cf92f"},mupos25678:{destination:M,slug:"/hotels-et-villas/constance-le-prince-maurice",codeIPlanet:"MUAN24",cmsId:"67c809b5f63deab8a71cf930"},zzzzz25380:{destination:M,slug:"/hotels-et-villas/anahita-the-resort",codeIPlanet:"MUAN19",cmsId:"67c809b5f63deab8a71cf92e"},agstm21687:{destination:$,slug:"/hotels-et-villas/la-samanna",codeIPlanet:"FRAN2350",cmsId:"67c809b5f63deab8a71cf926"},frsai31536:{destination:$,slug:"/hotels-et-villas/le-grand-case-beach-club",codeIPlanet:"FRFRA3",cmsId:"67c809b5f63deab8a71cf927"},ageng20433:{destination:z,slug:"/hotels-et-villas/the-inn-at-english-harbour",codeIPlanet:"AGAN4",cmsId:"67c809b5f63deab8a71cf8ec"},agcro20496:{destination:z,slug:"/hotels-et-villas/blue-waters",codeIPlanet:"AGAN1",cmsId:"67c809b5f63deab8a71cf8eb"},gpang25884:{destination:re,slug:"/hotels-et-villas/aurora-anguilla-resort-golf-club",codeIPlanet:"GPAN30",cmsId:"67c809b5f63deab8a71cf8ea"}},F={AED:"\u062F.\u0625.",AFN:"Af",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"AR$",AUD:"AU$",AWG:"\u0192",AZN:"\u043C\u0430\u043D",BAM:"KM",BBD:"BBD$",BDT:"\u09F3",BGN:"\u043B\u0432.",BHD:"BD",BIF:"FBu",BMD:"$",BND:"B$",BOB:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"BZ$",CAD:"CA$",CDF:"FC",CHF:"Fr.",CKD:"$",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CUC:"CUC$",CUP:"$MN",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr.",DOP:"RD$",DZD:"DA",EGP:"E\xA3",EHP:"Ptas.",ERN:"Nkf",ETB:"Br",EUR:"\u20AC",FJD:"FJ$",FKP:"FK\xA3",FOK:"kr",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"G$",HKD:"HK$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"Rs.",IQD:"\u062F.\u0639.",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u0441",KHR:"\u17DB",KID:"$",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"CI$",KZT:"\u20B8",LAK:"\u20ADN",LBP:"LL.",LKR:"Rs.",LRD:"L$",LSL:"L",LYD:"LD",MAD:"DH",MDL:"L",MGA:"Ar",MKD:"den",MMK:"Ks",MNT:"\u20AE",MOP:"MOP$",MRU:"UM",MUR:"Rs.",MVR:"MRf",MWK:"MK",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"Rs.",NZD:"NZ$",OMR:"OR",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"Rs.",PLN:"z\u0142",PND:"$",PRB:"\u0440.",PYG:"\u20B2",QAR:"QR",RON:"L",RSD:"din",RUB:"\u20BD",RWF:"FRw",SAR:"SR",SBD:"SI$",SCR:"Rs.",SDG:"\xA3SD",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SLS:"Sl",SOS:"Sh.So.",SRD:"Sr$",SSP:"SS\xA3",STN:"Db",SVC:"\u20A1",SYP:"LS",SZL:"L",THB:"\u0E3F",TJS:"SM",TMT:"m.",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYU:"$U",UZS:"\u0441\u0443\u043C",VED:"Bs.",VES:"Bs.F",VND:"\u20AB",VUV:"VT",WST:"T",XAF:"Fr",XCD:"$",XOF:"\u20A3",XPF:"\u20A3",YER:"YR",ZAR:"R",ZMW:"ZK",ZWB:"",ZWL:"Z$",Abkhazia:"",Artsakh:"\u0564\u0580."},G={it:"it_IT",es:"es_ES",fr:"fr_FR",en:"en_GB"};var k={"/thematiques/sejour-en-famille":"67c809b5f63deab8a71cf936","/en/themes/family-stay":"67c809b5f63deab8a71cf936","/es/temas/estancia-en-familia":"67c809b5f63deab8a71cf936","/it/temi/soggiorno-in-famiglia":"67c809b5f63deab8a71cf936","/thematiques/voyages-de-noces":"67c809b5f63deab8a71cfb33","/en/themes/honeymoons":"67c809b5f63deab8a71cfb33","/es/temas/lunas-de-miel":"67c809b5f63deab8a71cfb33","/it/temi/lune-di-miele":"67c809b5f63deab8a71cfb33","/thematiques/paradis-des-golfeurs":"67c809b5f63deab8a71cfb32","/en/themes/a-golfer-s-paradise":"67c809b5f63deab8a71cfb32","/es/temas/el-paraiso-del-golfista":"67c809b5f63deab8a71cfb32","/it/temi/un-paradiso-per-i-golfisti":"67c809b5f63deab8a71cfb32","/thematiques/all-inclusives":"67c809b5f63deab8a71cf934","/en/themes/all-inclusives":"67c809b5f63deab8a71cf934","/es/temas/todo-incluido":"67c809b5f63deab8a71cf934","/it/temi/tutto-compreso":"67c809b5f63deab8a71cf934","/thematiques/escapade-spa-bien-etre":"67c809b5f63deab8a71cf935","/en/themes/wellness-spa-getaway":"67c809b5f63deab8a71cf935","/es/temas/escapada-spa-bienestar":"67c809b5f63deab8a71cf935","/it/temi/soggiorno-benessere-alle-terme":"67c809b5f63deab8a71cf935","/thematiques/activites-et-loisirs":"67c809b5f63deab8a71cfcb4","/en/themes/leisure-activities":"67c809b5f63deab8a71cfcb4","/es/temas/actividades-y-ocio":"67c809b5f63deab8a71cfcb4","/it/temi/attivita-e-tempo-libero":"67c809b5f63deab8a71cfcb4","/thematiques/plongee-sous-marine":"67c809b5f63deab8a71cf937","/en/themes/scuba-diving":"67c809b5f63deab8a71cf937","/es/temas/submarinismo":"67c809b5f63deab8a71cf937","/it/temi/immersione-subacquea":"67c809b5f63deab8a71cf937","/thematiques/roadtrip":"67c809b5f63deab8a71cfb34","/en/themes/roadtrip":"67c809b5f63deab8a71cfb34","/es/temas/viaje-por-carretera":"67c809b5f63deab8a71cfb34","/it/temi/viaggio-in-auto":"67c809b5f63deab8a71cfb34","/thematiques/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/en/themes/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/es/temas/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/it/temi/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/thematiques/ponts-du-mois-de-mai":"69b7d869ecee16ecb87f202b","/en/themes/ponts-du-mois-de-mai":"69b7d869ecee16ecb87f202b","/es/temas/ponts-du-mes-de-mayo":"69b7d869ecee16ecb87f202b","/it/temi/ponti-del-mese-di-maggio":"69b7d869ecee16ecb87f202b"},E="https://deshotelsetdesiles.ccordier.workers.dev/v2/",_="https://deshotelsetdesiles.i-planet.fr/dhdi-public/searchform.cgi",y="FR",U="1*q1lzz9*_gcl_au*MTMyMzcyMDY5NC4xNzM5Mjg5MzYx*_ga*NTAxMzI1MzMwLjE3MzkyODkzNjE.*_ga_Q0RXHLR7D4*MTczOTI5NzEzNC4zLjAuMTczOTI5NzE3Mi4yMi4wLjA.";var q=async()=>new Promise(s=>{geoip2.country(e=>{s(e.country.iso_code)},()=>{s(y)})});var P=s=>{let e="?";for(let[t,r]of Object.entries(s))r&&(e+=`${t}=${r}&`);return e};var A=class{async getGroupOffersData(e){let t=E+"groupOffers"+P(e),a=await(await fetch(t)).json();return a.error||!a.data?null:a}async getSingleHotelOffersData(e){let t=E+"offers"+P(e),a=await(await fetch(t)).json();return a.error||!a.data?null:a}async getCMSOffers(){let e=E+"cmsOffers",r=await(await fetch(e)).json();return r.items?r:null}async getCountries(){let e=E+"cmsCountries",r=await(await fetch(e)).json();return r.items?r:null}};var x=()=>{let s=K();if(!s){let e=localStorage.getItem("wglang")||"fr";window.Weglot.switchTo(e)}window.Weglot.on("languageChanged",()=>{if(s)window.location.reload();else{let e=window.Weglot.getCurrentLang();localStorage.setItem("wglang",e),window.loadFromServer&&window.loadFromServer()}})},K=()=>window.location.hostname!=="deshotelsetdesiles.webflow.io",j=()=>{let s=L();return G[s]},L=()=>{if(!K())return localStorage.getItem("wglang")||"fr";try{let s=window.Weglot.getCurrentLang();if(s)return s}catch(s){return console.error("Error getting language",s),"fr"}return"fr"},Y=()=>!window.location.hostname.includes("webflow.io");function N(s){if(!Y())return`/offers/${s}`;let e=L();return!e||e==="fr"?`/offers/${s}`:`/${e}/offers/${s}`}function ae(s){if(!s||typeof s!="object")return null;let e=s;return e.to_words?.[0]?.w||e.words?.[0]?.w||null}async function W(s){let e=N(s);if(!Y())return e;let t=L();if(!t||t==="fr")return e;try{let r=`offers/${s}`,a=await window.Weglot.translate({words:[{t:1,w:r}],languageTo:t}),i=ae(a);if(!i)return e;let n=i.replace(/^\/+/,"");return n?n.startsWith(`${t}/`)?`/${n}`:`/${t}/${n}`:e}catch{return e}}var Z=()=>{let s={};return Object.entries(I).forEach(([e,t])=>{s[t.cmsId]=e}),s},p=(s,e)=>`${s.toLowerCase().trim()}-${e.toLowerCase().trim()}`,Q=(s,e,t)=>{let r=L().toUpperCase(),a=I[e].codeIPlanet.toUpperCase(),i=`${_}?Lang=${r}&currency=${s.toUpperCase()}&HotelCode=${a}`,n=B("_ga"),o=U,u=B("_gcl_au");return i+=`&_ga=${n}&_gl=${o}&_gcl_au=${u}`,t&&(i=`${i}&HotelPromo=${t}`),i},B=s=>{let e=document.cookie.match(new RegExp("(^| )"+s+"=([^;]+)"));return e?e[2]:null};var V=(s,e,t,r)=>{let{quotation:a,rate:{distribution:i}}=e,{pricePerNight:n,currency:o,plainBookLink:u}=a,{accessCode:m}=i||{},g="";m&&m.length>0&&([g]=m),ie(s,n,o);let h=s.querySelector(f.hotelReserveLink);h&&h.addEventListener("click",d=>{d.preventDefault(),d.stopPropagation(),window.open(u,"_blank")});let c=s.querySelector(f.hotelVillaReserveLink);if(c&&c.addEventListener("click",d=>{d.preventDefault(),d.stopPropagation(),window.open(Q(o,t,g),"_blank")}),r){let{fieldData:{"discount-percentage":d}}=r,b=s.querySelector(f.discount);b&&d&&(b.innerHTML=`-${d}%`);let T=s.querySelector(f.discountContainer);T&&!d&&(T.style.display="none")}},ie=(s,e,t)=>{let r=s.querySelector(f.price);r&&(r.innerHTML=Math.floor(e).toString());let a=s.querySelector(f.currency);a&&(a.innerHTML=F[t])};var v=class{constructor(e,t){this.listInstance=e;this.itemTemplateElement=t;D(this,"loadingSpinner");D(this,"cmsFilterEmptyState");D(this,"offerLookup",{});D(this,"apiClient",new A);D(this,"countryCode");D(this,"availableCountries",{});D(this,"countryCodeFilter",e=>{let{fieldData:t}=e;return!t["supported-countries"]||t["supported-countries"].length===0?!0:t["supported-countries"].map(a=>this.availableCountries[a]).includes(this.countryCode)});this.cmsFilterEmptyState=document.querySelector(f.cmsFilterEmptyState),this.cmsFilterEmptyState&&this.cmsFilterEmptyState.classList.add("hide-empty-state"),e.clearItems(),x(),this.loadingSpinner=document.querySelector(f.loadingSpinner),this.countryCode=y}async getGroupOffers(e){let{clearItems:t=!0,filter:r}=e||{};t&&this.listInstance.clearItems();let a=await this.apiClient.getCMSOffers();if(!a)return;let i=await this.apiClient.getCountries();if(!i)return;i.items.forEach(b=>{this.availableCountries[b.id]=b.fieldData.title?.trim()}),this.countryCode=await q();let n=a.items.filter(r).filter(this.countryCodeFilter),o=this.generateHotelIds(n),u=this.generateHotelIds(n).join(","),m=o.length===1;m&&(u=[u,u].join(","));let{offerMetaData:g}=this.generateOfferData(n),h=j(),c=await this.apiClient.getGroupOffersData({hids:u,locale:h});if(!c||c.error||!c.data){this.hideSpinnerAndShowFilter();return}m&&(c.data=[c.data[0]]);let d=this.getAllOffers(c,g);this.addHotelToCollection(d),this.hideSpinnerAndShowFilter()}async getGroupCategoryOffers(e,t=!1){let r=a=>{let{isArchived:i,isDraft:n,fieldData:o}=a;return i||n?!1:t?(!o.thematiques||o.thematiques.length===0)&&!o.slug.includes("derniere-minute")&&!o.slug.includes("reservez-tot"):o.category===e};await this.getGroupOffers({filter:r})}async getGroupThemeOffers(e){let t=r=>{let{isArchived:a,isDraft:i,fieldData:n}=r;return a||i||!n.thematiques?!1:n.thematiques.includes(e)};await this.getGroupOffers({filter:t})}async getGroupOtherThemedOffers(e){let t=r=>{let{isArchived:a,isDraft:i,fieldData:n}=r;return a||i||n.slug===e?!1:Array.isArray(n.thematiques)&&n.thematiques.length>0};await this.getGroupOffers({filter:t})}async getGroupSlugOffers(e){let t=r=>{let{isArchived:a,isDraft:i,fieldData:n}=r;return a||i?!1:n.slug===e};await this.getGroupOffers({filter:t})}async getGroupOtherOffers(e,t){let r=a=>{let{isArchived:i,isDraft:n,fieldData:o}=a;return i||n||o.slug===e?!1:t?o.category===t:(!o.thematiques||o.thematiques.length===0)&&!o.slug.includes("derniere-minute")&&!o.slug.includes("reservez-tot")};await this.getGroupOffers({filter:r})}hideSpinnerAndShowFilter(){this.loadingSpinner&&(this.loadingSpinner.style.display="none"),this.cmsFilterEmptyState&&this.cmsFilterEmptyState.classList.remove("hide-empty-state")}generateHotelIds(e){let t=[],r=Z();return e.forEach(a=>{let{fieldData:{"hotel-villa":i}}=a;t.push(r[i])}),Array.from(new Set(t))}getAllOffers(e,t){let r=[];return e.data.forEach(a=>{let{prop:{hid:i},rates:n}=a;n.forEach(o=>{let{name:u,title:m}=o.rate;(t.includes(p(i,u))||t.includes(p(i,m)))&&r.push({...a,rates:[o]})})}),r.sort((a,i)=>{let n=this.offerLookup[p(a.prop.hid,a.rates[0].rate.title)]||this.offerLookup[p(a.prop.hid,a.rates[0].rate.name)],o=this.offerLookup[p(i.prop.hid,i.rates[0].rate.title)]||this.offerLookup[p(i.prop.hid,i.rates[0].rate.name)],u=Number(n.fieldData.order)||0,m=Number(o.fieldData.order)||0;return u-m}),r}generateOfferData(e){let t=[];return e.forEach(r=>{let{fieldData:{"hotel-or-property-api-id":a,"offer-api-name":i}}=r,n=p(a,i);t.push(n),this.offerLookup[n]=r}),{offerMetaData:t}}addHotelToCollection(e){for(let{prop:t,rates:r}of e){let a=r.map(i=>this.createItem(t,i,this.itemTemplateElement));this.listInstance.addItems(a)}}createItem(e,t,r){let{rate:a}=t,{hid:i,title:n,property:o}=e,{image:u,title:m,name:g}=a,h=this.offerLookup[p(i||o,m)]||this.offerLookup[p(i||o,g)],c=r.cloneNode(!0),d=I[i||o];if(!d)return c;let{destination:b,slug:T}=d;this.bindOffersMetaData(c,{destination:b,image:u,hotelName:n,title:m,slug:T}),V(c,t,i,h);let w=this.getOffersCmsSlug(i,o,g);if(w){let C=c.querySelector(f.moreDetails),H=C instanceof HTMLAnchorElement?C:C?.querySelector("a")||C?.closest("a");H&&(H.href=N(w),W(w).then(X=>{H.href=X}))}return c.style.display="flex",c}getOffersCmsSlug(e,t,r){return this.offerLookup[p(e||t,r)]?.fieldData.slug}bindOffersMetaData(e,{destination:t,image:r,hotelName:a,title:i,slug:n,description:o}){let u=e.querySelector(f.destination),m=e.querySelector(f.image),g=e.querySelector(f.hotelName),h=e.querySelector(f.name),c=e.querySelector(f.description),d=e.querySelector(f.hotelLink),b=L();u&&(u.textContent=t[b]),m&&(m.src=r?.url),g&&(g.innerHTML=a),h&&(h.innerHTML=i),c&&o&&(c.innerHTML=o),d&&n&&d.addEventListener("click",()=>{window.location.href=n})}};var J=s=>{let[e]=s.items;if(!e)throw new Error("No items found in the list instance");let t=e.element;return new v(s,t)};window.fsAttributes=window.fsAttributes||[];window.loadFromServer=()=>{window.fsAttributes.push(["cmsload",async s=>{let e=J(s[0]),t=window.location.pathname;await e.getGroupThemeOffers(k[t])}])};window.loadFromServer();})();
@@ -1 +1 @@
1
- "use strict";(()=>{var P=Object.defineProperty;var M=(a,t,s)=>t in a?P(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s;var l=(a,t,s)=>(M(a,typeof t!="symbol"?t+"":t,s),s);var e="data",o={startingPriceList:`[${e}=starting-price-list]`,price:`[${e}=price]`,discount:`[${e}=discount]`,discountContainer:`[${e}=discount-container]`,currency:`[${e}=currency]`,beHid:`[${e}-be-hid]`,destination:`[${e}=destination]`,offersList:`[${e}=offers-list]`,offerSlugDetail:`[${e}=offer-slug-detail], [data-offer-slug-detail]`,offerSlugOthersList:`[${e}=offer-slug-others-list], [data-offer-slug-others-list]`,offerSlugOthersList2:`[${e}=offer-slug-others-list2], [data-offer-slug-others-list2]`,offerSlugOthersList3:`[${e}=offer-slug-others-list3], [data-offer-slug-others-list3]`,offerSlugOthersListItem:".offer-others_item",offersMoreWrapper:`[${e}=offers-more-wrapper]`,offerOthersTabsMenu:".offer-others_tabs-menu",offerOthersTabLink:".offer-others_tab-link",offerOthersTabPane:".offer-others_tab-pane",offersListContainer:`[${e}=offers-list-container]`,listItem:`[${e}=list-item]`,image:`[${e}=image]`,name:`[${e}=name]`,description:`[${e}=description]`,hotelName:`[${e}=hotel-name]`,hotelLink:`[${e}=hotel-link]`,hotelStartingPriceContainer:`[${e}=hotel-starting-price-container]`,moreDetails:`[${e}=more-details]`,offersPopup:`[${e}=offers-popup]`,offersPopupClose:`[${e}=close-btn]`,hotelReserveLink:`[${e}=hotel-reserve-link]`,hotelVillaReserveLink:`[${e}=hotel-villa-reserve-link]`,hotelURLS:`[${e}=hotel-urls]`,languageDropdown:`[${e}=language-dropdown]`,selectedLanguage:`[${e}=selected-language]`,loadingSpinner:`[${e}=loading-spinner]`,cmsFilterEmptyState:"[fs-cmsfilter-element=empty]",startingfromItem:a=>`[${e}-be-hid=${a}]`,popupOverlay:"[fs-smartlightbox-element=trigger-close]"};var c={DHDICBeach:"gpgos12767",DHDIJMalanga:"gptro12772",DHDIToubana:"gpsai12770",DHDIMahogany:"gpgos12769",DHDILangleyres:"gpgua27143",DHDIJungle:"mqros18592",DHDIJade:"agste21689",DHDIWINDLAND:"zzzzz25376",DHDILeCapMaison:"lcgro30400",DHDIChastenet:"agste21688",DHDILPSoleil:"mqsai18593",DHDISHANTI:"zzzzz25378",DHDIPavillon:"zzzzz25377",DHDIBELLEMARE:"zzzzz25379",DHDIPrincemaurice:"mupos25678",DHDIANAHITA:"zzzzz25380",DHDISamana:"agstm21687",FRANTHTLGrandCaseBe1:"frsai31536",DHDITInn:"ageng20433",DHDIBWaters:"agcro20496",DHDICuisinartgolf:"gpang25884",DMDESHTLSecretBayDom:"dmtib00001"};var m={AED:"\u062F.\u0625.",AFN:"Af",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"AR$",AUD:"AU$",AWG:"\u0192",AZN:"\u043C\u0430\u043D",BAM:"KM",BBD:"BBD$",BDT:"\u09F3",BGN:"\u043B\u0432.",BHD:"BD",BIF:"FBu",BMD:"$",BND:"B$",BOB:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"BZ$",CAD:"CA$",CDF:"FC",CHF:"Fr.",CKD:"$",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CUC:"CUC$",CUP:"$MN",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr.",DOP:"RD$",DZD:"DA",EGP:"E\xA3",EHP:"Ptas.",ERN:"Nkf",ETB:"Br",EUR:"\u20AC",FJD:"FJ$",FKP:"FK\xA3",FOK:"kr",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"G$",HKD:"HK$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"Rs.",IQD:"\u062F.\u0639.",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u0441",KHR:"\u17DB",KID:"$",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"CI$",KZT:"\u20B8",LAK:"\u20ADN",LBP:"LL.",LKR:"Rs.",LRD:"L$",LSL:"L",LYD:"LD",MAD:"DH",MDL:"L",MGA:"Ar",MKD:"den",MMK:"Ks",MNT:"\u20AE",MOP:"MOP$",MRU:"UM",MUR:"Rs.",MVR:"MRf",MWK:"MK",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"Rs.",NZD:"NZ$",OMR:"OR",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"Rs.",PLN:"z\u0142",PND:"$",PRB:"\u0440.",PYG:"\u20B2",QAR:"QR",RON:"L",RSD:"din",RUB:"\u20BD",RWF:"FRw",SAR:"SR",SBD:"SI$",SCR:"Rs.",SDG:"\xA3SD",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SLS:"Sl",SOS:"Sh.So.",SRD:"Sr$",SSP:"SS\xA3",STN:"Db",SVC:"\u20A1",SYP:"LS",SZL:"L",THB:"\u0E3F",TJS:"SM",TMT:"m.",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYU:"$U",UZS:"\u0441\u0443\u043C",VED:"Bs.",VES:"Bs.F",VND:"\u20AB",VUV:"VT",WST:"T",XAF:"Fr",XCD:"$",XOF:"\u20A3",XPF:"\u20A3",YER:"YR",ZAR:"R",ZMW:"ZK",ZWB:"",ZWL:"Z$",Abkhazia:"",Artsakh:"\u0564\u0580."},b={it:"it_IT",es:"es_ES",fr:"fr_FR",en:"en_GB"};var h="https://deshotelsetdesiles.ccordier.workers.dev/v2/";var p=a=>{let t="?";for(let[s,i]of Object.entries(a))i&&(t+=`${s}=${i}&`);return t};var D=()=>{let a=L();if(!a){let t=localStorage.getItem("wglang")||"fr";window.Weglot.switchTo(t)}window.Weglot.on("languageChanged",()=>{if(a)window.location.reload();else{let t=window.Weglot.getCurrentLang();localStorage.setItem("wglang",t),window.loadFromServer&&window.loadFromServer()}})},L=()=>window.location.hostname!=="deshotelsetdesiles.webflow.io",I=()=>{let a=A();return b[a]},A=()=>{if(!L())return localStorage.getItem("wglang")||"fr";try{let a=window.Weglot.getCurrentLang();if(a)return a}catch(a){return console.error("Error getting language",a),"fr"}return"fr"};var d=class{constructor(t){l(this,"hotelsIds");l(this,"itemElements");l(this,"itemContainerElements",[]);l(this,"hotelStartingPriceDataMap",new Map);this.hotelsIds=[],this.itemElements=[],t.querySelectorAll(o.beHid).forEach(s=>{let i=s.getAttribute(`${e}-be-hid`)?.trim();if(i&&c[i]){this.hotelsIds.push(c[i]),this.itemElements.push(s),this.itemContainerElements.push(s.parentElement);let n=s.querySelector(o.price);n&&(n.style.display="none")}else if(i&&!c[i]){let n=s.querySelector(o.hotelStartingPriceContainer);n&&this.hidePricingContainer(n)}}),D()}async getHotelStartingPrice(){for(let t=0;t<this.hotelsIds.length;t++){let s=this.hotelsIds[t],i=this.itemElements[t],n=i.querySelector(o.hotelStartingPriceContainer)||this.itemContainerElements[t],r=this.hotelStartingPriceDataMap.get(s);if(r===void 0&&(r=await this.getHotelStartingPriceData({property:s,locale:I()})),this.hotelStartingPriceDataMap.set(s,r),!r){this.hidePricingContainer(n);continue}let{quotation:{pricePerNight:g,currency:S}}=r;g||this.hidePricingContainer(n);let f=i.querySelector(o.price);f&&(f.innerHTML=Math.floor(g).toString(),f.style.display="block");let u=i.querySelector(o.currency);u&&(u.innerHTML=m[S])}}async getHotelStartingPriceData(t){let s=h+"startingfrom"+p(t),n=await(await fetch(s)).json();return n.error||!n.data?null:n.data}hidePricingContainer(t){t&&(t.style.display="none")}};window.Webflow||(window.Webflow=[]);window.loadFromServer=()=>{window.Webflow.push(async()=>{let a=document.querySelector(o.startingPriceList);a&&await new d(a).getHotelStartingPrice()})};window.loadFromServer();})();
1
+ "use strict";(()=>{var P=Object.defineProperty;var M=(a,t,s)=>t in a?P(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s;var l=(a,t,s)=>(M(a,typeof t!="symbol"?t+"":t,s),s);var e="data",r={startingPriceList:`[${e}=starting-price-list]`,price:`[${e}=price]`,discount:`[${e}=discount]`,discountContainer:`[${e}=discount-container]`,currency:`[${e}=currency]`,beHid:`[${e}-be-hid]`,destination:`[${e}=destination]`,offersList:`[${e}=offers-list]`,offerSlugDetail:`[${e}=offer-slug-detail], [data-offer-slug-detail]`,offerSlugOthersList:`[${e}=offer-slug-others-list], [data-offer-slug-others-list]`,offerSlugOthersList2:`[${e}=offer-slug-others-list2], [data-offer-slug-others-list2]`,offerSlugOthersList3:`[${e}=offer-slug-others-list3], [data-offer-slug-others-list3]`,offerSlugOthersListItem:".offer-others_item",offersMoreWrapper:`[${e}=offers-more-wrapper]`,offerOthersTabsMenu:".offer-others_tabs-menu",offerOthersTabLink:".offer-others_tab-link",offerOthersTabPane:".offer-others_tab-pane",offersListContainer:`[${e}=offers-list-container]`,listItem:`[${e}=list-item]`,image:`[${e}=image]`,name:`[${e}=name]`,description:`[${e}=description]`,hotelName:`[${e}=hotel-name]`,hotelLink:`[${e}=hotel-link]`,hotelStartingPriceContainer:`[${e}=hotel-starting-price-container]`,moreDetails:`[${e}=more-details]`,offersPopup:`[${e}=offers-popup]`,offersPopupClose:`[${e}=close-btn]`,hotelReserveLink:`[${e}=hotel-reserve-link]`,hotelVillaReserveLink:`[${e}=hotel-villa-reserve-link]`,hotelURLS:`[${e}=hotel-urls]`,languageDropdown:`[${e}=language-dropdown]`,selectedLanguage:`[${e}=selected-language]`,loadingSpinner:`[${e}=loading-spinner]`,cmsFilterEmptyState:"[fs-cmsfilter-element=empty]",startingfromItem:a=>`[${e}-be-hid=${a}]`,popupOverlay:"[fs-smartlightbox-element=trigger-close]"};var c={DHDICBeach:"gpgos12767",DHDIJMalanga:"gptro12772",DHDIToubana:"gpsai12770",DHDIMahogany:"gpgos12769",DHDILangleyres:"gpgua27143",DHDIJungle:"mqros18592",DHDIJade:"agste21689",DHDIWINDLAND:"zzzzz25376",DHDILeCapMaison:"lcgro30400",DHDIChastenet:"agste21688",DHDILPSoleil:"mqsai18593",DHDISHANTI:"zzzzz25378",DHDIPavillon:"zzzzz25377",DHDIBELLEMARE:"zzzzz25379",DHDIPrincemaurice:"mupos25678",DHDIANAHITA:"zzzzz25380",DHDISamana:"agstm21687",FRANTHTLGrandCaseBe1:"frsai31536",DHDITInn:"ageng20433",DHDIBWaters:"agcro20496",DHDICuisinartgolf:"gpang25884",DMDESHTLSecretBayDom:"dmtib00001"};var m={AED:"\u062F.\u0625.",AFN:"Af",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"AR$",AUD:"AU$",AWG:"\u0192",AZN:"\u043C\u0430\u043D",BAM:"KM",BBD:"BBD$",BDT:"\u09F3",BGN:"\u043B\u0432.",BHD:"BD",BIF:"FBu",BMD:"$",BND:"B$",BOB:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"BZ$",CAD:"CA$",CDF:"FC",CHF:"Fr.",CKD:"$",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CUC:"CUC$",CUP:"$MN",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr.",DOP:"RD$",DZD:"DA",EGP:"E\xA3",EHP:"Ptas.",ERN:"Nkf",ETB:"Br",EUR:"\u20AC",FJD:"FJ$",FKP:"FK\xA3",FOK:"kr",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"G$",HKD:"HK$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"Rs.",IQD:"\u062F.\u0639.",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u0441",KHR:"\u17DB",KID:"$",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"CI$",KZT:"\u20B8",LAK:"\u20ADN",LBP:"LL.",LKR:"Rs.",LRD:"L$",LSL:"L",LYD:"LD",MAD:"DH",MDL:"L",MGA:"Ar",MKD:"den",MMK:"Ks",MNT:"\u20AE",MOP:"MOP$",MRU:"UM",MUR:"Rs.",MVR:"MRf",MWK:"MK",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"Rs.",NZD:"NZ$",OMR:"OR",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"Rs.",PLN:"z\u0142",PND:"$",PRB:"\u0440.",PYG:"\u20B2",QAR:"QR",RON:"L",RSD:"din",RUB:"\u20BD",RWF:"FRw",SAR:"SR",SBD:"SI$",SCR:"Rs.",SDG:"\xA3SD",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SLS:"Sl",SOS:"Sh.So.",SRD:"Sr$",SSP:"SS\xA3",STN:"Db",SVC:"\u20A1",SYP:"LS",SZL:"L",THB:"\u0E3F",TJS:"SM",TMT:"m.",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYU:"$U",UZS:"\u0441\u0443\u043C",VED:"Bs.",VES:"Bs.F",VND:"\u20AB",VUV:"VT",WST:"T",XAF:"Fr",XCD:"$",XOF:"\u20A3",XPF:"\u20A3",YER:"YR",ZAR:"R",ZMW:"ZK",ZWB:"",ZWL:"Z$",Abkhazia:"",Artsakh:"\u0564\u0580."},b={it:"it_IT",es:"es_ES",fr:"fr_FR",en:"en_GB"};var h="https://deshotelsetdesiles.ccordier.workers.dev/v2/";var p=a=>{let t="?";for(let[s,i]of Object.entries(a))i&&(t+=`${s}=${i}&`);return t};var D=()=>{let a=L();if(!a){let t=localStorage.getItem("wglang")||"fr";window.Weglot.switchTo(t)}window.Weglot.on("languageChanged",()=>{if(a)window.location.reload();else{let t=window.Weglot.getCurrentLang();localStorage.setItem("wglang",t),window.loadFromServer&&window.loadFromServer()}})},L=()=>window.location.hostname!=="deshotelsetdesiles.webflow.io",I=()=>{let a=A();return b[a]},A=()=>{if(!L())return localStorage.getItem("wglang")||"fr";try{let a=window.Weglot.getCurrentLang();if(a)return a}catch(a){return console.error("Error getting language",a),"fr"}return"fr"};var f=class{constructor(t){l(this,"hotelsIds");l(this,"itemElements");l(this,"itemContainerElements",[]);l(this,"hotelStartingPriceDataMap",new Map);this.hotelsIds=[],this.itemElements=[],t.querySelectorAll(r.beHid).forEach(s=>{let i=s.getAttribute(`${e}-be-hid`)?.trim();if(i&&c[i]){this.hotelsIds.push(c[i]),this.itemElements.push(s),this.itemContainerElements.push(s.parentElement);let n=s.querySelector(r.price);n&&(n.style.display="none")}else if(i&&!c[i]){let n=s.querySelector(r.hotelStartingPriceContainer);n&&this.hidePricingContainer(n)}}),D()}async getHotelStartingPrice(){for(let t=0;t<this.hotelsIds.length;t++){let s=this.hotelsIds[t],i=this.itemElements[t],n=i.querySelector(r.hotelStartingPriceContainer)||this.itemContainerElements[t],o=this.hotelStartingPriceDataMap.get(s);if(o===void 0&&(o=await this.getHotelStartingPriceData({property:s,locale:I()})),this.hotelStartingPriceDataMap.set(s,o),!o){this.hidePricingContainer(n);continue}let{quotation:{pricePerNight:g,currency:S}}=o;g||this.hidePricingContainer(n);let d=i.querySelector(r.price);d&&(d.innerHTML=Math.floor(g).toString(),d.style.display="block");let u=i.querySelector(r.currency);u&&(u.innerHTML=m[S])}}async getHotelStartingPriceData(t){let s=h+"startingfrom"+p(t),n=await(await fetch(s)).json();return n.error||!n.data?null:n.data}hidePricingContainer(t){t&&(t.style.display="none")}};window.Webflow||(window.Webflow=[]);window.loadFromServer=()=>{window.Webflow.push(async()=>{let a=document.querySelector(r.startingPriceList);a&&await new f(a).getHotelStartingPrice()})};window.loadFromServer();})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@influence-society-web/deshotelsetdesiles",
3
- "version": "4.2.7",
3
+ "version": "4.2.8",
4
4
  "description": "An Influence Society site",
5
5
  "homepage": "https://github.com/finsweet/client-influence-society#readme",
6
6
  "license": "ISC",