PageSourceSearch

https://www.cpihotels.com/assets/frontend/js/HomepageSectionEventsVisual.21b8a3c2a3c0acda16be.min.js

js cpihotels.com collected 2026-10-07 00:41:59 UTC 7,964 bytes, 2 lines download raw bytes

1(self.webpackChunk=self.webpackChunk||[]).push([[475],{225:function(t,e,i){"use strict";i.d(e,{A:function(){return r}});var n=i(2556),s=i.n(n),o=i(9499);function r(t){return class extends t{constructor(t,e){super(t,e),"media"in this.options||(this.options.media=""),this.element.dataset.media&&(this.options.media=this.element.dataset.media),this.options.media&&(this.options.media=this.options.media in o.Pq?o.Pq[this.options.media]:this.options.media),this.enquireHandler={match:()=>super.prepare(),unmatch:()=>super.destroy()}}prepare(){this.options.media?s().register(this.options.media,this.enquireHandler):super.prepare()}destroy(){this.options.media?s().unregister(this.options.media,this.enquireHandler):super.destroy()}}}},2160:function(t,e,i){var n=i(8374),s=i(7070),o=s.each,r=s.isFunction,a=s.isArray;function h(){if(!window.matchMedia)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!window.matchMedia("only all").matches}h.prototype={constructor:h,register:function(t,e,i){var s=this.queries,h=i&&this.browserIsIncapable;return s[t]||(s[t]=new n(t,h)),r(e)&&(e={match:e}),a(e)||(e=[e]),o(e,(function(e){r(e)&&(e={match:e}),s[t].addHandler(e)})),this},unregister:function(t,e){var i=this.queries[t];return i&&(e?i.removeHandler(e):(i.clear(),delete this.queries[t])),this}},t.exports=h},2556:function(t,e,i){var n=i(2160);t.exports=new n},4064:function(t,e,i){"use strict";i.r(e);var n=i(5890),s=i(225),o=i(4250),r=i(6797),a=i(5198);function h(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const u={media:"mediumUp"};class l extends n.A{constructor(t){super(t,{...u}),h(this,"handleEnter",(()=>{this.state.visible=!0})),h(this,"handleLeave",(()=>{this.state.visible=!1})),h(this,"handleRender",(t=>{let{ratio:e}=t;this.state.visible&&this.render({ratio:e})})),this.ref={image:null},this.observer=null,this.state={visible:!1}}prepare(){this.observer=new o.A(this.element,{onEnter:this.handleEnter,onLeave:this.handleLeave,onRender:this.handleRender})}destroy(){var t;null===(t=this.observer)||void 0===t||t.destroy(),this.observer=null,this.state.visible=!1,this.element.removeAttribute("style")}render(t){let{ratio:e}=t;const i=r.A.Sine.easeOut((0,a.G)(e,[-1,0],[0,1])),n=(0,a.G)(e,[0,1],[0,10]);this.element.style.clipPath=`inset(${20*(1-i)}%)`,this.ref.image.style.transform=`translateY(${n}%)`}}e.default=(0,s.A)(l)},4250:function(t,e,i){"use strict";i.d(e,{A:function(){return a}});var n=i(8910),s=i(6295);function o(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const r={root:window,spread:30};class a{constructor(t,e){o(this,"handleResize",(()=>{this.resize()})),o(this,"handleScroll",(t=>{let{offset:e}=t;this.calculate(e.y)})),this.element=(0,s.P)(t),this.options={...r,...e},this.box=null,this.baseRatio=null,this.resize(),this.attach()}attach(){n.Ay.on("scroll",this.handleScroll),n.Ay.on("resize",this.handleResize)}detach(){n.Ay.off("scroll",this.handleScroll),n.Ay.off("resize",this.handleResize)}onRender(t){this.options.onRender&&this.options.onRender(t)}onEnter(t){this.options.onEnter&&this.options.onEnter(t)}onLeave(t){this.options.onLeave&&this.options.onLeave(t)}destroy(){this.detach()}calculate(t){if(this.defaultBox){let e=0,i=0;e=t<this.min?-1:t>this.max?1:(t-this.min)/(this.max-this.min)*2-1,1===e||-1===e?this.active&&(this.active=!1,this.onLeave({scrollX:0,scrollY:t,ratio:e,bodyRatio:i})):this.active||(this.active=!0,this.onEnter({scrollX:0,scrollY:t,ratio:0,bodyRatio:i})),i=t<this.min||t>this.max?0:this.defaultBox.top-t>0?Math.max(Math.min((this.defaultBox.height+(this.rootHeight-(this.defaultBox.top-t+this.defaultBox.height)))/this.defaultBox.height,1),0):Math.max(1-(t-this.defaultBox.top)/this.defaultBox.height,0),null===this.baseRatio&&this.defaultBox.top<this.rootHeightHalf&&e<0&&(this.baseRatio=e),null!==this.baseRatio&&(e-=this.baseRatio),this.onRender({scrollX:0,scrollY:t,ratio:e,bodyRatio:i})}else this.onRender({scrollX:0,scrollY:t,ratio:0,bodyRatio:0})}resize(){this.baseOffset=null,this.options.onBeforeResize&&this.options.onBeforeResize();const t=this.element.getBoundingClientRect(),e=n.Ay.getScroll().y,i=t.top+e,s=t.bottom+e,o=this.options.root.innerHe
1ight||this.options.root.clientHeight,r=o/2,a=i-o-this.options.spread,h=s+this.options.spread;Math.round((h-a)/2+a);this.defaultBox={top:i,bottom:s,left:t.left,right:t.right,width:t.width,height:t.height},this.rootHeight=o,this.rootHeightHalf=r,this.min=a,this.max=h,e<this.min?this.calculate(this.min):e>this.max?this.calculate(this.max):this.calculate(e)}}},5198:function(t,e,i){"use strict";function n(t,e,i){const[n,s]=e,[o,r]=i;if(n===s)return o;const a=(t-n)/(s-n);return o+(r-o)*Math.max(0,Math.min(a,1))}function s(t,e,i){return Math.max(e,Math.min(t,i))}i.d(e,{G:function(){return n},q:function(){return s}})},6797:function(t,e){"use strict";function i(t,e){const i=i=>t(i,e);return i.easeIn=i,i.easeOut=i=>1-t(1-i,e),i.easeInOut=i=>(i<=.5?t(2*i,e):2-t(2*(1-i),e))/2,i}const n={Linear:t=>t,extend:t=>{for(let e in t)n[e]=new i(t[e])}};n.extend({Pow:function(t,e){return Math.pow(t,e&&e[0]||6)},Expo:function(t){return Math.pow(2,8*(t-1))},Circ:function(t){return 1-Math.sin(Math.acos(t))},Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Back:function(t,e){return e=e&&e[0]||1.618,Math.pow(t,2)*((e+1)*t-e)},Bounce:function(t){for(var e,i=0,n=1;;i+=n,n/=2)if(t>=(7-4*i)/11){e=n*n-Math.pow((11-6*i-11*t)/4,2);break}return e},Elastic:function(t,e){return Math.pow(2,10*--t)*Math.cos(20*t*Math.PI*(e&&e[0]||1)/3)}}),["Quad","Cubic","Quart","Quint"].forEach(((t,e)=>{n[t]=new i((t=>Math.pow(t,e+2)))})),e.A=n},7070:function(t){t.exports={isFunction:function(t){return"function"==typeof t},isArray:function(t){return"[object Array]"===Object.prototype.toString.apply(t)},each:function(t,e){for(var i=0,n=t.length;i<n&&!1!==e(t[i],i);i++);}}},8082:function(t){function e(t){this.options=t,!t.deferSetup&&this.setup()}e.prototype={constructor:e,setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(t){return this.options===t||this.options.match===t}},t.exports=e},8374:function(t,e,i){var n=i(8082),s=i(7070).each;function o(t,e){this.query=t,this.isUnconditional=e,this.handlers=[],this.mql=window.matchMedia(t);var i=this;this.listener=function(t){i.mql=t.currentTarget||t,i.assess()},this.mql.addListener(this.listener)}o.prototype={constuctor:o,addHandler:function(t){var e=new n(t);this.handlers.push(e),this.matches()&&e.on()},removeHandler:function(t){var e=this.handlers;s(e,(function(i,n){if(i.equals(t))return i.destroy(),!e.splice(n,1)}))},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){s(this.handlers,(function(t){t.destroy()})),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var t=this.matches()?"on":"off";s(this.handlers,(function(e){e[t]()}))}},t.exports=o}}]);
2//# sourceMappingURL=HomepageSectionEventsVisual.21b8a3c2a3c0acda16be.min.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.