cafe-video-player 2.0.21 → 2.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import {b}from'./chunk-7CZEUDNW.mjs';import {a as a$3}from'./chunk-NFS5ZBFX.mjs';import {b as b$1,a as a$4}from'./chunk-6R7UYUPZ.mjs';import {i,a as a$1,k,f as f$1,g,d,h,j}from'./chunk-P6UV7U4E.mjs';import {ea,ca,da,aa,la,na,f,B,D,G,A,fa,z as z$1,Aa,M,r,ia,ha,Ba,ja,a as a$2,C,ma,P,E,q,sa,h as h$1,qa,O,R,$,ba,k as k$1,l,oa}from'./chunk-LHO7HY26.mjs';import {a}from'./chunk-6567FIPA.mjs';import {e}from'./chunk-DBPGS72Q.mjs';import {memo,forwardRef,useState,useRef,useEffect}from'react';import {shallowEqual}from'react-redux';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import Se from'next/legacy/image';import {createPortal}from'react-dom';import Xo from'next/dynamic';e();e();e();var ol=()=>{let{details:e,params:o}=ea(({videoData:{details:l,params:i}})=>({details:l,params:i}),shallowEqual);return jsx("div",{className:`pl-w-full pl-max-w-[80%] pl-truncate pl-text-left pl-ml-4 pl-text-[16px] pl-font-normal pl-text-white pl-break-words pl-self-start animate__animated animate__faster ${ca("isActiveElements")?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:ca("hasTitle")?e.title:o.id})},Et=ol;e();var rl=()=>jsxs("div",{className:`pl-relative animate__animated animate__faster ${ca("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsx(Se,{src:a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>h("unlock")}),!localStorage.getItem("unlock-click")&&jsx("p",{className:"pl-text-[10px] pl-text-black/[0.87] pl-bg-[#F7F7F7] pl-absolute pl-left-0 pl-px-4 pl-py-3 pl-rounded-[8px] pl-w-max",children:"\u0628\u0631\u0627\u06CC \u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0642\u0641\u0644\u060C \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F"})]}),Lt=rl;var pl=()=>(ea(({controller:{lock:e,activeElements:o}})=>({lock:e,activeElements:o}),shallowEqual),jsxs("div",{className:`pl-flex pl-items-start pl-justify-end pl-mx-4 pl-mt-5 ${ca("isTouchScreenPortrait")?"pl-h-[16px]":"pl-h-[60px]"}`,children:[ca("showTitle")&&jsx(Et,{}),ca("isLock")&&jsx(Lt,{})]})),At=pl;e();e();var cl=()=>(ea(({controller:{play:e}})=>({play:e}),shallowEqual),ea(({videoData:{videoElementSizeInfo:e,params:o}})=>({videoElementSizeInfo:e,params:o}),shallowEqual),jsx("div",{className:`${!ca("isTouchScreen")&&"hover:pl-scale-125"} pl-transition-transform pl-ease-in-out pl-cursor-pointer`,onContextMenu:e=>e.preventDefault(),children:jsx(Se,{alt:"",src:ca("isPlay")?a.bigPause:a.bigPlay,width:40,height:40,onClick:e=>a$1(e),onDoubleClick:e=>e.stopPropagation(),className:`${ca("isPlay")?"pl-big-play-icon":"pl-big-pause-icon"}`})})),$t=cl;e();var dl=()=>jsxs("div",{className:"loader-spinner pl-absolute pl-top-[50%] pl-left-[50%] pl-mt-[-50px] pl-ml-[-42px] pl-w-screen pl-h-full pl-overflow-hidden",children:[jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"})]}),_t=dl;var fl=()=>{let[e,o]=useState(!1),[l,i]=useState(!1);ea(({controller:{lock:c,firstPlay:a}})=>({lock:c,firstPlay:a}),shallowEqual);let{activeElements:r,isLoading:p}=ea(({controller:{activeElements:c,isLoading:a}})=>({activeElements:c,isLoading:a}),shallowEqual);return useEffect(()=>{let c=null;return ca("isFirstPlay")||ca("isActiveElements")?c=setTimeout(()=>i(!0),100):i(!1),()=>clearTimeout(c)},[r]),useEffect(()=>{let c;return ca("isLoading")?c=setTimeout(()=>o(!0),ca("isFirstPlay")?0:b$1):o(!1),()=>{clearTimeout(c),o(!1);}},[p]),jsx("main",{className:"pl-flex-1 pl-mt-1",children:e?jsx(_t,{}):jsx(Fragment,{children:l&&!ca("isLock")&&jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${ca("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:jsxs("div",{className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:3},children:[!ca("isFirstPlay")&&jsx(a$3,{type:"forward"}),jsx($t,{}),!ca("isFirstPlay")&&jsx(a$3,{type:"backward"})]})})})})},qt=fl;e();e();e();e();var Qe=e=>{let{videoElementSizeInfo:o}=M.getState().videoData,{duration:l}=M.getState().controller,i=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(i<=o.right&&i>0)return (i-o.left)/o.width*l},J=e=>{let{videoElementSizeInfo:o}=M.getState().videoData,l=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(l<=o.right&&l>0)return l-o.left},Rt=e=>{let{duration:o}=M.getState().controller;return e*ia()/o},ve=e=>{e&&(e.style.opacity="0.0",e.style.pointerEvents="none",e.style.zIndex=-2);},gl=e=>{e.style.display="block",e.style.zIndex=5,e.style.opacity=M.getState().videoData.details.vtt?"1.0":"0.6",e.style.pointerEvents="auto",e.style.transition="opacity 1s ease-out";},xl=(e,o)=>{let{videoElementSizeInfo:l}=M.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(J(e)>i.getBoundingClientRect().width/2&&J(e)<l.right-l.left-i.getBoundingClientRect().width/2?o.style.left=`${J(e)-i.offsetWidth/2}px`:J(e)<(r.offsetLeft===0?i.offsetWidth:r.offsetLeft)?o.style.left="0px":fa().offsetLeft+fa().offsetWidth<J(e)+i.offsetWidth&&(o.style.left=`${fa().offsetWidth-i.offsetWidth}px`));},bl=(e,o,l)=>{o&&gl(o),M.getState().videoData.details.vtt?xl(e,o):o.style.left=`${J(e)-30}px`,M.dispatch(q(Number(Qe(e)))),l.textContent=`${P(Qe(e))}`;},ge=(e,o=!1)=>{let{videoElementSizeInfo:l}=M.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),p=e.clientX!==void 0?e.clientX:e.touches[0].clientX;i&&r&&p<=l.right&&p>l.left?(bl(e,i,r),o&&setTimeout(()=>ve(i),2e3)):ve(i);},Xt=e=>{let o=e.clientX!==void 0?e.clientX:e.touches[0].clientX;ha()&&(o<=e.view.innerWidth&&o>0?ha().style.width=`${J(e)}px`:o<=e.view.innerWidth?ha().style.width=0:o>0&&(ha().style.width="100%"));},Ht=(e,o,l$1)=>{e.preventDefault(),e.stopPropagation(),l$1(!0);let i=M.dispatch,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX;r<=e.view.innerWidth&&r>0&&(i(k$1(!0)),i(l(!0)),sessionStorage.setItem("previousVideoTime",String(fa().currentTime)),e.target.setPointerCapture(e.pointerId),o.length>0&&o.map(p=>clearTimeout(p)));},Ze=e=>{e.preventDefault(),e.stopPropagation();let o=M.dispatch,{activePointerProgressBar:l$1}=M.getState().controller,{left:i}=M.getState().videoData.videoElementSizeInfo,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX,p=document.querySelector(".pl-progressTooltip");r>i?(p&&(p.style.display="block !important",p.style.pointerEvents="auto"),l$1&&(o(l(!0)),ge(e),Xt(e),fa().pause())):p&&(p.style.display="none !important",p.style.pointerEvents="none");},Ut=(e,o,l$1,i$1)=>{i$1(!1),e.preventDefault(),e.stopPropagation();let r=M.dispatch,{duration:p}=M.getState().controller,{left:c,right:a}=M.getState().videoData.videoElementSizeInfo;e.target.removeEventListener("pointermove",Ze);let f=e.clientX!==void 0?e.clientX:e.touches[0].clientX,d=0;f>c&&f<a?d=Qe(e):f<c?d=0:f>0&&(d=p),ca("isStaticFormat")||i(fa().currentTime,d),fa().currentTime=d,M.getState().controller.activePointerProgressBar&&(r(k$1(!1)),r(l(!1)),fa().play(),ge(e,!0),sessionStorage.setItem("current-time",String(d)),Xt(e),Sl(e,r,o,l$1));},Sl=(e,o,l,i)=>{let r=i,p=setTimeout(()=>{let{settingPopover:c}=M.getState().popovers,{delayTurnOffControlbar:a}=M.getState().controller;e.pointerType==="touch"&&!c&&a&&o(f(!1));},a$4);r.push(p),l(r);},Wt=()=>{let e=Date.now();fa().play().then(()=>la(oa(Date.now()-e)));},Gt=e=>ge(e),Qt=()=>{let e=document.querySelector(".pl-progressTooltip");ve(e);},yl=e=>{let o=e.split("."),i=o[0].split(":");return {milliseconds:parseInt(o[1],10)||0,seconds:parseInt(i.pop(),10)||0,minutes:parseInt(i.pop(),10)||0,hours:parseInt(i.pop(),10)||0}},zt=e=>{let o=yl(e);return parseInt(o.hours*(60*60)+o.minutes*60+o.seconds+o.milliseconds/1e3,10)},wl=e=>{let o=e.split(/#xywh=/i),l=o[0],r=o[1].match(/[0-9]+/gi);return {x:r[0],y:r[1],w:r[2],h:r[3],image:l}},Tl=(e,o)=>e.indexOf("//")>=0?e:o.indexOf("//")===0?[o.replace(/\/$/gi,""),e.trim()].join("/"):o.indexOf("//")>0?[o.trim(),e.trim()].join("/"):e,Pl=(e,o)=>{let l={},i=o.split(/\/\w+\.vtt\s?/)[0];if(e=Tl(e,i),!e.match(/#xywh=/i))return l.background='url("'+e+o.split(/\/\w+\.vtt\s?/)[1]+'")',l;let r=wl(e);return l.background='url("'+r.image+o.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+r.x+"px -"+r.y+"px",l.width=r.w+"px",l.height=r.h+"px",l.url=r.image,l},Zt=(e,o)=>{fetch(e).then(l=>{if(!l.ok)throw M.dispatch(r({...M.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return l.text()}).then(l=>{let i=[];l.split(/[\r\n][\r\n]/i).forEach(p=>{if(p.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)){let c=p.split(/[\r\n]/i),f=c[0].split(/ ?--> ?/i),d=f[0],P=f[1],u=c[1],b=Pl(u,e);i.push({start:zt(d),end:zt(P),css:b});}}),o(i);}).catch(l=>{console.error("Error fetching file:",l);});},Yt=(e,o,l)=>{for(let i=0;i<o.length;++i){let r=o[i];if(e>=r.start&&e<r.end){if(r.css.url&&!l[r.css.url]){let p={background:r.css.background,width:r.css.width,height:r.css.height};return l[r.css.url]=p,p}else if(r.css.url)return l[r.css.url]}}};var Nl=()=>{let{details:e}=ea(({videoData:{details:a}})=>({details:a}),shallowEqual),{tooltipTime:o}=ea(({controller:{tooltipTime:a,activeElements:f,isFullScreen:d}})=>({tooltipTime:a,activeElements:f,isFullScreen:d}),shallowEqual),l={},[i,r]=useState(void 0),[p,c]=useState(ca("isTouchScreen")?e.vtt_mobile:e.vtt);return useEffect(()=>{c(e.vtt_mobile);},[e.vtt_mobile]),useEffect(()=>{p&&Zt(e.vtt_mobile,r);},[p]),ca("isActiveElements")?jsxs("div",{className:`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[calc(100%+10px)] pl-px-[10px] pl-pt-[5px] pl-mr-[-25px] pl-text-white pl-text-[14px] ${p&&i?"":"pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,children:[p&&!!i&&jsx("div",{className:"pl-flex-1 pl-border pl-border-white pl-rounded-[8px] pl-mb-2",children:jsx("div",{className:"pl-rounded-[8px]",style:Yt(o,i,l)})}),jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsx(Fragment,{})},eo=memo(Nl);e();e();var Ll=(e,o)=>{useEffect(()=>{let l=i=>{!e.current||e.current.contains(i.target)||o(i);};return document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("touchstart",l);}},[e,o]);},z=Ll;e();var Ml=({name:e,className:o,dataMarker:l})=>jsx("img",{"data-marker":l,src:`${ja()}/${e}.png`,alt:e,className:o}),xe=Ml;var $l=()=>{da();let {duration:o,activeElements:l}=ea(({controller:{duration:m,activeElements:w,isFullScreen:U}})=>({duration:m,activeElements:w,isFullScreen:U}),shallowEqual),{markers:i$1}=ea(({videoData:{markers:m,videoElementSizeInfo:w}})=>({markers:m,videoElementSizeInfo:w}),shallowEqual),[r,p]=useState(void 0),[c,a]=useState([]),[f,d]=useState({}),[P,u]=useState(!1),b=m=>o?ia()*m/o:0,F=(m,w,U,j,ee,te,ce,qe)=>{m.stopPropagation();let oe=24*w/(ia()+5),le=[],Re=0;qe.map(W=>{W.time>w-oe&&W.time<w+oe&&(le.push(W),Re+=W.time);}),le.length>1?a(le):(le=[],a([]),h(m,w,U,j,ee,te,ce));},h=(m,w,U,j,ee,te,ce)=>{m.stopPropagation(),ge(m,ce),i(fa().currentTime,w),fa().currentTime=w,ha()&&(ha().style.width=b(w)),la(Ba(U,w,j,ee,te));};useEffect(()=>{ca("isActiveElements")||a([]);},[l]);let C=useRef(null);z(C,()=>a([])),useEffect(()=>{if(c.length>0){let m=aa(document.getElementsByClassName("pl-overlapMarkers")[0]);if(m==="inViewport")return u(!0),d({left:b(c[0].time)});if(m==="OutViewPortFromLeft")return u(!1),d({left:0});if(m==="OutViewPortFromRight")return u(!1),d({right:0})}},[c,document.getElementsByClassName("pl-overlapMarkers")[0]]);let M=m=>{m.preventDefault(),ca("isTouchScreen")&&p(Number(m.target.getAttribute("data-marker")));};return jsxs(Fragment,{children:[i$1.map(m=>jsx("div",{onContextMenu:M,"data-marker":m.time,onClick:w=>F(w,m.time,m.id,m.title,m.description,m.sticker,!0,i$1),onDoubleClick:w=>w.stopPropagation(),children:jsxs("div",{className:`pl-emoji-image pl-absolute pl-bottom-[200%] pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-p-1 ${ca("isTouchScreenPortrait"),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:b(m.time),zIndex:6},"data-marker":m.time,children:[m.isPersonal!==null&&m.isPersonal!==void 0&&jsx("div",{className:"pl-absolute pl-rounded-full pl-top-[-2px] pl-right-[-1px] pl-bg-main pl-w-2 pl-h-2"}),jsx(xe,{dataMarker:m.time,name:m.sticker,className:"pl-w-[16px] pl-h-[16px] !pl-max-w-max"})]})},m.id)),c.length>0&&jsx("div",{className:`pl-overlapMarkers ${P?"pl-overlayMarkersInViewport":"pl-overlayMarkersOutViewport"} pl-absolute pl-bottom-[45px] pl-px-1 pl-py-2 pl-flex pl-gap-3 pl-flex-row-reverse pl-justify-end pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-ml-[-10px] animate__animated animate__fadeInUp pl-opacity-100`,ref:C,style:f,children:c.map(m=>jsx("div",{className:"pl-emoji-image pl-rounded-[6px] pl-cursor-pointer","data-marker":m.time,onClick:w=>h(w,m.time,m.id,m.title,m.description,m.sticker,!0),onDoubleClick:w=>w.stopPropagation(),children:jsx(xe,{dataMarker:m.time,name:m.sticker,className:"pl-w-[24px] pl-h-[24px] !pl-max-w-max"})},m.id))})]})},io=memo($l);var Bl=()=>{let[e,o]=useState(!1);useEffect(()=>{ve(document.querySelector(".progressTooltip"));},[]);let{duration:l,currentTime:i,bufferedTimeWidth:r}=ea(({controller:{duration:a,currentTime:f,bufferedTimeWidth:d}})=>({duration:a,currentTime:f,bufferedTimeWidth:d}),shallowEqual);ea(({videoData:{params:a,videoElementSizeInfo:f}})=>({params:a,videoElementSizeInfo:f}),shallowEqual);let[p,c]=useState([]);return jsxs("div",{className:`${ca("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative`,children:[jsxs("div",{className:"pl-relative",children:[jsx(eo,{}),jsx(io,{})]}),jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:a=>Ht(a,p,o),onPointerMove:Ze,onPointerUp:a=>Ut(a,c,p,o),onMouseMove:Gt,onMouseOut:Qt,onClick:Wt,onDoubleClick:a=>a.stopPropagation(),children:jsxs("div",{id:"progress-area",className:"pl-w-full pl-absolute",children:[jsx("div",{className:"pl-w-full pl-h-[40px]"}),jsxs("div",{id:"time-progress-area",className:"!pl-w-full !pl-h-[5px] pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-gray-highLight pl-rounded",style:{transform:e?"scaleY(1.8)":"unset"},children:[jsx("div",{id:"time-progress-buffer",className:"pl-absolute pl-h-[5px] pl-bg-z-gray-400/[0.7] pl-rounded",style:{width:`${r}%`}}),jsx("div",{id:"time-progress-bar",className:`pl-h-[5px] pl-rounded pl-relative pl-cursor-pointer pl-bg-primary before:pl-bg-primary before:pl-inline-block before:pl-w-4 before:pl-h-4 ${e&&"before:pl-w-7 before:pl-h-3"}`,style:{width:`${i/l*ia()}px`}})]})]})})]})},no=Bl;e();e();e();var Vl=({title:e,className:o})=>jsx("span",{className:`pl-absolute pl-w-max pl-bg-paper pl-text-white/[0.9] ${ca("isFullScreen")?"pl-bottom-[300%]":"pl-bottom-[270%]"} pl-rounded-[8px] pl-text-[10px] pl-px-4 pl-py-[13px] pl-font-normal ${o}`,children:e}),L=Vl;var Ul=()=>{let{isFullScreen:e}=ea(({controller:{firstPlay:r,isFullScreen:p}})=>({firstPlay:r,isFullScreen:p}),shallowEqual),[o,l]=useState(!1),i=da();return useEffect(()=>{ca("isFirstPlay")||i(f(!1));},[e]),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(Se,{src:ca("isFullScreen")?a.nonFullScreen:a.fullScreen,alt:"fullScreen-icon",className:"pl-cursor-pointer",width:20,height:20,onMouseOver:()=>!ca("isTouchScreen")&&l(!0),onMouseLeave:()=>!ca("isTouchScreen")&&l(!1),onClick:()=>{f$1(),g();}}),o&&jsx(L,{title:`${ca("isFullScreen")?"\u062E\u0631\u0648\u062C \u0627\u0632":""} \u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647`})]})},ao=Ul;e();var Yl=()=>{let[e,o]=useState(!1),l=da(),{params:i,details:r}=ea(({videoData:{params:p,details:c}})=>({params:p,details:c}),shallowEqual);return jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(Se,{alt:"",onMouseOver:()=>!ca("isTouchScreen")&&o(!0),onMouseLeave:()=>!ca("isTouchScreen")&&o(!1),src:a.pictureInPicture,width:20,height:20,className:"pl-flex pl-cursor-pointer",onClick:()=>{i.onClickMiniPlayerIcon&&(localStorage.removeItem("close-miniPlayer"),fa().pause(),l(a$2(!1)),i.onClickMiniPlayerIcon({video:r||void 0,id:i.type==="vod"?i.id:window.btoa(i.id),type:i.type,currentTime:fa().currentTime}));}}),e&&jsx(L,{title:"\u062A\u0635\u0648\u06CC\u0631 \u062F\u0631 \u062A\u0635\u0648\u06CC\u0631"})]})},co=Yl;e();var oi=()=>{let[e,o]=useState(!1),l=da(),{settings:i}=ea(({user:{settings:a}})=>({settings:a}),shallowEqual),r=useRef(i.volume),p=()=>{if(r.current!==i.volume){let{settings:a}=M.getState().user;la(sa(r.current,a.volume)),r.current=a.volume,l(G({...a,volume:a.volume}));}},c=a=>{let{settings:f}=M.getState().user;a==="mute"?(d(0),la(sa(f.volume,0))):(la(sa(f.volume,100)),d(100));};return jsxs("div",{className:"pl-relative pl-inline-flex pl-items-center pl-gap-2 pl-sound-icon",children:[!ca("isTouchScreen")&&jsx("input",{onMouseUp:p,type:"range",min:"0",max:"100",value:i.volume,onChange:a=>d(+a.target.value),className:"pl-soundVolume pl-cursor-pointer rounded-full",style:{background:`linear-gradient(to right, white ${i.volume}%, rgba(255,255,255,0.3) 0)`}}),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(Se,{src:ca("hasSound")?a.unMute:a.mute,alt:ca("hasSound")?"unmute-icon":"mute-icon",className:"pl-flex pl-items-center pl-cursor-pointer",width:20,height:20,onClick:()=>ca("hasSound")?c("mute"):c("unmute"),onDoubleClick:a=>a.stopPropagation(),onMouseOver:()=>!ca("isTouchScreen")&&o(!0),onMouseLeave:()=>!ca("isTouchScreen")&&o(!1)}),e&&jsx(L,{className:"pl-left-0",title:"\u0635\u062F\u0627"})]})]})},fo=oi;e();e();e();var li=({className:e,onClick:o})=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:o,children:[jsx("path",{d:"M6 6L18.7742 18.7742",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M6 18.7744L18.7742 6.00022",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),vo=li;var go=forwardRef(({children:e,status:o,onClose:l,type:i,classNames:r,parentClassNames:p,styles:c,isBlurBackground:a,isFullHeight:f=!1,isHeader:d,isHasCatchUpLineOnTop:P=!1,animation:u,scrollbar:b=!1,isFocusOnInput:F=!1,headerTitle:h="",customHeader:C,headerClassName:M,showCloseIcon:m=!0},w)=>{let[U,j]=useState(o),[ee,te]=useState(0),[ce,qe]=useState(0),{videoElementSizeInfo:ze}=ea(({videoData:{videoElementSizeInfo:q}})=>({videoElementSizeInfo:q}),shallowEqual),oe=useRef(0);useEffect(()=>{let q;return o?j(!0):q=setTimeout(()=>{l(!1),te(0),j(!1);},500),()=>clearTimeout(q)},[o]);let le=q=>{let el=document.getElementById("popover-content");oe.current||(oe.current=window.innerHeight-ze.top-el?.getBoundingClientRect().top),q.stopPropagation(),window.innerHeight-ze.top-q.touches[0].clientY<oe.current&&te(window.innerHeight-q.touches[0].clientY),qe(1000005);},Re=()=>{l();},W=jsxs(Fragment,{children:[a&&jsx("div",{className:`pl-bg-black/[0.5] pl-w-screen pl-h-screen pl-fixed pl-top-0 pl-right-0 animate__animated animate__faster ${o?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:1000001}}),jsx("div",{className:`${i==="modal"&&"pl-fixed pl-top-0 pl-left-0 pl-flex pl-w-full pl-h-full pl-justify-center pl-items-end sm:pl-items-center"} ${p}`,style:{zIndex:f&&!F?ce:1000004},children:jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9]
1
+ import {b}from'./chunk-7CZEUDNW.mjs';import {a as a$3}from'./chunk-NFS5ZBFX.mjs';import {b as b$1,a as a$4}from'./chunk-6R7UYUPZ.mjs';import {i,a as a$1,k,f as f$1,g,d,h,j}from'./chunk-P6UV7U4E.mjs';import {ea,ca,da,aa,la,na,f,B,D,G,A,fa,z as z$1,Aa,M,r,ia,ha,Ba,ja,a as a$2,C,ma,P,E,q,sa,h as h$1,qa,O,R,$,ba,k as k$1,l,oa}from'./chunk-LHO7HY26.mjs';import {a}from'./chunk-6567FIPA.mjs';import {e}from'./chunk-DBPGS72Q.mjs';import {memo,forwardRef,useState,useRef,useEffect}from'react';import {shallowEqual}from'react-redux';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import Se from'next/legacy/image';import {createPortal}from'react-dom';import Xo from'next/dynamic';e();e();e();var ol=()=>{let{details:e,params:o}=ea(({videoData:{details:l,params:i}})=>({details:l,params:i}),shallowEqual);return jsx("div",{className:`pl-w-full pl-max-w-[80%] pl-truncate pl-text-left pl-ml-4 pl-text-[16px] pl-font-normal pl-text-white pl-break-words pl-self-start animate__animated animate__faster ${ca("isActiveElements")?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:ca("hasTitle")?e.title:o.id})},Et=ol;e();var rl=()=>jsxs("div",{className:`pl-relative animate__animated animate__faster ${ca("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsx(Se,{src:a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>h("unlock")}),!localStorage.getItem("unlock-click")&&jsx("p",{className:"pl-text-[10px] pl-text-black/[0.87] pl-bg-[#F7F7F7] pl-absolute pl-left-0 pl-px-4 pl-py-3 pl-rounded-[8px] pl-w-max",children:"\u0628\u0631\u0627\u06CC \u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0642\u0641\u0644\u060C \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F"})]}),Lt=rl;var pl=()=>(ea(({controller:{lock:e,activeElements:o}})=>({lock:e,activeElements:o}),shallowEqual),jsxs("div",{className:`pl-flex pl-items-start pl-justify-end pl-mx-4 pl-mt-5 ${ca("isTouchScreenPortrait")?"pl-h-[16px]":"pl-h-[60px]"}`,children:[ca("showTitle")&&jsx(Et,{}),ca("isLock")&&jsx(Lt,{})]})),At=pl;e();e();var cl=()=>(ea(({controller:{play:e}})=>({play:e}),shallowEqual),ea(({videoData:{videoElementSizeInfo:e,params:o}})=>({videoElementSizeInfo:e,params:o}),shallowEqual),jsx("div",{className:`${!ca("isTouchScreen")&&"hover:pl-scale-125"} pl-transition-transform pl-ease-in-out pl-cursor-pointer`,onContextMenu:e=>e.preventDefault(),children:jsx(Se,{alt:"",src:ca("isPlay")?a.bigPause:a.bigPlay,width:40,height:40,onClick:e=>a$1(e),onDoubleClick:e=>e.stopPropagation(),className:`${ca("isPlay")?"pl-big-play-icon":"pl-big-pause-icon"}`})})),$t=cl;e();var dl=()=>jsxs("div",{className:"loader-spinner pl-absolute pl-top-[50%] pl-left-[50%] pl-mt-[-50px] pl-ml-[-42px] pl-w-screen pl-h-full pl-overflow-hidden",children:[jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"}),jsx("div",{className:"pl-bg-white"})]}),_t=dl;var fl=()=>{let[e,o]=useState(!1),[l,i]=useState(!1),{firstPlay:r}=ea(({controller:{lock:a,firstPlay:f}})=>({lock:a,firstPlay:f}),shallowEqual),{activeElements:p,isLoading:u}=ea(({controller:{activeElements:a,isLoading:f}})=>({activeElements:a,isLoading:f}),shallowEqual);return useEffect(()=>{let a=null;return ca("isFirstPlay")||ca("isActiveElements")?a=setTimeout(()=>i(!0),100):i(!1),()=>clearTimeout(a)},[p]),useEffect(()=>{let a;return ca("isLoading")?a=setTimeout(()=>o(!0),ca("isFirstPlay")?0:b$1):o(!1),()=>{clearTimeout(a),o(!1);}},[u,r]),jsx("main",{className:"pl-flex-1 pl-mt-1",children:e?jsx(_t,{}):jsx(Fragment,{children:l&&!ca("isLock")&&jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${ca("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:jsxs("div",{className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:3},children:[!ca("isFirstPlay")&&jsx(a$3,{type:"forward"}),jsx($t,{}),!ca("isFirstPlay")&&jsx(a$3,{type:"backward"})]})})})})},qt=fl;e();e();e();e();var Qe=e=>{let{videoElementSizeInfo:o}=M.getState().videoData,{duration:l}=M.getState().controller,i=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(i<=o.right&&i>0)return (i-o.left)/o.width*l},J=e=>{let{videoElementSizeInfo:o}=M.getState().videoData,l=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(l<=o.right&&l>0)return l-o.left},Rt=e=>{let{duration:o}=M.getState().controller;return e*ia()/o},ve=e=>{e&&(e.style.opacity="0.0",e.style.pointerEvents="none",e.style.zIndex=-2);},gl=e=>{e.style.display="block",e.style.zIndex=5,e.style.opacity=M.getState().videoData.details.vtt?"1.0":"0.6",e.style.pointerEvents="auto",e.style.transition="opacity 1s ease-out";},xl=(e,o)=>{let{videoElementSizeInfo:l}=M.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(J(e)>i.getBoundingClientRect().width/2&&J(e)<l.right-l.left-i.getBoundingClientRect().width/2?o.style.left=`${J(e)-i.offsetWidth/2}px`:J(e)<(r.offsetLeft===0?i.offsetWidth:r.offsetLeft)?o.style.left="0px":fa().offsetLeft+fa().offsetWidth<J(e)+i.offsetWidth&&(o.style.left=`${fa().offsetWidth-i.offsetWidth}px`));},bl=(e,o,l)=>{o&&gl(o),M.getState().videoData.details.vtt?xl(e,o):o.style.left=`${J(e)-30}px`,M.dispatch(q(Number(Qe(e)))),l.textContent=`${P(Qe(e))}`;},ge=(e,o=!1)=>{let{videoElementSizeInfo:l}=M.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),p=e.clientX!==void 0?e.clientX:e.touches[0].clientX;i&&r&&p<=l.right&&p>l.left?(bl(e,i,r),o&&setTimeout(()=>ve(i),2e3)):ve(i);},Xt=e=>{let o=e.clientX!==void 0?e.clientX:e.touches[0].clientX;ha()&&(o<=e.view.innerWidth&&o>0?ha().style.width=`${J(e)}px`:o<=e.view.innerWidth?ha().style.width=0:o>0&&(ha().style.width="100%"));},Ht=(e,o,l$1)=>{e.preventDefault(),e.stopPropagation(),l$1(!0);let i=M.dispatch,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX;r<=e.view.innerWidth&&r>0&&(i(k$1(!0)),i(l(!0)),sessionStorage.setItem("previousVideoTime",String(fa().currentTime)),e.target.setPointerCapture(e.pointerId),o.length>0&&o.map(p=>clearTimeout(p)));},Ze=e=>{e.preventDefault(),e.stopPropagation();let o=M.dispatch,{activePointerProgressBar:l$1}=M.getState().controller,{left:i}=M.getState().videoData.videoElementSizeInfo,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX,p=document.querySelector(".pl-progressTooltip");r>i?(p&&(p.style.display="block !important",p.style.pointerEvents="auto"),l$1&&(o(l(!0)),ge(e),Xt(e),fa().pause())):p&&(p.style.display="none !important",p.style.pointerEvents="none");},Ut=(e,o,l$1,i$1)=>{i$1(!1),e.preventDefault(),e.stopPropagation();let r=M.dispatch,{duration:p}=M.getState().controller,{left:u,right:a}=M.getState().videoData.videoElementSizeInfo;e.target.removeEventListener("pointermove",Ze);let f=e.clientX!==void 0?e.clientX:e.touches[0].clientX,c=0;f>u&&f<a?c=Qe(e):f<u?c=0:f>0&&(c=p),ca("isStaticFormat")||i(fa().currentTime,c),fa().currentTime=c,M.getState().controller.activePointerProgressBar&&(r(k$1(!1)),r(l(!1)),fa().play(),ge(e,!0),sessionStorage.setItem("current-time",String(c)),Xt(e),Sl(e,r,o,l$1));},Sl=(e,o,l,i)=>{let r=i,p=setTimeout(()=>{let{settingPopover:u}=M.getState().popovers,{delayTurnOffControlbar:a}=M.getState().controller;e.pointerType==="touch"&&!u&&a&&o(f(!1));},a$4);r.push(p),l(r);},Wt=()=>{let e=Date.now();fa().play().then(()=>la(oa(Date.now()-e)));},Gt=e=>ge(e),Qt=()=>{let e=document.querySelector(".pl-progressTooltip");ve(e);},yl=e=>{let o=e.split("."),i=o[0].split(":");return {milliseconds:parseInt(o[1],10)||0,seconds:parseInt(i.pop(),10)||0,minutes:parseInt(i.pop(),10)||0,hours:parseInt(i.pop(),10)||0}},zt=e=>{let o=yl(e);return parseInt(o.hours*(60*60)+o.minutes*60+o.seconds+o.milliseconds/1e3,10)},wl=e=>{let o=e.split(/#xywh=/i),l=o[0],r=o[1].match(/[0-9]+/gi);return {x:r[0],y:r[1],w:r[2],h:r[3],image:l}},Tl=(e,o)=>e.indexOf("//")>=0?e:o.indexOf("//")===0?[o.replace(/\/$/gi,""),e.trim()].join("/"):o.indexOf("//")>0?[o.trim(),e.trim()].join("/"):e,Pl=(e,o)=>{let l={},i=o.split(/\/\w+\.vtt\s?/)[0];if(e=Tl(e,i),!e.match(/#xywh=/i))return l.background='url("'+e+o.split(/\/\w+\.vtt\s?/)[1]+'")',l;let r=wl(e);return l.background='url("'+r.image+o.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+r.x+"px -"+r.y+"px",l.width=r.w+"px",l.height=r.h+"px",l.url=r.image,l},Zt=(e,o)=>{fetch(e).then(l=>{if(!l.ok)throw M.dispatch(r({...M.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return l.text()}).then(l=>{let i=[];l.split(/[\r\n][\r\n]/i).forEach(p=>{if(p.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)){let u=p.split(/[\r\n]/i),f=u[0].split(/ ?--> ?/i),c=f[0],P=f[1],d=u[1],b=Pl(d,e);i.push({start:zt(c),end:zt(P),css:b});}}),o(i);}).catch(l=>{console.error("Error fetching file:",l);});},Yt=(e,o,l)=>{for(let i=0;i<o.length;++i){let r=o[i];if(e>=r.start&&e<r.end){if(r.css.url&&!l[r.css.url]){let p={background:r.css.background,width:r.css.width,height:r.css.height};return l[r.css.url]=p,p}else if(r.css.url)return l[r.css.url]}}};var Nl=()=>{let{details:e}=ea(({videoData:{details:a}})=>({details:a}),shallowEqual),{tooltipTime:o}=ea(({controller:{tooltipTime:a,activeElements:f,isFullScreen:c}})=>({tooltipTime:a,activeElements:f,isFullScreen:c}),shallowEqual),l={},[i,r]=useState(void 0),[p,u]=useState(ca("isTouchScreen")?e.vtt_mobile:e.vtt);return useEffect(()=>{u(e.vtt_mobile);},[e.vtt_mobile]),useEffect(()=>{p&&Zt(e.vtt_mobile,r);},[p]),ca("isActiveElements")?jsxs("div",{className:`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[calc(100%+10px)] pl-px-[10px] pl-pt-[5px] pl-mr-[-25px] pl-text-white pl-text-[14px] ${p&&i?"":"pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,children:[p&&!!i&&jsx("div",{className:"pl-flex-1 pl-border pl-border-white pl-rounded-[8px] pl-mb-2",children:jsx("div",{className:"pl-rounded-[8px]",style:Yt(o,i,l)})}),jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsx(Fragment,{})},eo=memo(Nl);e();e();var Ll=(e,o)=>{useEffect(()=>{let l=i=>{!e.current||e.current.contains(i.target)||o(i);};return document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("touchstart",l);}},[e,o]);},z=Ll;e();var Ml=({name:e,className:o,dataMarker:l})=>jsx("img",{"data-marker":l,src:`${ja()}/${e}.png`,alt:e,className:o}),xe=Ml;var $l=()=>{da();let {duration:o,activeElements:l}=ea(({controller:{duration:m,activeElements:w,isFullScreen:U}})=>({duration:m,activeElements:w,isFullScreen:U}),shallowEqual),{markers:i$1}=ea(({videoData:{markers:m,videoElementSizeInfo:w}})=>({markers:m,videoElementSizeInfo:w}),shallowEqual),[r,p]=useState(void 0),[u,a]=useState([]),[f,c]=useState({}),[P,d]=useState(!1),b=m=>o?ia()*m/o:0,F=(m,w,U,j,ee,te,ce,qe)=>{m.stopPropagation();let oe=24*w/(ia()+5),le=[],Re=0;qe.map(W=>{W.time>w-oe&&W.time<w+oe&&(le.push(W),Re+=W.time);}),le.length>1?a(le):(le=[],a([]),h(m,w,U,j,ee,te,ce));},h=(m,w,U,j,ee,te,ce)=>{m.stopPropagation(),ge(m,ce),i(fa().currentTime,w),fa().currentTime=w,ha()&&(ha().style.width=b(w)),la(Ba(U,w,j,ee,te));};useEffect(()=>{ca("isActiveElements")||a([]);},[l]);let C=useRef(null);z(C,()=>a([])),useEffect(()=>{if(u.length>0){let m=aa(document.getElementsByClassName("pl-overlapMarkers")[0]);if(m==="inViewport")return d(!0),c({left:b(u[0].time)});if(m==="OutViewPortFromLeft")return d(!1),c({left:0});if(m==="OutViewPortFromRight")return d(!1),c({right:0})}},[u,document.getElementsByClassName("pl-overlapMarkers")[0]]);let M=m=>{m.preventDefault(),ca("isTouchScreen")&&p(Number(m.target.getAttribute("data-marker")));};return jsxs(Fragment,{children:[i$1.map(m=>jsx("div",{onContextMenu:M,"data-marker":m.time,onClick:w=>F(w,m.time,m.id,m.title,m.description,m.sticker,!0,i$1),onDoubleClick:w=>w.stopPropagation(),children:jsxs("div",{className:`pl-emoji-image pl-absolute pl-bottom-[200%] pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-p-1 ${ca("isTouchScreenPortrait"),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:b(m.time),zIndex:6},"data-marker":m.time,children:[m.isPersonal!==null&&m.isPersonal!==void 0&&jsx("div",{className:"pl-absolute pl-rounded-full pl-top-[-2px] pl-right-[-1px] pl-bg-main pl-w-2 pl-h-2"}),jsx(xe,{dataMarker:m.time,name:m.sticker,className:"pl-w-[16px] pl-h-[16px] !pl-max-w-max"})]})},m.id)),u.length>0&&jsx("div",{className:`pl-overlapMarkers ${P?"pl-overlayMarkersInViewport":"pl-overlayMarkersOutViewport"} pl-absolute pl-bottom-[45px] pl-px-1 pl-py-2 pl-flex pl-gap-3 pl-flex-row-reverse pl-justify-end pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-ml-[-10px] animate__animated animate__fadeInUp pl-opacity-100`,ref:C,style:f,children:u.map(m=>jsx("div",{className:"pl-emoji-image pl-rounded-[6px] pl-cursor-pointer","data-marker":m.time,onClick:w=>h(w,m.time,m.id,m.title,m.description,m.sticker,!0),onDoubleClick:w=>w.stopPropagation(),children:jsx(xe,{dataMarker:m.time,name:m.sticker,className:"pl-w-[24px] pl-h-[24px] !pl-max-w-max"})},m.id))})]})},io=memo($l);var Bl=()=>{let[e,o]=useState(!1);useEffect(()=>{ve(document.querySelector(".progressTooltip"));},[]);let{duration:l,currentTime:i,bufferedTimeWidth:r}=ea(({controller:{duration:a,currentTime:f,bufferedTimeWidth:c}})=>({duration:a,currentTime:f,bufferedTimeWidth:c}),shallowEqual);ea(({videoData:{params:a,videoElementSizeInfo:f}})=>({params:a,videoElementSizeInfo:f}),shallowEqual);let[p,u]=useState([]);return jsxs("div",{className:`${ca("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative`,children:[jsxs("div",{className:"pl-relative",children:[jsx(eo,{}),jsx(io,{})]}),jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:a=>Ht(a,p,o),onPointerMove:Ze,onPointerUp:a=>Ut(a,u,p,o),onMouseMove:Gt,onMouseOut:Qt,onClick:Wt,onDoubleClick:a=>a.stopPropagation(),children:jsxs("div",{id:"progress-area",className:"pl-w-full pl-absolute",children:[jsx("div",{className:"pl-w-full pl-h-[40px]"}),jsxs("div",{id:"time-progress-area",className:"!pl-w-full !pl-h-[5px] pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-gray-highLight pl-rounded",style:{transform:e?"scaleY(1.8)":"unset"},children:[jsx("div",{id:"time-progress-buffer",className:"pl-absolute pl-h-[5px] pl-bg-z-gray-400/[0.7] pl-rounded",style:{width:`${r}%`}}),jsx("div",{id:"time-progress-bar",className:`pl-h-[5px] pl-rounded pl-relative pl-cursor-pointer pl-bg-primary before:pl-bg-primary before:pl-inline-block before:pl-w-4 before:pl-h-4 ${e&&"before:pl-w-7 before:pl-h-3"}`,style:{width:`${i/l*ia()}px`}})]})]})})]})},no=Bl;e();e();e();var Vl=({title:e,className:o})=>jsx("span",{className:`pl-absolute pl-w-max pl-bg-paper pl-text-white/[0.9] ${ca("isFullScreen")?"pl-bottom-[300%]":"pl-bottom-[270%]"} pl-rounded-[8px] pl-text-[10px] pl-px-4 pl-py-[13px] pl-font-normal ${o}`,children:e}),L=Vl;var Ul=()=>{let{isFullScreen:e}=ea(({controller:{firstPlay:r,isFullScreen:p}})=>({firstPlay:r,isFullScreen:p}),shallowEqual),[o,l]=useState(!1),i=da();return useEffect(()=>{ca("isFirstPlay")||i(f(!1));},[e]),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(Se,{src:ca("isFullScreen")?a.nonFullScreen:a.fullScreen,alt:"fullScreen-icon",className:"pl-cursor-pointer",width:20,height:20,onMouseOver:()=>!ca("isTouchScreen")&&l(!0),onMouseLeave:()=>!ca("isTouchScreen")&&l(!1),onClick:()=>{f$1(),g();}}),o&&jsx(L,{title:`${ca("isFullScreen")?"\u062E\u0631\u0648\u062C \u0627\u0632":""} \u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647`})]})},ao=Ul;e();var Yl=()=>{let[e,o]=useState(!1),l=da(),{params:i,details:r}=ea(({videoData:{params:p,details:u}})=>({params:p,details:u}),shallowEqual);return jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(Se,{alt:"",onMouseOver:()=>!ca("isTouchScreen")&&o(!0),onMouseLeave:()=>!ca("isTouchScreen")&&o(!1),src:a.pictureInPicture,width:20,height:20,className:"pl-flex pl-cursor-pointer",onClick:()=>{i.onClickMiniPlayerIcon&&(localStorage.removeItem("close-miniPlayer"),fa().pause(),l(a$2(!1)),i.onClickMiniPlayerIcon({video:r||void 0,id:i.type==="vod"?i.id:window.btoa(i.id),type:i.type,currentTime:fa().currentTime}));}}),e&&jsx(L,{title:"\u062A\u0635\u0648\u06CC\u0631 \u062F\u0631 \u062A\u0635\u0648\u06CC\u0631"})]})},co=Yl;e();var oi=()=>{let[e,o]=useState(!1),l=da(),{settings:i}=ea(({user:{settings:a}})=>({settings:a}),shallowEqual),r=useRef(i.volume),p=()=>{if(r.current!==i.volume){let{settings:a}=M.getState().user;la(sa(r.current,a.volume)),r.current=a.volume,l(G({...a,volume:a.volume}));}},u=a=>{let{settings:f}=M.getState().user;a==="mute"?(d(0),la(sa(f.volume,0))):(la(sa(f.volume,100)),d(100));};return jsxs("div",{className:"pl-relative pl-inline-flex pl-items-center pl-gap-2 pl-sound-icon",children:[!ca("isTouchScreen")&&jsx("input",{onMouseUp:p,type:"range",min:"0",max:"100",value:i.volume,onChange:a=>d(+a.target.value),className:"pl-soundVolume pl-cursor-pointer rounded-full",style:{background:`linear-gradient(to right, white ${i.volume}%, rgba(255,255,255,0.3) 0)`}}),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(Se,{src:ca("hasSound")?a.unMute:a.mute,alt:ca("hasSound")?"unmute-icon":"mute-icon",className:"pl-flex pl-items-center pl-cursor-pointer",width:20,height:20,onClick:()=>ca("hasSound")?u("mute"):u("unmute"),onDoubleClick:a=>a.stopPropagation(),onMouseOver:()=>!ca("isTouchScreen")&&o(!0),onMouseLeave:()=>!ca("isTouchScreen")&&o(!1)}),e&&jsx(L,{className:"pl-left-0",title:"\u0635\u062F\u0627"})]})]})},fo=oi;e();e();e();var li=({className:e,onClick:o})=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:o,children:[jsx("path",{d:"M6 6L18.7742 18.7742",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M6 18.7744L18.7742 6.00022",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),vo=li;var go=forwardRef(({children:e,status:o,onClose:l,type:i,classNames:r,parentClassNames:p,styles:u,isBlurBackground:a,isFullHeight:f=!1,isHeader:c,isHasCatchUpLineOnTop:P=!1,animation:d,scrollbar:b=!1,isFocusOnInput:F=!1,headerTitle:h="",customHeader:C,headerClassName:M,showCloseIcon:m=!0},w)=>{let[U,j]=useState(o),[ee,te]=useState(0),[ce,qe]=useState(0),{videoElementSizeInfo:ze}=ea(({videoData:{videoElementSizeInfo:q}})=>({videoElementSizeInfo:q}),shallowEqual),oe=useRef(0);useEffect(()=>{let q;return o?j(!0):q=setTimeout(()=>{l(!1),te(0),j(!1);},500),()=>clearTimeout(q)},[o]);let le=q=>{let el=document.getElementById("popover-content");oe.current||(oe.current=window.innerHeight-ze.top-el?.getBoundingClientRect().top),q.stopPropagation(),window.innerHeight-ze.top-q.touches[0].clientY<oe.current&&te(window.innerHeight-q.touches[0].clientY),qe(1000005);},Re=()=>{l();},W=jsxs(Fragment,{children:[a&&jsx("div",{className:`pl-bg-black/[0.5] pl-w-screen pl-h-screen pl-fixed pl-top-0 pl-right-0 animate__animated animate__faster ${o?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:1000001}}),jsx("div",{className:`${i==="modal"&&"pl-fixed pl-top-0 pl-left-0 pl-flex pl-w-full pl-h-full pl-justify-center pl-items-end sm:pl-items-center"} ${p}`,style:{zIndex:f&&!F?ce:1000004},children:jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9]
2
2
  ${f&&"pl-h-full"}
3
- ${u||(window.innerWidth>768&&i==="modal"?o?"animate__fadeIn":"animate__fadeOut":o?"animate__fadeInUp":"animate__fadeOutDown")}
3
+ ${d||(window.innerWidth>768&&i==="modal"?o?"animate__fadeIn":"animate__fadeOut":o?"animate__fadeInUp":"animate__fadeOutDown")}
4
4
  ${ca("isTouchScreenPortrait")?"!pl-fixed !pl-right-0 !pl-left-0 !pl-bottom-0 !pl-w-full !pl-mb-0 pl-rounded-[12px] !pl-rounded-b-none !pl-bg-white":"before:pl-hidden"}
5
5
  ${i!=="modal"&&"pl-absolute pl-bottom-[130%] pl-overflow-auto no-scrollbar"}
6
6
  ${r}
7
- `,style:{height:ee||"max-content",maxHeight:"80vh",zIndex:1000004,...c},ref:w,id:"popover-content",children:jsxs(Fragment,{children:[d&&jsxs("div",{onTouchMove:P?le:()=>{},onTouchEndCapture:P?Re:()=>{},className:"pl-py-4",children:[P&&jsx("div",{className:"pl-absolute pl-top-[10px] pl-right-[50%] pl-mr-[-25px] pl-text-center pl-w-8 pl-h-1 pl-rounded-[20px] pl-bg-gray-highLight"}),jsx("div",{className:`pl-mb-4 pl-border-b pl-border-secondary-300 dark:pl-border-secondary-400 pl-mx-4 ${M}`,children:C||jsxs("div",{className:"pl-flex pl-items-center pl-justify-between pl-py-[19px]",children:[jsx("p",{className:"pl-text-[18px] pl-text-black dark:pl-text-white pl-font-bold",children:h}),m&&jsx(vo,{className:"pl-cursor-pointer pl-stroke-secondary-400 dark:pl-stroke-dark-5",onClick:l})]})})]}),jsx("div",{className:`pl-overflow-y-auto pl-h-full pl-w-full ${!b&&"no-scrollbar"}`,onTouchMove:q=>q.stopPropagation(),children:e})]})})})]});return jsx(Fragment,{children:U&&jsx(Fragment,{children:i==="modal"?createPortal(jsx(Fragment,{children:W}),document.getElementById("dialog-react-root-videoPlayer")):jsx("div",{children:W})})})});go.displayName="popover";var H=go;e();var ui=({setSection:e,showQualityLevelsIcon:o})=>{let l=da(),{qualityLevels:i}=ea(({controller:{qualityLevels:u,manualQuality:b,autoQuality:F}})=>({qualityLevels:u,manualQuality:b,autoQuality:F}),shallowEqual),{settings:r}=ea(({user:{settings:u}})=>({settings:u}),shallowEqual),{qualityLevelsPopover:p}=ea(({popovers:{qualityLevelsPopover:u}})=>({qualityLevelsPopover:u}),shallowEqual);ea(({videoData:{params:u,videoElementSizeInfo:b}})=>({params:u,videoElementSizeInfo:b}),shallowEqual);let[c,a$1]=useState(!1);i=[-1,...i];let f$1=(u,b)=>ca("isAutoQuality")&&b===-1?!0:!ca("isAutoQuality")&&r.quality===u,d=useRef(null);z(d,()=>l(D(!1)));let P=jsx("div",{id:"qualityLevels",className:"animate__animated animate__fadeIn pl-py-2",children:jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:i.map((u,b)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${f$1(b-1,u)&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${ca("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:f$1(b-1,u)?()=>{}:()=>{la(na(u===-1?"auto":`${u}P`)),l(f(!1)),l(B(!1)),l(D(!1)),l(G({...r,quality:u===-1?-1:b-1})),e&&e("main");},children:[!ca("isTouchScreen")&&f$1(b-1,u)&&jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsx(Se,{src:a.tick,alt:"",width:12,height:9})}),ca("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${f$1(b-1,u)&&"pl-border-primary"}`,children:f$1(b-1,u)&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsx("span",{className:`pl-w-full pl-text-[14px] pl-text-black/[0.87] ${ca("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:u===-1?jsxs("span",{children:[jsx("span",{children:"\u062E\u0648\u062F\u06A9\u0627\u0631 "}),jsx("span",{className:"pl-text-[10px] pl-font-normal pl-text-black/[0.5]",children:"(\u0628\u0631 \u0627\u0633\u0627\u0633 \u0633\u0631\u0639\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u0634\u0645\u0627)"})]}):`${u}p`})]},b))})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:d,children:[jsx(Se,{src:a.qualitySetting1,alt:"speed-icon",width:20,height:20,onClick:()=>l(D(!p)),onMouseOver:()=>!ca("isTouchScreen")&&!ca("showQualityLevelsPopover")&&a$1(!0),onMouseLeave:()=>!ca("isTouchScreen")&&a$1(!1),className:"pl-cursor-pointer"}),c&&jsx(L,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsx(H,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${ca("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"pl-right-0 pl-mb-[33px] !pl-rounded-[12px] pl-w-[230px]"} ${ca("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${ca("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:p,onClose:()=>l(D(!1)),type:ca("isTouchScreen")?"modal":"popover",isBlurBackground:ca("isTouchScreenPortrait"),ref:ca("isTouchScreenPortrait")?d:void 0,isHeader:ca("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:ca("isTouchScreen"),children:P})]}):jsx(Fragment,{children:P})})},De=memo(ui);e();e();var fi=({className:e,onClick:o,onMouseOver:l,onMouseLeave:i})=>jsxs("svg",{width:"18",height:"15",viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:o,onMouseOver:l,onMouseLeave:i,children:[jsx("path",{d:"M10.5488 1.53559C8.20532 1.02852 5.66339 1.68608 3.84359 3.50588C1.15649 6.19298 1.00481 10.4572 3.39041 13.3215C3.55135 13.5148 3.8176 13.6347 4.13036 13.6347H13.8687C14.1816 13.6347 14.4476 13.5149 14.6085 13.3217C16.0815 11.5533 16.5884 9.25027 16.1258 7.11249C16.0528 6.77512 16.2671 6.44245 16.6045 6.36945C16.9418 6.29645 17.2745 6.51077 17.3475 6.84814C17.8886 9.34866 17.2968 12.0474 15.569 14.1217C15.1326 14.6455 14.489 14.8847 13.8687 14.8847H4.13036C3.50995 14.8847 2.86616 14.6453 2.42991 14.1215C-0.36559 10.765 -0.188583 5.77029 2.95971 2.622C5.09241 0.489299 8.07189 -0.279272 10.8132 0.31386C11.1505 0.386857 11.3648 0.719527 11.2918 1.0569C11.2188 1.39427 10.8862 1.60859 10.5488 1.53559Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9976 2.66523C15.2417 2.9093 15.2417 3.30503 14.9976 3.54911L10.7129 7.83399C10.8469 8.09798 10.9225 8.39667 10.9225 8.713C10.9225 9.78688 10.0519 10.6574 8.97805 10.6574C7.90417 10.6574 7.03362 9.78688 7.03362 8.713C7.03362 7.63912 7.90417 6.76856 8.97805 6.76856C9.27953 6.76856 9.56498 6.83718 9.81965 6.95963C9.82222 6.95697 9.82483 6.95432 9.82746 6.95168L14.1137 2.66525C14.3578 2.42116 14.7535 2.42115 14.9976 2.66523ZM9.67249 8.713C9.67249 9.09652 9.36158 9.40743 8.97805 9.40743C8.59453 9.40743 8.28362 9.09652 8.28362 8.713C8.28362 8.32947 8.59453 8.01856 8.97805 8.01856C9.36158 8.01856 9.67249 8.32947 9.67249 8.713Z"})]}),$e=fi;var Si=[.5,.75,1,1.25,1.5,1.75,2],yi=({setSection:e,showSpeedIcon:o})=>{let l=da();ea(({videoData:{videoElementSizeInfo:d,params:P}})=>({videoElementSizeInfo:d,params:P}),shallowEqual);let{speedPopover:i}=ea(({popovers:{speedPopover:d}})=>({speedPopover:d}),shallowEqual),{settings:r}=ea(({user:{settings:d}})=>({settings:d}),shallowEqual),p=useRef(null),[c,a$1]=useState(!1);z(p,()=>l(C(!1))),useEffect(()=>{fa()&&(fa().playbackRate=r.speed);},[]);let f$1=jsx("div",{id:"speed",className:"animate__animated animate__fadeIn pl-py-2",children:jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:Si.map((d,P)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${r.speed===d&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${ca("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:r.speed===d?()=>{}:()=>{ca("isStaticFormat")||la(ma(d)),l(f(!1)),l(B(!1)),l(C(!1)),l(G({...r,speed:d})),fa().playbackRate=d,e&&e("main");},children:[!ca("isTouchScreen")&&r.speed===d&&jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsx(Se,{src:a.tick,alt:"",width:12,height:9})}),ca("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${r.speed===d&&"pl-border-primary"}`,children:r.speed===d&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsx("p",{className:`pl-w-full pl-flex pl-items-center pl-gap-2 pl-text-black/[0.87] ${ca("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:d})]},P))})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:p,children:[jsx($e,{className:"pl-size-5 pl-cursor-pointer size-5 pl-fill-white",onClick:()=>l(C(!i)),onMouseOver:()=>!ca("isTouchScreen")&&!ca("showSpeedPopover")&&a$1(!0),onMouseLeave:()=>!ca("isTouchScreen")&&a$1(!1)}),c&&jsx(L,{title:"\u0633\u0631\u0639\u062A"}),jsx(H,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${ca("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${ca("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${ca("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>l(C(!1)),type:ca("isTouchScreen")?"modal":"popover",isBlurBackground:ca("isTouchScreenPortrait"),ref:ca("isTouchScreenPortrait")?p:void 0,isHeader:ca("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:ca("isTouchScreen"),children:f$1})]}):jsx(Fragment,{children:f$1})})},_e=yi;e();var wi=({enabled:e,setEnabled:o})=>jsx("div",{className:`pl-relative pl-h-[22px] pl-w-[37px] pl-cursor-pointer pl-rounded-[15px] pl-transition-colors pl-duration-150 pl-ease-linear ${e?"pl-bg-primary pl-border pl-border-transparent":"pl-bg-secondary-200 pl-border pl-border-gray-highLight"}`,onClick:o,children:jsx("div",{className:`pl-absolute pl-left-1 pl-top-[2px] pl-w-[16px] pl-h-[16px] pl-rounded-full pl-transition-transform pl-duration-150 pl-ease-linear ${e?"pl-bg-white pl-translate-x-[13px]":"pl-bg-black/[0.16] -pl-translate-x-0.5"}`})}),wo=wi;e();var ki=({setSection:e})=>{let o=da(),{subtitles:l,selectedSubtitle:i}=ea(({videoData:{subtitles:r,selectedSubtitle:p}})=>({subtitles:r,selectedSubtitle:p}),shallowEqual);return jsx("div",{id:"subtitles",className:"animate__animated animate__fadeIn pl-p-[14px]",children:jsxs("ul",{className:"pl-flex pl-flex-col pl-p-0 pl-m-0",children:[jsx("li",{className:`pl-flex pl-items-center pl-text-[14px] pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 hover:pl-bg-main/[0.1] hover:dark:pl-bg-white/[0.25] pl-p-1 pl-pr-2 ${!i&&"pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,onClick:()=>{o(f(!1)),o(B(!1)),o(A(void 0)),e("main");let r=Object.values(fa().textTracks).find(p=>p.mode==="showing");r&&(r.mode="disabled"),o(z$1("")),la(Aa("empty"));},children:"\u0628\u062F\u0648\u0646 \u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),l.map((r,p)=>jsx("li",{className:`pl-flex pl-items-center pl-text-[14px] pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 hover:pl-bg-main/[0.1] hover:dark:pl-bg-white/[0.25] pl-p-1 pl-pr-2 ${i&&i.language===r.language&&"pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,onClick:()=>{o(f(!1)),o(B(!1)),o(A(r)),fa().textTracks[p].mode="showing",e("main"),la(Aa(r.language));},children:jsx("span",{children:r.label})},p))]})})},To=memo(ki);var Ii=()=>{let e=da(),{selectedSubtitle:o}=ea(({videoData:{params:f,subtitles:d,selectedSubtitle:P}})=>({params:f,subtitles:d,selectedSubtitle:P}),shallowEqual),{settingPopover:l}=ea(({popovers:{settingPopover:f}})=>({settingPopover:f}),shallowEqual),[i,r]=useState("main"),[p,c]=useState(!1),a$1=useRef(null);return z(a$1,()=>{e(B(!1)),setTimeout(()=>r("main"),500);}),jsxs("div",{className:`pl-inline-flex ${ca("isLandscape")&&"pl-relative"}`,ref:a$1,children:[jsxs("div",{className:"pl-flex pl-items-center pl-relative pl-cursor-pointer",onClick:()=>e(B(!l)),onMouseOver:()=>!ca("isTouchScreen")&&!ca("showSettingPopover")&&c(!0),onMouseLeave:()=>!ca("isTouchScreen")&&c(!1),children:[jsx(Se,{src:a.settings,alt:"",width:20,height:20}),p&&jsx(L,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A"})]}),jsx(H,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${ca("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${ca("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[285px] tablet:!pl-mx-auto"} ${ca("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"}`,status:l,onClose:()=>{e(B(!1)),setTimeout(()=>r("main"),500);},type:ca("isTouchScreen")?"modal":"popover",isBlurBackground:ca("isTouchScreenPortrait"),ref:ca("isTouchScreenPortrait")?a$1:void 0,isHeader:ca("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:ca("isTouchScreen"),children:jsxs(Fragment,{children:[i==="main"&&jsxs("div",{id:"main",className:"pl-p-4 pl-rounded-[10px] pl-flex pl-flex-col pl-gap-5 animate__animated animate__fadeIn",children:[!ca("isStaticFormat")&&jsx(Fragment,{children:jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("qualityLevels"),children:[jsx(Se,{src:a.qualitySetting,alt:"",width:16,height:16}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),jsx(Se,{src:a.chevronLeft,alt:"",width:16,height:16})]})}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("speed"),children:[jsx($e,{className:"size-5 pl-fill-black/[0.5]"}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0633\u0631\u0639\u062A"}),jsx(Se,{src:a.chevronLeft,alt:"",width:16,height:16})]}),ca("hasSubtitles")&&ca("isTouchScreenPortrait")&&jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",children:[jsx(Se,{src:a.subtitleOutlineGray,alt:"subtitle-icon",width:20,height:20}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsx(wo,{enabled:!!o,setEnabled:b})]})]}),i==="qualityLevels"&&jsx(De,{setSection:r}),i==="speed"&&jsx(_e,{setSection:r}),i==="subtitles"&&jsx(To,{setSection:r})]})})]})},No=memo(Ii);e();var Li=()=>{let{duration:e,currentTime:o}=ea(({controller:{duration:l,currentTime:i}})=>({duration:l,currentTime:i}),shallowEqual);return ea(({videoData:{videoElementSizeInfo:l,params:i}})=>({videoElementSizeInfo:l,params:i}),shallowEqual),jsx(Fragment,{children:jsxs("div",{className:`pl-mr-auto !pl-text-white pl-w-full pl-max-w-max pl-text-[12px] pl-font-bold ${ca("isFullScreen")?"pl-ml-8":"pl-ml-4"} ${ca("isTouchScreenPortrait")?"!pl-ml-0":"pl-absolute pl-left-0 pl-bottom-full pl-mb-[33px]"}`,children:[jsx("span",{children:P(e)}),jsx("span",{children:" / "}),jsx("span",{children:P(o)})]})})},Ve=Li;e();var Di=()=>jsx(Se,{src:a.unlock,alt:"unlock-icon",width:20,height:20,onClick:()=>h("lock")}),Eo=Di;e();var Vi=()=>{let[e,o]=useState(!1);return ea(({videoData:{selectedSubtitle:l,videoElementSizeInfo:i,params:r}})=>({selectedSubtitle:l,videoElementSizeInfo:i,params:r}),shallowEqual),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(Se,{alt:"subtitle-icon",src:ca("isSelectedSubtitle")?a.subtitleFill:a.subtitleOutline,className:"pl-cursor-pointer",width:20,height:20,onClick:b,onDoubleClick:l=>l.stopPropagation(),onMouseOver:()=>!ca("isTouchScreen")&&o(!0),onMouseLeave:()=>!ca("isTouchScreen")&&o(!1)}),e&&jsx(L,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},Lo=Vi;e();e();var Ri=e=>(ea(({videoData:{videoElementSizeInfo:o,params:l}})=>({videoElementSizeInfo:o,params:l}),shallowEqual),jsxs("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("rect",{x:"3",y:"3",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"3",y:"9",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"3",y:"15",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"8",y:"16",width:"11",height:"2",rx:"1"}),jsx("rect",{x:"8",y:"10",width:"11",height:"2",rx:"1"}),jsx("rect",{x:"8",y:"4",width:"11",height:"2",rx:"1"})]})),Mo=Ri;var Wi=()=>{useState(0);useState(void 0);let [r,p]=useState(!1),{markers:c,params:a}=ea(({videoData:{markers:h,params:C,videoElementSizeInfo:M}})=>({markers:h,params:C,videoElementSizeInfo:M}),shallowEqual),{markersListPopover:f}=ea(({popovers:{markersListPopover:h}})=>({markersListPopover:h}),shallowEqual),d=useRef(null),P$1=da();z(d,()=>P$1(E(!1)));let b=(h,C,M,m,w)=>{ha()&&(ha().style.width=`${Rt(h)}px`),i(fa().currentTime,h),fa().currentTime=h,P$1(E(!1)),la(Ba(C,h,M,m,w));},F=()=>{P$1(E(!f));};return jsxs("div",{className:`pl-flex pl-items-center pl-p-1 pl-relative ${ca("showMarkerListPopover")&&"pl-bg-secondary-50/[0.4] pl-rounded-[4px]"}`,ref:d,children:[jsx(Mo,{className:"pl-cursor-pointer pl-fill-dark-5",onClick:F,onMouseOver:()=>!ca("isTouchScreen")&&p(!0),onMouseLeave:()=>!ca("isTouchScreen")&&p(!1)}),r&&jsx(L,{title:"\u0644\u06CC\u0633\u062A \u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627 (e)",className:"!pl-bottom-[180%] !pl-right-[-48px]"}),jsx(H,{classNames:"!pl-p-0 pl-left-0 !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] pl-mb-[33px]",status:ca("showMarkerListPopover"),onClose:()=>{P$1(E(!1));},headerTitle:"\u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627",isHeader:!0,type:"popover",children:jsx("div",{className:"pl-flex pl-flex-col pl-gap-6 pl-mx-2 pl-mt-2",children:jsx("div",{className:"pl-flex pl-flex-col pl-gap-2 pl-pb-2",children:c.map(h=>jsx("div",{onClick:()=>b(h.time,h.id,h.title,h.description,h.sticker),className:"odd:dark:pl-bg-dark-1 odd:pl-bg-main/[0.1] hover:pl-bg-main/[0.1] hover:dark:bg-white/[0.25] pl-rounded-[8px]",children:jsxs("div",{className:"pl-flex pl-item-center pl-gap-2 pl-cursor-pointer pl-rounded-[4px] pl-relative pl-p-2 pl-mx-2",children:[h.banner||!h.sticker?jsx(Se,{src:h.banner?h.banner:"IMAGES.defaultMarkersListItemIcon",width:40,height:40,alt:h.title}):jsx("div",{className:"pl-w-[40px] pl-h-[40px] pl-bg-secondary dark:pl-bg-secondary-50 pl-rounded-[6px] pl-flex pl-items-center",children:jsx(xe,{name:h.sticker,className:"pl-w-[20px] pl-h-[20px] pl-mx-auto"})}),jsxs("div",{className:"pl-text-gray-800 dark:pl-text-white",children:[jsx("p",{className:"pl-flex pl-items-center pl-mb-1 pl-text-[14px] pl-font-bold pl-w-[130px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:jsx("div",{children:h.title})}),jsx("p",{className:"pl-text-[13px] pl-font-normal pl-w-[200px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:h.description})]}),jsx("span",{className:"pl-absolute pl-left-9 pl-top-2 pl-text-[12px] pl-font-bold pl-bg-secondary/[0.3] dark:pl-bg-secondary/[0.6] pl-text-gray-800 dark:pl-text-white pl-rounded-[4px] pl-p-[3px]",children:P(h.time)})]})},h.id))})})})]})},Fo=Wi;var Qi=()=>{ea(({controller:{isFullScreen:o}})=>({isFullScreen:o}),shallowEqual),ea(({videoData:{videoElementSizeInfo:o,params:l}})=>({videoElementSizeInfo:o,params:l}),shallowEqual);let e="";return ca("isTouchScreen")?ca("isFullScreen")?e="pl-mx-6":e="pl-mx-4":ca("isFullScreen")?e="pl-mx-8":e="pl-mx-4",jsxs("div",{id:"player-controllbar",className:`pl-flex pl-justify-between pl-items-center ${e}`,children:[jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[jsx(ao,{}),ca("isTouchScreenLandscape")&&jsx(Eo,{}),ca("showPictureInPicture")&&jsx(co,{}),ca("showSettingIcon")&&jsx(No,{}),ca("isFullScreen")&&!ca("isStaticFormat")&&jsx(De,{showQualityLevelsIcon:!0}),(ca("isFullScreen")||ca("isStaticFormat"))&&jsx(_e,{showSpeedIcon:!0}),ca("hasSubtitles")&&!ca("isTouchScreenPortrait")&&jsx(Lo,{})]}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[ca("isTouchScreenPortrait")&&jsx(Ve,{}),!ca("isIOS")&&jsx(fo,{}),ca("hasMarkers")&&jsx(Fo,{})]})]})},$o=memo(Qi);e();var Zi=()=>{let{subtitleText:e}=ea(({videoData:{subtitleText:l,selectedSubtitle:i}})=>({subtitleText:l,selectedSubtitle:i}),shallowEqual);ea(({controller:{isFullScreen:l}})=>({isFullScreen:l}),shallowEqual);let o=()=>{let l="";return ca("isLock")?l="pl-bottom-3":ca("isActiveElements")?ca("isTouchScreenPortrait")?l="pl-bottom-[45px]":ca("isFullScreen")?l="pl-bottom-[120px]":l="pl-bottom-[85px]":ca("isActiveElements")||(l="pl-bottom-3"),l};return jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:`pl-absolute pl-w-full pl-px-6 pl-text-center pl-text-[14px] ${ca("isFullScreen")&&"pl-text-[16px]"} pl-text-white pl-font-normal ${o()}`,children:$(e).map((l,i)=>jsx("p",{className:"pl-mx-auto",style:{textShadow:"0 0 4px #000000"},children:ba(l)},i))})},Bo=Zi;var Yi=()=>{ea(({controller:{lock:o,isFullScreen:l,isLoading:i,activeElements:r}})=>({lock:o,isFullScreen:l,isLoading:i,activeElements:r}),shallowEqual),ea(({videoData:{subtitles:o,selectedSubtitle:l}})=>({subtitles:o,selectedSubtitle:l}),shallowEqual);let e="";return ca("isTouchScreen")?ca("isFullScreen")?e="pl-gap-6 pl-mb-6":e="pl-gap-6 pl-mb-0":ca("isFullScreen")?e="pl-gap-6 pl-mb-8":e="pl-gap-4 pl-mb-3",jsx("div",{id:"footer",className:"pl-relative",style:{zIndex:4},children:jsxs(Fragment,{children:[ca("showSubtitle")&&jsx(Bo,{}),!ca("isLock")&&jsx(Fragment,{children:jsxs("div",{className:`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${e} ${ca("isActiveElements")&&!ca("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[!ca("isTouchScreenPortrait")&&jsx(Ve,{}),ca("showProgressbar")&&jsx(no,{}),jsx($o,{})]})})]})})},Ro=Yi;e();var Ji=Xo(()=>import('./staticVideoTag-GJF26BZ3.mjs')),Ki=Xo(()=>import('./nonStaticVideoTag-JKZGTEQK.mjs')),ji=()=>jsx(Fragment,{children:ca("isStaticFormat")?jsx(Ji,{}):jsx(Ki,{})}),Ho=ji;e();var lr=()=>{let e=da();ea(({videoData:{params:o}})=>({params:o}),shallowEqual),useEffect(()=>{let o=()=>{document.fullscreenElement?e(h$1(!0)):(e(h$1(!1)),j(),la(qa("exitFullScreen")));};document.addEventListener&&(document.addEventListener("webkitfullscreenchange",o,!1),document.addEventListener("mozfullscreenchange",o,!1),document.addEventListener("fullscreenchange",o,!1),document.addEventListener("MSFullscreenChange",o,!1));},[]);},Uo=lr;e();var rr=(e,o)=>{let l=da(),{activeElements:i}=ea(({controller:{activeElements:a}})=>({activeElements:a}),shallowEqual),r=useRef(null),p=useRef(e),c=useRef(o);useEffect(()=>{p.current=e;},[e]),useEffect(()=>{c.current=o;},[o]),useEffect(()=>{let a=!1,f$1=u=>{let{activeElements:b,isEnded:F}=M.getState().controller;F?l(f(!0)):u.pointerType==="mouse"&&(clearTimeout(r.current),b?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward"].includes(u.target.id)&&(a=!0):l(f(!0)),r.current=setTimeout(()=>{let{settingPopover:h,speedPopover:C,qualityLevelsPopover:M$1}=M.getState().popovers,{play:m}=M.getState().controller;!h&&!C&&!M$1&&m&&a&&l(f(!1));},a$4));},d=u=>{setTimeout(()=>{let{activeElements:b,isEnded:F,firstPlay:h}=M.getState().controller;if(clearTimeout(r.current),F)return l(f(!0));O()&&!h&&!p.current&&!c.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward"].includes(u.target.id)||R(u,"playerElements")?(l(f(!b)),r.current=setTimeout(()=>{let{settingPopover:C,speedPopover:M$1,qualityLevelsPopover:m}=M.getState().popovers;!C&&!M$1&&!m&&l(f(!1));},a$4)):r.current=setTimeout(()=>{let{settingPopover:C,speedPopover:M$1,qualityLevelsPopover:m}=M.getState().popovers;!C&&!M$1&&!m&&l(f(!1));},a$4));},200);},P=()=>{clearTimeout(r.current),r.current=setTimeout(()=>{let{activeElements:u,isEnded:b}=M.getState().controller,{settingPopover:F,speedPopover:h,qualityLevelsPopover:C}=M.getState().popovers;b?l(f(!0)):!F&&!h&&!C&&u&&!b&&l(f(!u));},a$4);};return document.getElementById("video-area").addEventListener("touchstart",d),document.getElementById("video-area").addEventListener("touchmove",P),document.getElementById("video-area").addEventListener("pointermove",f$1),()=>{let u=document.getElementById("video-area");u&&(u.removeEventListener("touchstart",d),u.removeEventListener("touchmove",P),u.removeEventListener("pointermove",f$1));}},[i,e,o]);},Wo=rr;e();var pr=()=>{let{firstPlay:e,isFullScreen:o}=ea(({controller:{firstPlay:l,isFullScreen:i}})=>({firstPlay:l,isFullScreen:i}),shallowEqual);useEffect(()=>{if(fa()){let l,i=()=>{l=setTimeout(()=>{j();},O()?0:300);};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),clearTimeout(l);}}},[e,o,fa()]);},Go=pr;e();var mr=()=>{let{firstPlay:e}=ea(({controller:{firstPlay:o}})=>({firstPlay:o}),shallowEqual);ea(({videoData:{details:o}})=>({details:o}),shallowEqual),useEffect(()=>{ca("setSubtitleFirstPlay")&&b();},[e]);},Zo=mr;var cr=Xo(()=>import('./touchVolumeBrightness-VSJS4WWO.mjs')),Ko=Xo(()=>import('./backwardForward-6U6VETTV.mjs')),dr=()=>{let[e,o]=useState(!1),[l,i]=useState(!1);return ea(({videoData:{details:r,params:p,videoElementSizeInfo:c}})=>({details:r,params:p,videoElementSizeInfo:c}),shallowEqual),ea(({controller:{firstPlay:r,isFullScreen:p,isLoading:c,canPlayVideo:a}})=>({firstPlay:r,isFullScreen:p,isLoading:c,canPlayVideo:a}),shallowEqual),Uo(),Go(),Wo(e,l),Zo(),jsx(Fragment,{children:jsxs("div",{id:"video-area",style:{zIndex:ca("isFullScreen")?1e6:"unset"},onClick:r=>ca("isFirstPlay")&&a$1(r),onDoubleClick:r=>k(r),className:`!pl-bg-contain !pl-bg-center !pl-bg-no-repeat pl-h-full pl-bg-black pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!ca("isTouchScreen")&&!ca("isFullScreen")&&"!pl-rounded-[12px]"} ${ca("isFullScreen")&&"!pl-fixed !pl-w-screen dvh"} pl-w-full pl-relative ${!ca("isActiveElements")&&"pl-cursor-none"}`,children:[jsx("div",{id:"video-opacity",className:`pl-absolute pl-w-full pl-aspect-video pl-transition-all pl-duration-500 pl-bg-black ${!ca("isTouchScreen")&&!ca("isFullScreen")&&"!pl-rounded-[12px]"} ${ca("isActiveElements")?"pl-bg-opacity-50":"pl-bg-opacity-0"}`}),ca("showTouchVolumeBrightness")&&jsx(cr,{}),ca("showBackwardForward")&&jsxs("div",{className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full pl-overflow-hidden pl-flex pl-items-center",style:{zIndex:l||e?1000002:1},children:[jsx(Ko,{type:"touchForward",isRightDoubleTouched:e,setIsRightDoubleTouched:o}),jsx(Ko,{type:"touchBackward",isLeftDoubleTouched:l,setIsLeftDoubleTouched:i})]}),jsx(Ho,{}),jsx("div",{id:"playerElements",className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full",children:jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-w-full pl-h-full",children:[ca("showHeader")&&jsx(At,{}),ca("showMain")&&jsx(qt,{}),ca("showFooter")&&jsx(Ro,{})]})})]})})},Id=dr;
8
- export{Id as a};//# sourceMappingURL=chunk-UTQQHPIT.mjs.map
9
- //# sourceMappingURL=chunk-UTQQHPIT.mjs.map
7
+ `,style:{height:ee||"max-content",maxHeight:"80vh",zIndex:1000004,...u},ref:w,id:"popover-content",children:jsxs(Fragment,{children:[c&&jsxs("div",{onTouchMove:P?le:()=>{},onTouchEndCapture:P?Re:()=>{},className:"pl-py-4",children:[P&&jsx("div",{className:"pl-absolute pl-top-[10px] pl-right-[50%] pl-mr-[-25px] pl-text-center pl-w-8 pl-h-1 pl-rounded-[20px] pl-bg-gray-highLight"}),jsx("div",{className:`pl-mb-4 pl-border-b pl-border-secondary-300 dark:pl-border-secondary-400 pl-mx-4 ${M}`,children:C||jsxs("div",{className:"pl-flex pl-items-center pl-justify-between pl-py-[19px]",children:[jsx("p",{className:"pl-text-[18px] pl-text-black dark:pl-text-white pl-font-bold",children:h}),m&&jsx(vo,{className:"pl-cursor-pointer pl-stroke-secondary-400 dark:pl-stroke-dark-5",onClick:l})]})})]}),jsx("div",{className:`pl-overflow-y-auto pl-h-full pl-w-full ${!b&&"no-scrollbar"}`,onTouchMove:q=>q.stopPropagation(),children:e})]})})})]});return jsx(Fragment,{children:U&&jsx(Fragment,{children:i==="modal"?createPortal(jsx(Fragment,{children:W}),document.getElementById("dialog-react-root-videoPlayer")):jsx("div",{children:W})})})});go.displayName="popover";var H=go;e();var ui=({setSection:e,showQualityLevelsIcon:o})=>{let l=da(),{qualityLevels:i}=ea(({controller:{qualityLevels:d,manualQuality:b,autoQuality:F}})=>({qualityLevels:d,manualQuality:b,autoQuality:F}),shallowEqual),{settings:r}=ea(({user:{settings:d}})=>({settings:d}),shallowEqual),{qualityLevelsPopover:p}=ea(({popovers:{qualityLevelsPopover:d}})=>({qualityLevelsPopover:d}),shallowEqual);ea(({videoData:{params:d,videoElementSizeInfo:b}})=>({params:d,videoElementSizeInfo:b}),shallowEqual);let[u,a$1]=useState(!1);i=[-1,...i];let f$1=(d,b)=>ca("isAutoQuality")&&b===-1?!0:!ca("isAutoQuality")&&r.quality===d,c=useRef(null);z(c,()=>l(D(!1)));let P=jsx("div",{id:"qualityLevels",className:"animate__animated animate__fadeIn pl-py-2",children:jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:i.map((d,b)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${f$1(b-1,d)&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${ca("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:f$1(b-1,d)?()=>{}:()=>{la(na(d===-1?"auto":`${d}P`)),l(f(!1)),l(B(!1)),l(D(!1)),l(G({...r,quality:d===-1?-1:b-1})),e&&e("main");},children:[!ca("isTouchScreen")&&f$1(b-1,d)&&jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsx(Se,{src:a.tick,alt:"",width:12,height:9})}),ca("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${f$1(b-1,d)&&"pl-border-primary"}`,children:f$1(b-1,d)&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsx("span",{className:`pl-w-full pl-text-[14px] pl-text-black/[0.87] ${ca("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:d===-1?jsxs("span",{children:[jsx("span",{children:"\u062E\u0648\u062F\u06A9\u0627\u0631 "}),jsx("span",{className:"pl-text-[10px] pl-font-normal pl-text-black/[0.5]",children:"(\u0628\u0631 \u0627\u0633\u0627\u0633 \u0633\u0631\u0639\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u0634\u0645\u0627)"})]}):`${d}p`})]},b))})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:c,children:[jsx(Se,{src:a.qualitySetting1,alt:"speed-icon",width:20,height:20,onClick:()=>l(D(!p)),onMouseOver:()=>!ca("isTouchScreen")&&!ca("showQualityLevelsPopover")&&a$1(!0),onMouseLeave:()=>!ca("isTouchScreen")&&a$1(!1),className:"pl-cursor-pointer"}),u&&jsx(L,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsx(H,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${ca("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"pl-right-0 pl-mb-[33px] !pl-rounded-[12px] pl-w-[230px]"} ${ca("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${ca("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:p,onClose:()=>l(D(!1)),type:ca("isTouchScreen")?"modal":"popover",isBlurBackground:ca("isTouchScreenPortrait"),ref:ca("isTouchScreenPortrait")?c:void 0,isHeader:ca("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:ca("isTouchScreen"),children:P})]}):jsx(Fragment,{children:P})})},De=memo(ui);e();e();var fi=({className:e,onClick:o,onMouseOver:l,onMouseLeave:i})=>jsxs("svg",{width:"18",height:"15",viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:o,onMouseOver:l,onMouseLeave:i,children:[jsx("path",{d:"M10.5488 1.53559C8.20532 1.02852 5.66339 1.68608 3.84359 3.50588C1.15649 6.19298 1.00481 10.4572 3.39041 13.3215C3.55135 13.5148 3.8176 13.6347 4.13036 13.6347H13.8687C14.1816 13.6347 14.4476 13.5149 14.6085 13.3217C16.0815 11.5533 16.5884 9.25027 16.1258 7.11249C16.0528 6.77512 16.2671 6.44245 16.6045 6.36945C16.9418 6.29645 17.2745 6.51077 17.3475 6.84814C17.8886 9.34866 17.2968 12.0474 15.569 14.1217C15.1326 14.6455 14.489 14.8847 13.8687 14.8847H4.13036C3.50995 14.8847 2.86616 14.6453 2.42991 14.1215C-0.36559 10.765 -0.188583 5.77029 2.95971 2.622C5.09241 0.489299 8.07189 -0.279272 10.8132 0.31386C11.1505 0.386857 11.3648 0.719527 11.2918 1.0569C11.2188 1.39427 10.8862 1.60859 10.5488 1.53559Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9976 2.66523C15.2417 2.9093 15.2417 3.30503 14.9976 3.54911L10.7129 7.83399C10.8469 8.09798 10.9225 8.39667 10.9225 8.713C10.9225 9.78688 10.0519 10.6574 8.97805 10.6574C7.90417 10.6574 7.03362 9.78688 7.03362 8.713C7.03362 7.63912 7.90417 6.76856 8.97805 6.76856C9.27953 6.76856 9.56498 6.83718 9.81965 6.95963C9.82222 6.95697 9.82483 6.95432 9.82746 6.95168L14.1137 2.66525C14.3578 2.42116 14.7535 2.42115 14.9976 2.66523ZM9.67249 8.713C9.67249 9.09652 9.36158 9.40743 8.97805 9.40743C8.59453 9.40743 8.28362 9.09652 8.28362 8.713C8.28362 8.32947 8.59453 8.01856 8.97805 8.01856C9.36158 8.01856 9.67249 8.32947 9.67249 8.713Z"})]}),$e=fi;var Si=[.5,.75,1,1.25,1.5,1.75,2],yi=({setSection:e,showSpeedIcon:o})=>{let l=da();ea(({videoData:{videoElementSizeInfo:c,params:P}})=>({videoElementSizeInfo:c,params:P}),shallowEqual);let{speedPopover:i}=ea(({popovers:{speedPopover:c}})=>({speedPopover:c}),shallowEqual),{settings:r}=ea(({user:{settings:c}})=>({settings:c}),shallowEqual),p=useRef(null),[u,a$1]=useState(!1);z(p,()=>l(C(!1))),useEffect(()=>{fa()&&(fa().playbackRate=r.speed);},[]);let f$1=jsx("div",{id:"speed",className:"animate__animated animate__fadeIn pl-py-2",children:jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:Si.map((c,P)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${r.speed===c&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${ca("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:r.speed===c?()=>{}:()=>{ca("isStaticFormat")||la(ma(c)),l(f(!1)),l(B(!1)),l(C(!1)),l(G({...r,speed:c})),fa().playbackRate=c,e&&e("main");},children:[!ca("isTouchScreen")&&r.speed===c&&jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsx(Se,{src:a.tick,alt:"",width:12,height:9})}),ca("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${r.speed===c&&"pl-border-primary"}`,children:r.speed===c&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsx("p",{className:`pl-w-full pl-flex pl-items-center pl-gap-2 pl-text-black/[0.87] ${ca("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:c})]},P))})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:p,children:[jsx($e,{className:"pl-size-5 pl-cursor-pointer size-5 pl-fill-white",onClick:()=>l(C(!i)),onMouseOver:()=>!ca("isTouchScreen")&&!ca("showSpeedPopover")&&a$1(!0),onMouseLeave:()=>!ca("isTouchScreen")&&a$1(!1)}),u&&jsx(L,{title:"\u0633\u0631\u0639\u062A"}),jsx(H,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${ca("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${ca("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${ca("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>l(C(!1)),type:ca("isTouchScreen")?"modal":"popover",isBlurBackground:ca("isTouchScreenPortrait"),ref:ca("isTouchScreenPortrait")?p:void 0,isHeader:ca("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:ca("isTouchScreen"),children:f$1})]}):jsx(Fragment,{children:f$1})})},_e=yi;e();var wi=({enabled:e,setEnabled:o})=>jsx("div",{className:`pl-relative pl-h-[22px] pl-w-[37px] pl-cursor-pointer pl-rounded-[15px] pl-transition-colors pl-duration-150 pl-ease-linear ${e?"pl-bg-primary pl-border pl-border-transparent":"pl-bg-secondary-200 pl-border pl-border-gray-highLight"}`,onClick:o,children:jsx("div",{className:`pl-absolute pl-left-1 pl-top-[2px] pl-w-[16px] pl-h-[16px] pl-rounded-full pl-transition-transform pl-duration-150 pl-ease-linear ${e?"pl-bg-white pl-translate-x-[13px]":"pl-bg-black/[0.16] -pl-translate-x-0.5"}`})}),wo=wi;e();var ki=({setSection:e})=>{let o=da(),{subtitles:l,selectedSubtitle:i}=ea(({videoData:{subtitles:r,selectedSubtitle:p}})=>({subtitles:r,selectedSubtitle:p}),shallowEqual);return jsx("div",{id:"subtitles",className:"animate__animated animate__fadeIn pl-p-[14px]",children:jsxs("ul",{className:"pl-flex pl-flex-col pl-p-0 pl-m-0",children:[jsx("li",{className:`pl-flex pl-items-center pl-text-[14px] pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 hover:pl-bg-main/[0.1] hover:dark:pl-bg-white/[0.25] pl-p-1 pl-pr-2 ${!i&&"pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,onClick:()=>{o(f(!1)),o(B(!1)),o(A(void 0)),e("main");let r=Object.values(fa().textTracks).find(p=>p.mode==="showing");r&&(r.mode="disabled"),o(z$1("")),la(Aa("empty"));},children:"\u0628\u062F\u0648\u0646 \u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),l.map((r,p)=>jsx("li",{className:`pl-flex pl-items-center pl-text-[14px] pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 hover:pl-bg-main/[0.1] hover:dark:pl-bg-white/[0.25] pl-p-1 pl-pr-2 ${i&&i.language===r.language&&"pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,onClick:()=>{o(f(!1)),o(B(!1)),o(A(r)),fa().textTracks[p].mode="showing",e("main"),la(Aa(r.language));},children:jsx("span",{children:r.label})},p))]})})},To=memo(ki);var Ii=()=>{let e=da(),{selectedSubtitle:o}=ea(({videoData:{params:f,subtitles:c,selectedSubtitle:P}})=>({params:f,subtitles:c,selectedSubtitle:P}),shallowEqual),{settingPopover:l}=ea(({popovers:{settingPopover:f}})=>({settingPopover:f}),shallowEqual),[i,r]=useState("main"),[p,u]=useState(!1),a$1=useRef(null);return z(a$1,()=>{e(B(!1)),setTimeout(()=>r("main"),500);}),jsxs("div",{className:`pl-inline-flex ${ca("isLandscape")&&"pl-relative"}`,ref:a$1,children:[jsxs("div",{className:"pl-flex pl-items-center pl-relative pl-cursor-pointer",onClick:()=>e(B(!l)),onMouseOver:()=>!ca("isTouchScreen")&&!ca("showSettingPopover")&&u(!0),onMouseLeave:()=>!ca("isTouchScreen")&&u(!1),children:[jsx(Se,{src:a.settings,alt:"",width:20,height:20}),p&&jsx(L,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A"})]}),jsx(H,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${ca("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${ca("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[285px] tablet:!pl-mx-auto"} ${ca("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"}`,status:l,onClose:()=>{e(B(!1)),setTimeout(()=>r("main"),500);},type:ca("isTouchScreen")?"modal":"popover",isBlurBackground:ca("isTouchScreenPortrait"),ref:ca("isTouchScreenPortrait")?a$1:void 0,isHeader:ca("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:ca("isTouchScreen"),children:jsxs(Fragment,{children:[i==="main"&&jsxs("div",{id:"main",className:"pl-p-4 pl-rounded-[10px] pl-flex pl-flex-col pl-gap-5 animate__animated animate__fadeIn",children:[!ca("isStaticFormat")&&jsx(Fragment,{children:jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("qualityLevels"),children:[jsx(Se,{src:a.qualitySetting,alt:"",width:16,height:16}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),jsx(Se,{src:a.chevronLeft,alt:"",width:16,height:16})]})}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>r("speed"),children:[jsx($e,{className:"size-5 pl-fill-black/[0.5]"}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0633\u0631\u0639\u062A"}),jsx(Se,{src:a.chevronLeft,alt:"",width:16,height:16})]}),ca("hasSubtitles")&&ca("isTouchScreenPortrait")&&jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",children:[jsx(Se,{src:a.subtitleOutlineGray,alt:"subtitle-icon",width:20,height:20}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsx(wo,{enabled:!!o,setEnabled:b})]})]}),i==="qualityLevels"&&jsx(De,{setSection:r}),i==="speed"&&jsx(_e,{setSection:r}),i==="subtitles"&&jsx(To,{setSection:r})]})})]})},No=memo(Ii);e();var Li=()=>{let{duration:e,currentTime:o}=ea(({controller:{duration:l,currentTime:i}})=>({duration:l,currentTime:i}),shallowEqual);return ea(({videoData:{videoElementSizeInfo:l,params:i}})=>({videoElementSizeInfo:l,params:i}),shallowEqual),jsx(Fragment,{children:jsxs("div",{className:`pl-mr-auto !pl-text-white pl-w-full pl-max-w-max pl-text-[12px] pl-font-bold ${ca("isFullScreen")?"pl-ml-8":"pl-ml-4"} ${ca("isTouchScreenPortrait")?"!pl-ml-0":"pl-absolute pl-left-0 pl-bottom-full pl-mb-[33px]"}`,children:[jsx("span",{children:P(e)}),jsx("span",{children:" / "}),jsx("span",{children:P(o)})]})})},Ve=Li;e();var Di=()=>jsx(Se,{src:a.unlock,alt:"unlock-icon",width:20,height:20,onClick:()=>h("lock")}),Eo=Di;e();var Vi=()=>{let[e,o]=useState(!1);return ea(({videoData:{selectedSubtitle:l,videoElementSizeInfo:i,params:r}})=>({selectedSubtitle:l,videoElementSizeInfo:i,params:r}),shallowEqual),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(Se,{alt:"subtitle-icon",src:ca("isSelectedSubtitle")?a.subtitleFill:a.subtitleOutline,className:"pl-cursor-pointer",width:20,height:20,onClick:b,onDoubleClick:l=>l.stopPropagation(),onMouseOver:()=>!ca("isTouchScreen")&&o(!0),onMouseLeave:()=>!ca("isTouchScreen")&&o(!1)}),e&&jsx(L,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},Lo=Vi;e();e();var Ri=e=>(ea(({videoData:{videoElementSizeInfo:o,params:l}})=>({videoElementSizeInfo:o,params:l}),shallowEqual),jsxs("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("rect",{x:"3",y:"3",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"3",y:"9",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"3",y:"15",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"8",y:"16",width:"11",height:"2",rx:"1"}),jsx("rect",{x:"8",y:"10",width:"11",height:"2",rx:"1"}),jsx("rect",{x:"8",y:"4",width:"11",height:"2",rx:"1"})]})),Mo=Ri;var Wi=()=>{useState(0);useState(void 0);let [r,p]=useState(!1),{markers:u,params:a}=ea(({videoData:{markers:h,params:C,videoElementSizeInfo:M}})=>({markers:h,params:C,videoElementSizeInfo:M}),shallowEqual),{markersListPopover:f}=ea(({popovers:{markersListPopover:h}})=>({markersListPopover:h}),shallowEqual),c=useRef(null),P$1=da();z(c,()=>P$1(E(!1)));let b=(h,C,M,m,w)=>{ha()&&(ha().style.width=`${Rt(h)}px`),i(fa().currentTime,h),fa().currentTime=h,P$1(E(!1)),la(Ba(C,h,M,m,w));},F=()=>{P$1(E(!f));};return jsxs("div",{className:`pl-flex pl-items-center pl-p-1 pl-relative ${ca("showMarkerListPopover")&&"pl-bg-secondary-50/[0.4] pl-rounded-[4px]"}`,ref:c,children:[jsx(Mo,{className:"pl-cursor-pointer pl-fill-dark-5",onClick:F,onMouseOver:()=>!ca("isTouchScreen")&&p(!0),onMouseLeave:()=>!ca("isTouchScreen")&&p(!1)}),r&&jsx(L,{title:"\u0644\u06CC\u0633\u062A \u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627 (e)",className:"!pl-bottom-[180%] !pl-right-[-48px]"}),jsx(H,{classNames:"!pl-p-0 pl-left-0 !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] pl-mb-[33px]",status:ca("showMarkerListPopover"),onClose:()=>{P$1(E(!1));},headerTitle:"\u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627",isHeader:!0,type:"popover",children:jsx("div",{className:"pl-flex pl-flex-col pl-gap-6 pl-mx-2 pl-mt-2",children:jsx("div",{className:"pl-flex pl-flex-col pl-gap-2 pl-pb-2",children:u.map(h=>jsx("div",{onClick:()=>b(h.time,h.id,h.title,h.description,h.sticker),className:"odd:dark:pl-bg-dark-1 odd:pl-bg-main/[0.1] hover:pl-bg-main/[0.1] hover:dark:bg-white/[0.25] pl-rounded-[8px]",children:jsxs("div",{className:"pl-flex pl-item-center pl-gap-2 pl-cursor-pointer pl-rounded-[4px] pl-relative pl-p-2 pl-mx-2",children:[h.banner||!h.sticker?jsx(Se,{src:h.banner?h.banner:"IMAGES.defaultMarkersListItemIcon",width:40,height:40,alt:h.title}):jsx("div",{className:"pl-w-[40px] pl-h-[40px] pl-bg-secondary dark:pl-bg-secondary-50 pl-rounded-[6px] pl-flex pl-items-center",children:jsx(xe,{name:h.sticker,className:"pl-w-[20px] pl-h-[20px] pl-mx-auto"})}),jsxs("div",{className:"pl-text-gray-800 dark:pl-text-white",children:[jsx("p",{className:"pl-flex pl-items-center pl-mb-1 pl-text-[14px] pl-font-bold pl-w-[130px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:jsx("div",{children:h.title})}),jsx("p",{className:"pl-text-[13px] pl-font-normal pl-w-[200px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:h.description})]}),jsx("span",{className:"pl-absolute pl-left-9 pl-top-2 pl-text-[12px] pl-font-bold pl-bg-secondary/[0.3] dark:pl-bg-secondary/[0.6] pl-text-gray-800 dark:pl-text-white pl-rounded-[4px] pl-p-[3px]",children:P(h.time)})]})},h.id))})})})]})},Fo=Wi;var Qi=()=>{ea(({controller:{isFullScreen:o}})=>({isFullScreen:o}),shallowEqual),ea(({videoData:{videoElementSizeInfo:o,params:l}})=>({videoElementSizeInfo:o,params:l}),shallowEqual);let e="";return ca("isTouchScreen")?ca("isFullScreen")?e="pl-mx-6":e="pl-mx-4":ca("isFullScreen")?e="pl-mx-8":e="pl-mx-4",jsxs("div",{id:"player-controllbar",className:`pl-flex pl-justify-between pl-items-center ${e}`,children:[jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[jsx(ao,{}),ca("isTouchScreenLandscape")&&jsx(Eo,{}),ca("showPictureInPicture")&&jsx(co,{}),ca("showSettingIcon")&&jsx(No,{}),ca("isFullScreen")&&!ca("isStaticFormat")&&jsx(De,{showQualityLevelsIcon:!0}),(ca("isFullScreen")||ca("isStaticFormat"))&&jsx(_e,{showSpeedIcon:!0}),ca("hasSubtitles")&&!ca("isTouchScreenPortrait")&&jsx(Lo,{})]}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[ca("isTouchScreenPortrait")&&jsx(Ve,{}),!ca("isIOS")&&jsx(fo,{}),ca("hasMarkers")&&jsx(Fo,{})]})]})},$o=memo(Qi);e();var Zi=()=>{let{subtitleText:e}=ea(({videoData:{subtitleText:l,selectedSubtitle:i}})=>({subtitleText:l,selectedSubtitle:i}),shallowEqual);ea(({controller:{isFullScreen:l}})=>({isFullScreen:l}),shallowEqual);let o=()=>{let l="";return ca("isLock")?l="pl-bottom-3":ca("isActiveElements")?ca("isTouchScreenPortrait")?l="pl-bottom-[45px]":ca("isFullScreen")?l="pl-bottom-[120px]":l="pl-bottom-[85px]":ca("isActiveElements")||(l="pl-bottom-3"),l};return jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:`pl-absolute pl-w-full pl-px-6 pl-text-center pl-text-[14px] ${ca("isFullScreen")&&"pl-text-[16px]"} pl-text-white pl-font-normal ${o()}`,children:$(e).map((l,i)=>jsx("p",{className:"pl-mx-auto",style:{textShadow:"0 0 4px #000000"},children:ba(l)},i))})},Bo=Zi;var Yi=()=>{ea(({controller:{lock:o,isFullScreen:l,isLoading:i,activeElements:r}})=>({lock:o,isFullScreen:l,isLoading:i,activeElements:r}),shallowEqual),ea(({videoData:{subtitles:o,selectedSubtitle:l}})=>({subtitles:o,selectedSubtitle:l}),shallowEqual);let e="";return ca("isTouchScreen")?ca("isFullScreen")?e="pl-gap-6 pl-mb-6":e="pl-gap-6 pl-mb-0":ca("isFullScreen")?e="pl-gap-6 pl-mb-8":e="pl-gap-4 pl-mb-3",jsx("div",{id:"footer",className:"pl-relative",style:{zIndex:4},children:jsxs(Fragment,{children:[ca("showSubtitle")&&jsx(Bo,{}),!ca("isLock")&&jsx(Fragment,{children:jsxs("div",{className:`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${e} ${ca("isActiveElements")&&!ca("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[!ca("isTouchScreenPortrait")&&jsx(Ve,{}),ca("showProgressbar")&&jsx(no,{}),jsx($o,{})]})})]})})},Ro=Yi;e();var Ji=Xo(()=>import('./staticVideoTag-GJF26BZ3.mjs')),Ki=Xo(()=>import('./nonStaticVideoTag-JKZGTEQK.mjs')),ji=()=>jsx(Fragment,{children:ca("isStaticFormat")?jsx(Ji,{}):jsx(Ki,{})}),Ho=ji;e();var lr=()=>{let e=da();ea(({videoData:{params:o}})=>({params:o}),shallowEqual),useEffect(()=>{let o=()=>{document.fullscreenElement?e(h$1(!0)):(e(h$1(!1)),j(),la(qa("exitFullScreen")));};document.addEventListener&&(document.addEventListener("webkitfullscreenchange",o,!1),document.addEventListener("mozfullscreenchange",o,!1),document.addEventListener("fullscreenchange",o,!1),document.addEventListener("MSFullscreenChange",o,!1));},[]);},Uo=lr;e();var rr=(e,o)=>{let l=da(),{activeElements:i}=ea(({controller:{activeElements:a}})=>({activeElements:a}),shallowEqual),r=useRef(null),p=useRef(e),u=useRef(o);useEffect(()=>{p.current=e;},[e]),useEffect(()=>{u.current=o;},[o]),useEffect(()=>{let a=!1,f$1=d=>{let{activeElements:b,isEnded:F}=M.getState().controller;F?l(f(!0)):d.pointerType==="mouse"&&(clearTimeout(r.current),b?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward"].includes(d.target.id)&&(a=!0):l(f(!0)),r.current=setTimeout(()=>{let{settingPopover:h,speedPopover:C,qualityLevelsPopover:M$1}=M.getState().popovers,{play:m}=M.getState().controller;!h&&!C&&!M$1&&m&&a&&l(f(!1));},a$4));},c=d=>{setTimeout(()=>{let{activeElements:b,isEnded:F,firstPlay:h}=M.getState().controller;if(clearTimeout(r.current),F)return l(f(!0));O()&&!h&&!p.current&&!u.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward"].includes(d.target.id)||R(d,"playerElements")?(l(f(!b)),r.current=setTimeout(()=>{let{settingPopover:C,speedPopover:M$1,qualityLevelsPopover:m}=M.getState().popovers;!C&&!M$1&&!m&&l(f(!1));},a$4)):r.current=setTimeout(()=>{let{settingPopover:C,speedPopover:M$1,qualityLevelsPopover:m}=M.getState().popovers;!C&&!M$1&&!m&&l(f(!1));},a$4));},200);},P=()=>{clearTimeout(r.current),r.current=setTimeout(()=>{let{activeElements:d,isEnded:b}=M.getState().controller,{settingPopover:F,speedPopover:h,qualityLevelsPopover:C}=M.getState().popovers;b?l(f(!0)):!F&&!h&&!C&&d&&!b&&l(f(!d));},a$4);};return document.getElementById("video-area").addEventListener("touchstart",c),document.getElementById("video-area").addEventListener("touchmove",P),document.getElementById("video-area").addEventListener("pointermove",f$1),()=>{let d=document.getElementById("video-area");d&&(d.removeEventListener("touchstart",c),d.removeEventListener("touchmove",P),d.removeEventListener("pointermove",f$1));}},[i,e,o]);},Wo=rr;e();var pr=()=>{let{firstPlay:e,isFullScreen:o}=ea(({controller:{firstPlay:l,isFullScreen:i}})=>({firstPlay:l,isFullScreen:i}),shallowEqual);useEffect(()=>{if(fa()){let l,i=()=>{l=setTimeout(()=>{j();},O()?0:300);};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),clearTimeout(l);}}},[e,o,fa()]);},Go=pr;e();var mr=()=>{let{firstPlay:e}=ea(({controller:{firstPlay:o}})=>({firstPlay:o}),shallowEqual);ea(({videoData:{details:o}})=>({details:o}),shallowEqual),useEffect(()=>{ca("setSubtitleFirstPlay")&&b();},[e]);},Zo=mr;var cr=Xo(()=>import('./touchVolumeBrightness-VSJS4WWO.mjs')),Ko=Xo(()=>import('./backwardForward-6U6VETTV.mjs')),dr=()=>{let[e,o]=useState(!1),[l,i]=useState(!1);return ea(({videoData:{details:r,params:p,videoElementSizeInfo:u}})=>({details:r,params:p,videoElementSizeInfo:u}),shallowEqual),ea(({controller:{firstPlay:r,isFullScreen:p,isLoading:u,canPlayVideo:a}})=>({firstPlay:r,isFullScreen:p,isLoading:u,canPlayVideo:a}),shallowEqual),Uo(),Go(),Wo(e,l),Zo(),jsx(Fragment,{children:jsxs("div",{id:"video-area",style:{zIndex:ca("isFullScreen")?1e6:"unset"},onClick:r=>ca("isFirstPlay")&&a$1(r),onDoubleClick:r=>k(r),className:`!pl-bg-contain !pl-bg-center !pl-bg-no-repeat pl-h-full pl-bg-black pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!ca("isTouchScreen")&&!ca("isFullScreen")&&"!pl-rounded-[12px]"} ${ca("isFullScreen")&&"!pl-fixed !pl-w-screen dvh"} pl-w-full pl-relative ${!ca("isActiveElements")&&"pl-cursor-none"}`,children:[jsx("div",{id:"video-opacity",className:`pl-absolute pl-w-full pl-aspect-video pl-transition-all pl-duration-500 pl-bg-black ${!ca("isTouchScreen")&&!ca("isFullScreen")&&"!pl-rounded-[12px]"} ${ca("isActiveElements")?"pl-bg-opacity-50":"pl-bg-opacity-0"}`}),ca("showTouchVolumeBrightness")&&jsx(cr,{}),ca("showBackwardForward")&&jsxs("div",{className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full pl-overflow-hidden pl-flex pl-items-center",style:{zIndex:l||e?1000002:1},children:[jsx(Ko,{type:"touchForward",isRightDoubleTouched:e,setIsRightDoubleTouched:o}),jsx(Ko,{type:"touchBackward",isLeftDoubleTouched:l,setIsLeftDoubleTouched:i})]}),jsx(Ho,{}),jsx("div",{id:"playerElements",className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full",children:jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-w-full pl-h-full",children:[ca("showHeader")&&jsx(At,{}),ca("showMain")&&jsx(qt,{}),ca("showFooter")&&jsx(Ro,{})]})})]})})},Id=dr;
8
+ export{Id as a};//# sourceMappingURL=chunk-DJJDQIWK.mjs.map
9
+ //# sourceMappingURL=chunk-DJJDQIWK.mjs.map