System.register(["./chunk-legacy-yjTd2Y_a.js","./chunk-legacy-DSWgnP8V.js","./chunk-legacy-CQbUhQ-O.js","./chunk-legacy-B09Jcn0a.js","./souav-legacy-ptBXoxNy.js","./chunk-legacy-BIshA-mD.js","./chunk-legacy-CqjPx9Fo.js","./chunk-legacy-CQt0kJlv.js","./chunk-legacy-Du0cmR-o.js","./chunk-legacy-CEUc4S30.js","./chunk-legacy-Dq4znTTY.js","./chunk-legacy-DhDQalG_.js","./chunk-legacy-B3dYxnqe.js","./chunk-legacy-DcCKlgmr.js","./chunk-legacy-DpNjDkVD.js","./chunk-legacy-CFPzruGi.js","./chunk-legacy-B8g3VqiH.js","./chunk-legacy-CPNkfuO8.js"],function(e){"use strict";var l,n,t,a,u,c,s,i,o,r,d,h,v,y,g,p,f,x,m,j,k,w;return{setters:[e=>{l=e.a,n=e.S,t=e.P,a=e.N},e=>{u=e.d},e=>{c=e.D},e=>{s=e.r,i=e.C,o=e.b,r=e.o,d=e.P,h=e.S,v=e.R,y=e.N,g=e.B,p=e.O,f=e.H,x=e.U,m=e.M,j=e.u,k=e.W},e=>{w=e.b},null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(P,S){var b=document.createElement("style");b.textContent=".swiper-container[data-v-c1903c20]{height:calc(100dvh - 56px)}\n/*$vite$:1*/",document.head.appendChild(b);const _=u("ShortVideo",()=>{const e=s(0),l=s([]),n=new Map,t=new Map;let a=!1;function u(e,l){const t=`shortVideoPlayerId_${e}`,a=c.initPlayer(t,l);r(e,a),function(e){let l=n.get(e);l&&(l.on("loadedmetadata",()=>{}),l.on("canplay",()=>{h(e)}),l.on("play",()=>{l.video.muted=!1}),l.on("pause",()=>{}),l.on("timeupdate",()=>{null==l||l.video.currentTime}),l.on("seeked",()=>{}),l.on("error",e=>{}))}(e);const u=document.querySelector(`#${t}`).querySelector(".dplayer-controller");if(u){u.style.padding="0px 5px";const e=u.children;for(let n=0;n<Math.min(3,e.length);n++)e[n].style.display="none";const l=u.querySelector(".dplayer-bar-wrap");l.style.width="calc(100% - 10px)",l.style.bottom="0px"}return a}function i(){var l;n.has(e.value)&&t.has(e.value)&&(null===(l=n.get(e.value))||void 0===l||l.play())}function o(){if(n.size>3)return;const t=[e.value-1,e.value,e.value+1];for(let e of t)e>=0&&!n.has(e)&&u(e,l.value[e])}function r(e,l){n.set(e,l)}function d(e){if(n.has(e)){const l=n.get(e);null!=l&&l.destroy(),n.delete(e),t.delete(e)}}function h(l){t.set(l,!0),l===e.value&&i()}return{pageIndex:e,videoList:l,init:function(){o()},loadPlayer:u,onPageChange:function(u){var c;n.has(e.value)&&t.has(e.value)&&null!==(c=n.get(e.value))&&void 0!==c&&c.pause(),e.value=u,i(),o(),function(){if(n.size<=3)return;const l=[e.value-1,e.value,e.value+1];n.forEach((e,n)=>{l.includes(n)||d(n)})}(),!a&&u>=l.value.length-2&&(a=!0)},addPlayer:r,removePlayer:d,onPlayerReady:h}}),I={class:"relative h-full w-full"},z={class:"absolute bottom-1 text-white"},C=i({__name:"ShortVideoItemView",props:{url:{},index:{}},setup(e){const l=e,n=_(),t=`shortVideoPlayerId_${l.index}`;return o(()=>{l.index===n.pageIndex&&n.init()}),r(()=>{}),(e,n)=>(y(),d("div",I,[h("div",{id:t,class:"h-full w-full"}),h("div",z,"播放页: "+v(l.index),1)]))}}),V={class:"w-full overflow-hidden"},$={class:"slide-inner flex h-full w-full items-center justify-center bg-blue-400"},M=i({__name:"index",setup(e){const u=[t,a],c=s(),i=_(),v=e=>{c.value=e},w=()=>{i.onPageChange(c.value.activeIndex)},P=s({height:"0px"});return o(()=>{const e=window.innerHeight;P.value.height=e-56+"px";for(let l=0;l<10;l++)i.videoList.push("https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8")}),r(()=>{}),(e,t)=>(y(),d("div",V,[g(j(n),{class:"",style:k(P.value),direction:"vertical",initialSlide:0,"slides-per-view":1,"space-between":0,speed:300,onSwiper:v,onSlideChange:w,modules:u},{default:p(()=>[(y(!0),d(f,null,x(j(i).videoList,(e,n)=>(y(),m(j(l),{key:n},{default:p(()=>[h("div",$,[g(C,{url:e,index:n},null,8,["url","index"])])]),_:2},1024))),128))]),_:1},8,["style"])]))}});e("default",w(M,[["__scopeId","data-v-c1903c20"]]))}}});
