import{r,V as rt,T as nt,v as ye,P as ue,K as ae,a3 as ce,a0 as ne,_ as de,W as yt,ab as pt,ah as Ct,ai as Mt,aj as $t,ac as Ze,X as Et,Y as jt,Z as Pt,ae as Rt,s as wt,j as d,R as U,C as K,g as Tt,t as Je}from"./index-9600e7d5.js";import{R as kt,a as Ht,b as Lt,c as zt,d as Ot,e as Ft,f as Dt,g as Nt}from"./index.esm-e3568d3d.js";import{I as _t}from"./ImageComponent-85a8e7ec.js";import{L as Qe}from"./index-707c4d2f.js";import{s as Bt}from"./setWebPageTitle-364a3db0.js";var he=r.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0});function Oe(e,t,n){return(e-t)/(n-t)}function Fe(e,t,n,a){var o=Oe(t,n,a),l={};switch(e){case"rtl":l.right="".concat(o*100,"%"),l.transform="translateX(50%)";break;case"btt":l.bottom="".concat(o*100,"%"),l.transform="translateY(50%)";break;case"ttb":l.top="".concat(o*100,"%"),l.transform="translateY(-50%)";break;default:l.left="".concat(o*100,"%"),l.transform="translateX(-50%)";break}return l}function xe(e,t){return Array.isArray(e)?e[t]:e}var It=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],Wt=r.forwardRef(function(e,t){var n,a,o=e.prefixCls,l=e.value,u=e.valueIndex,m=e.onStartMove,y=e.style,M=e.render,C=e.dragging,g=e.onOffsetChange,b=rt(e,It),c=r.useContext(he),s=c.min,v=c.max,f=c.direction,h=c.disabled,i=c.keyboard,x=c.range,Y=c.tabIndex,k=c.ariaLabelForHandle,j=c.ariaLabelledByForHandle,H=c.ariaValueTextFormatterForHandle,_="".concat(o,"-handle"),$=function(B){h||m(B,u)},S=function(B){if(!h&&i){var P=null;switch(B.which||B.keyCode){case ce.LEFT:P=f==="ltr"||f==="btt"?-1:1;break;case ce.RIGHT:P=f==="ltr"||f==="btt"?1:-1;break;case ce.UP:P=f!=="ttb"?1:-1;break;case ce.DOWN:P=f!=="ttb"?-1:1;break;case ce.HOME:P="min";break;case ce.END:P="max";break;case ce.PAGE_UP:P=2;break;case ce.PAGE_DOWN:P=-2;break}P!==null&&(B.preventDefault(),g(P,u))}},O=Fe(f,l,s,v),z=r.createElement("div",nt({ref:t,className:ye(_,(n={},ue(n,"".concat(_,"-").concat(u+1),x),ue(n,"".concat(_,"-dragging"),C),n)),style:ae(ae({},O),y),onMouseDown:$,onTouchStart:$,onKeyDown:S,tabIndex:h?null:xe(Y,u),role:"slider","aria-valuemin":s,"aria-valuemax":v,"aria-valuenow":l,"aria-disabled":h,"aria-label":xe(k,u),"aria-labelledby":xe(j,u),"aria-valuetext":(a=xe(H,u))===null||a===void 0?void 0:a(l)},b));return M&&(z=M(z,{index:u,prefixCls:o,value:l,dragging:C})),z}),At=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],Xt=r.forwardRef(function(e,t){var n=e.prefixCls,a=e.style,o=e.onStartMove,l=e.onOffsetChange,u=e.values,m=e.handleRender,y=e.draggingIndex,M=rt(e,At),C=r.useRef({});return r.useImperativeHandle(t,function(){return{focus:function(b){var c;(c=C.current[b])===null||c===void 0||c.focus()}}}),r.createElement(r.Fragment,null,u.map(function(g,b){return r.createElement(Wt,nt({ref:function(s){s?C.current[b]=s:delete C.current[b]},dragging:y===b,prefixCls:n,style:xe(a,b),key:b,value:g,valueIndex:b,onStartMove:o,onOffsetChange:l,render:m},M))}))});function et(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function Yt(e,t,n,a,o,l,u,m,y){var M=r.useState(null),C=ne(M,2),g=C[0],b=C[1],c=r.useState(-1),s=ne(c,2),v=s[0],f=s[1],h=r.useState(n),i=ne(h,2),x=i[0],Y=i[1],k=r.useState(n),j=ne(k,2),H=j[0],_=j[1],$=r.useRef(null),S=r.useRef(null);r.useEffect(function(){v===-1&&Y(n)},[n,v]),r.useEffect(function(){return function(){document.removeEventListener("mousemove",$.current),document.removeEventListener("mouseup",S.current),document.removeEventListener("touchmove",$.current),document.removeEventListener("touchend",S.current)}},[]);var O=function(w,T){x.some(function(F,G){return F!==w[G]})&&(T!==void 0&&b(T),Y(w),u(w))},z=function(w,T){if(w===-1){var F=H[0],G=H[H.length-1],Q=a-F,ee=o-G,L=T*(o-a);L=Math.max(L,Q),L=Math.min(L,ee);var q=l(F+L);L=q-F;var Z=H.map(function(oe){return oe+L});O(Z)}else{var V=(o-a)*T,R=de(x);R[w]=H[w];var A=y(R,V,w,"dist");O(A.values,A.value)}},W=r.useRef(z);W.current=z;var B=function(w,T){w.stopPropagation();var F=n[T];f(T),b(F),_(n);var G=et(w),Q=G.pageX,ee=G.pageY,L=function(V){V.preventDefault();var R=et(V),A=R.pageX,oe=R.pageY,pe=A-Q,Ce=oe-ee,Me=e.current.getBoundingClientRect(),$e=Me.width,ie=Me.height,te;switch(t){case"btt":te=-Ce/ie;break;case"ttb":te=Ce/ie;break;case"rtl":te=-pe/$e;break;default:te=pe/$e}W.current(T,te)},q=function Z(V){V.preventDefault(),document.removeEventListener("mouseup",Z),document.removeEventListener("mousemove",L),document.removeEventListener("touchend",Z),document.removeEventListener("touchmove",L),$.current=null,S.current=null,f(-1),m()};document.addEventListener("mouseup",q),document.addEventListener("mousemove",L),document.addEventListener("touchend",q),document.addEventListener("touchmove",L),$.current=L,S.current=q},P=r.useMemo(function(){var X=de(n).sort(function(T,F){return T-F}),w=de(x).sort(function(T,F){return T-F});return X.every(function(T,F){return T===w[F]})?x:n},[n,x]);return[v,g,P,B]}function Vt(e){var t=e.prefixCls,n=e.style,a=e.start,o=e.end,l=e.index,u=e.onStartMove,m=r.useContext(he),y=m.direction,M=m.min,C=m.max,g=m.disabled,b=m.range,c="".concat(t,"-track"),s=Oe(a,M,C),v=Oe(o,M,C),f=function(x){!g&&u&&u(x,-1)},h={};switch(y){case"rtl":h.right="".concat(s*100,"%"),h.width="".concat(v*100-s*100,"%");break;case"btt":h.bottom="".concat(s*100,"%"),h.height="".concat(v*100-s*100,"%");break;case"ttb":h.top="".concat(s*100,"%"),h.height="".concat(v*100-s*100,"%");break;default:h.left="".concat(s*100,"%"),h.width="".concat(v*100-s*100,"%")}return r.createElement("div",{className:ye(c,b&&"".concat(c,"-").concat(l+1)),style:ae(ae({},h),n),onMouseDown:f,onTouchStart:f})}function Ut(e){var t=e.prefixCls,n=e.style,a=e.values,o=e.startPoint,l=e.onStartMove,u=r.useContext(he),m=u.included,y=u.range,M=u.min,C=r.useMemo(function(){if(!y){if(a.length===0)return[];var g=o??M,b=a[0];return[{start:Math.min(g,b),end:Math.max(g,b)}]}for(var c=[],s=0;s<a.length-1;s+=1)c.push({start:a[s],end:a[s+1]});return c},[a,y,o,M]);return m?C.map(function(g,b){var c=g.start,s=g.end;return r.createElement(Vt,{index:b,prefixCls:t,style:xe(n,b),start:c,end:s,key:b,onStartMove:l})}):null}function Kt(e){var t=e.prefixCls,n=e.style,a=e.children,o=e.value,l=e.onClick,u=r.useContext(he),m=u.min,y=u.max,M=u.direction,C=u.includedStart,g=u.includedEnd,b=u.included,c="".concat(t,"-text"),s=Fe(M,o,m,y);return r.createElement("span",{className:ye(c,ue({},"".concat(c,"-active"),b&&C<=o&&o<=g)),style:ae(ae({},s),n),onMouseDown:function(f){f.stopPropagation()},onClick:function(){l(o)}},a)}function Gt(e){var t=e.prefixCls,n=e.marks,a=e.onClick,o="".concat(t,"-mark");return n.length?r.createElement("div",{className:o},n.map(function(l){var u=l.value,m=l.style,y=l.label;return r.createElement(Kt,{key:u,prefixCls:o,style:m,value:u,onClick:a},y)})):null}function qt(e){var t=e.prefixCls,n=e.value,a=e.style,o=e.activeStyle,l=r.useContext(he),u=l.min,m=l.max,y=l.direction,M=l.included,C=l.includedStart,g=l.includedEnd,b="".concat(t,"-dot"),c=M&&C<=n&&n<=g,s=ae(ae({},Fe(y,n,u,m)),typeof a=="function"?a(n):a);return c&&(s=ae(ae({},s),typeof o=="function"?o(n):o)),r.createElement("span",{className:ye(b,ue({},"".concat(b,"-active"),c)),style:s})}function Zt(e){var t=e.prefixCls,n=e.marks,a=e.dots,o=e.style,l=e.activeStyle,u=r.useContext(he),m=u.min,y=u.max,M=u.step,C=r.useMemo(function(){var g=new Set;if(n.forEach(function(c){g.add(c.value)}),a&&M!==null)for(var b=m;b<=y;)g.add(b),b+=M;return Array.from(g)},[m,y,M,a,n]);return r.createElement("div",{className:"".concat(t,"-step")},C.map(function(g){return r.createElement(qt,{prefixCls:t,key:g,value:g,style:o,activeStyle:l})}))}function Jt(e,t,n,a,o,l){var u=r.useCallback(function(c){var s=isFinite(c)?c:e;return s=Math.min(t,c),s=Math.max(e,s),s},[e,t]),m=r.useCallback(function(c){if(n!==null){var s=e+Math.round((u(c)-e)/n)*n,v=function(x){return(String(x).split(".")[1]||"").length},f=Math.max(v(n),v(t),v(e)),h=Number(s.toFixed(f));return e<=h&&h<=t?h:null}return null},[n,e,t,u]),y=r.useCallback(function(c){var s=u(c),v=a.map(function(i){return i.value});n!==null&&v.push(m(c)),v.push(e,t);var f=v[0],h=t-e;return v.forEach(function(i){var x=Math.abs(s-i);x<=h&&(f=i,h=x)}),f},[e,t,a,n,u,m]),M=function c(s,v,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof v=="number"){var i,x=s[f],Y=x+v,k=[];a.forEach(function(S){k.push(S.value)}),k.push(e,t),k.push(m(x));var j=v>0?1:-1;h==="unit"?k.push(m(x+j*n)):k.push(m(Y)),k=k.filter(function(S){return S!==null}).filter(function(S){return v<0?S<=x:S>=x}),h==="unit"&&(k=k.filter(function(S){return S!==x}));var H=h==="unit"?x:Y;i=k[0];var _=Math.abs(i-H);if(k.forEach(function(S){var O=Math.abs(S-H);O<_&&(i=S,_=O)}),i===void 0)return v<0?e:t;if(h==="dist")return i;if(Math.abs(v)>1){var $=de(s);return $[f]=i,c($,v-j,f,h)}return i}else{if(v==="min")return e;if(v==="max")return t}},C=function(s,v,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",i=s[f],x=M(s,v,f,h);return{value:x,changed:x!==i}},g=function(s){return l===null&&s===0||typeof l=="number"&&s<l},b=function(s,v,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",i=s.map(y),x=i[f],Y=M(i,v,f,h);if(i[f]=Y,o===!1){var k=l||0;f>0&&i[f-1]!==x&&(i[f]=Math.max(i[f],i[f-1]+k)),f<i.length-1&&i[f+1]!==x&&(i[f]=Math.min(i[f],i[f+1]-k))}else if(typeof l=="number"||l===null){for(var j=f+1;j<i.length;j+=1)for(var H=!0;g(i[j]-i[j-1])&&H;){var _=C(i,1,j);i[j]=_.value,H=_.changed}for(var $=f;$>0;$-=1)for(var S=!0;g(i[$]-i[$-1])&&S;){var O=C(i,-1,$-1);i[$-1]=O.value,S=O.changed}for(var z=i.length-1;z>0;z-=1)for(var W=!0;g(i[z]-i[z-1])&&W;){var B=C(i,-1,z-1);i[z-1]=B.value,W=B.changed}for(var P=0;P<i.length-1;P+=1)for(var X=!0;g(i[P+1]-i[P])&&X;){var w=C(i,1,P+1);i[P+1]=w.value,X=w.changed}}return{value:i[f],values:i}};return[y,b]}var Qt=r.forwardRef(function(e,t){var n,a=e.prefixCls,o=a===void 0?"rc-slider":a,l=e.className,u=e.style,m=e.disabled,y=m===void 0?!1:m,M=e.keyboard,C=M===void 0?!0:M,g=e.autoFocus,b=e.onFocus,c=e.onBlur,s=e.min,v=s===void 0?0:s,f=e.max,h=f===void 0?100:f,i=e.step,x=i===void 0?1:i,Y=e.value,k=e.defaultValue,j=e.range,H=e.count,_=e.onChange,$=e.onBeforeChange,S=e.onAfterChange,O=e.allowCross,z=O===void 0?!0:O,W=e.pushable,B=W===void 0?!1:W,P=e.draggableTrack,X=e.reverse,w=e.vertical,T=e.included,F=T===void 0?!0:T,G=e.startPoint,Q=e.trackStyle,ee=e.handleStyle,L=e.railStyle,q=e.dotStyle,Z=e.activeDotStyle,V=e.marks,R=e.dots,A=e.handleRender,oe=e.tabIndex,pe=oe===void 0?0:oe,Ce=e.ariaLabelForHandle,Me=e.ariaLabelledByForHandle,$e=e.ariaValueTextFormatterForHandle,ie=r.useRef(),te=r.useRef(),Pe=r.useMemo(function(){return w?X?"ttb":"btt":X?"rtl":"ltr"},[X,w]),J=r.useMemo(function(){return isFinite(v)?v:0},[v]),ge=r.useMemo(function(){return isFinite(h)?h:100},[h]),fe=r.useMemo(function(){return x!==null&&x<=0?1:x},[x]),ot=r.useMemo(function(){return B===!0?fe:B>=0?B:!1},[B,fe]),Re=r.useMemo(function(){var N=Object.keys(V||{});return N.map(function(E){var p=V[E],I={value:Number(E)};return p&&yt(p)==="object"&&!r.isValidElement(p)&&("label"in p||"style"in p)?(I.style=p.style,I.label=p.label):I.label=p,I}).filter(function(E){var p=E.label;return p||typeof p=="number"}).sort(function(E,p){return E.value-p.value})},[V]),it=Jt(J,ge,fe,Re,z,ot),De=ne(it,2),we=De[0],Ne=De[1],lt=pt(k,{value:Y}),_e=ne(lt,2),le=_e[0],st=_e[1],re=r.useMemo(function(){var N=le==null?[]:Array.isArray(le)?le:[le],E=ne(N,1),p=E[0],I=p===void 0?J:p,D=le===null?[]:[I];if(j){if(D=de(N),H||le===void 0){var Se=H>=0?H+1:2;for(D=D.slice(0,Se);D.length<Se;){var me;D.push((me=D[D.length-1])!==null&&me!==void 0?me:J)}}D.sort(function(se,Ee){return se-Ee})}return D.forEach(function(se,Ee){D[Ee]=we(se)}),D},[le,j,J,H,we]),Te=r.useRef(re);Te.current=re;var ve=function(E){return j?E:E[0]},He=function(E){var p=de(E).sort(function(I,D){return I-D});_&&!Ct(p,Te.current,!0)&&_(ve(p)),st(p)},Be=function(E){if(!y){var p=0,I=ge-J;re.forEach(function(Se,me){var se=Math.abs(E-Se);se<=I&&(I=se,p=me)});var D=de(re);D[p]=E,j&&!re.length&&H===void 0&&D.push(E),$==null||$(ve(D)),He(D),S==null||S(ve(D))}},ct=function(E){E.preventDefault();var p=te.current.getBoundingClientRect(),I=p.width,D=p.height,Se=p.left,me=p.top,se=p.bottom,Ee=p.right,Ge=E.clientX,qe=E.clientY,je;switch(Pe){case"btt":je=(se-qe)/D;break;case"ttb":je=(qe-me)/D;break;case"rtl":je=(Ee-Ge)/I;break;default:je=(Ge-Se)/I}var xt=J+je*(ge-J);Be(we(xt))},ut=r.useState(null),Ie=ne(ut,2),Le=Ie[0],We=Ie[1],dt=function(E,p){if(!y){var I=Ne(re,E,p);$==null||$(ve(re)),He(I.values),S==null||S(ve(I.values)),We(I.value)}};r.useEffect(function(){if(Le!==null){var N=re.indexOf(Le);N>=0&&ie.current.focus(N)}We(null)},[Le]);var ft=r.useMemo(function(){return P&&fe===null?!1:P},[P,fe]),vt=function(){S==null||S(ve(Te.current))},mt=Yt(te,Pe,re,J,ge,we,He,vt,Ne),ke=ne(mt,4),Ae=ke[0],ht=ke[1],ze=ke[2],gt=ke[3],Xe=function(E,p){gt(E,p),$==null||$(ve(Te.current))},Ye=Ae!==-1;r.useEffect(function(){if(!Ye){var N=re.lastIndexOf(ht);ie.current.focus(N)}},[Ye]);var be=r.useMemo(function(){return de(ze).sort(function(N,E){return N-E})},[ze]),bt=r.useMemo(function(){return j?[be[0],be[be.length-1]]:[J,be[0]]},[be,j,J]),Ve=ne(bt,2),Ue=Ve[0],Ke=Ve[1];r.useImperativeHandle(t,function(){return{focus:function(){ie.current.focus(0)},blur:function(){var E=document,p=E.activeElement;te.current.contains(p)&&(p==null||p.blur())}}}),r.useEffect(function(){g&&ie.current.focus(0)},[]);var St=r.useMemo(function(){return{min:J,max:ge,direction:Pe,disabled:y,keyboard:C,step:fe,included:F,includedStart:Ue,includedEnd:Ke,range:j,tabIndex:pe,ariaLabelForHandle:Ce,ariaLabelledByForHandle:Me,ariaValueTextFormatterForHandle:$e}},[J,ge,Pe,y,C,fe,F,Ue,Ke,j,pe,Ce,Me,$e]);return r.createElement(he.Provider,{value:St},r.createElement("div",{ref:te,className:ye(o,l,(n={},ue(n,"".concat(o,"-disabled"),y),ue(n,"".concat(o,"-vertical"),w),ue(n,"".concat(o,"-horizontal"),!w),ue(n,"".concat(o,"-with-marks"),Re.length),n)),style:u,onMouseDown:ct},r.createElement("div",{className:"".concat(o,"-rail"),style:L}),r.createElement(Ut,{prefixCls:o,style:Q,values:be,startPoint:G,onStartMove:ft?Xe:null}),r.createElement(Zt,{prefixCls:o,marks:Re,dots:R,style:q,activeStyle:Z}),r.createElement(Xt,{ref:ie,prefixCls:o,style:ee,values:ze,draggingIndex:Ae,onStartMove:Xe,onOffsetChange:dt,onFocus:b,onBlur:c,handleRender:A}),r.createElement(Gt,{prefixCls:o,marks:Re,onClick:Be})))});const er=r.forwardRef((e,t)=>{const{open:n}=e,a=r.useRef(null),o=r.useRef(null);function l(){Ze.cancel(o.current),o.current=null}function u(){o.current=Ze(()=>{var m;(m=a.current)===null||m===void 0||m.forcePopupAlign(),o.current=null})}return r.useEffect(()=>(n?u():l(),l),[n,e.title]),r.createElement(Mt,Object.assign({ref:$t(a,t)},e))}),tr=er,rr=e=>{const{componentCls:t,controlSize:n,dotSize:a,marginFull:o,marginPart:l,colorFillContentHover:u}=e;return{[t]:Object.assign(Object.assign({},Pt(e)),{position:"relative",height:n,margin:`${l}px ${o}px`,padding:0,cursor:"pointer",touchAction:"none",["&-vertical"]:{margin:`${o}px ${l}px`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${t}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.colorFillSecondary},[`${t}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${t}-dot`]:{borderColor:u},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.colorPrimary}},[`${t}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${t}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`
            inset-inline-start ${e.motionDurationMid},
            inset-block-start ${e.motionDurationMid},
            width ${e.motionDurationMid},
            height ${e.motionDurationMid},
            box-shadow ${e.motionDurationMid}
          `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),insetBlockStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),width:e.handleSizeHover+e.handleLineWidthHover*2,height:e.handleSizeHover+e.handleLineWidthHover*2},"&::after":{boxShadow:`0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,width:e.handleSizeHover,height:e.handleSizeHover,insetInlineStart:(e.handleSize-e.handleSizeHover)/2,insetBlockStart:(e.handleSize-e.handleSizeHover)/2}}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:a,height:a,backgroundColor:e.colorBgElevated,border:`${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.colorPrimaryBorder}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.colorFillSecondary} !important`},[`${t}-track`]:{backgroundColor:`${e.colorTextDisabled} !important`},[`
          ${t}-dot
        `]:{backgroundColor:e.colorBgElevated,borderColor:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new Rt(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexShortString()}`,insetInlineStart:0,insetBlockStart:0},[`
          ${t}-mark-text,
          ${t}-dot
        `]:{cursor:"not-allowed !important"}}})}},at=(e,t)=>{const{componentCls:n,railSize:a,handleSize:o,dotSize:l}=e,u=t?"paddingBlock":"paddingInline",m=t?"width":"height",y=t?"height":"width",M=t?"insetBlockStart":"insetInlineStart",C=t?"top":"insetInlineStart";return{[u]:a,[y]:a*3,[`${n}-rail`]:{[m]:"100%",[y]:a},[`${n}-track`]:{[y]:a},[`${n}-handle`]:{[M]:(a*3-o)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[C]:o,[m]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[C]:a,[m]:"100%",[y]:a},[`${n}-dot`]:{position:"absolute",[M]:(a-l)/2}}},nr=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},at(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},ar=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},at(e,!1)),{height:"100%"})}},or=Et("Slider",e=>{const t=jt(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[rr(t),nr(t),ar(t)]},e=>{const n=e.controlHeightLG/4,a=e.controlHeightSM/2,o=e.lineWidth+1,l=e.lineWidth+1*3;return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:a,dotSize:8,handleLineWidth:o,handleLineWidthHover:l}});var ir=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const lr=e=>typeof e=="number"?e.toString():"",sr=r.forwardRef((e,t)=>{const{prefixCls:n,range:a,className:o,rootClassName:l,tooltipPrefixCls:u,tipFormatter:m,tooltipVisible:y,getTooltipPopupContainer:M,tooltipPlacement:C}=e,g=ir(e,["prefixCls","range","className","rootClassName","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement"]),{getPrefixCls:b,direction:c,getPopupContainer:s}=r.useContext(wt),[v,f]=r.useState({}),h=(S,O)=>{f(z=>Object.assign(Object.assign({},z),{[S]:O}))},i=(S,O)=>S||(O?c==="rtl"?"left":"right":"top"),x=b("slider",n),[Y,k]=or(x),j=ye(o,l,{[`${x}-rtl`]:c==="rtl"},k);c==="rtl"&&!g.vertical&&(g.reverse=!g.reverse);const[H,_]=r.useMemo(()=>a?typeof a=="object"?[!0,a.draggableTrack]:[!0,!1]:[!1],[a]),$=(S,O)=>{var z;const{index:W,dragging:B}=O,{tooltip:P={},vertical:X}=e,w=Object.assign({},P),{open:T,placement:F,getPopupContainer:G,prefixCls:Q,formatter:ee}=w;let L;ee||ee===null?L=ee:m||m===null?L=m:L=lr;const q=L?v[W]||B:!1,Z=(z=T??y)!==null&&z!==void 0?z:T===void 0&&q,V=Object.assign(Object.assign({},S.props),{onMouseEnter:()=>h(W,!0),onMouseLeave:()=>h(W,!1)}),R=b("tooltip",Q??u);return r.createElement(tr,{prefixCls:R,title:L?L(O.value):"",open:Z,placement:i(F??C,X),key:W,overlayClassName:`${x}-tooltip`,getPopupContainer:G||M||s},r.cloneElement(S,V))};return Y(r.createElement(Qt,Object.assign({},g,{step:g.step,range:H,draggableTrack:_,className:j,ref:t,prefixCls:x,handleRender:$})))}),tt=sr;function cr({songs:e}){var q,Z,V;const t=r.useRef(null),[n,a]=r.useState(0),[o,l]=r.useState(!1),[u,m]=r.useState(!1),[y,M]=r.useState(!1),[C,g]=r.useState(0),[b,c]=r.useState(0),[s,v]=r.useState(1),[f,h]=r.useState(0),i=e[n],[x,Y]=r.useState(window.innerWidth),[k,j]=r.useState();console.log("musicPlayerHeight: ",document.getElementById("album-art")),r.useEffect(()=>{function R(){const A=document.getElementById("album-art");j(A-20),Y(window.innerWidth)}return window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]),r.useEffect(()=>{o?t.current.play():t.current.pause()},[o]),r.useEffect(()=>{t.current.volume=s},[s]);const H=()=>{l(!o)},_=()=>{y?(a(Math.floor(Math.random()*e.length)),l(!0)):(a((n+1)%e.length),l(!0))},$=()=>{a((n-1+e.length)%e.length),l(!0)},S=()=>{m(!u)},O=()=>{M(!y)},z=()=>{u?(t.current.currentTime=0,t.current.play()):_()},W=()=>{g(t.current.currentTime)},B=()=>{c(t.current.duration)},P=R=>{const A=R;t.current.currentTime=A,g(A)},X=R=>{const A=Math.floor(R/60).toString().padStart(2,"0"),oe=Math.floor(R%60).toString().padStart(2,"0");return`${A}:${oe}`},w=R=>{v(R)},T=R=>{a(R),l(!0)};function F(){h(s),v(0)}function G(){v(f)}function Q(){return d.jsx("div",{id:"album-art",className:"album-art",style:{width:"100%",aspectRatio:16/9},children:d.jsx(_t,{item:i==null?void 0:i.backgroundImageId})})}function ee(){return d.jsxs("div",{style:{position:"relative",top:-15},children:[d.jsx("div",{className:"duration-seek-bar",id:"duration-seek-bar",children:d.jsx(tt,{style:{margin:0,zIndex:6},min:0,max:b,value:C,onChange:P,tooltip:{formatter:null}})}),d.jsxs(U,{id:"music-control",style:{width:"100%",position:"relative",top:-5,zIndex:5},className:"music-control bg-gray-300 pt-20 pb-20 pr-10 pl-10",align:"middle",gutter:10,children:[d.jsx(K,{span:20,children:d.jsxs(U,{gutter:10,align:"middle",children:[d.jsx(K,{children:d.jsx(U,{align:"middle",children:d.jsx(kt,{style:{cursor:"pointer",fontSize:"20"},onClick:$})})}),d.jsx(K,{children:d.jsx(U,{align:"middle",children:o?d.jsx(Ht,{style:{cursor:"pointer",fontSize:"20"},onClick:H}):d.jsx(Lt,{style:{cursor:"pointer",fontSize:"20"},onClick:H})})}),d.jsx(K,{children:d.jsx(U,{align:"middle",children:d.jsx(zt,{style:{cursor:"pointer",fontSize:"20"},onClick:_})})}),d.jsx(K,{children:d.jsx(U,{align:"middle",children:s===0?d.jsx(Ot,{style:{cursor:"pointer",fontSize:"20"},onClick:()=>G()}):d.jsx(Ft,{style:{cursor:"pointer",fontSize:"20"},onClick:()=>F()})})}),d.jsx(K,{span:3,children:d.jsx(tt,{className:"volume-slider",style:{margin:0},min:0,max:1,step:.01,value:s,onChange:w,tooltip:{formatter:null}})}),d.jsx(K,{children:d.jsxs("div",{className:"music-time fs-16 ml-10",children:[d.jsx("span",{className:"current-time",children:X(C)})," /"," ",d.jsx("span",{className:"duration",children:X(b)})]})})]})}),d.jsx(K,{span:4,children:d.jsxs(U,{justify:"end",gutter:10,children:[d.jsx(K,{children:d.jsx(U,{align:"middle",children:d.jsx(Dt,{style:{color:u===!0?"red":"black",cursor:"pointer",fontSize:"20px"},onClick:S})})}),d.jsx(K,{children:d.jsx(U,{align:"middle",children:d.jsx(Nt,{style:{color:y===!0?"red":"black",cursor:"pointer",fontSize:"20px"},onClick:O})})})]})})]})]})}function L(){return d.jsx(Qe,{className:"music-list bg-gray-400 pl-10 pr-10",style:{height:"calc(100% - 20px)",overflow:"auto",position:"relative",top:x>993?0:-20},dataSource:e,renderItem:(R,A)=>d.jsx(Qe.Item,{style:{cursor:"pointer"},onClick:()=>T(A),children:n===A?d.jsxs("span",{style:{cursor:"pointer",color:"white"},children:[R.title," by ",R.singer]}):d.jsxs("span",{style:{cursor:"pointer"},children:[R.title," by ",R.singer]})})})}return d.jsxs(U,{id:"music-player",className:"music-player",type:"flex",children:[d.jsxs(K,{id:"music-player-control",xxl:16,xl:16,lg:16,md:24,sm:24,xs:24,children:[Q(),ee(),d.jsx("audio",{ref:t,src:((q=i==null?void 0:i.audioId)==null?void 0:q.audioStatus)===!0?`https://spm-production.s3.ap-southeast-1.amazonaws.com/${(Z=i==null?void 0:i.audioId)==null?void 0:Z.audio}`:(V=i==null?void 0:i.audioId)==null?void 0:V.audio,onTimeUpdate:W,onEnded:z,onLoadedMetadata:B,autoPlay:o})]}),d.jsx(K,{xxl:8,xl:8,lg:8,md:24,sm:24,xs:24,style:{height:k},children:L()})]})}function hr(){const{data:e}=Tt("song",{limit:1e3,status:!0},[]);return Bt(Je("music")),r.useEffect(()=>{window.scrollTo(0,0)},[]),d.jsx(U,{className:"w-100",children:d.jsx(K,{span:24,align:"middle",children:d.jsxs("div",{className:"layout-max-width p-20",children:[d.jsx(U,{children:d.jsx("h2",{className:"m-0",children:Je("music")})}),d.jsx(U,{children:d.jsx("h1",{className:"m-0",children:"សម្តេចតេជោ ហ៊ុន សែន"})}),d.jsx(U,{className:"mb-40",justify:"start",children:d.jsx("h1",{className:"m-0",children:"បទចម្រៀង ដែលជាស្នាដៃសម្តេចអគ្គមហាសេនាបតីតេជោ ហ៊ុន សែន នាយករដ្ឋមន្រ្តីនៃព្ររាជាណាចក្រកម្ពុជា"})}),d.jsx(cr,{songs:e})]})})})}export{hr as default};