import{t as N}from"./index-662d0455.js";import{x as Ve,y as de,z as me,h as pe,_ as he}from"./index-4b813511.js";const Ee=()=>{window.cancelAnimationFrame=(()=>window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(r){return window.clearTimeout(r)})(),window.requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(r){return window.setTimeout(r,1e3/60)}}()},ve=(r,c)=>{if(r===c)return!0;if(r.length!==c.length)return!1;for(let l=0;lVue.unref(e)<0),R=Vue.computed(()=>Math.abs(Vue.unref(e))({step:1,limitMoveNum:5,hoverStop:!0,direction:"top",openTouch:!0,singleHeight:0,singleWidth:0,waitTime:1e3,switchOffset:30,autoPlay:!0,navigation:!1,switchSingleStep:134,switchDelay:400,switchDisabledClass:"disabled",isSingleRemUnit:!1})),n=Vue.computed(()=>m({},Vue.unref(G),V)),J=Vue.computed(()=>Vue.unref(q)?"":Vue.unref(n).switchDisabledClass),K=Vue.computed(()=>Vue.unref(R)?"":Vue.unref(n).switchDisabledClass),Q=Vue.computed(()=>({position:"absolute",margin:`${Vue.unref(p)/2}px 0 0 -${Vue.unref(n).switchOffset}px`,transform:"translate(-100%,-50%)"})),Z=Vue.computed(()=>({position:"absolute",margin:`${Vue.unref(p)/2}px 0 0 ${Vue.unref(a)+Vue.unref(n).switchOffset}px`,transform:"translateY(-50%)"})),B=Vue.computed(()=>Vue.unref(n).direction!=="bottom"&&Vue.unref(n).direction!=="top"),W=Vue.computed(()=>Vue.unref(B)?{float:"left",overflow:"hidden"}:{overflow:"hidden"}),ee=Vue.computed(()=>({transform:`translate(${Vue.unref(e)}px,${Vue.unref(u)}px)`,transition:`all ${_} ${Vue.unref(f)}ms`,overflow:"hidden"})),b=Vue.computed(()=>Vue.unref(n).navigation),k=Vue.computed(()=>Vue.unref(b)?!1:Vue.unref(n).autoPlay),L=Vue.computed(()=>s.data.length>=Vue.unref(n).limitMoveNum),I=Vue.computed(()=>Vue.unref(n).hoverStop&&Vue.unref(k)&&Vue.unref(L)),x=Vue.computed(()=>Vue.unref(n).openTouch),Y=Vue.computed(()=>Vue.unref(n).isSingleRemUnit?parseInt(window.getComputedStyle(document.documentElement,null).fontSize):1),T=Vue.computed(()=>Vue.unref(n).singleWidth*Vue.unref(Y)),M=Vue.computed(()=>Vue.unref(n).singleHeight*Vue.unref(Y)),E=Vue.computed(()=>{let t;const o=Vue.unref(n).step;if(Vue.unref(B)?t=Vue.unref(T):t=Vue.unref(M),t>0&&t%o>0)throw"\u5982\u679C\u8BBE\u7F6E\u4E86\u5355\u6B65\u6EDA\u52A8\uFF0Cstep\u9700\u662F\u5355\u6B65\u5927\u5C0F\u7684\u7EA6\u6570\uFF0C\u5426\u5219\u65E0\u6CD5\u4FDD\u8BC1\u5355\u6B65\u6EDA\u52A8\u7ED3\u675F\u7684\u4F4D\u7F6E\u662F\u5426\u51C6\u786E";return o});function ue(){e.value=0,u.value=0,C(),U()}function te(){if(!!Vue.unref(q)){if(Math.abs(Vue.unref(e)){C()},d+20)):C()}function re(t){if(!Vue.unref(x)||t.targetTouches.length>1||t.scale&&t.scale!==1)return;const o=t.targetTouches[0],{direction:i}=Vue.unref(n),d={x:o.pageX-D.x,y:o.pageY-D.y};t.preventDefault();const w=Math.abs(d.x)0&&(u.value=0);else if(o==="bottom"){const i=Vue.unref(A)/2*-1;Vue.unref(u)0&&(e.value=0);else if(o==="right"){const i=Vue.unref(h)*-1;Vue.unref(e){f.value=0,v()},Vue.unref(f))}function ie(){Vue.unref(I)&&ce()}function se(){Vue.unref(I)&&ae()}function v(){S||($=requestAnimationFrame(function(){const t=Vue.unref(A)/2,o=Vue.unref(h)/2,{direction:i,waitTime:d}=Vue.unref(n);i==="top"?(Math.abs(Vue.unref(u))>=t&&(l("scrollEnd"),u.value=0),u.value-=E.value):i==="bottom"?(Vue.unref(u)>=0&&(l("scrollEnd"),u.value=t*-1),u.value+=E.value):i==="left"?(Math.abs(Vue.unref(e))>=o&&(l("scrollEnd"),e.value=0),e.value-=E.value):i==="right"&&(Vue.unref(e)>=0&&(l("scrollEnd"),e.value=o*-1),e.value+=E.value),y&&clearTimeout(y),Vue.unref(M)?Math.abs(Vue.unref(u))%Vue.unref(M){v()},d):v():Vue.unref(T)&&Math.abs(Vue.unref(e))%Vue.unref(T){v()},d):v()}))}function U(){Vue.nextTick(()=>{const{switchDelay:t}=Vue.unref(n);if(g.value="",Vue.unref(B)){p.value=Vue.unref(H).offsetHeight,a.value=Vue.unref(H).offsetWidth;let o=Vue.unref(P).offsetWidth;Vue.unref(k)&&(o=o*2+1),Vue.unref(j).style.width=o+"px",h.value=o}if(Vue.unref(k))_="ease-in",f.value=0;else{_="linear",f.value=t;return}Vue.unref(L)?(g.value=Vue.unref(P).innerHTML,setTimeout(()=>{var o;A.value=(o=Vue.unref(j))==null?void 0:o.offsetHeight,v()},0)):(C(),u.value=e.value=0)})}function ae(){S=!1,v()}function ce(){S=!0,y&&clearTimeout(y),C()}function fe(t){Vue.unref(n).direction==="left"||Vue.unref(n).direction==="right"||me(()=>{t.deltaY>0?u.value-=E.value:u.value+=E.value},50)()}return Ve(()=>{U()}),de(()=>{C(),clearTimeout(y)}),c({reset:ue}),(t,o)=>(Vue.openBlock(),Vue.createElementBlock("div",{ref:"wrap"+Vue.unref(V).key},[Vue.unref(b)?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,style:Vue.normalizeStyle(Vue.unref(Q)),class:Vue.normalizeClass(Vue.unref(J)),onClick:te},[Vue.renderSlot(t.$slots,"left-switch")],6)):Vue.createCommentVNode("",!0),Vue.unref(b)?(Vue.openBlock(),Vue.createElementBlock("div",{key:1,style:Vue.normalizeStyle(Vue.unref(Z)),class:Vue.normalizeClass(Vue.unref(K)),onClick:ne},[Vue.renderSlot(t.$slots,"right-switch")],6)):Vue.createCommentVNode("",!0),Vue.createElementVNode("div",{ref:"realBox"+Vue.unref(V).key,style:Vue.normalizeStyle(Vue.unref(ee)),onMouseenter:ie,onMouseleave:se,onTouchstartPassive:oe,onTouchmovePassive:re,onTouchend:le,onMousewheelPassive:fe},[Vue.createElementVNode("div",{ref:"slotList"+Vue.unref(V).key,style:Vue.normalizeStyle(Vue.unref(W))},[Vue.renderSlot(t.$slots,"default")],4),Vue.createElementVNode("div",{innerHTML:g.value,style:Vue.normalizeStyle(Vue.unref(W))},null,12,Ce)],36)],512))}}),ge=pe(Ae),De=ge,Se=r=>(Vue.pushScopeId("data-v-a10f88bc"),r=r(),Vue.popScopeId(),r),_e={class:"card-header"},Be=Se(()=>Vue.createElementVNode("span",null,"\u65E0\u7F1D\u6EDA\u52A8\u793A\u4F8B",-1)),be={class:"item"},ke=["textContent"],xe=Vue.defineComponent({name:"SeamlessScroll"}),Te=Vue.defineComponent({...xe,setup(r){const c=Vue.ref(),l=Vue.ref([{title:"\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E00\u884C\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E00\u884C\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01"},{title:"\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E8C\u884C\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E8C\u884C\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01"},{title:"\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E09\u884C\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E09\u884C\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01"},{title:"\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u56DB\u884C\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u56DB\u884C\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01"},{title:"\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E94\u884C\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E94\u884C\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01"},{title:"\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u516D\u884C\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u516D\u884C\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01"},{title:"\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E03\u884C\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E03\u884C\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01"},{title:"\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u516B\u884C\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u516B\u884C\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01"},{title:"\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E5D\u884C\u65E0\u7F1D\u6EDA\u52A8\u7B2C\u4E5D\u884C\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01\uFF01"}]),s=Vue.reactive({direction:"top"});function F(m){Vue.unref(c).reset(),Vue.unref(s).direction=m}return(m,e)=>{const u=Vue.resolveComponent("el-button"),f=Vue.resolveComponent("el-card"),p=Vue.resolveComponent("el-space");return Vue.openBlock(),Vue.createBlock(p,{wrap:""},{default:Vue.withCtx(()=>[Vue.createVNode(f,{class:"box-card"},{header:Vue.withCtx(()=>[Vue.createElementVNode("div",_e,[Be,Vue.createVNode(u,{class:"button",link:"",type:"primary",onClick:e[0]||(e[0]=a=>F("top"))},{default:Vue.withCtx(()=>[Vue.createElementVNode("span",{style:Vue.normalizeStyle({color:s.direction==="top"?"red":""})}," \u5411\u4E0A\u6EDA\u52A8 ",4)]),_:1}),Vue.createVNode(u,{class:"button",link:"",type:"primary",onClick:e[1]||(e[1]=a=>F("bottom"))},{default:Vue.withCtx(()=>[Vue.createElementVNode("span",{style:Vue.normalizeStyle({color:s.direction==="bottom"?"red":""})}," \u5411\u4E0B\u6EDA\u52A8 ",4)]),_:1}),Vue.createVNode(u,{class:"button",link:"",type:"primary",onClick:e[2]||(e[2]=a=>F("left"))},{default:Vue.withCtx(()=>[Vue.createElementVNode("span",{style:Vue.normalizeStyle({color:s.direction==="left"?"red":""})}," \u5411\u5DE6\u6EDA\u52A8 ",4)]),_:1}),Vue.createVNode(u,{class:"button",link:"",type:"primary",onClick:e[3]||(e[3]=a=>F("right"))},{default:Vue.withCtx(()=>[Vue.createElementVNode("span",{style:Vue.normalizeStyle({color:s.direction==="right"?"red":""})}," \u5411\u53F3\u6EDA\u52A8 ",4)]),_:1})])]),default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(De),{ref_key:"scroll",ref:c,data:l.value,"class-option":s,class:"warp"},{default:Vue.withCtx(()=>[Vue.createElementVNode("ul",be,[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(l.value,(a,h)=>(Vue.openBlock(),Vue.createElementBlock("li",{key:h},[Vue.createElementVNode("span",{class:"title",textContent:Vue.toDisplayString(a.title)},null,8,ke)]))),128))])]),_:1},8,["data","class-option"])]),_:1})]),_:1})}}});const $e=he(Te,[["__scopeId","data-v-a10f88bc"]]);export{$e as default};