1"use strict";(self.webpackChunkredbarrelsgames=self.webpackChunkredbarrelsgames||[]).push([["src_js_modules_pb-row-games_index_js"],{
1"./src/js/components/Video.js":(t,e,i)=>{i.d(e,{Z:()=>h});var s=i("./src/js/core/power-mode.js"),n=i("./src/js/utils/breakpoint.js"),o=i("./src/js/utils/viewport.js");function r(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}var l=["(min-width: 768px)","(min-width: 1200px)"];const h=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this._action=this.el.paused?"pause":"play",this._src=this.el.dataset.src||this.el.src,this._src_mobile=this.el.dataset.srcMobile,this._src_tablet=this.el.dataset.srcTablet,this._poster=this.el.dataset.poster,this._powerModeLow=s.Z.low&&!1===i,this._onBreakpointChange=this._onBreakpointChange.bind(this),this._powerModeLow||this._src&&(this._src_mobile||this._src_tablet)&&(this._bp=new n.Z(l,this._onBreakpointChange)),this.init()}var e,i,h;return e=t,i=[{key:"init",value:function(){this._bindEvents(),this._powerModeLow?this._poster&&this.el.setAttribute("poster",this._poster):(this._bp||this._src)&&this.el.src!==this.src&&(this.el.setAttribute("src",this.src),this["play"===this._action?"play":"pause"]())}},{key:"destroy",value:function(){this._unbindEvents(),this._bp&&this._bp.dispose(),this.el=null,this._action=null,this._playPromise=null,this._src=null,this._src_mobile=null,this._src_tablet=null,this._poster=null,this._bp=null,this._powerModeLow=null,this._onBreakpointChange=null}},{key:"play",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this;this.el&&(this._powerModeLow||"play"===this._action&&!1===e||(this._action="play",this._playPromise||(this._playPromise=null===(t=this.el)||void 0===t?void 0:t.play(),this._playPromise.finally((function(){i._playPromise=null})),this._playPromise.catch((function(){i._action=null})))))}},{key:"pause",value:function(){var t,e=this;this.el&&(this._powerModeLow||"pause"!==this._action&&(this._action="pause",this._playPromise?this._playPromise.then((function(){var t;return null===(t=e.el)||void 0===t?void 0:t.pause()})):null===(t=this.el)||void 0===t||t.pause()))}},{key:"seek",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.el&&(this.el.currentTime=t)}},{key:"_bindEvents",value:function(){var t;null===(t=this._bp)||void 0===t||t.on()}},{key:"_unbindEvents",value:function(){var t;null===(t=this._bp)||void 0===t||t.off()}},{key:"_onBreakpointChange",value:function(){this.src!==this.el.src&&(this._powerModeLow||("play"===this._action&&this.el.pause(),this.el.setAttribute("src",this.src)),"play"===this._action&&this.play(!0))}},{key:"playing",get:function(){return"play"===this._action}},{key:"src",get:function(){return this._src_mobile||this._src_tablet?o.Z.width<768?this._src_mobile?this._src_mobile:this._src_tablet:o.Z.width<1200&&this._src_tablet?this._src_tablet:this._src:this._src}}],i&&r(e.prototype,i),h&&r(e,h),t}()},
1"./src/js/modules/pb-row-games/index.js":(t,e,i)=>{i.r(e),i.d(e,{default:()=>k});var s=i("./node_modules/swiper/swiper.mjs"),n=i("./src/js/components/Video.js"),o=i("./src/js/utils/breakpoint.js"),r=i("./src/js/utils/dom.js"),l=i("./src/js/utils/listener.js"),h=i("./src/js/utils/mobile.js"),a=i("./src/js/utils/viewport.js");function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function p(t,e,i){return e&&_(t.prototype,e),i&&_(t,i),t}function d(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function v(t){return function(t){if(Array.isArray(t))return u(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 u(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return u(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 f="--navigation-disabled",b={slidesPerView:2.335,spaceBetween:16,speed:650,breakpoints:{1024:{slidesPerView:3,spaceBetween:16},1200:{slidesPerView:3,spaceBetween:30}}},m=function(){function t(e,i){c(this,t),this.el=e,this.emitter=i,this.slider=(0,r.$)(".pb-row-games__slider",this.el)}return p(t,[{key:"init",value:function(){this.slider&&(this.slider=new y(this.slider,this.emitter))}},{key:"destroy",value:function(){this.slider&&this.slider.destroy(),this.el=null,this.emitter=null,this.slider=null}}]),t}(),y=function(){function t(e,i){c(this,t),this.el=e,this.emitter=i,this.nav=(0,r.$)(".pb-row-games__nav",this.el),this.prev=(0,r.$)(".pb-row-games__prev",this.el),this.next=(0,r.$)(".pb-row-games__next",this.el),this.slides=v((0,r.$$)(".pb-row-games__slide",this.el)).map((function(t){return new w(t)})),this._bp=null,this._swiper=null,this._onResize=this._onResize.bind(this),this._onPrevClick=this._onPrevClick.bind(this),this._onNextClick=this._onNextClick.bind(this),this._onSwiperIndexChange=this._onSwiperIndexChange.bind(this),this.init()}return p(t,[{key:"init",value:function(){this._bp=(0,o.Z)(["(min-width: 768px)"],this._onResize),this._bp.run(),this._bindEvents()}},{key:"destroy",value:function(){this._unbindEvents(),this._bp&&this._bp.dispose(),this._swiper&&this._swiper.destroy(!0,!1),this.slides&&this.slides.forEach((function(t){return t.destroy()})),this.el=null,this.emitter=null,this.nav=null,this.prev=null,this.next=null,this.slides=null,this._bp=null,this._swiper=null,this._onResize=null,this._onPrevClick=null,this._onNextClick=null,this._onSwiperIndexChange=null}},{key:"_bindEvents",value:function(){this._bp&&this._bp.on(),this.prev&&(0,l.on)(this.prev,"click",this._onPrevClick),this.next&&(0,l.on)(this.next,"click",this._onNextClick)}},{key:"_unbindEvents",value:function(){this._bp&&this._bp.off(),this.prev&&(0,l.S1)(this.prev,"click",this._onPrevClick),this.next&&(0,l.S1)(this.next,"click",this._onNextClick)}},{key:"_onResize",value:function(){a.Z.width<768?(this._swiper&&this._swiper.destroy(!0,!0),this._swiper=null):this._swiper||(this._swiper=new s.Z(this.el,function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{},s=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(i).filter((function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable})))),s.forEach((function(e){d(t,e,i[e])}))}return t}({},b,{on:{activeIndexChange:this._onSwiperIndexChange,init:this._onSwiperIndexChange,slidesUpdated:this._onSwiperIndexChange}})))}},{key:"_onPrevClick",value:function(t){t&&(t.preventDefault(),t.stopImmediatePropagation()),this._swiper&&this._swiper.slidePrev()}},{key:"_onNextClick",value:function(t){t&&(t.preventDefault(),t.stopImmediatePropagation()),this._swiper&&this._swiper.slideNext()}},{key:"_onSwiperIndexChange",value:function(t){var e=t.isBeginning,i=t.isEnd;this.prev&&this.prev.classList[e?"add":"remove"](f),this.next&&this.next.classList[i?"add":"remove"](f),this.nav&&this.nav.setAttribute("aria-hidden",!(!e||!i))}}]),t}(),w=function(){function t(e){c(this,t),this.el=e,this.media=(0,r.$)(".game-preview__media",this.el),this.video=(0,r.$)(".game-preview__video",this.el),this._onRollover=this._onRollover.bind(this),this._onRollout=this._onRollout.bind(this),this.init()}return p(t,[{key:"init",value:function(){h.v1?this.video&&(this.video.setAttribute("preload","metadata"),this.video=new n.Z(this.video)):this.video=null,this._bindEvents()}},{key:"destroy",value:function(){this._unbindEvents(),this.video&&this.video.destroy(),this.el=null,this.media=null,this.video=null,this._onRollover=null,this._onRollout=null}},{key:"_bindEvents",value:function(){this.media&&this.video&&((0,l.on)(this.media,"mouseenter",this._onRollover),(0,l.on)(this.media,"mouseleave",this._onRollout))}},{key:"_unbindEvents",value:function(){this.media&&this.video&&((0,l.S1)(this.media,"mouseenter",this._onRollover),(0,l.S1)(this.media,"mouseleave",this._onRollout))}},{key:"_onRollover",value:function(){this.video.play()}},{key:"_onRollout",value:function(){this.video.pause(),this.video.seek(0)}}]),t}();const k=m},
1"./src/js/utils/breakpoint.js":(t,e,i)=>{i.d(e,{Z:()=>s});const s=function(t,e){var i,s=function(t){i=t,o||(requestAnimationFrame(r),o=!0)},n=t.map((function(t){return window.matchMedia(t)})),o=!1,r=function(){e(i),o=!1};return{dispose:function(){o=!0,i=null,n=null},on:function(){n.forEach((function(t){return t.addListener(s)}))},off:function(){n.forEach((function(t){return t.removeListener(s)}))},run:r}}}
1}]); 2//# sourceMappingURL=src_js_modules_pb-row-games_index_js.0d886e50cfa4037760ad.bundle.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.