1import{g as A,f as K,d as P,h as O,S}from"./core-C9W5LTPX.js";import{N as U}from"./navigation-Cp_51tVY.js";function W({swiper:e,extendParams:y,on:s,emit:x}){const l=A(),g=K();e.keyboard={enabled:!1},y({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}});function p(C){if(!e.enabled)return;const{rtlTranslate:d}=e;let t=C;t.originalEvent&&(t=t.originalEvent);const o=t.keyCode||t.charCode,w=e.params.keyboard.pageUpDown,a=w&&o===33,i=w&&o===34,f=o===37,c=o===39,u=o===38,b=o===40;if(!e.allowSlideNext&&(e.isHorizontal()&&c||e.isVertical()&&b||i)||!e.allowSlidePrev&&(e.isHorizontal()&&f||e.isVertical()&&u||a))return!1;if(!(t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)&&!(l.activeElement&&l.activeElement.nodeName&&(l.activeElement.nodeName.toLowerCase()==="input"||l.activeElement.nodeName.toLowerCase()==="textarea"))){if(e.params.keyboard.onlyInViewport&&(a||i||f||c||u||b)){let D=!1;if(P(e.el,".".concat(e.params.slideClass,", swiper-slide")).length>0&&P(e.el,".".concat(e.params.slideActiveClass)).length===0)return;const v=e.el,E=v.clientWidth,N=v.clientHeight,H=g.innerWidth,L=g.innerHe
1ight,n=O(v);d&&(n.left-=v.scrollLeft);const V=[[n.left,n.top],[n.left+E,n.top],[n.left,n.top+N],[n.left+E,n.top+N]];for(let m=0;m<V.length;m+=1){const r=V[m];if(r[0]>=0&&r[0]<=H&&r[1]>=0&&r[1]<=L){if(r[0]===0&&r[1]===0)continue;D=!0}}if(!D)return}e.isHorizontal()?((a||i||f||c)&&(t.preventDefault?t.preventDefault():t.returnValue=!1),((i||c)&&!d||(a||f)&&d)&&e.slideNext(),((a||f)&&!d||(i||c)&&d)&&e.slidePrev()):((a||i||u||b)&&(t.preventDefault?t.preventDefault():t.returnValue=!1),(i||b)&&e.slideNext(),(a||u)&&e.slidePrev()),x("keyPress",o)}}function k(){e.keyboard.enabled||(l.addEventListener("keydown",p),e.keyboard.enabled=!0)}function h(){e.keyboard.enabled&&(l.removeEventListener("keydown",p),e.keyboard.enabled=!1)}s("init",()=>{e.params.keyboard.enabled&&k()}),s("destroy",()=>{e.keyboard.enabled&&h()}),Object.assign(e.keyboard,{enable:k,disable:h})}const I={cfg:{name:"slider",selectors:{slider:".js-slider"},classes:{active:"is-active"},el:{$slider:void 0},els:{$slider:void 0}},init(e){var s;const y=JSON.parse((s=e.dataset.swiperOptions)!=null?s:"{}");new S(e,{modules:[U,W],breakpoints:{1280:{spaceBetween:64}},spaceBetween:16,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},keyboard:{enabled:!0,onlyInViewport:!0},slidesPerView:"auto",...y})}};export{I as default}; 2//# sourceMappingURL=slider-D0RPwZq5.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.