PageSourceSearch

https://cdn.beachcomber-hotels.com/v9/_next/static/chunks/220.09241fc36a7f550b.js

js beachcomber-hotels.com collected 2026-10-09 23:35:50 UTC 8,481 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[220],{20220:function(t,e,r){r.r(e);var n=r(34051),o=r.n(n),i=r(85893),a=r(67294),l=r(11163),u=r(33924),c=r(48084),s=r(79987);function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(c){return void r(c)}l.done?e(u):Promise.resolve(u).then(n,o)}function v(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var b=a.useLayoutEffect,p=[{maxWidth:575,cols:1},{maxWidth:900,cols:2}];e.default=function(t){var e,r,n,d,y,h=t.styles,m=t.views_articles_categorie,g=(0,s.N)(),w=g.articles,_=g.setArticles,k=g.resetState,x=g.appendArticles,S=(0,a.useState)(!1),A=S[0],j=S[1],E=(0,a.useState)(!1),O=E[0],L=E[1],I=(0,a.useRef)(null),C=(0,a.useRef)(null),N=(0,a.useRef)(null),P=(0,l.useRouter)(),W=(0,a.useCallback)((function(){var t,e=C.current;if(e){var r=Array.from(e.children);if(r.length){var n=function(){var t=!0,e=!1,r=void 0;try{for(var n,o=p[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){var i=n.value,a=i.maxWidth,l=i.cols;if(window.innerWidth<a)return l}}catch(u){e=!0,r=u}finally{try{t||null==o.return||o.return()}finally{if(e)throw r}}return 3}(),o=(e.offsetWidth-30*(n-1))/n,i=new Array(n).fill(0);r.forEach((function(t,e){t.style.width="".concat(o,"px"),t.style.position="absolute";var r=e%n;t.style.left="".concat(r*(o+30),"px"),t.style.top="".concat(i[r],"px"),i[r]+=t.offsetHeight+30})),e.style.height="".concat((t=Math).max.apply(t,v(i)),"px")}}}),[]),M=(0,a.useCallback)((function(){var t=C.current;t&&Array.from(t.querySelectorAll("img")).forEach((function(t){if(!t.complete){var e=function(){W(),t.removeEventListener("load",e),t.removeEventListener("error",e)};t.addEventListener("load",e),t.addEventListener("error",e)}}))}),[W]);b((function(){O&&W()}),[w,O,W]),(0,a.useEffect)((function(){O&&M()}),[w,O,M]),(0,a.useEffect)((function(){return window.addEventListener("resize",W),function(){return window.removeEventListener("resize",W)}}),[W]),(0,a.useEffect)((function(){k(),L(!1),j(!1)}),[P.asPath,null===m||void 0===m?void 0:m.url_views,k]);var R,z=(0,a.useCallback)((R=o().mark((function t(){var e,r,n=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=n.length>0&&void 0!==n[0]?n[0]:null,!A){t.next=3;break}return t.abrupt("return");case 3:return t.prev=3,j(!0),t.next=7,u.Z.getBlogArticlesByCategory(e||(null===m||void 0===m?void 0:m.url_views));case 7:r=t.sent,e?x(r):_(r),L(!0),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(3),k();case 15:return t.prev=15,j(!1),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[3,12,15,18]])})),function(){var t=this,e=arguments;return new Promise((function(r,n){var o=R.apply(t,e);function i(t){f(o,r,n,i,a,"next",t)}function a(t){f(o,r,n,i,a,"throw",t)}i(void 0)}))}),[A,null===m||void 0===m?void 0:m.url_views,k,_,x]),B=function(){N.current&&(N.current.disconnect(),N.current=null)};return(0,a.useEffect)((function(){if(B(),I.current&&(null===m||void 0===m?void 0:m.url_views)){var t=I.current;return N.current=new IntersectionObserver((function(t){t.forEach((function(t){!t.isIntersecting||O||A||z()}))}),{root:null,rootMargin:"50px",threshold:.1}),N.current.observe(t),function(){N.current&&t&&N.current.unobserve(t),B()}}}),[O,A,null===m||void 0===m?void 0:m.url_views,P.asPath,z]),(0,a.useEffect)((function(){return function(){return B()}}),[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{"data-component":"ListeBlog",className:"".concat(h["block-loadmore-list__wrapper"]," ").concat((null===(e=w.links)||void 0===e||null===(r=e.next)||void 0===r?void 0:r.href)?"":h["block-loadmore-list__wrapper--more"]),ref:I,children:A&&!O?(0,i.jsx)("div",{style:{textAlign:"center",padding:"2rem"},children:"..."}):(0,i.jsx)("div",{className:h["block-loadmore-list__row"],ref:C,style:{position:"relative"},children:(null===w||void 0===w||null===(n=w.data)||void 0===n?void 0:n.length)>0?w.data.map((function(t){return(0,i.jsx)("div",{className:h["block-loadmore-list__col"],children:(0,i.jsx)(c.default,{styles:h,blog:t,bordered:!0,mansory:!0})},t.id)})):O&&(0,i.jsx)("div",{})})}),(null===w||void 0===w||null===(d=w.links)||void 0===d||null===(y=d.next)||void 0===y?void 0:y.href)&&(0,i.jsx)("div",{className:h["block-loadmore-list__more"],children:(0,i.jsx)("button",{className:"".concat(h["block-loadmore-list__link"]," ").concat(h["block-loadmore-list__link--font-size-20"]),onClick:function(){var t,e;(null===(t=w.links)||void 0===t||null===(e=t.next)||void 0===e?void 0:e.href)&&!A&&z(w.links.next.href)},disabled:A,type:"button",children:A?"Chargement...":(null===m||void 0===m?void 0:m.read_more)||"Charger plus"})})]})}},79987:function(t,e,r){r.d(e,{N:function(){return f}});var n=r(67294);const o=t=>{let e;const r=new Set,n=(t,n)=>{const o="function"===typeof t?t(e):t;if(!Object.is(o,e)){const t=e;e=(null!=n?n:"object"!==typeof o||null===o)?o:Object.assign({},e,o),r.forEach((r=>r(e,t)))}},o=()=>e,i={setState:n,getState:o,getInitialState:()=>a,subscribe:t=>(r.add(t),()=>r.delete(t))},a=e=t(n,o,i);return i},i=t=>t;const a=t=>{const e=(t=>t?o(t):o)(t),r=t=>function(t,e=i){const r=n.useSyncExternalStore(t.subscribe,(()=>e(t.getState())),(()=>e(t.getInitialState())));return n.useDebugValue(r),r}(e,t);return Object.assign(r,e),r};function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}
1)))),n.forEach((function(e){u(t,e,r[e])}))}return t}function s(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var d,f=(d=function(t){return{articles:[],loading:!1,hasLoaded:!1,error:null,activeShareId:null,setActiveShareId:function(e){return t({activeShareId:e})},setArticles:function(e){return t({articles:e})},appendArticles:function(e){return t((function(t){var r;return(null===(r=t.articles)||void 0===r?void 0:r.data)&&(null===e||void 0===e?void 0:e.data)?{articles:c({},e,{data:s(t.articles.data).concat(s(e.data))})}:{articles:s(t.articles).concat(s(e))}}))},setLoading:function(e){return t({loading:e})},setHasLoaded:function(e){return t({hasLoaded:e})},setError:function(e){return t({error:e})},resetState:function(){return t({articles:[],loading:!1,hasLoaded:!1,error:null})},updateLikeCount:function(e,r){return t((function(t){var n=t.articles,o=function(t){return"like"===r?(t||0)+1:"unlike"===r?t>0?t-1:0:t||0};if(null===n||void 0===n?void 0:n.data){var i=n.data.map((function(t){var r=null===t||void 0===t?void 0:t.attributes;return(null===r||void 0===r?void 0:r.drupal_internal__nid)===e?c({},t,{attributes:c({},r,{like_counter:o(r.like_counter)})}):t}));return{articles:c({},n,{data:i})}}return Array.isArray(n)?{articles:n.map((function(t){var r=null===t||void 0===t?void 0:t.attributes;return(null===r||void 0===r?void 0:r.drupal_internal__nid)===e?c({},t,{attributes:c({},r,{like_counter:o(r.like_counter)})}):t}))}:{}}))}}})?a(d):a}}]);

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.