cafe-video-player 3.0.0 → 3.0.2

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.
Files changed (34) hide show
  1. package/{chunk-4PVUWYWX.mjs → chunk-6S6656SW.mjs} +4 -4
  2. package/chunk-6S6656SW.mjs.map +1 -0
  3. package/chunk-7HCAJ7X2.mjs +2 -0
  4. package/chunk-7HCAJ7X2.mjs.map +1 -0
  5. package/{chunk-4QEMWG7O.js → chunk-LKAVLHFE.js} +4 -4
  6. package/chunk-LKAVLHFE.js.map +1 -0
  7. package/chunk-QSDZHUZL.js +2 -0
  8. package/chunk-QSDZHUZL.js.map +1 -0
  9. package/index.js +1 -1
  10. package/index.js.map +1 -1
  11. package/index.mjs +1 -1
  12. package/index.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/{staticPlayer-XH4LGDPF.mjs → staticPlayer-MOB57WM7.mjs} +2 -2
  15. package/{staticPlayer-XH4LGDPF.mjs.map → staticPlayer-MOB57WM7.mjs.map} +1 -1
  16. package/{staticPlayer-7J5RWSHH.js → staticPlayer-XCIQDZGM.js} +2 -2
  17. package/{staticPlayer-7J5RWSHH.js.map → staticPlayer-XCIQDZGM.js.map} +1 -1
  18. package/videoArea-3D7M47QL.js +2 -0
  19. package/{videoArea-XFD6PYG5.js.map → videoArea-3D7M47QL.js.map} +1 -1
  20. package/videoArea-VIGZ4Q3V.mjs +2 -0
  21. package/{videoArea-UQRRMDPQ.mjs.map → videoArea-VIGZ4Q3V.mjs.map} +1 -1
  22. package/videoPlayerStyles.css +0 -20
  23. package/{vodPlayer-KWNNVRZ2.mjs → vodPlayer-CB2HEFDL.mjs} +2 -2
  24. package/{vodPlayer-KWNNVRZ2.mjs.map → vodPlayer-CB2HEFDL.mjs.map} +1 -1
  25. package/{vodPlayer-DWFSTDUG.js → vodPlayer-LIKHLEHP.js} +2 -2
  26. package/{vodPlayer-DWFSTDUG.js.map → vodPlayer-LIKHLEHP.js.map} +1 -1
  27. package/chunk-4PVUWYWX.mjs.map +0 -1
  28. package/chunk-4QEMWG7O.js.map +0 -1
  29. package/chunk-P7PY2UZU.js +0 -2
  30. package/chunk-P7PY2UZU.js.map +0 -1
  31. package/chunk-URZAN6FW.mjs +0 -2
  32. package/chunk-URZAN6FW.mjs.map +0 -1
  33. package/videoArea-UQRRMDPQ.mjs +0 -2
  34. package/videoArea-XFD6PYG5.js +0 -2
