"use strict";const e=require("../../../common/vendor.js"),r=require("../../index.js");if(require("../../url/index.js"),require("../../store/index.js"),require("../../store/app.js"),require("../../api/promotion/diy.js"),require("../../request/index.js"),require("../../config/index.js"),require("../../platform/index.js"),require("../../platform/provider/wechat/index.js"),require("../../platform/provider/wechat/miniProgram.js"),require("../../api/member/auth.js"),require("../../api/member/social.js"),require("../../api/member/user.js"),require("../../platform/provider/apple/index.js"),require("../../platform/share.js"),require("../../router/index.js"),require("../../hooks/useModal.js"),require("../../helper/index.js"),require("../../helper/test.js"),require("../../helper/digit.js"),require("../../api/member/signin.js"),require("../../helper/throttle.js"),require("../../platform/pay.js"),require("../../api/pay/order.js"),require("../../store/user.js"),require("../../store/cart.js"),require("../../api/trade/cart.js"),require("../../api/pay/wallet.js"),require("../../api/trade/order.js"),require("../../api/promotion/coupon.js"),require("../../store/sys.js"),require("../../store/modal.js"),require("../../config/zIndex.js"),!Array){e.resolveComponent("su-video")()}Math;const t={__name:"su-swiper",props:{circular:{type:Boolean,default:!0},autoplay:{type:Boolean,default:!1},interval:{type:Number,default:3e3},duration:{type:Number,default:500},mode:{type:String,default:"default"},imageMode:{type:String,default:"scaleToFill"},list:{type:Array,default:()=>[]},dotStyle:{type:String,default:"long"},dotCur:{type:String,default:"ss-bg-opactity-block"},bg:{type:String,default:"bg-none"},height:{type:Number,default:0},imgHeight:{type:Number,default:0},imgTopRadius:{type:Number,default:0},imgBottomRadius:{type:Number,default:0},isPreview:{type:Boolean,default:!1},seizeHeight:{type:Number,default:200}},setup(t){const i=e.reactive({imgHeight:0,cur:0,moveX:0,videoPlaySataus:!1,heightList:[]}),u=e.reactive({videoRef:{}}),o=t,a=e=>{"touch"!==e.detail.source&&"autoplay"!==e.detail.source||(i.cur=e.detail.current,i.videoPlaySataus=!1,"video"===o.list[i.cur].type&&u.videoRef[`video_${i.cur}`].pausePlay())},s=()=>{if(!o.isPreview)return;let r=e.lodashExports.clone(o.list);r.forEach(((e,t)=>{"video"===e.type&&r.splice(t,1)})),e.index.previewImage({urls:r.length<1?[o.src]:r.reduce(((e,r)=>(e.push(r.src),e)),[]),current:i.cur})},l=e=>{},d=e=>{i.moveX=0},p=e=>{o.list[i.cur].currentTime=e.detail.currentTime},n=e.computed((()=>{let e;return 0!==o.height&&(e=o.height),0===o.height&&(0!==i.imgHeight?e=i.imgHeight:0!==o.seizeHeight&&(e=o.seizeHeight)),{height:e+"rpx"}}));function c(e){if(0===o.height){let r=e.detail.height/e.detail.width*750;i.imgHeight<r&&(i.imgHeight=r)}}return(m,g)=>e.e({a:e.f(o.list,((a,l,d)=>e.e({a:"image"===a.type},"image"===a.type?{b:o.imageMode,c:a.src,d:e.o(c,l)}:{e:e.sr((e=>u.videoRef[`video_${l}`]=e),"c43ff05c-0-"+d,{f:1}),f:e=>u.videoRef[`video_${l}`]=e,g:e.o(p,l),h:"c43ff05c-0-"+d,i:e.p({poster:e.unref(r.sheep).$url.cdn(a.poster),src:e.unref(r.sheep).$url.cdn(a.src),index:l,moveX:i.moveX,initialTime:a.currentTime||0,height:t.seizeHeight})},{j:l,k:i.cur==l?1:"",l:e.o((e=>(e=>{"video"===e.type?i.videoPlaySataus=!0:(r.sheep.$router.go(e.url),s())})(a)),l)}))),b:o.circular,c:i.cur,d:o.autoplay&&!i.videoPlaySataus,e:o.interval,f:o.duration,g:e.o(l),h:e.o(d),i:e.s(n.value),j:e.o(a),k:!i.videoPlaySataus},i.videoPlaySataus?{}:e.e({l:"tag"!=o.dotStyle},"tag"!=o.dotStyle?{m:e.f(o.list,((r,t,u)=>({a:t,b:e.n(i.cur==t?"cur":"")}))),n:e.n(o.dotCur),o:e.n(o.dotStyle)}:{},{p:"tag"==o.dotStyle},"tag"==o.dotStyle?{q:e.t(i.cur+1),r:e.t(o.list.length),s:e.n(o.dotCur),t:e.n(o.dotStyle)}:{}),{v:e.n(o.mode),w:e.n(o.bg),x:e.n(o.ui)})}},i=e._export_sfc(t,[["__scopeId","data-v-c43ff05c"]]);wx.createComponent(i);
