1"use strict";(self.webpackChunkinventis_front_end_boilerplate=self.webpackChunkinventis_front_end_boilerplate||[]).push([[6938],{96938:function(t,e,i){i.r(e),i.d(e,{Slider:function(){return a}});i(47042),i(47941),i(82526),i(57327),i(41539),i(38880),i(54747),i(49337),i(68309),i(91038),i(78783),i(74916),i(41817),i(32165),i(66992),i(33948);function n(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(!t)return;if("string"==typeof t)return r(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(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return r(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,s=function(){};return{s:s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return l=t.done,t},e:function(t){c=!0,o=t},f:function(){try{l||null==i.return||i.return()}finally{if(c)throw o}}}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function s(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function o(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(Object(i),!0).forEach((function(e){c(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function l(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var a=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,"options",{elementSelector:"[data-slider-item]",controlsToggleClass:"-with-controls",previousSelector:'[data-slider-controls="prev"]',nextSelector:'[data-slider-controls="next"]',trackSelector:"[data-slider-track]"}),c(this,"element",void 0),c(this,"trackElement",void 0),c(this,"previousButton",null),c(this,"nextButton",null),c(this,"items",[]),c(this,"isUpdatePending",!1),c(this,"shouldTrackFirstVisibleItem",!1),c(this,"firstVisibleIndex",0),this.onWindowResizeBound=this.onWindowResize.bind(this),this.trackScrollPositionBound=this.trackScrollPosition.bind(this),this.scrollToPreviousBound=this.scrollToPrevious.bind(this),this.scrollToNextBound=this.scrollToNext.bind(this),this.options=o(o({},this.options),i),this.element=e}var e,i,r;return e=t,i=[{key:"setup",value:function(){this.items=Array.prototype.slice.call(this.element.querySelectorAll(this.options.elementSelector)),this.trackElement=this.element.querySelector(this.options.trackSelector),this.previousButton=this.element.querySelector(this.options.previousSelector),this.nextButton=this.element.querySelector(this.options.nextSelector),this.attachEventListeners(),this.updateList()}},{key:"destroy",value:function(){this.detachEventListeners(),this.element=null,this.items=[],this.trackElement=null,this.previousButton=null,this.nextButton=null}},{key:"attachEventListeners",value:function(){window.addEventListener("resize",this.onWindowResizeBound),this.trackElement.addEventListener("scroll",this.trackScrollPositionBound),this.previousButton&&this.previousButton.addEventListener("click",this.scrollToPreviousBound),this.nextButton&&this.nextButton.addEventListener("click",this.scrollToNextBound)}},{key:"detachEventListeners",value:function(){this.nextButton&&this.nextButton.removeEventListener("click",this.scrollToNextBound),this.previousButton&&this.previousButton.removeEventListener("click",this.scrollToPreviousBound),this.trackElement.removeEventListener("scroll",this.trackScrollPositionBound),window.removeEventListener("resize",this.onWindowResizeBound)}},{key:"scrollToNext",value:function(){var t=this.calculateMaximumScrollableItem();
1this.firstVisibleIndex>=t?this.firstVisibleIndex=0:this.firstVisibleIndex+=2,this.firstVisibleIndex=Math.min(this.firstVisibleIndex,t),this.setScrollPositionForFirstItem(!0)}},{key:"scrollToPrevious",value:function(){var t=this.firstVisibleIndex;this.firstVisibleIndex-=2,this.firstVisibleIndex<0&&(this.firstVisibleIndex=0===t?this.calculateMaximumScrollableItem():0),this.setScrollPositionForFirstItem(!0)}},{key:"setScrollPositionForFirstItem",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.items[this.firstVisibleIndex];if(void 0!==e){var i=e.offsetLeft;void 0!==this.trackElement.scrollTo?this.trackElement.scrollTo({top:0,left:i,behavior:t?"smooth":"auto"}):this.trackElement.scrollLeft=i}}},{key:"updateList",value:function(){this.isUpdatePending=!1,null!==this.element.offsetParent&&(this.shouldTrackFirstVisibleItem=this.determineIfShouldTrackFirstVisibleItem(),this.trackElement.getBoundingClientRect().width>=this.trackElement.scrollWidth?this.element.classList.remove(this.options.controlsToggleClass):this.element.classList.add(this.options.controlsToggleClass))}},{key:"onWindowResize",value:function(){var t=this;this.isUpdatePending||(this.isUpdatePending=!0,window.requestAnimationFrame((function(){return t.updateList()})))}},{key:"trackScrollPosition",value:function(){if(this.shouldTrackFirstVisibleItem){var t,e=this.trackElement.scrollLeft,i=0,r=n(this.items);try{for(r.s();!(t=r.n()).done&&!(t.value.offsetLeft>=e);)i++}catch(t){r.e(t)}finally{r.f()}this.firstVisibleIndex=i}}},{key:"calculateMaximumScrollableItem",value:function(){var t,e=this.trackElement.getBoundingClientRect().width,i=this.trackElement.scrollWidth-e,r=0,s=n(this.items);try{for(s.s();!(t=s.n()).done;){if(t.value.offsetLeft>i)return r;r++}}catch(t){s.e(t)}finally{s.f()}return this.items.length-1}},{key:"determineIfShouldTrackFirstVisibleItem",value:function(){return window.matchMedia("(max-width: 768px)").matches}}],i&&l(e.prototype,i),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()}}]); 2//# sourceMappingURL=6938.b0809c44.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.