2 lines
19 KiB
JavaScript
2 lines
19 KiB
JavaScript
import{s as I,d as q,S as G}from"./BgEwnza3.js";import{r as g,bV as A,a1 as $,ad as K,o as M,e as L,h,b2 as Z,k as J,bm as D}from"./B565zvD7.js";const F=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function E(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function _(e,n){const d=["__proto__","constructor","prototype"];Object.keys(n).filter(a=>d.indexOf(a)<0).forEach(a=>{typeof e[a]>"u"?e[a]=n[a]:E(n[a])&&E(e[a])&&Object.keys(n[a]).length>0?n[a].__swiper__?e[a]=n[a]:_(e[a],n[a]):e[a]=n[a]})}function U(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function V(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function H(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function W(e){e===void 0&&(e="");const n=e.split(" ").map(a=>a.trim()).filter(a=>!!a),d=[];return n.forEach(a=>{d.indexOf(a)<0&&d.push(a)}),d.join(" ")}function Q(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function X(e){let{swiper:n,slides:d,passedParams:a,changedParams:o,nextEl:f,prevEl:r,scrollbarEl:s,paginationEl:t}=e;const p=o.filter(i=>i!=="children"&&i!=="direction"&&i!=="wrapperClass"),{params:l,pagination:u,navigation:S,scrollbar:v,virtual:b,thumbs:B}=n;let C,m,x,w,T,N,P,O;o.includes("thumbs")&&a.thumbs&&a.thumbs.swiper&&!a.thumbs.swiper.destroyed&&l.thumbs&&(!l.thumbs.swiper||l.thumbs.swiper.destroyed)&&(C=!0),o.includes("controller")&&a.controller&&a.controller.control&&l.controller&&!l.controller.control&&(m=!0),o.includes("pagination")&&a.pagination&&(a.pagination.el||t)&&(l.pagination||l.pagination===!1)&&u&&!u.el&&(x=!0),o.includes("scrollbar")&&a.scrollbar&&(a.scrollbar.el||s)&&(l.scrollbar||l.scrollbar===!1)&&v&&!v.el&&(w=!0),o.includes("navigation")&&a.navigation&&(a.navigation.prevEl||r)&&(a.navigation.nextEl||f)&&(l.navigation||l.navigation===!1)&&S&&!S.prevEl&&!S.nextEl&&(T=!0);const c=i=>{n[i]&&(n[i].destroy(),i==="navigation"?(n.isElement&&(n[i].prevEl.remove(),n[i].nextEl.remove()),l[i].prevEl=void 0,l[i].nextEl=void 0,n[i].prevEl=void 0,n[i].nextEl=void 0):(n.isElement&&n[i].el.remove(),l[i].el=void 0,n[i].el=void 0))};o.includes("loop")&&n.isElement&&(l.loop&&!a.loop?N=!0:!l.loop&&a.loop?P=!0:O=!0),p.forEach(i=>{if(E(l[i])&&E(a[i]))Object.assign(l[i],a[i]),(i==="navigation"||i==="pagination"||i==="scrollbar")&&"enabled"in a[i]&&!a[i].enabled&&c(i);else{const y=a[i];(y===!0||y===!1)&&(i==="navigation"||i==="pagination"||i==="scrollbar")?y===!1&&c(i):l[i]=a[i]}}),p.includes("controller")&&!m&&n.controller&&n.controller.control&&l.controller&&l.controller.control&&(n.controller.control=l.controller.control),o.includes("children")&&d&&b&&l.virtual.enabled?(b.slides=d,b.update(!0)):o.includes("virtual")&&b&&l.virtual.enabled&&(d&&(b.slides=d),b.update(!0)),o.includes("children")&&d&&l.loop&&(O=!0),C&&B.init()&&B.update(!0),m&&(n.controller.control=l.controller.control),x&&(n.isElement&&(!t||typeof t=="string")&&(t=document.createElement("div"),t.classList.add("swiper-pagination"),t.part.add("pagination"),n.el.appendChild(t)),t&&(l.pagination.el=t),u.init(),u.render(),u.update()),w&&(n.isElement&&(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-scrollbar"),s.part.add("scrollbar"),n.el.appendChild(s)),s&&(l.scrollbar.el=s),v.init(),v.updateSize(),v.setTranslate()),T&&(n.isElement&&((!f||typeof f=="string")&&(f=document.createElement("div"),f.classList.add("swiper-button-next"),I(f,n.hostEl.constructor.nextButtonSvg),f.part.add("button-next"),n.el.appendChild(f)),(!r||typeof r=="string")&&(r=document.createElement("div"),r.classList.add("swiper-button-prev"),I(r,n.hostEl.constructor.prevButtonSvg),r.part.add("button-prev"),n.el.appendChild(r))),f&&(l.navigation.nextEl=f),r&&(l.navigation.prevEl=r),S.init(),S.update()),o.includes("allowSlideNext")&&(n.allowSlideNext=a.allowSlideNext),o.includes("allowSlidePrev")&&(n.allowSlidePrev=a.allowSlidePrev),o.includes("direction")&&n.changeDirection(a.direction,!1),(N||O)&&n.loopDestroy(),(P||O)&&n.loopCreate(),n.update()}function R(e,n){e===void 0&&(e={});const d={on:{}},a={},o={};_(d,q),d._emitClasses=!0,d.init=!1;const f={},r=F.map(t=>t.replace(/_/,"")),s=Object.assign({},e);return Object.keys(s).forEach(t=>{typeof e[t]>"u"||(r.indexOf(t)>=0?E(e[t])?(d[t]={},o[t]={},_(d[t],e[t]),_(o[t],e[t])):(d[t]=e[t],o[t]=e[t]):t.search(/on[A-Z]/)===0&&typeof e[t]=="function"?d.on[`${t[2].toLowerCase()}${t.substr(3)}`]=e[t]:f[t]=e[t])}),["navigation","pagination","scrollbar"].forEach(t=>{d[t]===!0&&(d[t]={}),d[t]===!1&&delete d[t]}),{params:d,passedParams:o,rest:f,events:a}}function Y(e,n){let{el:d,nextEl:a,prevEl:o,paginationEl:f,scrollbarEl:r,swiper:s}=e;U(n)&&a&&o&&(s.params.navigation.nextEl=a,s.originalParams.navigation.nextEl=a,s.params.navigation.prevEl=o,s.originalParams.navigation.prevEl=o),V(n)&&f&&(s.params.pagination.el=f,s.originalParams.pagination.el=f),H(n)&&r&&(s.params.scrollbar.el=r,s.originalParams.scrollbar.el=r),s.init(d)}function k(e,n,d,a,o){const f=[];if(!n)return f;const r=t=>{f.indexOf(t)<0&&f.push(t)};if(d&&a){const t=a.map(o),p=d.map(o);t.join("")!==p.join("")&&r("children"),a.length!==d.length&&r("children")}return F.filter(t=>t[0]==="_").map(t=>t.replace(/_/,"")).forEach(t=>{if(t in e&&t in n)if(E(e[t])&&E(n[t])){const p=Object.keys(e[t]),l=Object.keys(n[t]);p.length!==l.length?r(t):(p.forEach(u=>{e[t][u]!==n[t][u]&&r(t)}),l.forEach(u=>{e[t][u]!==n[t][u]&&r(t)}))}else e[t]!==n[t]&&r(t)}),f}const ee=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function j(e,n,d){e===void 0&&(e={});const a=[],o={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]},f=(r,s)=>{Array.isArray(r)&&r.forEach(t=>{const p=typeof t.type=="symbol";s==="default"&&(s="container-end"),p&&t.children?f(t.children,s):t.type&&(t.type.name==="SwiperSlide"||t.type.name==="AsyncComponentWrapper")||t.componentOptions&&t.componentOptions.tag==="SwiperSlide"?a.push(t):o[s]&&o[s].push(t)})};return Object.keys(e).forEach(r=>{if(typeof e[r]!="function")return;const s=e[r]();f(s,r)}),d.value=n.value,n.value=a,{slides:a,slots:o}}function te(e,n,d){if(!d)return null;const a=l=>{let u=l;return l<0?u=n.length+l:u>=n.length&&(u=u-n.length),u},o=e.value.isHorizontal()?{[e.value.rtlTranslate?"right":"left"]:`${d.offset}px`}:{top:`${d.offset}px`},{from:f,to:r}=d,s=e.value.params.loop?-n.length:0,t=e.value.params.loop?n.length*2:n.length,p=[];for(let l=s;l<t;l+=1)l>=f&&l<=r&&p.length<n.length&&p.push(n[a(l)]);return p.map(l=>{if(l.props||(l.props={}),l.props.style||(l.props.style={}),l.props.swiperRef=e,l.props.style=o,l.type)return h(l.type,{...l.props},l.children);if(l.componentOptions)return h(l.componentOptions.Ctor,{...l.props},l.componentOptions.children)})}const le={name:"Swiper",props:{tag:{type:String,default:"div"},wrapperTag:{type:String,default:"div"},modules:{type:Array,default:void 0},init:{type:Boolean,default:void 0},direction:{type:String,default:void 0},oneWayMovement:{type:Boolean,default:void 0},swiperElementNodeName:{type:String,default:"SWIPER-CONTAINER"},touchEventsTarget:{type:String,default:void 0},initialSlide:{type:Number,default:void 0},speed:{type:Number,default:void 0},cssMode:{type:Boolean,default:void 0},updateOnWindowResize:{type:Boolean,default:void 0},resizeObserver:{type:Boolean,default:void 0},nested:{type:Boolean,default:void 0},focusableElements:{type:String,default:void 0},width:{type:Number,default:void 0},height:{type:Number,default:void 0},preventInteractionOnTransition:{type:Boolean,default:void 0},userAgent:{type:String,default:void 0},url:{type:String,default:void 0},edgeSwipeDetection:{type:[Boolean,String],default:void 0},edgeSwipeThreshold:{type:Number,default:void 0},autoHeight:{type:Boolean,default:void 0},setWrapperSize:{type:Boolean,default:void 0},virtualTranslate:{type:Boolean,default:void 0},effect:{type:String,default:void 0},breakpoints:{type:Object,default:void 0},breakpointsBase:{type:String,default:void 0},spaceBetween:{type:[Number,String],default:void 0},slidesPerView:{type:[Number,String],default:void 0},maxBackfaceHiddenSlides:{type:Number,default:void 0},slidesPerGroup:{type:Number,default:void 0},slidesPerGroupSkip:{type:Number,default:void 0},slidesPerGroupAuto:{type:Boolean,default:void 0},centeredSlides:{type:Boolean,default:void 0},centeredSlidesBounds:{type:Boolean,default:void 0},slidesOffsetBefore:{type:Number,default:void 0},slidesOffsetAfter:{type:Number,default:void 0},normalizeSlideIndex:{type:Boolean,default:void 0},centerInsufficientSlides:{type:Boolean,default:void 0},watchOverflow:{type:Boolean,default:void 0},roundLengths:{type:Boolean,default:void 0},touchRatio:{type:Number,default:void 0},touchAngle:{type:Number,default:void 0},simulateTouch:{type:Boolean,default:void 0},shortSwipes:{type:Boolean,default:void 0},longSwipes:{type:Boolean,default:void 0},longSwipesRatio:{type:Number,default:void 0},longSwipesMs:{type:Number,default:void 0},followFinger:{type:Boolean,default:void 0},allowTouchMove:{type:Boolean,default:void 0},threshold:{type:Number,default:void 0},touchMoveStopPropagation:{type:Boolean,default:void 0},touchStartPreventDefault:{type:Boolean,default:void 0},touchStartForcePreventDefault:{type:Boolean,default:void 0},touchReleaseOnEdges:{type:Boolean,default:void 0},uniqueNavElements:{type:Boolean,default:void 0},resistance:{type:Boolean,default:void 0},resistanceRatio:{type:Number,default:void 0},watchSlidesProgress:{type:Boolean,default:void 0},grabCursor:{type:Boolean,default:void 0},preventClicks:{type:Boolean,default:void 0},preventClicksPropagation:{type:Boolean,default:void 0},slideToClickedSlide:{type:Boolean,default:void 0},loop:{type:Boolean,default:void 0},loopedSlides:{type:Number,default:void 0},loopPreventsSliding:{type:Boolean,default:void 0},loopAdditionalSlides:{type:Number,default:void 0},loopAddBlankSlides:{type:Boolean,default:void 0},rewind:{type:Boolean,default:void 0},allowSlidePrev:{type:Boolean,default:void 0},allowSlideNext:{type:Boolean,default:void 0},swipeHandler:{type:Boolean,default:void 0},noSwiping:{type:Boolean,default:void 0},noSwipingClass:{type:String,default:void 0},noSwipingSelector:{type:String,default:void 0},passiveListeners:{type:Boolean,default:void 0},containerModifierClass:{type:String,default:void 0},slideClass:{type:String,default:void 0},slideActiveClass:{type:String,default:void 0},slideVisibleClass:{type:String,default:void 0},slideFullyVisibleClass:{type:String,default:void 0},slideBlankClass:{type:String,default:void 0},slideNextClass:{type:String,default:void 0},slidePrevClass:{type:String,default:void 0},wrapperClass:{type:String,default:void 0},lazyPreloaderClass:{type:String,default:void 0},lazyPreloadPrevNext:{type:Number,default:void 0},runCallbacksOnInit:{type:Boolean,default:void 0},observer:{type:Boolean,default:void 0},observeParents:{type:Boolean,default:void 0},observeSlideChildren:{type:Boolean,default:void 0},a11y:{type:[Boolean,Object],default:void 0},autoplay:{type:[Boolean,Object],default:void 0},controller:{type:Object,default:void 0},coverflowEffect:{type:Object,default:void 0},cubeEffect:{type:Object,default:void 0},fadeEffect:{type:Object,default:void 0},flipEffect:{type:Object,default:void 0},creativeEffect:{type:Object,default:void 0},cardsEffect:{type:Object,default:void 0},hashNavigation:{type:[Boolean,Object],default:void 0},history:{type:[Boolean,Object],default:void 0},keyboard:{type:[Boolean,Object],default:void 0},mousewheel:{type:[Boolean,Object],default:void 0},navigation:{type:[Boolean,Object],default:void 0},pagination:{type:[Boolean,Object],default:void 0},parallax:{type:[Boolean,Object],default:void 0},scrollbar:{type:[Boolean,Object],default:void 0},thumbs:{type:Object,default:void 0},virtual:{type:[Boolean,Object],default:void 0},zoom:{type:[Boolean,Object],default:void 0},grid:{type:[Object],default:void 0},freeMode:{type:[Boolean,Object],default:void 0},enabled:{type:Boolean,default:void 0}},emits:["_beforeBreakpoint","_containerClasses","_slideClass","_slideClasses","_swiper","_freeModeNoMomentumRelease","_virtualUpdated","activeIndexChange","afterInit","autoplay","autoplayStart","autoplayStop","autoplayPause","autoplayResume","autoplayTimeLeft","beforeDestroy","beforeInit","beforeLoopFix","beforeResize","beforeSlideChangeStart","beforeTransitionStart","breakpoint","changeDirection","click","disable","doubleTap","doubleClick","destroy","enable","fromEdge","hashChange","hashSet","init","keyPress","lock","loopFix","momentumBounce","navigationHide","navigationShow","navigationPrev","navigationNext","observerUpdate","orientationchange","paginationHide","paginationRender","paginationShow","paginationUpdate","progress","reachBeginning","reachEnd","realIndexChange","resize","scroll","scrollbarDragEnd","scrollbarDragMove","scrollbarDragStart","setTransition","setTranslate","slidesUpdated","slideChange","slideChangeTransitionEnd","slideChangeTransitionStart","slideNextTransitionEnd","slideNextTransitionStart","slidePrevTransitionEnd","slidePrevTransitionStart","slideResetTransitionStart","slideResetTransitionEnd","sliderMove","sliderFirstMove","slidesLengthChange","slidesGridLengthChange","snapGridLengthChange","snapIndexChange","swiper","tap","toEdge","touchEnd","touchMove","touchMoveOpposite","touchStart","transitionEnd","transitionStart","unlock","update","virtualUpdate","zoomChange"],setup(e,n){let{slots:d,emit:a}=n;const{tag:o,wrapperTag:f}=e,r=g("swiper"),s=g(null),t=g(!1),p=g(!1),l=g(null),u=g(null),S=g(null),v={value:[]},b={value:[]},B=g(null),C=g(null),m=g(null),x=g(null),{params:w,passedParams:T}=R(e);j(d,v,b),S.value=T,b.value=v.value;const N=()=>{j(d,v,b),t.value=!0};w.onAny=function(c){for(var i=arguments.length,y=new Array(i>1?i-1:0),z=1;z<i;z++)y[z-1]=arguments[z];a(c,...y)},Object.assign(w.on,{_beforeBreakpoint:N,_containerClasses(c,i){r.value=i}});const P={...w};if(delete P.wrapperClass,u.value=new G(P),u.value.virtual&&u.value.params.virtual.enabled){u.value.virtual.slides=v.value;const c={cache:!1,slides:v.value,renderExternal:i=>{s.value=i},renderExternalUpdate:!1};_(u.value.params.virtual,c),_(u.value.originalParams.virtual,c)}A(()=>{!p.value&&u.value&&(u.value.emitSlidesClasses(),p.value=!0);const{passedParams:c}=R(e),i=k(c,S.value,v.value,b.value,y=>y.props&&y.props.key);S.value=c,(i.length||t.value)&&u.value&&!u.value.destroyed&&X({swiper:u.value,slides:v.value,passedParams:c,changedParams:i,nextEl:B.value,prevEl:C.value,scrollbarEl:x.value,paginationEl:m.value}),t.value=!1}),D("swiper",u),$(s,()=>{K(()=>{ee(u.value)})}),M(()=>{l.value&&(Y({el:l.value,nextEl:B.value,prevEl:C.value,paginationEl:m.value,scrollbarEl:x.value,swiper:u.value},w),a("swiper",u.value))}),L(()=>{u.value&&!u.value.destroyed&&u.value.destroy(!0,!1)});function O(c){return w.virtual?te(u,c,s.value):(c.forEach((i,y)=>{i.props||(i.props={}),i.props.swiperRef=u,i.props.swiperSlideIndex=y}),c)}return()=>{const{slides:c,slots:i}=j(d,v,b);return h(o,{ref:l,class:W(r.value)},[i["container-start"],h(f,{class:Q(w.wrapperClass)},[i["wrapper-start"],O(c),i["wrapper-end"]]),U(e)&&[h("div",{ref:C,class:"swiper-button-prev"}),h("div",{ref:B,class:"swiper-button-next"})],H(e)&&h("div",{ref:x,class:"swiper-scrollbar"}),V(e)&&h("div",{ref:m,class:"swiper-pagination"}),i["container-end"]])}}},ie={name:"SwiperSlide",props:{tag:{type:String,default:"div"},swiperRef:{type:Object,required:!1},swiperSlideIndex:{type:Number,default:void 0,required:!1},zoom:{type:Boolean,default:void 0,required:!1},lazy:{type:Boolean,default:!1,required:!1},virtualIndex:{type:[String,Number],default:void 0}},setup(e,n){let{slots:d}=n,a=!1;const{swiperRef:o}=e,f=g(null),r=g("swiper-slide"),s=g(!1);function t(u,S,v){S===f.value&&(r.value=v)}M(()=>{!o||!o.value||(o.value.on("_slideClass",t),a=!0)}),Z(()=>{a||!o||!o.value||(o.value.on("_slideClass",t),a=!0)}),A(()=>{!f.value||!o||!o.value||(typeof e.swiperSlideIndex<"u"&&(f.value.swiperSlideIndex=e.swiperSlideIndex),o.value.destroyed&&r.value!=="swiper-slide"&&(r.value="swiper-slide"))}),L(()=>{!o||!o.value||o.value.off("_slideClass",t)});const p=J(()=>({isActive:r.value.indexOf("swiper-slide-active")>=0,isVisible:r.value.indexOf("swiper-slide-visible")>=0,isPrev:r.value.indexOf("swiper-slide-prev")>=0,isNext:r.value.indexOf("swiper-slide-next")>=0}));D("swiperSlide",p);const l=()=>{s.value=!0};return()=>h(e.tag,{class:W(`${r.value}`),ref:f,"data-swiper-slide-index":typeof e.virtualIndex>"u"&&o&&o.value&&o.value.params.loop?e.swiperSlideIndex:e.virtualIndex,onLoadCapture:l},e.zoom?h("div",{class:"swiper-zoom-container","data-swiper-zoom":typeof e.zoom=="number"?e.zoom:void 0},[d.default&&d.default(p.value),e.lazy&&!s.value&&h("div",{class:"swiper-lazy-preloader"})]):[d.default&&d.default(p.value),e.lazy&&!s.value&&h("div",{class:"swiper-lazy-preloader"})])}};export{le as S,ie as a};
|