@@ -1,9 +1,9 @@
1
- import {a as a$3}from'./chunk-BQFMEVY7.mjs';import {b as b$1,c as c$1,a as a$5}from'./chunk-URZAN6FW.mjs';import {a as a$1,c,b}from'./chunk-MUO76V7J.mjs';import {a as a$4,b as b$3}from'./chunk-7EFML44G.mjs';import {a}from'./chunk-X7ZT44GS.mjs';import {b as b$2}from'./chunk-WKL5H4H7.mjs';import {da,t,ua,A as A$1,C,xa,q,k,u,j,L,m,r,o,ea,za,a as a$2,x,y,aa,w,M,p,B,ha,ca,Z,X,W,T,Y as Y$1,ba,ga,ja,$,ta,va,D}from'./chunk-LK3SCAXS.mjs';import {e,A,z,v,k as k$1,p as p$1,q as q$1}from'./chunk-SVD4N6WD.mjs';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {shallowEqual}from'react-redux';import te from'next/legacy/image';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import lt from'next/image';import {createPortal}from'react-dom';import $l from'next/dynamic';e();e();e();var Hl=()=>jsxs("div",{className:`pl-relative animate__animated animate__faster ${t("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsx(te,{src:a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>$("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"})]}),Mt=Hl;var Rl=()=>{let{firstPlay:t$1}=A(({controller:{lock:o,activeElements:l,firstPlay:i}})=>({lock:o,activeElements:l,firstPlay:i}),shallowEqual);return jsx("div",{className:da(`pl-duration-300 pl-transition-[opacity] ${t$1?"pl-opacity-0":"pl-opacity-100"}`,{desktop:"pl-rounded-t-[12px] pl-pt-8 pl-h-[45.5px]",touch:"pl-h-[16px]"}),children:jsx("div",{className:" pl-mx-8 pl-flex pl-items-start pl-justify-end pl-h-full",children:t("isLock")&&jsx(Mt,{})})})},Dt=Rl;e();var Ul=()=>{let{firstPlay:t$1,autoplay:o,play:l,isLoading:i}=A(({controller:{lock:n,firstPlay:h,play:v,activeElements:f,isLoading:s},videoData:{params:{autoplay:w}}})=>({lock:n,firstPlay:h,autoplay:w,play:v,activeElements:f,isLoading:s}),shallowEqual),[r,p]=useState(true),[c,d]=useState(!o);return useEffect(()=>{if(t$1||t("isTouchScreen"))return;let n=null;return d(true),n=setTimeout(()=>d(false),1e3),()=>{n&&clearTimeout(n);}},[l,t$1]),useEffect(()=>{let n;return i?n=setTimeout(()=>p(true),b$3):p(false),()=>{clearTimeout(n);}},[i,t$1]),jsx("main",{className:"pl-flex-1 pl-mt-1",children:r?jsx(a$5,{}):jsx(Fragment,{children:!t("isLock")&&jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${t("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:t("isTouchScreen")?jsxs("div",{className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:2},children:[!t$1&&jsx("div",{onClick:n=>{n.stopPropagation(),Y$1("touchForward",10,n);},className:`pl-flex pl-transition-all pl-duration-300 pl-ease-in-out pl-items-center pl-justify-center pl-rounded-full ${t("isFullScreen")?"pl-size-[56px]":"pl-size-[40px]"} pl-bg-black/75 ${t("isActiveElements")?"pl-opacity-100":"pl-opacity-0"}`,children:jsx(lt,{src:a.forward2,alt:"",className:"!pl-cursor-pointer",width:t("isFullScreen")?28:16,height:t("isFullScreen")?28:16})}),jsx(b$1,{normalStyle:true,disableScale:true,disableTooltip:true,className:`pl-flex pl-transition-all pl-duration-300 pl-ease-in-out pl-items-center pl-justify-center pl-rounded-full ${t("isFullScreen")?"pl-size-[68px]":"pl-size-[48px]"} pl-bg-black/75 ${t("isActiveElements")?"pl-opacity-100":"pl-opacity-0"}`,width:t("isFullScreen")?36:24,height:t("isFullScreen")?36:24}),!t$1&&jsx("div",{onClick:n=>{n.stopPropagation(),Y$1("touchBackward",10,n);},className:`pl-flex pl-transition-all pl-duration-300 pl-ease-in-out pl-items-center pl-justify-center pl-rounded-full ${t("isFullScreen")?"pl-size-[56px]":"pl-size-[40px]"} pl-bg-black/75 ${t("isActiveElements")?"pl-opacity-100":"pl-opacity-0"}`,children:jsx(lt,{src:a.backward2,alt:"",className:"!pl-cursor-pointer",width:t("isFullScreen")?28:16,height:t("isFullScreen")?28:16})})]}):jsx("div",{className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:2},children:jsx(b$1,{normalStyle:true,disableScale:true,disableTooltip:true,inverse:!t$1,width:t("isFullScreen")?81:48,height:t("isFullScreen")?81:48,className:`pl-flex pl-transition-all pl-duration-300 pl-ease-in-out pl-items-center pl-justify-center pl-rounded-full ${t("isFullScreen")?"pl-size-[122px]":"pl-size-[72px]"} pl-bg-black/75 ${c?"pl-opacity-100":"pl-opacity-0 pl-scale-0"} ${t$1?"!pl-cursor-pointer":"!pl-cursor-default"}`})})})})})},Bt=Ul;e();e();e();e();var Qe=t=>{let{videoElementSizeInfo:o}=za.getState().videoData,{duration:l}=za.getState().controller,i=t.clientX!==void 0?t.clientX:t.touches[0].clientX;if(i<=o.right&&i>0)return (i-o.left)/o.width*l},ee=t=>{let{videoElementSizeInfo:o}=za.getState().videoData,l=t.clientX!==void 0?t.clientX:t.touches[0].clientX;if(l<=o.right&&l>0)return l-o.left};var ue=t=>{t&&(t.style.opacity="0.0",t.style.pointerEvents="none",t.style.zIndex=-2);},Zl=t=>{t.style.display="block",t.style.zIndex=4,t.style.opacity=za.getState().videoData.details.vtt?"1.0":"0.6",t.style.pointerEvents="auto",t.style.transition="opacity 1s ease-out";},Gl=(t,o)=>{let{videoElementSizeInfo:l}=za.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(ee(t)>i.getBoundingClientRect().width/2&&ee(t)<l.right-l.left-i.getBoundingClientRect().width/2?o.style.left=`${ee(t)-i.offsetWidth/2}px`:ee(t)<i.offsetWidth?o.style.left="0px":u().offsetLeft+u().offsetWidth<ee(t)+i.offsetWidth&&(o.style.left=`${u().offsetWidth-i.offsetWidth}px`));},Yl=(t,o,l)=>{o&&Zl(o),za.getState().videoData.details.vtt?Gl(t,o):o.style.left=`${ee(t)-30}px`,za.dispatch(v(Number(Qe(t)))),l.textContent=`${ha(Qe(t))}`;},de=(t,o=false)=>{let{videoElementSizeInfo:l}=za.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),p=t.clientX!==void 0?t.clientX:t.touches[0].clientX;i&&r&&p<=l.right&&p>l.left?(Yl(t,i,r),o&&setTimeout(()=>ue(i),2e3)):ue(i);},Ht=t=>{let o=t.clientX!==void 0?t.clientX:t.touches[0].clientX;w()&&(o<=t.view.innerWidth&&o>0?w().style.width=`${ee(t)}px`:o<=t.view.innerWidth?w().style.width=0:o>0&&(w().style.width="100%"));},qt=(t,o,l)=>{t.preventDefault(),t.stopPropagation(),l(true);let i=za.dispatch,r=t.clientX!==void 0?t.clientX:t.touches[0].clientX;r<=t.view.innerWidth&&r>0&&(i(p$1(true)),i(q$1(true)),sessionStorage.setItem("previousVideoTime",String(u().currentTime)),t.target.setPointerCapture(t.pointerId),o.length>0&&o.map(p=>clearTimeout(p)));},Ze=t=>{t.preventDefault(),t.stopPropagation();let o=za.dispatch,{activePointerProgressBar:l}=za.getState().controller,{left:i}=za.getState().videoData.videoElementSizeInfo,r=t.clientX!==void 0?t.clientX:t.touches[0].clientX,p=document.querySelector(".pl-progressTooltip");r>i?(p&&(p.style.display="block !important",p.style.pointerEvents="auto"),l&&(o(q$1(true)),de(t),Ht(t),u()?.pause())):p&&(p.style.display="none !important",p.style.pointerEvents="none");},Xt=(t$1,o,l,i)=>{i(false),t$1.preventDefault(),t$1.stopPropagation();let r=za.dispatch,{duration:p}=za.getState().controller,{left:c,right:d}=za.getState().videoData.videoElementSizeInfo,n=za.getState().videoData.params;t$1.target.removeEventListener("pointermove",Ze);let h=t$1.clientX!==void 0?t$1.clientX:t$1.touches[0].clientX,v=0;h>c&&h<d?v=Qe(t$1):h<c?v=0:h>0&&(v=p),t("isStaticFormat")||aa(u().currentTime,v),u().currentTime=v,t("hasOnChangeCurrentTime")&&n.onChangeCurrentTime(v),za.getState().controller.activePointerProgressBar&&(r(p$1(false)),r(q$1(false)),u().play(),de(t$1,true),sessionStorage.setItem("current-time",String(v)),Ht(t$1),Jl(t$1,r,o,l));},Jl=(t,o,l,i)=>{let r=i,p=setTimeout(()=>{let{settingPopover:c}=za.getState().popovers,{delayTurnOffControlbar:d}=za.getState().controller;t.pointerType==="touch"&&!c&&d&&o(k$1(false));},a$4);r.push(p),l(r);},Rt=()=>{let t=Date.now();u().play().then(()=>A$1(D(Date.now()-t)));},jt=t=>de(t),Ut=()=>{let t=document.querySelector(".pl-progressTooltip");ue(t);},Kl=t=>{let o=t.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}},Vt=t=>{let o=Kl(t);return parseInt(o.hours*3600+o.minutes*60+o.seconds+o.milliseconds/1e3,10)},eo=t=>{let o=t.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}},to=(t,o)=>t.indexOf("//")>=0?t:o.indexOf("//")===0?[o.replace(/\/$/gi,""),t.trim()].join("/"):o.indexOf("//")>0?[o.trim(),t.trim()].join("/"):t,lo=(t,o)=>{let l={},i=o.split(/\/\w+\.vtt\s?/)[0];if(t=to(t,i),!t.match(/#xywh=/i))return l.background='url("'+t+o.split(/\/\w+\.vtt\s?/)[1]+'")',l;let r=eo(t);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},Wt=(t,o)=>{fetch(t).then(l=>{if(!l.ok)throw za.dispatch(a$2({...za.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),n=c[0].split(/ ?--> ?/i),h=n[0],v=n[1],f=c[1],s=lo(f,t);i.push({start:Vt(h),end:Vt(v),css:s});}}),o(i);}).catch(l=>{console.error("Error fetching file:",l);});},Qt=(t,o,l)=>{for(let i=0;i<o.length;++i){let r=o[i];if(t>=r.start&&t<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 io=()=>{let{details:t$1}=A(({videoData:{details:d}})=>({details:d}),shallowEqual),{tooltipTime:o}=A(({controller:{tooltipTime:d,activeElements:n,isFullScreen:h}})=>({tooltipTime:d,activeElements:n,isFullScreen:h}),shallowEqual),l={},[i,r]=useState(void 0),[p,c]=useState(t("isTouchScreen")?t$1.vtt_mobile:t$1.vtt);if(useEffect(()=>{c(t$1.vtt_mobile);},[t$1.vtt_mobile]),useEffect(()=>{p&&Wt(t$1.vtt_mobile,r);},[p]),t("isActiveElements"))return jsxs("div",{className:`pl-flex pl-flex-col pl-items-center pl-justify-center 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:da("pl-flex-1 pl-border-[1.5px] pl-border-white pl-overflow-hidden pl-relative pl-rounded-[12px]",{desktopFullScreen:"pl-h-[164px] pl-w-[291px] pl-mb-1.5",desktop:"pl-h-[93px] pl-w-[165px] pl-mb-1",touch:"pl-h-[70px] pl-w-[135px] pl-mb-1",touchFullScreen:"pl-h-[137px] pl-w-[244px]"}),children:jsx("div",{style:Qt(o,i,l),className:da("pl-absolute pl-inset-0 pl-top-1/2 pl-left-1/2 -pl-translate-x-1/2 -pl-translate-y-1/2 ",{desktop:"pl-scale-[170%]",touch:"pl-scale-[130%]",desktopFullScreen:"pl-scale-[290%]",touchFullScreen:"pl-scale-[250%]"})})}),jsx("div",{className:da("pl-flex pl-mx-auto pl-items-center pl-w-fit pl-bg-black/75 pl-rounded-[24px] pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100 ",{desktop:"pl-text-[12px] pl-py-1 pl-px-2 pl-font-bold",desktopFullScreen:"pl-text-base pl-py-1.5 pl-px-3",touchFullScreen:"pl-text-base pl-py-1.5 pl-px-3",touch:"pl-text-[12px] pl-py-1 pl-px-2"})})]})},Jt=memo(io);e();e();var so=(t,o)=>{useEffect(()=>{let l=i=>{!t.current||t.current.contains(i.target)||o(i);};return document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("touchstart",l);}},[t,o]);},R=so;e();var no=({name:t,className:o,dataMarker:l})=>jsx("img",{"data-marker":l,src:`${y()}/${t}.png`,alt:t,className:o}),Ye=no;var uo=()=>{z();let {duration:o,activeElements:l}=A(({controller:{duration:a,activeElements:x,isFullScreen:$}})=>({duration:a,activeElements:x,isFullScreen:$}),shallowEqual),{markers:i}=A(({videoData:{markers:a,videoElementSizeInfo:x}})=>({markers:a,videoElementSizeInfo:x}),shallowEqual),[r,p]=useState(void 0),[c,d]=useState([]),[n,h]=useState({}),[v,f]=useState(false),s=a=>o?x()*a/o:0,w$1=(a,x$1,$,A,_,J,q,oe)=>{a.stopPropagation();let we=24*x$1/(x()+5),K=[],B=0;oe.map(ye=>{ye.time>x$1-we&&ye.time<x$1+we&&(K.push(ye),B+=ye.time);}),K.length>1?d(K):(K=[],d([]),F(a,x$1,$,A,_,J,q));},F=(a,x,$,A,_,J,q)=>{a.stopPropagation(),de(a,q),aa(u().currentTime,x),u().currentTime=x,w()&&(w().style.width=s(x)),A$1(M($,x,A,_,J));};useEffect(()=>{t("isActiveElements")||d([]);},[l]);let M$1=useRef(null);R(M$1,()=>d([])),useEffect(()=>{if(c.length>0){let a=ua(document.getElementsByClassName("pl-overlapMarkers")[0]);if(a==="inViewport")return f(true),h({left:s(c[0].time)});if(a==="OutViewPortFromLeft")return f(false),h({left:0});if(a==="OutViewPortFromRight")return f(false),h({right:0})}},[c,document.getElementsByClassName("pl-overlapMarkers")[0]]);let k=a=>{a.preventDefault(),t("isTouchScreen")&&p(Number(a.target.getAttribute("data-marker")));};return jsxs(Fragment,{children:[i.map(a=>jsx("div",{onContextMenu:k,"data-marker":a.time,onClick:x=>w$1(x,a.time,a.id,a.title,a.description,a.sticker,true,i),onDoubleClick:x=>x.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 ${t("isTouchScreenPortrait"),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:s(a.time),zIndex:5},"data-marker":a.time,children:[a.isPersonal!==null&&a.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(Ye,{dataMarker:a.time,name:a.sticker,className:"pl-w-[16px] pl-h-[16px] !pl-max-w-max"})]})},a.id)),c.length>0&&jsx("div",{className:`pl-overlapMarkers ${v?"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:M$1,style:n,children:c.map(a=>jsx("div",{className:"pl-emoji-image pl-rounded-[6px] pl-cursor-pointer","data-marker":a.time,onClick:x=>F(x,a.time,a.id,a.title,a.description,a.sticker,true),onDoubleClick:x=>x.stopPropagation(),children:jsx(Ye,{dataMarker:a.time,name:a.sticker,className:"pl-w-[24px] pl-h-[24px] !pl-max-w-max"})},a.id))})]})},ll=memo(uo);var xo=()=>{let[t$1,o]=useState(false);useEffect(()=>{ue(document.querySelector(".progressTooltip"));},[]);let{duration:l,currentTime:i,bufferedTimeWidth:r}=A(({controller:{duration:d,currentTime:n,bufferedTimeWidth:h}})=>({duration:d,currentTime:n,bufferedTimeWidth:h}),shallowEqual);A(({videoData:{params:d,videoElementSizeInfo:n}})=>({params:d,videoElementSizeInfo:n}),shallowEqual);let[p,c]=useState([]);return jsxs("div",{className:`${t("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative `,children:[jsxs("div",{className:"pl-relative",children:[jsx(Jt,{}),jsx(ll,{})]}),jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:d=>qt(d,p,o),onPointerMove:Ze,onPointerUp:d=>Xt(d,c,p,o),onMouseMove:jt,onMouseOut:Ut,onClick:Rt,onDoubleClick:d=>d.stopPropagation(),children:jsxs("div",{id:"progress-area",className:da("pl-w-full pl-absolute",{desktop:"pl-px-4"}),children:[jsx("div",{className:"pl-w-full pl-h-[40px]"}),jsxs("div",{id:"time-progress-area",className:da("!pl-w-full pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-[#4A4A4A] ",{desktopFullScreen:"!pl-h-[6px]",desktop:"!pl-h-[3px] pl-rounded-[8px]",touch:"!pl-h-[3px]"}),children:[jsx("div",{id:"time-progress-buffer",className:da("pl-absolute pl-bg-[#C7C7C7] ",{desktopFullScreen:"!pl-h-[6px]",desktop:"!pl-h-[3px] pl-rounded-[8px]",touch:"!pl-h-[3px]",touchFullScreen:""}),style:{width:`${r}%`}}),jsx("div",{style:{width:`${i/l*x()}px`},id:"time-progress-bar",className:da(" pl-relative pl-cursor-pointer pl-bg-[#FF0033] before:pl-bg-[#FF0033] before:pl-inline-block",{desktop:`!pl-h-[3px] before:pl-size-[9px] pl-rounded-[8px] ${t$1&&"before:!pl-size-[11px]"}`,desktopFullScreen:`!pl-h-[6px] before:pl-size-[20px] ${t$1&&"before:!pl-size-[22px]"}`,touch:"!pl-h-[3px] before:pl-size-[8px]",touchFullScreen:"before:pl-size-[9px]"})})]})]})})]})},pl=xo;e();e();e();var sl=forwardRef(({children:t,status:o,onClose:l,type:i,classNames:r,parentClassNames:p,styles:c,isBlurBackground:d,isFullHeight:n=false,isFullScreen:h,isHeader:v,isHasCatchUpLineOnTop:f=false,animation:s,scrollbar:w=false,isFocusOnInput:F=false},M)=>{let[k,a]=useState(o),[x,$]=useState(0),[A$1,_]=useState(0),[J,q]=useState(0),{videoElementSizeInfo:oe}=A(({videoData:{videoElementSizeInfo:B}})=>({videoElementSizeInfo:B}),shallowEqual);useEffect(()=>{let B;return o?a(true):B=setTimeout(()=>{l(false),_(0),a(false);},500),()=>clearTimeout(B)},[o]);let pt=B=>{B.touches[0].clientY>=oe.top?_(window.innerHeight-B.touches[0].clientY):_(window.innerHeight-oe.top),q(1005);},we=()=>{A$1!==0&&(A$1>x?A$1-x>(window.innerHeight-oe.top-x)/2?(_(window.innerHeight-oe.top),q(1005)):(_(0),setTimeout(()=>q(0),500)):(A$1>x/2?_(x):(_(0),$(0),l()),q(0)));},K=jsxs(Fragment,{children:[d&&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:1001,backdropFilter:"blur(4px)"}}),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:n&&!F?J:1004},children:jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9] dark:pl-bg-black/[0.7]
1
+ import {a as a$3}from'./chunk-BQFMEVY7.mjs';import {b as b$1,c as c$1,a as a$5}from'./chunk-7HCAJ7X2.mjs';import {a as a$1,c,b}from'./chunk-MUO76V7J.mjs';import {a as a$4,b as b$3}from'./chunk-7EFML44G.mjs';import {a}from'./chunk-X7ZT44GS.mjs';import {b as b$2}from'./chunk-WKL5H4H7.mjs';import {da,t,ua,A as A$1,C,xa,q,k,u,j,L,m,r,o,ea,za,a as a$2,x,y,aa,w,M,p,B,ha,ca,Z,X,W,T,Y as Y$1,ba,ga,ja,$,ta,va,D}from'./chunk-LK3SCAXS.mjs';import {e,A,z,v,k as k$1,p as p$1,q as q$1}from'./chunk-SVD4N6WD.mjs';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {shallowEqual}from'react-redux';import te from'next/legacy/image';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import lt from'next/image';import {createPortal}from'react-dom';import $l from'next/dynamic';e();e();e();var Hl=()=>jsxs("div",{className:`pl-relative animate__animated animate__faster ${t("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsx(te,{src:a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>$("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"})]}),Mt=Hl;var Rl=()=>{let{firstPlay:t$1}=A(({controller:{lock:o,activeElements:l,firstPlay:i}})=>({lock:o,activeElements:l,firstPlay:i}),shallowEqual);return jsx("div",{className:da(`pl-duration-300 pl-transition-[opacity] ${t$1?"pl-opacity-0":"pl-opacity-100"}`,{desktop:"pl-rounded-t-[12px] pl-pt-8 pl-h-[45.5px]",touch:"pl-h-[16px]"}),children:jsx("div",{className:" pl-mx-8 pl-flex pl-items-start pl-justify-end pl-h-full",children:t("isLock")&&jsx(Mt,{})})})},Dt=Rl;e();var Ul=()=>{let{firstPlay:t$1,autoplay:o,play:l,isLoading:i}=A(({controller:{lock:n,firstPlay:h,play:v,activeElements:f,isLoading:s},videoData:{params:{autoplay:w}}})=>({lock:n,firstPlay:h,autoplay:w,play:v,activeElements:f,isLoading:s}),shallowEqual),[r,p]=useState(true),[c,d]=useState(!o);return useEffect(()=>{if(t$1||t("isTouchScreen"))return;let n=null;return d(true),n=setTimeout(()=>d(false),1e3),()=>{n&&clearTimeout(n);}},[l,t$1]),useEffect(()=>{let n;return i?n=setTimeout(()=>p(true),b$3):p(false),()=>{clearTimeout(n);}},[i,t$1]),jsx("main",{className:"pl-flex-1 pl-mt-1",children:r?jsx(a$5,{}):jsx(Fragment,{children:!t("isLock")&&jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${t("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:t("isTouchScreen")?jsxs("div",{className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:2},children:[!t$1&&jsx("div",{onClick:n=>{n.stopPropagation(),Y$1("touchForward",10,n);},className:`pl-flex pl-transition-all pl-duration-300 pl-ease-in-out pl-items-center pl-justify-center pl-rounded-full ${t("isFullScreen")?"pl-size-[56px]":"pl-size-[40px]"} pl-bg-black/75 ${t("isActiveElements")?"pl-opacity-100":"pl-opacity-0"}`,children:jsx(lt,{src:a.forward2,alt:"",className:"!pl-cursor-pointer",width:t("isFullScreen")?28:16,height:t("isFullScreen")?28:16})}),jsx(b$1,{normalStyle:true,disableScale:true,disableTooltip:true,className:`pl-flex pl-transition-all pl-duration-300 pl-ease-in-out pl-items-center pl-justify-center pl-rounded-full ${t("isFullScreen")?"pl-size-[68px]":"pl-size-[48px]"} pl-bg-black/75 ${t("isActiveElements")?"pl-opacity-100":"pl-opacity-0"}`,width:t("isFullScreen")?36:24,height:t("isFullScreen")?36:24}),!t$1&&jsx("div",{onClick:n=>{n.stopPropagation(),Y$1("touchBackward",10,n);},className:`pl-flex pl-transition-all pl-duration-300 pl-ease-in-out pl-items-center pl-justify-center pl-rounded-full ${t("isFullScreen")?"pl-size-[56px]":"pl-size-[40px]"} pl-bg-black/75 ${t("isActiveElements")?"pl-opacity-100":"pl-opacity-0"}`,children:jsx(lt,{src:a.backward2,alt:"",className:"!pl-cursor-pointer",width:t("isFullScreen")?28:16,height:t("isFullScreen")?28:16})})]}):jsx("div",{className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:2},children:jsx(b$1,{normalStyle:true,disableScale:true,disableTooltip:true,inverse:!t$1,width:t("isFullScreen")?81:48,height:t("isFullScreen")?81:48,className:`pl-flex pl-transition-all pl-duration-300 pl-ease-in-out pl-items-center pl-justify-center pl-rounded-full ${t("isFullScreen")?"pl-size-[122px]":"pl-size-[72px]"} pl-bg-black/75 ${c?"pl-opacity-100":"pl-opacity-0 pl-scale-0"} ${t$1?"!pl-cursor-pointer":"!pl-cursor-default"}`})})})})})},Bt=Ul;e();e();e();e();var Qe=t=>{let{videoElementSizeInfo:o}=za.getState().videoData,{duration:l}=za.getState().controller,i=t.clientX!==void 0?t.clientX:t.touches[0].clientX;if(i<=o.right&&i>0)return (i-o.left)/o.width*l},ee=t=>{let{videoElementSizeInfo:o}=za.getState().videoData,l=t.clientX!==void 0?t.clientX:t.touches[0].clientX;if(l<=o.right&&l>0)return l-o.left};var ue=t=>{t&&(t.style.opacity="0.0",t.style.pointerEvents="none",t.style.zIndex=-2);},Zl=t=>{t.style.display="block",t.style.zIndex=4,t.style.opacity=za.getState().videoData.details.vtt?"1.0":"0.6",t.style.pointerEvents="auto",t.style.transition="opacity 1s ease-out";},Gl=(t,o)=>{let{videoElementSizeInfo:l}=za.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(ee(t)>i.getBoundingClientRect().width/2&&ee(t)<l.right-l.left-i.getBoundingClientRect().width/2?o.style.left=`${ee(t)-i.offsetWidth/2}px`:ee(t)<i.offsetWidth?o.style.left="0px":u().offsetLeft+u().offsetWidth<ee(t)+i.offsetWidth&&(o.style.left=`${u().offsetWidth-i.offsetWidth}px`));},Yl=(t,o,l)=>{o&&Zl(o),za.getState().videoData.details.vtt?Gl(t,o):o.style.left=`${ee(t)-30}px`,za.dispatch(v(Number(Qe(t)))),l.textContent=`${ha(Qe(t))}`;},de=(t,o=false)=>{let{videoElementSizeInfo:l}=za.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),p=t.clientX!==void 0?t.clientX:t.touches[0].clientX;i&&r&&p<=l.right&&p>l.left?(Yl(t,i,r),o&&setTimeout(()=>ue(i),2e3)):ue(i);},Ht=t=>{let o=t.clientX!==void 0?t.clientX:t.touches[0].clientX;w()&&(o<=t.view.innerWidth&&o>0?w().style.width=`${ee(t)}px`:o<=t.view.innerWidth?w().style.width=0:o>0&&(w().style.width="100%"));},qt=(t,o,l)=>{t.preventDefault(),t.stopPropagation(),l(true);let i=za.dispatch,r=t.clientX!==void 0?t.clientX:t.touches[0].clientX;r<=t.view.innerWidth&&r>0&&(i(p$1(true)),i(q$1(true)),sessionStorage.setItem("previousVideoTime",String(u().currentTime)),t.target.setPointerCapture(t.pointerId),o.length>0&&o.map(p=>clearTimeout(p)));},Ze=t=>{t.preventDefault(),t.stopPropagation();let o=za.dispatch,{activePointerProgressBar:l}=za.getState().controller,{left:i}=za.getState().videoData.videoElementSizeInfo,r=t.clientX!==void 0?t.clientX:t.touches[0].clientX,p=document.querySelector(".pl-progressTooltip");r>i?(p&&(p.style.display="block !important",p.style.pointerEvents="auto"),l&&(o(q$1(true)),de(t),Ht(t),u()?.pause())):p&&(p.style.display="none !important",p.style.pointerEvents="none");},Xt=(t$1,o,l,i)=>{i(false),t$1.preventDefault(),t$1.stopPropagation();let r=za.dispatch,{duration:p}=za.getState().controller,{left:c,right:d}=za.getState().videoData.videoElementSizeInfo,n=za.getState().videoData.params;t$1.target.removeEventListener("pointermove",Ze);let h=t$1.clientX!==void 0?t$1.clientX:t$1.touches[0].clientX,v=0;h>c&&h<d?v=Qe(t$1):h<c?v=0:h>0&&(v=p),t("isStaticFormat")||aa(u().currentTime,v),u().currentTime=v,t("hasOnChangeCurrentTime")&&n.onChangeCurrentTime(v),za.getState().controller.activePointerProgressBar&&(r(p$1(false)),r(q$1(false)),u().play(),de(t$1,true),sessionStorage.setItem("current-time",String(v)),Ht(t$1),Jl(t$1,r,o,l));},Jl=(t,o,l,i)=>{let r=i,p=setTimeout(()=>{let{settingPopover:c}=za.getState().popovers,{delayTurnOffControlbar:d}=za.getState().controller;t.pointerType==="touch"&&!c&&d&&o(k$1(false));},a$4);r.push(p),l(r);},Rt=()=>{let t=Date.now();u().play().then(()=>A$1(D(Date.now()-t)));},jt=t=>de(t),Ut=()=>{let t=document.querySelector(".pl-progressTooltip");ue(t);},Kl=t=>{let o=t.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}},Vt=t=>{let o=Kl(t);return parseInt(o.hours*3600+o.minutes*60+o.seconds+o.milliseconds/1e3,10)},eo=t=>{let o=t.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}},to=(t,o)=>t.indexOf("//")>=0?t:o.indexOf("//")===0?[o.replace(/\/$/gi,""),t.trim()].join("/"):o.indexOf("//")>0?[o.trim(),t.trim()].join("/"):t,lo=(t,o)=>{let l={},i=o.split(/\/\w+\.vtt\s?/)[0];if(t=to(t,i),!t.match(/#xywh=/i))return l.background='url("'+t+o.split(/\/\w+\.vtt\s?/)[1]+'")',l;let r=eo(t);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},Wt=(t,o)=>{fetch(t).then(l=>{if(!l.ok)throw za.dispatch(a$2({...za.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),n=c[0].split(/ ?--> ?/i),h=n[0],v=n[1],f=c[1],s=lo(f,t);i.push({start:Vt(h),end:Vt(v),css:s});}}),o(i);}).catch(l=>{console.error("Error fetching file:",l);});},Qt=(t,o,l)=>{for(let i=0;i<o.length;++i){let r=o[i];if(t>=r.start&&t<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 io=()=>{let{details:t$1}=A(({videoData:{details:d}})=>({details:d}),shallowEqual),{tooltipTime:o}=A(({controller:{tooltipTime:d,activeElements:n,isFullScreen:h}})=>({tooltipTime:d,activeElements:n,isFullScreen:h}),shallowEqual),l={},[i,r]=useState(void 0),[p,c]=useState(t("isTouchScreen")?t$1.vtt_mobile:t$1.vtt);if(useEffect(()=>{c(t$1.vtt_mobile);},[t$1.vtt_mobile]),useEffect(()=>{p&&Wt(t$1.vtt_mobile,r);},[p]),t("isActiveElements"))return jsxs("div",{className:`pl-flex pl-flex-col pl-items-center pl-justify-center 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:da("pl-flex-1 pl-border-[1.5px] pl-border-white pl-overflow-hidden pl-relative pl-rounded-[12px]",{desktopFullScreen:"pl-h-[164px] pl-w-[291px] pl-mb-1.5",desktop:"pl-h-[93px] pl-w-[165px] pl-mb-1",touch:"pl-h-[70px] pl-w-[135px] pl-mb-1",touchFullScreen:"pl-h-[137px] pl-w-[244px]"}),children:jsx("div",{style:Qt(o,i,l),className:da("pl-absolute pl-inset-0 pl-top-1/2 pl-left-1/2 -pl-translate-x-1/2 -pl-translate-y-1/2 ",{desktop:"pl-scale-[170%]",touch:"pl-scale-[130%]",desktopFullScreen:"pl-scale-[290%]",touchFullScreen:"pl-scale-[250%]"})})}),jsx("div",{className:da("pl-flex pl-mx-auto pl-items-center pl-w-fit pl-bg-black/75 pl-rounded-[24px] pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100 ",{desktop:"pl-text-[12px] pl-py-1 pl-px-2 pl-font-bold",desktopFullScreen:"pl-text-base pl-py-1.5 pl-px-3",touchFullScreen:"pl-text-base pl-py-1.5 pl-px-3",touch:"pl-text-[12px] pl-py-1 pl-px-2"})})]})},Jt=memo(io);e();e();var so=(t,o)=>{useEffect(()=>{let l=i=>{!t.current||t.current.contains(i.target)||o(i);};return document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("touchstart",l);}},[t,o]);},R=so;e();var no=({name:t,className:o,dataMarker:l})=>jsx("img",{"data-marker":l,src:`${y()}/${t}.png`,alt:t,className:o}),Ye=no;var uo=()=>{z();let {duration:o,activeElements:l}=A(({controller:{duration:a,activeElements:x,isFullScreen:$}})=>({duration:a,activeElements:x,isFullScreen:$}),shallowEqual),{markers:i}=A(({videoData:{markers:a,videoElementSizeInfo:x}})=>({markers:a,videoElementSizeInfo:x}),shallowEqual),[r,p]=useState(void 0),[c,d]=useState([]),[n,h]=useState({}),[v,f]=useState(false),s=a=>o?x()*a/o:0,w$1=(a,x$1,$,A,_,J,q,oe)=>{a.stopPropagation();let we=24*x$1/(x()+5),K=[],B=0;oe.map(ye=>{ye.time>x$1-we&&ye.time<x$1+we&&(K.push(ye),B+=ye.time);}),K.length>1?d(K):(K=[],d([]),F(a,x$1,$,A,_,J,q));},F=(a,x,$,A,_,J,q)=>{a.stopPropagation(),de(a,q),aa(u().currentTime,x),u().currentTime=x,w()&&(w().style.width=s(x)),A$1(M($,x,A,_,J));};useEffect(()=>{t("isActiveElements")||d([]);},[l]);let M$1=useRef(null);R(M$1,()=>d([])),useEffect(()=>{if(c.length>0){let a=ua(document.getElementsByClassName("pl-overlapMarkers")[0]);if(a==="inViewport")return f(true),h({left:s(c[0].time)});if(a==="OutViewPortFromLeft")return f(false),h({left:0});if(a==="OutViewPortFromRight")return f(false),h({right:0})}},[c,document.getElementsByClassName("pl-overlapMarkers")[0]]);let k=a=>{a.preventDefault(),t("isTouchScreen")&&p(Number(a.target.getAttribute("data-marker")));};return jsxs(Fragment,{children:[i.map(a=>jsx("div",{onContextMenu:k,"data-marker":a.time,onClick:x=>w$1(x,a.time,a.id,a.title,a.description,a.sticker,true,i),onDoubleClick:x=>x.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 ${t("isTouchScreenPortrait"),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:s(a.time),zIndex:5},"data-marker":a.time,children:[a.isPersonal!==null&&a.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(Ye,{dataMarker:a.time,name:a.sticker,className:"pl-w-[16px] pl-h-[16px] !pl-max-w-max"})]})},a.id)),c.length>0&&jsx("div",{className:`pl-overlapMarkers ${v?"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:M$1,style:n,children:c.map(a=>jsx("div",{className:"pl-emoji-image pl-rounded-[6px] pl-cursor-pointer","data-marker":a.time,onClick:x=>F(x,a.time,a.id,a.title,a.description,a.sticker,true),onDoubleClick:x=>x.stopPropagation(),children:jsx(Ye,{dataMarker:a.time,name:a.sticker,className:"pl-w-[24px] pl-h-[24px] !pl-max-w-max"})},a.id))})]})},ll=memo(uo);var xo=()=>{let[t$1,o]=useState(false);useEffect(()=>{ue(document.querySelector(".progressTooltip"));},[]);let{duration:l,currentTime:i,bufferedTimeWidth:r}=A(({controller:{duration:d,currentTime:n,bufferedTimeWidth:h}})=>({duration:d,currentTime:n,bufferedTimeWidth:h}),shallowEqual);A(({videoData:{params:d,videoElementSizeInfo:n}})=>({params:d,videoElementSizeInfo:n}),shallowEqual);let[p,c]=useState([]);return jsxs("div",{className:`${t("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative `,children:[jsxs("div",{className:"pl-relative",children:[jsx(Jt,{}),jsx(ll,{})]}),jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:d=>qt(d,p,o),onPointerMove:Ze,onPointerUp:d=>Xt(d,c,p,o),onMouseMove:jt,onMouseOut:Ut,onClick:Rt,onDoubleClick:d=>d.stopPropagation(),children:jsxs("div",{id:"progress-area",className:da("pl-w-full pl-absolute",{desktop:"pl-px-4"}),children:[jsx("div",{className:"pl-w-full pl-h-[40px]"}),jsxs("div",{id:"time-progress-area",className:da("!pl-w-full pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-[#4A4A4A] ",{desktopFullScreen:"!pl-h-[6px]",desktop:"!pl-h-[3px] pl-rounded-[8px]",touch:"!pl-h-[3px]"}),children:[jsx("div",{id:"time-progress-buffer",className:da("pl-absolute pl-bg-[#C7C7C7] ",{desktopFullScreen:"!pl-h-[6px]",desktop:"!pl-h-[3px] pl-rounded-[8px]",touch:"!pl-h-[3px]",touchFullScreen:""}),style:{width:`${r}%`}}),jsx("div",{style:{width:`${i/l*x()}px`},id:"time-progress-bar",className:da(" pl-relative pl-cursor-pointer pl-bg-[#FF0033] before:pl-bg-[#FF0033] before:pl-inline-block",{desktop:`!pl-h-[3px] before:pl-size-[9px] pl-rounded-[8px] ${t$1&&"before:!pl-size-[11px]"}`,desktopFullScreen:`!pl-h-[6px] before:pl-size-[20px] ${t$1&&"before:!pl-size-[22px]"}`,touch:"!pl-h-[3px] before:pl-size-[8px]",touchFullScreen:"before:pl-size-[9px]"})})]})]})})]})},pl=xo;e();e();e();var sl=forwardRef(({children:t,status:o,onClose:l,type:i,classNames:r,parentClassNames:p,styles:c,isBlurBackground:d,isFullHeight:n=false,isFullScreen:h,isHeader:v,isHasCatchUpLineOnTop:f=false,animation:s,scrollbar:w=false,isFocusOnInput:F=false},M)=>{let[k,a]=useState(o),[x,$]=useState(0),[A$1,_]=useState(0),[J,q]=useState(0),{videoElementSizeInfo:oe}=A(({videoData:{videoElementSizeInfo:B}})=>({videoElementSizeInfo:B}),shallowEqual);useEffect(()=>{let B;return o?a(true):B=setTimeout(()=>{l(false),_(0),a(false);},500),()=>clearTimeout(B)},[o]);let pt=B=>{B.touches[0].clientY>=oe.top?_(window.innerHeight-B.touches[0].clientY):_(window.innerHeight-oe.top),q(1005);},we=()=>{A$1!==0&&(A$1>x?A$1-x>(window.innerHeight-oe.top-x)/2?(_(window.innerHeight-oe.top),q(1005)):(_(0),setTimeout(()=>q(0),500)):(A$1>x/2?_(x):(_(0),$(0),l()),q(0)));},K=jsxs(Fragment,{children:[d&&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:1001,backdropFilter:"blur(4px)"}}),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:n&&!F?J:1004},children:jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9] dark:pl-bg-black/[0.7]
2
2
  ${n&&"pl-h-full"}
3
3
  ${s||(window.innerWidth>768&&i==="modal"?o?"animate__fadeIn":"animate__fadeOut":o?"animate__fadeInUp":"animate__fadeOutDown")}
4
4
  before:pl-hidden
5
5
  ${i!=="modal"&&`pl-absolute ${da("",{desktop:"pl-bottom-[20px]",desktopFullScreen:"pl-bottom-[60px]"})} pl-overflow-auto no-scrollbar`}
6
6
  ${r}
7
- `,style:{maxHeight:h?"unset":A$1||x||"",zIndex:1004,...c},ref:M,id:"popover-content",children:jsxs(Fragment,{children:[v&&jsx("div",{onTouchMove:f?pt:()=>{},onTouchEndCapture:f?we:()=>{},className:"pl-py-4",children:f&&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",{id:"popover-content",className:`pl-overflow-y-auto pl-h-full pl-w-full ${!w&&"no-scrollbar"}`,onTouchMove:B=>B.stopPropagation(),children:t})]})})})]});return jsx(Fragment,{children:k&&jsx(Fragment,{children:i==="modal"?createPortal(jsx("div",{style:{fontFamily:"IRANSansXFaNum",direction:"rtl",overflowX:"hidden"},children:K}),document.getElementById("dialog-react-root-videoPlayer")):jsx("div",{id:"player-popover",children:K})})})});sl.displayName="popover";var Y=sl;e();var Co=({setSection:t$1,showQualityLevelsIcon:o})=>{let l=z(),{qualityLevels:i}=A(({controller:{qualityLevels:s,manualQuality:w,autoQuality:F}})=>({qualityLevels:s,manualQuality:w,autoQuality:F}),shallowEqual),{settings:r}=A(({user:{settings:s}})=>({settings:s}),shallowEqual),{qualityLevelsPopover:p}=A(({popovers:{qualityLevelsPopover:s}})=>({qualityLevelsPopover:s}),shallowEqual),{videoElementSizeInfo:c}=A(({videoData:{params:s,videoElementSizeInfo:w}})=>({params:s,videoElementSizeInfo:w}),shallowEqual),[d,n]=useState(false);i=[-1,...i];let h=(s,w)=>t("isAutoQuality")&&w===-1?true:!t("isAutoQuality")&&r.quality===s,v=useRef(null);R(v,()=>l(q(false)));let f=jsx("div",{id:"qualityLevels",className:`animate__animated animate__fadeIn ${t("isTouchScreen")?"pl-pb-2":"pl-py-2"}`,children:jsxs("ul",{className:"pl-flex pl-flex-col pl-gap-1",children:[jsxs("li",{className:`pl-flex pl-items-center pl-border-b ${t("isTouchScreen")?"pl-border-b-[#D9D9D9]":"pl-border-b-[#4A4A4A]"} pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-h-10`,onClick:()=>t$1&&t$1("main"),children:[jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.chevronRight,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:16,height:16})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"})]}),jsx("div",{className:"pl-overflow-y-auto no-scrollbar",style:{maxHeight:t("isTouchScreenPortrait")?void 0:c.height-200-70},children:i.map((s,w)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-h-10 pl-transition-all ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} ${h(w-1,s)&&"!pl-cursor-default"}`,onClick:()=>{h(w-1,s)||(A$1(C(s===-1?"auto":`${s}P`)),l(xa({...r,quality:s===-1?-1:w-1})),t$1&&t$1("main"));},children:[!!h(w-1,s)&&jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.tick,alt:"",className:t("isTouchScreen")?"pl-brightness-0":"",width:20,height:20})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:s===-1?jsxs("span",{children:[jsx("span",{children:"\u062E\u0648\u062F\u06A9\u0627\u0631 "}),jsx("span",{className:`pl-text-[10px] pl-font-normal ${t("isTouchScreen")?"pl-text-[#737373]":"pl-text-[#C7C7C7]"}`,children:"(\u0628\u0631 \u0627\u0633\u0627\u0633 \u0633\u0631\u0639\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u0634\u0645\u0627)"})]}):`${s}p`})]},w))})]})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:v,children:[jsx(te,{src:a.qualitySetting,alt:"speed-icon",width:20,height:20,onClick:()=>l(q(!p)),onMouseOver:()=>!t("isTouchScreen")&&!t("showQualityLevelsPopover")&&n(true),onMouseLeave:()=>!t("isTouchScreen")&&n(false),className:"pl-cursor-pointer"}),d&&jsx(a$1,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsx(Y,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-black/[75%] ${t("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]"} ${t("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${t("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:p,onClose:()=>l(q(false)),type:t("isTouchScreen")?"modal":"popover",isBlurBackground:t("isTouchScreen"),ref:t("isTouchScreen")?v:void 0,isHeader:t("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:t("isTouchScreen"),styles:{maxHeight:!t("isTouchScreenPortrait")&&c.height-(t("isTouchScreenLandscape")?120:75)},children:f})]}):jsx(Fragment,{children:f})})},nl=memo(Co);e();e();var ko=({className:t,onClick:o,onMouseOver:l,onMouseLeave:i,width:r,height:p})=>jsx("svg",{width:"20",height:"20",fill:"none",onClick:o,viewBox:"0 0 20 20",className:t,onMouseOver:l,style:{width:r,height:p},onMouseLeave:i,xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M8.83613 12.7885C9.13211 13.0844 9.51329 13.2249 9.97967 13.21C10.4459 13.195 10.7881 13.0267 11.0061 12.7052L15.5284 6.15396L8.96113 10.6602C8.63433 10.8783 8.4578 11.2135 8.43155 11.6658C8.40544 12.1183 8.5403 12.4926 8.83613 12.7885ZM9.99967 3.75C10.7925 3.75 11.5352 3.85389 12.228 4.06167C12.9209 4.26944 13.59 4.58382 14.2353 5.00479L13.0605 5.76438C12.5862 5.51229 12.0945 5.32188 11.5855 5.19313C11.0763 5.06438 10.5477 5 9.99967 5C8.15245 5 6.57954 5.64931 5.28092 6.94792C3.98231 8.24653 3.33301 9.81944 3.33301 11.6667C3.33301 12.25 3.41287 12.8264 3.57259 13.3958C3.73231 13.9653 3.95801 14.5 4.24967 15H15.7497C16.0691 14.4722 16.3018 13.9236 16.4476 13.3542C16.5934 12.7847 16.6663 12.1944 16.6663 11.5833C16.6663 11.0833 16.6047 10.5772 16.4813 10.065C16.3579 9.55264 16.1674 9.06625 15.9099 8.60583L16.6695 7.43104C17.0809 8.10521 17.3894 8.77965 17.5951 9.45438C17.8006 10.1291 17.9077 10.8302 17.9163 11.5577C17.9248 12.312 17.8399 13.0249 17.6616 13.6963C17.4831 14.3678 17.2144 15.0246 16.8555 15.6667C16.7454 15.8472 16.5904 15.9896 16.3907 16.0938C16.1909 16.1979 15.9772 16.25 15.7497 16.25H4.24967C4.02745 16.25 3.8178 16.1966 3.62072 16.0898C3.42363 15.9828 3.26467 15.8311 3.14384 15.6346C2.82551 15.079 2.56912 14.4733 2.37467 13.8173C2.18023 13.1613 2.08301 12.4444 2.08301 11.6667C2.08301 10.5781 2.28954 9.55465 2.70259 8.59646C3.11565 7.63826 3.67947 6.79903 4.39405 6.07875C5.10877 5.35847 5.94898 4.79028 6.91467 4.37417C7.88051 3.95806 8.90884 3.75 9.99967 3.75Z",fill:"currentColor"})}),ze=ko;var Eo=[.5,.75,1,1.25,1.5,1.75,2],Io=({setSection:t$1,showSpeedIcon:o})=>{let l=z(),{videoElementSizeInfo:i,params:r}=A(({videoData:{videoElementSizeInfo:f,params:s}})=>({videoElementSizeInfo:f,params:s}),shallowEqual),{speedPopover:p$1}=A(({popovers:{speedPopover:f}})=>({speedPopover:f}),shallowEqual),{settings:c}=A(({user:{settings:f}})=>({settings:f}),shallowEqual),d=useRef(null),[n,h]=useState(false);R(d,()=>l(p(false))),useEffect(()=>{u()&&(u().playbackRate=c.speed);},[]);let v=jsx("div",{id:"speed",className:`animate__animated animate__fadeIn ${t("isTouchScreen")?"pl-pb-2":"pl-py-2"}`,children:jsxs("ul",{className:"pl-flex pl-flex-col pl-gap-1",children:[jsxs("li",{className:`pl-flex pl-items-center pl-border-b ${t("isTouchScreen")?"pl-border-b-[#D9D9D9]":"pl-border-b-[#4A4A4A]"} pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-h-10`,onClick:()=>t$1&&t$1("main"),children:[jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.chevronRight,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:16,height:16})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:"\u0633\u0631\u0639\u062A"})]}),jsx("div",{className:"pl-overflow-y-auto no-scrollbar",style:{maxHeight:t("isTouchScreenPortrait")?void 0:i.height-200-70},children:Eo.map((f,s)=>jsxs("li",{className:`pl-flex pl-items-center pl-h-10 pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-transition-all ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} ${c.speed===f&&" !pl-cursor-default"}`,onClick:c.speed===f?()=>{}:()=>{t("isStaticFormat")||A$1(B(f)),l(xa({...c,speed:f})),u().playbackRate=f,t$1&&t$1("main"),r.onSpeedChange&&r.onSpeedChange(c.speed,f);},children:[c.speed===f&&jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.tick,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:20,height:20})}),jsx("p",{className:`pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px] pl-w-10 pl-text-center`,children:f})]},s))})]})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:d,children:[jsx(ze,{width:20,height:20,className:`pl-cursor-pointer size-5 ${t("isTouchScreen")?"pl-text-[#4A4A4A]":"pl-text-white"}`,onClick:()=>l(p(!p$1)),onMouseOver:()=>!t("isTouchScreen")&&!t("showSpeedPopover")&&h(true),onMouseLeave:()=>!t("isTouchScreen")&&h(false)}),n&&jsx(a$1,{title:"\u0633\u0631\u0639\u062A"}),jsx(Y,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${t("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]"} ${t("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${t("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"} !pl-z-[100000]`,status:p$1,onClose:()=>l(p(false)),type:t("isTouchScreen")?"modal":"popover",isBlurBackground:t("isTouchScreen"),ref:t("isTouchScreen")?d:void 0,isHeader:t("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:t("isTouchScreen"),styles:{maxHeight:!t("isTouchScreenPortrait")&&i.height-(t("isTouchScreenLandscape")?120:75)},children:v})]}):jsx(Fragment,{children:v})})},ml=Io;e();var Lo=({setSection:t$1})=>{let o=z(),{subtitles:l,selectedSubtitle:i,videoElementSizeInfo:r}=A(({videoData:{subtitles:p,selectedSubtitle:c,videoElementSizeInfo:d}})=>({subtitles:p,selectedSubtitle:c,videoElementSizeInfo:d}),shallowEqual);return jsx("div",{id:"subtitles",className:`animate__animated animate__fadeIn ${t("isTouchScreen")?"pl-pb-2":"pl-py-2"}`,children:jsxs("ul",{className:"pl-flex pl-flex-col pl-gap-1",children:[jsxs("li",{className:`pl-flex pl-items-center pl-border-b ${t("isTouchScreen")?"pl-border-b-[#D9D9D9]":"pl-border-b-[#4A4A4A]"} pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-h-10`,onClick:()=>t$1&&t$1("main"),children:[jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(lt,{src:a.chevronRight,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:16,height:16})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:"\u0632\u06CC\u0631 \u0646\u0648\u06CC\u0633"})]}),jsxs("div",{className:"pl-overflow-y-auto no-scrollbar",style:{maxHeight:t("isTouchScreenPortrait")?void 0:r.height-200-70},children:[jsxs("li",{className:`pl-flex pl-items-center pl-h-10 pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer ${!i&&`${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} !pl-cursor-default`}`,onClick:()=>{o(k(void 0)),t$1("main");let p=Object.values(u().textTracks).find(c=>c.mode==="showing");p&&(p.mode="disabled"),o(j("")),A$1(L("empty"));},children:[!i&&jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(lt,{src:a.tick,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:20,height:20})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:"\u0628\u062F\u0648\u0646 \u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]}),l.map((p,c)=>jsxs("li",{className:`pl-flex pl-items-center pl-h-10 pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-transition-all ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} ${i&&i.language===p.language&&" !pl-cursor-default"}`,onClick:()=>{o(k(p)),u().textTracks[c].mode="showing",t$1("main"),A$1(L(p.language));},children:[!!i&&i.language===p.language&&jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(lt,{src:a.tick,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:20,height:20})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:p.label})]},c))]})]})})},ul=memo(Lo);e();var Mo=({className:t,onClick:o,onMouseOver:l,onMouseLeave:i})=>jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,onClick:o,onMouseOver:l,onMouseLeave:i,children:[jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M10 2.29395C10.3314 2.29395 10.6 2.56257 10.6 2.89395V17.1052C10.6 17.4366 10.3314 17.7052 10 17.7052C9.66866 17.7052 9.40002 17.4366 9.40002 17.1052V2.89395C9.40002 2.56257 9.66866 2.29395 10 2.29395Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M6.41258 4.95498C6.74396 4.95498 7.01258 5.22361 7.01258 5.55498V14.5565C7.01258 14.8879 6.74396 15.1565 6.41258 15.1565C6.08121 15.1565 5.81258 14.8879 5.81258 14.5565V5.55498C5.81258 5.22361 6.08121 4.95498 6.41258 4.95498Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M13.5858 4.84247C13.9172 4.84247 14.1858 5.1111 14.1858 5.44247V14.444C14.1858 14.7754 13.9172 15.044 13.5858 15.044C13.2545 15.044 12.9858 14.7754 12.9858 14.444V5.44247C12.9858 5.1111 13.2545 4.84247 13.5858 4.84247Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M17.1735 7.60177C17.5048 7.60177 17.7735 7.8704 17.7735 8.20177V11.5709C17.7735 11.9023 17.5048 12.1709 17.1735 12.1709C16.8421 12.1709 16.5735 11.9023 16.5735 11.5709V8.20177C16.5735 7.8704 16.8421 7.60177 17.1735 7.60177Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M2.82656 7.82841C3.15794 7.82841 3.42656 8.09703 3.42656 8.42844V11.7976C3.42656 12.1289 3.15794 12.3976 2.82656 12.3976C2.49519 12.3976 2.22656 12.1289 2.22656 11.7976V8.42844C2.22656 8.09703 2.49519 7.82841 2.82656 7.82841Z"})]}),ve=Mo;e();var Bo=({setSection:t$1,showMultiAudioIcon:o})=>{let l=z(),{multiAudioPopover:i}=A(({popovers:{multiAudioPopover:f}})=>({multiAudioPopover:f}),shallowEqual),[r$1,p]=useState(false),c=useRef(null),{multiAudio:d,selectedAudioId:n,videoElementSizeInfo:h}=A(({videoData:{multiAudio:f,selectedAudioId:s,videoElementSizeInfo:w}})=>({multiAudio:f,selectedAudioId:s,videoElementSizeInfo:w}),shallowEqual);R(c,()=>l(r(false)));let v=jsx("div",{className:`${t("isTouchScreen")?"pl-pb-2":"pl-py-2"}`,children:jsxs("ul",{className:"pl-flex pl-flex-col pl-gap-1",children:[jsxs("li",{className:`pl-flex pl-items-center pl-border-b ${t("isTouchScreen")?"pl-border-b-[#D9D9D9]":"pl-border-b-[#4A4A4A]"} pl-h-10 pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer`,onClick:()=>t$1&&t$1("main"),children:[jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.chevronRight,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:16,height:16})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"})]}),jsx("div",{className:"pl-overflow-y-auto no-scrollbar",style:{maxHeight:t("isTouchScreenPortrait")?void 0:h.height-200-70},children:t("hasMultiAudio")&&d.map((f,s)=>jsxs("li",{className:`pl-flex pl-items-center pl-h-10 pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-transition-all ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} ${n===s&&" !pl-cursor-default"}`,onClick:()=>{l(m(s)),t$1&&t$1("main");},children:[n===s&&jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.tick,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:20,height:20})}),jsxs("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:["\u0632\u0628\u0627\u0646 ",f.name]})]},f.id))})]})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:c,children:[jsx(ve,{className:`pl-size-5 pl-fill-white pl-cursor-pointer ${t("isTouchScreen")?"pl-text-[#4A4A4A]":"pl-text-white"}`,onClick:()=>l(r(!i)),onMouseOver:()=>!t("isTouchScreen")&&p(true),onMouseLeave:()=>!t("isTouchScreen")&&p(false)}),r$1&&jsx(a$1,{title:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsx(Y,{classNames:`!pl-px-0 pl-overflow-hidden !pl-bg-black/[75%] !pl-pb-0 ${t("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[200px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${t("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${t("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>l(r(false)),type:t("isTouchScreen")?"modal":"popover",isBlurBackground:t("isTouchScreen"),ref:t("isTouchScreen")?c:void 0,isHeader:t("isTouchScreen"),isHasCatchUpLineOnTop:t("isTouchScreen"),styles:{maxHeight:!t("isTouchScreenPortrait")&&h.height-(t("isTouchScreenLandscape")?120:75)},children:v})]}):jsx(Fragment,{children:v})})},xl=memo(Bo);e();var Xo=({className:t$1,disableTooltip:o,height:l,width:i,normalStyle:r})=>{let[p,c]=useState(false);return A(({videoData:{selectedSubtitle:d,videoElementSizeInfo:n,params:h}})=>({selectedSubtitle:d,videoElementSizeInfo:n,params:h}),shallowEqual),jsxs("div",{onClick:d=>{d.stopPropagation(),b$2();},onDoubleClick:d=>d.stopPropagation(),onMouseOver:o?void 0:()=>!t("isTouchScreen")&&c(true),onMouseLeave:o?void 0:()=>!t("isTouchScreen")&&c(false),className:da(`pl-relative ${r?"":"pl-rounded-full hover:pl-bg-[#5E5E5E]"} pl-cursor-pointer pl-flex pl-items-center pl-justify-center pl-transition-all ${t$1} ${t("hasSubtitles")?"":"pl-pointer-events-none"}`,{desktop:r?void 0:"pl-w-[40px] pl-h-[25px]",desktopFullScreen:r?void 0:"pl-w-[56px] pl-h-[36px]"}),children:[jsx(te,{alt:"subtitle-icon",src:t("hasSubtitles")?t("isSelectedSubtitle")?a.subtitleFill:a.subtitleOutline:a.subtitleDisable,width:i,height:l}),p&&!o&&jsx(a$1,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},ne=Xo;var Wo=({width:t$1,height:o$1,normalStyle:l})=>{let i=z();A(({controller:{isFullScreen:k}})=>({isFullScreen:k}),shallowEqual);let{selectedSubtitle:r,multiAudio:p,selectedAudioId:c,subtitles:d,settingPopover:n,settings:h,qualityLevels:v}=A(({user:{settings:k},popovers:{settingPopover:a},controller:{qualityLevels:x},videoData:{params:$,subtitles:A,multiAudio:_,selectedSubtitle:J,selectedAudioId:q}})=>({params:$,settings:k,subtitles:A,multiAudio:_,qualityLevels:x,settingPopover:a,selectedAudioId:q,selectedSubtitle:J}),shallowEqual),[f,s]=useState("main"),[w,F]=useState(false),M=useRef(null);return R(M,()=>{i(o(false)),setTimeout(()=>{s("main");},500);}),jsxs("div",{className:`pl-inline-flex ${t("isLandscape")&&"pl-relative"}`,ref:M,children:[jsxs("div",{className:da(`pl-relative pl-cursor-pointer pl-flex pl-items-center pl-justify-center pl-rounded-full ${l?"":"hover:pl-bg-[#5E5E5E] pl-transition-all"}`,l?void 0:{desktop:"pl-w-[40px] pl-h-[25px]",desktopFullScreen:"pl-w-[56px] pl-h-[36px]"}),onDoubleClick:k=>k.preventDefault(),onClick:k=>{k.stopPropagation(),i(o(!n));},onMouseOver:()=>!t("isTouchScreen")&&!t("showSettingPopover")&&F(true),onMouseLeave:()=>!t("isTouchScreen")&&F(false),children:[jsx(te,{src:a.settings,alt:"",width:t$1,height:o$1}),w&&jsx(a$1,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A "})]}),jsx(Y,{classNames:`!pl-p-0 pl-overflow-hidden ${t("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none !pl-bg-white":"!pl-w-[272px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px] !pl-bg-black/[75%]"} ${t("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${t("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"} !overflow-auto`,status:n,onClose:()=>{i(o(false)),setTimeout(()=>s("main"),500);},type:t("isTouchScreen")?"modal":"popover",isBlurBackground:t("isTouchScreen"),ref:t("isTouchScreen")?M:void 0,isHeader:t("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:t("isTouchScreen"),children:jsxs("div",{children:[f==="main"&&jsxs("div",{id:"main",className:"pl-py-2 pl-rounded-[10px] pl-flex pl-flex-col animate__animated animate__fadeIn",children:[!t("isStaticFormat")&&jsxs("div",{className:`pl-flex pl-items-center pl-gap-2 pl-cursor-pointer pl-h-10 pl-px-2 ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} pl-transition-all`,onClick:()=>s("qualityLevels"),children:[jsx(te,{className:t("isTouchScreen")?"pl-brightness-[0.3]":"",src:a.qualitySetting,alt:""}),jsx("p",{className:`pl-ml-auto pl-text-[12px] pl-font-medium ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"}`,children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),jsx("span",{className:`pl-ml-1 pl-leading-6 pl-font-normal ${t("isTouchScreen")?"pl-text-[#212121] pl-text-[11px]":"pl-text-white pl-text-[12px]"}`,children:h.quality===-1?"\u062E\u0648\u062F\u06A9\u0627\u0631":`${v.find((k,a)=>a===h.quality)}p`}),jsx(te,{className:t("isTouchScreen")?"pl-brightness-50":"",src:a.chevronLeft,alt:"",width:16,height:16})]}),t("hasSubtitles")&&jsxs("div",{className:`pl-flex pl-items-center pl-gap-2 pl-cursor-pointer pl-h-10 pl-px-2 ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} pl-transition-all`,onClick:()=>s("subtitles"),children:[jsx(ne,{className:`${t("isTouchScreen")?"pl-brightness-[0.3]":""}`,normalStyle:true,width:20,height:20,disableTooltip:true}),jsx("p",{className:`pl-ml-auto pl-text-[12px] pl-font-medium ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"}`,children:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsx("span",{className:`pl-ml-1 pl-leading-6 pl-font-normal ${t("isTouchScreen")?"pl-text-[#212121] pl-text-[11px]":"pl-text-white pl-text-[12px]"}`,children:r?!!d&&d.find(k=>k.language===r.language)?.label:"\u062E\u0627\u0645\u0648\u0634"}),jsx(te,{src:a.chevronLeft,className:t("isTouchScreen")?"pl-brightness-50":"",alt:"",width:16,height:16})]}),jsxs("div",{className:`pl-flex pl-items-center pl-gap-2 pl-cursor-pointer pl-h-10 pl-px-2 ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} pl-transition-all`,onClick:()=>s("speed"),children:[jsx(ze,{className:`${t("isTouchScreen")?"pl-text-[#4A4A4A]":"pl-text-white"}`,width:20,height:20}),jsx("p",{className:`pl-ml-auto pl-text-[12px] pl-font-medium ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"}`,children:"\u0633\u0631\u0639\u062A"}),jsx("span",{className:`pl-ml-1 pl-leading-6 pl-font-normal ${t("isTouchScreen")?"pl-text-[#212121] pl-text-[11px]":"pl-text-white pl-text-[12px]"}`,children:h?.speed?h.speed===1?"\u0645\u0639\u0645\u0648\u0644\u06CC":`${h.speed}`:"\u0645\u0639\u0645\u0648\u0644\u06CC"}),jsx(te,{src:a.chevronLeft,className:t("isTouchScreen")?"pl-brightness-50":"",alt:"",width:16,height:16})]}),t("hasMultiAudio")&&jsxs("div",{className:`pl-flex pl-items-center pl-gap-2 pl-cursor-pointer pl-h-10 pl-px-2 ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} pl-transition-all`,onClick:()=>s("multiAudio"),children:[jsx(ve,{className:`pl-size-5 ${t("isTouchScreen")?"pl-text-[#4A4A4A]":"pl-text-white"}`}),jsx("p",{className:`pl-ml-auto pl-text-[12px] pl-font-medium ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"}`,children:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsx("span",{className:`pl-ml-1 pl-leading-6 pl-font-normal ${t("isTouchScreen")?"pl-text-[#212121] pl-text-[11px]":"pl-text-white pl-text-[12px]"}`,children:p?.find((k,a)=>a===c)?.name}),jsx(te,{src:a.chevronLeft,className:t("isTouchScreen")?"pl-brightness-50":"",alt:"",width:16,height:16})]}),t("hasMultiAudio")&&t("isTouchScreenPortrait")&&jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>s("multiAudio"),children:[jsx(ve,{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:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsx(te,{src:a.chevronLeft,alt:"",width:16,height:16})]})]}),f==="qualityLevels"&&jsx(nl,{setSection:s}),f==="subtitles"&&jsx(ul,{setSection:s}),f==="speed"&&jsx(ml,{setSection:s}),f==="multiAudio"&&jsx(xl,{setSection:s})]})})]})},Be=memo(Wo);e();var Go=({className:t=""})=>{let{duration:o,currentTime:l}=A(({controller:{duration:p,currentTime:c}})=>({duration:p,currentTime:c}),shallowEqual);A(({videoData:{videoElementSizeInfo:p,params:c}})=>({videoElementSizeInfo:p,params:c}),shallowEqual);let[i,r]=useState(false);return jsx("div",{onDoubleClick:p=>p.preventDefault(),onClick:()=>r(p=>!p),className:da(`pl-cursor-pointer pl-rounded-full pl-inline-flex pl-items-center pl-justify-center pl-group ${t}`,{desktop:"pl-min-w-[34px] pl-h-[34px] pl-p-1 pl-bg-black/75",desktopFullScreen:"pl-min-w-[48px] pl-h-[48px] pl-px-1.5",touch:"pl-min-w-[78px] pl-h-[22px] pl-py-1 pl-px-1.5 pl-bg-[#282828]",touchFullScreen:"pl-min-w-[103px] pl-h-[32px] pl-px-2"}),children:jsx("div",{className:da("pl-flex pl-gap-0.5 pl-items-center pl-justify-center pl-rounded-full pl-transition-all",{desktop:"pl-h-[26px] pl-min-w-[26px] pl-p-1.5 group-hover:pl-bg-[#5E5E5E]",desktopFullScreen:"pl-h-[36px] pl-min-w-[36px] pl-px-3"}),children:jsxs("p",{className:da("pl-text-white pl-flex pl-items-center pl-justify-center pl-gap-0.5 ",{desktop:"pl-text-[12px] pl-leading-5 pl-font-bold",desktopFullScreen:"pl-text-base",touch:"pl-font-medium pl-text-[12px] pl-pt-0.5",touchFullScreen:"pl-text-[16px] pl-font-normal pl-pt-1"}),children:[jsx("span",{className:da("",{touch:"pl-text-[#C4C4C4]"}),children:ha(o||0)}),jsx("span",{children:"/"}),i?jsxs(Fragment,{children:[jsx("span",{children:ha((o||0)-(l||0))}),jsx("span",{className:"pl-mt-0.5",children:"-"})]}):jsx("span",{children:ha(l||0)})]})})})},yl=Go;var Ko=()=>(A(({controller:{isFullScreen:t}})=>({isFullScreen:t}),shallowEqual),A(({videoData:{videoElementSizeInfo:t,params:o,subtitles:l}})=>({videoElementSizeInfo:t,params:o,subtitles:l}),shallowEqual),jsxs("div",{id:"player-controllbar",className:da("pl-flex pl-justify-between pl-items-center",{desktop:"pl-px-4",desktopFullScreen:"pl-px-6",touch:"pl-px-4 ",touchFullScreen:"pl-px-6 pl-absolute pl-w-full pl-bottom-[51px]"}),children:[jsxs("div",{className:da("pl-rounded-full pl-flex pl-items-center pl-justify-center ",{desktop:"pl-p-1 pl-bg-black/75",desktopFullScreen:"pl-p-1.5",touch:"pl-bg-[#282828]"}),children:[jsx(c,{width:ea({desktop:16,desktopFullScreen:24,touch:16,touchFullScreen:24}),height:ea({desktop:16,desktopFullScreen:24,touch:16,touchFullScreen:24})}),t("showSettingIcon")&&!t("isTouchScreen")&&jsx(Be,{width:t("isFullScreen")?24:16,height:t("isFullScreen")?24:16}),!t("isTouchScreen")&&jsx(ne,{width:t("isFullScreen")?24:16,height:t("isFullScreen")?24:16})]}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-4",children:[jsx(yl,{className:"pl-relative z-10"}),!t("isTouchScreen")&&jsxs(Fragment,{children:[!t("isIOS")&&jsx(b,{width:t("isFullScreen")?24:16,height:t("isFullScreen")?24:16}),jsx(b$1,{width:t("isFullScreen")?24:16,height:t("isFullScreen")?24:16})]})]})]})),Cl=memo(Ko);e();var ti=()=>{let{subtitleText:t$1}=A(({videoData:{subtitleText:l,selectedSubtitle:i}})=>({subtitleText:l,selectedSubtitle:i}),shallowEqual);return A(({controller:{isFullScreen:l,activeElements:i}})=>({isFullScreen:l,activeElements:i}),shallowEqual),jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:da(`pl-z-0 pl-absolute pl-w-full pl-text-center pl-text-white pl-font-semibold ${(()=>{let l="";return t("isLock")?l="pl-bottom-[50px]":t("isActiveElements")?t("isTouchScreen")&&t("isFullScreen")?l="pl-bottom-[64px]":t("isFullScreen")?l="pl-bottom-[130px]":t("isTouchScreen")?l="pl-bottom-[30px]":l="pl-bottom-[60px]":t("isActiveElements")||(t("isTouchScreen")&&t("isFullScreen")?l="pl-bottom-[20px]":t("isFullScreen")?l="pl-bottom-[130px]":t("isTouchScreen")?l="pl-bottom-[16px]":l="pl-bottom-[60px]"),l})()}`,{desktop:"pl-text-[14px] pl-leading-6",desktopFullScreen:"pl-text-base",touch:"pl-text-[10px] pl-leading-4"}),children:ta(t$1).map((l,i)=>{let r=va(l);if(r)return jsx("p",{className:da(`pl-mx-auto pl-bg-[#000000]/[70%] ${t("isTouchScreen")&&t("isActiveElements")&&"pl-opacity-50"} pl-text-wrap pl-max-w-full pl-w-max `,{desktop:"pl-px-2 pl-py-1.5",desktopFullScreen:"",touch:"pl-p-1",touchFullScreen:""}),children:r},i)})})},Pl=ti;var li=()=>{let{firstPlay:t$1}=A(({controller:{lock:l,isFullScreen:i,isLoading:r,activeElements:p,firstPlay:c}})=>({lock:l,isFullScreen:i,isLoading:r,activeElements:p,firstPlay:c}),shallowEqual);A(({videoData:{subtitles:l,selectedSubtitle:i}})=>({subtitles:l,selectedSubtitle:i}),shallowEqual);let o="";return t("isTouchScreen")?t("isFullScreen")?o="pl-gap-2.5 pl-mb-8":o="pl-gap-3":t("isFullScreen")?o="pl-gap-3 pl-mb-3":o="pl-gap-1.5 pl-mb-1.5",jsx("div",{id:"footer",className:da("pl-relative pl-rounded-b-[12px] pl-duration-300"),onClick:l=>t("isActiveElements")&&l.stopPropagation(),style:{zIndex:3,backgroundBlendMode:"multiply",backgroundSize:"cover",backgroundPosition:"center"},children:jsxs(Fragment,{children:[t("showSubtitle")&&jsx(Pl,{}),!t("isLock")&&jsx(Fragment,{children:jsxs("div",{className:`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${o} ${t("isActiveElements")&&!t("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[t("showProgressbar")&&jsx(pl,{}),jsx(Cl,{})]})})]})})},Fl=li;e();var oi=$l(()=>import('./staticVideoTag-52O7SA4Z.mjs')),ii=$l(()=>import('./nonStaticVideoTag-BZO26CR6.mjs')),pi=()=>jsx(Fragment,{children:t("isStaticFormat")?jsx(oi,{}):jsx(ii,{})}),Ll=pi;e();var ni=(t,o)=>{let l=z(),{activeElements:i,play:r}=A(({controller:{activeElements:n,play:h}})=>({activeElements:n,play:h}),shallowEqual),p=useRef(null),c=useRef(t),d=useRef(o);useEffect(()=>{c.current=t;},[t]),useEffect(()=>{d.current=o;},[o]),useEffect(()=>{let n=false,h=s=>{let{activeElements:w,isEnded:F}=za.getState().controller;F?l(k$1(true)):s.pointerType==="mouse"&&(clearTimeout(p.current),w?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward","backward","forward"].includes(s.target.id)&&(n=true):l(k$1(true)),p.current=setTimeout(()=>{let{settingPopover:M,speedPopover:k,qualityLevelsPopover:a,multiAudioPopover:x}=za.getState().popovers,{play:$}=za.getState().controller;!M&&!k&&!a&&!x&&$&&n&&l(k$1(false));},a$4));},v=s=>{setTimeout(()=>{let{activeElements:w,isEnded:F,firstPlay:M}=za.getState().controller;if(clearTimeout(p.current),F)return l(k$1(true));ga()&&!M&&!c.current&&!d.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward","backward","forward"].includes(s.target.id)||ja(s,"playerElements")?p.current=setTimeout(()=>{let{play:k}=za.getState().controller,{settingPopover:a,speedPopover:x,qualityLevelsPopover:$,multiAudioPopover:A}=za.getState().popovers;!a&&!x&&!$&&!A&&k&&l(k$1(false));},a$4):p.current=setTimeout(()=>{let{play:k}=za.getState().controller,{settingPopover:a,speedPopover:x,qualityLevelsPopover:$,multiAudioPopover:A}=za.getState().popovers;!a&&!x&&!$&&!A&&k&&l(k$1(false));},a$4));},200);},f=()=>{clearTimeout(p.current),p.current=setTimeout(()=>{let{activeElements:s,isEnded:w,play:F}=za.getState().controller,{settingPopover:M,speedPopover:k,qualityLevelsPopover:a}=za.getState().popovers;w?l(k$1(true)):!M&&!k&&!a&&s&&!w&&F&&l(k$1(false));},a$4);};return document.getElementById("video-area").addEventListener("touchstart",v),document.getElementById("video-area").addEventListener("touchmove",f),document.getElementById("video-area").addEventListener("pointermove",h),()=>{let s=document.getElementById("video-area");s&&(s.removeEventListener("touchstart",v),s.removeEventListener("touchmove",f),s.removeEventListener("pointermove",h));}},[i,t,o]),useEffect(()=>{let n;return r?n=setTimeout(()=>l(k$1(false)),a$4):l(k$1(true)),()=>{n&&clearTimeout(n);}},[r,l]);},Ml=ni;e();var mi=()=>{let{firstPlay:t,isFullScreen:o}=A(({controller:{firstPlay:l,isFullScreen:i}})=>({firstPlay:l,isFullScreen:i}),shallowEqual);useEffect(()=>{if(u()){let l,i=()=>{l=setTimeout(()=>{ba();},ga()?0:300);};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),clearTimeout(l);}}},[t,o,u()]);},Dl=mi;e();var ui=({className:t,onClick:o})=>jsxs("svg",{className:t,onClick:l=>{l.stopPropagation(),o?.();},width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("g",{"clip-path":"url(#clip0_372_39317)",children:jsx("path",{d:"M10.649 9.01462L17.658 2.00555C18.1141 1.54963 18.1141 0.812452 17.658 0.356588C17.2021 -0.0993313 16.4649 -0.0993313 16.009 0.356588L8.99992 7.3656L1.99107 0.356588C1.53493 -0.0993313 0.798022 -0.0993313 0.342103 0.356588C-0.114034 0.812507 -0.114034 1.54963 0.342103 2.00555L7.3509 9.01462L0.342158 16.0236C-0.11398 16.4796 -0.11398 17.2167 0.342158 17.6726C0.450304 17.7811 0.578815 17.8671 0.720306 17.9257C0.861797 17.9843 1.01348 18.0144 1.16664 18.0143C1.46512 18.0143 1.76371 17.9 1.99112 17.6726L8.99992 10.6636L16.009 17.6726C16.1172 17.781 16.2457 17.867 16.3872 17.9257C16.5287 17.9843 16.6804 18.0144 16.8335 18.0143C17.132 18.0143 17.4306 17.9 17.658 17.6726C18.1141 17.2167 18.1141 16.4796 17.658 16.0236L10.649 9.01462Z",fill:"white"})}),jsx("defs",{children:jsx("clipPath",{id:"clip0_372_39317",children:jsx("rect",{width:"18",height:"18",fill:"white"})})})]}),_l=ui;var Bl=$l(()=>import('./backwardForward-QAVC3JUR.mjs')),hi=()=>{let[t$1,o]=useState(false),[l,i]=useState(false),r=z();A(({videoData:{details:n,params:h,videoElementSizeInfo:v}})=>({details:n,params:h,videoElementSizeInfo:v}),shallowEqual);let{firstMute:p,firstPlay:c,activeElements:d}=A(({controller:{firstPlay:n,isFullScreen:h,isLoading:v,canPlayVideo:f,firstMute:s,activeElements:w}})=>({firstPlay:n,isFullScreen:h,isLoading:v,canPlayVideo:f,firstMute:s,activeElements:w}),shallowEqual);return a$3(),Dl(),Ml(t$1,l),jsx(Fragment,{children:jsxs("div",{id:"video-area",style:{zIndex:t("isFullScreen")?1e3:"unset"},onClick:n=>{if(!(t$1||l||document.getElementById("popover-content"))){if(p){X(50),W();return}t("isTouchScreen")?r(k$1(!d)):T(n);}},onDoubleClick:n=>ca(n),className:da(`pl-bg-contain pl-bg-center pl-w-full pl-relative pl-bg-no-repeat pl-h-full pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!t("isActiveElements")&&"pl-cursor-none"}`,{desktop:"pl-rounded-[12px] pl-overflow-hidden",touchFullScreen:"pl-fixed pl-w-screen dvh",desktopFullScreen:"pl-fixed pl-w-screen dvh"}),children:[t("isTouchScreen")&&jsx("div",{id:"video-opacity",style:{zIndex:0},className:`pl-absolute pl-bg-black/20 pl-size-full pl-aspect-video pl-transition-all pl-duration-500 ${t("isActiveElements")?"pl-opacity-100 pl-visible":"pl-opacity-0 pl-invisible"} `}),t("showSoundVolumeAlert")&&jsx(c$1,{className:da("",{touch:"pl-absolute pl-z-10 pl-top-[12px] pl-left-[16px]",touchFullScreen:"pl-top-[16px] pl-left-[24px]"})}),!c&&t("isActiveElements")&&jsxs("div",{className:da("pl-absolute pl-z-10 pl-flex pl-items-center pl-justify-center pl-gap-4",{touch:"pl-top-3 pl-right-4",touchFullScreen:"pl-top-5 pl-right-6"}),children:[t("isTouchScreen")&&t("isFullScreen")&&jsx(_l,{onClick:Z,className:"pl-text-white pl-size-[18px]"}),t("showSettingIcon")&&t("isTouchScreen")&&jsx(Be,{normalStyle:true,width:ea({desktop:16,desktopFullScreen:24,touch:20,touchFullScreen:24}),height:ea({desktop:16,desktopFullScreen:24,touch:20,touchFullScreen:24})}),t("isTouchScreen")&&jsx(ne,{normalStyle:true,width:ea({desktop:16,desktopFullScreen:24,touch:20,touchFullScreen:24}),height:ea({desktop:16,desktopFullScreen:24,touch:20,touchFullScreen:24})})]}),t("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||t$1?1002:1},children:[jsx(Bl,{type:t("isTouchScreen")?"touchForward":"forward",isRightForward:t$1,setIsRightForward:o}),jsx(Bl,{type:t("isTouchScreen")?"touchBackward":"backward",isLeftBackward:l,setIsLeftBackward:i})]}),jsx(Ll,{}),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:[t("showHeader")&&jsx(Dt,{}),t("showMain")&&jsx(Bt,{}),t("showFooter")&&jsx(Fl,{})]})})]})})},Qa=hi;
8
- export{Qa as a};//# sourceMappingURL=chunk-4PVUWYWX.mjs.map
9
- //# sourceMappingURL=chunk-4PVUWYWX.mjs.map
7
+ `,style:{maxHeight:h?"unset":A$1||x||"",zIndex:1004,...c},ref:M,id:"popover-content",children:jsxs(Fragment,{children:[v&&jsx("div",{onTouchMove:f?pt:()=>{},onTouchEndCapture:f?we:()=>{},className:"pl-py-4",children:f&&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",{id:"popover-content",className:`pl-overflow-y-auto pl-h-full pl-w-full ${!w&&"no-scrollbar"}`,onTouchMove:B=>B.stopPropagation(),children:t})]})})})]});return jsx(Fragment,{children:k&&jsx(Fragment,{children:i==="modal"?createPortal(jsx("div",{style:{fontFamily:"IRANSansXFaNum",direction:"rtl",overflowX:"hidden"},children:K}),document.getElementById("dialog-react-root-videoPlayer")):jsx("div",{id:"player-popover",children:K})})})});sl.displayName="popover";var Y=sl;e();var Co=({setSection:t$1,showQualityLevelsIcon:o})=>{let l=z(),{qualityLevels:i}=A(({controller:{qualityLevels:s,manualQuality:w,autoQuality:F}})=>({qualityLevels:s,manualQuality:w,autoQuality:F}),shallowEqual),{settings:r}=A(({user:{settings:s}})=>({settings:s}),shallowEqual),{qualityLevelsPopover:p}=A(({popovers:{qualityLevelsPopover:s}})=>({qualityLevelsPopover:s}),shallowEqual),{videoElementSizeInfo:c}=A(({videoData:{params:s,videoElementSizeInfo:w}})=>({params:s,videoElementSizeInfo:w}),shallowEqual),[d,n]=useState(false);i=[-1,...i];let h=(s,w)=>t("isAutoQuality")&&w===-1?true:!t("isAutoQuality")&&r.quality===s,v=useRef(null);R(v,()=>l(q(false)));let f=jsx("div",{id:"qualityLevels",className:`animate__animated animate__fadeIn ${t("isTouchScreen")?"pl-pb-2":"pl-py-2"}`,children:jsxs("ul",{className:"pl-flex pl-flex-col pl-gap-1",children:[jsxs("li",{className:`pl-flex pl-items-center pl-border-b ${t("isTouchScreen")?"pl-border-b-[#D9D9D9]":"pl-border-b-[#4A4A4A]"} pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-h-10`,onClick:()=>t$1&&t$1("main"),children:[jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.chevronRight,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:16,height:16})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"})]}),jsx("div",{className:"pl-overflow-y-auto no-scrollbar",style:{maxHeight:t("isTouchScreenPortrait")?void 0:c.height-200-70},children:i.map((s,w)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-h-10 pl-transition-all ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} ${h(w-1,s)&&"!pl-cursor-default"}`,onClick:()=>{h(w-1,s)||(A$1(C(s===-1?"auto":`${s}P`)),l(xa({...r,quality:s===-1?-1:w-1})),t$1&&t$1("main"));},children:[!!h(w-1,s)&&jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.tick,alt:"",className:t("isTouchScreen")?"pl-brightness-0":"",width:20,height:20})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:s===-1?jsxs("span",{children:[jsx("span",{children:"\u062E\u0648\u062F\u06A9\u0627\u0631 "}),jsx("span",{className:`pl-text-[10px] pl-font-normal ${t("isTouchScreen")?"pl-text-[#737373]":"pl-text-[#C7C7C7]"}`,children:"(\u0628\u0631 \u0627\u0633\u0627\u0633 \u0633\u0631\u0639\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u0634\u0645\u0627)"})]}):`${s}p`})]},w))})]})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:v,children:[jsx(te,{src:a.qualitySetting,alt:"speed-icon",width:20,height:20,onClick:()=>l(q(!p)),onMouseOver:()=>!t("isTouchScreen")&&!t("showQualityLevelsPopover")&&n(true),onMouseLeave:()=>!t("isTouchScreen")&&n(false),className:"pl-cursor-pointer"}),d&&jsx(a$1,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsx(Y,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-black/[75%] ${t("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]"} ${t("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${t("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:p,onClose:()=>l(q(false)),type:t("isTouchScreen")?"modal":"popover",isBlurBackground:t("isTouchScreen"),ref:t("isTouchScreen")?v:void 0,isHeader:t("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:t("isTouchScreen"),styles:{maxHeight:!t("isTouchScreenPortrait")&&c.height-(t("isTouchScreenLandscape")?120:75)},children:f})]}):jsx(Fragment,{children:f})})},nl=memo(Co);e();e();var ko=({className:t,onClick:o,onMouseOver:l,onMouseLeave:i,width:r,height:p})=>jsx("svg",{width:"20",height:"20",fill:"none",onClick:o,viewBox:"0 0 20 20",className:t,onMouseOver:l,style:{width:r,height:p},onMouseLeave:i,xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M8.83613 12.7885C9.13211 13.0844 9.51329 13.2249 9.97967 13.21C10.4459 13.195 10.7881 13.0267 11.0061 12.7052L15.5284 6.15396L8.96113 10.6602C8.63433 10.8783 8.4578 11.2135 8.43155 11.6658C8.40544 12.1183 8.5403 12.4926 8.83613 12.7885ZM9.99967 3.75C10.7925 3.75 11.5352 3.85389 12.228 4.06167C12.9209 4.26944 13.59 4.58382 14.2353 5.00479L13.0605 5.76438C12.5862 5.51229 12.0945 5.32188 11.5855 5.19313C11.0763 5.06438 10.5477 5 9.99967 5C8.15245 5 6.57954 5.64931 5.28092 6.94792C3.98231 8.24653 3.33301 9.81944 3.33301 11.6667C3.33301 12.25 3.41287 12.8264 3.57259 13.3958C3.73231 13.9653 3.95801 14.5 4.24967 15H15.7497C16.0691 14.4722 16.3018 13.9236 16.4476 13.3542C16.5934 12.7847 16.6663 12.1944 16.6663 11.5833C16.6663 11.0833 16.6047 10.5772 16.4813 10.065C16.3579 9.55264 16.1674 9.06625 15.9099 8.60583L16.6695 7.43104C17.0809 8.10521 17.3894 8.77965 17.5951 9.45438C17.8006 10.1291 17.9077 10.8302 17.9163 11.5577C17.9248 12.312 17.8399 13.0249 17.6616 13.6963C17.4831 14.3678 17.2144 15.0246 16.8555 15.6667C16.7454 15.8472 16.5904 15.9896 16.3907 16.0938C16.1909 16.1979 15.9772 16.25 15.7497 16.25H4.24967C4.02745 16.25 3.8178 16.1966 3.62072 16.0898C3.42363 15.9828 3.26467 15.8311 3.14384 15.6346C2.82551 15.079 2.56912 14.4733 2.37467 13.8173C2.18023 13.1613 2.08301 12.4444 2.08301 11.6667C2.08301 10.5781 2.28954 9.55465 2.70259 8.59646C3.11565 7.63826 3.67947 6.79903 4.39405 6.07875C5.10877 5.35847 5.94898 4.79028 6.91467 4.37417C7.88051 3.95806 8.90884 3.75 9.99967 3.75Z",fill:"currentColor"})}),ze=ko;var Eo=[.5,.75,1,1.25,1.5,1.75,2],Io=({setSection:t$1,showSpeedIcon:o})=>{let l=z(),{videoElementSizeInfo:i,params:r}=A(({videoData:{videoElementSizeInfo:f,params:s}})=>({videoElementSizeInfo:f,params:s}),shallowEqual),{speedPopover:p$1}=A(({popovers:{speedPopover:f}})=>({speedPopover:f}),shallowEqual),{settings:c}=A(({user:{settings:f}})=>({settings:f}),shallowEqual),d=useRef(null),[n,h]=useState(false);R(d,()=>l(p(false))),useEffect(()=>{u()&&(u().playbackRate=c.speed);},[]);let v=jsx("div",{id:"speed",className:`animate__animated animate__fadeIn ${t("isTouchScreen")?"pl-pb-2":"pl-py-2"}`,children:jsxs("ul",{className:"pl-flex pl-flex-col pl-gap-1",children:[jsxs("li",{className:`pl-flex pl-items-center pl-border-b ${t("isTouchScreen")?"pl-border-b-[#D9D9D9]":"pl-border-b-[#4A4A4A]"} pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-h-10`,onClick:()=>t$1&&t$1("main"),children:[jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.chevronRight,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:16,height:16})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:"\u0633\u0631\u0639\u062A"})]}),jsx("div",{className:"pl-overflow-y-auto no-scrollbar",style:{maxHeight:t("isTouchScreenPortrait")?void 0:i.height-200-70},children:Eo.map((f,s)=>jsxs("li",{className:`pl-flex pl-items-center pl-h-10 pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-transition-all ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} ${c.speed===f&&" !pl-cursor-default"}`,onClick:c.speed===f?()=>{}:()=>{t("isStaticFormat")||A$1(B(f)),l(xa({...c,speed:f})),u().playbackRate=f,t$1&&t$1("main"),r.onSpeedChange&&r.onSpeedChange(c.speed,f);},children:[c.speed===f&&jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.tick,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:20,height:20})}),jsx("p",{className:`pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px] pl-w-10 pl-text-center`,children:f})]},s))})]})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:d,children:[jsx(ze,{width:20,height:20,className:`pl-cursor-pointer size-5 ${t("isTouchScreen")?"pl-text-[#4A4A4A]":"pl-text-white"}`,onClick:()=>l(p(!p$1)),onMouseOver:()=>!t("isTouchScreen")&&!t("showSpeedPopover")&&h(true),onMouseLeave:()=>!t("isTouchScreen")&&h(false)}),n&&jsx(a$1,{title:"\u0633\u0631\u0639\u062A"}),jsx(Y,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${t("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]"} ${t("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${t("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"} !pl-z-[100000]`,status:p$1,onClose:()=>l(p(false)),type:t("isTouchScreen")?"modal":"popover",isBlurBackground:t("isTouchScreen"),ref:t("isTouchScreen")?d:void 0,isHeader:t("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:t("isTouchScreen"),styles:{maxHeight:!t("isTouchScreenPortrait")&&i.height-(t("isTouchScreenLandscape")?120:75)},children:v})]}):jsx(Fragment,{children:v})})},ml=Io;e();var Lo=({setSection:t$1})=>{let o=z(),{subtitles:l,selectedSubtitle:i,videoElementSizeInfo:r}=A(({videoData:{subtitles:p,selectedSubtitle:c,videoElementSizeInfo:d}})=>({subtitles:p,selectedSubtitle:c,videoElementSizeInfo:d}),shallowEqual);return jsx("div",{id:"subtitles",className:`animate__animated animate__fadeIn ${t("isTouchScreen")?"pl-pb-2":"pl-py-2"}`,children:jsxs("ul",{className:"pl-flex pl-flex-col pl-gap-1",children:[jsxs("li",{className:`pl-flex pl-items-center pl-border-b ${t("isTouchScreen")?"pl-border-b-[#D9D9D9]":"pl-border-b-[#4A4A4A]"} pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-h-10`,onClick:()=>t$1&&t$1("main"),children:[jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(lt,{src:a.chevronRight,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:16,height:16})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:"\u0632\u06CC\u0631 \u0646\u0648\u06CC\u0633"})]}),jsxs("div",{className:"pl-overflow-y-auto no-scrollbar",style:{maxHeight:t("isTouchScreenPortrait")?void 0:r.height-200-70},children:[jsxs("li",{className:`pl-flex pl-items-center pl-h-10 pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer ${!i&&`${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} !pl-cursor-default`}`,onClick:()=>{o(k(void 0)),t$1("main");let p=Object.values(u().textTracks).find(c=>c.mode==="showing");p&&(p.mode="disabled"),o(j("")),A$1(L("empty"));},children:[!i&&jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(lt,{src:a.tick,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:20,height:20})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:"\u0628\u062F\u0648\u0646 \u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]}),l.map((p,c)=>jsxs("li",{className:`pl-flex pl-items-center pl-h-10 pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-transition-all ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} ${i&&i.language===p.language&&" !pl-cursor-default"}`,onClick:()=>{o(k(p)),u().textTracks[c].mode="showing",t$1("main"),A$1(L(p.language));},children:[!!i&&i.language===p.language&&jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(lt,{src:a.tick,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:20,height:20})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:p.label})]},c))]})]})})},ul=memo(Lo);e();var Mo=({className:t,onClick:o,onMouseOver:l,onMouseLeave:i})=>jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,onClick:o,onMouseOver:l,onMouseLeave:i,children:[jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M10 2.29395C10.3314 2.29395 10.6 2.56257 10.6 2.89395V17.1052C10.6 17.4366 10.3314 17.7052 10 17.7052C9.66866 17.7052 9.40002 17.4366 9.40002 17.1052V2.89395C9.40002 2.56257 9.66866 2.29395 10 2.29395Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M6.41258 4.95498C6.74396 4.95498 7.01258 5.22361 7.01258 5.55498V14.5565C7.01258 14.8879 6.74396 15.1565 6.41258 15.1565C6.08121 15.1565 5.81258 14.8879 5.81258 14.5565V5.55498C5.81258 5.22361 6.08121 4.95498 6.41258 4.95498Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M13.5858 4.84247C13.9172 4.84247 14.1858 5.1111 14.1858 5.44247V14.444C14.1858 14.7754 13.9172 15.044 13.5858 15.044C13.2545 15.044 12.9858 14.7754 12.9858 14.444V5.44247C12.9858 5.1111 13.2545 4.84247 13.5858 4.84247Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M17.1735 7.60177C17.5048 7.60177 17.7735 7.8704 17.7735 8.20177V11.5709C17.7735 11.9023 17.5048 12.1709 17.1735 12.1709C16.8421 12.1709 16.5735 11.9023 16.5735 11.5709V8.20177C16.5735 7.8704 16.8421 7.60177 17.1735 7.60177Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M2.82656 7.82841C3.15794 7.82841 3.42656 8.09703 3.42656 8.42844V11.7976C3.42656 12.1289 3.15794 12.3976 2.82656 12.3976C2.49519 12.3976 2.22656 12.1289 2.22656 11.7976V8.42844C2.22656 8.09703 2.49519 7.82841 2.82656 7.82841Z"})]}),ve=Mo;e();var Bo=({setSection:t$1,showMultiAudioIcon:o})=>{let l=z(),{multiAudioPopover:i}=A(({popovers:{multiAudioPopover:f}})=>({multiAudioPopover:f}),shallowEqual),[r$1,p]=useState(false),c=useRef(null),{multiAudio:d,selectedAudioId:n,videoElementSizeInfo:h}=A(({videoData:{multiAudio:f,selectedAudioId:s,videoElementSizeInfo:w}})=>({multiAudio:f,selectedAudioId:s,videoElementSizeInfo:w}),shallowEqual);R(c,()=>l(r(false)));let v=jsx("div",{className:`${t("isTouchScreen")?"pl-pb-2":"pl-py-2"}`,children:jsxs("ul",{className:"pl-flex pl-flex-col pl-gap-1",children:[jsxs("li",{className:`pl-flex pl-items-center pl-border-b ${t("isTouchScreen")?"pl-border-b-[#D9D9D9]":"pl-border-b-[#4A4A4A]"} pl-h-10 pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer`,onClick:()=>t$1&&t$1("main"),children:[jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.chevronRight,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:16,height:16})}),jsx("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"})]}),jsx("div",{className:"pl-overflow-y-auto no-scrollbar",style:{maxHeight:t("isTouchScreenPortrait")?void 0:h.height-200-70},children:t("hasMultiAudio")&&d.map((f,s)=>jsxs("li",{className:`pl-flex pl-items-center pl-h-10 pl-ps-[24.2px] pl-leading-[28px] pl-text-[12px] pl-font-medium pl-relative pl-cursor-pointer pl-transition-all ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} ${n===s&&" !pl-cursor-default"}`,onClick:()=>{l(m(s)),t$1&&t$1("main");},children:[n===s&&jsx("div",{className:"pl-absolute pl-right-[10px] pl-top-1/2 -pl-translate-y-1/2 pl-flex pl-items-center pl-justify-center",children:jsx(te,{src:a.tick,className:t("isTouchScreen")?"pl-brightness-0":"",alt:"",width:20,height:20})}),jsxs("span",{className:`pl-w-full pl-text-[12px] ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"} pl-pr-[10px]`,children:["\u0632\u0628\u0627\u0646 ",f.name]})]},f.id))})]})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:c,children:[jsx(ve,{className:`pl-size-5 pl-fill-white pl-cursor-pointer ${t("isTouchScreen")?"pl-text-[#4A4A4A]":"pl-text-white"}`,onClick:()=>l(r(!i)),onMouseOver:()=>!t("isTouchScreen")&&p(true),onMouseLeave:()=>!t("isTouchScreen")&&p(false)}),r$1&&jsx(a$1,{title:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsx(Y,{classNames:`!pl-px-0 pl-overflow-hidden !pl-bg-black/[75%] !pl-pb-0 ${t("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[200px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${t("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${t("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:i,onClose:()=>l(r(false)),type:t("isTouchScreen")?"modal":"popover",isBlurBackground:t("isTouchScreen"),ref:t("isTouchScreen")?c:void 0,isHeader:t("isTouchScreen"),isHasCatchUpLineOnTop:t("isTouchScreen"),styles:{maxHeight:!t("isTouchScreenPortrait")&&h.height-(t("isTouchScreenLandscape")?120:75)},children:v})]}):jsx(Fragment,{children:v})})},xl=memo(Bo);e();var Xo=({className:t$1,disableTooltip:o,height:l,width:i,normalStyle:r})=>{let[p,c]=useState(false);return A(({videoData:{selectedSubtitle:d,videoElementSizeInfo:n,params:h}})=>({selectedSubtitle:d,videoElementSizeInfo:n,params:h}),shallowEqual),jsxs("div",{onClick:d=>{d.stopPropagation(),b$2();},onDoubleClick:d=>d.stopPropagation(),onMouseOver:o?void 0:()=>!t("isTouchScreen")&&c(true),onMouseLeave:o?void 0:()=>!t("isTouchScreen")&&c(false),className:da(`pl-relative ${r?"":"pl-rounded-full hover:pl-bg-[#5E5E5E]"} pl-cursor-pointer pl-flex pl-items-center pl-justify-center pl-transition-all ${t$1} ${t("hasSubtitles")?"":"pl-pointer-events-none"}`,{desktop:r?void 0:"pl-w-[40px] pl-h-[25px]",desktopFullScreen:r?void 0:"pl-w-[56px] pl-h-[36px]"}),children:[jsx(te,{alt:"subtitle-icon",src:t("hasSubtitles")?t("isSelectedSubtitle")?a.subtitleFill:a.subtitleOutline:a.subtitleDisable,width:i,height:l}),p&&!o&&jsx(a$1,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},ne=Xo;var Wo=({width:t$1,height:o$1,normalStyle:l})=>{let i=z();A(({controller:{isFullScreen:k}})=>({isFullScreen:k}),shallowEqual);let{selectedSubtitle:r,multiAudio:p,selectedAudioId:c,subtitles:d,settingPopover:n,settings:h,qualityLevels:v}=A(({user:{settings:k},popovers:{settingPopover:a},controller:{qualityLevels:x},videoData:{params:$,subtitles:A,multiAudio:_,selectedSubtitle:J,selectedAudioId:q}})=>({params:$,settings:k,subtitles:A,multiAudio:_,qualityLevels:x,settingPopover:a,selectedAudioId:q,selectedSubtitle:J}),shallowEqual),[f,s]=useState("main"),[w,F]=useState(false),M=useRef(null);return R(M,()=>{i(o(false)),setTimeout(()=>{s("main");},500);}),jsxs("div",{className:`pl-inline-flex ${t("isLandscape")&&"pl-relative"}`,ref:M,children:[jsxs("div",{className:da(`pl-relative pl-cursor-pointer pl-flex pl-items-center pl-justify-center pl-rounded-full ${l?"":"hover:pl-bg-[#5E5E5E] pl-transition-all"}`,l?void 0:{desktop:"pl-w-[40px] pl-h-[25px]",desktopFullScreen:"pl-w-[56px] pl-h-[36px]"}),onDoubleClick:k=>k.preventDefault(),onClick:k=>{k.stopPropagation(),i(o(!n));},onMouseOver:()=>!t("isTouchScreen")&&!t("showSettingPopover")&&F(true),onMouseLeave:()=>!t("isTouchScreen")&&F(false),children:[jsx(te,{src:a.settings,alt:"",width:t$1,height:o$1}),w&&jsx(a$1,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A "})]}),jsx(Y,{classNames:`!pl-p-0 pl-overflow-hidden ${t("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none !pl-bg-white":"!pl-w-[272px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px] !pl-bg-black/[75%]"} ${t("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${t("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"} !overflow-auto`,status:n,onClose:()=>{i(o(false)),setTimeout(()=>s("main"),500);},type:t("isTouchScreen")?"modal":"popover",isBlurBackground:t("isTouchScreen"),ref:t("isTouchScreen")?M:void 0,isHeader:t("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:t("isTouchScreen"),children:jsxs("div",{children:[f==="main"&&jsxs("div",{id:"main",className:"pl-py-2 pl-rounded-[10px] pl-flex pl-flex-col animate__animated animate__fadeIn",children:[!t("isStaticFormat")&&jsxs("div",{className:`pl-flex pl-items-center pl-gap-2 pl-cursor-pointer pl-h-10 pl-px-2 ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} pl-transition-all`,onClick:()=>s("qualityLevels"),children:[jsx(te,{width:20,height:20,className:t("isTouchScreen")?"pl-brightness-[0.3]":"",src:a.qualitySetting,alt:""}),jsx("p",{className:`pl-ml-auto pl-text-[12px] pl-font-medium ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"}`,children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),jsx("span",{className:`pl-ml-1 pl-leading-6 pl-font-normal ${t("isTouchScreen")?"pl-text-[#212121] pl-text-[11px]":"pl-text-white pl-text-[12px]"}`,children:h.quality===-1?"\u062E\u0648\u062F\u06A9\u0627\u0631":`${v.find((k,a)=>a===h.quality)}p`}),jsx(te,{className:t("isTouchScreen")?"pl-brightness-50":"",src:a.chevronLeft,alt:"",width:16,height:16})]}),t("hasSubtitles")&&jsxs("div",{className:`pl-flex pl-items-center pl-gap-2 pl-cursor-pointer pl-h-10 pl-px-2 ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} pl-transition-all`,onClick:()=>s("subtitles"),children:[jsx(ne,{className:`${t("isTouchScreen")?"pl-brightness-[0.3]":""}`,normalStyle:true,width:20,height:20,disableTooltip:true}),jsx("p",{className:`pl-ml-auto pl-text-[12px] pl-font-medium ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"}`,children:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsx("span",{className:`pl-ml-1 pl-leading-6 pl-font-normal ${t("isTouchScreen")?"pl-text-[#212121] pl-text-[11px]":"pl-text-white pl-text-[12px]"}`,children:r?!!d&&d.find(k=>k.language===r.language)?.label:"\u062E\u0627\u0645\u0648\u0634"}),jsx(te,{src:a.chevronLeft,className:t("isTouchScreen")?"pl-brightness-50":"",alt:"",width:16,height:16})]}),jsxs("div",{className:`pl-flex pl-items-center pl-gap-2 pl-cursor-pointer pl-h-10 pl-px-2 ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} pl-transition-all`,onClick:()=>s("speed"),children:[jsx(ze,{className:`${t("isTouchScreen")?"pl-text-[#4A4A4A]":"pl-text-white"}`,width:20,height:20}),jsx("p",{className:`pl-ml-auto pl-text-[12px] pl-font-medium ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"}`,children:"\u0633\u0631\u0639\u062A"}),jsx("span",{className:`pl-ml-1 pl-leading-6 pl-font-normal ${t("isTouchScreen")?"pl-text-[#212121] pl-text-[11px]":"pl-text-white pl-text-[12px]"}`,children:h?.speed?h.speed===1?"\u0645\u0639\u0645\u0648\u0644\u06CC":`${h.speed}`:"\u0645\u0639\u0645\u0648\u0644\u06CC"}),jsx(te,{src:a.chevronLeft,className:t("isTouchScreen")?"pl-brightness-50":"",alt:"",width:16,height:16})]}),t("hasMultiAudio")&&jsxs("div",{className:`pl-flex pl-items-center pl-gap-2 pl-cursor-pointer pl-h-10 pl-px-2 ${t("isTouchScreen")?"":"hover:pl-bg-[#4A4A4A]"} pl-transition-all`,onClick:()=>s("multiAudio"),children:[jsx(ve,{className:`pl-size-5 ${t("isTouchScreen")?"pl-text-[#4A4A4A]":"pl-text-white"}`}),jsx("p",{className:`pl-ml-auto pl-text-[12px] pl-font-medium ${t("isTouchScreen")?"pl-text-[#212121]":"pl-text-white"}`,children:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsx("span",{className:`pl-ml-1 pl-leading-6 pl-font-normal ${t("isTouchScreen")?"pl-text-[#212121] pl-text-[11px]":"pl-text-white pl-text-[12px]"}`,children:p?.find((k,a)=>a===c)?.name}),jsx(te,{src:a.chevronLeft,className:t("isTouchScreen")?"pl-brightness-50":"",alt:"",width:16,height:16})]}),t("hasMultiAudio")&&t("isTouchScreenPortrait")&&jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>s("multiAudio"),children:[jsx(ve,{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:"\u062A\u063A\u06CC\u06CC\u0631 \u0635\u062F\u0627"}),jsx(te,{src:a.chevronLeft,alt:"",width:16,height:16})]})]}),f==="qualityLevels"&&jsx(nl,{setSection:s}),f==="subtitles"&&jsx(ul,{setSection:s}),f==="speed"&&jsx(ml,{setSection:s}),f==="multiAudio"&&jsx(xl,{setSection:s})]})})]})},Be=memo(Wo);e();var Go=({className:t=""})=>{let{duration:o,currentTime:l}=A(({controller:{duration:p,currentTime:c}})=>({duration:p,currentTime:c}),shallowEqual);A(({videoData:{videoElementSizeInfo:p,params:c}})=>({videoElementSizeInfo:p,params:c}),shallowEqual);let[i,r]=useState(false);return jsx("div",{onDoubleClick:p=>p.preventDefault(),onClick:()=>r(p=>!p),className:da(`pl-cursor-pointer pl-rounded-full pl-inline-flex pl-items-center pl-justify-center pl-group ${t}`,{desktop:"pl-min-w-[34px] pl-h-[34px] pl-p-1 pl-bg-black/75",desktopFullScreen:"pl-min-w-[48px] pl-h-[48px] pl-px-1.5",touch:"pl-min-w-[78px] pl-h-[22px] pl-py-1 pl-px-1.5 pl-bg-[#282828]",touchFullScreen:"pl-min-w-[103px] pl-h-[32px] pl-px-2"}),children:jsx("div",{className:da("pl-flex pl-gap-0.5 pl-items-center pl-justify-center pl-rounded-full pl-transition-all",{desktop:"pl-h-[26px] pl-min-w-[26px] pl-p-1.5 group-hover:pl-bg-[#5E5E5E]",desktopFullScreen:"pl-h-[36px] pl-min-w-[36px] pl-px-3"}),children:jsxs("p",{className:da("pl-text-white pl-flex pl-items-center pl-justify-center pl-gap-0.5 ",{desktop:"pl-text-[12px] pl-leading-5 pl-font-bold",desktopFullScreen:"pl-text-base",touch:"pl-font-medium pl-text-[12px] pl-pt-0.5",touchFullScreen:"pl-text-[16px] pl-font-normal pl-pt-1"}),children:[jsx("span",{className:da("",{touch:"pl-text-[#C4C4C4]"}),children:ha(o||0)}),jsx("span",{children:"/"}),i?jsxs(Fragment,{children:[jsx("span",{children:ha((o||0)-(l||0))}),jsx("span",{className:"pl-mt-0.5",children:"-"})]}):jsx("span",{children:ha(l||0)})]})})})},yl=Go;var Ko=()=>(A(({controller:{isFullScreen:t}})=>({isFullScreen:t}),shallowEqual),A(({videoData:{videoElementSizeInfo:t,params:o,subtitles:l}})=>({videoElementSizeInfo:t,params:o,subtitles:l}),shallowEqual),jsxs("div",{id:"player-controllbar",className:da("pl-flex pl-justify-between pl-items-center",{desktop:"pl-px-4",desktopFullScreen:"pl-px-6",touch:"pl-px-4 ",touchFullScreen:"pl-px-6 pl-absolute pl-w-full pl-bottom-[51px]"}),children:[jsxs("div",{className:da("pl-rounded-full pl-flex pl-items-center pl-justify-center ",{desktop:"pl-p-1 pl-bg-black/75",desktopFullScreen:"pl-p-1.5",touch:"pl-bg-[#282828]"}),children:[jsx(c,{width:ea({desktop:16,desktopFullScreen:24,touch:16,touchFullScreen:24}),height:ea({desktop:16,desktopFullScreen:24,touch:16,touchFullScreen:24})}),t("showSettingIcon")&&!t("isTouchScreen")&&jsx(Be,{width:t("isFullScreen")?24:16,height:t("isFullScreen")?24:16}),!t("isTouchScreen")&&jsx(ne,{width:t("isFullScreen")?24:16,height:t("isFullScreen")?24:16})]}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-4",children:[jsx(yl,{className:"pl-relative z-10"}),!t("isTouchScreen")&&jsxs(Fragment,{children:[!t("isIOS")&&jsx(b,{width:t("isFullScreen")?24:16,height:t("isFullScreen")?24:16}),jsx(b$1,{width:t("isFullScreen")?24:16,height:t("isFullScreen")?24:16})]})]})]})),Cl=memo(Ko);e();var ti=()=>{let{subtitleText:t$1}=A(({videoData:{subtitleText:l,selectedSubtitle:i}})=>({subtitleText:l,selectedSubtitle:i}),shallowEqual);return A(({controller:{isFullScreen:l,activeElements:i}})=>({isFullScreen:l,activeElements:i}),shallowEqual),jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:da(`pl-z-0 pl-absolute pl-w-full pl-text-center pl-text-white pl-font-semibold ${(()=>{let l="";return t("isLock")?l="pl-bottom-[50px]":t("isActiveElements")?t("isTouchScreen")&&t("isFullScreen")?l="pl-bottom-[64px]":t("isFullScreen")?l="pl-bottom-[130px]":t("isTouchScreen")?l="pl-bottom-[30px]":l="pl-bottom-[60px]":t("isActiveElements")||(t("isTouchScreen")&&t("isFullScreen")?l="pl-bottom-[20px]":t("isFullScreen")?l="pl-bottom-[130px]":t("isTouchScreen")?l="pl-bottom-[16px]":l="pl-bottom-[60px]"),l})()}`,{desktop:"pl-text-[14px] pl-leading-6",desktopFullScreen:"pl-text-base",touch:"pl-text-[10px] pl-leading-4"}),children:ta(t$1).map((l,i)=>{let r=va(l);if(r)return jsx("p",{className:da(`pl-mx-auto pl-bg-[#000000]/[70%] ${t("isTouchScreen")&&t("isActiveElements")&&"pl-opacity-50"} pl-text-wrap pl-max-w-full pl-w-max `,{desktop:"pl-px-2 pl-py-1.5",desktopFullScreen:"",touch:"pl-p-1",touchFullScreen:""}),children:r},i)})})},Pl=ti;var li=()=>{let{firstPlay:t$1}=A(({controller:{lock:l,isFullScreen:i,isLoading:r,activeElements:p,firstPlay:c}})=>({lock:l,isFullScreen:i,isLoading:r,activeElements:p,firstPlay:c}),shallowEqual);A(({videoData:{subtitles:l,selectedSubtitle:i}})=>({subtitles:l,selectedSubtitle:i}),shallowEqual);let o="";return t("isTouchScreen")?t("isFullScreen")?o="pl-gap-2.5 pl-mb-8":o="pl-gap-3":t("isFullScreen")?o="pl-gap-3 pl-mb-3":o="pl-gap-1.5 pl-mb-1.5",jsx("div",{id:"footer",className:da("pl-relative pl-rounded-b-[12px] pl-duration-300"),onClick:l=>t("isActiveElements")&&l.stopPropagation(),style:{zIndex:3,backgroundBlendMode:"multiply",backgroundSize:"cover",backgroundPosition:"center"},children:jsxs(Fragment,{children:[t("showSubtitle")&&jsx(Pl,{}),!t("isLock")&&jsx(Fragment,{children:jsxs("div",{className:`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${o} ${t("isActiveElements")&&!t("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[t("showProgressbar")&&jsx(pl,{}),jsx(Cl,{})]})})]})})},Fl=li;e();var oi=$l(()=>import('./staticVideoTag-52O7SA4Z.mjs')),ii=$l(()=>import('./nonStaticVideoTag-BZO26CR6.mjs')),pi=()=>jsx(Fragment,{children:t("isStaticFormat")?jsx(oi,{}):jsx(ii,{})}),Ll=pi;e();var ni=(t,o)=>{let l=z(),{activeElements:i,play:r}=A(({controller:{activeElements:n,play:h}})=>({activeElements:n,play:h}),shallowEqual),p=useRef(null),c=useRef(t),d=useRef(o);useEffect(()=>{c.current=t;},[t]),useEffect(()=>{d.current=o;},[o]),useEffect(()=>{let n=false,h=s=>{let{activeElements:w,isEnded:F}=za.getState().controller;F?l(k$1(true)):s.pointerType==="mouse"&&(clearTimeout(p.current),w?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward","backward","forward"].includes(s.target.id)&&(n=true):l(k$1(true)),p.current=setTimeout(()=>{let{settingPopover:M,speedPopover:k,qualityLevelsPopover:a,multiAudioPopover:x}=za.getState().popovers,{play:$}=za.getState().controller;!M&&!k&&!a&&!x&&$&&n&&l(k$1(false));},a$4));},v=s=>{setTimeout(()=>{let{activeElements:w,isEnded:F,firstPlay:M}=za.getState().controller;if(clearTimeout(p.current),F)return l(k$1(true));ga()&&!M&&!c.current&&!d.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward","backward","forward"].includes(s.target.id)||ja(s,"playerElements")?p.current=setTimeout(()=>{let{play:k}=za.getState().controller,{settingPopover:a,speedPopover:x,qualityLevelsPopover:$,multiAudioPopover:A}=za.getState().popovers;!a&&!x&&!$&&!A&&k&&l(k$1(false));},a$4):p.current=setTimeout(()=>{let{play:k}=za.getState().controller,{settingPopover:a,speedPopover:x,qualityLevelsPopover:$,multiAudioPopover:A}=za.getState().popovers;!a&&!x&&!$&&!A&&k&&l(k$1(false));},a$4));},200);},f=()=>{clearTimeout(p.current),p.current=setTimeout(()=>{let{activeElements:s,isEnded:w,play:F}=za.getState().controller,{settingPopover:M,speedPopover:k,qualityLevelsPopover:a}=za.getState().popovers;w?l(k$1(true)):!M&&!k&&!a&&s&&!w&&F&&l(k$1(false));},a$4);};return document.getElementById("video-area").addEventListener("touchstart",v),document.getElementById("video-area").addEventListener("touchmove",f),document.getElementById("video-area").addEventListener("pointermove",h),()=>{let s=document.getElementById("video-area");s&&(s.removeEventListener("touchstart",v),s.removeEventListener("touchmove",f),s.removeEventListener("pointermove",h));}},[i,t,o]),useEffect(()=>{let n;return r?n=setTimeout(()=>l(k$1(false)),a$4):l(k$1(true)),()=>{n&&clearTimeout(n);}},[r,l]);},Ml=ni;e();var mi=()=>{let{firstPlay:t,isFullScreen:o}=A(({controller:{firstPlay:l,isFullScreen:i}})=>({firstPlay:l,isFullScreen:i}),shallowEqual);useEffect(()=>{if(u()){let l,i=()=>{l=setTimeout(()=>{ba();},ga()?0:300);};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),clearTimeout(l);}}},[t,o,u()]);},Dl=mi;e();var ui=({className:t,onClick:o})=>jsxs("svg",{className:t,onClick:l=>{l.stopPropagation(),o?.();},width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("g",{"clip-path":"url(#clip0_372_39317)",children:jsx("path",{d:"M10.649 9.01462L17.658 2.00555C18.1141 1.54963 18.1141 0.812452 17.658 0.356588C17.2021 -0.0993313 16.4649 -0.0993313 16.009 0.356588L8.99992 7.3656L1.99107 0.356588C1.53493 -0.0993313 0.798022 -0.0993313 0.342103 0.356588C-0.114034 0.812507 -0.114034 1.54963 0.342103 2.00555L7.3509 9.01462L0.342158 16.0236C-0.11398 16.4796 -0.11398 17.2167 0.342158 17.6726C0.450304 17.7811 0.578815 17.8671 0.720306 17.9257C0.861797 17.9843 1.01348 18.0144 1.16664 18.0143C1.46512 18.0143 1.76371 17.9 1.99112 17.6726L8.99992 10.6636L16.009 17.6726C16.1172 17.781 16.2457 17.867 16.3872 17.9257C16.5287 17.9843 16.6804 18.0144 16.8335 18.0143C17.132 18.0143 17.4306 17.9 17.658 17.6726C18.1141 17.2167 18.1141 16.4796 17.658 16.0236L10.649 9.01462Z",fill:"white"})}),jsx("defs",{children:jsx("clipPath",{id:"clip0_372_39317",children:jsx("rect",{width:"18",height:"18",fill:"white"})})})]}),_l=ui;var Bl=$l(()=>import('./backwardForward-QAVC3JUR.mjs')),hi=()=>{let[t$1,o]=useState(false),[l,i]=useState(false),r=z();A(({videoData:{details:n,params:h,videoElementSizeInfo:v}})=>({details:n,params:h,videoElementSizeInfo:v}),shallowEqual);let{firstMute:p,firstPlay:c,activeElements:d}=A(({controller:{firstPlay:n,isFullScreen:h,isLoading:v,canPlayVideo:f,firstMute:s,activeElements:w}})=>({firstPlay:n,isFullScreen:h,isLoading:v,canPlayVideo:f,firstMute:s,activeElements:w}),shallowEqual);return a$3(),Dl(),Ml(t$1,l),jsx(Fragment,{children:jsxs("div",{id:"video-area",style:{zIndex:t("isFullScreen")?1e3:"unset"},onClick:n=>{if(!(t$1||l||document.getElementById("popover-content"))){if(p){X(50),W();return}t("isTouchScreen")?r(k$1(!d)):T(n);}},onDoubleClick:n=>ca(n),className:da(`pl-bg-contain pl-bg-center pl-w-full pl-relative pl-bg-no-repeat pl-h-full pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!t("isActiveElements")&&"pl-cursor-none"}`,{desktop:"pl-rounded-[12px] pl-overflow-hidden",touchFullScreen:"pl-fixed pl-w-screen dvh",desktopFullScreen:"pl-fixed pl-w-screen dvh"}),children:[t("isTouchScreen")&&jsx("div",{id:"video-opacity",style:{zIndex:0},className:`pl-absolute pl-bg-black/20 pl-size-full pl-aspect-video pl-transition-all pl-duration-500 ${t("isActiveElements")?"pl-opacity-100 pl-visible":"pl-opacity-0 pl-invisible"} `}),t("showSoundVolumeAlert")&&jsx(c$1,{className:da("",{touch:"pl-absolute pl-z-10 pl-top-[12px] pl-left-[16px]",touchFullScreen:"pl-top-[16px] pl-left-[24px]"})}),!c&&t("isActiveElements")&&jsxs("div",{className:da("pl-absolute pl-z-10 pl-flex pl-items-center pl-justify-center pl-gap-4",{touch:"pl-top-3 pl-right-4",touchFullScreen:"pl-top-5 pl-right-6"}),children:[t("isTouchScreen")&&t("isFullScreen")&&jsx(_l,{onClick:Z,className:"pl-text-white pl-size-[18px]"}),t("showSettingIcon")&&t("isTouchScreen")&&jsx(Be,{normalStyle:true,width:ea({desktop:16,desktopFullScreen:24,touch:20,touchFullScreen:24}),height:ea({desktop:16,desktopFullScreen:24,touch:20,touchFullScreen:24})}),t("isTouchScreen")&&jsx(ne,{normalStyle:true,width:ea({desktop:16,desktopFullScreen:24,touch:20,touchFullScreen:24}),height:ea({desktop:16,desktopFullScreen:24,touch:20,touchFullScreen:24})})]}),t("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||t$1?1002:1},children:[jsx(Bl,{type:t("isTouchScreen")?"touchForward":"forward",isRightForward:t$1,setIsRightForward:o}),jsx(Bl,{type:t("isTouchScreen")?"touchBackward":"backward",isLeftBackward:l,setIsLeftBackward:i})]}),jsx(Ll,{}),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:[t("showHeader")&&jsx(Dt,{}),t("showMain")&&jsx(Bt,{}),t("showFooter")&&jsx(Fl,{})]})})]})})},Qa=hi;
8
+ export{Qa as a};//# sourceMappingURL=chunk-6S6656SW.mjs.map
9
+ //# sourceMappingURL=chunk-6S6656SW.mjs.map