PageSourceSearch

https://cdn.beachcomber-hotels.com/v9/_next/static/chunks/1117.95d15a3058583da7.js

js beachcomber-hotels.com collected 2026-10-09 23:35:58 UTC 6,377 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1117],{64535:function(e,n,t){"use strict";t.r(n);var o=t(85893),r=t(27484),a=t.n(r),i=t(62832),l=t.n(i),s=t(58299),c=t(13871),d=t(6873),u=t(20417),h=t(41664),f=t.n(h),v=t(5152),p=t.n(v),m=t(67294),k=t(97346);t(84415);function j(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,r,a=[],i=!0,l=!1;try{for(t=t.call(e);!(i=(o=t.next()).done)&&(a.push(o.value),!n||a.length!==n);i=!0);}catch(s){l=!0,r=s}finally{try{i||null==t.return||t.return()}finally{if(l)throw r}}return a}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return j(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return j(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var y=p()((function(){return t.e(9198).then(t.t.bind(t,9198,23))}),{loadableGenerated:{webpack:function(){return[9198]}},ssr:!1}),b="YYYY-MM-DD",w=function(e){var n=e.startDate,t=e.endDate,r=e.cin,i=e.cout,s=e.onClose,c=a()(t).diff(a()(n),"day"),d=!(!n||!t),u=0==c||Number.isNaN(c)?1:c,h=d?u:"-";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:l().closeBtnBooking,children:(0,o.jsx)("button",{onClick:function(e){e.preventDefault(),s()},type:"button"})}),(0,o.jsxs)("div",{className:l().bookingDatepicker,children:[(0,o.jsxs)("p",{children:[r?"".concat(r," : "):"",(0,o.jsx)("span",{children:n?a()(n).format(b):"-"})]}),(0,o.jsxs)("p",{children:[i?"".concat(i," : "):"",(0,o.jsx)("span",{children:t?a()(t).format(b):"-"})]}),h&&(0,o.jsxs)("p",{children:["Night(s) : ",(0,o.jsx)("span",{children:h})]})]})]})},_=(0,m.forwardRef)((function(e,n){var t=e.startCheck,r=e.startDate,a=e.endDate,i=e.endCheck,l=e.onClick,c=e.onInputChange,d=function(e){(0,u.D)((null===window||void 0===window?void 0:window.scrollY)>s.nj?"sticky bar":"content","choose your stay - date picker - ".concat(e))};return(0,o.jsxs)("div",{className:"inputholderContainer",onClick:l,ref:n,children:[(0,o.jsx)("div",{className:"inputholder",onClick:function(){return d("date de d\xe9part")},children:(0,o.jsx)("input",{onChange:c,placeholder:t,value:r,name:"start",readOnly:!0})}),(0,o.jsx)("div",{className:"inputholder",onClick:function(){return d("date d'arriv\xe9e")},children:(0,o.jsx)("input",{onChange:c,placeholder:i,value:a,name:"end",readOnly:!0})})]})}));_.displayName="DatePickerCustomInputs";var C=function(e){var n,t,r=e.data,i=e.nodeId,h=void 0===i?null:i,v=e.bookingFlights,p=(0,m.useState)(null),j=p[0],C=p[1],g=(0,m.useState)(null),D=g[0],N=g[1],S=(0,m.useState)("-1"),I=S[0],B=S[1],A=(0,m.useState)(!1),F=A[0],Y=A[1],O=((null===v||void 0===v||null===(n=v.data)||void 0===n?void 0:n.meta)||{}).field_cta,M=O||{},E=M.link,R=M.title,H=new Date,T=new Date(H);if(T.setDate(H.getDate()+1),(0,m.useEffect)((function(){if(h&&r){var e=null===r||void 0===r?void 0:r.hotel_lists.find((function(e){return(null===e||void 0===e?void 0:e.node_id)==h}));B((null===e||void 0===e?void 0:e.hotel_id)||"-1")}}),[r,h]),r){var Z=r||{},$=Z.choose_your_stay,G=Z.your_beach_hotel,P=Z.check_in,U=Z.check_out,q=Z.button_book,z=Z.button_book_flight_url,J=Z.button_book_flight_text,K=Z.locale,L=Z.country,Q=Z.hotel_lists,V=void 0===Q?[]:Q,W=function(e){var n=e.target,t=n.name,o=n.value;"start"==t?C(o):"end"==t?N(o):"hotel"==t&&B(o)},X=function(e){return"Invalid Date"!=a()(e).format(b)?a()(e).format(b):""};return(0,o.jsx)("div",{className:"".concat(l().headerBottom," bookingsection"),children:(0,o.jsx)("div",{className:"container",children:(0,o.jsxs)("div",{className:l().contentResa,children:[$&&(0,o.jsx)("span",{className:l().titleh2,children:$}),(0,o.jsx)("div",{className:"select-bc",onClick:function(){(0,u.D)((null===window||void 0===window?void 0:window.scrollY)>s.nj?"sticky bar":"content","choose your stay - choix hotel")},children:(0,o.jsxs)(k.Z.Select,{value:I,onChange:W,name:"hotel",children:[G&&(0,o.jsx)("option",{value:"-1",children:G}),V.map((function(e){return(null===e||void 0===e?void 0:e.title)&&(0,o.jsx)("option",{value:e.hotel_id,children:e.title},e.hotel_id)}))]})}),(0,o.jsx)("div",{className:l().formResa,children:(0,o.jsxs)(k.Z,{className:l().formBc,children:[F?(0,o.jsx)(y,{selected:j,onChange:function(e){var n=x(e,2),t=n[0],o=n[1];C(t),N(o)},minDate:T,startDate:j,endDate:D,selectsRange:!0,monthsShown:2,shouldCloseOnSelect:!1,dateFormat:"yyyy-MM-dd",startOpen:!0,customInput:(0,o.jsx)(_,{startCheck:P,startDate:X(j),endDate:X(D),endCheck:U,onInputChange:W}),children:(0,o.jsx)(w,{startDate:j,endDate:D,cin:P,cout:U,onClose:function(){return Y(!1)}})}):(0,o.jsx)("div",{className:"react-datepicker-wrapper",children:(0,o.jsx)("div",{className:"react-datepicker__input-container",children:(0,o.jsx)(_,{startCheck:P,startDate:X(j),endDate:X(D),endCheck:U,onInputChange:W,onClick:function(){return Y(!0)}})})}),q&&(0,o.jsx)("button",{type:"button",className:l().btnBook,onClick:function(e){e.preventDefault(),(0,u.D)((null===window||void 0===window?void 0:window.scrollY)>s.nj?"sticky bar":"content","choose your stay - CTA - book now"),window.open((0,d.$3)(function(){var e=X(D),n=X(j),t="",o="";if("-1"!=I){var r=V.find((function(e){return e.hotel_id==I}));t=r.hotel_id,o=r.hotel_siteurl}return(0,c._2)(t,o,L,K,n,e)}()),"_blank")},children:(0,o.jsx)("span",{children:q})})]})}),v&&(null===v||void 0===v?void 0:v.data)&&(null===v||void 0===v||null===(t=v.data)||void 0===t?void 0:t.meta)&&O&&(0,o.jsx)("div",{className:l().bookBcFly,children:(0,o.jsx)(f(),{href:null===E||void 0===E?void 0:E.url,passHref:!0,children:(0,o.jsx)("a",{target:"_blank",rel:"noreferrer",children:(0,o.jsx)("span",{className:l().linkBookFlight,children:R})})})}),z&&J&&(0,o.jsx)("div",{className:l().bookBcFly,children:(0,o.jsx)(f(),{href:z,passHref:!0,children:(0,o.jsx)("a",{target:"_blank",rel:"noreferrer",children:(0,o.jsx)("span",{className:l().linkBookFlight,children:J})})})})]})})})}};n.default=(0,m.memo)(C)},84415:function(){}}]);

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.